qms-angular 1.1.46 → 1.1.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/bundles/qms-angular.umd.js +1686 -24
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/select-process-data/index.js +2 -0
  4. package/esm2015/lib/components/select-process-data/public-api.js +3 -0
  5. package/esm2015/lib/components/select-process-data/select-process-data.component.js +275 -0
  6. package/esm2015/lib/components/select-process-data/select-process-data.module.js +64 -0
  7. package/esm2015/lib/components/select-process-data-tree/index.js +2 -0
  8. package/esm2015/lib/components/select-process-data-tree/public-api.js +3 -0
  9. package/esm2015/lib/components/select-process-data-tree/select-process-data-tree.component.js +1134 -0
  10. package/esm2015/lib/components/select-process-data-tree/select-process-data-tree.module.js +64 -0
  11. package/esm2015/lib/model/en.js +2 -1
  12. package/esm2015/lib/model/no.js +2 -1
  13. package/esm2015/lib/qms-ckeditor-components/common/bpmn/toolbar.function.js +7 -4
  14. package/esm2015/lib/qms-ckeditor-components/common/functions/resource.function.js +3 -2
  15. package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +4 -3
  16. package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-imagemap.model.js +1 -1
  17. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +2 -1
  18. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +3 -4
  19. package/esm2015/public-api.js +3 -1
  20. package/fesm2015/qms-angular.js +1491 -25
  21. package/fesm2015/qms-angular.js.map +1 -1
  22. package/lib/components/select-process-data/index.d.ts +1 -0
  23. package/lib/components/select-process-data/public-api.d.ts +2 -0
  24. package/lib/components/select-process-data/select-process-data.component.d.ts +120 -0
  25. package/lib/components/select-process-data/select-process-data.module.d.ts +2 -0
  26. package/lib/components/select-process-data-tree/index.d.ts +1 -0
  27. package/lib/components/select-process-data-tree/public-api.d.ts +2 -0
  28. package/lib/components/select-process-data-tree/select-process-data-tree.component.d.ts +196 -0
  29. package/lib/components/select-process-data-tree/select-process-data-tree.module.d.ts +2 -0
  30. package/lib/model/en.d.ts +1 -0
  31. package/lib/model/no.d.ts +1 -0
  32. package/lib/qms-ckeditor-components/common/bpmn/toolbar.function.d.ts +26 -0
  33. package/lib/qms-ckeditor-components/common/functions/resource.function.d.ts +1 -0
  34. package/lib/qms-ckeditor-components/models/qms-ckeditor-imagemap.model.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/public-api.d.ts +2 -0
  37. package/qms-angular.metadata.json +1 -1
  38. package/src/assets/jointjs/scss/bpmn.scss +3 -3
  39. package/src/assets/jointjs/scss/rappid.scss +12 -1
  40. package/src/lib/components/select-process-data/select-process-data.component.scss +241 -0
  41. package/src/lib/components/select-process-data-tree/select-process-data-tree.component.scss +634 -0
@@ -138,6 +138,7 @@
138
138
  "INSERT_TOOLTIP": "Insert a tooltip",
139
139
  "CONTENT": "Content",
140
140
  "TEMPLATE": "Template",
141
+ "RESET": "Reset",
141
142
  "CONTENT_TEMPLATE": "Content Template",
142
143
  "CREATE_NEW_TEMPLATE": "Create new template",
143
144
  "UPDATE_TEMPLATE": "Update template",
@@ -697,6 +698,7 @@
697
698
  "INSERT_TOOLTIP": "Sett inn et verktøytips",
698
699
  "CONTENT": "Innhold",
699
700
  "TEMPLATE": "Mal",
701
+ "RESET": "Nullstille",
700
702
  "CONTENT_TEMPLATE": "Innholdsmal",
701
703
  "CREATE_NEW_TEMPLATE": "Lag ny mal",
702
704
  "UPDATE_TEMPLATE": "Oppdater mal",
@@ -4781,7 +4783,7 @@
4781
4783
  qmsContentChanges: [{ type: i0.Input }]
4782
4784
  };
4783
4785
 
4784
- var ɵ0$6 = { appearance: 'fill' }, ɵ1$1 = { color: 'none' };
4786
+ var ɵ0$7 = { appearance: 'fill' }, ɵ1$1 = { color: 'none' };
4785
4787
  var QmsAngularModule = /** @class */ (function () {
4786
4788
  function QmsAngularModule() {
4787
4789
  }
@@ -4910,7 +4912,7 @@
4910
4912
  QMSContentChangesDirective
4911
4913
  ],
4912
4914
  providers: [
4913
- { provide: formField.MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: ɵ0$6 },
4915
+ { provide: formField.MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: ɵ0$7 },
4914
4916
  { provide: radio.MAT_RADIO_DEFAULT_OPTIONS, useValue: ɵ1$1 },
4915
4917
  QMSUploadingFileGuard
4916
4918
  ],
@@ -5257,7 +5259,7 @@
5257
5259
  _lines: [{ type: i0.ContentChildren, args: [QMSListLine, { descendants: true },] }]
5258
5260
  };
5259
5261
 
5260
- var ɵ0$5 = {
5262
+ var ɵ0$6 = {
5261
5263
  expandedHeight: '*',
5262
5264
  collapsedHeight: '*'
5263
5265
  };
@@ -5302,7 +5304,7 @@
5302
5304
  providers: [
5303
5305
  {
5304
5306
  provide: expansion.MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,
5305
- useValue: ɵ0$5
5307
+ useValue: ɵ0$6
5306
5308
  }
5307
5309
  ],
5308
5310
  schemas: [
@@ -13913,7 +13915,7 @@
13913
13915
  "Upload failed": "Kunne ikke laste opp",
13914
13916
  "Upload in progress": "Laster opp fil",
13915
13917
  "White": "Hvit",
13916
- "Widget toolbar": "Widget verktøylinje ",
13918
+ "Widget toolbar": "Widget verktøylinje",
13917
13919
  "Words: %0": "Ord: %0",
13918
13920
  "Yellow": "Gul",
13919
13921
  "image widget": "Bilde-widget",
@@ -14022,6 +14024,7 @@
14022
14024
  "Templates": LANG.QMSCKEDITOR.TEMPLATES,
14023
14025
  "About CKEditor": LANG.QMSCKEDITOR.ABOUT_CKEDITOR,
14024
14026
  "Create Table of Contents": LANG.QMSCKEDITOR.CREATE_TABLE_OF_CONTENTS,
14027
+ "Edit anchor": "Rediger anker"
14025
14028
  }
14026
14029
  };
14027
14030
  }
@@ -16793,7 +16796,8 @@
16793
16796
  name: 'deleteTemplate',
16794
16797
  attrs: {
16795
16798
  button: {
16796
- 'data-tooltip': "" + LANG.BPMN.DELETE_TEMPLATE
16799
+ 'data-tooltip': "" + LANG.BPMN.DELETE_TEMPLATE,
16800
+ 'data-before': "" + LANG.DELETE
16797
16801
  }
16798
16802
  }
16799
16803
  },
@@ -16802,7 +16806,8 @@
16802
16806
  name: 'saveAsTemplate',
16803
16807
  attrs: {
16804
16808
  button: {
16805
- 'data-tooltip': "" + LANG.BPMN.SAVE_AS_TEMPLATE
16809
+ 'data-tooltip': "" + LANG.BPMN.SAVE_AS_TEMPLATE,
16810
+ 'data-before': "" + LANG.QMSCKEDITOR.TEMPLATE
16806
16811
  }
16807
16812
  }
16808
16813
  },
@@ -16811,7 +16816,8 @@
16811
16816
  name: 'resetToTempTemplate',
16812
16817
  attrs: {
16813
16818
  button: {
16814
- 'data-tooltip': "" + LANG.BPMN.RESET_TO_LAST_SAVE
16819
+ 'data-tooltip': "" + LANG.BPMN.RESET_TO_LAST_SAVE,
16820
+ 'data-before': "" + LANG.QMSCKEDITOR.RESET
16815
16821
  }
16816
16822
  }
16817
16823
  },
@@ -17650,7 +17656,6 @@
17650
17656
  'delete backspace': function (evt) {
17651
17657
  evt.preventDefault();
17652
17658
  graph.removeCells(selection.collection.toArray());
17653
- resetCellView();
17654
17659
  },
17655
17660
  'ctrl+z': function () {
17656
17661
  var notify = isSelectedCellViewInSelection(selection);
@@ -17813,10 +17818,10 @@
17813
17818
  }
17814
17819
  }
17815
17820
  else if (shapeDetail.connectionTypeId === ShapeFlowChartConnectionType.Deviation) {
17816
- connectionName = this.LANG.BPMN.LINK_TO_DEVIATION;
17821
+ connectionName = LANG.BPMN.LINK_TO_DEVIATION;
17817
17822
  }
17818
17823
  else if (shapeDetail.connectionTypeId === ShapeFlowChartConnectionType.Checklist) {
17819
- connectionName = this.LANG.BPMN.LINK_TO_CHECKLIST;
17824
+ connectionName = LANG.BPMN.LINK_TO_CHECKLIST;
17820
17825
  }
17821
17826
  if (shapeDetail.connectionTypeId !== ShapeFlowChartConnectionType.Activity) {
17822
17827
  list[i]["style"].cursor = 'pointer';
@@ -22022,11 +22027,12 @@
22022
22027
  _this.naturalImageWidth = _this.imageMapData.imageWidth;
22023
22028
  _this.initFormControl();
22024
22029
  _this.initSvgIcons(iconRegistry, sanitizer);
22030
+ _this.selectedTarget = data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same;
22025
22031
  return _this;
22026
22032
  }
22027
22033
  QMSCKEditorImageMapComponent.prototype.initDefaultValues = function () {
22028
22034
  this.selectedLinkType = exports.LinkType.url;
22029
- this.selectedTarget = exports.TargetTypeName.new;
22035
+ this.selectedTarget = this.data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same;
22030
22036
  this.selectedProtocol = exports.ProtocolTypeName.http;
22031
22037
  this.url = '';
22032
22038
  this.processedUrl = '';
@@ -22269,7 +22275,7 @@
22269
22275
  this.myImageMap.areas[this.currentAreaId].aalt = this.anchorText;
22270
22276
  }
22271
22277
  else {
22272
- this.myImageMap.areas[this.currentAreaId].atarget = this.selectedTarget || exports.TargetTypeName.new;
22278
+ this.myImageMap.areas[this.currentAreaId].atarget = this.selectedTarget || (this.data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same);
22273
22279
  this.myImageMap.areas[this.currentAreaId].aalt = this.advisoryTitle;
22274
22280
  }
22275
22281
  this.myImageMap.areas[this.currentAreaId].ahref = ahref;
@@ -23138,7 +23144,7 @@
23138
23144
  }(joint.shapes.standard.Link));
23139
23145
  app.Link = Link;
23140
23146
  })(exports.app || (exports.app = {}));
23141
- var ɵ0$4 = function (flags) {
23147
+ var ɵ0$5 = function (flags) {
23142
23148
  if (this.hasFlag(flags, 'RENDER')) {
23143
23149
  this.render();
23144
23150
  }
@@ -23173,7 +23179,7 @@
23173
23179
  position: ['TRANSFORM'],
23174
23180
  angle: ['TRANSFORM']
23175
23181
  },
23176
- confirmUpdate: ɵ0$4,
23182
+ confirmUpdate: ɵ0$5,
23177
23183
  render: ɵ1,
23178
23184
  update: ɵ2
23179
23185
  });
@@ -23203,7 +23209,7 @@
23203
23209
  erd: erd,
23204
23210
  uml: uml,
23205
23211
  org: org,
23206
- 'ɵ0': ɵ0$4,
23212
+ 'ɵ0': ɵ0$5,
23207
23213
  'ɵ1': ɵ1,
23208
23214
  'ɵ2': ɵ2
23209
23215
  });
@@ -29842,6 +29848,7 @@
29842
29848
  data.editorContent = this.qmsckContentInput;
29843
29849
  data.linkJavaScriptLinksAllowed = this.qmsckData.linkJavaScriptLinksAllowed;
29844
29850
  data.enabledInterconnected = this.qmsckData.enabledInterconnected;
29851
+ data.defaultTargetNewWindow = this.qmsckData.defaultTargetNewWindow;
29845
29852
  var dialogTemplate = this.dialog.open(QMSCKEditorImageMapComponent, {
29846
29853
  data: data,
29847
29854
  disableClose: true,
@@ -31359,7 +31366,7 @@
31359
31366
  selectionChangeEvent: [{ type: i0.Output }]
31360
31367
  };
31361
31368
 
31362
- var ɵ0$3 = { displayDefaultIndicatorType: false };
31369
+ var ɵ0$4 = { displayDefaultIndicatorType: false };
31363
31370
  var QmsStepperModule = /** @class */ (function () {
31364
31371
  function QmsStepperModule() {
31365
31372
  }
@@ -31383,7 +31390,7 @@
31383
31390
  ],
31384
31391
  providers: [{
31385
31392
  provide: stepper$1.STEPPER_GLOBAL_OPTIONS,
31386
- useValue: ɵ0$3
31393
+ useValue: ɵ0$4
31387
31394
  }]
31388
31395
  },] }
31389
31396
  ];
@@ -33420,7 +33427,7 @@
33420
33427
  PaginationSize["large"] = "large";
33421
33428
  PaginationSize["mobile"] = "mobile";
33422
33429
  })(exports.PaginationSize || (exports.PaginationSize = {}));
33423
- var ɵ0$2 = { overlayPanelClass: 'customCDKpanel' };
33430
+ var ɵ0$3 = { overlayPanelClass: 'customCDKpanel' };
33424
33431
  var QMSPaginatorComponent = /** @class */ (function () {
33425
33432
  function QMSPaginatorComponent(trans) {
33426
33433
  this.trans = trans;
@@ -33640,7 +33647,7 @@
33640
33647
  providers: [
33641
33648
  {
33642
33649
  provide: select.MAT_SELECT_CONFIG,
33643
- useValue: ɵ0$2,
33650
+ useValue: ɵ0$3,
33644
33651
  },
33645
33652
  ],
33646
33653
  styles: ["::ng-deep .customCDKpanel{transform:none!important}::ng-deep .qms-paginator{display:block}::ng-deep .qms-paginator .qms-paginator-outer-container{display:flex}::ng-deep .qms-paginator .mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}::ng-deep .qms-paginator .mat-paginator-container .qms-btn-icon{width:40px;height:40px;line-height:40px}::ng-deep .qms-paginator .mat-paginator-container .mat-select .mat-select-arrow{margin-top:20px}::ng-deep .qms-paginator .mat-paginator-container .qms-total-result{margin-right:24px;margin-bottom:21px}::ng-deep .qms-paginator .mat-paginator-container .qms-total-result span{font-family:Open Sans;font-weight:400;font-size:14px;line-height:22px;color:rgba(0,0,0,.6)}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size{margin-right:24px;display:flex;align-items:baseline}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .qms-pagesize-label{font-weight:400;font-size:14px;line-height:22px;color:#323232;font-family:Open Sans;font-style:normal;margin-right:8px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .qms-form-page-size .mat-form-field-flex{width:80px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .qms-form-select-page-size .mat-form-field-flex{width:51px;padding-left:9px;padding-right:5px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .jump-page .mat-form-field-wrapper .mat-form-field-flex{width:55px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .mat-form-field-flex{height:40px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-page-size .mat-form-field-flex .mat-form-field-infix{padding-top:4px;border-top:0;padding-bottom:0;height:25px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions{display:flex;align-items:center;margin-bottom:15px}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions .selected{background-color:#e5eefb;color:#1954a9}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions .qms-3d{font-weight:600;font-size:14px;line-height:22px;color:#323232}::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions button:not(.qms-btn-disabled) .qms-btn-icon-wrapper{color:#323232}::ng-deep .qms-paginator .mat-paginator-container-mobile .mat-select .mat-select-arrow{margin-top:20px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-total-result{margin-bottom:16px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-total-result span{font-family:Open Sans;font-style:normal;font-weight:400;font-size:12px;line-height:16px;color:rgba(0,0,0,.6)}::ng-deep .qms-paginator .mat-paginator-container-mobile .mat-paginator-container{justify-content:flex-start}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size{margin-right:24px;display:flex;align-items:baseline}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .qms-pagesize-label{font-weight:400;font-size:12px;line-height:22px;color:#323232;font-family:Open Sans;font-style:normal;margin-right:8px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .qms-form-page-size .mat-form-field-flex{width:80px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .qms-form-select-page-size .mat-form-field-flex{width:51px;padding-left:9px;padding-right:5px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .jump-page .mat-form-field-wrapper .mat-form-field-flex{width:55px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .mat-form-field-flex{height:40px}::ng-deep .qms-paginator .mat-paginator-container-mobile .qms-paginator-page-size .mat-form-field-flex .mat-form-field-infix{padding-top:4px;border-top:0;padding-bottom:0;height:25px}::ng-deep .qms-paginator .size-small .mat-paginator-container{justify-content:flex-start}::ng-deep .qms-paginator .mr-b-size-small{margin-bottom:17px!important}"]
@@ -35503,7 +35510,7 @@
35503
35510
  ])
35504
35511
  ];
35505
35512
 
35506
- var ɵ0$1 = {
35513
+ var ɵ0$2 = {
35507
35514
  clickAction: 'noop'
35508
35515
  };
35509
35516
  var SelectDepartmentComponent = /** @class */ (function () {
@@ -35789,7 +35796,7 @@
35789
35796
  providers: [
35790
35797
  {
35791
35798
  provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
35792
- useValue: ɵ0$1
35799
+ useValue: ɵ0$2
35793
35800
  }
35794
35801
  ],
35795
35802
  animations: [SelectDepartmentAnimationTrigger],
@@ -36011,7 +36018,7 @@
36011
36018
  return QMSSelectAccessDialog;
36012
36019
  }());
36013
36020
 
36014
- var ɵ0 = {
36021
+ var ɵ0$1 = {
36015
36022
  clickAction: 'noop'
36016
36023
  };
36017
36024
  var QMSSelectAccessDialogComponent = /** @class */ (function () {
@@ -36601,7 +36608,7 @@
36601
36608
  providers: [
36602
36609
  {
36603
36610
  provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
36604
- useValue: ɵ0
36611
+ useValue: ɵ0$1
36605
36612
  }
36606
36613
  ],
36607
36614
  encapsulation: i0.ViewEncapsulation.None,
@@ -36670,6 +36677,1657 @@
36670
36677
  return FilterPersonModel;
36671
36678
  }());
36672
36679
 
36680
+ var SelectProcessDataTreeComponent = /** @class */ (function () {
36681
+ function SelectProcessDataTreeComponent(cdRef, domSanitizer, appIconService, iconRegistry, eleRef, trans, overlay, viewContainerRef, treeDepartmentService) {
36682
+ var _this = this;
36683
+ this.cdRef = cdRef;
36684
+ this.domSanitizer = domSanitizer;
36685
+ this.appIconService = appIconService;
36686
+ this.iconRegistry = iconRegistry;
36687
+ this.eleRef = eleRef;
36688
+ this.trans = trans;
36689
+ this.overlay = overlay;
36690
+ this.viewContainerRef = viewContainerRef;
36691
+ this.treeDepartmentService = treeDepartmentService;
36692
+ this.spinnerArr = new Array(12).fill(0);
36693
+ this.arrSkeleton = new Array(6).fill(0);
36694
+ this.height = '50vh';
36695
+ this.config = new QMSSelectDepartmentTreeConfig();
36696
+ this.isIncludeChildren = false;
36697
+ this.onSearchEvent = new i0.EventEmitter();
36698
+ this.onPagingSearchEvent = new i0.EventEmitter();
36699
+ this.onValueChangeEvent = new i0.EventEmitter();
36700
+ this.selectionNodeChangeEvent = new i0.EventEmitter();
36701
+ this.onCheckNodeEvent = new i0.EventEmitter();
36702
+ this.onExpandNodeEvent = new i0.EventEmitter();
36703
+ this.onLoadMoreEvent = new i0.EventEmitter();
36704
+ this.onCheckItemSearchEvent = new i0.EventEmitter();
36705
+ this.onCheckAllItemSearchEvent = new i0.EventEmitter();
36706
+ this.toggleIncludeChildEvent = new i0.EventEmitter();
36707
+ this.MODE_VIEW_ENUM = exports.ModeDepartmentTreeeViewEnum;
36708
+ this.ITEM_SIZE = 50;
36709
+ this.ngUnsubscribe = new rxjs.Subject();
36710
+ this.resultSearchSelected = [];
36711
+ this.resultSelected = [];
36712
+ this.getDataTree$ = new rxjs.BehaviorSubject([]);
36713
+ this.searchDepartment$ = new rxjs.BehaviorSubject(new QMSDepartmentPagingModel());
36714
+ this.resultSearch = [];
36715
+ this.getIndexView$ = new rxjs.BehaviorSubject(0);
36716
+ this.scrollToNodeEvent$ = new rxjs.Subject();
36717
+ this.getActiveNodeEvent$ = new rxjs.Subject();
36718
+ this.activeNode = '';
36719
+ this.PAGINATION_SIZE = exports.PaginationSize;
36720
+ this.PAGE_SIZE_OPTION = [5, 10, 15, 20, 25, 100];
36721
+ this.CURRENT_PAGESIZE = 10;
36722
+ this.nestedTreeNodeMap = new Map();
36723
+ this.flatTreeNodeMap = new Map();
36724
+ this.checkListSelection = new collections.SelectionModel(true);
36725
+ this.checkListSelectionSearch = new collections.SelectionModel(true);
36726
+ this._selectedList = [];
36727
+ this.selectedListAfterDataNodeChange$ = new rxjs.Subject();
36728
+ this.formSearchControl = new forms.FormControl('');
36729
+ this.getLoading$ = new rxjs.BehaviorSubject(false);
36730
+ this.getLoadingMore$ = new rxjs.BehaviorSubject(true);
36731
+ this.untilDestroyLoadMore$ = new rxjs.Subject();
36732
+ this.onBeforeInitNodeSelected$ = new rxjs.Subject();
36733
+ this.textSearchSubject$ = new rxjs.BehaviorSubject('');
36734
+ this.itemIconType = ItemIconType;
36735
+ this._transformer = function (node, level) {
36736
+ var flatNode = _this.convertToFlatNode(node) || new QMSFlatNodeTree();
36737
+ flatNode.id = node.id;
36738
+ flatNode.name = node.name;
36739
+ flatNode.expandable = (node.children && node.children.length > 0) || (!!node.childCount) || node.expandable;
36740
+ flatNode.level = level;
36741
+ flatNode.parentId = node.parentId;
36742
+ flatNode.markedGetChildren = node.children.length > 0;
36743
+ flatNode.itemIcon = node.itemIcon;
36744
+ flatNode.itemIconSvg = node.itemIconSvg;
36745
+ flatNode.isFile = node.isFile;
36746
+ flatNode.disabled = node.disabled;
36747
+ flatNode.isGroup = node.isGroup;
36748
+ flatNode.groupId = node.groupId;
36749
+ flatNode.externalName = node.externalName;
36750
+ flatNode.childCount = node.childCount;
36751
+ flatNode.selectedChildCount = node.selectedChildCount;
36752
+ flatNode.markedGetChildCountRecurrsive = node.markedGetChildCountRecurrsive;
36753
+ flatNode.isIncludeChildWhenChecked = node.isIncludeChildWhenChecked;
36754
+ _this.flatTreeNodeMap.set(flatNode, node);
36755
+ _this.nestedTreeNodeMap.set(node, flatNode);
36756
+ return flatNode;
36757
+ };
36758
+ this.getLevel = function (node) { return node === null || node === void 0 ? void 0 : node.level; };
36759
+ this._getChild = function (node) { return node.children; };
36760
+ this.isExpandable = function (node) { return node.expandable; };
36761
+ this.hasChild = function (_, node) { return node.expandable; };
36762
+ this._handlingLazyObject = {
36763
+ checkAllSearch: false,
36764
+ checkItemSearch: false,
36765
+ checkNode: false,
36766
+ expand: false
36767
+ };
36768
+ // Init tree data
36769
+ this.getDataTree$
36770
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
36771
+ .subscribe(function (data) {
36772
+ if (!_this.dataSource)
36773
+ return;
36774
+ _this.dataSource.data = data;
36775
+ _this.cdRef.detectChanges();
36776
+ });
36777
+ // Register icon
36778
+ appIconService.registerProcessIcon(iconRegistry, domSanitizer);
36779
+ appIconService.registerProcessAreaIcon(iconRegistry, domSanitizer);
36780
+ appIconService.registerDocumentIcon(iconRegistry, domSanitizer);
36781
+ appIconService.registerFolderIcon(iconRegistry, domSanitizer);
36782
+ appIconService.registerDeviationIcon(iconRegistry, domSanitizer);
36783
+ appIconService.registerChecklistIcon(iconRegistry, domSanitizer);
36784
+ appIconService.registerRiskIcon(iconRegistry, domSanitizer);
36785
+ this.trans.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
36786
+ if (res) {
36787
+ _this.LANG = _this.trans.getObjectLang(res);
36788
+ }
36789
+ });
36790
+ this._handleSearchEvent();
36791
+ this._handleActiveNodeEvent();
36792
+ this._handleItemSelectionChanged();
36793
+ this.getLoading$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (res) {
36794
+ res ? _this.formSearchControl.disable() : _this.formSearchControl.enable();
36795
+ })).subscribe();
36796
+ }
36797
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "rowsSkeleton", {
36798
+ set: function (value) {
36799
+ this.arrSkeleton = new Array(value).fill(0);
36800
+ },
36801
+ enumerable: false,
36802
+ configurable: true
36803
+ });
36804
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "departmentRoots", {
36805
+ get: function () {
36806
+ if (!this.treeControl)
36807
+ return;
36808
+ return this.treeControl.dataNodes.filter(function (node) { return node.level === 0; });
36809
+ },
36810
+ enumerable: false,
36811
+ configurable: true
36812
+ });
36813
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isAllDepartmentSelected", {
36814
+ get: function () {
36815
+ var _this = this;
36816
+ return !!this.treeControl && this.treeControl.dataNodes.every(function (node) { return _this.isSelectedNode(node); });
36817
+ },
36818
+ enumerable: false,
36819
+ configurable: true
36820
+ });
36821
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isIndeterminateCheckboxAllTree", {
36822
+ get: function () {
36823
+ return !this.isAllDepartmentSelected && this.checkListSelection.selected.length > 0;
36824
+ },
36825
+ enumerable: false,
36826
+ configurable: true
36827
+ });
36828
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "currentTreeData", {
36829
+ get: function () {
36830
+ return this.getDataTree$.getValue();
36831
+ },
36832
+ enumerable: false,
36833
+ configurable: true
36834
+ });
36835
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isSelectAllResultSearch", {
36836
+ get: function () {
36837
+ var _this = this;
36838
+ return this.resultSearch.length && this.resultSearch.every(function (x) { return _this.checkListSelectionSearch.isSelected(x); });
36839
+ },
36840
+ enumerable: false,
36841
+ configurable: true
36842
+ });
36843
+ Object.defineProperty(SelectProcessDataTreeComponent.prototype, "indeterminateSearchResult", {
36844
+ get: function () {
36845
+ var _this = this;
36846
+ return !this.isSelectAllResultSearch && !!this.resultSearch.length && this.resultSearch.some(function (x) { return _this.checkListSelectionSearch.isSelected(x); });
36847
+ },
36848
+ enumerable: false,
36849
+ configurable: true
36850
+ });
36851
+ SelectProcessDataTreeComponent.prototype.ngAfterContentInit = function () {
36852
+ this.getLoadingMore$.next(false);
36853
+ this.cdRef.detectChanges();
36854
+ };
36855
+ SelectProcessDataTreeComponent.prototype.ngAfterViewInit = function () {
36856
+ var _this = this;
36857
+ this.getIndexView$.pipe(operators.takeUntil(rxjs.merge(this.ngUnsubscribe, this.untilDestroyLoadMore$)), operators.tap(function (_) { return _this.getLoadingMore$.next(_this.config.lazy); }), operators.delay(700), operators.tap(function (value) {
36858
+ _this.getLoadingMore$.next(false);
36859
+ if (value === 0)
36860
+ _this.cdkVirtualScrollViewport &&
36861
+ _this.cdkVirtualScrollViewport.scrolledIndexChange
36862
+ .pipe(operators.takeUntil(_this.untilDestroyLoadMore$), operators.map(function (_) { return _this.cdkVirtualScrollViewport.measureScrollOffset('bottom'); }), operators.pairwise(), operators.filter(function (_b) {
36863
+ var _c = __read(_b, 2), x1 = _c[0], x2 = _c[1];
36864
+ return x1 > x2 && x2 < 140;
36865
+ }), operators.throttleTime(200), operators.tap(function (_) {
36866
+ if (_this.getLoadingMore$.value)
36867
+ return;
36868
+ if (!_this.config.lazy) {
36869
+ _this.onDestroyLoadMore();
36870
+ return;
36871
+ }
36872
+ _this.onLoadMoreEvent.emit();
36873
+ _this.getLoadingMore$.next(true);
36874
+ }))
36875
+ .subscribe();
36876
+ })).subscribe();
36877
+ this.onBeforeInitNodeSelected$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (_) {
36878
+ _this._handleListSelected();
36879
+ _this.getLoadingMore$.next(false);
36880
+ })).subscribe();
36881
+ this.cdRef.detectChanges();
36882
+ };
36883
+ SelectProcessDataTreeComponent.prototype.ngOnInit = function () {
36884
+ this.isIncludeChildren = this.config.isIncludeChildren;
36885
+ this._initTreeData();
36886
+ if (!this.config.lazy) {
36887
+ this._handleListSelected();
36888
+ return;
36889
+ }
36890
+ //action for lazy config
36891
+ this._initListSelected();
36892
+ this._handleAfterDataNodeChangeEvent();
36893
+ this.selectedListAfterDataNodeChange$.next(this.treeControl.dataNodes);
36894
+ };
36895
+ SelectProcessDataTreeComponent.prototype.ngOnDestroy = function () {
36896
+ this.ngUnsubscribe.next();
36897
+ this.ngUnsubscribe.complete();
36898
+ };
36899
+ SelectProcessDataTreeComponent.prototype.onDestroyLoadMore = function () {
36900
+ this.untilDestroyLoadMore$.next();
36901
+ this.untilDestroyLoadMore$.complete();
36902
+ };
36903
+ SelectProcessDataTreeComponent.prototype._initTreeData = function () {
36904
+ this.treeControl = new tree.FlatTreeControl(this.getLevel, this.isExpandable);
36905
+ this.treeFlattener = new tree$1.MatTreeFlattener(this._transformer, this.getLevel, this.isExpandable, this._getChild);
36906
+ this.dataSource = new tree$1.MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
36907
+ var _treeDataInput = ___namespace.cloneDeep(this.config.treeData);
36908
+ if (!_treeDataInput.length)
36909
+ return;
36910
+ var treeData = this.treeDepartmentService.convertToTreeData(_treeDataInput);
36911
+ this.updateDataTree(treeData);
36912
+ this.getLoading$.next(false);
36913
+ };
36914
+ SelectProcessDataTreeComponent.prototype._handleListSelected = function () {
36915
+ if (!this.config.selectedList.length)
36916
+ return;
36917
+ var selectedList = this.config.selectedList.sort(function (x, y) { return x.isGroup ? -1 : y.isGroup ? 1 : 0; });
36918
+ for (var i = 0; i < selectedList.length; i++) {
36919
+ var item = selectedList[i];
36920
+ var node = this.getNodeById(item.id);
36921
+ if (node) {
36922
+ var nestedNode = this.convertToNestedNode(node);
36923
+ nestedNode.isGroup = item.isGroup;
36924
+ nestedNode.groupId = item.groupId;
36925
+ this.checkListSelection.select(node);
36926
+ this.handleCheckNode(node);
36927
+ this.onExpandAllParent(node);
36928
+ }
36929
+ }
36930
+ this.cdRef.detectChanges();
36931
+ };
36932
+ SelectProcessDataTreeComponent.prototype._initListSelected = function () {
36933
+ var _b;
36934
+ this._selectedList = this.treeDepartmentService.convertToTreeData(this.config.selectedList);
36935
+ //Convert array selectedList into nested array as 1 level form
36936
+ var indexRemove = [];
36937
+ var _loop_1 = function (i) {
36938
+ var item = this_1._selectedList[i];
36939
+ var result = this_1.treeDepartmentService.getDescendantsOfNode(item);
36940
+ item.children = result;
36941
+ var index = this_1._selectedList.findIndex(function (x) { return result.some(function (x1) { return x1.id === x.id; }); });
36942
+ if (index < 0)
36943
+ return "continue";
36944
+ indexRemove.push(index);
36945
+ };
36946
+ var this_1 = this;
36947
+ for (var i = 0; i < this._selectedList.length; i++) {
36948
+ _loop_1(i);
36949
+ }
36950
+ this._selectedList = this._selectedList.filter(function (_, index) { return !indexRemove.includes(index); });
36951
+ (_b = this.resultSelected).push.apply(_b, __spreadArray([], __read(this._selectedList)));
36952
+ this.onValueChangeEvent.emit(this.resultSelected);
36953
+ };
36954
+ // handle selected list when data nodes change
36955
+ SelectProcessDataTreeComponent.prototype._handleAfterDataNodeChangeEvent = function () {
36956
+ var _this = this;
36957
+ if (this.config.lazy) {
36958
+ this.selectedListAfterDataNodeChange$
36959
+ .pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (data) {
36960
+ if (!_this._selectedList.length)
36961
+ return;
36962
+ _this._selectedList.forEach(function (item) {
36963
+ if (!item.parentId) {
36964
+ var node = _this.getNodeById(item.id);
36965
+ if (node)
36966
+ item.parentId = node.parentId;
36967
+ }
36968
+ });
36969
+ var _loop_2 = function (i) {
36970
+ var _b;
36971
+ var element = data[i];
36972
+ var item = _this._selectedList.find(function (x) { var _a; return x.id === element.id || ((_a = x.children) === null || _a === void 0 ? void 0 : _a.some(function (x1) { return x1.id === element.id; })); });
36973
+ if (!!item) {
36974
+ var node = _this.getNodeById(item.id);
36975
+ if (!node)
36976
+ return "continue";
36977
+ var nestedNode = _this.convertToNestedNode(node);
36978
+ nestedNode.isGroup = item.isGroup;
36979
+ nestedNode.groupId = item.groupId;
36980
+ _this.checkListSelection.select(node);
36981
+ var descendants = _this.getListChildrenOfNode(node);
36982
+ if (node.markedGetChildren) {
36983
+ if (!item.children.length)
36984
+ return "continue";
36985
+ var itemSelect = descendants.filter(function (x) { return item.children.map(function (x1) { return x1.id; }).includes(x.id); });
36986
+ if (!itemSelect.length)
36987
+ return "continue";
36988
+ itemSelect.forEach(function (_item) {
36989
+ var _nestedNode = _this.convertToNestedNode(_item);
36990
+ _nestedNode.groupId = item.children[0].groupId;
36991
+ _nestedNode.isGroup = false;
36992
+ });
36993
+ (_b = _this.checkListSelection).select.apply(_b, __spreadArray([], __read(itemSelect)));
36994
+ }
36995
+ }
36996
+ };
36997
+ for (var i = 0; i < data.length; i++) {
36998
+ _loop_2(i);
36999
+ }
37000
+ }))
37001
+ .subscribe();
37002
+ }
37003
+ };
37004
+ /**
37005
+ * This method use for lazy mode, do some thing before init list node selected
37006
+ * @param callback
37007
+ * @returns
37008
+ */
37009
+ SelectProcessDataTreeComponent.prototype.onBeforeInitNodeSelected = function (callback) {
37010
+ return __awaiter(this, void 0, void 0, function () {
37011
+ return __generator(this, function (_b) {
37012
+ switch (_b.label) {
37013
+ case 0:
37014
+ if (!this.config.lazy)
37015
+ return [2 /*return*/];
37016
+ this.getLoadingMore$.next(true);
37017
+ if (!!!callback) return [3 /*break*/, 2];
37018
+ return [4 /*yield*/, callback()];
37019
+ case 1:
37020
+ _b.sent();
37021
+ _b.label = 2;
37022
+ case 2:
37023
+ this.onBeforeInitNodeSelected$.next();
37024
+ return [2 /*return*/];
37025
+ }
37026
+ });
37027
+ });
37028
+ };
37029
+ //Handle item selection changed
37030
+ SelectProcessDataTreeComponent.prototype._handleItemSelectionChanged = function () {
37031
+ var _this = this;
37032
+ this.checkListSelection.changed
37033
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
37034
+ .subscribe(function (_b) {
37035
+ var added = _b.added, removed = _b.removed;
37036
+ var checkExistInResult = function (node) { return _this.resultSelected.findIndex(function (x) { return x.id === node.id; }) > -1; };
37037
+ if (added.length) {
37038
+ added.forEach(function (node) {
37039
+ var nestedNode = ___namespace.cloneDeep(_this.convertToNestedNode(node));
37040
+ nestedNode.children = [];
37041
+ if (!_this.config.lazy)
37042
+ nestedNode.childCount = _this.getListChildrenOfNode(node).length;
37043
+ var existGroup = ___namespace.cloneDeep(_this.getAllParentNode(node)
37044
+ .map(function (item) { return _this.convertToNestedNode(item); })
37045
+ .reverse()
37046
+ .find(function (x) { return x.isGroup; }));
37047
+ if (!!existGroup) {
37048
+ var flatExistGroup_1 = _this.getNodeById(existGroup.id);
37049
+ nestedNode.groupId = existGroup.id;
37050
+ var groupResult = _this.resultSelected.find(function (x) { return x.id === existGroup.id; });
37051
+ if (groupResult && !groupResult.children.some(function (x) { return x.id === nestedNode.id; })) {
37052
+ groupResult.isGroup = existGroup.isGroup;
37053
+ groupResult.children.push(nestedNode);
37054
+ }
37055
+ _this._onSelectionNodeChangeEvent('updated', [groupResult]);
37056
+ // re-filter result selected
37057
+ _this.resultSelected = _this.resultSelected.filter(function (item) { return !_this.getListChildrenOfNode(flatExistGroup_1).map(function (x) { return x.id; }).includes(item.id); });
37058
+ return;
37059
+ }
37060
+ if (checkExistInResult(node))
37061
+ return;
37062
+ _this.resultSelected.push(nestedNode);
37063
+ _this._onSelectionNodeChangeEvent('added', [nestedNode]);
37064
+ });
37065
+ }
37066
+ if (removed.length) {
37067
+ removed.forEach(function (node) {
37068
+ var nestedNode = _this.convertToNestedNode(node);
37069
+ var children = _this.getListChildrenOfNode(node);
37070
+ if (nestedNode.isGroup) {
37071
+ var _item = _this.resultSelected.find(function (x) { return x.id === node.id; });
37072
+ if (!_item)
37073
+ return;
37074
+ children.forEach(function (item) { return item.groupId = null; });
37075
+ _this.resultSelected.splice(_this.resultSelected.indexOf(_item), 1);
37076
+ _this._onSelectionNodeChangeEvent('removed', [_item]);
37077
+ return;
37078
+ }
37079
+ var group = _this.resultSelected.find(function (x) { return x.id === nestedNode.groupId; });
37080
+ if (!group) {
37081
+ var _item = _this.resultSelected.find(function (x) { return x.id === node.id; });
37082
+ if (!_item)
37083
+ return;
37084
+ _this.resultSelected.splice(_this.resultSelected.indexOf(_item), 1);
37085
+ _this._onSelectionNodeChangeEvent('removed', [_item]);
37086
+ return;
37087
+ }
37088
+ var childNodes = _this.getListChildrenOfNode(node).concat(node);
37089
+ var _loop_3 = function (i) {
37090
+ var item = childNodes[i];
37091
+ var _node = _this.getNodeById(item.id);
37092
+ if (group.children.some(function (x) { return x.id === _node.id; }) && !_this.isSelectedNode(_node)) {
37093
+ var _item = group.children.find(function (x) { return x.id === item.id; });
37094
+ if (!_item)
37095
+ return { value: void 0 };
37096
+ group.children.splice(group.children.indexOf(_item), 1);
37097
+ _this._onSelectionNodeChangeEvent('updated', [group]);
37098
+ }
37099
+ };
37100
+ for (var i = 0; i < childNodes.length; i++) {
37101
+ var state_1 = _loop_3(i);
37102
+ if (typeof state_1 === "object")
37103
+ return state_1.value;
37104
+ }
37105
+ });
37106
+ }
37107
+ _this._mapToResultSearch();
37108
+ _this.onValueChangeEvent.emit(_this.resultSelected);
37109
+ });
37110
+ };
37111
+ SelectProcessDataTreeComponent.prototype._onSelectionNodeChangeEvent = function (state, data) {
37112
+ switch (state) {
37113
+ case 'removed':
37114
+ this.selectionNodeChangeEvent.emit({
37115
+ removed: data,
37116
+ added: [],
37117
+ updated: [],
37118
+ source: new collections.SelectionModel(true, this.resultSelected)
37119
+ });
37120
+ break;
37121
+ case 'updated':
37122
+ this.selectionNodeChangeEvent.emit({
37123
+ removed: [],
37124
+ added: [],
37125
+ updated: data,
37126
+ source: new collections.SelectionModel(true, this.resultSelected)
37127
+ });
37128
+ break;
37129
+ case 'added':
37130
+ this.selectionNodeChangeEvent.emit({
37131
+ removed: [],
37132
+ added: data,
37133
+ updated: [],
37134
+ source: new collections.SelectionModel(true, this.resultSelected)
37135
+ });
37136
+ break;
37137
+ default:
37138
+ return;
37139
+ }
37140
+ };
37141
+ SelectProcessDataTreeComponent.prototype._handleSearchEvent = function () {
37142
+ var _this = this;
37143
+ this.searchDepartment$
37144
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
37145
+ .subscribe(function (result) {
37146
+ _this.resultSearch = [];
37147
+ _this.CURRENT_PAGESIZE = result.pageSize;
37148
+ _this.getLoading$.next(false);
37149
+ if (result && result.length) {
37150
+ result.data.forEach(function (item) {
37151
+ var _a;
37152
+ var node = _this.getNodeById(item.id);
37153
+ var location = [];
37154
+ if (_this.config.lazy) {
37155
+ location = ((_a = item.path) === null || _a === void 0 ? void 0 : _a.map(function (x) { return ({ name: x }); })) || [];
37156
+ }
37157
+ else {
37158
+ var parents = node ? _this.getAllParentNode(node) : [];
37159
+ location = parents.length ? parents.map(function (x) { return ({
37160
+ id: x.id,
37161
+ name: x.name,
37162
+ }); }).reverse() : [];
37163
+ }
37164
+ _this.resultSearch.push(Object.assign(Object.assign({}, item), { disabled: !_this.config.lazy && _this.config.checkSearchMappingTree && !node, location: __spreadArray(__spreadArray([], __read(location)), [
37165
+ {
37166
+ id: item.id,
37167
+ name: item.name,
37168
+ }
37169
+ ]), isLoading: false }));
37170
+ });
37171
+ _this.textSearchSubject$.next(_this.formSearchControl.value);
37172
+ if (_this.config.clearCheckListSelectionSearchWhenHandle)
37173
+ _this.checkListSelectionSearch.clear();
37174
+ _this._mapToResultSearch();
37175
+ _this.setIndexView(1);
37176
+ }
37177
+ });
37178
+ };
37179
+ SelectProcessDataTreeComponent.prototype._handleActiveNodeEvent = function () {
37180
+ var _this = this;
37181
+ this.scrollToNodeEvent$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.switchMap(function (val) {
37182
+ var delayTiming = _this.getIndexView$.value === 1 ? 700 : 0;
37183
+ _this.setIndexView(0);
37184
+ return rxjs.of(val).pipe(operators.delay(delayTiming), operators.takeUntil(_this.ngUnsubscribe));
37185
+ }))
37186
+ .subscribe(function (res) {
37187
+ _this.onScrollIntoNode(res);
37188
+ });
37189
+ this.getActiveNodeEvent$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.switchMap(function (val) {
37190
+ _this.activeNode = val;
37191
+ return rxjs.timer(1500);
37192
+ }))
37193
+ .subscribe(function (_) {
37194
+ _this.activeNode = '';
37195
+ });
37196
+ };
37197
+ SelectProcessDataTreeComponent.prototype.updateDataTree = function (data) {
37198
+ this.getDataTree$.next(data);
37199
+ };
37200
+ SelectProcessDataTreeComponent.prototype.setLoadingStateNode = function (isLoading, nodeId) {
37201
+ var node = this.getNodeById(nodeId);
37202
+ if (!node)
37203
+ return;
37204
+ node.isLoading = isLoading;
37205
+ this.checkLoadingOfParent(node);
37206
+ };
37207
+ SelectProcessDataTreeComponent.prototype.onExpandNode = function (node) {
37208
+ if (!(node === null || node === void 0 ? void 0 : node.expandable))
37209
+ return;
37210
+ this.treeControl.toggle(node);
37211
+ if (this.config.lazy && this.treeControl.isExpanded(node) && !node.markedGetChildren) {
37212
+ node.isLoading = true;
37213
+ this.checkLoadingOfParent(node);
37214
+ }
37215
+ this.onExpandNodeEvent.emit(node);
37216
+ };
37217
+ SelectProcessDataTreeComponent.prototype.onOptionSearchSelected = function (value) {
37218
+ var flatNode = this.getNodeById(value.id);
37219
+ if (!flatNode)
37220
+ return;
37221
+ this.checkListSelection.select(flatNode);
37222
+ this.handleCheckNode(flatNode);
37223
+ this.onScrollIntoNode(flatNode.id);
37224
+ };
37225
+ SelectProcessDataTreeComponent.prototype.onCheckAllRootTreeNode = function () {
37226
+ var _b;
37227
+ var _this = this;
37228
+ if (this.config.isSelectOne || !this.config.activeSelectAllNode)
37229
+ return;
37230
+ if (this.isAllDepartmentSelected) {
37231
+ this.treeControl.dataNodes.forEach(function (node) {
37232
+ var nestedNode = _this.convertToNestedNode(node);
37233
+ nestedNode.isGroup = false;
37234
+ });
37235
+ (_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(this.treeControl.dataNodes)));
37236
+ return;
37237
+ }
37238
+ ;
37239
+ this.departmentRoots.forEach(function (node) {
37240
+ if (!_this.isIncludeChildren) {
37241
+ _this.treeControl.dataNodes.filter(function (x) { return !_this.isSelectedNode(x); })
37242
+ .forEach(function (x) { return _this.onCheckNode(x); });
37243
+ return;
37244
+ }
37245
+ if (!_this.isSelectedNode(node)) {
37246
+ _this.onCheckNode(node);
37247
+ return;
37248
+ }
37249
+ var nestedNode = _this.convertToNestedNode(node);
37250
+ if (nestedNode.isGroup && _this.isCheckAll(node) || !node.expandable)
37251
+ return;
37252
+ _this.getListChildrenOfNode(node)
37253
+ .filter(function (item) { return !_this.isSelectedNode(item); })
37254
+ .forEach(function (item) { return !_this.isSelectedNode(item) && _this.onCheckNode(item); });
37255
+ if (!nestedNode.isGroup) {
37256
+ _this.checkListSelection.deselect(node);
37257
+ _this.onCheckNode(node);
37258
+ return;
37259
+ }
37260
+ });
37261
+ };
37262
+ SelectProcessDataTreeComponent.prototype.onCheckNode = function (node, fireEventCheckNode) {
37263
+ var _this = this;
37264
+ if (fireEventCheckNode === void 0) { fireEventCheckNode = true; }
37265
+ if (!node)
37266
+ return;
37267
+ if (fireEventCheckNode)
37268
+ this.onCheckNodeEvent.emit(node);
37269
+ this.checkListSelection.toggle(node);
37270
+ if (this.config.isSelectOne) {
37271
+ this._handleSelectOne(node.id);
37272
+ return;
37273
+ }
37274
+ if (this.config.lazy && node.expandable && !node.markedGetChildren && fireEventCheckNode) {
37275
+ if (!this._handlingLazyObject.checkNode) {
37276
+ this.handleCheckNode(node);
37277
+ return;
37278
+ }
37279
+ node.isLoading = this.isIncludeChildren;
37280
+ var children = this.getListChildrenOfNode(node).filter(function (x) { return x.expandable && !x.markedGetChildren; });
37281
+ children.forEach(function (x) { return x.isLoading = _this.isIncludeChildren; });
37282
+ return;
37283
+ }
37284
+ this.handleCheckNode(node);
37285
+ };
37286
+ SelectProcessDataTreeComponent.prototype._handleSelectOne = function (nodeId) {
37287
+ var nodeTree = this.treeControl.dataNodes.find(function (node) { return node.id === nodeId; });
37288
+ var reSelectSelection = function () {
37289
+ var params = [];
37290
+ for (var _i = 0; _i < arguments.length; _i++) {
37291
+ params[_i] = arguments[_i];
37292
+ }
37293
+ params.forEach(function (selection) {
37294
+ var selected = selection.selected.filter(function (x) { return x.id !== nodeId; });
37295
+ selection.deselect.apply(selection, __spreadArray([], __read(selected)));
37296
+ });
37297
+ };
37298
+ if (!nodeTree) {
37299
+ var item = this.checkListSelectionSearch.selected.find(function (x) { return x.id === nodeId; });
37300
+ if (!item)
37301
+ return;
37302
+ this.resultSelected = [{
37303
+ id: item.id,
37304
+ parentId: item.parentId,
37305
+ name: item.name,
37306
+ externalName: item.externalName,
37307
+ children: []
37308
+ }];
37309
+ this._selectedList = __spreadArray([], __read(this.resultSelected));
37310
+ this.onValueChangeEvent.emit(this.resultSelected);
37311
+ reSelectSelection(this.checkListSelection, this.checkListSelectionSearch);
37312
+ this.cdRef.detectChanges();
37313
+ return;
37314
+ }
37315
+ if (this.isSelectedNode(nodeTree)) {
37316
+ var nestedNode = this.convertToNestedNode(this.checkListSelection.selected[0]);
37317
+ this._selectedList = __spreadArray([], __read(this.resultSelected));
37318
+ reSelectSelection(this.checkListSelection, this.checkListSelectionSearch);
37319
+ return;
37320
+ }
37321
+ this.resultSelected = [];
37322
+ this._selectedList = [];
37323
+ };
37324
+ SelectProcessDataTreeComponent.prototype.onExpandAllParent = function (node) {
37325
+ var _this = this;
37326
+ var parents = this.getAllParentNode(node);
37327
+ if (parents === null || parents === void 0 ? void 0 : parents.length) {
37328
+ parents.forEach(function (parent) {
37329
+ if (!_this.treeControl.isExpanded(parent))
37330
+ _this.onExpandNode(parent);
37331
+ });
37332
+ }
37333
+ };
37334
+ SelectProcessDataTreeComponent.prototype.onRemoveNode = function (nodeId) {
37335
+ var flatNode = this.getNodeById(nodeId);
37336
+ if (!flatNode) {
37337
+ var item = this._selectedList.find(function (x) { return x.id === nodeId; });
37338
+ if (!item)
37339
+ return;
37340
+ this._updateSelectedList('remove', item, this._selectedList, this.resultSelected);
37341
+ this.cdRef.detectChanges();
37342
+ return;
37343
+ }
37344
+ this.checkListSelection.deselect(flatNode);
37345
+ this.handleCheckNode(flatNode);
37346
+ };
37347
+ SelectProcessDataTreeComponent.prototype.onSelectNode = function () {
37348
+ var _b;
37349
+ var nodeIds = [];
37350
+ for (var _i = 0; _i < arguments.length; _i++) {
37351
+ nodeIds[_i] = arguments[_i];
37352
+ }
37353
+ var nodes = this.treeControl.dataNodes.filter(function (x) { return nodeIds.includes(x.id); });
37354
+ if (!nodes.length)
37355
+ return;
37356
+ (_b = this.checkListSelection).select.apply(_b, __spreadArray([], __read(nodes)));
37357
+ };
37358
+ SelectProcessDataTreeComponent.prototype.onDeselectNode = function () {
37359
+ var _b;
37360
+ var nodeIds = [];
37361
+ for (var _i = 0; _i < arguments.length; _i++) {
37362
+ nodeIds[_i] = arguments[_i];
37363
+ }
37364
+ var nodes = this.treeControl.dataNodes.filter(function (x) { return nodeIds.includes(x.id); });
37365
+ if (!nodes.length)
37366
+ return;
37367
+ (_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(nodes)));
37368
+ };
37369
+ /**
37370
+ * Toggles a value between selected and deselected.
37371
+ * @param nodeId :id of node
37372
+ */
37373
+ SelectProcessDataTreeComponent.prototype.onToggleNode = function (nodeId) {
37374
+ var node = this.getNodeById(nodeId);
37375
+ if (!node)
37376
+ return;
37377
+ this.checkListSelection.toggle(node);
37378
+ };
37379
+ SelectProcessDataTreeComponent.prototype.isIndeterminate = function (node) {
37380
+ var _this = this;
37381
+ var childSelected = this.getListChildrenOfNode(node).filter(function (item) { return _this.isSelectedNode(item); });
37382
+ return (!!childSelected.length && !this.isSelectedNode(node));
37383
+ };
37384
+ SelectProcessDataTreeComponent.prototype.isCheckAll = function (node) {
37385
+ var _this = this;
37386
+ var listCheck = __spreadArray(__spreadArray([], __read(this.getListChildrenOfNode(node))), [node]);
37387
+ return listCheck.every(function (item) { return _this.isSelectedNode(item); });
37388
+ };
37389
+ /**
37390
+ * This function handle check node of tree
37391
+ * @param node node of tree
37392
+ * @param callback do something before handle check node
37393
+ * @returns
37394
+ */
37395
+ SelectProcessDataTreeComponent.prototype.onBeforeCheckNode = function (node, callback) {
37396
+ return __awaiter(this, void 0, void 0, function () {
37397
+ return __generator(this, function (_b) {
37398
+ switch (_b.label) {
37399
+ case 0:
37400
+ this._handlingLazyObject.checkNode = true;
37401
+ if (!!!callback) return [3 /*break*/, 2];
37402
+ return [4 /*yield*/, callback(node)];
37403
+ case 1:
37404
+ _b.sent();
37405
+ _b.label = 2;
37406
+ case 2:
37407
+ this.handleCheckNode(node);
37408
+ this._handlingLazyObject.checkNode = false;
37409
+ return [2 /*return*/];
37410
+ }
37411
+ });
37412
+ });
37413
+ };
37414
+ SelectProcessDataTreeComponent.prototype.handleCheckNode = function (node) {
37415
+ var _b, _c, _d;
37416
+ var _this = this;
37417
+ var isSelected = this.isSelectedNode(node);
37418
+ var childSelected = this.getChildrenSelected(node);
37419
+ var nestedNode = this.convertToNestedNode(node);
37420
+ if (isSelected) {
37421
+ // Check existed group
37422
+ var existedGroup_1 = this.getAllParentNode(node).find(function (x) { return _this.convertToNestedNode(x).isGroup; });
37423
+ if (!this.isIncludeChildren) {
37424
+ nestedNode.groupId = existedGroup_1 === null || existedGroup_1 === void 0 ? void 0 : existedGroup_1.id;
37425
+ return;
37426
+ }
37427
+ var children = this.getListChildrenOfNode(node);
37428
+ nestedNode.isGroup = !existedGroup_1 && !!children.length;
37429
+ if (!children.length)
37430
+ return;
37431
+ children.forEach(function (x) {
37432
+ var _node = _this.convertToNestedNode(x);
37433
+ _node.groupId = existedGroup_1 ? existedGroup_1.id : node.id;
37434
+ _node.isGroup = false;
37435
+ });
37436
+ this.updateDataTree(this.currentTreeData);
37437
+ (_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(childSelected.map(function (x) { return _this.resetNode(x); }))));
37438
+ (_c = this.checkListSelection).select.apply(_c, __spreadArray([], __read(children.map(function (x) { return _this.resetNode(x); }))));
37439
+ return;
37440
+ }
37441
+ var _selectedIndex = this._selectedList.findIndex(function (x) { return x.id === node.id; });
37442
+ _selectedIndex > -1 && this._selectedList.splice(_selectedIndex, 1);
37443
+ var deselectNodes = (this.isIncludeChildren || nestedNode.isGroup) ? childSelected : [node];
37444
+ (_d = this.checkListSelection).deselect.apply(_d, __spreadArray([], __read(deselectNodes)));
37445
+ nestedNode.isGroup = false;
37446
+ this.updateDataTree(this.currentTreeData);
37447
+ return;
37448
+ };
37449
+ SelectProcessDataTreeComponent.prototype.resetNode = function (node) {
37450
+ node.isGroup = false;
37451
+ return node;
37452
+ };
37453
+ SelectProcessDataTreeComponent.prototype.isSelectedNode = function (node) {
37454
+ return node && this.checkListSelection.isSelected(node);
37455
+ };
37456
+ SelectProcessDataTreeComponent.prototype.getChildrenSelected = function (node) {
37457
+ var _this = this;
37458
+ return this.getListChildrenOfNode(node).filter(function (x) { return _this.isSelectedNode(x); });
37459
+ };
37460
+ /**
37461
+ * Gets a list of the data node's subtree of descendent data nodes.
37462
+ * @param node
37463
+ * @returns
37464
+ */
37465
+ SelectProcessDataTreeComponent.prototype.getListChildrenOfNode = function (node) {
37466
+ var flatNode = this.getNodeById(node.id);
37467
+ if (!flatNode)
37468
+ return [];
37469
+ return this.treeControl.getDescendants(flatNode);
37470
+ };
37471
+ SelectProcessDataTreeComponent.prototype._mapToNestedListNode = function (flatNodeList) {
37472
+ var _this = this;
37473
+ return flatNodeList.map(function (item) { return _this.convertToNestedNode(item); });
37474
+ };
37475
+ SelectProcessDataTreeComponent.prototype.convertToNestedNode = function (node) {
37476
+ return this.flatTreeNodeMap.get(node) || {};
37477
+ };
37478
+ SelectProcessDataTreeComponent.prototype.convertToFlatNode = function (node) {
37479
+ return this.nestedTreeNodeMap.get(node);
37480
+ };
37481
+ SelectProcessDataTreeComponent.prototype.getAllParentNode = function (node) {
37482
+ var listParent = [];
37483
+ var parent = this.getParentNode(node);
37484
+ while (parent) {
37485
+ listParent.push(parent);
37486
+ parent = this.getParentNode(parent);
37487
+ }
37488
+ return listParent;
37489
+ };
37490
+ SelectProcessDataTreeComponent.prototype.getParentNode = function (node) {
37491
+ var currentLevel = this.getLevel(node);
37492
+ if (currentLevel < 1)
37493
+ return;
37494
+ var index = this.treeControl.dataNodes.indexOf(node) - 1;
37495
+ for (var i = index; i >= 0; i--) {
37496
+ var currentNode = this.treeControl.dataNodes[i];
37497
+ if (this.getLevel(currentNode) < currentLevel) {
37498
+ return currentNode;
37499
+ }
37500
+ }
37501
+ return;
37502
+ };
37503
+ SelectProcessDataTreeComponent.prototype.getItemIconType = function (item) {
37504
+ if (!!item.itemMatIcon)
37505
+ return this.itemIconType.name;
37506
+ if (!!item.itemIconSvg)
37507
+ return this.itemIconType.svg;
37508
+ if (!!item.itemIcon)
37509
+ return this.itemIconType.path;
37510
+ return;
37511
+ };
37512
+ SelectProcessDataTreeComponent.prototype.onScrollIntoNode = function (nodeId) {
37513
+ var flatNode = this.getNodeById(nodeId);
37514
+ if (!nodeId)
37515
+ return;
37516
+ this.onExpandNode(flatNode);
37517
+ this.onExpandAllParent(flatNode);
37518
+ var index = this.treeControl.dataNodes.findIndex(function (x) { return x.id === flatNode.id; });
37519
+ if (!this.cdkVirtualScrollViewport)
37520
+ return;
37521
+ this.cdkVirtualScrollViewport.scrollToIndex(index, 'smooth');
37522
+ this.getActiveNodeEvent$.next(nodeId);
37523
+ };
37524
+ SelectProcessDataTreeComponent.prototype.onSearch = function () {
37525
+ var _a;
37526
+ if (!this.formSearchControl.value || ((_a = this.formSearchControl.value) === null || _a === void 0 ? void 0 : _a.trim()) === '')
37527
+ return;
37528
+ this.getLoading$.next(true);
37529
+ this.setIndexView(1);
37530
+ this.onSearchEvent.emit(this.formSearchControl.value);
37531
+ if (!this.paginatorSearch)
37532
+ return;
37533
+ this.paginatorSearch.changePage(0);
37534
+ this.paginatorSearch.renderDisplayNumberOfpages();
37535
+ };
37536
+ SelectProcessDataTreeComponent.prototype.setResultSearch = function (data) {
37537
+ this.searchDepartment$.next(data);
37538
+ };
37539
+ SelectProcessDataTreeComponent.prototype.onClickResultItem = function (item) {
37540
+ var node = this.getNodeById(item.id);
37541
+ if (node) {
37542
+ this.scrollToNode(node.id);
37543
+ }
37544
+ };
37545
+ SelectProcessDataTreeComponent.prototype.onBreadCrumbItemClick = function (item) {
37546
+ var _this = this;
37547
+ var node = this.getNodeById(item.id);
37548
+ if (node) {
37549
+ this.setIndexView(0);
37550
+ rxjs.of(node.id).pipe(operators.delay(700), operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
37551
+ _this.onScrollIntoNode(res);
37552
+ });
37553
+ }
37554
+ };
37555
+ SelectProcessDataTreeComponent.prototype.onCheckItemSearchResult = function (item) {
37556
+ var _b;
37557
+ this.checkListSelectionSearch.toggle(item);
37558
+ if (this.config.isSelectOne) {
37559
+ (_b = this.checkListSelectionSearch).deselect.apply(_b, __spreadArray([], __read(this.checkListSelectionSearch.selected.filter(function (x) { return x.id != item.id; }))));
37560
+ }
37561
+ this.onCheckItemSearchEvent.emit({
37562
+ state: this.checkListSelectionSearch.isSelected(item),
37563
+ item: item
37564
+ });
37565
+ if (this.config.lazy) {
37566
+ if (!this._handlingLazyObject.checkItemSearch) {
37567
+ this._handleCheckResutlSearch(item);
37568
+ return;
37569
+ }
37570
+ return;
37571
+ }
37572
+ this._handleCheckResutlSearch(item);
37573
+ this.onValueChangeEvent.emit(this.resultSelected);
37574
+ };
37575
+ SelectProcessDataTreeComponent.prototype.onBeforeCheckItemSearch = function (item, callback) {
37576
+ return __awaiter(this, void 0, void 0, function () {
37577
+ var isSelect;
37578
+ return __generator(this, function (_b) {
37579
+ switch (_b.label) {
37580
+ case 0:
37581
+ item.isLoading = true;
37582
+ this._handlingLazyObject.checkItemSearch = true;
37583
+ isSelect = this.isSelectItemSearch(item.id);
37584
+ if (!!!callback) return [3 /*break*/, 2];
37585
+ return [4 /*yield*/, callback(item)];
37586
+ case 1:
37587
+ _b.sent();
37588
+ _b.label = 2;
37589
+ case 2:
37590
+ item.isLoading = false;
37591
+ this._handleCheckResutlSearch(item, isSelect);
37592
+ this.onValueChangeEvent.emit(this.resultSelected);
37593
+ this._handlingLazyObject.checkItemSearch = false;
37594
+ return [2 /*return*/];
37595
+ }
37596
+ });
37597
+ });
37598
+ };
37599
+ SelectProcessDataTreeComponent.prototype.onBeforeCheckAllSearch = function (callback) {
37600
+ return __awaiter(this, void 0, void 0, function () {
37601
+ var i, item;
37602
+ return __generator(this, function (_b) {
37603
+ switch (_b.label) {
37604
+ case 0:
37605
+ this._handlingLazyObject.checkAllSearch = true;
37606
+ if (!!!callback) return [3 /*break*/, 2];
37607
+ return [4 /*yield*/, callback(this.resultSearch)];
37608
+ case 1:
37609
+ _b.sent();
37610
+ _b.label = 2;
37611
+ case 2:
37612
+ this._handlingLazyObject.checkAllSearch = false;
37613
+ if (!this.resultSearch.length)
37614
+ return [2 /*return*/];
37615
+ for (i = 0; i < this.resultSearch.length; i++) {
37616
+ item = this.resultSearch[i];
37617
+ this._handleCheckResutlSearch(item);
37618
+ }
37619
+ return [2 /*return*/];
37620
+ }
37621
+ });
37622
+ });
37623
+ };
37624
+ SelectProcessDataTreeComponent.prototype.canHandleItemSearchResult = function (item) {
37625
+ if (!this.treeControl)
37626
+ return false;
37627
+ return this.treeControl.dataNodes.some(function (node) { return node.id === item.id; }) || this.config.lazy;
37628
+ };
37629
+ SelectProcessDataTreeComponent.prototype._mapToResultSearch = function () {
37630
+ var _this = this;
37631
+ if (!!this.resultSearch.length)
37632
+ this.resultSearch.forEach(function (item) {
37633
+ var _a;
37634
+ var isExistInResultSelected = (_a = _this.resultSelected) === null || _a === void 0 ? void 0 : _a.some(function (x) { var _a; return x.id === item.id || ((_a = x.children) === null || _a === void 0 ? void 0 : _a.some(function (y) { return y.id === item.id; })); });
37635
+ isExistInResultSelected ? _this.checkListSelectionSearch.select(item) : _this.checkListSelectionSearch.deselect(item);
37636
+ });
37637
+ };
37638
+ SelectProcessDataTreeComponent.prototype._handleCheckResutlSearch = function (item, state) {
37639
+ if (state === void 0) { state = this.isSelectItemSearch(item.id); }
37640
+ item.isLoading = false;
37641
+ var currentNode = this.getNodeById(item.id.toString());
37642
+ if (!!currentNode) {
37643
+ if (state) {
37644
+ if (this.checkListSelection.isSelected(currentNode))
37645
+ return;
37646
+ if (this.checkListSelectionSearch.isSelected(item))
37647
+ this.checkListSelection.select(currentNode);
37648
+ }
37649
+ else {
37650
+ this.checkListSelection.deselect(currentNode);
37651
+ }
37652
+ this.config.isSelectOne ? this._handleSelectOne(currentNode.id) : this.handleCheckNode(currentNode);
37653
+ this.cdRef.detectChanges();
37654
+ return;
37655
+ }
37656
+ if (this.config.isSelectOne) {
37657
+ this._handleSelectOne(item.id);
37658
+ return;
37659
+ }
37660
+ this._updateSelectedList(state ? 'add' : 'remove', item, this._selectedList, this.resultSelected);
37661
+ };
37662
+ SelectProcessDataTreeComponent.prototype.isSelectItemSearch = function (id) {
37663
+ return this.checkListSelectionSearch.selected.some(function (x) { return x.id === id; });
37664
+ };
37665
+ SelectProcessDataTreeComponent.prototype._updateSelectedList = function (state, item) {
37666
+ var _this = this;
37667
+ var selectedLists = [];
37668
+ for (var _i = 2; _i < arguments.length; _i++) {
37669
+ selectedLists[_i - 2] = arguments[_i];
37670
+ }
37671
+ if (!item)
37672
+ return;
37673
+ selectedLists.forEach(function (selectedList) {
37674
+ var itemExisted = selectedList.find(function (x) { return x.id === item.id; });
37675
+ switch (state) {
37676
+ case 'add':
37677
+ if (item.groupId) {
37678
+ var group = selectedList.find(function (x) { return x.id === item.groupId; });
37679
+ if (!group && !itemExisted) {
37680
+ selectedList.push(item);
37681
+ }
37682
+ !group.children.some(function (x) { return x.id === item.id; }) && group.children.push(item);
37683
+ return;
37684
+ }
37685
+ !itemExisted && selectedList.push(item);
37686
+ break;
37687
+ case 'remove':
37688
+ if (!itemExisted) {
37689
+ var group = selectedList.find(function (x) { return x.children.some(function (x1) { return x1.id === item.id; }); });
37690
+ if (!group)
37691
+ return;
37692
+ var index = group.children.findIndex(function (x) { return x.id === item.id; });
37693
+ if (index < 0)
37694
+ return;
37695
+ group.children.splice(index, 1);
37696
+ return;
37697
+ }
37698
+ selectedList.splice(selectedList.indexOf(itemExisted), 1);
37699
+ var itemSelectionSearch = _this.checkListSelectionSearch.selected.find(function (x) { return x.id === itemExisted.id; });
37700
+ itemSelectionSearch && _this.checkListSelectionSearch.deselect(itemSelectionSearch);
37701
+ break;
37702
+ default:
37703
+ break;
37704
+ }
37705
+ });
37706
+ };
37707
+ SelectProcessDataTreeComponent.prototype.onSelectAllSearchResult = function (checked) {
37708
+ checked = !checked;
37709
+ if (!this.resultSearch.length)
37710
+ return;
37711
+ if (this.config.handleCheckAllItemSearch) {
37712
+ var _loop_4 = function (i) {
37713
+ var _b;
37714
+ var item = this_2.resultSearch[i];
37715
+ if (checked) {
37716
+ var treeNode = this_2.treeControl.dataNodes.find(function (node) { return node.id === item.id; });
37717
+ var canSelect = (!!treeNode || this_2.config.lazy);
37718
+ if (!canSelect)
37719
+ return "continue";
37720
+ !this_2.checkListSelectionSearch.isSelected(item) && this_2.checkListSelectionSearch.select(item);
37721
+ }
37722
+ else {
37723
+ var _itemSelections = this_2.checkListSelectionSearch.selected.filter(function (x) { return x.id === item.id; });
37724
+ if (_itemSelections.length)
37725
+ (_b = this_2.checkListSelectionSearch).deselect.apply(_b, __spreadArray([], __read(_itemSelections)));
37726
+ }
37727
+ if (!this_2.config.lazy || !this_2._handlingLazyObject.checkAllSearch)
37728
+ this_2._handleCheckResutlSearch(item, checked);
37729
+ };
37730
+ var this_2 = this;
37731
+ for (var i = 0; i < this.resultSearch.length; i++) {
37732
+ _loop_4(i);
37733
+ }
37734
+ }
37735
+ this.onCheckAllItemSearchEvent.emit(checked);
37736
+ this.onValueChangeEvent.emit(this.resultSelected);
37737
+ };
37738
+ SelectProcessDataTreeComponent.prototype.isDisableChecboxAllSearch = function () {
37739
+ return this.resultSearch && this.resultSearch.every(function (x) { return x.disabled; });
37740
+ };
37741
+ SelectProcessDataTreeComponent.prototype.onPagingSearchResult = function (val) {
37742
+ this.getLoading$.next(true);
37743
+ this.onPagingSearchEvent.emit(val);
37744
+ };
37745
+ SelectProcessDataTreeComponent.prototype.scrollToNode = function (nodeId) {
37746
+ this.scrollToNodeEvent$.next(nodeId);
37747
+ };
37748
+ SelectProcessDataTreeComponent.prototype.setIndexView = function (index) {
37749
+ if (index === 1 && this.config.resetToggleIncludeChildWhenChangeView) {
37750
+ this.isIncludeChildren = false;
37751
+ }
37752
+ this.getIndexView$.next(index);
37753
+ };
37754
+ SelectProcessDataTreeComponent.prototype.canActiveNodeExternal = function (node) {
37755
+ var _this = this;
37756
+ var allParent = this.getAllParentNode(node);
37757
+ return !allParent || allParent.every(function (item) { return _this.treeControl.isExpanded(item); });
37758
+ };
37759
+ SelectProcessDataTreeComponent.prototype.getHeightStyleRefNode = function (nodeId) {
37760
+ var nodeEle = this.eleRef.nativeElement.querySelector(".mat-tree-node#mat-node-" + nodeId);
37761
+ return ((nodeEle === null || nodeEle === void 0 ? void 0 : nodeEle.clientHeight) || 0) + "px";
37762
+ };
37763
+ SelectProcessDataTreeComponent.prototype.getSelectedNodeStorage = function () {
37764
+ return JSON.parse(localStorage.getItem('selectedNode'));
37765
+ };
37766
+ SelectProcessDataTreeComponent.prototype.setSelectedNodeStorage = function (node) {
37767
+ this.isIncludeChildren && localStorage.setItem('selectedNode', JSON.stringify(node));
37768
+ };
37769
+ SelectProcessDataTreeComponent.prototype.setDefaultPaginatorSize = function (options) {
37770
+ this.PAGE_SIZE_OPTION = options;
37771
+ };
37772
+ SelectProcessDataTreeComponent.prototype.trackBy = function (index, item) {
37773
+ return item;
37774
+ };
37775
+ /**
37776
+ * This function use for lazy load children of node
37777
+ * @param node node update. if node is null data auto insert as roots
37778
+ * @param data list children to update node.
37779
+ * @param mode default is update that replace current list children by new list children , if mode = 'insert' will insert new values to list children existed before.
37780
+ */
37781
+ SelectProcessDataTreeComponent.prototype.updateChildOfNode = function (node, data, mode) {
37782
+ var _b;
37783
+ if (data === void 0) { data = []; }
37784
+ if (mode === void 0) { mode = 'update'; }
37785
+ node.isLoading = false;
37786
+ this.checkLoadingOfParent(node);
37787
+ var nestedNode = this.convertToNestedNode(node);
37788
+ var dataNodes = this.treeDepartmentService.convertToTreeData(data).filter(function (x) { return x.parentId === node.id; });
37789
+ if (!nestedNode)
37790
+ return;
37791
+ switch (mode) {
37792
+ case 'insert':
37793
+ (_b = nestedNode.children).push.apply(_b, __spreadArray([], __read(dataNodes)));
37794
+ break;
37795
+ case 'update':
37796
+ nestedNode.children = dataNodes;
37797
+ break;
37798
+ }
37799
+ this.updateDataTree(this.currentTreeData);
37800
+ var _node = this.getNodeById(node.id);
37801
+ var nodes = this.treeControl.getDescendants(_node);
37802
+ for (var i = 0; i < this.resultSelected.length; i++) {
37803
+ var item = this.resultSelected[i];
37804
+ this._reUpdateSelectionNode(item.id);
37805
+ var descendants = this.treeDepartmentService.getDescendantsOfNode(item);
37806
+ if (!descendants.length)
37807
+ continue;
37808
+ for (var j = 0; j < descendants.length; j++) {
37809
+ var child = descendants[j];
37810
+ this._reUpdateSelectionNode(child.id);
37811
+ }
37812
+ }
37813
+ this.selectedListAfterDataNodeChange$.next(__spreadArray([_node], __read(nodes)));
37814
+ };
37815
+ //re-select when update children of node
37816
+ SelectProcessDataTreeComponent.prototype._reUpdateSelectionNode = function (nodeId) {
37817
+ var node = this.getNodeById(nodeId);
37818
+ if (!node || this.checkListSelection.isSelected(node))
37819
+ return;
37820
+ var existInSelection = this.checkListSelection.selected.find(function (x) { return x.id == node.id; });
37821
+ if (existInSelection)
37822
+ this.checkListSelection.deselect(existInSelection);
37823
+ this.checkListSelection.select(node);
37824
+ };
37825
+ SelectProcessDataTreeComponent.prototype.checkLoadingOfParent = function (node) {
37826
+ var allParent = this.getAllParentNode(node);
37827
+ if (!allParent.length)
37828
+ return;
37829
+ for (var i = 0; i < allParent.length; i++) {
37830
+ var parent = allParent[i];
37831
+ var descendants = this.treeControl.getDescendants(parent);
37832
+ parent.isLoading = descendants.some(function (x) { return x.isLoading; });
37833
+ }
37834
+ };
37835
+ SelectProcessDataTreeComponent.prototype.getNodeById = function (id) {
37836
+ return this.treeControl.dataNodes.find(function (node) { return node.id === id; }) || undefined;
37837
+ };
37838
+ SelectProcessDataTreeComponent.prototype.getRootOfNode = function (node) {
37839
+ var allParent = this.getAllParentNode(node);
37840
+ if (!allParent.length)
37841
+ return undefined;
37842
+ return allParent.pop();
37843
+ };
37844
+ SelectProcessDataTreeComponent.prototype.addRootTree = function (data) {
37845
+ if (data === void 0) { data = []; }
37846
+ this.getLoadingMore$.next(false);
37847
+ if (!data.length)
37848
+ return;
37849
+ var treeNodeData = this.treeDepartmentService.convertToTreeData(data);
37850
+ // re-check root was existed in tree
37851
+ for (var i = 0; i < treeNodeData.length; i++) {
37852
+ var item = treeNodeData[i];
37853
+ var node = this.getNodeById(item.id);
37854
+ if (!!node && node.expandable && !node.markedGetChildren) {
37855
+ var nestedNode = this.convertToNestedNode(node);
37856
+ nestedNode.children = item.children;
37857
+ nestedNode.markedGetChildren = true;
37858
+ return;
37859
+ }
37860
+ if (!node)
37861
+ this.currentTreeData.push(item);
37862
+ }
37863
+ this.updateDataTree(this.currentTreeData);
37864
+ this.selectedListAfterDataNodeChange$.next(data);
37865
+ };
37866
+ SelectProcessDataTreeComponent.prototype.getCheckedStatusNode = function (node) {
37867
+ return this.isSelectedNode(node);
37868
+ };
37869
+ SelectProcessDataTreeComponent.prototype.updateNodeInformation = function (node) {
37870
+ var nestedNode = this.convertToNestedNode(node);
37871
+ if (!nestedNode) {
37872
+ return;
37873
+ }
37874
+ nestedNode.childCount = node.childCount;
37875
+ nestedNode.name = node.name;
37876
+ nestedNode.itemIcon = node.itemIcon;
37877
+ nestedNode.itemIconSvg = node.itemIconSvg;
37878
+ nestedNode.selectedChildCount = node.selectedChildCount;
37879
+ nestedNode.markedGetChildCountRecurrsive = node.markedGetChildCountRecurrsive;
37880
+ nestedNode.isIncludeChildWhenChecked = node.isIncludeChildWhenChecked;
37881
+ };
37882
+ SelectProcessDataTreeComponent.prototype.updateSelectedResultData = function (node) {
37883
+ var nodeResult = this.resultSelected.find(function (x) { return x.id === node.id; });
37884
+ if (nodeResult) {
37885
+ nodeResult.childCount = node.childCount;
37886
+ nodeResult.selectedChildCount = node.selectedChildCount;
37887
+ }
37888
+ };
37889
+ SelectProcessDataTreeComponent.prototype.callCheckNodeOutside = function (node) {
37890
+ this.checkListSelection.toggle(node);
37891
+ //this.handleCheckNode(node);
37892
+ };
37893
+ return SelectProcessDataTreeComponent;
37894
+ }());
37895
+ SelectProcessDataTreeComponent.decorators = [
37896
+ { type: i0.Component, args: [{
37897
+ selector: 'qms-select-process-data-tree',
37898
+ template: "<div [ngClass]=\"['qms-select-department-tree-container', (config.customClass || '')]\">\n <div class=\"input-select-department\">\n <form (ngSubmit)=\"!getLoading$.value && onSearch()\" *ngIf=\"config.enableTreeSearch\" class=\"input-field\">\n <mat-form-field class=\"w100\" qms-form qms-search-field>\n <input [formControl]=\"formSearchControl\" type=\"text\" placeholder=\"Search\" matInput />\n <button *ngIf=\"!getLoading$.value\" type=\"submit\" qms-btn-icon color=\"light\" matSuffix>\n <mat-icon>search</mat-icon>\n </button>\n <mat-progress-spinner [@inOutAnimation] matSuffix mode=\"indeterminate\" diameter=\"20\"\n *ngIf=\"getLoading$.value\"></mat-progress-spinner>\n <div *ngIf=\"!!formSearchControl.value && !getLoading$.value\" qms-input-clear matSuffix>\n <button qms-btn-icon color=\"light\" [@inOutAnimation] aria-label=\"Clear\" (click)=\"formSearchControl.reset()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </mat-form-field>\n </form>\n <div [@inOutAnimation] *ngIf=\"(getIndexView$ | async) === 1 && (textSearchSubject$ | async)\"\n class=\"sub-text ms-1 fw500\">\n {{LANG.RESULT_SEARCH_FOR}}<i><b>\"{{textSearchSubject$ | async}}\"</b></i>\n </div>\n <div [class.justify-content-between]=\"config.enableIncludeChild && !config.isSelectOne\"\n class=\"select__toggle-include toggle-include-child my-1 d-flex justify-content-end align-items-center\">\n <mat-slide-toggle *ngIf=\"config.enableIncludeChild && !config.isSelectOne\"\n [disabled]=\"(getIndexView$ | async) === 1 && config.disableToggleIncludeChildWhenChangeView\"\n [(ngModel)]=\"isIncludeChildren\" (ngModelChange)=\"toggleIncludeChildEvent.emit($event)\" color=\"default\"\n qms-group-options>\n <span class=\"text-label\">{{config.selectIncludeLabel || LANG.SELECT_INCLUDE_CHILD}}</span>\n </mat-slide-toggle>\n <button class=\"btn-arrow\" [@inOutAnimation] *ngIf=\"(getIndexView$ | async) === 1 && config.enableTreeSearch\"\n (click)=\"setIndexView(0)\" qms-btn-icon color=\"light\" [qms-tool-tip]=\"LANG.BACK_TO_TREE\" mode=\"dark\"\n position=\"top\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <button class=\"btn-arrow\" [@inOutAnimation]\n *ngIf=\"(getIndexView$ | async) === 0 && config.enableTreeSearch && (textSearchSubject$ | async)\"\n (click)=\"setIndexView(1)\" qms-btn-icon color=\"light\" [qms-tool-tip]=\"LANG.GOTO_SEACH_RESULT\" mode=\"dark\"\n position=\"top\">\n <mat-icon>arrow_forward</mat-icon>\n </button>\n </div>\n </div>\n <div [@inOutAnimation]\n *ngIf=\"(getIndexView$ | async) === 0 && config.modeView === MODE_VIEW_ENUM.ExternalView && !!config.headerName\"\n class=\"header-view-tree\">\n <div class=\"header-view header-title\">\n {{config.headerName.treeName}}\n </div>\n <div class=\"header-view header-title\">\n {{config.headerName.externalName}}\n </div>\n </div>\n <mat-divider class=\"mx-auto\"></mat-divider>\n <div [@animateSlideView]=\"(getIndexView$ | async)\" [ngStyle]=\"{\n minHeight: height\n }\" class=\"tree-department-wrapper\">\n <div *ngIf=\"(getIndexView$ | async) === 0\" class=\"tree-view w100 h100\">\n <div class=\"tree-view-main h100\">\n <div *ngIf=\"!config.isSelectOne && !!treeControl.dataNodes && config.activeSelectAllNode\"\n class=\"checkbox-all-tree\" [class.sticky-position]=\"config.modeView === MODE_VIEW_ENUM.ExternalView\">\n <!-- Checkbox all root node -->\n <mat-checkbox [@inOutAnimation] (click)=\"onCheckAllRootTreeNode()\"\n [indeterminate]=\"isIndeterminateCheckboxAllTree\" [checked]=\"isAllDepartmentSelected\" qms-group-options\n color=\"default\" label=\"none\" class=\"checkbox-all\">\n <span class=\"text-label \">{{LANG.CHOOSE_ALL}}</span>\n <span>(<b>{{treeControl.dataNodes.length}}</b>)</span>\n </mat-checkbox>\n <mat-divider class=\"mx-auto\"></mat-divider>\n </div>\n <cdk-virtual-scroll-viewport *ngIf=\"dataSource.data\" [ngClass]=\"{\n 'has-checkbox-all': !config.isSelectOne && config.modeView === MODE_VIEW_ENUM.Basic,\n 'select-department-tree': true\n }\" [itemSize]=\"ITEM_SIZE\" [ngStyle]=\"{height: height}\">\n <ng-container *cdkVirtualFor=\"let node of dataSource; trackBy: trackBy\">\n <div class=\"qms-tree-node mt-1\" [style.padding-left]=\"node.level * (config.isMobile ? 12 :24) + 'px'\"\n [attr.data-id]=\"node.id\" [id]=\"'mat-node-'+node.id\" [@triggerColor]=\"activeNode == node.id\" [ngClass]=\"{\n 'mat-tree-node-disabled-all': node.disabled,\n 'w-100': config.isSelectOne,\n 'selected-theme': this.checkListSelection.isSelected(node) && config.isSelectOne,\n 'expand-node': treeControl.isExpandable(node) && treeControl.isExpanded(node),\n 'active-external-view': config.modeView === MODE_VIEW_ENUM.ExternalView,\n 'node-loading': node.isLoading\n }\">\n <div class=\"node-expand-area\">\n <button class=\"btn-toggle\" qms-btn-icon color=\"light\" (click)=\"onExpandNode(node)\"\n *ngIf=\"treeControl.isExpandable(node) && !node.isLoading\">\n <mat-icon>\n {{ treeControl.isExpanded(node) ? \"expand_more\" : \"chevron_right\" }}\n </mat-icon>\n </button>\n <ng-container *ngIf=\"node.isLoading; then loadingSpinner\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"config.isSelectOne ? nodeWithoutCheckboxTemplate : showCheckboxTemplate\"\n [ngTemplateOutletContext]=\"{ node: node }\"></ng-container>\n <div *ngIf=\"config.modeView === MODE_VIEW_ENUM.ExternalView\" class=\"external-view-node\">\n <span class=\"node-external\" qms-elipsify position=\"top\" mode=\"dark\">\n {{node.externalName || ''}}\n </span>\n </div>\n </div>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n <ng-container [@inOutAnimation] *ngIf=\"config.spinnerWhenGetMore && getLoadingMore$| async ;then maskOverlay\">\n </ng-container>\n </div>\n </div>\n <div *ngIf=\"(getIndexView$ | async) === 1\" [ngStyle]=\"{\n height: height\n }\" class=\"qms-view-search-result\">\n <div *ngIf=\"config.modeView === MODE_VIEW_ENUM.ExternalView\"\n class=\"qms-view-search-result__header d-flex align-items-center justify-content-between\">\n <div class=\"header-title\">\n <span qms-elipsify mode=\"dark\" position=\"top\">\n {{config.headerName.resultSearchName}}\n </span>\n </div>\n <div class=\"header-title\">\n <span qms-elipsify mode=\"dark\" position=\"top\">\n {{config.headerName.externalName}}\n </span>\n </div>\n </div>\n <ng-container *ngIf=\"getLoading$.value; then loading\"></ng-container>\n <div class=\"qms-view-search-result__wrapper\"\n [class.active-external]=\"config.modeView === MODE_VIEW_ENUM.ExternalView\"\n *ngIf=\"!!resultSearch.length && !getLoading$.value\">\n <div class=\"\">\n <mat-checkbox [@inOutAnimation]\n [disabled]=\"!resultSearch.length || config.isSelectOne || isDisableChecboxAllSearch()\" #checkAllSearch\n [indeterminate]=\"indeterminateSearchResult\" [checked]=\"isSelectAllResultSearch\" qms-group-options\n color=\"default\" label=\"none\" class=\"checkbox-all\"\n (click)=\"!config.isSelectOne && onSelectAllSearchResult(checkAllSearch.checked)\">\n <span class=\"text-label header-title\">{{LANG.CHOOSE_ALL}}</span>\n <span>(<b>{{resultSearch.length}}</b>)</span>\n </mat-checkbox>\n </div>\n <div [@inOutAnimation] [@listAnimation]\n [class.active-paging]=\"searchDepartment$.value.length > 10 && config.enablePagingSearch\" class=\"result\">\n <div [qms-tool-tip]=\"!canHandleItemSearchResult(item) ? LANG.ITEM_NOT_MATCH_TO_TREE : ''\" mode=\"dark\"\n position=\"top\" *ngFor=\"let item of resultSearch\"\n (click)=\"$event.stopImmediatePropagation(); !item.disabled && onCheckItemSearchResult(item)\"\n [class.active]=\"checkListSelectionSearch.isSelected(item)\" class=\"result-item user-select-none\" matRipple>\n <mat-checkbox [@inOutAnimation] *ngIf=\"!item.isLoading\" [disabled]=\"item.disabled\"\n (click)=\"$event.stopImmediatePropagation(); !item.disabled && onCheckItemSearchResult(item)\"\n [checked]=\"checkListSelectionSearch.isSelected(item)\" qms-group-options color=\"default\" label=\"none\">\n </mat-checkbox>\n <div *ngIf=\"item.isLoading\" [@inOutAnimation] class=\"position-relative\">\n <ng-container *ngIf=\"item.isLoading; then loadingSpinner\"></ng-container>\n </div>\n <div class=\"result-item__content\">\n <div class=\"item-result-content-wraper\">\n <div class=\"text-gray fw-bold fs-base mb0\">{{item.name}}</div>\n <qms-breadcrumb *ngIf=\"item.location?.length > 1\" [type]=\"config.isMobile ? 'mobile': ''\"\n [numDisplayItem]=\"6\" (onItemClick)=\"$event.stopImmediatePropagation()\" class=\"breadcrumb-container\"\n [nodes]=\"item.location\">\n </qms-breadcrumb>\n <div *ngIf=\"item.location?.length === 1\" class=\"d-flex align-items-center\">\n <span qms-elipsify mode=\"dark\" position=\"top\"\n class=\"item-breadcrumb-disable d-block\">{{item.location[0].name}}</span>\n </div>\n </div>\n <div *ngIf=\"config.modeView === MODE_VIEW_ENUM.ExternalView\" class=\"external-name\">\n <span qms-elipsify mode=\"dark\" position=\"top\" class=\"text-gray fs-base mb0\">{{item.externalName}}\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div [@inOutAnimation] *ngIf=\"!resultSearch.length && !getLoading$.value\" class=\"result no-result\">\n <ng-container *ngTemplateOutlet=\"noResult\"></ng-container>\n </div>\n <mat-divider *ngIf=\"searchDepartment$.value.length > 10 && config.enablePagingSearch\"\n class=\"mx-auto\"></mat-divider>\n <qms-paginator #paginatorSearch *ngIf=\"searchDepartment$.value.length > 10 && config.enablePagingSearch \"\n [length]=\"searchDepartment$.value.length\" [numHidden]=\"0\" [pageSize]=\"CURRENT_PAGESIZE\"\n [pageSizeOptions]=\"PAGE_SIZE_OPTION\" (page)='onPagingSearchResult($event)'\n [size]='config.isMobile ? PAGINATION_SIZE.small : PAGINATION_SIZE.medium'>\n </qms-paginator>\n </div>\n </div>\n\n <!-- Template for Checkbox -->\n <ng-template #showCheckboxTemplate let-node=\"node\">\n <mat-checkbox [id]=\"'node-'+node.id\" qms-group-options color=\"default\" label=\"none\" class=\"flex-direction-row\"\n [disabled]=\"node.isLoading\" [checked]=\"checkListSelection.isSelected(node)\"\n (click)=\"!node.isLoading && onCheckNode(node)\" [attr.disabled]=\"node.disabled || node.isLoading\">\n <img [title]=\"node.itemIconSvg\" *ngIf=\"node.itemIconSvg\" class=\"material-icons type-icon\"\n [src]=\"node.itemIconSvg\" />\n <span *ngIf=\"node.itemIcon\" [class]=\"node.itemIcon\" [qmsTransformIcon]=\"node.itemIcon\"\n class=\"material-icons-outlined type-icon\"></span>\n <span *ngIf=\"node.itemMatIcon\" class=\"material-icons-outlined type-icon\">{{\n node.itemMatIcon }}\n </span>\n <span class=\"text-name cursor-pointer ml5 123\" [ngClass]=\"{ disabled: node.disabled }\">{{ node.name}}\n </span>\n </mat-checkbox>\n </ng-template>\n\n <!-- Template node without checkbox -->\n <ng-template #nodeWithoutCheckboxTemplate let-node=\"node\">\n <div [id]=\"'node-'+node.id\" (click)=\"onCheckNode(node)\" class=\"node-without-checkbox\">\n <div class=\"node-info\">\n <span *ngIf=\"node.itemIcon\" [class]=\"node.itemIcon\" [qmsTransformIcon]=\"node.itemIcon\"\n class=\"material-icons-outlined type-icon\"></span>\n <span *ngIf=\"node.itemMatIcon\" class=\"material-icons-outlined type-icon\">{{\n node.itemMatIcon }}\n </span>\n <span class=\"text-name cursor-pointer pl-10 123\" [ngClass]=\"{ disabled: node.disabled }\">{{ node.name }}</span>\n </div>\n <div class=\"node-state\">\n <mat-icon *ngIf=\"checkListSelection.isSelected(node)\">check</mat-icon>\n </div>\n </div>\n </ng-template>\n</div>\n\n<ng-template #noResult>\n <svg width=\"89\" height=\"130\" viewBox=\"0 0 89 88\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.5\" width=\"88\" height=\"88\" rx=\"44\" fill=\"white\" />\n <rect x=\"0.5\" width=\"88\" height=\"88\" rx=\"44\" fill=\"#0163B2\" fill-opacity=\"0.12\" />\n <path\n d=\"M44.5 56.6936L58.096 64.8996L54.488 49.4336L66.5 39.0276L50.682 37.6856L44.5 23.0996L38.318 37.6856L22.5 39.0276L34.512 49.4336L30.904 64.8996L44.5 56.6936Z\"\n fill=\"#0163B3\" />\n <text x=\"10\" y=\"105\" fill=\"#0163B2\">{{LANG.NO_RESULT}}</text>\n </svg>\n</ng-template>\n\n<!-- Template loading -->\n<ng-template #loading>\n <div [ngStyle]=\"{\n 'height': searchDepartment$.value.length ? (config.modeView === MODE_VIEW_ENUM.ExternalView ? 'calc(100% - 90px)' : 'calc(100% - 50px)' ) : height\n }\" class=\"qms-loading-container\">\n <div class=\"qms-loader\" *ngFor=\"let item of arrSkeleton\">\n <div class=\"qms-loader__wrapper\">\n <div class=\"row-loader\">\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- Template mask overlay -->\n<ng-template #maskOverlay>\n <div class=\"mask-overlay\">\n <mat-spinner [diameter]=\"50\" [strokeWidth]=\"5\"></mat-spinner>\n </div>\n</ng-template>\n\n<!-- Loading spinner -->\n<ng-template #loadingSpinner>\n <div class=\"qms-spinner center\">\n <mat-spinner [diameter]=\"20\" [strokeWidth]=\"2\"></mat-spinner>\n </div>\n</ng-template>",
37899
+ animations: [
37900
+ AnimationTreeDepartment
37901
+ ],
37902
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
37903
+ styles: ["@charset \"UTF-8\";@font-face{font-family:icomoon;src:url(../assets/fonts/icomoon.eot?aghldx);src:url(../assets/fonts/icomoon.eot?aghldx#iefix) format(\"embedded-opentype\"),url(../assets/fonts/icomoon.ttf?aghldx) format(\"truetype\"),url(../assets/fonts/icomoon.woff?aghldx) format(\"woff\"),url(../assets/fonts/icomoon.svg?aghldx#icomoon) format(\"svg\");font-weight:400;font-style:normal;font-display:block}[class*=\" icon-\"],[class^=icon-]{font-family:icomoon!important;speak:never;font-style:normal;font-weight:400;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-acutely-toxic .path1:before{content:\"\uE91B\";color:#e32730}.icon-acutely-toxic .path2:before{content:\"\uE922\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path3:before{content:\"\uE923\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path4:before{content:\"\uE924\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path5:before{content:\"\uE925\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path6:before{content:\"\uE926\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path7:before{content:\"\uE927\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path8:before{content:\"\uE928\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path9:before{content:\"\uE929\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path10:before{content:\"\uE92A\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path11:before{content:\"\uE92B\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path12:before{content:\"\uE92C\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path13:before{content:\"\uE92D\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path14:before{content:\"\uE92E\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path15:before{content:\"\uE92F\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path16:before{content:\"\uE930\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path17:before{content:\"\uE931\";margin-left:-1em;color:#323232}.icon-add-column:before{content:\"\uE932\"}.icon-add-tooltip:before{content:\"\uE933\"}.icon-admin:before{content:\"\uE934\"}.icon-annual-cycle:before{content:\"\uE935\"}.icon-assignment-repete:before{content:\"\uE936\"}.icon-barrier-add:before{content:\"\uE937\"}.icon-barrier-edit:before{content:\"\uE938\"}.icon-barrier-view:before{content:\"\uE939\"}.icon-button-group:before{content:\"\uE93A\"}.icon-chemical-manager:before{content:\"\uE93B\"}.icon-chronic-health-hazard .path1:before{content:\"\uE93C\";color:#e32730}.icon-chronic-health-hazard .path2:before{content:\"\uE93D\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path3:before{content:\"\uE93E\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path4:before{content:\"\uE93F\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path5:before{content:\"\uE940\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path6:before{content:\"\uE941\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path7:before{content:\"\uE942\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path8:before{content:\"\uE943\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path9:before{content:\"\uE944\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path10:before{content:\"\uE945\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path11:before{content:\"\uE946\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path12:before{content:\"\uE947\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path13:before{content:\"\uE948\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path14:before{content:\"\uE949\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path15:before{content:\"\uE94A\";margin-left:-1em;color:#323232}.icon-contingency:before{content:\"\uE94B\"}.icon-corrosive .path1:before{content:\"\uE94C\";color:#323232}.icon-corrosive .path2:before{content:\"\uE94D\";margin-left:-1em;color:#323232}.icon-corrosive .path3:before{content:\"\uE94E\";margin-left:-1em;color:#323232}.icon-corrosive .path4:before{content:\"\uE94F\";margin-left:-1em;color:#323232}.icon-corrosive .path5:before{content:\"\uE950\";margin-left:-1em;color:#323232}.icon-corrosive .path6:before{content:\"\uE951\";margin-left:-1em;color:#323232}.icon-corrosive .path7:before{content:\"\uE952\";margin-left:-1em;color:#323232}.icon-corrosive .path8:before{content:\"\uE953\";margin-left:-1em;color:#323232}.icon-corrosive .path9:before{content:\"\uE954\";margin-left:-1em;color:#323232}.icon-corrosive .path10:before{content:\"\uE955\";margin-left:-1em;color:#323232}.icon-corrosive .path11:before{content:\"\uE956\";margin-left:-1em;color:#323232}.icon-corrosive .path12:before{content:\"\uE957\";margin-left:-1em;color:#323232}.icon-corrosive .path13:before{content:\"\uE958\";margin-left:-1em;color:#323232}.icon-corrosive .path14:before{content:\"\uE959\";margin-left:-1em;color:#323232}.icon-corrosive .path15:before{content:\"\uE95A\";margin-left:-1em;color:#323232}.icon-corrosive .path16:before{content:\"\uE95B\";margin-left:-1em;color:#323232}.icon-corrosive .path17:before{content:\"\uE95C\";margin-left:-1em;color:#323232}.icon-corrosive .path18:before{content:\"\uE95D\";margin-left:-1em;color:#323232}.icon-corrosive .path19:before{content:\"\uE95E\";margin-left:-1em;color:#323232}.icon-corrosive .path20:before{content:\"\uE95F\";margin-left:-1em;color:#323232}.icon-corrosive .path21:before{content:\"\uE960\";margin-left:-1em;color:#e32730}.icon-dashboard:before{content:\"\uE961\"}.icon-database-sds:before{content:\"\uE962\"}.icon-description-add:before{content:\"\uE963\"}.icon-description-edit:before{content:\"\uE964\"}.icon-description-view:before{content:\"\uE965\";color:#666}.icon-document-read .path1:before{content:\"\uE966\";color:#000;opacity:.6}.icon-document-read .path2:before{content:\"\uE967\";margin-left:-1em;color:#fff}.icon-document-read .path3:before{content:\"\uE968\";margin-left:-1em;color:#000;opacity:.6}.icon-draft:before{content:\"\uE969\"}.icon-expired-off:before{content:\"\uE96A\"}.icon-expired-on:before{content:\"\uE96B\"}.icon-explosive .path1:before{content:\"\uE96C\";color:#e32730}.icon-explosive .path2:before{content:\"\uE96D\";margin-left:-1em;color:#323232}.icon-explosive .path3:before{content:\"\uE96E\";margin-left:-1em;color:#323232}.icon-explosive .path4:before{content:\"\uE96F\";margin-left:-1em;color:#323232}.icon-explosive .path5:before{content:\"\uE970\";margin-left:-1em;color:#323232}.icon-explosive .path6:before{content:\"\uE971\";margin-left:-1em;color:#323232}.icon-explosive .path7:before{content:\"\uE972\";margin-left:-1em;color:#323232}.icon-explosive .path8:before{content:\"\uE973\";margin-left:-1em;color:#323232}.icon-explosive .path9:before{content:\"\uE974\";margin-left:-1em;color:#323232}.icon-explosive .path10:before{content:\"\uE975\";margin-left:-1em;color:#323232}.icon-explosive .path11:before{content:\"\uE976\";margin-left:-1em;color:#323232}.icon-explosive .path12:before{content:\"\uE977\";margin-left:-1em;color:#323232}.icon-explosive .path13:before{content:\"\uE978\";margin-left:-1em;color:#323232}.icon-explosive .path14:before{content:\"\uE979\";margin-left:-1em;color:#323232}.icon-explosive .path15:before{content:\"\uE97A\";margin-left:-1em;color:#323232}.icon-explosive .path16:before{content:\"\uE97B\";margin-left:-1em;color:#323232}.icon-explosive .path17:before{content:\"\uE97C\";margin-left:-1em;color:#323232}.icon-explosive .path18:before{content:\"\uE97D\";margin-left:-1em;color:#323232}.icon-explosive .path19:before{content:\"\uE97E\";margin-left:-1em;color:#323232}.icon-explosive .path20:before{content:\"\uE97F\";margin-left:-1em;color:#323232}.icon-explosive .path21:before{content:\"\uE980\";margin-left:-1em;color:#323232}.icon-explosive .path22:before{content:\"\uE981\";margin-left:-1em;color:#323232}.icon-explosive .path23:before{content:\"\uE982\";margin-left:-1em;color:#323232}.icon-explosive .path24:before{content:\"\uE983\";margin-left:-1em;color:#323232}.icon-explosive .path25:before{content:\"\uE984\";margin-left:-1em;color:#323232}.icon-explosive .path26:before{content:\"\uE985\";margin-left:-1em;color:#323232}.icon-explosive .path27:before{content:\"\uE986\";margin-left:-1em;color:#323232}.icon-explosive .path28:before{content:\"\uE987\";margin-left:-1em;color:#323232}.icon-explosive .path29:before{content:\"\uE988\";margin-left:-1em;color:#323232}.icon-explosive .path30:before{content:\"\uE989\";margin-left:-1em;color:#323232}.icon-explosive .path31:before{content:\"\uE98A\";margin-left:-1em;color:#323232}.icon-explosive .path32:before{content:\"\uE98B\";margin-left:-1em;color:#323232}.icon-explosive .path33:before{content:\"\uE98C\";margin-left:-1em;color:#323232}.icon-explosive .path34:before{content:\"\uE98D\";margin-left:-1em;color:#323232}.icon-explosive .path35:before{content:\"\uE98E\";margin-left:-1em;color:#323232}.icon-explosive .path36:before{content:\"\uE98F\";margin-left:-1em;color:#323232}.icon-explosive .path37:before{content:\"\uE990\";margin-left:-1em;color:#323232}.icon-explosive .path38:before{content:\"\uE991\";margin-left:-1em;color:#323232}.icon-explosive .path39:before{content:\"\uE992\";margin-left:-1em;color:#323232}.icon-explosive .path40:before{content:\"\uE993\";margin-left:-1em;color:#323232}.icon-explosive .path41:before{content:\"\uE994\";margin-left:-1em;color:#323232}.icon-explosive .path42:before{content:\"\uE995\";margin-left:-1em;color:#323232}.icon-explosive .path43:before{content:\"\uE996\";margin-left:-1em;color:#323232}.icon-explosive .path44:before{content:\"\uE997\";margin-left:-1em;color:#323232}.icon-explosive .path45:before{content:\"\uE998\";margin-left:-1em;color:#323232}.icon-explosive .path46:before{content:\"\uE999\";margin-left:-1em;color:#323232}.icon-file-excel:before{content:\"\uE99A\"}.icon-file-pdf:before{content:\"\uE99B\"}.icon-file-pdf-verified .path1:before{content:\"\uE99C\";color:#000;opacity:.6}.icon-file-pdf-verified .path2:before{content:\"\uE99D\";margin-left:-1em;color:#fff}.icon-file-pdf-verified .path3:before{content:\"\uE99E\";margin-left:-1em;color:#000;opacity:.6}.icon-file-word:before{content:\"\uE99F\"}.icon-filter-alt:before{content:\"\uE9A0\"}.icon-flammable .path1:before{content:\"\uE9A1\";color:#323232}.icon-flammable .path2:before{content:\"\uE9A2\";margin-left:-1em;color:#323232}.icon-flammable .path3:before{content:\"\uE9A3\";margin-left:-1em;color:#e32730}.icon-gas-under-pressure .path1:before{content:\"\uE9A4\";color:#323232}.icon-gas-under-pressure .path2:before{content:\"\uE9A5\";margin-left:-1em;color:#e32730}.icon-health-hazard .path1:before{content:\"\uE9A6\";color:#323232}.icon-health-hazard .path2:before{content:\"\uE9A7\";margin-left:-1em;color:#e32730}.icon-line-break:before{content:\"\uE9A8\"}.icon-location:before{content:\"\uE9A9\"}.icon-measure-add:before{content:\"\uE9AA\"}.icon-measure-edit:before{content:\"\uE9AB\"}.icon-measure-view:before{content:\"\uE9AC\";color:#666}.icon-messages:before{content:\"\uE9AD\"}.icon-monitoring:before{content:\"\uE9AE\";color:#666}.icon-move:before{content:\"\uE9AF\"}.icon-oxidizing .path1:before{content:\"\uE9B0\";color:#e32730}.icon-oxidizing .path2:before{content:\"\uE9B1\";margin-left:-1em;color:#323232}.icon-oxidizing .path3:before{content:\"\uE9B2\";margin-left:-1em;color:#323232}.icon-oxidizing .path4:before{content:\"\uE9B3\";margin-left:-1em;color:#323232}.icon-process-area-closed:before{content:\"\uE9B4\"}.icon-process-area-open:before{content:\"\uE9B5\"}.icon-process-linked .path1:before{content:\"\uE9B6\";color:#000;opacity:.6}.icon-process-linked .path2:before{content:\"\uE9B7\";margin-left:-1em;color:#666}.icon-risk:before{content:\"\uE9B8\"}.icon-search-in-file:before{content:\"\uE9B9\"}.icon-sort-ascending:before{content:\"\uE9BA\"}.icon-sort-descending:before{content:\"\uE9BB\"}.icon-subscript:before{content:\"\uE9BC\"}.icon-superscript:before{content:\"\uE9BD\"}.icon-syncronice-favorites:before{content:\"\uE9BE\"}.icon-system-settings:before{content:\"\uE9BF\"}.icon-view-three-outlined:before{content:\"\uE9C0\"}.icon-workplace-safety:before{content:\"\uE9C1\"}.icon-checklist:before{content:\"\uE900\"}.icon-department-document .path1:before{content:\"\uE901\";color:#000;opacity:.6}.icon-department-document .path2:before{content:\"\uE902\";margin-left:-1em;color:#00804c}.icon-department-folder-closed .path1:before{content:\"\uE903\";color:#000;opacity:.6}.icon-department-folder-closed .path2:before{content:\"\uE904\";margin-left:-1em;color:#00804c}.icon-department-folder-open .path1:before{content:\"\uE905\";color:#000;opacity:.6}.icon-department-folder-open .path2:before{content:\"\uE906\";margin-left:-1em;color:#00804c}.icon-deviation:before{content:\"\uE907\"}.icon-dropdown-folder .path1:before{content:\"\uE908\";color:#00324e}.icon-dropdown-folder .path2:before{content:\"\uE909\";margin-left:-1em;color:#fff;opacity:.6}.icon-enterprise-document .path1:before{content:\"\uE90A\";color:#000;opacity:.6}.icon-enterprise-document .path2:before{content:\"\uE90B\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-closed .path1:before{content:\"\uE90C\";color:#000;opacity:.6}.icon-enterprise-folder-closed .path2:before{content:\"\uE90D\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-open .path1:before{content:\"\uE90E\";color:#000;opacity:.6}.icon-enterprise-folder-open .path2:before{content:\"\uE90F\";margin-left:-1em;color:#cf4714}.icon-folder-closed:before{content:\"\uE910\"}.icon-folder-open:before{content:\"\uE911\"}.icon-keyboard_arrow_down:before{content:\"\uE912\"}.icon-keyboard_arrow_up:before{content:\"\uE913\"}.icon-local-document .path1:before{content:\"\uE914\";color:#000;opacity:.6}.icon-local-document .path2:before{content:\"\uE915\";margin-left:-1em;color:#1954a9}.icon-local-folder-closed .path1:before{content:\"\uE916\";color:#000;opacity:.6}.icon-local-folder-closed .path2:before{content:\"\uE917\";margin-left:-1em;color:#1954a9}.icon-local-folder-open .path1:before{content:\"\uE918\";color:#000;opacity:.6}.icon-local-folder-open .path2:before{content:\"\uE919\";margin-left:-1em;color:#1954a9}.icon-process:before{content:\"\uE91A\"}.icon-regional-document .path1:before{content:\"\uE91C\";color:#000;opacity:.6}.icon-regional-document .path2:before{content:\"\uE91D\";margin-left:-1em;color:#662e0d}.icon-regional-folder-closed .path1:before{content:\"\uE91E\";color:#000;opacity:.6}.icon-regional-folder-closed .path2:before{content:\"\uE91F\";margin-left:-1em;color:#662e0d}.icon-regional-folder-open .path1:before{content:\"\uE920\";color:#000;opacity:.6}.icon-regional-folder-open .path2:before{content:\"\uE921\";margin-left:-1em;color:#662e0d}.qms-select-department-tree-container{font-family:Open Sans,sans-serif}.qms-select-department-tree-container .mr10{margin-right:10px}.qms-select-department-tree-container .mt5{margin-bottom:5px}.qms-select-department-tree-container .mb5{margin-top:5px}.qms-select-department-tree-container .w100{width:100%}.qms-select-department-tree-container .h100{height:100%}.qms-select-department-tree-container .fw500{font-weight:500!important}.qms-select-department-tree-container .text-right{text-align:right}.qms-select-department-tree-container .mt20{margin-top:20px}.qms-select-department-tree-container .d-flex{display:flex}.qms-select-department-tree-container .align-items-center{align-items:center}.qms-select-department-tree-container .justify-content-end{justify-content:flex-end}.qms-select-department-tree-container .text-selected{color:rgba(0,0,0,.6);font-size:12px;line-height:16px;margin-top:1rem}.qms-select-department-tree-container .input-field{display:flex;align-items:center;position:relative}.qms-select-department-tree-container .input-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.qms-select-department-tree-container .input-field ::ng-deep .mat-form-field-underline{bottom:8px!important}.qms-select-department-tree-container .input-field input.input-search{width:100%;padding:10px;outline:none;border:none;background:var(--background-input-text)}.qms-select-department-tree-container .input-field .btn-search{cursor:pointer;vertical-align:middle;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.qms-select-department-tree-container .input-field .line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.qms-select-department-tree-container .header-title{font-weight:500;color:var(--ws-text-primary);font-size:16px;display:flex;align-items:center}.qms-select-department-tree-container .header-title .header-view{padding:4px 0}.qms-select-department-tree-container .sticky-position{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1;background:#fff}.qms-select-department-tree-container .header-view-tree{display:grid;grid-template-columns:1fr 200px;grid-column-gap:2px;-moz-column-gap:2px;column-gap:2px;padding:4px 12px 4px 0}.qms-select-department-tree-container .header-view-tree .header-view:first-child{padding-left:12px}.qms-select-department-tree-container .tree-department-wrapper{padding-right:4px;overflow:hidden;position:relative;transition:height .3s ease-in-out}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view{width:100%;display:grid;grid-template-columns:1fr 200px;grid-column-gap:2px;-moz-column-gap:2px;column-gap:2px}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main>.separate{height:38px}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main>.separate.h-0{height:0}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main:last-child{height:100%;padding-left:4px;position:relative}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main:last-child:after{position:absolute;content:\"\";top:0;bottom:-38px;left:0;width:1px;background:rgba(0,0,0,.12)}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main .external-list-item-container .node-external{overflow:hidden;transition:all .1s ease-in-out}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main .external-list-item-container .node-external .node-external-content{padding:5px 15px;height:calc(100% - 2px);color:var(--default-color);font-size:14px;display:flex;align-items:center}.qms-select-department-tree-container .tree-department-wrapper .tree-view.active-mode-external-view .tree-view-main .external-list-item-container .node-external .node-external-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qms-select-department-tree-container .mask-overlay{z-index:1000;background-color:rgba(34,33,33,.1);position:absolute;top:0;left:0;width:100%;height:100%;border-radius:4px;overflow:hidden;display:grid;place-items:center}.qms-select-department-tree-container .select-department-tree>.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{padding:0 4px!important}.qms-select-department-tree-container .select-department-tree .qms-tree-node{display:flex;align-items:center;border-radius:4px}.qms-select-department-tree-container .select-department-tree .qms-tree-node:hover{background-color:rgba(0,0,0,.08)}.qms-select-department-tree-container .select-department-tree .qms-tree-node>.node-expand-area{width:48px;height:48px;position:relative}.qms-select-department-tree-container .select-department-tree .qms-tree-node.active-external-view .mat-checkbox.qms-group-options{width:calc(100% - 250px)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.node-loading{background:var(--primary-light-6-opacity)}.qms-select-department-tree-container .select-department-tree .qms-tree-node>.external-view-node{flex-basis:200px;overflow:hidden}.qms-select-department-tree-container .select-department-tree .qms-tree-node>.external-view-node .node-external{overflow:hidden;transition:all .1s ease-in-out;display:block}.qms-select-department-tree-container .select-department-tree .qms-tree-node>.external-view-node .node-external .node-external-content{padding:5px 15px;height:calc(100% - 2px);color:var(--default-color);font-size:14px;display:flex;align-items:center}.qms-select-department-tree-container .select-department-tree .qms-tree-node>.external-view-node .node-external .node-external-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qms-select-department-tree-container .select-department-tree .qms-tree-node.expand-node{color:var(--primary)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.expand-node:hover{background:var(--primary-light-6-opacity)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.expand-node:active{background:var(--primary-light-12-opacity)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.expand-node .mat-icon{color:var(--primary)}.qms-select-department-tree-container .select-department-tree .qms-tree-node .node-without-checkbox{cursor:pointer;width:100%;display:flex;justify-content:space-between;align-items:center}.qms-select-department-tree-container .select-department-tree .qms-tree-node .node-without-checkbox .mat-icon{color:var(--primary);margin-right:4px}.qms-select-department-tree-container .select-department-tree .qms-tree-node.selected-theme{background:var(--primary-light-12-opacity)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all{cursor:default!important;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all .mat-icon-rtl-mirror,.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all .type-icon,.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all button.mat-button-disabled{color:rgba(0,0,0,.38)}.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all .text-name.disabled{color:rgba(0,0,0,.38);cursor:default!important;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.qms-select-department-tree-container .select-department-tree .qms-tree-node.mat-tree-node-disabled-all.active{background-color:transparent}.qms-select-department-tree-container .text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}.qms-select-department-tree-container .cursor-pointer{cursor:pointer}.qms-select-department-tree-container .ml5{margin-left:15px!important}.qms-select-department-tree-container .pl-10{padding-left:10px}.qms-select-department-tree-container ::ng-deep .mat-checkbox.qms-group-options.flex-direction-row .mat-checkbox-layout{white-space:normal}.qms-select-department-tree-container ::ng-deep .mat-checkbox.qms-group-options.flex-direction-row .node-text>span{display:block}.qms-select-department-tree-container ::ng-deep .mat-checkbox.qms-group-options.flex-direction-row .mat-checkbox-label{flex-direction:row;align-items:center;position:relative;padding-bottom:2px}.qms-select-department-tree-container .qms-view-search-result{width:100%;overflow:hidden}.qms-select-department-tree-container .qms-view-search-result__header{position:relative}.qms-select-department-tree-container .qms-view-search-result__header:after{position:absolute;content:\"\";bottom:0;left:0;width:100%;height:1px;background-color:rgba(0,0,0,.1)}.qms-select-department-tree-container .qms-view-search-result__header .header-title{padding:8px 0;display:inline-block}.qms-select-department-tree-container .qms-view-search-result__header .header-title:first-child{padding-left:12px}.qms-select-department-tree-container .qms-view-search-result__header .header-title:nth-child(2){flex-basis:200px}.qms-select-department-tree-container .qms-view-search-result>.no-result{height:100%;display:flex;justify-content:center;align-items:center}.qms-select-department-tree-container .qms-view-search-result__wrapper{height:calc(100% - 50px);width:100%}.qms-select-department-tree-container .qms-view-search-result__wrapper.active-external{height:calc(100% - 90px)!important}.qms-select-department-tree-container .qms-view-search-result__wrapper .result{max-height:calc(100% - 44px);overflow-y:auto;margin-bottom:4px;padding-right:4px}.qms-select-department-tree-container .qms-view-search-result__wrapper .result.active-paging{max-height:calc(100% - 40px)}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item{border-radius:4px;display:grid;grid-template-columns:45px 1fr;align-items:center;cursor:pointer;transition:background .3s ease;min-height:40px}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item:not(:first-child){margin-top:4px!important}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item.active,.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item:hover{background:linear-gradient(0deg,rgba(1,99,178,.12),rgba(1,99,178,.12)),#fff}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item__content{display:flex;align-items:center}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item__content .item-result-content-wraper{padding:5px 15px;width:100%}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item__content .external-name{flex-basis:200px}.qms-select-department-tree-container .qms-view-search-result__wrapper .result-item__content .external-name span{width:200px;display:inline-block}.qms-select-department-tree-container .qms-view-search-result ::ng-deep .mat-checkbox.qms-group-options{display:flex;height:100%}.qms-select-department-tree-container ::ng-deep .breadcrumb-container{flex-wrap:wrap}.qms-select-department-tree-container ::ng-deep .mat-button-focus-overlay{background-color:transparent}.qms-select-department-tree-container ::ng-deep .qms-breadcrumb-item{margin:0}.qms-select-department-tree-container ::ng-deep .qms-breadcrumb-item-text{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transition:color .3s ease}.qms-select-department-tree-container ::ng-deep .qms-breadcrumb-item-text:not(:last-child){max-width:150px!important}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-paginator-container .qms-total-result{margin-bottom:0;margin-right:12px;height:100%;display:flex;align-items:center}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-paginator-container .qms-total-result span{font-weight:600;color:rgba(0,0,0,.8)}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions{margin-bottom:0;grid-column-gap:2px;-moz-column-gap:2px;column-gap:2px}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-paginator-container .qms-paginator-range-actions>.qms-total-result{margin-bottom:0}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-form-field-wrapper{padding-bottom:0}.qms-select-department-tree-container ::ng-deep .qms-paginator .qms-paginator-page-size{align-items:center}.qms-select-department-tree-container .text-gray{color:#242424}.qms-select-department-tree-container .mb0{margin-bottom:0!important}.qms-select-department-tree-container .fs-base{font-size:14px!important}.qms-select-department-tree-container .user-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.qms-select-department-tree-container .item-breadcrumb-disable{cursor:not-allowed;color:rgba(0,0,0,.6);font-weight:400;font-size:14px;max-width:250px}.qms-select-department-tree-container ::ng-deep .mat-checkbox.checkbox-all .mat-checkbox-label{flex-direction:row;align-items:center;grid-column-gap:4px;-moz-column-gap:4px;column-gap:4px}.qms-select-department-tree-container ::ng-deep .btn-arrow{width:40px;height:40px;line-height:40px}.qms-select-department-tree-container .qms-loading-container{overflow:hidden;display:grid;grid-template-rows:repeat(60px)}.qms-select-department-tree-container .qms-loading-container .qms-loader{position:relative;width:100%;height:100%;padding:10px 0;overflow:hidden}.qms-select-department-tree-container .qms-loading-container .qms-loader:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;background:linear-gradient(110deg,hsla(0,0%,91%,0),hsla(0,0%,89%,0) 40%,hsla(0,0%,89%,.5) 50%,hsla(0,0%,89%,0) 60%,hsla(0,0%,89%,0));-webkit-animation:animate-loading 1.2s linear infinite;animation:animate-loading 1.2s linear infinite}.qms-select-department-tree-container .qms-loading-container .qms-loader__wrapper{position:relative;width:100%;height:100%}.qms-select-department-tree-container .qms-loading-container .qms-loader__wrapper .row-loader{background-color:#eee;position:absolute;left:0;width:100%;height:40px}@-webkit-keyframes animate-loading{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes animate-loading{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.qms-select-department-tree-container .qms-spinner{font-size:20px;position:relative;display:inline-block;width:1em;height:1em}.qms-select-department-tree-container .qms-spinner.center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.qms-select-department-tree-container .mat-spinner circle,.qms-select-department-tree-container ::ng-deep .mat-progress-spinner circle{stroke:#1b75be!important}@media screen and (max-width:600px){.qms-select-department-tree-container .external-view-node{flex-basis:65px!important}.qms-select-department-tree-container .qms-tree-node.active-external-view .mat-checkbox.qms-group-options{width:calc(100% - 110px)!important}.qms-select-department-tree-container .header-view-tree{grid-template-columns:1fr 80px!important}.qms-select-department-tree-container ::ng-deep .cdk-virtual-scroll-content-wrapper{right:0!important}.qms-select-department-tree-container .header-title{font-size:14px!important}.qms-select-department-tree-container .node-external,.qms-select-department-tree-container .text-label,.qms-select-department-tree-container .text-label+span,.qms-select-department-tree-container .text-name{font-size:12px}.qms-select-department-tree-container .node-expand-area{width:30px!important;height:30px!important}.qms-select-department-tree-container .node-expand-area .qms-btn-icon{width:30px;height:30px;line-height:30px}.qms-select-department-tree-container .fs-base{font-size:12px!important}.qms-select-department-tree-container .qms-select-department-tree-container .breadcrumb-container{flex-wrap:nowrap!important}.qms-select-department-tree-container ::ng-deep .qms-breadcrumb-item-text{font-size:12px!important;max-width:175px!important}.qms-select-department-tree-container ::ng-deep .qms-paginator .mat-paginator-container .qms-total-result{display:none!important}.qms-select-department-tree-container ::ng-deep .qms-paginator .size-small .mat-paginator-container{justify-content:center!important}.qms-select-department-tree-container .qms-view-search-result__header>.header-title:nth-child(2){flex-basis:120px!important}.qms-select-department-tree-container .result-item__content .external-name{flex-basis:75px!important}.qms-select-department-tree-container .result-item__content .external-name span{width:75px!important}}"]
37904
+ },] }
37905
+ ];
37906
+ SelectProcessDataTreeComponent.ctorParameters = function () { return [
37907
+ { type: i0.ChangeDetectorRef },
37908
+ { type: platformBrowser.DomSanitizer },
37909
+ { type: QMSIconRegistryService },
37910
+ { type: icon.MatIconRegistry },
37911
+ { type: i0.ElementRef },
37912
+ { type: TranslateLibraryService },
37913
+ { type: overlay.Overlay },
37914
+ { type: i0.ViewContainerRef },
37915
+ { type: QMSSelectDepartmentTreeGlobalService }
37916
+ ]; };
37917
+ SelectProcessDataTreeComponent.propDecorators = {
37918
+ rowsSkeleton: [{ type: i0.Input }],
37919
+ height: [{ type: i0.Input }],
37920
+ config: [{ type: i0.Input }],
37921
+ onSearchEvent: [{ type: i0.Output }],
37922
+ onPagingSearchEvent: [{ type: i0.Output }],
37923
+ onValueChangeEvent: [{ type: i0.Output }],
37924
+ selectionNodeChangeEvent: [{ type: i0.Output }],
37925
+ onCheckNodeEvent: [{ type: i0.Output }],
37926
+ onExpandNodeEvent: [{ type: i0.Output }],
37927
+ onLoadMoreEvent: [{ type: i0.Output }],
37928
+ onCheckItemSearchEvent: [{ type: i0.Output }],
37929
+ onCheckAllItemSearchEvent: [{ type: i0.Output }],
37930
+ toggleIncludeChildEvent: [{ type: i0.Output }],
37931
+ cdkVirtualScrollViewport: [{ type: i0.ViewChild, args: [scrolling.CdkVirtualScrollViewport,] }],
37932
+ paginatorSearch: [{ type: i0.ViewChild, args: ['paginatorSearch',] }]
37933
+ };
37934
+
37935
+ var QMSSelectProcessDataTreeModule = /** @class */ (function () {
37936
+ function QMSSelectProcessDataTreeModule() {
37937
+ }
37938
+ return QMSSelectProcessDataTreeModule;
37939
+ }());
37940
+ QMSSelectProcessDataTreeModule.decorators = [
37941
+ { type: i0.NgModule, args: [{
37942
+ declarations: [
37943
+ SelectProcessDataTreeComponent
37944
+ ],
37945
+ exports: [
37946
+ SelectProcessDataTreeComponent
37947
+ ],
37948
+ imports: [
37949
+ i1.CommonModule,
37950
+ tree$1.MatTreeModule,
37951
+ checkbox.MatCheckboxModule,
37952
+ autocomplete.MatAutocompleteModule,
37953
+ icon.MatIconModule,
37954
+ progressBar.MatProgressBarModule,
37955
+ QmsAngularModule,
37956
+ input.MatInputModule,
37957
+ forms.ReactiveFormsModule,
37958
+ forms.FormsModule,
37959
+ button.MatButtonModule,
37960
+ expansion.MatExpansionModule,
37961
+ slideToggle.MatSlideToggleModule,
37962
+ QMSButtonModule,
37963
+ formField.MatFormFieldModule,
37964
+ chips.MatChipsModule,
37965
+ SharedModule,
37966
+ QMSBreadcrumbModule,
37967
+ core.MatRippleModule,
37968
+ QmsPaginatorModule,
37969
+ paginator.MatPaginatorModule,
37970
+ divider.MatDividerModule,
37971
+ scrolling.ScrollingModule,
37972
+ progressSpinner.MatProgressSpinnerModule
37973
+ ]
37974
+ },] }
37975
+ ];
37976
+
37977
+ var ɵ0 = {
37978
+ clickAction: 'noop'
37979
+ };
37980
+ var SelectProcessDataComponent = /** @class */ (function () {
37981
+ function SelectProcessDataComponent(cdRef, dialogRef, data, trans) {
37982
+ var _this = this;
37983
+ this.cdRef = cdRef;
37984
+ this.dialogRef = dialogRef;
37985
+ this.data = data;
37986
+ this.trans = trans;
37987
+ this.ngUnsubscribe = new rxjs.Subject();
37988
+ this.onPagingEvent = new i0.EventEmitter();
37989
+ this.popupData = new SelectDepartmentPopupData();
37990
+ this.resultSelected = [];
37991
+ this.onSearchEvent = new i0.EventEmitter();
37992
+ this.onCheckNodeEvent = new i0.EventEmitter();
37993
+ this.onExpandNodeEvent = new i0.EventEmitter();
37994
+ this.onLoadMoreEvent = new i0.EventEmitter();
37995
+ this.onCheckItemSearchEvent = new i0.EventEmitter();
37996
+ this.onCheckAllItemSearchEvent = new i0.EventEmitter();
37997
+ this.toggleIncludeChildEvent = new i0.EventEmitter();
37998
+ this.resultSearch = [];
37999
+ this.isActiveViewSearch = false;
38000
+ this.trans.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
38001
+ if (res) {
38002
+ _this.LANG = _this.trans.getObjectLang(res);
38003
+ }
38004
+ });
38005
+ // Init popup data
38006
+ this.popupData = ___namespace.cloneDeep(this.data);
38007
+ }
38008
+ Object.defineProperty(SelectProcessDataComponent.prototype, "isIncludeChild", {
38009
+ get: function () {
38010
+ return !!this.treeProcessData && this.treeProcessData.isIncludeChildren;
38011
+ },
38012
+ enumerable: false,
38013
+ configurable: true
38014
+ });
38015
+ SelectProcessDataComponent.prototype.ngAfterViewInit = function () {
38016
+ console.log(this.treeProcessData);
38017
+ this.cdRef.detectChanges();
38018
+ };
38019
+ SelectProcessDataComponent.prototype.onCloseDialog = function () {
38020
+ this.dialogRef.close(this.treeProcessData.resultSelected);
38021
+ };
38022
+ SelectProcessDataComponent.prototype.ngOnInit = function () {
38023
+ };
38024
+ SelectProcessDataComponent.prototype.ngOnDestroy = function () {
38025
+ this.ngUnsubscribe.next();
38026
+ this.ngUnsubscribe.complete();
38027
+ };
38028
+ Object.defineProperty(SelectProcessDataComponent.prototype, "currentTreeData", {
38029
+ get: function () {
38030
+ return this.treeProcessData ? this.treeProcessData.currentTreeData : [];
38031
+ },
38032
+ enumerable: false,
38033
+ configurable: true
38034
+ });
38035
+ SelectProcessDataComponent.prototype.displayWhenSelectDepartmentOption = function ($event) {
38036
+ return '';
38037
+ };
38038
+ SelectProcessDataComponent.prototype.onScrollToNode = function (node) {
38039
+ // this.treeProcessData.scrollToNode(node.id);
38040
+ };
38041
+ SelectProcessDataComponent.prototype.onRemoveNode = function (node) {
38042
+ this.treeProcessData.onRemoveNode(node.id);
38043
+ };
38044
+ /**
38045
+ * Gets a list of the data node's subtree of descendent data nodes.
38046
+ */
38047
+ SelectProcessDataComponent.prototype.getChildrenNode = function (node) {
38048
+ return this.treeProcessData.getListChildrenOfNode(node);
38049
+ };
38050
+ SelectProcessDataComponent.prototype.onResultDepartmentChange = function (data) {
38051
+ var _this = this;
38052
+ this.resultSelected = data.map(function (item) {
38053
+ return Object.assign(Object.assign({}, item), { tooltip: _this.generateTootip(item) });
38054
+ });
38055
+ };
38056
+ SelectProcessDataComponent.prototype.defaultFormatTooltipNode = function (node) {
38057
+ return node.isGroup ? this.formatString(this.popupData.config.tooltipIncludeLabel ? this.popupData.config.tooltipIncludeLabel : this.LANG.TOOLTIP_INCLUDE_SUB_DEPARTMENT, node.name, node.children.length.toString()) : node.name;
38058
+ };
38059
+ SelectProcessDataComponent.prototype.generateTootip = function (node) {
38060
+ return !!this.popupData.formatTooltipItemResult ? this.popupData.formatTooltipItemResult(node) : this.defaultFormatTooltipNode(node);
38061
+ };
38062
+ SelectProcessDataComponent.prototype.updateResultSearch = function (data) {
38063
+ if (!this.treeProcessData)
38064
+ return;
38065
+ this.treeProcessData.setResultSearch(data);
38066
+ };
38067
+ SelectProcessDataComponent.prototype.formatString = function () {
38068
+ var replacements = [];
38069
+ for (var _i = 0; _i < arguments.length; _i++) {
38070
+ replacements[_i] = arguments[_i];
38071
+ }
38072
+ var result = arguments[0];
38073
+ for (var i = 0; i < arguments.length - 1; i++) {
38074
+ var reg = new RegExp("\\{" + i + "\\}", 'gm');
38075
+ result = result.replace(reg, arguments[i + 1]);
38076
+ }
38077
+ return result;
38078
+ };
38079
+ /**
38080
+ * This function use for lazy load children of node
38081
+ * @param node node update
38082
+ * @param data list children to update node.
38083
+ * @param mode default is update that replace current list children by new list children , if mode = 'insert' will insert new value to list children existed before.
38084
+ */
38085
+ SelectProcessDataComponent.prototype.updateChildOfNode = function (node, data, mode) {
38086
+ if (mode === void 0) { mode = 'update'; }
38087
+ this.treeProcessData.updateChildOfNode(node, data, mode);
38088
+ };
38089
+ SelectProcessDataComponent.prototype.addRootTree = function (data) {
38090
+ if (data === void 0) { data = []; }
38091
+ this.treeProcessData.addRootTree(data);
38092
+ };
38093
+ /**
38094
+ * This function handle check node of tree
38095
+ * @param node node of tree
38096
+ * @param callback do something before handle check node
38097
+ * @returns
38098
+ */
38099
+ SelectProcessDataComponent.prototype.onBeforeCheckNode = function (node, callback) {
38100
+ return this.treeProcessData.onBeforeCheckNode(node, callback);
38101
+ };
38102
+ SelectProcessDataComponent.prototype.handleCheckNode = function (node) {
38103
+ if (!this.treeProcessData)
38104
+ return;
38105
+ this.treeProcessData.handleCheckNode(node);
38106
+ };
38107
+ /**
38108
+ * This method use for lazy mode, do some thing before init list node selected
38109
+ * @param callback
38110
+ * @returns
38111
+ */
38112
+ SelectProcessDataComponent.prototype.onBeforeInitNodeSelected = function (callback) {
38113
+ return __awaiter(this, void 0, void 0, function () {
38114
+ return __generator(this, function (_a) {
38115
+ switch (_a.label) {
38116
+ case 0:
38117
+ if (!this.treeProcessData)
38118
+ return [2 /*return*/];
38119
+ if (!!!callback) return [3 /*break*/, 2];
38120
+ return [4 /*yield*/, this.treeProcessData.onBeforeInitNodeSelected(callback)];
38121
+ case 1:
38122
+ _a.sent();
38123
+ _a.label = 2;
38124
+ case 2: return [2 /*return*/];
38125
+ }
38126
+ });
38127
+ });
38128
+ };
38129
+ /**
38130
+ * Get node by id of node
38131
+ * @param nodeId id of node
38132
+ * @returns
38133
+ */
38134
+ SelectProcessDataComponent.prototype.findNode = function (nodeId) {
38135
+ if (!this.treeProcessData)
38136
+ return;
38137
+ return this.treeProcessData.treeControl.dataNodes.find(function (node) { return node.id === nodeId.toString(); });
38138
+ };
38139
+ /**
38140
+ * This method use for lazy mode, do some thing before select all result search
38141
+ * @param callback
38142
+ * @returns
38143
+ */
38144
+ SelectProcessDataComponent.prototype.onBeforeCheckAllSearch = function (callback) {
38145
+ return __awaiter(this, void 0, void 0, function () {
38146
+ return __generator(this, function (_a) {
38147
+ switch (_a.label) {
38148
+ case 0:
38149
+ if (!this.treeProcessData)
38150
+ return [2 /*return*/];
38151
+ return [4 /*yield*/, this.treeProcessData.onBeforeCheckAllSearch(callback)];
38152
+ case 1:
38153
+ _a.sent();
38154
+ return [2 /*return*/];
38155
+ }
38156
+ });
38157
+ });
38158
+ };
38159
+ /**
38160
+ * This method use for lazy mode, do some thing before check item result
38161
+ * @param callback
38162
+ * @returns
38163
+ */
38164
+ SelectProcessDataComponent.prototype.onBeforeCheckItemSearch = function (item, callback) {
38165
+ return this.treeProcessData.onBeforeCheckItemSearch(item, callback);
38166
+ };
38167
+ SelectProcessDataComponent.prototype.setLoadingStateNode = function (isLoading, nodeId) {
38168
+ !!this.treeProcessData && this.treeProcessData.setLoadingStateNode(isLoading, nodeId);
38169
+ };
38170
+ /**
38171
+ * Select a value or an array of values.
38172
+ */
38173
+ SelectProcessDataComponent.prototype.onSelectNode = function () {
38174
+ var _a;
38175
+ var nodeIds = [];
38176
+ for (var _i = 0; _i < arguments.length; _i++) {
38177
+ nodeIds[_i] = arguments[_i];
38178
+ }
38179
+ (_a = this.treeProcessData).onSelectNode.apply(_a, __spreadArray([], __read(nodeIds)));
38180
+ };
38181
+ /**
38182
+ * Deselects a value or an array of values.
38183
+ */
38184
+ SelectProcessDataComponent.prototype.onDeselectNode = function () {
38185
+ var _a;
38186
+ var nodeIds = [];
38187
+ for (var _i = 0; _i < arguments.length; _i++) {
38188
+ nodeIds[_i] = arguments[_i];
38189
+ }
38190
+ (_a = this.treeProcessData).onDeselectNode.apply(_a, __spreadArray([], __read(nodeIds)));
38191
+ };
38192
+ /**
38193
+ * Toggles a value between selected and deselected.
38194
+ */
38195
+ SelectProcessDataComponent.prototype.onToggleNode = function (nodeId) {
38196
+ this.treeProcessData.onToggleNode(nodeId);
38197
+ };
38198
+ SelectProcessDataComponent.prototype.getNodeById = function (nodeId) {
38199
+ return this.treeProcessData.getNodeById(nodeId);
38200
+ };
38201
+ SelectProcessDataComponent.prototype.isNodeLoading = function (nodeId) {
38202
+ if (!this.treeProcessData)
38203
+ return false;
38204
+ var node = this.treeProcessData.getNodeById(nodeId);
38205
+ return !!node && node.isLoading;
38206
+ };
38207
+ SelectProcessDataComponent.prototype.setLoadingMore = function (state) {
38208
+ if (!this.treeProcessData)
38209
+ return;
38210
+ this.treeProcessData.getLoadingMore$.next(state);
38211
+ };
38212
+ SelectProcessDataComponent.prototype.setLoading = function (state) {
38213
+ if (!this.treeProcessData)
38214
+ return;
38215
+ this.treeProcessData.getLoading$.next(state);
38216
+ };
38217
+ SelectProcessDataComponent.prototype.setLoadingNode = function (nodeId, state) {
38218
+ if (!this.treeProcessData)
38219
+ return;
38220
+ var node = this.treeProcessData.getNodeById(nodeId);
38221
+ if (!!node)
38222
+ node.isLoading = state;
38223
+ };
38224
+ SelectProcessDataComponent.prototype.updateTreeData = function (data) {
38225
+ if (data === void 0) { data = this.currentTreeData; }
38226
+ !!this.treeProcessData && this.treeProcessData.updateDataTree(data);
38227
+ };
38228
+ SelectProcessDataComponent.prototype.onDestroyLoadMore = function () {
38229
+ this.treeProcessData.onDestroyLoadMore();
38230
+ };
38231
+ SelectProcessDataComponent.prototype.setSelectedListData = function (data) {
38232
+ this.popupData.config.selectedList = data;
38233
+ };
38234
+ SelectProcessDataComponent.prototype.getCheckedStatusNode = function (node) {
38235
+ return this.treeProcessData.getCheckedStatusNode(node);
38236
+ };
38237
+ SelectProcessDataComponent.prototype.updateNodeInformation = function (node) {
38238
+ return this.treeProcessData.updateNodeInformation(node);
38239
+ };
38240
+ SelectProcessDataComponent.prototype.updateSelectedResultData = function (node) {
38241
+ return this.treeProcessData.updateSelectedResultData(node);
38242
+ };
38243
+ SelectProcessDataComponent.prototype.getAllParentNode = function (node) {
38244
+ return this.treeProcessData.getAllParentNode(node);
38245
+ };
38246
+ SelectProcessDataComponent.prototype.onCheckNode = function (node, fireEventCheckNode) {
38247
+ if (fireEventCheckNode === void 0) { fireEventCheckNode = true; }
38248
+ return this.treeProcessData.onCheckNode(node, fireEventCheckNode);
38249
+ };
38250
+ SelectProcessDataComponent.prototype.getChildrenSelected = function (node) {
38251
+ return this.treeProcessData.getChildrenSelected(node);
38252
+ };
38253
+ return SelectProcessDataComponent;
38254
+ }());
38255
+ SelectProcessDataComponent.decorators = [
38256
+ { type: i0.Component, args: [{
38257
+ selector: 'qms-select-process-data',
38258
+ template: "<div class=\"qms-select-department\">\n <div class=\"header-dialog mb-2\">\n <span>{{popupData.headerName}}</span>\n <button matDialogClose class=\"btn-close-dialog\" color=\"light\" qms-btn-icon>\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <div>\n <div class=\"qms-scrollbar\">\n <div>\n <qms-select-process-data-tree #treeProcessData customClass=\"custom-department-tree\"\n [height]=\"popupData.config.isMobile ? '38vh' : '50vh'\" [rowsSkeleton]=\"9\" [config]=\"popupData.config\"\n (onSearchEvent)=\"onSearchEvent.emit($event)\" (onValueChangeEvent)=\"onResultDepartmentChange($event)\"\n (onPagingSearchEvent)=\"onPagingEvent.emit($event)\" (onCheckNodeEvent)=\"onCheckNodeEvent.emit($event)\"\n (onExpandNodeEvent)=\"onExpandNodeEvent.emit($event)\" (onLoadMoreEvent)=\"onLoadMoreEvent.emit()\"\n (onCheckAllItemSearchEvent)=\"onCheckAllItemSearchEvent.emit($event)\"\n (onCheckItemSearchEvent)=\"onCheckItemSearchEvent.emit($event)\"\n (toggleIncludeChildEvent)=\"toggleIncludeChildEvent.emit($event)\">\n </qms-select-process-data-tree>\n </div>\n </div>\n <div class=\"line__divider\"></div>\n <div [@heightAnimation] *ngIf=\"treeProcessData && !!treeProcessData.resultSelected.length\" class=\" pr-0 pe-0\">\n <div class=\"header-title\">{{LANG.RESULTS}}</div>\n <div class=\"result-content pr-0 pe-0\">\n <mat-chip-list class=\"panel__item qms-scrollbar\">\n <div [@inOutAnimation_2] [id]=\"'item-result-'+item.id\" *ngFor=\"let item of treeProcessData.resultSelected\">\n <mat-chip [@updateItemAnimation] *qmsContentChanges=\"item.children?.length\"\n [qms-tool-tip]=\"generateTootip(item)\" position=\"top\" mode=\"dark\" qms-chip [removable]=\"true\">\n <span (click)=\"onScrollToNode(item)\" qms-chip-body>\n <span class=\"related__item__content_name\" #itemName>\n <span>{{item.name}}</span>\n <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && !popupData.config.lazy\">\n {{item.children.length}}/{{item.childCount}}\n </span>\n <span class=\"select__include-children__count\" *ngIf=\"!!item?.isGroup && popupData.config.lazy\">\n {{item.selectedChildCount}}/{{item.childCount}}\n </span>\n </span>\n </span>\n <mat-icon *ngIf=\"!isNodeLoading(item.id); else loadingSpinner\"\n (click)=\"onRemoveNode(item)\">cancel</mat-icon>\n </mat-chip>\n </div>\n </mat-chip-list>\n </div>\n </div>\n <mat-divider *ngIf=\"treeProcessData && !!treeProcessData.resultSelected.length\" class=\"mx-auto\"></mat-divider>\n <div class=\"confirm__button__groups\">\n <button (click)=\"onCloseDialog()\" class=\"btn-add\"\n [disabled]=\"!resultSelected.length && !popupData.config.canAddNullResult\"\n [class.qms-btn-disabled]=\"!resultSelected.length && !popupData.config.canAddNullResult\" qms-btn>\n <span>{{LANG.ADD}}</span>\n <span>\n ({{treeProcessData.resultSelected.length}})\n </span>\n </button>\n <button qms-btn-text mat-dialog-close>\n Cancel\n </button>\n </div>\n </div>\n</div>\n\n<!-- Loading spinner -->\n<ng-template #loadingSpinner>\n <div class=\"qms-spinner-wrapper\">\n <div class=\"qms-spinner center\">\n <mat-spinner [diameter]=\"20\" [strokeWidth]=\"2\"></mat-spinner>\n </div>\n </div>\n</ng-template>",
38259
+ providers: [
38260
+ {
38261
+ provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
38262
+ useValue: ɵ0
38263
+ }
38264
+ ],
38265
+ animations: [SelectDepartmentAnimationTrigger],
38266
+ styles: ["@charset \"UTF-8\";@font-face{font-family:icomoon;src:url(../assets/fonts/icomoon.eot?aghldx);src:url(../assets/fonts/icomoon.eot?aghldx#iefix) format(\"embedded-opentype\"),url(../assets/fonts/icomoon.ttf?aghldx) format(\"truetype\"),url(../assets/fonts/icomoon.woff?aghldx) format(\"woff\"),url(../assets/fonts/icomoon.svg?aghldx#icomoon) format(\"svg\");font-weight:400;font-style:normal;font-display:block}[class*=\" icon-\"],[class^=icon-]{font-family:icomoon!important;speak:never;font-style:normal;font-weight:400;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-acutely-toxic .path1:before{content:\"\uE91B\";color:#e32730}.icon-acutely-toxic .path2:before{content:\"\uE922\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path3:before{content:\"\uE923\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path4:before{content:\"\uE924\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path5:before{content:\"\uE925\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path6:before{content:\"\uE926\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path7:before{content:\"\uE927\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path8:before{content:\"\uE928\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path9:before{content:\"\uE929\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path10:before{content:\"\uE92A\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path11:before{content:\"\uE92B\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path12:before{content:\"\uE92C\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path13:before{content:\"\uE92D\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path14:before{content:\"\uE92E\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path15:before{content:\"\uE92F\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path16:before{content:\"\uE930\";margin-left:-1em;color:#323232}.icon-acutely-toxic .path17:before{content:\"\uE931\";margin-left:-1em;color:#323232}.icon-add-column:before{content:\"\uE932\"}.icon-add-tooltip:before{content:\"\uE933\"}.icon-admin:before{content:\"\uE934\"}.icon-annual-cycle:before{content:\"\uE935\"}.icon-assignment-repete:before{content:\"\uE936\"}.icon-barrier-add:before{content:\"\uE937\"}.icon-barrier-edit:before{content:\"\uE938\"}.icon-barrier-view:before{content:\"\uE939\"}.icon-button-group:before{content:\"\uE93A\"}.icon-chemical-manager:before{content:\"\uE93B\"}.icon-chronic-health-hazard .path1:before{content:\"\uE93C\";color:#e32730}.icon-chronic-health-hazard .path2:before{content:\"\uE93D\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path3:before{content:\"\uE93E\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path4:before{content:\"\uE93F\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path5:before{content:\"\uE940\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path6:before{content:\"\uE941\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path7:before{content:\"\uE942\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path8:before{content:\"\uE943\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path9:before{content:\"\uE944\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path10:before{content:\"\uE945\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path11:before{content:\"\uE946\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path12:before{content:\"\uE947\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path13:before{content:\"\uE948\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path14:before{content:\"\uE949\";margin-left:-1em;color:#323232}.icon-chronic-health-hazard .path15:before{content:\"\uE94A\";margin-left:-1em;color:#323232}.icon-contingency:before{content:\"\uE94B\"}.icon-corrosive .path1:before{content:\"\uE94C\";color:#323232}.icon-corrosive .path2:before{content:\"\uE94D\";margin-left:-1em;color:#323232}.icon-corrosive .path3:before{content:\"\uE94E\";margin-left:-1em;color:#323232}.icon-corrosive .path4:before{content:\"\uE94F\";margin-left:-1em;color:#323232}.icon-corrosive .path5:before{content:\"\uE950\";margin-left:-1em;color:#323232}.icon-corrosive .path6:before{content:\"\uE951\";margin-left:-1em;color:#323232}.icon-corrosive .path7:before{content:\"\uE952\";margin-left:-1em;color:#323232}.icon-corrosive .path8:before{content:\"\uE953\";margin-left:-1em;color:#323232}.icon-corrosive .path9:before{content:\"\uE954\";margin-left:-1em;color:#323232}.icon-corrosive .path10:before{content:\"\uE955\";margin-left:-1em;color:#323232}.icon-corrosive .path11:before{content:\"\uE956\";margin-left:-1em;color:#323232}.icon-corrosive .path12:before{content:\"\uE957\";margin-left:-1em;color:#323232}.icon-corrosive .path13:before{content:\"\uE958\";margin-left:-1em;color:#323232}.icon-corrosive .path14:before{content:\"\uE959\";margin-left:-1em;color:#323232}.icon-corrosive .path15:before{content:\"\uE95A\";margin-left:-1em;color:#323232}.icon-corrosive .path16:before{content:\"\uE95B\";margin-left:-1em;color:#323232}.icon-corrosive .path17:before{content:\"\uE95C\";margin-left:-1em;color:#323232}.icon-corrosive .path18:before{content:\"\uE95D\";margin-left:-1em;color:#323232}.icon-corrosive .path19:before{content:\"\uE95E\";margin-left:-1em;color:#323232}.icon-corrosive .path20:before{content:\"\uE95F\";margin-left:-1em;color:#323232}.icon-corrosive .path21:before{content:\"\uE960\";margin-left:-1em;color:#e32730}.icon-dashboard:before{content:\"\uE961\"}.icon-database-sds:before{content:\"\uE962\"}.icon-description-add:before{content:\"\uE963\"}.icon-description-edit:before{content:\"\uE964\"}.icon-description-view:before{content:\"\uE965\";color:#666}.icon-document-read .path1:before{content:\"\uE966\";color:#000;opacity:.6}.icon-document-read .path2:before{content:\"\uE967\";margin-left:-1em;color:#fff}.icon-document-read .path3:before{content:\"\uE968\";margin-left:-1em;color:#000;opacity:.6}.icon-draft:before{content:\"\uE969\"}.icon-expired-off:before{content:\"\uE96A\"}.icon-expired-on:before{content:\"\uE96B\"}.icon-explosive .path1:before{content:\"\uE96C\";color:#e32730}.icon-explosive .path2:before{content:\"\uE96D\";margin-left:-1em;color:#323232}.icon-explosive .path3:before{content:\"\uE96E\";margin-left:-1em;color:#323232}.icon-explosive .path4:before{content:\"\uE96F\";margin-left:-1em;color:#323232}.icon-explosive .path5:before{content:\"\uE970\";margin-left:-1em;color:#323232}.icon-explosive .path6:before{content:\"\uE971\";margin-left:-1em;color:#323232}.icon-explosive .path7:before{content:\"\uE972\";margin-left:-1em;color:#323232}.icon-explosive .path8:before{content:\"\uE973\";margin-left:-1em;color:#323232}.icon-explosive .path9:before{content:\"\uE974\";margin-left:-1em;color:#323232}.icon-explosive .path10:before{content:\"\uE975\";margin-left:-1em;color:#323232}.icon-explosive .path11:before{content:\"\uE976\";margin-left:-1em;color:#323232}.icon-explosive .path12:before{content:\"\uE977\";margin-left:-1em;color:#323232}.icon-explosive .path13:before{content:\"\uE978\";margin-left:-1em;color:#323232}.icon-explosive .path14:before{content:\"\uE979\";margin-left:-1em;color:#323232}.icon-explosive .path15:before{content:\"\uE97A\";margin-left:-1em;color:#323232}.icon-explosive .path16:before{content:\"\uE97B\";margin-left:-1em;color:#323232}.icon-explosive .path17:before{content:\"\uE97C\";margin-left:-1em;color:#323232}.icon-explosive .path18:before{content:\"\uE97D\";margin-left:-1em;color:#323232}.icon-explosive .path19:before{content:\"\uE97E\";margin-left:-1em;color:#323232}.icon-explosive .path20:before{content:\"\uE97F\";margin-left:-1em;color:#323232}.icon-explosive .path21:before{content:\"\uE980\";margin-left:-1em;color:#323232}.icon-explosive .path22:before{content:\"\uE981\";margin-left:-1em;color:#323232}.icon-explosive .path23:before{content:\"\uE982\";margin-left:-1em;color:#323232}.icon-explosive .path24:before{content:\"\uE983\";margin-left:-1em;color:#323232}.icon-explosive .path25:before{content:\"\uE984\";margin-left:-1em;color:#323232}.icon-explosive .path26:before{content:\"\uE985\";margin-left:-1em;color:#323232}.icon-explosive .path27:before{content:\"\uE986\";margin-left:-1em;color:#323232}.icon-explosive .path28:before{content:\"\uE987\";margin-left:-1em;color:#323232}.icon-explosive .path29:before{content:\"\uE988\";margin-left:-1em;color:#323232}.icon-explosive .path30:before{content:\"\uE989\";margin-left:-1em;color:#323232}.icon-explosive .path31:before{content:\"\uE98A\";margin-left:-1em;color:#323232}.icon-explosive .path32:before{content:\"\uE98B\";margin-left:-1em;color:#323232}.icon-explosive .path33:before{content:\"\uE98C\";margin-left:-1em;color:#323232}.icon-explosive .path34:before{content:\"\uE98D\";margin-left:-1em;color:#323232}.icon-explosive .path35:before{content:\"\uE98E\";margin-left:-1em;color:#323232}.icon-explosive .path36:before{content:\"\uE98F\";margin-left:-1em;color:#323232}.icon-explosive .path37:before{content:\"\uE990\";margin-left:-1em;color:#323232}.icon-explosive .path38:before{content:\"\uE991\";margin-left:-1em;color:#323232}.icon-explosive .path39:before{content:\"\uE992\";margin-left:-1em;color:#323232}.icon-explosive .path40:before{content:\"\uE993\";margin-left:-1em;color:#323232}.icon-explosive .path41:before{content:\"\uE994\";margin-left:-1em;color:#323232}.icon-explosive .path42:before{content:\"\uE995\";margin-left:-1em;color:#323232}.icon-explosive .path43:before{content:\"\uE996\";margin-left:-1em;color:#323232}.icon-explosive .path44:before{content:\"\uE997\";margin-left:-1em;color:#323232}.icon-explosive .path45:before{content:\"\uE998\";margin-left:-1em;color:#323232}.icon-explosive .path46:before{content:\"\uE999\";margin-left:-1em;color:#323232}.icon-file-excel:before{content:\"\uE99A\"}.icon-file-pdf:before{content:\"\uE99B\"}.icon-file-pdf-verified .path1:before{content:\"\uE99C\";color:#000;opacity:.6}.icon-file-pdf-verified .path2:before{content:\"\uE99D\";margin-left:-1em;color:#fff}.icon-file-pdf-verified .path3:before{content:\"\uE99E\";margin-left:-1em;color:#000;opacity:.6}.icon-file-word:before{content:\"\uE99F\"}.icon-filter-alt:before{content:\"\uE9A0\"}.icon-flammable .path1:before{content:\"\uE9A1\";color:#323232}.icon-flammable .path2:before{content:\"\uE9A2\";margin-left:-1em;color:#323232}.icon-flammable .path3:before{content:\"\uE9A3\";margin-left:-1em;color:#e32730}.icon-gas-under-pressure .path1:before{content:\"\uE9A4\";color:#323232}.icon-gas-under-pressure .path2:before{content:\"\uE9A5\";margin-left:-1em;color:#e32730}.icon-health-hazard .path1:before{content:\"\uE9A6\";color:#323232}.icon-health-hazard .path2:before{content:\"\uE9A7\";margin-left:-1em;color:#e32730}.icon-line-break:before{content:\"\uE9A8\"}.icon-location:before{content:\"\uE9A9\"}.icon-measure-add:before{content:\"\uE9AA\"}.icon-measure-edit:before{content:\"\uE9AB\"}.icon-measure-view:before{content:\"\uE9AC\";color:#666}.icon-messages:before{content:\"\uE9AD\"}.icon-monitoring:before{content:\"\uE9AE\";color:#666}.icon-move:before{content:\"\uE9AF\"}.icon-oxidizing .path1:before{content:\"\uE9B0\";color:#e32730}.icon-oxidizing .path2:before{content:\"\uE9B1\";margin-left:-1em;color:#323232}.icon-oxidizing .path3:before{content:\"\uE9B2\";margin-left:-1em;color:#323232}.icon-oxidizing .path4:before{content:\"\uE9B3\";margin-left:-1em;color:#323232}.icon-process-area-closed:before{content:\"\uE9B4\"}.icon-process-area-open:before{content:\"\uE9B5\"}.icon-process-linked .path1:before{content:\"\uE9B6\";color:#000;opacity:.6}.icon-process-linked .path2:before{content:\"\uE9B7\";margin-left:-1em;color:#666}.icon-risk:before{content:\"\uE9B8\"}.icon-search-in-file:before{content:\"\uE9B9\"}.icon-sort-ascending:before{content:\"\uE9BA\"}.icon-sort-descending:before{content:\"\uE9BB\"}.icon-subscript:before{content:\"\uE9BC\"}.icon-superscript:before{content:\"\uE9BD\"}.icon-syncronice-favorites:before{content:\"\uE9BE\"}.icon-system-settings:before{content:\"\uE9BF\"}.icon-view-three-outlined:before{content:\"\uE9C0\"}.icon-workplace-safety:before{content:\"\uE9C1\"}.icon-checklist:before{content:\"\uE900\"}.icon-department-document .path1:before{content:\"\uE901\";color:#000;opacity:.6}.icon-department-document .path2:before{content:\"\uE902\";margin-left:-1em;color:#00804c}.icon-department-folder-closed .path1:before{content:\"\uE903\";color:#000;opacity:.6}.icon-department-folder-closed .path2:before{content:\"\uE904\";margin-left:-1em;color:#00804c}.icon-department-folder-open .path1:before{content:\"\uE905\";color:#000;opacity:.6}.icon-department-folder-open .path2:before{content:\"\uE906\";margin-left:-1em;color:#00804c}.icon-deviation:before{content:\"\uE907\"}.icon-dropdown-folder .path1:before{content:\"\uE908\";color:#00324e}.icon-dropdown-folder .path2:before{content:\"\uE909\";margin-left:-1em;color:#fff;opacity:.6}.icon-enterprise-document .path1:before{content:\"\uE90A\";color:#000;opacity:.6}.icon-enterprise-document .path2:before{content:\"\uE90B\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-closed .path1:before{content:\"\uE90C\";color:#000;opacity:.6}.icon-enterprise-folder-closed .path2:before{content:\"\uE90D\";margin-left:-1em;color:#cf4714}.icon-enterprise-folder-open .path1:before{content:\"\uE90E\";color:#000;opacity:.6}.icon-enterprise-folder-open .path2:before{content:\"\uE90F\";margin-left:-1em;color:#cf4714}.icon-folder-closed:before{content:\"\uE910\"}.icon-folder-open:before{content:\"\uE911\"}.icon-keyboard_arrow_down:before{content:\"\uE912\"}.icon-keyboard_arrow_up:before{content:\"\uE913\"}.icon-local-document .path1:before{content:\"\uE914\";color:#000;opacity:.6}.icon-local-document .path2:before{content:\"\uE915\";margin-left:-1em;color:#1954a9}.icon-local-folder-closed .path1:before{content:\"\uE916\";color:#000;opacity:.6}.icon-local-folder-closed .path2:before{content:\"\uE917\";margin-left:-1em;color:#1954a9}.icon-local-folder-open .path1:before{content:\"\uE918\";color:#000;opacity:.6}.icon-local-folder-open .path2:before{content:\"\uE919\";margin-left:-1em;color:#1954a9}.icon-process:before{content:\"\uE91A\"}.icon-regional-document .path1:before{content:\"\uE91C\";color:#000;opacity:.6}.icon-regional-document .path2:before{content:\"\uE91D\";margin-left:-1em;color:#662e0d}.icon-regional-folder-closed .path1:before{content:\"\uE91E\";color:#000;opacity:.6}.icon-regional-folder-closed .path2:before{content:\"\uE91F\";margin-left:-1em;color:#662e0d}.icon-regional-folder-open .path1:before{content:\"\uE920\";color:#000;opacity:.6}.icon-regional-folder-open .path2:before{content:\"\uE921\";margin-left:-1em;color:#662e0d}.qms-select-department{font-family:Open Sans,sans-serif}.qms-select-department .cursor-pointer{cursor:pointer}.qms-select-department .ml-5{margin-left:10px}.qms-select-department .padding-5{padding:5px}.qms-select-department .header-dialog{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:16px}.qms-select-department .input__field{display:flex;align-items:center;position:relative}.qms-select-department .input__field input.input-search{width:100%;padding:10px;outline:none;border:none;background:var(--background-input-text)}.qms-select-department .input__field .btn-search{cursor:pointer;vertical-align:middle;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.qms-select-department .line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.qms-select-department .mat-expansion-panel-header{height:30px;font-size:12px;letter-spacing:1px;font-family:Raleway;font-weight:600;padding:0}.qms-select-department .mat-expansion-panel-header .mat-expansion-panel-header-title{align-items:center;margin-left:12px}.qms-select-department .mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:none}.qms-select-department .panel__item{max-height:175px;margin-top:4px;overflow-x:hidden;overflow-y:auto;padding-right:5px;width:100%;display:block}.qms-select-department .panel__item .related__item__inline{max-width:100%}.qms-select-department .panel__item ::ng-deep .mat-chip-list-wrapper{margin:0 -4px!important}.qms-select-department .panel__item .select__toggle-include{width:100%}.qms-select-department .panel__item .select__toggle-include.toggle-include-child .mat-slide-toggle.qms-group-options .mat-slide-toggle-thumb{background-color:#5a5a5a!important}.qms-select-department .panel__item .related__item__content{height:32px;line-height:32px;background-color:var(--related-item-background);max-width:100%;margin-bottom:5px;margin-left:2.5px;margin-right:2.5px}.qms-select-department .panel__item .related__item__content .mat-icon{color:var(--related-mat-icon-color);font-size:24px}.qms-select-department .header-title{font-weight:600;color:rgba(0,0,0,.87)}.qms-select-department .result-content{padding-right:0!important}.qms-select-department .result-content .mat-chip-list{min-height:40px}.qms-select-department .result-content .mat-chip-list .mat-icon{color:rgba(0,0,0,.3)!important;cursor:pointer}.qms-select-department .result-content .mat-chip-list .mat-icon:hover{color:#000!important}.qms-select-department .result-content span.related__item__content_name{min-width:calc(100% - 13px);max-width:250px;display:flex;align-items:center}.qms-select-department .result-content span.related__item__content_name>span:first-child{display:inline-block;margin-right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.qms-select-department .result-content span.related__item__content_name .select__include-children__count{font-size:.75rem;color:rgba(0,0,0,.5);font-weight:600;line-height:16px}.qms-select-department .text-name{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;cursor:pointer;width:100%}.qms-select-department ::ng-deep .mat-checkbox.qms-group-options.flex-direction-row .mat-checkbox-layout{white-space:normal}.qms-select-department ::ng-deep .mat-checkbox.qms-group-options.flex-direction-row .mat-checkbox-label{flex-direction:row;align-items:center;position:relative;padding-bottom:2px}.qms-select-department .confirm__button__groups .btn-add>.qms-btn-wrapper{display:flex;justify-content:center;align-items:center}.qms-select-department ::ng-deep .custom-department-tree .qms-view-search-result{height:100%!important}.qms-select-department ::ng-deep .custom-department-tree .qms-view-search-result .result{max-height:calc(100% - 80px)!important}.qms-select-department ::ng-deep .custom-department-tree .loading-container{height:calc(100% - 40px)!important}.qms-select-department ::ng-deep.btn-close-dialog.qms-btn-icon:focus:not(:hover){background-color:unset!important;color:unset!important}.qms-spinner-wrapper{display:inline-block;width:22px;height:22px}.qms-spinner-wrapper .qms-spinner{font-size:20px;width:1em;height:1em;position:absolute;right:5px;top:50%;transform:translateY(-50%)}.qms-spinner-wrapper .qms-spinner .mat-progress-spinner circle,.qms-spinner-wrapper .qms-spinner .mat-spinner circle{stroke:#1b75be!important}@media screen and (max-width:600px){::ng-deep .cdk-global-overlay-wrapper{justify-content:center!important;width:100vw}.header-title{font-size:14px}.related__item__content_name{font-size:12px!important}}"]
38267
+ },] }
38268
+ ];
38269
+ SelectProcessDataComponent.ctorParameters = function () { return [
38270
+ { type: i0.ChangeDetectorRef },
38271
+ { type: dialog.MatDialogRef },
38272
+ { type: SelectDepartmentPopupData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
38273
+ { type: TranslateLibraryService }
38274
+ ]; };
38275
+ SelectProcessDataComponent.propDecorators = {
38276
+ treeProcessData: [{ type: i0.ViewChild, args: ['treeProcessData',] }],
38277
+ onPagingEvent: [{ type: i0.Output }],
38278
+ onSearchEvent: [{ type: i0.Output }],
38279
+ onCheckNodeEvent: [{ type: i0.Output }],
38280
+ onExpandNodeEvent: [{ type: i0.Output }],
38281
+ onLoadMoreEvent: [{ type: i0.Output }],
38282
+ onCheckItemSearchEvent: [{ type: i0.Output }],
38283
+ onCheckAllItemSearchEvent: [{ type: i0.Output }],
38284
+ toggleIncludeChildEvent: [{ type: i0.Output }]
38285
+ };
38286
+
38287
+ var QMSSelectProcessDataModule = /** @class */ (function () {
38288
+ function QMSSelectProcessDataModule() {
38289
+ }
38290
+ return QMSSelectProcessDataModule;
38291
+ }());
38292
+ QMSSelectProcessDataModule.decorators = [
38293
+ { type: i0.NgModule, args: [{
38294
+ declarations: [
38295
+ SelectProcessDataComponent,
38296
+ ],
38297
+ imports: [
38298
+ i1.CommonModule,
38299
+ progressBar.MatProgressBarModule,
38300
+ tree$1.MatTreeModule,
38301
+ checkbox.MatCheckboxModule,
38302
+ forms.ReactiveFormsModule,
38303
+ forms.FormsModule,
38304
+ QmsAngularModule,
38305
+ icon.MatIconModule,
38306
+ QMSTreeModule,
38307
+ button.MatButtonModule,
38308
+ dialog.MatDialogModule,
38309
+ expansion.MatExpansionModule,
38310
+ autocomplete.MatAutocompleteModule,
38311
+ input.MatInputModule,
38312
+ QMSAppIconModule,
38313
+ QMSButtonModule,
38314
+ slideToggle.MatSlideToggleModule,
38315
+ QMSButtonModule,
38316
+ formField.MatFormFieldModule,
38317
+ chips.MatChipsModule,
38318
+ QMSSelectProcessDataTreeModule,
38319
+ divider.MatDividerModule,
38320
+ progressSpinner.MatProgressSpinnerModule
38321
+ ],
38322
+ exports: [
38323
+ SelectProcessDataComponent
38324
+ ],
38325
+ schemas: [
38326
+ i0.CUSTOM_ELEMENTS_SCHEMA
38327
+ ]
38328
+ },] }
38329
+ ];
38330
+
36673
38331
  /*
36674
38332
  * Public API Surface of qms-angular
36675
38333
  */
@@ -36858,6 +38516,8 @@
36858
38516
  exports.QMSSelectIncludeChildrenModule = QMSSelectIncludeChildrenModule;
36859
38517
  exports.QMSSelectOneGlobalService = QMSSelectOneGlobalService;
36860
38518
  exports.QMSSelectOneModule = QMSSelectOneModule;
38519
+ exports.QMSSelectProcessDataModule = QMSSelectProcessDataModule;
38520
+ exports.QMSSelectProcessDataTreeModule = QMSSelectProcessDataTreeModule;
36861
38521
  exports.QMSSelectProcessDocumentGlobalService = QMSSelectProcessDocumentGlobalService;
36862
38522
  exports.QMSSelectProcessDocumentModule = QMSSelectProcessDocumentModule;
36863
38523
  exports.QMSSideSheetModule = QMSSideSheetModule;
@@ -36948,6 +38608,8 @@
36948
38608
  exports.SelectOnePopupData = SelectOnePopupData;
36949
38609
  exports.SelectOption = SelectOption;
36950
38610
  exports.SelectPopupData = SelectPopupData;
38611
+ exports.SelectProcessDataComponent = SelectProcessDataComponent;
38612
+ exports.SelectProcessDataTreeComponent = SelectProcessDataTreeComponent;
36951
38613
  exports.SelectProcessDocumentPopupComponent = SelectProcessDocumentPopupComponent;
36952
38614
  exports.SelectProcessDocumentPopupData = SelectProcessDocumentPopupData;
36953
38615
  exports.SelectedOption = SelectedOption;