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X,WAAWO,WAAWoI,SAAS,2BAA4BU,EAAY1J,IACjGgD,YAAYhC,KAAKV,KAAK2C,GAAG,uBAAwBjC,KAAKV,KAAK2C,GAAG,0BAC9DC,aACAgG,SAAQ,KACRlI,KAAK6D,iBAAiB,G,IAGvBqE,SAAQ,KACV,GAAGQ,IAAgB1I,KAAK2B,kBAAoB+G,IAAgB1I,KAAKX,WAAW0E,sBAC3E,GAA6C,OAAzC/D,KAAKX,WAAW+J,qBACnBpJ,KAAK2B,sBAAmB8D,EACxBzF,KAAKwD,qBAAuB,OAC5BxD,KAAKiD,SAAW,QAEhB,GAAIjD,KAAKX,WAAY,CACpB,IAAIgK,EAAyCrJ,KAAKX,WAAW+J,qBACzDC,GACHrJ,KAAKsE,qBAAqB+E,E,IAMhC,CAEO,sBAAAC,CAAuBV,GAC7B5I,KAAKuD,kBAAkBwC,OAAO/F,KAAKuD,kBAAkB8C,QAAQuC,GAAY,EAC1E,GAxUA,GAAC,EAAAW,W,oEACD,GAAC,EAAAA,W,gEACD,GAAC,EAAAA,W,oEAxBW1G,EAAsB,GADlC,EAAAR,W,uBA2B8B,EAAAC,iBAAsC,IAA2B,IAAiC,IAAyB,EAAAC,KAA0B,OA1BvKM,E","sources":["webpack://client-app/./src/app/components/filter/combine/combine-filters.scss","webpack://client-app/./src/app/components/filter/grouping/grouping-selector.scss","webpack://client-app/./src/app/components/filter/combine/combine-filters.html","webpack://client-app/./src/app/components/filter/grouping/grouping-selector.html","webpack://client-app/./src/app/components/filter/combine/combine-filters.ts","webpack://client-app/./src/app/components/filter/combine/filter-availability-value-converter.ts","webpack://client-app/./src/app/components/filter/grouping/grouping-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, `.combine-filters{max-width:640px}@media screen and (min-width: 640px){.combine-filters{min-width:600px}}.combine-filters ux-dialog-body{display:grid !important;grid-template-rows:auto 1fr;gap:15px;height:640px;padding:15px !important}.combine-filters .save-name{max-width:480px}.combine-filters .lists{display:grid;grid-template-columns:1fr 1fr;gap:15px;overflow:hidden}.combine-filters .list{border-radius:4px;border:1px solid rgba(0,0,0,.175);height:100%;overflow:hidden}.combine-filters .list__header{background:#f0f3f4;border-radius:4px 4px 0 0;border-bottom:1px solid rgba(0,0,0,.175);display:grid;align-items:center;font-weight:600;height:3em;padding:calc(15px/4) 15px}.combine-filters .list__body{height:calc(100% - 3em);overflow-y:auto}.combine-filters .list .item{cursor:pointer;padding:calc(15px/2) 15px}.combine-filters .list .item[data-selected=true]{background:#00b3c9;color:#fff}.combine-filters .list .item__inner{display:flex;align-items:center;gap:calc(15px/2)}.combine-filters .fieldset{display:grid;grid-auto-flow:row;gap:calc(15px/3)}.combine-filters .fieldset legend.fieldset-label{margin-bottom:0}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/filter/combine/combine-filters.scss\",\"webpack://./src/resources/customized-styles/variables.scss\",\"webpack://./src/resources/color-admin/_variables.scss\"],\"names\":[],\"mappings\":\"AAKA,iBACC,eAAA,CAEA,qCAHD,iBAIE,eAAA,CAAA,CAGD,gCACC,uBAAA,CACA,2BAAA,CACA,QCEO,CDDP,YAAA,CACA,uBAAA,CAGD,4BACC,eAAA,CAGD,wBACC,YAAA,CACA,6BAAA,CACA,QCVO,CDWP,eAAA,CAGD,uBACC,iBEgLkC,CF/KlC,iCAAA,CACA,WAAA,CACA,eAAA,CAEA,+BACC,kBC3BY,CD4BZ,yBAAA,CACA,wCAAA,CACA,YAAA,CACA,kBAAA,CACA,eAAA,CACA,UAAA,CACA,yBAAA,CAGD,6BACC,uBAAA,CACA,eAAA,CAGD,6BACC,cAAA,CACA,yBAAA,CAEA,iDACC,kBCpDK,CDqDL,UETU,CFYX,oCACC,YAAA,CACA,kBAAA,CACA,gBAAA,CAKH,2BACC,YAAA,CACA,kBAAA,CACA,gBAAA,CAGC,iDACC,eAAA\",\"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, `.grouping-selector{display:grid;grid-template-columns:minmax(200px, 300px) 1fr;height:calc(100vh - 50px - 50px - 60px);overflow:hidden;width:calc(100vw - 60px)}@media screen and (orientation: portrait){[data-device-type=mobile] .grouping-selector,[data-device-type=tablet] .grouping-selector{display:flex;flex-direction:column}}.grouping-selector-header{background:#f0f3f4}.grouping-selector-header .actions-bar{display:grid;grid-auto-flow:column;gap:calc(15px/2)}.grouping-selector-header .dropdown-menu--saved-filters__inner{max-height:600px;overflow:auto}.grouping-selector-header .dropdown-menu--saved-filters .dropdown-item{display:grid;grid-template-columns:auto 2.5em;align-items:center;gap:15px;padding:calc(15px/2) calc(15px/2) calc(15px/2) 0;min-height:3.75em}.grouping-selector-header .dropdown-menu--saved-filters .load-filter{cursor:pointer;display:flex;align-items:center;gap:calc(15px/2);height:100%;padding-left:15px}.grouping-selector__left{display:grid;grid-template-rows:3.5em 1fr;border-right:1px solid rgba(0,0,0,.175);position:relative;width:100%;overflow:auto}.grouping-selector__left .filters-search{background:#fff;border:none;border-bottom:1px solid rgba(0,0,0,.175);padding:12px 15px;width:100%;outline:none}.grouping-selector__left .list-available--filters,.grouping-selector__left .list-available--categories{padding:calc(15px/2) 0;position:relative;overflow:auto}.grouping-selector__left .list-available--filters .filter,.grouping-selector__left .list-available--filters .filter-row,.grouping-selector__left .list-available--filters .category,.grouping-selector__left .list-available--categories .filter,.grouping-selector__left .list-available--categories .filter-row,.grouping-selector__left .list-available--categories .category{cursor:pointer;display:flex;justify-content:space-between;align-items:center;margin:0;padding:calc(15px/2) 15px;transition:background-color 200ms ease-in-out}.grouping-selector__left .filter-name{display:grid;grid-template-columns:20px 1fr;align-items:center;gap:calc(15px/3)}.grouping-selector__left .filter-name[data-is-used=true]{font-weight:600}.grouping-selector__right{overflow:auto}.grouping-selector__right .title{display:flex;align-items:center;font-weight:600;border-bottom:1px solid rgba(0,0,0,.175);height:3.25em;margin-bottom:.75em}.grouping-selector__right .inner{display:grid;grid-template-rows:max-content;height:calc(100vh - 160px);overflow-y:auto;padding:0 15px}.grouping-selector__right .list-selected-grouping .filter{display:grid;grid-auto-flow:column;gap:calc(15px/2)}.grouping-selector__right .list-selected-grouping .filter-row{display:flex;align-items:center;height:40px;position:relative;margin-left:38px;width:calc(100% - 38px)}.grouping-selector__right .list-selected-grouping .filter-row .filter-name{margin-right:calc(15px/3)}.grouping-selector__right .list-selected-grouping .filter-row>.btn{position:absolute;left:-38px}.grouping-selector__right .invalid-parameters .list .item{display:flex;align-items:center;height:40px;position:relative}.grouping-selector__right .invalid-parameters .list .item .name{color:#ff5b57;height:inherit;line-height:3em}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/filter/grouping/grouping-selector.scss\",\"webpack://./src/resources/customized-styles/variables.scss\",\"webpack://./src/resources/color-admin/_variables.scss\"],\"names\":[],\"mappings\":\"AAKA,mBACC,YAAA,CACA,8CAAA,CACA,uCAAA,CACA,eAAA,CACA,wBAAA,CAGC,0CADD,0FAEE,YAAA,CACA,qBAAA,CAAA,CAIF,0BACC,kBCTa,CDWb,uCACC,YAAA,CACA,qBAAA,CACA,gBAAA,CAIA,+DACC,gBAAA,CACA,aAAA,CAGD,uEACC,YAAA,CACA,gCAAA,CACA,kBAAA,CACA,QCrBK,CDsBL,gDAAA,CACA,iBAAA,CAGD,qEACC,cAAA,CACA,YAAA,CACA,kBAAA,CACA,gBAAA,CACA,WAAA,CACA,iBChCK,CDsCT,yBACC,YAAA,CACA,4BAAA,CACA,uCAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CAEA,yCACC,eAAA,CACA,WAAA,CACA,wCAAA,CACA,iBAAA,CACA,UAAA,CACA,YAAA,CAGD,uGAEC,sBAAA,CACA,iBAAA,CACA,aAAA,CAEA,iXAGC,cAAA,CACA,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,QAAA,CACA,yBAAA,CACA,6CAAA,CAIF,sCACC,YAAA,CACA,8BAAA,CACA,kBAAA,CACA,gBAAA,CAEA,yDACC,eAAA,CAKH,0BACC,aAAA,CAEA,iCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,wCAAA,CACA,aAAA,CACA,mBAAA,CAGD,iCACC,YAAA,CACA,8BAAA,CACA,0BAAA,CACA,eAAA,CACA,cAAA,CAKA,0DACC,YAAA,CACA,qBAAA,CACA,gBAAA,CAGD,8DACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,iBAAA,CACA,gBAAA,CACA,uBAAA,CAEA,2EACC,yBAAA,CAGD,mEACC,iBAAA,CACA,UAAA,CAQD,0DACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,iBAAA,CAEA,gEACC,aEjHS,CFkHT,cAAA,CACA,eAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = ` Combine views Groupings \\${grouping.name} Views \\${filter.name} Scope \\${scope.name} \\${scope.description} Availability \\${option.name} \\${option.description} OK Cancel `;\n// Exports\nexport default code;","// Module\nvar code = ` \\${selectedGroupingName} \\${filterGroup.name} \\${filter.targetType.toUpperCase()[0]} \\${filter.name} Grouping \\${filter.targetType.toUpperCase()[0]} \\${filter.name} \\${parameter} OK Cancel `;\n// Exports\nexport default code;","import { I18N } from 'aurelia-i18n';\r\nimport { AppContextService } from 'app/services/app-context-service';\r\nimport { ApiClient } from 'app/services/api-client';\r\nimport { FilterGroupDto, FilterDto, FilterSaveValues, Scope, AvailabilityUserIdOption } from 'app/models/filter-dto';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { DialogController } from 'aurelia-dialog';\r\n\r\n@autoinject\r\nexport class CombineFilters {\r\n\tpublic saveName: string = \"\";\r\n\tpublic groupingId: string = \"\";\r\n\tpublic selectedGrouping: FilterGroupDto | undefined;\r\n\tpublic filterId: string = \"\";\r\n\tpublic groupings: FilterGroupDto[] = [];\r\n\tpublic filters: FilterDto[] = [];\r\n\tpublic projectId: string = \"00000000-0000-0000-0000-000000000000\";\r\n\tpublic userId: string = \"00000000-0000-0000-0000-000000000000\";\r\n\tpublic scopes: Scope[] = [];\r\n\tpublic availabilityOptions: AvailabilityUserIdOption[] = [];\r\n\r\n\tconstructor(protected dialog: DialogController, private apiClient: ApiClient, private appContext: AppContextService, private i18n: I18N) {\r\n\t\tthis.dialog.settings.overlayDismiss = false;\r\n\t}\r\n\r\n\tasync activate(params: any, routeConfig: any, navigationInstruction: any) {\r\n\t\tthis.populateScope();\r\n\t\tthis.populateAvailability();\r\n\t\tawait this.getGroupings();\r\n\t\tawait this.getFilters_CF();//in-CombineFilters.activate\r\n\t\tthis.userId = this.appContext?.currentUser?.id ? this.appContext?.currentUser?.id : \"00000000-0000-0000-0000-000000000000\";\r\n\t\t// this.projectId = this.appContext.projectId;\r\n\t}\r\n\r\n\tpublic ok() {\r\n\t\tif (Boolean(this.saveName.trim() === \"\") || !Boolean(this.groupingId) || !Boolean(this.filterId) || !Boolean(this.projectId) || !Boolean(this.userId)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.dialog.ok(\r\n\t\t\t{\r\n\t\t\t\tname: this.saveName,\r\n\t\t\t\tgroupingId: this.groupingId,\r\n\t\t\t\tfilterId: this.filterId,\r\n\t\t\t\tprojectId: this.projectId,\r\n\t\t\t\tuserId: this.userId\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tpublic cancel() {\r\n\t\tthis.dialog.cancel();\r\n\t}\r\n\r\n\tprivate populateScope() {\r\n\t\tthis.scopes = [\r\n\t\t\t{\r\n\t\t\t\tname: FilterSaveValues.filterScopeTypes.System.name,\r\n\t\t\t\tvalue: \"00000000-0000-0000-0000-000000000000\",\r\n\t\t\t\tdescription: FilterSaveValues.filterScopeTypes.System.description,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tname: FilterSaveValues.filterScopeTypes.Project.name,\r\n\t\t\t\tvalue: this.appContext.projectId,\r\n\t\t\t\tdescription: FilterSaveValues.filterScopeTypes.Project.description,\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n\r\n\tprivate populateAvailability() {\r\n\t\tthis.availabilityOptions = [\r\n\t\t\t{\r\n\t\t\t\tname: FilterSaveValues.filterAvailabilityTypes.Private.name,\r\n\t\t\t\tvalue: this.appContext?.currentUser?.id ? this.appContext?.currentUser?.id : \"00000000-0000-0000-0000-000000000000\",\r\n\t\t\t\tdescription: FilterSaveValues.filterAvailabilityTypes.Private.description\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tname: FilterSaveValues.filterAvailabilityTypes.Public.name,\r\n\t\t\t\tvalue: \"00000000-0000-0000-0000-000000000000\",\r\n\t\t\t\tdescription: FilterSaveValues.filterAvailabilityTypes.Public.description\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n\r\n\tpublic selectGrouping(grouping: FilterGroupDto) {\r\n\t\tthis.groupingId = grouping.id ? this.groupingId : \"\";\r\n\t\tthis.selectedGrouping = grouping;\r\n\t}\r\n\r\n\tpublic selectFilter(filter: FilterDto) {\r\n\t\tthis.filterId = filter.id ? filter.id : \"\";\r\n\t}\r\n\r\n\tprivate async getGroupings() {\r\n\t\tthis.groupings = [];\r\n\t\tthis.groupings = await this.apiClient.project(this.appContext.projectId).get(\"Filter/GetFilterGroups\")\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.jsonResult();\r\n\t}\r\n\r\n\tprivate async getFilters_CF() {\r\n\t\tconsole.log('Filters_CF,prj:', this.appContext.projectId);\r\n\t\tthis.filters = [];\r\n\t\tthis.filters = await this.apiClient.project(this.appContext.projectId).get(\"Filter/GetFilters\")\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.jsonResult();\r\n\t\tconsole.log(this.filters)\r\n\t}\r\n}\r\n","import { FilterDto, FilterGroupDto } from './../../../models/filter-dto';\r\nexport class FilterAvailabilityValueConverter{\r\n toView(items: FilterDto[], grouping: FilterGroupDto){\r\n if(!Boolean(grouping)){\r\n return [];\r\n }\r\n return items.filter(x => x.availability === grouping.availability && x.projectId === grouping.projectId);\r\n }\r\n}","import { AppContextService } from 'app/services/app-context-service';\r\nimport { SaveNewGrouping } from '../prompts/save-new-grouping/save-new-grouping';\r\nimport { FilterGroupDto } from 'app/models/filter-dto';\r\nimport { I18N } from 'aurelia-i18n';\r\nimport { ApiClient } from 'app/services/api-client';\r\nimport { ModalService } from 'app/services/modal-service';\r\nimport { autoinject, observable } from 'aurelia-framework';\r\nimport { ObjectListColumnManager } from \"app/services/object-list/object-list-column-manager\";\r\nimport { UIValueFilter, ValueFilter } from \"app/models/object-filter\";\r\nimport { DialogCloseResult, DialogController } from \"aurelia-dialog\";\r\nimport { DnDService } from \"app/services/d-n-d-service\";\r\nimport { SettingNames } from 'app/models/setting-dto';\r\nimport { IdNamePair } from 'app/models/idNamePair';\r\n\r\n@autoinject\r\nexport class FilterGroupingSelector {\r\n\tpublic filters: ObjectListColumnManager | undefined;\r\n\r\n\t//public available: ObjectFilter[] = [];\r\n\t//public available: ValueFilter[] = [];\r\n\tpublic available: UIValueFilter[] = [] = [];\r\n\t\r\n\t//public selected: ObjectFilter[];\r\n\t//public selected: ValueFilter[];\r\n\tpublic selected: UIValueFilter[] = [];\r\n\t\r\n\tpublic searchFilter: string = \"\";\r\n\r\n\t//public dragFilter: ObjectFilter; // This is a hack used to change the dragged html at the time it is copied to the mouse\r\n\tpublic dragFilter: UIValueFilter | undefined; // This is a hack used to change the dragged html at the time it is copied to the mouse\r\n\r\n\tpublic saveFilterNameInput: string = \"\";\r\n\tpublic saveFilterProjectId: string = \"\";\r\n\tpublic saveFilterAvailability: number = -1;\r\n\tpublic savedFilterGroups: FilterGroupDto[] = [];\r\n\tpublic invalidParameters: string[] = [];\r\n\r\n\t@observable public selectedGroupingName: string = \"Load\";\r\n\t@observable public selectedGrouping: FilterGroupDto | undefined;\r\n\t@observable public filterGroupSelected: boolean = false;\r\n\t\r\n\tconstructor(protected dialog: DialogController, private dndService: DnDService, private modal: ModalService, private apiClient: ApiClient, private i18n: I18N, private appContext: AppContextService) {\r\n\r\n\t}\r\n\r\n\tasync activate(model: any): Promise {\r\n\t\tthis.filters = model;\r\n\t\tif (this.filters?.grouped) {\r\n\t\t\tthis.selected = [...this.filters.grouped];\r\n\t\t\tawait this.setFilterList();\r\n\t\t\tawait this.getFilterGroups();\r\n\t\t\t\r\n\t\t\tawait this.getFilterGroups().then(() => {\r\n\t\t\t\tif(this.appContext.getSelectedGrouping() === null){\r\n\t\t\t\t\tthis.apiClient.system.get(`Setting/GetSetting/${this.appContext.projectId}/${SettingNames.lastAppliedGroupings}`).jsonResult().then(result => {\r\n\t\t\t\t\t\tif (result) {\r\n\t\t\t\t\t\t\tlet filterGrouping: FilterGroupDto | undefined = this.savedFilterGroups.find(x => x.id === result.target);\r\n\t\t\t\t\t\t\tif (filterGrouping) {\r\n\t\t\t\t\t\t\t\tthis.loadSavedFilterGroup(filterGrouping);\r\n\t\t\t\t\t\t\t\tthis.appContext.setDefaultGrouping(filterGrouping);\r\n\t\t\t\t\t\t\t\tthis.appContext.setSelectedGrouping(filterGrouping);\r\n\t\t\t\t\t\t\t\tthis.selectedGroupingName = this.appContext.getSelectedGrouping()?.name ? this.appContext.getSelectedGrouping()!.name : \"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// this.selectedGroupingName = this.appContext.getSelectedGrouping().name;\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\tattached(): void {\r\n\t\t//let draggedItem: ObjectFilter;\r\n\t\tlet draggedItem: UIValueFilter | undefined;\r\n\r\n\t\tthis.dndService.attachListInteraction(\"selected-groupings-list\", {\r\n\t\t\tanimation: 150,\r\n\t\t\tforceFallback: true,\r\n\t\t\tgroup: \"grouping-selector\",\r\n\t\t\thandle: \".drag-handle\",\r\n\t\t\tdraggable: \".draggable-item\",\r\n\t\t\tdragClass: \"draggable-item--dragged\",\r\n\t\t\tchosenClass: \"draggable-item--chosen\",\r\n\t\t\tghostClass: \"draggable-item--ghost\",\r\n\t\t\tonChoose: (event: any) => {\r\n\t\t\t\tdraggedItem = this.selected[event.oldDraggableIndex];\r\n\t\t\t\tthis.dragFilter = draggedItem;\r\n\t\t\t},\r\n\t\t\tonUnchoose: (event: any) => this.dragFilter = undefined,\r\n\t\t\tonClone: (event: any) => this.dragFilter = undefined,\r\n\t\t\tonMove: (event: any) => this.dragFilter = event.to.id == \"available-groupings-list\" ? draggedItem : undefined,\r\n\t\t\tonEnd: (event: any) => {\r\n\t\t\t\tif (event.to.id == \"available-groupings-list\") {\r\n\t\t\t\t\tlet item:UIValueFilter = this.selected[event.oldDraggableIndex];\r\n\t\t\t\t\tthis.selected.splice(event.oldDraggableIndex, 1); // remove from old index in old list\r\n\t\t\t\t\tthis.available.splice(event.newDraggableIndex, 0, item); // add to new index in new list\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlet item: UIValueFilter = this.selected[event.oldDraggableIndex];\r\n\t\t\t\t\tthis.selected.splice(event.oldDraggableIndex, 1); // remove from old index\r\n\t\t\t\t\tthis.selected.splice(event.newDraggableIndex, 0, item); // add to new index\r\n\t\t\t\t}\r\n\t\t\t\tthis.dragFilter = undefined;\r\n\t\t\t\tdraggedItem = undefined;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdetached(): void {\r\n\t\tthis.dndService.detachListInteraction(\"selected-groupings-list\");\r\n\t}\r\n\r\n\tselect(filter: UIValueFilter) {\r\n\t\tlet index = this.available.indexOf(filter);\r\n\t\tif (index >= 0) {\r\n\t\t\tthis.available.splice(index, 1);\r\n\t\t\tthis.selected.push(filter);\r\n\t\t}\r\n\t}\r\n\r\n\tunSelect(filter: UIValueFilter): void {\r\n\t\tlet index: number = this.selected.indexOf(filter);\r\n\t\tif (index >= 0) {\r\n\t\t\tthis.selected.splice(index, 1);\r\n\t\t\tthis.available.push(filter);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate async setFilterList(): Promise {\r\n\t\tthis.searchFilter = \"\";\r\n\r\n\t\tlet cat: IdNamePair | undefined = this.filters?.getFilterCategoryContext();\r\n\t\tif (cat != undefined) {\r\n\t\t\tlet valueFilters: ValueFilter[] | undefined = await this.filters?.getAvailableGroupingFilters(cat.id);\r\n\t\t\tif (valueFilters) {\r\n\t\t\t\tthis.available = ObjectListColumnManager.valueFilter2UIFilter(valueFilters);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic ok(): void {\r\n\t\tthis.saveChangesCheck();\r\n\t}\r\n\r\n\tprivate saveChangesCheck(): void {\r\n\t\tif (this.selectedGrouping != undefined && this.filterGroupSelected != undefined) {\r\n\t\t\tif (this.selectedGrouping.parameters.length != this.selected.length) {\r\n\t\t\t\tthis.saveChangesPrompt(this.selectedGrouping);\r\n\t\t\t} else {\r\n\t\t\t\tlet oldParams: string[] = this.selectedGrouping.parameters;\r\n\t\t\t\tlet newParams: string[] = [];\r\n\t\t\t\tlet isSame: boolean = true;\r\n\t\t\t\t\r\n\t\t\t\toldParams.sort(this.compareNames);\r\n\t\t\t\t\r\n\t\t\t\tthis.selected.forEach((param: UIValueFilter) => {\r\n\t\t\t\t\tnewParams.push(param.name);\r\n\t\t\t\t})\r\n\t\t\t\tnewParams.sort(this.compareNames);\r\n\r\n\t\t\t\tfor(let i = 0; i < this.selected.length; i++){\r\n\t\t\t\t\tif(oldParams[i] !== newParams[i]){\r\n\t\t\t\t\t\tisSame = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isSame) {\r\n\t\t\t\t\tthis.filters?.applyGrouping(this.selected);\r\n\t\t\t\t\tthis.dialog.ok();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.saveChangesPrompt(this.selectedGrouping);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.filters?.applyGrouping(this.selected);\r\n\t\t\tthis.dialog.ok();\r\n\t\t}\r\n\t}\r\n\r\n\tpublic cancel(): void {\r\n\t\tthis.dialog.cancel();\r\n\t}\r\n\r\n\tpublic duplicateFilterGroup(): void {\r\n\t\tthis.modal.OpenModal(SaveNewGrouping).whenClosed((x: DialogCloseResult) => {\r\n\t\t\tif(!x.wasCancelled){\r\n\t\t\t\tthis.doSaveNewFilterGroup({\r\n\t\t\t\t\tname: x.output.name,\r\n\t\t\t\t\tprojectId: x.output.projectId,\r\n\t\t\t\t\tavailability: x.output.availability,\r\n\t\t\t\t\tparameters: this.selectedGrouping?.parameters ? this.selectedGrouping?.parameters : [] \r\n\t\t\t\t}).then((result: FilterGroupDto[]) => {\r\n\t\t\t\t\tif(x.output.setAsDefault){\r\n\t\t\t\t\t\tthis.apiClient.system.postJson(`Setting/AddUserSetting/${this.appContext.projectId}/${SettingNames.lastAppliedGroupings}`, result).noResponse();\r\n\t\t\t\t\t}\r\n\t\t\t\t}).finally(() => {\r\n\t\t\t\t\tthis.getFilterGroups();\r\n\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\r\n\tpublic newFilterGroup(): void {\r\n\t\tthis.modal.OpenModal(SaveNewGrouping).whenClosed((x: DialogCloseResult) => {\r\n\t\t\tif (!x.wasCancelled) {\r\n\t\t\t\tlet parametersToSave:string[] = [\"Type\"];\r\n\r\n\t\t\t\tif (x.output.keepSelectedFilters) {\r\n\t\t\t\t\tthis.filters?.selected.forEach((objectFilter: UIValueFilter) => {//in-FilterGroupingSelector.newFilterGroup().\r\n\t\t\t\t\t\tparametersToSave.push(objectFilter.name);\t\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.doSaveNewFilterGroup({\r\n\t\t\t\t\tname: x.output.name,\r\n\t\t\t\t\tprojectId: x.output.projectId,\r\n\t\t\t\t\tavailability: x.output.availability,\r\n\t\t\t\t\tparameters: parametersToSave\r\n\t\t\t\t}).then((result: FilterGroupDto[]) => {\r\n\t\t\t\t\tif (x.output.setAsDefault) {\r\n\t\t\t\t\t\tthis.apiClient.system.postJson(`Setting/AddUserSetting/${this.appContext.projectId}/${SettingNames.lastAppliedGroupings}`, result).noResponse();\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\tprivate async doSaveNewFilterGroup(filterGroupObject: FilterGroupDto): Promise {\r\n\t\treturn await this.apiClient.project(this.appContext.projectId).postJson(\"Filter/CreateFilterGroup\", filterGroupObject)\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.jsonResult()\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loadSavedFilterGroup(filterGroupObject);\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublic async saveFilterGroup(): Promise{\r\n\t\tif (this.selectedGrouping) {\r\n\t\t\tlet filterGrouping: FilterGroupDto = this.adaptParameters(this.selectedGrouping);\r\n\t\t\t\r\n\t\t\tawait this.apiClient.project(this.appContext.projectId).postJson(\"Filter/UpdateFilterGroup\", filterGrouping)\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.jsonResult()\r\n\t\t\t.finally(() => {\r\n\t\t\t\tthis.loadSavedFilterGroup(filterGrouping);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tprivate saveChangesPrompt(filterGroup: FilterGroupDto): void {\r\n\t\tthis.modal.OpenConfirm(\r\n\t\t\tthis.i18n.tr('Save Changes'),\r\n\t\t\tthis.i18n.tr('Do you want to save your recent changes to filter group \"') + filterGroup.name + '\"?'\r\n\t\t).whenClosed((x: DialogCloseResult) => {\r\n\t\t\tif(!x.wasCancelled){\r\n\t\t\t\tthis.saveFilterGroup();\r\n\t\t\t\tthis.filters?.applyGrouping(this.selected);\r\n\t\t\t\tthis.dialog.ok();\r\n\t\t\t}else{\r\n\t\t\t\tthis.dialog.cancel();\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tprivate async getFilterGroups(): Promise {\r\n\t\tthis.savedFilterGroups = [];\r\n\t\tthis.savedFilterGroups = await this.apiClient.project(this.appContext.projectId).get(\"Filter/GetFilterGroups\")\r\n\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t.jsonResult();\r\n\t}\r\n\r\n\tpublic loadSavedFilterGroup(filterGroup: FilterGroupDto): void {\r\n\t\tthis.available = [...this.available, ...this.selected];\r\n\t\tthis.selected = [];\r\n\t\tfilterGroup.parameters.forEach((parameter: string) => {\r\n\t\t\tthis.available.forEach((filter: UIValueFilter) => {\r\n\t\t\t\tif (Boolean(filter.name === parameter)) {\r\n\t\t\t\t\tthis.select(filter);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (!this.selected.map((x: UIValueFilter) => x.name).includes(parameter)) {\r\n\t\t\t\tthis.invalidParameters.push(parameter);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.setSelectedFilterGroup(filterGroup);\r\n\t}\r\n\r\n\tprivate async setSelectedFilterGroup(filterGroup: FilterGroupDto): Promise {\r\n\t\tthis.getFilterGroups().then(() => {\r\n\t\t\tthis.appContext.setSelectedGrouping(this.savedFilterGroups.find((x: FilterGroupDto) => x.name == filterGroup.name));\r\n\t\t\tthis.selectedGrouping = this.appContext.getSelectedGrouping();\r\n\t\t\tthis.selectedGroupingName = this.selectedGrouping?.name ? this.selectedGrouping!.name : \"\";\r\n\t\t\tthis.filterGroupSelected = true;\r\n\t\t})\r\n\t}\r\n\r\n\tprivate adaptParameters(filterGroup: FilterGroupDto): FilterGroupDto {\r\n\t\tlet parameterList: string[] = [];\r\n\r\n\t\tfor(let i = 0; i < this.selected.length; i++){\r\n\t\t\tlet iter: UIValueFilter = this.selected[i];\r\n\t\t\t\r\n\t\t\tlet parameters: string = iter.name\r\n\r\n\t\t\tparameterList.push(parameters);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// parameterList.sort(this.compareNames);\r\n\r\n\t\tlet filterGroupObject: FilterGroupDto = {\r\n\t\t\tid: filterGroup.id,\r\n\t\t\tname: filterGroup.name,\r\n\t\t\tprojectId: filterGroup.projectId,\r\n\t\t\tavailability: filterGroup.availability,\r\n\t\t\tparameters: parameterList\r\n\t\t}\r\n\r\n\t\treturn filterGroupObject;\r\n\t}\r\n\r\n\tprivate compareNames(a: string, b: string): number {\r\n\t\tif(a < b){\r\n\t\t\treturn -1;\r\n\t\t}else if (a > b){\r\n\t\t\treturn 1;\r\n\t\t}else{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate deleteFilterGroup(filterGroup: FilterGroupDto): void {\r\n\t\tthis.modal.OpenConfirm(\r\n\t\t\tthis.i18n.tr('Delete'),\r\n\t\t\tthis.i18n.tr('Are you sure you want to delete the filter group \"') + filterGroup.name + '\"?'\r\n\t\t).whenClosed((x: DialogCloseResult) => {\r\n\t\t\tif (!x.wasCancelled) {\r\n\t\t\t\tthis.apiClient.project(this.appContext.projectId).postJson('Filter/DeleteFilterGroup', filterGroup.id)\r\n\t\t\t\t\t.handleError(this.i18n.tr('Error_Title_Generic'), this.i18n.tr('Error_Message_Generic'))\r\n\t\t\t\t\t.jsonResult()\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.getFilterGroups();\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t}).finally(() => {\r\n\t\t\tif(filterGroup === this.selectedGrouping || filterGroup === this.appContext.getSelectedGrouping()){\r\n\t\t\t\tif (this.appContext.getDefaultGrouping() === null) {\r\n\t\t\t\t\tthis.selectedGrouping = undefined;\r\n\t\t\t\t\tthis.selectedGroupingName = \"Load\";\r\n\t\t\t\t\tthis.selected = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.appContext) {\r\n\t\t\t\t\t\tlet defaultGrouping: FilterGroupDto | null = this.appContext.getDefaultGrouping();\r\n\t\t\t\t\t\tif (defaultGrouping) {\r\n\t\t\t\t\t\t\tthis.loadSavedFilterGroup(defaultGrouping);\r\n\t\t\t\t\t\t}\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 removeInvalidParameter(parameter: string): void {\r\n\t\tthis.invalidParameters.splice(this.invalidParameters.indexOf(parameter), 1);\r\n\t}\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","CombineFilters","constructor","dialog","apiClient","appContext","i18n","saveName","groupingId","filterId","groupings","filters","projectId","userId","scopes","availabilityOptions","this","settings","overlayDismiss","activate","params","routeConfig","navigationInstruction","populateScope","populateAvailability","getGroupings","getFilters_CF","currentUser","ok","Boolean","trim","name","cancel","filterScopeTypes","System","value","description","Project","filterAvailabilityTypes","Private","Public","selectGrouping","grouping","selectedGrouping","selectFilter","filter","project","get","handleError","tr","jsonResult","console","log","autoinject","DialogController","I18N","FilterAvailabilityValueConverter","toView","items","x","availability","FilterGroupingSelector","dndService","modal","available","selected","searchFilter","saveFilterNameInput","saveFilterProjectId","saveFilterAvailability","savedFilterGroups","invalidParameters","selectedGroupingName","filterGroupSelected","model","grouped","setFilterList","getFilterGroups","then","getSelectedGrouping","system","lastAppliedGroupings","result","filterGrouping","find","target","loadSavedFilterGroup","setDefaultGrouping","setSelectedGrouping","attached","draggedItem","attachListInteraction","animation","forceFallback","group","handle","draggable","dragClass","chosenClass","ghostClass","onChoose","event","oldDraggableIndex","dragFilter","onUnchoose","undefined","onClone","onMove","to","onEnd","item","splice","newDraggableIndex","detached","detachListInteraction","select","index","indexOf","unSelect","cat","getFilterCategoryContext","valueFilters","getAvailableGroupingFilters","valueFilter2UIFilter","saveChangesCheck","parameters","length","saveChangesPrompt","oldParams","newParams","isSame","sort","compareNames","forEach","param","i","applyGrouping","duplicateFilterGroup","OpenModal","whenClosed","wasCancelled","doSaveNewFilterGroup","output","setAsDefault","postJson","noResponse","finally","newFilterGroup","parametersToSave","keepSelectedFilters","objectFilter","filterGroupObject","saveFilterGroup","adaptParameters","filterGroup","OpenConfirm","parameter","map","includes","setSelectedFilterGroup","parameterList","a","b","deleteFilterGroup","getDefaultGrouping","defaultGrouping","removeInvalidParameter","observable"],"sourceRoot":""}