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AAKwF,iBAAiB,MAC7LuD,EAAQ9K,KAAK,CAAE+K,QAAS,SAAUC,MAAO,CAAEC,QAAS,2BAA4B5I,KAAK,qBAAsBiJ,aAAcvJ,KAAKb,mBAAmB4E,OAAS,GAAIoF,UAAW,gBAAiBC,QAAS,CAACpE,cAAe,KAAQhF,KAAKgF,eAAe,MACzOhF,KAAKhB,mBAAmBwK,KAAKxI,EAAO+H,EAC3C,CAEA,UAAAU,CAAWC,GACV,IAAIC,EAAgB,IAAIC,KAAKF,GACzBG,EAAWF,EAAcG,aAAaC,WAAWhG,OAAS,EAAK4F,EAAcG,aAAe,IAAMH,EAAcG,aAChHE,EAASL,EAAcM,WAAWF,WAAWhG,OAAS,EAAK4F,EAAcM,WAAa,IAAMN,EAAcM,WAC9G,OAAON,EAAcO,eAAiB,MAAQF,EAAQ,IAAMH,CAC7D,GArfYzL,E,mUAAU,EADtB,EAAA+L,W,kIAuB0B,IACT,EAAAC,gBAAgC,IAAkC,IAC/D,IAAyB,EAAAC,KAAuBC,QAC5C,IAAkC,EAAAC,UACpC,IACM,IACF,OA5BdnM,E","sources":["webpack://client-app/./src/app/administration/value-lists/value-lists.scss","webpack://client-app/./src/app/administration/value-lists/value-lists.html","webpack://client-app/./src/app/administration/value-lists/value-lists.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, `.value-lists-top-bar{min-width:700px}.value-lists-top-bar .value-list-title{padding-right:0px;margin:0}.delete-button{margin-right:10px}.right-aligned{float:right}.color-palette{float:right;margin-right:50px}.input-group{max-width:600px}.system-value-lists{display:grid}.system-value-lists[data-show-values=true]{grid-template-columns:1fr 800px}[data-device-type=mobile] .system-value-lists[data-show-values=true]{grid-template-columns:0 100%}[data-device-type=tablet] .system-value-lists[data-show-values=true]{grid-template-columns:1fr 70%}.system-value-lists .headers{grid-template-columns:4em minmax(10em, auto) 12em 15em}.system-value-lists .main .element{grid-template-columns:4em minmax(10em, auto) 12em 15em}.system-value-lists .values{position:relative;border-top:1px solid rgba(0,0,0,.175);border-left:1px solid rgba(0,0,0,.175);box-shadow:-0.05rem 0 .25rem rgba(0,0,0,.175);display:flex;flex-direction:column;flex-basis:100%;z-index:1020}[data-device-type=mobile] .system-value-lists .values,[data-device-type=tablet] .system-value-lists .values{border-left:none}.system-value-lists .values__header{border-bottom:1px solid rgba(0,0,0,.175);display:flex;gap:15px;align-items:center;justify-content:space-between;height:4em;line-height:4em;padding:0 15px}.system-value-lists .values__header span{font-weight:600}.system-value-lists .values__body{display:flex;flex-direction:column;height:calc(100vh - 4em - 4em - 40px);padding:15px;overflow:auto}[data-device-type=mobile] .system-value-lists .values__body,[data-device-type=tablet] .system-value-lists .values__body{height:calc(100vh - 4em - 4em - 50px)}.system-value-lists .values__body__headers{font-weight:600;display:grid;grid-template-columns:1fr repeat(2, minmax(60px, 0.5fr)) 7em;grid-template-rows:3em;gap:15px;align-items:center}.system-value-lists .values__footer{display:sticky;position:absolute;width:100%;bottom:0%;height:40px;border-top-left-radius:5px;border-top-right-radius:5px}.system-value-lists .values__footer .button-add{display:inline-block;position:relative;background-color:#fff;height:20px;width:20px;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%);margin-left:5px;border-radius:5px;z-index:100000}.system-value-lists .values__footer .button-add .icon{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%)}.system-value-lists .values__footer .button-add:hover{cursor:pointer}.system-value-lists .values__footer .list-item-input{all:unset;position:absolute;margin-left:5px;width:calc(100% - 40px);top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%);color:#fff}.system-value-lists .values__footer ::placeholder{color:#fff;opacity:1}.value-list-item__inner{display:grid;grid-template-columns:1fr repeat(2, minmax(60px, 0.5fr)) 7em;grid-template-rows:3em;column-gap:15px;align-items:center}.value-list-item__cell{display:flex;line-height:3em;align-items:center}.value-list-item__cell>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value-list-item__actions{display:none;margin-left:15px}.value-list-item__cell:hover .value-list-item__actions{display:block}.btn-delete-value-list{width:30px;padding-right:5px;padding-left:0;color:#a9a9a9}.btn-delete-value-list-hidden{visibility:hidden;width:30px;padding-right:5px;padding-left:0}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/administration/value-lists/value-lists.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAOA,qBACC,eAAA,CACA,uCACC,iBAAA,CACA,QAAA,CAIF,eACC,iBAAA,CAOD,eACC,WAAA,CAGD,eACC,WAAA,CACA,iBAAA,CAGD,aACC,eAAA,CAGD,oBACC,YAAA,CAEA,2CACC,+BAAA,CAEA,qEACC,4BAAA,CAGD,qEACC,6BAAA,CAIF,6BACC,sDAjDgC,CAqDhC,mCACC,sDAtD+B,CA0DjC,4BACC,iBAAA,CACA,qCAAA,CACA,sCAAA,CACA,6CC5CgB,CD6ChB,YAAA,CACA,qBAAA,CACA,eAAA,CACA,YCMkC,CDJlC,4GAEC,gBAAA,CAGD,oCACC,wCAAA,CACA,YAAA,CACA,QC9DM,CD+DN,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CACA,cAAA,CAEA,yCACC,eAAA,CAIF,kCACC,YAAA,CACA,qBAAA,CACA,qCAAA,CACA,YC9EM,CD+EN,aAAA,CAEA,wHACC,qCAAA,CAGD,2CACC,eAAA,CACA,YAAA,CACA,4DArGsC,CAsGtC,sBAAA,CACA,QC1FK,CD2FL,kBAAA,CAGF,oCACC,cAAA,CACA,iBAAA,CAEA,UAAA,CACA,SAAA,CACA,WAhHa,CAiHb,0BAAA,CACA,2BAAA,CAEA,gDACC,oBAAA,CACA,iBAAA,CACA,qBAAA,CACA,WAAA,CACA,UAAA,CACA,OAAA,CACA,8BAAA,CACA,0BAAA,CACA,eAAA,CACA,iBAAA,CACA,cAAA,CACA,sDACC,iBAAA,CACA,OAAA,CACA,QAAA,CACA,2CAAA,CAIF,sDACC,cAAA,CAGD,qDACC,SAAA,CACA,iBAAA,CACA,eAAA,CACA,uBAAA,CACA,OAAA,CACA,8BAAA,CACA,0BAAA,CACA,UAAA,CAED,kDACC,UAAA,CACA,SAAA,CAQH,wBACC,YAAA,CACA,4DAnKwC,CAoKxC,sBAAA,CACA,eCxJO,CDyJP,kBAAA,CAGD,uBACC,YAAA,CACA,eAAA,CACA,kBAAA,CAEA,4BACC,eAAA,CACA,sBAAA,CACA,kBAAA,CAIF,0BACC,YAAA,CACA,gBC1KO,CD4KP,uDACC,aAAA,CAKH,uBACC,UAAA,CACA,iBAAA,CACA,cAAA,CACA,aAAA,CAEA,8BACC,iBAAA,CACA,UAAA,CACA,iBAAA,CACA,cAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = ` `;\n// Exports\nexport default code;","import { ListService } from 'app/services/list-service';\r\nimport { NewValueList } from '../../components/modals/new-value-list/new-value-list';\r\nimport { ModalService } from './../../services/modal-service';\r\nimport { DeviceService } from 'app/services/device-service';\r\nimport { Subscription, EventAggregator } from 'aurelia-event-aggregator';\r\nimport { TaskQueue, autoinject } from \"aurelia-framework\";\r\nimport { ValueListDto, ValueListItemDto } from \"app/models/value-list-dtos\";\r\nimport { ValueListService } from \"app/services/value-list/value-list-service\";\r\nimport { ApiClient } from 'app/services/api-client';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport { AppContextService } from 'app/services/app-context-service';\r\nimport { ValuelistUpload } from 'app/components/file-upload/specific-uploads/valuelist-upload';\r\nimport { ImportValuelistModel } from 'app/models/viewmodels/import-valuelist-model';\r\nimport {DialogCloseResult} from \"aurelia-dialog\";\r\nimport { ContextMenuService } from 'app/services/context-menu-service';\r\nimport { HttpResponseMessage } from 'aurelia-http-client';\r\nimport { OrgTokenService } from 'app/services/org-token-service';\r\n\r\ndeclare let $: any;\r\n\r\n@autoinject\r\nexport class ValueLists {\r\n\tshowValues: boolean = false;\r\n\tpublic selectedValueLists: ValueListDto[] = [];\r\n\tpublic selectedValueList: ValueListDto | null = null;\r\n\tpublic selectedValueListItem: ValueListItemDto | null = null;\r\n\tpublic selectedValueListItemOriginal: ValueListItemDto | null = null;\r\n\tpublic newValueList: ValueListDto | null = null;\r\n\tpublic newValueListItem: ValueListItemDto | null = null;\r\n\tpublic valueLists: ValueListDto[] = [];\r\n\tpublic viewContext: string;\r\n\tpublic searchTerm: string = \"\";\r\n\tpublic searchTermValues: string = \"\";\r\n\tprivate allSelected: boolean = false;\r\n\tpublic column: string = \"name\";\r\n\tpublic displayState: { icon: string, direction: string } | undefined;\r\n\tprivate subscriptions: Subscription[] = [];\r\n\r\n\tpublic keybuttonHandling: ((this: Window, ev: KeyboardEvent) => any) | undefined;\r\n\tpublic newValueListItemName: string = \"\";\r\n\r\n\t\r\n\tconstructor(\r\n\t\tprivate valueListService:ValueListService, \r\n\t\tprivate events: EventAggregator, private modal: ModalService, private appContext: AppContextService, \r\n\t\tprivate apiClient: ApiClient, private i18n: I18N, private element: Element, \r\n\t\tprivate deviceService: DeviceService, private taskQueue: TaskQueue, \r\n\t\tprivate listService: ListService, \r\n\t\tpublic contextMenuService: ContextMenuService,\r\n\t\tprivate orgTokenService: OrgTokenService\r\n\t) {\r\n\t\tthis.viewContext = \"TopBar\";\r\n\t}\r\n\r\n\tasync activate() {\r\n\t\tawait this.getValueLists();\r\n\r\n\t\tthis.setupKeyHandler();\r\n\t\tthis.displayState = { icon: \"fa-sort-up\", direction: \"ascending\" };\r\n\t}\r\n\r\n\tattached() {\t\t\r\n\t\tconst searchHandler = (data: any) => this.handleSearchEvent(data);\r\n\t\tthis.subscriptions = [\r\n\t\t\tthis.events.subscribe(this.viewContext + \":SearchTermChanged\", searchHandler),\r\n\t\t\tthis.events.subscribe(\"global:org-changed\", async () => this.reloadPage())\r\n\t\t];\r\n\t}\r\n\r\n\tasync reloadPage(): Promise {\r\n\t\tthis.selectedValueListItem = null;\r\n\t\tthis.selectedValueLists = [];\r\n\t\tthis.selectedValueListItemOriginal = null;\r\n\t\tthis.closeValuesPanel();\r\n\t\tawait this.getValueLists();\r\n\t}\r\n\t\r\n\tasync setupKeyHandler() {\r\n\t\tthis.keybuttonHandling = async (event) => {\r\n if(event.key == \"Escape\") {\r\n this.closeValuesPanel();\r\n } \r\n\t\t\tif (event.key == \"Enter\") {\r\n\t\t\t\tif ($('.list-item-input').is(\":focus\")) {\r\n\t\t\t\t\tawait this.addNewListItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n };\r\n\t\twindow.addEventListener('keyup', this.keybuttonHandling, false);\r\n\t}\r\n\r\n\tdetached() {\r\n\t\tif (this.keybuttonHandling) {\r\n\t\t\twindow.removeEventListener('keyup', this.keybuttonHandling, false);\r\n\t\t}\r\n\t\tthis.subscriptions.forEach(subscription => (\r\n\t\t\tsubscription.dispose()\r\n\t\t));\r\n\t}\r\n\r\n\tprivate handleSearchEvent(data: string) {\r\n\t\tthis.searchTerm = data;\r\n\t\tlet includedList: ValueListDto[] = this.valueLists.filter(valueList => {\r\n\t\t\treturn valueList.name.toLocaleLowerCase().includes(this.searchTerm);\r\n\t\t});\r\n\t\tif (this.selectedValueList && !includedList.includes(this.selectedValueList)) {\r\n\t\t\tthis.closeValuesPanel();\r\n\t\t}\r\n\t}\r\n\r\n\t/*\r\n\t* ValueLists \r\n\t*/\r\n\tpublic selectList(list: ValueListDto) {\t\t\r\n\t\t// if (Boolean(this.selectedValueList)) {\r\n\t\t// \tif (this.selectedValueList.id === list.id) {\r\n\t\t// \t\tthis.deselectList(list); // in selectList.\r\n\t\t// \t\treturn;\r\n\t\t// \t}\r\n\t\t// \tthis.selectedValueList.selected = false;\r\n\t\t// \tthis.selectedValueList.inEditMode = false;\r\n\t\t// }\r\n\t\t// list.selected = true;\r\n\t\tthis.selectedValueList = list;\r\n\t\tthis.selectedValueListItem = null;\r\n\t\tthis.newValueList = null;\r\n\t\tthis.newValueListItem = null;\r\n\t\t// this.selectedValueLists.push(list);\r\n\t}\r\n\r\n\tpublic deselectList(list: ValueListDto) {\r\n\t\tif (this.selectedValueList?.inEditMode) {\r\n\t\t\tthis.cancelEditListMode();\r\n\t\t}\r\n\t\t\tthis.selectedValueList = null;\r\n\t\t\tthis.selectedValueLists.splice(this.selectedValueLists.indexOf(list), 1);\r\n\t}\r\n\r\n\tshowValuesPanel(list: ValueListDto) {\r\n\t\t// if (Boolean(this.selectedValueList)) {\r\n\t\t// \tthis.deselectList(list); // in showValuesPanel.\r\n\t\t// }\r\n\t\tthis.newValueListItemName = \"\";\r\n\t\tif (Boolean(this.selectedValueList)) {\r\n\t\t\tthis.cancelEditListMode();\r\n\t\t}\r\n\t\tif (Boolean(this.selectedValueList) && this.selectedValueList == list) {\r\n\t\t\tthis.closeValuesPanel();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.selectList(list);\r\n\t\tthis.getValueListItems();\r\n\t\tthis.showValues = true;\r\n\t\tthis.events.publish(\"aside-toggled\");\r\n\t}\r\n\r\n\tcloseValuesPanel() {\r\n\t\tthis.showValues = false;\r\n\t\tthis.selectedValueList = null;\r\n\t\tthis.searchTermValues = \"\";\r\n\t\tthis.events.publish(\"aside-toggled\");\r\n\t}\r\n\r\n\tpublic editListName() {\r\n\t\tif (this.selectedValueList) {\r\n\t\t\tthis.selectedValueList.inEditMode = true;\r\n\t\t\tthis.selectedValueList.editName = this.selectedValueList.name;\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic cancelEditListMode() {\r\n\t\tif (this.selectedValueList) {\r\n\t\t\tthis.selectedValueList.inEditMode = false;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic async newList() {\r\n\t\tconsole.log('System value list: Started new list (1)');\r\n\t\tawait this.modal.OpenModal(NewValueList).whenClosed(async (x:DialogCloseResult) => {\r\n\t\t\tif (!x.wasCancelled) {\r\n\t\t\t\tconsole.log('Before start of add new list (3)');\r\n\t\t\t\tlet output = x.output;\r\n\t\t\t\tif (!output) {\r\n\t\t\t\t\tconsole.log('value-list.newList, no output yet, bailing out.');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tawait this.addNewList(x.output);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate async getValueLists() {\r\n\t\tconsole.log(\"valuelistservice \" , this.valueListService);\r\n\t\tthis.valueLists = (await this.valueListService.getValueListsOnSystem()).filter(x => x.id !== \"00000000-0000-0000-0000-000000000000\");\r\n\t\tif(this.selectedValueList != undefined) {\r\n\t\t\tthis.valueLists.forEach(element => {\r\n\t\t\tif(element.id == this.selectedValueList?.id) {\r\n\t\t\t\t\tthis.selectedValueList = element;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tprivate getValueListItems() {\r\n\t\tif (this.selectedValueList != undefined) {\r\n\t\t\tthis.valueListService.getValueListItemsOnSystem(this.selectedValueList.id)\r\n\t\t\t.then(result => {\r\n\t\t\t\tif (this.selectedValueList) {\r\n\t\t\t\t\tthis.selectedValueList.items = result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic async addNewList(name: string) {\r\n\t\tif (name.trim().length > 0) {\r\n\t\t\tlet createdValueList: ValueListDto = await this.valueListService.addNewListToSystem(name).finally(() => { this.newValueList = null; });\r\n\t\t\tif (createdValueList != undefined) {\r\n\t\t\t\tawait this.getValueLists();\r\n\t\t\t\tthis.getValueListItems();\r\n\t\t\t\tlet finishedSetupValueList: ValueListDto[] = this.valueLists.filter(valueList => {\r\n\t\t\t\t\treturn createdValueList.id == valueList.id;\r\n\t\t\t\t});\r\n\t\t\t\tif (finishedSetupValueList.length > 0 ) {\r\n\t\t\t\t\tthis.showValuesPanel(finishedSetupValueList[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic renameList() {\r\n\t\tif (this.selectedValueList) {\r\n\t\t\tthis.selectedValueList.name = this.selectedValueList.editName;\r\n\t\t\tthis.valueListService.renameValueListOnSystem(this.selectedValueList)\r\n\t\t\t.then((response: HttpResponseMessage) => {\t\r\n\t\t\t\tthis.cancelEditListMode();\r\n\t\t\t});\r\n\t\t} \r\n\t}\r\n\r\n\tpublic removeList() {\r\n\t\t$(\".delete-button\").blur()\r\n\t\tthis.modal.OpenConfirm(\"Delete value lists\", `Are you sure you wish to delete the selected value lists?`).whenClosed(y => {\r\n\t\t\tif (!y.wasCancelled) {\r\n\t\t\t\t// let ids: string[] = [];\r\n\t\t\t\t// this.selectedValueLists.forEach(x => ids.push(x.id));\r\n\t\t\t\tif (this.selectedValueList) {\r\n\t\t\t\t\tthis.valueListService.removeListFromSystem([this.selectedValueList.id])\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.selectedValueList = null;\r\n\t\t\t\t\t\tthis.selectedValueListItem = null;\r\n\t\t\t\t\t\tthis.selectedValueLists = [];\r\n\t\t\t\t\t\tif (this.showValues) {\r\n\t\t\t\t\t\t\tthis.closeValuesPanel();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.getValueLists();\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tpublic async hasOrgSelected():Promise {\r\n\t\tlet ots=this.orgTokenService;\r\n\t\tlet hasOrgSelected:boolean = ots.hasOrgSelected();\r\n\t\tconsole.log('hasOrgSelected A?', hasOrgSelected, ots.orgId());\r\n\t\tif (!hasOrgSelected) {\r\n\t\t\tawait this.modal.OpenMessage('Information','Please select a current organisation');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\tpublic async exportToExcel() {//C\t\r\n\t\tconsole.log('exportToExcel C C:/dev/aoc/AO.Client/ClientApp/src/app/administration/value-lists/value-lists.ts');\r\n\t\tif (!await this.hasOrgSelected()) { \r\n\t\t\tconsole.log('(no org) - C')\r\n\t\t\treturn; \r\n\t\t}\r\n\r\n\t\tconsole.log('C selectedValueLists.length', this.selectedValueLists.length);\r\n\t\tthis.selectedValueLists.forEach( valueList => {\r\n\t\t\tconsole.log('admcase, vl:', valueList);\r\n\t\t\tconst currentUser_OrgId = this.appContext.currentUserOrgId(); // this.apiClient.appContext.currentUser?.organization.id;\r\n\t\t\tthis.apiClient.orgByToken(currentUser_OrgId).get(\"Excel/ExportValueList?id=\" + valueList.id) // under administration\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.downloadFile(`${valueList.name}.xlsx`);\r\n\t\t})\r\n\t}\r\n\r\n\topenImportModal() {\r\n\t\tthis.modal.OpenModal(ValuelistUpload, this.valueLists).whenClosed(x => {\r\n\t\t\tif (!x.wasCancelled) {\r\n\t\t\t\tif (Boolean(x.output.isNewValueList)) {\r\n\t\t\t\t\tthis.importNewFromExcel(x.output);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.importExistingFromExcel(x.output);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tpublic importNewFromExcel(model: ImportValuelistModel){\r\n\t\tlet formData = new FormData();\r\n\t\tif (model?.files && model.files[0]) {\r\n\t\t\tformData.append(this.appContext.projectId, model.files[0]);\r\n\t\t}\r\n\t\tconst currentUser_OrgId = this.appContext.currentUserOrgId(); // this.apiClient.appContext.currentUser?.organization.id;\r\n\t\tthis.apiClient.orgByToken(currentUser_OrgId).postForm(`Excel/ImportNewValueList?name=${model.name}&containsHeaders=${model.containsHeaders}`, formData)\r\n\t\t\t.stringResult().then(receipt =>{\r\n\t\t\t\tthis.modal.OpenMessage(\"Import Receipt\", receipt);\r\n\t\t\t}).finally(() => {\r\n\t\t\t\tthis.getValueLists();\r\n\t\t\t\tthis.getValueListItems();\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublic importExistingFromExcel(model: ImportValuelistModel){\r\n\t\tlet formData = new FormData();\r\n\t\tif (model?.files && model.files[0]) {\r\n\t\t\tformData.append(this.appContext.projectId, model.files[0]);\r\n\t\t}\r\n\t\tconst currentUser_OrgId = this.appContext.currentUserOrgId(); // this.apiClient.appContext.currentUser?.organization.id;\r\n\t\tthis.apiClient.orgByToken(currentUser_OrgId).postForm(`Excel/ImportExistingValueList?listId=${model.selectedValueListId}&containsHeaders=${model.containsHeaders}`, formData)\r\n\t\t\t.stringResult().then(receipt =>{\r\n\t\t\t\tthis.modal.OpenMessage(\"Import Receipt\", receipt);\r\n\t\t\t}).finally(() => {\r\n\t\t\t\tthis.getValueLists();\r\n\t\t\t\tthis.getValueListItems();\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublic async assignColors() {\r\n\t\tif (!this.selectedValueList) { console.log('no selected value list.'); return; }\r\n\r\n\t\tlet rsp = await this.valueListService.assignColorsWithOrgToken(this.selectedValueList.id);\r\n\t\tif (rsp) {\r\n\t\t\tawait this.getValueLists();\r\n\t\t\tthis.getValueListItems();//assignColors\r\n\t\t}\r\n\t}\r\n\t\r\n\t/*\r\n\t* ValueListItems \r\n\t*/\r\n\t\r\n\tpublic selectListItem(item: ValueListItemDto) {\r\n\t\tif (this.selectedValueListItem && Boolean(this.selectedValueListItem)) {\r\n\t\t\tthis.selectedValueListItem.selected = false;\r\n\t\t\tthis.selectedValueListItem.editValue = false;\r\n\t\t\tthis.selectedValueListItem.editSortOrder = false;\t\t\t\r\n\t\t}\r\n\r\n\t\titem.selected = true;\r\n\t\tthis.selectedValueListItem = item;\r\n\t\tthis.selectedValueListItemOriginal = Object.assign({}, item);\r\n\t}\r\n\t\r\n\tpublic newListItem() {\r\n\t\tthis.newValueListItem = {\r\n\t\t\tvalue: this.newValueListItemName,\r\n\t\t\tid: '00000000-0000-0000-0000-000000000000',\r\n\t\t\tvalueListId: this.selectedValueList?.id ? this.selectedValueList?.id : '00000000-0000-0000-0000-000000000000',\r\n\t\t\tsortOrder: 0,\r\n\t\t\tisDefault:false,\r\n\t\t\tcolorUI: '#ff8800'\r\n\t\t}\r\n\t}\r\n\r\n\tpublic cancelNewListItem() {\r\n\t\tthis.newValueListItem = null;\r\n\t\tthis.selectedValueListItem = null;\r\n\t}\r\n\r\n\tpublic editListItemValue(item: ValueListItemDto) {\r\n this.selectListItem(item);\r\n\t\tif (this.selectedValueListItem) {\r\n\t\t\tthis.selectedValueListItem.editValue = true;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic editListItemSortOrder(item: ValueListItemDto) {\r\n this.selectListItem(item);\r\n\t\tif (this.selectedValueListItem) {\r\n\t\t\tthis.selectedValueListItem.editSortOrder = true;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic cancelEditListItemValue() {\r\n\t\tif (this.selectedValueListItem) {\r\n\t\t\tthis.selectedValueListItem.editValue = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tpublic cancelEditListItemSortOrder() {\r\n\t\tif (this.selectedValueListItem) {\r\n\t\t\tthis.selectedValueListItem.editSortOrder = false;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic async addNewListItem() {\r\n\t\t$('.button-add').blur();\r\n\t\tthis.newListItem();\r\n\t\tif (this.newValueListItem && this.selectedValueList) {\r\n\r\n\t\t\tawait this.valueListService.addNewListItemOnSystem(this.newValueListItem, this.selectedValueList.name)\r\n\t\t\t.then(response => {\r\n\t\t\t\tif (this.selectedValueList?.items) {\r\n\t\t\t\t\tlet newListItem = Object.assign({}, response);\r\n\t\t\t\t\tthis.selectedValueList.items.push(newListItem);\r\n\t\t\t\t\tthis.selectedValueListItem = newListItem;\r\n\t\t\t\t\tthis.newValueListItem = null; \r\n\t\t\t\t}\r\n\t\t\t}).finally(() => {\r\n\t\t\t\tthis.getValueListItems();\r\n\t\t\t});\r\n\t\t\tthis.newValueListItemName = \"\";\r\n\t\t}\r\n\t\t$('.list-item-input').focus();\r\n\t}\r\n\r\n\tpublic renameListItem() {\r\n\t\tif ((this.selectedValueListItem?.value !== this.selectedValueListItemOriginal?.value) && this.selectedValueListItem && this.selectedValueList) {\r\n\t\t\tthis.valueListService.renameListItemOnSystem(this.selectedValueListItem, this.selectedValueList.name)\r\n\t\t\t\t.then(response => {\r\n\t\t\t\t\tif (this.selectedValueListItem) {\r\n\t\t\t\t\t\tthis.selectedValueListItem.editValue = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}).finally(() => {\r\n\t\t\t\t\tthis.getValueListItems();\r\n\t\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.cancelEditListItemValue();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic async setColor(item : ValueListItemDto) {\r\n\t\tawait this.valueListService.assignColorToListItemByOrg(item);\r\n\t}\r\n\r\n\tpublic setDefaultListItem(item: ValueListItemDto) {\r\n\t\titem.isDefault = !item.isDefault;\r\n\t\tif (this.selectedValueList?.name) {\r\n\t\t\tthis.valueListService.setDefaultListItemOnSystem(item, this.selectedValueList.name)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.getValueListItems();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic reorderListItem() {\r\n\t\tif ((this.selectedValueListItem?.sortOrder !== this.selectedValueListItemOriginal?.sortOrder) && this.selectedValueListItem && this.selectedValueList) {\r\n\t\t\tthis.valueListService.reorderListItemOnSystem(this.selectedValueListItem, this.selectedValueList.name)\r\n\t\t\t\t.then(response => {\r\n\t\t\t\t\tif (this.selectedValueListItem) {\r\n\t\t\t\t\t\tthis.selectedValueListItem.editSortOrder = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.getValueListItems();\r\n\t\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.cancelEditListItemSortOrder();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic removeListItem(item: ValueListItemDto) {\r\n\t\t$('.btn-delete-value-list').blur();\r\n\t\tthis.modal.OpenConfirm(`Delete`, `Please confirm that you want to delete the selected value lists`).whenClosed(result => {\r\n\t\t\tif (result.wasCancelled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.selectedValueList) {\r\n\t\t\t\tthis.valueListService.removeListItemOnSystem(item, this.selectedValueList.name)\r\n\t\t\t\t.then(response => {\r\n\t\t\t\t\tlet itemIndex = this.selectedValueList?.items?.findIndex(x => x === item);\r\n\t\t\t\t\tif (itemIndex) {\r\n\t\t\t\t\t\tthis.selectedValueList?.items?.splice(itemIndex, 1);\r\n\t\t\t\t\t\tthis.selectedValueListItem = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\t\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tpublic async sortBy(columnName: string) {\r\n\t\tawait this.listService.sortBy(columnName).then(result => {\r\n\t\t\tthis.column = result.column;\r\n\t\t\tthis.displayState = result.displayState;\r\n\t\t});\r\n\t}\r\n\r\n\tpublic async toggleList() {\r\n\t\tawait this.listService.toggleElement(this.valueLists).then(result => {\r\n\t\t\tthis.selectedValueLists = result.selected;\r\n\t\t\tthis.allSelected = result.allSelected;\r\n\t\t});\r\n\t}\r\n\r\n\tpublic async toggleAll() {\r\n\t\tawait this.listService.toggleAll(this.valueLists).then(result => {\r\n\t\t\tif (result) {\r\n\t\t\t\tthis.selectedValueLists = result.selected;\r\n\t\t\t\tthis.allSelected = result.allSelected;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tasync showMenuItems(event: Event): Promise {\r\n\t\tlet actions = [];\r\n\t\tactions.push({ viewKey: \"button\", setup: { textKey: \"Create Value list\", icon:\"fa-solid fa-list\", actionKey: \"createValueList\", service: {createValueList: () => { this.newList() }}}});\r\n\t\tactions.push({ viewKey: \"line\", setup: {}});\r\n\t\tactions.push({ viewKey: \"button\", setup: { textKey: \"Import from Excel\", icon:\"fa-solid fa-download\", actionKey: \"importFromExcel\", service: {importFromExcel: () => { this.openImportModal() }}}});\r\n\t\tactions.push({ viewKey: \"button\", setup: { textKey: \"Export selected to Excel\", icon:\"fa-solid fa-upload\", isDisabled: !(this.selectedValueLists.length > 0), actionKey: \"exportToExcel\", service: {exportToExcel: () => { this.exportToExcel() }}}});\r\n this.contextMenuService.open(event, actions);\r\n\t}\r\n\r\n\tformatDate(date: string): string {\r\n\t\tlet formattedDate = new Date(date);\r\n\t\tlet minutes = (formattedDate.getMinutes().toString().length > 1) ? formattedDate.getMinutes() : \"0\" + formattedDate.getMinutes();\r\n\t\tlet hours = (formattedDate.getHours().toString().length > 1) ? formattedDate.getHours() : \"0\" + formattedDate.getHours();\r\n\t\treturn formattedDate.toDateString() + \" - \" + hours + \":\" + minutes;\r\n\t}\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","ValueLists","constructor","valueListService","events","modal","appContext","apiClient","i18n","element","deviceService","taskQueue","listService","contextMenuService","orgTokenService","showValues","selectedValueLists","selectedValueList","selectedValueListItem","selectedValueListItemOriginal","newValueList","newValueListItem","valueLists","searchTerm","searchTermValues","allSelected","column","subscriptions","newValueListItemName","this","viewContext","activate","getValueLists","setupKeyHandler","displayState","icon","direction","attached","subscribe","data","handleSearchEvent","async","reloadPage","closeValuesPanel","keybuttonHandling","event","key","$","is","addNewListItem","window","addEventListener","detached","removeEventListener","forEach","subscription","dispose","includedList","filter","valueList","name","toLocaleLowerCase","includes","selectList","list","deselectList","inEditMode","cancelEditListMode","splice","indexOf","showValuesPanel","Boolean","getValueListItems","publish","editListName","editName","newList","console","log","OpenModal","whenClosed","x","wasCancelled","output","addNewList","getValueListsOnSystem","undefined","getValueListItemsOnSystem","then","result","items","trim","length","createdValueList","addNewListToSystem","finally","finishedSetupValueList","renameList","renameValueListOnSystem","response","removeList","blur","OpenConfirm","y","removeListFromSystem","hasOrgSelected","ots","orgId","OpenMessage","exportToExcel","currentUser_OrgId","currentUserOrgId","orgByToken","get","handleError","tr","downloadFile","openImportModal","isNewValueList","importNewFromExcel","importExistingFromExcel","model","formData","FormData","files","append","projectId","postForm","containsHeaders","stringResult","receipt","selectedValueListId","assignColors","assignColorsWithOrgToken","selectListItem","item","selected","editValue","editSortOrder","Object","assign","newListItem","value","valueListId","sortOrder","isDefault","colorUI","cancelNewListItem","editListItemValue","editListItemSortOrder","cancelEditListItemValue","cancelEditListItemSortOrder","addNewListItemOnSystem","focus","renameListItem","renameListItemOnSystem","setColor","assignColorToListItemByOrg","setDefaultListItem","setDefaultListItemOnSystem","reorderListItem","reorderListItemOnSystem","removeListItem","removeListItemOnSystem","itemIndex","findIndex","sortBy","columnName","toggleList","toggleElement","toggleAll","showMenuItems","actions","viewKey","setup","textKey","actionKey","service","createValueList","importFromExcel","isDisabled","open","formatDate","date","formattedDate","Date","minutes","getMinutes","toString","hours","getHours","toDateString","autoinject","EventAggregator","I18N","Element","TaskQueue"],"sourceRoot":""}