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AI,WAGtBgG,EAAQE,MAAMC,OAAS,GAAGX,aAAK,EAALA,EAAOY,iBAGjCL,EAAIM,YAAYL,GAGhB/H,KAAKqI,sBAAsBP,EAAKC,EAAQ,GAE1C,CAEA,qBAAAM,CAAsBP,EAA2BC,GAEhD,IAAIO,EAAI,EACJC,EAAI,EAER,MAaMC,EAAmB,SAAUC,GAElC,MAAMC,EAAKD,EAAEE,QAAUL,EAGvB,IAAIM,EAAmBL,EAAIG,EAC3BZ,EAAIG,MAAMY,SAAW,GAAGD,MACxBd,EAAIG,MAAMa,MAAQ,GAAGF,KACtB,EAGMG,EAAiB,WACtBvB,SAASwB,oBAAoB,YAAaR,GAC1ChB,SAASwB,oBAAoB,UAAWD,EACzC,EAEAhB,EAAQkB,iBAAiB,aA7BA,SAAUR,GAElCH,EAAIG,EAAEE,QAGN,MAAMO,EAASpI,OAAOqI,iBAAiBrB,GACvCS,EAAIa,SAASF,EAAOJ,MAAO,IAG3BtB,SAASyB,iBAAiB,YAAaT,GACvChB,SAASyB,iBAAiB,UAAWF,EACtC,GAmBD,GA9MG,GAAC,EAAA9H,S,yDACD,GAAC,EAAAA,S,wDACD,GAAC,EAAAA,S,yDACD,GAAC,EAAAA,S,wDAJQ6D,EAAc,GAD1B,EAAA5D,W,uBAWkC,IAAqC,IAC9C,IAA0C,IAC5C,EAAAC,gBAAgC,OAZ3C2D,E","sources":["webpack://client-app/./src/app/project/quantity-takeoff/simple-properties/simple-properties.scss","webpack://client-app/./src/app/project/quantity-takeoff/source-selector/source-selector.scss","webpack://client-app/./src/app/project/quantity-takeoff/simple-properties/simple-properties.html","webpack://client-app/./src/app/project/quantity-takeoff/source-selector/source-selector.html","webpack://client-app/./src/app/project/quantity-takeoff/simple-properties/simple-properties.ts","webpack://client-app/./src/app/project/quantity-takeoff/source-mediator.ts","webpack://client-app/./src/app/project/quantity-takeoff/source-selector/source-selector.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.simple-property-container{display:flex;flex-direction:column;overflow:auto;padding:10px;width:100%;height:100%}.simple-property-container details[open]>summary .icon{transform:rotate(180deg)}.simple-property-container details summary{background:#f0f3f4;font-weight:600;height:2em !important;display:flex;align-items:center;justify-content:space-between;padding:0 calc(15px/1.5);border:1px solid rgba(0,0,0,.175)}.simple-property-container details summary::-webkit-details-marker{display:none}.simple-property-container details summary:focus{outline:none}.simple-property-container details summary .title{text-transform:capitalize}.simple-property-container__header{padding-left:10px;padding-right:10px;display:flex;justify-content:space-between;align-items:center;margin-top:2px;height:auto}.simple-property-container__header .title{margin:0}.simple-property-container-section{display:grid;row-gap:calc(15px/3)}.simple-property-container-section>.simple-property-container-section{padding:calc(15px/3)}.simple-property-container-section__header{display:flex;justify-content:space-between;align-items:center}.simple-property-container-section__header .title{margin:0}.simple-property-container[data-properties-detailed=true]{width:100%}[data-device-type=mobile] .simple-property-container[data-properties-detailed=true]{width:100vw}[data-device-type=tablet] .simple-property-container[data-properties-detailed=true]{width:560px}.simple-property-container[data-properties-detailed=true] .property{grid-template-columns:1fr 1.25fr 8em}.simple-property-container .property{display:grid;grid-template-columns:1fr 1.25fr;width:100%}.simple-property-container .material{display:grid;grid-template-columns:1fr !important}.simple-property-container .layer{display:grid;grid-template-columns:.5fr 3fr 7em !important}.simple-property-container .property[data-readonly-property=true],.simple-property-container .material[data-readonly-property=true],.simple-property-container .layer[data-readonly-property=true]{color:rgba(51,51,51,.6)}.simple-property-container .property[data-multiline=true] .cell,.simple-property-container .material[data-multiline=true] .cell,.simple-property-container .layer[data-multiline=true] .cell{height:10em}.simple-property-container .property[data-multiline=true] .cell.cell--value,.simple-property-container .material[data-multiline=true] .cell.cell--value,.simple-property-container .layer[data-multiline=true] .cell.cell--value{white-space:unset;line-height:normal}.simple-property-container .property[data-multiline=true] .cell.cell--value>span,.simple-property-container .material[data-multiline=true] .cell.cell--value>span,.simple-property-container .layer[data-multiline=true] .cell.cell--value>span{display:block;padding:calc(15px/2) calc(15px/1.5);height:inherit;overflow:auto;white-space:pre-line}.simple-property-container .property .cell,.simple-property-container .material .cell,.simple-property-container .layer .cell{border-right:1px solid rgba(0,0,0,.175);border-bottom:1px solid rgba(0,0,0,.175);height:2em !important;line-height:2em !important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.simple-property-container .property .cell--title,.simple-property-container .material .cell--title,.simple-property-container .layer .cell--title{position:relative;padding:0 calc(15px/1.5)}.simple-property-container .property .cell--title .url-icon,.simple-property-container .material .cell--title .url-icon,.simple-property-container .layer .cell--title .url-icon{position:absolute;right:0px;top:.5px;cursor:pointer}.simple-property-container .property .cell--title .url-icon:hover,.simple-property-container .material .cell--title .url-icon:hover,.simple-property-container .layer .cell--title .url-icon:hover{text-decoration:none}.simple-property-container .property .cell--value,.simple-property-container .material .cell--value,.simple-property-container .layer .cell--value{padding:0}.simple-property-container .property .cell--value>span,.simple-property-container .material .cell--value>span,.simple-property-container .layer .cell--value>span{padding:0 calc(15px/1.5)}.simple-property-container .property .cell:first-of-type,.simple-property-container .material .cell:first-of-type,.simple-property-container .layer .cell:first-of-type{border-left:1px solid rgba(0,0,0,.175)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/project/quantity-takeoff/simple-properties/simple-properties.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAGA,2BACI,YAAA,CACA,qBAAA,CACA,aAAA,CACA,YAAA,CACA,UAAA,CACA,WAAA,CAIA,uDACC,wBAAA,CAIH,2CACC,kBCRY,CDSZ,eAAA,CACA,qBAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,wBAAA,CACA,iCAAA,CAEA,mEACC,YAAA,CAGD,iDACC,YAAA,CAGD,kDACC,yBAAA,CAKA,mCACF,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,cAAA,CACA,WAAA,CACA,0CACC,QAAA,CAGC,mCACF,YAAA,CACA,oBAAA,CAEA,sEACC,oBAAA,CAED,2CACC,YAAA,CACA,6BAAA,CACA,kBAAA,CAEA,kDACC,QAAA,CAKH,0DACC,UAAA,CAEA,oFACC,WCXwC,CDczC,oFACC,WCbwC,CDgBzC,oEACC,oCAAA,CAGF,qCACC,YAAA,CACA,gCAAA,CACA,UAAA,CAED,qCACC,YAAA,CACA,oCAAA,CAED,kCACC,YAAA,CACA,6CAAA,CAKA,mMACC,uBAAA,CAGD,6LACC,WAAA,CAEA,iOACC,iBAAA,CACA,kBAAA,CAEA,gPACC,aAAA,CACA,mCAAA,CACA,cAAA,CACA,aAAA,CACA,oBAAA,CAKH,8HACC,uCAAA,CACA,wCAAA,CACA,qBAAA,CACA,0BAAA,CAEA,eAAA,CACA,sBAAA,CACA,kBAAA,CAEA,mJACC,iBAAA,CACA,wBAAA,CACA,iLACC,iBAAA,CACA,SAAA,CACA,QAAA,CACA,cAAA,CAED,mMACC,oBAAA,CAIF,mJACC,SAAA,CAEA,kKACC,wBAAA,CAKF,wKACC,sCAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.source-selector-top-view{min-width:350px;height:50px;padding:10px;margin-bottom:10px;overflow:hidden}.source-selector-top-view .add-btn{float:right}.table-holder{position:relative;width:100%;display:block;overflow:auto;height:calc(100% - 60px)}.table-holder .source-table{width:100%}.table-holder .source-table thead{position:sticky;top:0;z-index:10;background-color:#fff}.table-holder .source-table .selected-type{background-color:#348fe2;color:#fff}.table-holder .source-table th{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;max-width:0;border:1px #d3d3d3 solid;border-top:0px;height:4em;padding-left:5px}.table-holder .source-table th .header-input{width:calc(100% - 5px);margin-top:3px;border-width:1px;border-color:#d3d3d3;border-style:solid}.table-holder .source-table th .header-input:focus-visible{outline:none}.table-holder .source-table td:hover{cursor:pointer}.table-holder .source-table label input{left:50%;transform:translateX(-50%)}.table-holder .source-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:0;border:1px #d3d3d3 solid;height:1.5em;line-height:1.5em;padding-left:5px}.table-holder .source-table th:first-child{vertical-align:bottom;padding-bottom:7px;border-left:0px;width:2em;max-width:2em;padding-left:2px}.table-holder .source-table td:first-child{border-left:0px;width:2em;max-width:2em;padding-left:2px}.table-holder .source-table th:last-child,.table-holder .source-table td:last-child{border-right:0px}.resizer{position:absolute;top:0;right:0;width:5px;cursor:col-resize;user-select:none}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/project/quantity-takeoff/source-selector/source-selector.scss\",\"webpack://./src/resources/styling-admin.scss\"],\"names\":[],\"mappings\":\"AAEA,0BACI,eAAA,CACA,WAAA,CACA,YAAA,CACA,kBAAA,CACA,eAAA,CACA,mCACI,WAAA,CAIR,cACI,iBAAA,CACA,UAAA,CACA,aAAA,CACA,aAAA,CACA,wBAAA,CACA,4BACI,UAAA,CACA,kCACI,eAAA,CACA,KAAA,CACA,UAAA,CACA,qBAAA,CAEJ,2CACI,wBCzBE,CD0BF,UAAA,CAEJ,+BACI,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,iBAAA,CACA,WAAA,CACA,wBAAA,CACA,cAAA,CACA,UAAA,CACA,gBAAA,CAEA,6CACI,sBAAA,CACZ,cAAA,CACA,gBAAA,CACA,oBAAA,CACA,kBAAA,CAED,2DACC,YAAA,CAGI,qCACI,cAAA,CAGA,wCACI,QAAA,CACA,0BAAA,CAGR,+BACI,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,WAAA,CACA,wBAAA,CACA,YAAA,CACA,iBAAA,CACA,gBAAA,CAEJ,2CACL,qBAAA,CACA,kBAAA,CACA,eAAA,CACA,SAAA,CACA,aAAA,CACA,gBAAA,CAEK,2CACI,eAAA,CACA,SAAA,CACA,aAAA,CACA,gBAAA,CAEJ,oFAEI,gBAAA,CAIZ,SACI,iBAAA,CACA,KAAA,CACA,OAAA,CACA,SAAA,CACA,iBAAA,CACA,gBAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = ``;\n// Exports\nexport default code;","// Module\nvar code = ` `;\n// Exports\nexport default code;","import { TypeDtoWCategory } from \"app/components/quantity-filter-sources/quantity-filter-sources\";\r\nimport { ITypeOrInstance } from \"app/models/object-properties-dto\";\r\nimport { ApiClient } from \"app/services/api-client\";\r\nimport { AppContextService } from \"app/services/app-context-service\";\r\nimport { UrlFormatter } from \"app/services/url-formatter\";\r\nimport { autoinject, bindable } from \"aurelia-framework\";\r\nimport {EventAggregator, Subscription} from \"aurelia-event-aggregator\";\r\n\r\n//This component is a simple type read-only of the original new-properties component.\r\n@autoinject\r\nexport class SimpleProperties {\r\n private projectId: string = \"\";\r\n @bindable QS: TypeDtoWCategory | undefined;\r\n private itemPropertyGroups: ITypeOrInstance[] | undefined\r\n\r\n private showPropertiesDetailed: boolean = false;\r\n constructor(private api: ApiClient, private appContext: AppContextService, private events: EventAggregator) {}\r\n\r\n async bind(): Promise {\r\n console.log('simple-properties:bind', this.QS);\r\n this.projectId = this.appContext.projectId;\r\n await this.getProperties();\r\n this.events.publish('object-properties-material:show', this.QS?.id);\r\n }\r\n\r\n unbind(): void {\r\n console.log('simple-properties:unbind', this.QS);\r\n //Perhaps the project change should be here, if any is even necessary.\r\n }\r\n\r\n async QSChanged(): Promise {\r\n console.log(\"QS changed \" , this.QS);\r\n await this.getProperties();\r\n this.events.publish('object-properties-material:update', this.QS?.id);\r\n }\r\n\r\n async getProperties(): Promise {\r\n this.itemPropertyGroups = await this.api.project(this.appContext.projectId).get(`ObjectDetail/GetAllPropertiesByObjectId/${this.QS?.id}`).jsonResult();\r\n console.log(\"all properties \" , this.itemPropertyGroups)\r\n }\r\n\r\n formatUrl(url: string): string {\r\n\t\treturn UrlFormatter.formatUrl(url);\r\n\t}\r\n\r\n\tgoToUrl(url: string): void {\r\n\t\twindow.open(this.formatUrl(url), '_blank');\r\n\t}\r\n\r\n toggleDetails(): void {\r\n this.showPropertiesDetailed = !this.showPropertiesDetailed;//TODO - styling not proper yet.\r\n }\r\n\r\n}","import { TypeDto, TypeDtoWCategory } from \"app/components/quantity-filter-sources/quantity-filter-sources\";\r\nimport { QuantityFilterDto, QuantityFilters } from \"../quantity-views/quantity-filters\";\r\nimport { autoinject } from \"aurelia-framework\";\r\nimport { QuantitySourcesService, SearchInputDto } from \"app/services/quantity-sources-service\";\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\n\r\n/**\r\n * \r\n */\r\n@autoinject\r\nexport class SourceMediator {\r\n selectedQF: QuantityFilterDto | undefined;\r\n\t\r\n\t// readonly \r\n loadedTypes: TypeDtoWCategory[] = []; //Types displayed based on the search\r\n\r\n originalSources: Set = new Set();//was: TypeDto[] //The original sources from the selectedFilter\r\n filterTypesBasket: Set = new Set();//was: TypeDto[] //The sources currently selected, but not saved\r\n isBasketAndOriginalDifferent: boolean = false; //We cannot trigger bindableChanged on an array, therefore we have an extra bool.\r\n isAllSelected: boolean = false;\r\n selectedType: TypeDtoWCategory | undefined;\r\n\r\n constructor(public qsService: QuantitySourcesService, private events: EventAggregator) {}\r\n\r\n handleToggledItem(type: TypeDtoWCategory): void {\r\n if (type.selected == true) {\r\n this.filterTypesBasket.add(type.id);\r\n } else {\r\n this.filterTypesBasket.delete(type.id);\r\n }\r\n this.hasSourcesBeenChanged();\r\n this.setIsAllSelected();\r\n }\r\n\r\n async handleAllToggle() {\r\n if (this.loadedTypes.length == this.loadedTypes.filter(type => type.selected).length) { //All selected, meaning the basket should be emptied.\r\n this.loadedTypes.forEach(type => type.selected = false);\r\n let idsToRemove: string[] = this.loadedTypes.map(type => type.id);\r\n for (let id of idsToRemove) {\r\n this.filterTypesBasket.delete(id);\r\n }\r\n } else { //Not all selected, meaning the basket should be filled with remaining sources.\r\n this.loadedTypes.forEach(type => type.selected = true);\r\n let itemsToAdd: TypeDto[] = this.loadedTypes.filter(type => !this.filterTypesBasket.has(type.id));\r\n for (let type of itemsToAdd) {\r\n this.filterTypesBasket.add(type.id)\r\n }\r\n }\r\n\r\n\t\tconst typesWeGotBack = this.setSelectedFlagForTypes(this.loadedTypes,'handleAllToggle');\r\n this.setLoadedTypes(typesWeGotBack,'handleAllToggle'); //loadedTypes = \r\n\r\n //Update isBasketAndOriginalDifferent if changes has been made to the basket.\r\n this.hasSourcesBeenChanged();\r\n //Check if all sources are now selected (By all it is meant all loaded sources, based on the user input from the 3 input fields.)\r\n this.setIsAllSelected(); \r\n }\r\n\r\n hasSourcesBeenChanged(): void {\r\n if (this.originalSources.size != this.filterTypesBasket.size) {\r\n this.isBasketAndOriginalDifferent = true;\r\n return;\r\n } else {\r\n let isChanged: boolean = false;\r\n this.filterTypesBasket.forEach(t => {\r\n if (!this.originalSources.has(t)) {\r\n isChanged = true;\r\n return;\r\n }\r\n });\r\n this.isBasketAndOriginalDifferent = isChanged;\r\n }\r\n }\r\n\r\n async setSelectedQF(qf: QuantityFilterDto | undefined, forceTypeReload:boolean): Promise {\r\n\t\tconsole.log('TEMP-SM-setSelectedQF');\r\n\t\ttry {\r\n\t\t\t// wait-cursor. https://jira.eg.dk/browse/AJC-1725 todo\r\n\t\t\tQuantityFilters.animate(true);\r\n if (qf != undefined) {\r\n await this.impl_setSelectedQF(qf,forceTypeReload);//in-setSelectedQF.\r\n } else {\r\n this.resetSelectionAndFilter();\r\n }\r\n\t\t} finally {\r\n\t\t\tconsole.log('after');\r\n\t\t\t// clear-wait-cursor.\r\n\t\t\tQuantityFilters.animate(false);\r\n\t\t}\r\n }\r\n\r\n\tasync impl_setSelectedQF(qf: QuantityFilterDto, forceTypeReload:boolean):Promise { // UB:setSelectedQF\r\n\t\tconsole.log('TEMP-impl_setSelectedQF');\r\n let types: TypeDto[] = await this.qsService.getSelectedTypes(qf.id, 'impl_setSelectedQF', forceTypeReload);\r\n\t\tif (types == undefined) {\r\n\t\t\tconsole.trace('now, why would types be undefined here?');\r\n\t\t\treturn;\r\n\t\t}\r\n this.filterTypesBasket = new Set (types.map(type => type.id));\r\n this.originalSources = new Set (types.map(type => type.id));\r\n\r\n\t\t// JG: I wonder why we here are assigning back into the list we passed as arg..?\r\n\t\tconst typesWeGotBack = this.setSelectedFlagForTypes(this.loadedTypes, 'impl_setSelectedQF'); \r\n this.setLoadedTypes(typesWeGotBack,'impl_setSelectedQF'); // loadedTypes = \r\n\r\n this.isBasketAndOriginalDifferent = false;\r\n this.setIsAllSelected();\r\n this.selectedQF = qf;\r\n\t}\r\n\r\n\tsetLoadedTypes(loadedTypesToSet: TypeDtoWCategory[], who:string) {\r\n\t\tconsole.log('setLoadedTypes, by ', who, loadedTypesToSet.length, this.loadedTypes.length);\r\n\t\tthis.loadedTypes = loadedTypesToSet; \r\n\t} \r\n\r\n async newSearchForTypes(searchInpuDto: SearchInputDto, pageIndex: number, who:string, calledByInitBind:boolean): Promise {\r\n\t\t// JG: If we disable this, we can get the scroll problem back.\r\n //this.loadedTypes = []; //To avoid scroll intersection issues.\r\n\t\t//this.loadedTypes.length = 0; // den dur ikke?\r\n\r\n let types: TypeDtoWCategory[] = await this.qsService.searchForTypes(searchInpuDto, pageIndex);\r\n\t\tconsole.log('newSearchForTypes, setting this.loadedTypes, had#:', this.loadedTypes.length, 'getting:', types.length, 'who:', who);\r\n\r\n\t\t// hvis tidsnok og ikke-tidsnok er sådan, hvorfor har vi så anbragt SLT i \"for sent\" blokken?\r\n\r\n\t\t//this.loadedTypes = []; // dette er tidsnok.\r\n\r\n\t\tthis.setSelectedFlagForTypes(types,'newSearchForTypes');\r\n\r\n\t\t// Den skal UBETINGET lave dette clear, ellers får vi typerne gentaget 2-3 gange, inklusive med random selection.\r\n\t\tconst shouldClearLoadedTypes = true; //!calledByInitBind; \r\n\t\tif (shouldClearLoadedTypes) {\r\n\t\t\tthis.setLoadedTypes([],'newSearchForTypes'); //loadedTypes = []; // dette er for sent.\r\n\t\t}\r\n\r\n\r\n\t\t//this.loadedTypes = [];\r\n\t\t//this.loadedTypes.length = 0;\r\n //this.loadedTypes.splice(0,this.loadedTypes.length, ...types);\r\n this.loadedTypes.push(...types);\r\n\r\n\t\tconsole.log('newSearchForTypes, DONE setting this.loadedTypes, now has:#', this.loadedTypes.length);\r\n this.setIsAllSelected();\r\n this.selectedType = undefined;\r\n\r\n\t\tif (calledByInitBind) { this.tryToRefreshPivotGrid(); }\r\n }\r\n\r\n\tasync tryToRefreshPivotGrid() { // try to refresh the grid again.\r\n\t\tconsole.log('tryToRefreshPivotGrid');\r\n\t\t/* Hmm, reading up on it, I get the impression that aurelia uses event 'attached' for,\r\n\t\tacting in a parent, once all children have finished initializing.\r\n\r\n\t\tSo, probably, we should set/init for the filter, in the attached event instead? \r\n\t\t */\r\n\t\tconst sameQF = this.selectedQF;\r\n\t\tthis.selectedQF = undefined; // this hack appears to work to trigger change.\r\n\t\tawait this.setSelectedQF(sameQF, true); // TEMP-SM-setSelectedQF\r\n\t}\r\n\r\n async scrollSearchForTypes(searchInpuDto: SearchInputDto, pageIndex: number): Promise {\r\n let types: TypeDtoWCategory[] = await this.qsService.searchForTypes(searchInpuDto,pageIndex);\r\n this.loadedTypes.splice(this.loadedTypes.length,0,...this.setSelectedFlagForTypes(types,'scrollSearchForTypes'));\r\n this.setIsAllSelected();\r\n }\r\n\r\n setSelectedFlagForTypes(types: TypeDtoWCategory[], who:string): TypeDtoWCategory[] {\r\n console.log(\"setSelectedFlagForTypes\", who, types);\r\n console.log(\"filterTypesBasket\", this.filterTypesBasket);\r\n types.forEach(type => {\r\n type.selected = this.filterTypesBasket.has(type.id);\r\n });\r\n return types;\r\n }\r\n\r\n setIsAllSelected(): void {\r\n this.isAllSelected = 0 == this.loadedTypes.filter(type => !type.selected).length;\r\n }\r\n\r\n handleDeletedQF(qf: QuantityFilterDto): boolean {\r\n if (qf.id == this.selectedQF?.id) {\r\n this.resetSelectionAndFilter();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n async updateSourcesOnFilter(): Promise {\r\n\t\tconsole.log('SourceMediator.updateSourcesOnFilter');\r\n if (!this.selectedQF) { return; }\r\n\r\n\t\tlet itemsToRemove: string[] = [];\r\n\t\tthis.originalSources.forEach(type => {\r\n\t\t\tif (!this.filterTypesBasket.has(type)) {\r\n\t\t\t\titemsToRemove.push(type);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tlet itemsToAdd: string[] = [];\r\n\t\tthis.filterTypesBasket.forEach(type => {\r\n\t\t\tif (!this.originalSources.has(type)) {\r\n\t\t\t\titemsToAdd.push(type);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tlet successfullyUpdated: boolean = await this.qsService.updateSources(this.selectedQF.id, itemsToAdd,itemsToRemove);\r\n\t\tif (successfullyUpdated) {\r\n\t\t\tlet types: TypeDto[] = await this.qsService.getSelectedTypes(this.selectedQF.id,'updateSourcesOnFilter', false);\r\n\t\t\tthis.originalSources = new Set(types.map(t => t.id));\r\n\t\t\tthis.isBasketAndOriginalDifferent = false;\r\n\t\t\tthis.events.publish('pivot-grid-component:update-grid');\r\n\t\t\tthis.events.publish('type-overview:update-sources');\r\n\t\t}\r\n\t\tconsole.log(\"New selected Sources\", this.originalSources);\r\n }\r\n\r\n resetSelectionAndFilter(): void {\r\n this.selectedQF = undefined;\r\n this.originalSources.clear();\r\n this.filterTypesBasket.clear();\r\n this.isBasketAndOriginalDifferent = false;\r\n this.isAllSelected = false;\r\n\r\n\t\t// JG: If we disable this, we can get the scroll problem back.\r\n //this.loadedTypes = []; // the fix-hack\r\n\t\tconsole.log('resetSelectionAndFilter, clearing loadedTypes.selected');\r\n\r\n\t\tthis.loadedTypes.forEach(type => type.selected = false);\r\n\t\tconsole.log('resetSelectionAndFilter, DONE clearing loadedTypes.selected');\r\n\r\n this.selectedType = undefined;\r\n }\r\n}\r\n","import { TypeDtoWCategory } from \"app/components/quantity-filter-sources/quantity-filter-sources\";\r\nimport { ApiClient } from \"app/services/api-client\";\r\nimport { AppContextService } from \"app/services/app-context-service\";\r\nimport { autoinject, bindable } from 'aurelia-framework';\r\nimport { QuantitySourcesService, SearchInputDto } from \"app/services/quantity-sources-service\";\r\nimport { SourceMediator } from \"../source-mediator\";\r\nimport { EventAggregator } from \"aurelia-event-aggregator\";\r\nimport { ModalService } from \"app/services/modal-service\";\r\nimport { DialogCloseResult } from \"aurelia-dialog\";\r\n\r\n\r\n@autoinject\r\nexport class SourceSelector {\r\n @bindable projectId: string = \"\";\r\n @bindable private catInput: string = \"\";\r\n @bindable private typeInput: string = \"\";\r\n @bindable private famInput: string = \"\";\r\n private pageIndex: number = 0;\r\n private pageSize: number = 50;\r\n private isLoading: boolean = false;\r\n private resetTimeoutId: number = 0; //Number does not matter, as it is just an id for resetting the timeout.\r\n\r\n constructor(public appContext: AppContextService, public apiClient: ApiClient, \r\n public qsService: QuantitySourcesService, public sMediator: SourceMediator,\r\n private events: EventAggregator, private modal: ModalService) {}\r\n\r\n async bind(): Promise {\r\n console.log(\"source-selector:bind \", this.projectId);\r\n await this.sMediator.newSearchForTypes(this.getSearchInputDto(),this.pageIndex, 'SourceSelector-bind', true);\r\n await this.getMoreTypes();\r\n // this.sMediator.loadedTypes = await this.qsService.searchForTypes();\r\n }\r\n async attached(): Promise {\r\n this.setupResizing();\r\n }\r\n \r\n async resetSearch(): Promise {\r\n this.catInput = \"\";\r\n this.typeInput = \"\";\r\n this.famInput = \"\";\r\n await this.searchForTypes();\r\n }\r\n\r\n async catInputChanged(): Promise {\r\n this.handleInput();\r\n }\r\n \r\n async typeInputChanged(): Promise {\r\n this.handleInput();\r\n }\r\n \r\n async famInputChanged(): Promise {\r\n this.handleInput();\r\n }\r\n\r\n async handleInput(): Promise {\r\n clearTimeout(this.resetTimeoutId);\r\n this.resetTimeoutId = setTimeout(async () => {\r\n await this.searchForTypes();\r\n }, 500);\r\n }\r\n\r\n async projectIdChanged(): Promise {\r\n this.catInput = \"\";\r\n this.typeInput = \"\";\r\n this.famInput = \"\";\r\n await this.searchForTypes();\r\n }\r\n\r\n async searchForTypes(): Promise {\r\n this.pageIndex = 0;\r\n await this.sMediator.newSearchForTypes(this.getSearchInputDto(),this.pageIndex, 'searchForTypes', false);\r\n this.getMoreTypes();\r\n }\r\n\r\n async getMoreTypes(scrollContext?: any): Promise {\r\n\t\t//console.log('getMoreTypes, scrollContext: (bot)', scrollContext?.isAtBottom, 'rest:', scrollContext);\r\n\t\t// burde topIndex hjælpe os?\t\r\n if (scrollContext?.isAtBottom == false) { //built in virtual-repeat.for used for only getting more items if bottom is reached.\r\n return;\r\n }\r\n let newPageIndex: number = Math.round(this.sMediator.loadedTypes.length / this.pageSize);\r\n if (!this.isLoading && newPageIndex != this.pageIndex) {\r\n await this.loadMoreTypes(newPageIndex);\r\n }\r\n }\r\n\r\n async loadMoreTypes(newPageIndex: number): Promise {\r\n this.isLoading = true;\r\n this.pageIndex = newPageIndex;\r\n await this.sMediator.scrollSearchForTypes(this.getSearchInputDto(), this.pageIndex);\r\n this.isLoading = false;\r\n }\r\n\r\n\t// JG: - not currently active.\r\n //sortTypes(): void {\r\n // this.sMediator.loadedTypes.sort((element1, element2) => {\r\n // if (element1 && element2) {\r\n // return element1.name.localeCompare(element2.name);\r\n // }\r\n // return 0;\r\n // });\r\n //}\r\n\r\n getSearchInputDto(): SearchInputDto {\r\n return {catInput: this.catInput,typeInput: this.typeInput, famInput: this.famInput};\r\n }\r\n\r\n handleToggledItem(type: TypeDtoWCategory): void {\r\n this.sMediator.handleToggledItem(type)\r\n }\r\n\r\n async toggleAll(): Promise {\r\n await this.loadAllTypes(); //To select or deselect all sources, they must first be fetched\r\n await this.sMediator.handleAllToggle();\r\n }\r\n\r\n async loadAllTypes(): Promise {\r\n let doneLoading: boolean = false;\r\n while (!doneLoading) {\r\n let amountOfTypesLoaded: number = this.sMediator.loadedTypes.length;\r\n await this.getMoreTypes();\r\n doneLoading = amountOfTypesLoaded == this.sMediator.loadedTypes.length;\r\n }\r\n }\r\n\r\n async switchToViewerMode(): Promise {\r\n if (this.sMediator.selectedQF != undefined && this.sMediator.isBasketAndOriginalDifferent) {\r\n let response: DialogCloseResult = await this.modal.OpenConfirm(\"Unsaved data\", \"The changes made have not been saved. Do you wish to continue without saving changes?\").whenClosed();\r\n if (response.wasCancelled == true) {\r\n return;\r\n }\r\n }\r\n this.clearSearchField();\r\n this.sMediator.selectedType = undefined;\r\n this.events.publish('takeoff-switch-right-view');\r\n }\r\n\r\n clearSearchField(): void {\r\n this.catInput = \"\";\r\n this.typeInput = \"\";\r\n this.famInput = \"\";\r\n }\r\n \r\n async updateFilterSources(): Promise {\r\n\t\tconsole.log('sourceSelector.updateFilterSources');\r\n await this.sMediator.updateSourcesOnFilter();\r\n }\r\n\r\n async selectType(typeDto: TypeDtoWCategory) { //If a type is selected Properties will b displayed.\r\n if (this.sMediator.selectedType == typeDto) {\r\n this.sMediator.selectedType = undefined;\r\n } else {\r\n this.sMediator.selectedType = typeDto\r\n }\r\n }\r\n\r\n setupResizing() {\r\n\t\t//Code inspiration from: https://htmldom.dev/resize-columns-of-a-table/\r\n\t\t// Query the table\r\n\t\tconst table = document.getElementById('resizable-source-table');\r\n\r\n\t\t// Query all headers\r\n\t\tconst cols: NodeListOf | undefined = table?.querySelectorAll('th');\r\n console.log(\"cols \" , cols);\r\n\t\tif (cols && cols?.length > 0 && cols[0].classList.contains('placeholder-column')) { return; } //If it is a placeholder-column resize is not added.\r\n\t\t// Loop over them\r\n\t\tcols?.forEach(col => {\r\n if (col.classList.contains('source-checkbox') || col == cols[cols.length -1]) { return; }\r\n\t\t\t// Create a resizer element\r\n\t\t\tconst resizer = document.createElement('div');\r\n\t\t\tresizer.classList.add('resizer');\r\n\r\n\t\t\t// Set the height\r\n\t\t\tresizer.style.height = `${table?.offsetHeight}px`;\r\n\r\n\t\t\t// Add a resizer element to the column\r\n\t\t\tcol.appendChild(resizer);\r\n\r\n\t\t\t// Will be implemented in the next section\r\n\t\t\tthis.createResizableColumn(col, resizer);\r\n\t\t});\r\n\t}\r\n\r\n\tcreateResizableColumn(col: HTMLTableCellElement, resizer: HTMLDivElement) {\r\n\t\t// Track the current position of mouse\r\n\t\tlet x = 0;\r\n\t\tlet w = 0;\r\n\t\r\n\t\tconst mouseDownHandler = function (e: any) {\r\n\t\t\t// Get the current mouse position\r\n\t\t\tx = e.clientX;\r\n\t\r\n\t\t\t// Calculate the current width of column\r\n\t\t\tconst styles = window.getComputedStyle(col);\r\n\t\t\tw = parseInt(styles.width, 10);\r\n\t\r\n\t\t\t// Attach listeners for document's events\r\n\t\t\tdocument.addEventListener('mousemove', mouseMoveHandler);\r\n\t\t\tdocument.addEventListener('mouseup', mouseUpHandler);\r\n\t\t};\r\n\t\r\n\t\tconst mouseMoveHandler = function (e: any) {\r\n\t\t\t// Determine how far the mouse has been moved\r\n\t\t\tconst dx = e.clientX - x;\r\n\t\t\t\r\n\t\t\t// Update the width of column\r\n\t\t\tlet newWidth: number = w + dx;\r\n\t\t\tcol.style.minWidth = `${newWidth}px`; //Both has to be set.\r\n\t\t\tcol.style.width = `${newWidth}px`; //Both has to be set.\r\n\t\t};\r\n\t\r\n\t\t// When user releases the mouse, remove the existing event listeners\r\n\t\tconst mouseUpHandler = function () {\r\n\t\t\tdocument.removeEventListener('mousemove', mouseMoveHandler);\r\n\t\t\tdocument.removeEventListener('mouseup', mouseUpHandler);\r\n\t\t};\r\n\t\r\n\t\tresizer.addEventListener('mousedown', mouseDownHandler);\r\n\t}\r\n}\r\n\r\n\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","SimpleProperties","constructor","api","appContext","events","projectId","showPropertiesDetailed","bind","console","log","this","QS","getProperties","publish","unbind","QSChanged","itemPropertyGroups","project","get","jsonResult","formatUrl","url","U","goToUrl","window","open","toggleDetails","bindable","autoinject","EventAggregator","SourceMediator","qsService","loadedTypes","originalSources","Set","filterTypesBasket","isBasketAndOriginalDifferent","isAllSelected","handleToggledItem","type","selected","add","delete","hasSourcesBeenChanged","setIsAllSelected","handleAllToggle","length","filter","forEach","idsToRemove","map","itemsToAdd","has","typesWeGotBack","setSelectedFlagForTypes","setLoadedTypes","size","isChanged","t","setSelectedQF","qf","forceTypeReload","QuantityFilters","animate","undefined","impl_setSelectedQF","resetSelectionAndFilter","types","getSelectedTypes","trace","selectedQF","loadedTypesToSet","who","newSearchForTypes","searchInpuDto","pageIndex","calledByInitBind","searchForTypes","selectedType","tryToRefreshPivotGrid","sameQF","scrollSearchForTypes","splice","handleDeletedQF","updateSourcesOnFilter","itemsToRemove","updateSources","clear","SourceSelector","apiClient","sMediator","modal","catInput","typeInput","famInput","pageSize","isLoading","resetTimeoutId","getSearchInputDto","getMoreTypes","attached","setupResizing","resetSearch","catInputChanged","handleInput","typeInputChanged","famInputChanged","clearTimeout","setTimeout","async","projectIdChanged","scrollContext","isAtBottom","newPageIndex","Math","round","loadMoreTypes","toggleAll","loadAllTypes","doneLoading","amountOfTypesLoaded","switchToViewerMode","OpenConfirm","whenClosed","wasCancelled","clearSearchField","updateFilterSources","selectType","typeDto","table","document","getElementById","cols","querySelectorAll","classList","contains","col","resizer","createElement","style","height","offsetHeight","appendChild","createResizableColumn","x","w","mouseMoveHandler","e","dx","clientX","newWidth","minWidth","width","mouseUpHandler","removeEventListener","addEventListener","styles","getComputedStyle","parseInt"],"sourceRoot":""}