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AAAzB,KAAKC,eAAO,eAAEe,SAASD,EAAME,mBAC/DQ,IACY,QAAZ,EAAAzB,KAAKC,eAAO,SAAEe,SAASU,OAAOX,EAAME,kBAAmB,GAC3C,QAAZ,EAAAjB,KAAKC,eAAO,SAAEe,SAASU,OAAOX,EAAMY,kBAAmB,EAAGF,G,CAGlEzB,KAAKkB,gBAAaE,EAClBhB,OAAcgB,CAAS,GAGnC,CAEA,QAAAQ,GACI5B,KAAKP,WAAWoC,sBAAsB,wBAC7C,CAEO,MAAAC,CAAOC,G,MACP,IAAIC,EAAQhC,KAAKN,UAAUuC,QAAQF,GACrCC,GAAS,IAEHhC,KAAKN,UAAUgC,OAAOM,EAAO,GAC1B,QAAZ,EAAAhC,KAAKC,eAAO,SAAEe,SAAS7B,KAAK4C,GAASnC,QAAQC,IAAI,oCAEhD,CAEO,QAAAqC,CAASH,G,QACZ,IAAIC,EAAwC,QAAZ,EAAAhC,KAAKC,eAAO,eAAEe,SAASiB,QAAQF,GAC3DC,GAASA,GAAS,IAEf,QAAZ,EAAAhC,KAAKC,eAAO,SAAEe,SAASU,OAAOM,EAAO,GAAIpC,QAAQC,IAAI,wCAC5CG,KAAKN,UAAUP,KAAK4C,GAE5B,CAEQ,mBAAM7B,G,MAChBF,KAAKL,aAAe,GACd,IAAIwC,QAA+D,QAAZ,EAAAnC,KAAKC,eAAO,eAAEmC,oCAAoC,QACzG,GAAID,EAAiB,CACjB,IAAIE,EAA6BF,EACjCnC,KAAKN,UAAY,IAAwB4C,qBAAqBD,E,CAEzE,CAEU,QAAME,GACTvC,KAAKR,OAAO+C,IACnB,CAEU,MAAAC,GACHxC,KAAKR,OAAOgD,QAChB,GA/FSlD,E,mUAAoB,EADhC,EAAAmD,W,kIAW8B,EAAAC,iBAAsC,OAVxDpD,E","sources":["webpack://client-app/./src/app/components/filter/selector/simple/filter-selector-simple.scss","webpack://client-app/./src/app/components/filter/selector/simple/filter-selector-simple.html","webpack://client-app/./src/app/components/filter/selector/simple/filter-selector-simple.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, `.filter-selector-simple{border-radius:4px}.filter-selector-simple__inner{display:grid;grid-template-columns:minmax(200px, 300px) 1fr;min-height:calc(100vh - 50px - 60px);max-height:calc(100vh - 50px - 60px);overflow:hidden;width:calc(100vw - 60px)}[data-device-type=mobile] .filter-selector-simple__inner,[data-device-type=tablet] .filter-selector-simple__inner{min-height:calc(100vh - 50px - 50px - 60px);max-height:calc(100vh - 50px - 50px - 60px)}@media screen and (orientation: portrait){[data-device-type=mobile] .filter-selector-simple__inner,[data-device-type=tablet] .filter-selector-simple__inner{display:flex;flex-direction:column}}.filter-selector-simple__left{display:grid;grid-template-rows:3.5em 1fr;border-right:1px solid rgba(0,0,0,.175);position:relative;width:100%;overflow:auto}.filter-selector-simple__left .filters-search{background:#fff;border:none;border-bottom:1px solid rgba(0,0,0,.175);border-top-left-radius:4px;padding:12px 15px;width:100%;outline:none}.filter-selector-simple__left .list-available--filters,.filter-selector-simple__left .list-available--categories{padding:calc(15px/2) 0;position:relative;overflow:auto}.filter-selector-simple__left .list-available--filters .filter,.filter-selector-simple__left .list-available--filters .filter-row,.filter-selector-simple__left .list-available--filters .category,.filter-selector-simple__left .list-available--categories .filter,.filter-selector-simple__left .list-available--categories .filter-row,.filter-selector-simple__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}.filter-selector-simple__left .filter-name{display:grid;grid-template-columns:20px 1fr;align-items:center;gap:calc(15px/3)}.filter-selector-simple__left .filter-name[data-is-used=true]{font-weight:600}.filter-selector-simple__right{overflow:auto}.filter-selector-simple__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}.filter-selector-simple__right .inner{display:grid;grid-template-rows:max-content;height:calc(100vh - 160px);overflow-y:auto;padding:0 15px}.filter-selector-simple__right label{margin:0}.filter-selector-simple__right input{background:#efefef;border:none;padding:calc(15px/4) calc(15px/2)}.filter-selector-simple__right input[type=text]{width:100%}.filter-selector-simple__right .filter-name{display:grid;grid-template-columns:20px 1fr;align-items:center;gap:calc(15px/3)}.filter-selector-simple__right .filter-name[data-is-used=true]{font-weight:600}.filter-selector-simple__right .selected-category-container{padding-bottom:calc(15px*2)}.filter-selector-simple__right .selected-category-container .selected-category{display:inline-flex;justify-content:space-between;align-items:center;height:3.5em;margin:0;transition:background-color 200ms ease-in-out}.filter-selector-simple__right .selected-category-container .selected-category>.btn{margin-left:15px}.filter-selector-simple__right .invalid-filters .list>.item{display:grid;grid-template-columns:35px 1fr;column-gap:3px;height:3em}.filter-selector-simple__right .invalid-filters .list>.item .name{color:#ff5b57;height:inherit;line-height:3em}.filter-selector-simple__right .grouped-filters{padding-bottom:calc(15px*2)}.filter-selector-simple__right .grouped-filters .top{font-weight:600;display:grid;grid-template-columns:minmax(160px, 1fr) 80px 112px minmax(160px, 1fr) 80px;align-items:center;gap:15px;height:3em}.filter-selector-simple__right .grouped-filters .list{display:grid;grid-auto-flow:row;gap:calc(15px/3)}.filter-selector-simple__right .grouped-filters .list .filter{display:grid;grid-template-columns:minmax(160px, 1fr) 80px 112px minmax(160px, 1fr) 80px;align-items:center;gap:15px;height:2.5em}.filter-selector-simple__right .grouped-filters .list .filter-row{display:flex;align-items:center;position:relative;width:100%}.filter-selector-simple__right .grouped-filters .list filter-handler{width:100%}.filter-selector-simple__right .selected-filters filter-handler{width:100%}.filter-selector-simple__right .selected-filters .top{font-weight:600;display:grid;grid-template-columns:minmax(160px, 1fr) 80px 112px minmax(160px, 1fr) 80px;align-items:center;gap:15px;height:3em;margin-left:38px}.filter-selector-simple__right .selected-filters .list{display:grid;grid-auto-flow:row;gap:calc(15px/3);margin-left:38px}.filter-selector-simple__right .selected-filters .list .filter{display:grid;grid-template-columns:minmax(160px, 1fr) 80px 112px minmax(160px, 1fr) 80px;align-items:center;gap:15px;height:2.5em}.filter-selector-simple__right .selected-filters .list .filter-row{display:flex;align-items:center;position:relative;width:100%}.filter-selector-simple__right .selected-filters .list .filter-row>.btn{position:absolute;left:-38px}.filter-selector-simple__right .column{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/filter/selector/simple/filter-selector-simple.scss\",\"webpack://./src/resources/color-admin/_variables.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAKA,wBACC,iBC0MmC,CDxMnC,+BACC,YAAA,CACA,8CAAA,CACA,oCAAA,CACA,oCAAA,CACA,eAAA,CACA,wBAAA,CAEA,kHACC,2CAAA,CACA,2CAAA,CAEA,0CAJD,kHAKE,YAAA,CACA,qBAAA,CAAA,CAOJ,8BACC,YAAA,CACA,4BAAA,CACA,uCAAA,CACA,iBAAA,CACA,UAAA,CACA,aAAA,CAEA,8CACC,eAAA,CACA,WAAA,CACA,wCAAA,CACA,0BCuKkC,CDtKlC,iBAAA,CACA,UAAA,CACA,YAAA,CAGD,iHAEC,sBAAA,CACA,iBAAA,CACA,aAAA,CAEA,+YAGC,cAAA,CACA,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,QAAA,CACA,yBAAA,CACA,6CAAA,CAIF,2CACC,YAAA,CACA,8BAAA,CACA,kBAAA,CACA,gBAAA,CAEA,8DACC,eAAA,CAKH,+BACC,aAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,wCAAA,CACA,aAAA,CACA,mBAAA,CAGD,sCACC,YAAA,CACA,8BAAA,CACA,0BAAA,CACA,eAAA,CACA,cAAA,CAGD,qCACC,QAAA,CAGD,qCACC,kBAAA,CACA,WAAA,CACA,iCAAA,CAEA,gDACC,UAAA,CAIF,4CACC,YAAA,CACA,8BAAA,CACA,kBAAA,CACA,gBAAA,CAEA,+DACC,eAAA,CAIF,4DACC,2BAAA,CAEA,+EACC,mBAAA,CACA,6BAAA,CACA,kBAAA,CACA,YAAA,CACA,QAAA,CACA,6CAAA,CAEA,oFACC,gBEtHK,CF4HP,4DACC,YAAA,CACA,8BAAA,CACA,cAAA,CACA,UAAA,CAEA,kEACC,aCrGU,CDsGV,cAAA,CACA,eAAA,CAKH,gDACC,2BAAA,CAEA,qDACC,eAAA,CACA,YAAA,CACA,2EAAA,CACA,kBAAA,CACA,QElJM,CFmJN,UAAA,CAGD,sDACC,YAAA,CACA,kBAAA,CACA,gBAAA,CAEA,8DACC,YAAA,CACA,2EAAA,CACA,kBAAA,CACA,QE/JK,CFgKL,YAAA,CAEA,kEACC,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,UAAA,CAIF,qEACC,UAAA,CAOF,gEACC,UAAA,CAGD,sDACC,eAAA,CACA,YAAA,CACA,2EAAA,CACA,kBAAA,CACA,QE3LM,CF4LN,UAAA,CACA,gBAAA,CAED,uDACC,YAAA,CACA,kBAAA,CACA,gBAAA,CACA,gBAAA,CAEA,+DACC,YAAA,CACA,2EAAA,CACA,kBAAA,CACA,QEzMK,CF0ML,YAAA,CAEA,mEACC,YAAA,CACA,kBAAA,CACA,iBAAA,CACA,UAAA,CAEA,wEACC,iBAAA,CACA,UAAA,CAOL,uCACC,eAAA,CACA,kBAAA,CACA,sBAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = ` `;\n// Exports\nexport default code;","import { ObjectListColumnManager } from 'app/services/object-list/object-list-column-manager';\r\nimport { DialogController } from 'aurelia-dialog';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { DnDService } from 'app/services/d-n-d-service';\r\nimport { ObjectFilter, UIValueFilter, ValueFilter } from 'app/models/object-filter';\r\n@autoinject\r\nexport class FilterSelectorSimple {\r\n public filters: ObjectListColumnManager | undefined;\r\n\r\n //public available: ObjectFilter[];\r\n public available: UIValueFilter[] = [];\r\n \r\n public searchFilter: string = \"\";\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\t\r\n\tconstructor(protected dialog: DialogController, private dndService: DnDService) {\r\n console.log('ctor fss');\r\n\t}\r\n\t\r\n\tasync activate(model: ObjectListColumnManager) {\r\n this.filters = model;\r\n\t\tthis.setFilterList();\r\n\t}\r\n\r\n attached() {\r\n let draggedItem: UIValueFilter | undefined; //ObjectFilter;\r\n this.dndService.attachListInteraction(\"selected-filters-list\", {\r\n\t\t\tanimation: 150,\r\n\t\t\tforceFallback: true,\r\n group: \"filter-selector\",\r\n handle: \".drag-handle\",\r\n draggable: \".draggable-item\",\r\n dragClass: \"draggable-item--dragged\",\r\n\t\t\tchosenClass: \"draggable-item--chosen\",\r\n ghostClass: \"draggable-item--ghost\",\r\n onChoose: (event: any) => { \r\n draggedItem = this.filters?.selected[event.oldDraggableIndex];\r\n this.dragFilter = draggedItem;\r\n },\r\n onUnchoose: (event: any) => this.dragFilter = undefined,\r\n onClone: (event: any) => this.dragFilter = undefined,\r\n onMove: (event: any) => this.dragFilter = event.to.id == \"available-filters-list\" ? draggedItem : undefined,\r\n onEnd: (event: any) => { \r\n\t\t\t\tconsole.log('fss.onEnd splice filters.selected');\r\n if (event.to.id == \"available-filters-list\") {\r\n\t\t\t\t\tlet item: UIValueFilter | undefined = this.filters?.selected[event.oldDraggableIndex];\r\n if (item) {\r\n this.filters?.selected.splice(event.oldDraggableIndex, 1); // remove from old index in old list\r\n this.available.splice(event.newDraggableIndex, 0, item); // add to new index in new list\r\n }\r\n } else {\r\n let item: UIValueFilter | undefined = this.filters?.selected[event.oldDraggableIndex];\r\n if (item) {\r\n this.filters?.selected.splice(event.oldDraggableIndex, 1); // remove from old index\r\n this.filters?.selected.splice(event.newDraggableIndex, 0, item); // add to new index\r\n }\r\n }\r\n this.dragFilter = undefined;\r\n draggedItem = undefined;\r\n }\r\n });\r\n }\r\n \r\n detached() {\r\n this.dndService.detachListInteraction(\"selected-filters-list\");\r\n\t}\r\n\t\r\n\tpublic select(filter: UIValueFilter) {\r\n let index = this.available.indexOf(filter);\r\n\t\tif (index >= 0) {\r\n\t\t\t\r\n this.available.splice(index, 1);\r\n\t\t\tthis.filters?.selected.push(filter); console.log('fss.select push filters.selected');\r\n }\r\n }\r\n\r\n public unSelect(filter: UIValueFilter) {\r\n let index: number | undefined = this.filters?.selected.indexOf(filter);\r\n if (index && index >= 0) {\r\n\t\t\t\r\n\t\t\tthis.filters?.selected.splice(index, 1); console.log('fss.unselect splice filters.selected');\r\n this.available.push(filter);\r\n }\r\n }\r\n\r\n private async setFilterList(): Promise{\r\n\t\tthis.searchFilter = \"\";\r\n let availableFilter: ValueFilter[] | undefined = await this.filters?.getAvailableFiltersByAppliedFilters('fss');\r\n if (availableFilter) {\r\n let valueFilters:ValueFilter[] = availableFilter; \r\n this.available = ObjectListColumnManager.valueFilter2UIFilter(valueFilters);\r\n }\r\n\t}\r\n\t\r\n public async ok() : Promise {\r\n this.dialog.ok();\r\n\t}\r\n\t\r\n public cancel() {\r\n this.dialog.cancel();\r\n }\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","FilterSelectorSimple","constructor","dialog","dndService","available","searchFilter","console","log","activate","model","this","filters","setFilterList","attached","draggedItem","attachListInteraction","animation","forceFallback","group","handle","draggable","dragClass","chosenClass","ghostClass","onChoose","event","selected","oldDraggableIndex","dragFilter","onUnchoose","undefined","onClone","onMove","to","onEnd","item","splice","newDraggableIndex","detached","detachListInteraction","select","filter","index","indexOf","unSelect","availableFilter","getAvailableFiltersByAppliedFilters","valueFilters","valueFilter2UIFilter","ok","cancel","autoinject","DialogController"],"sourceRoot":""}