qms-angular 1.1.46 → 1.1.47
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/qms-angular.umd.js +1676 -19
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/select-process-data/index.js +2 -0
- package/esm2015/lib/components/select-process-data/public-api.js +3 -0
- package/esm2015/lib/components/select-process-data/select-process-data.component.js +275 -0
- package/esm2015/lib/components/select-process-data/select-process-data.module.js +64 -0
- package/esm2015/lib/components/select-process-data-tree/index.js +2 -0
- package/esm2015/lib/components/select-process-data-tree/public-api.js +3 -0
- package/esm2015/lib/components/select-process-data-tree/select-process-data-tree.component.js +1134 -0
- package/esm2015/lib/components/select-process-data-tree/select-process-data-tree.module.js +64 -0
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +4 -3
- package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-imagemap.model.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +2 -1
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +3 -3
- package/esm2015/public-api.js +3 -1
- package/fesm2015/qms-angular.js +1481 -20
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/components/select-process-data/index.d.ts +1 -0
- package/lib/components/select-process-data/public-api.d.ts +2 -0
- package/lib/components/select-process-data/select-process-data.component.d.ts +120 -0
- package/lib/components/select-process-data/select-process-data.module.d.ts +2 -0
- package/lib/components/select-process-data-tree/index.d.ts +1 -0
- package/lib/components/select-process-data-tree/public-api.d.ts +2 -0
- package/lib/components/select-process-data-tree/select-process-data-tree.component.d.ts +196 -0
- package/lib/components/select-process-data-tree/select-process-data-tree.module.d.ts +2 -0
- package/lib/qms-ckeditor-components/models/qms-ckeditor-imagemap.model.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/qms-angular.metadata.json +1 -1
- package/src/assets/jointjs/scss/rappid.scss +12 -1
- package/src/lib/components/select-process-data/select-process-data.component.scss +241 -0
- package/src/lib/components/select-process-data-tree/select-process-data-tree.component.scss +634 -0
@@ -4781,7 +4781,7 @@
|
|
4781
4781
|
qmsContentChanges: [{ type: i0.Input }]
|
4782
4782
|
};
|
4783
4783
|
|
4784
|
-
var ɵ0$
|
4784
|
+
var ɵ0$7 = { appearance: 'fill' }, ɵ1$1 = { color: 'none' };
|
4785
4785
|
var QmsAngularModule = /** @class */ (function () {
|
4786
4786
|
function QmsAngularModule() {
|
4787
4787
|
}
|
@@ -4910,7 +4910,7 @@
|
|
4910
4910
|
QMSContentChangesDirective
|
4911
4911
|
],
|
4912
4912
|
providers: [
|
4913
|
-
{ provide: formField.MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: ɵ0$
|
4913
|
+
{ provide: formField.MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: ɵ0$7 },
|
4914
4914
|
{ provide: radio.MAT_RADIO_DEFAULT_OPTIONS, useValue: ɵ1$1 },
|
4915
4915
|
QMSUploadingFileGuard
|
4916
4916
|
],
|
@@ -5257,7 +5257,7 @@
|
|
5257
5257
|
_lines: [{ type: i0.ContentChildren, args: [QMSListLine, { descendants: true },] }]
|
5258
5258
|
};
|
5259
5259
|
|
5260
|
-
var ɵ0$
|
5260
|
+
var ɵ0$6 = {
|
5261
5261
|
expandedHeight: '*',
|
5262
5262
|
collapsedHeight: '*'
|
5263
5263
|
};
|
@@ -5302,7 +5302,7 @@
|
|
5302
5302
|
providers: [
|
5303
5303
|
{
|
5304
5304
|
provide: expansion.MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,
|
5305
|
-
useValue: ɵ0$
|
5305
|
+
useValue: ɵ0$6
|
5306
5306
|
}
|
5307
5307
|
],
|
5308
5308
|
schemas: [
|
@@ -17813,10 +17813,10 @@
|
|
17813
17813
|
}
|
17814
17814
|
}
|
17815
17815
|
else if (shapeDetail.connectionTypeId === ShapeFlowChartConnectionType.Deviation) {
|
17816
|
-
connectionName =
|
17816
|
+
connectionName = LANG.BPMN.LINK_TO_DEVIATION;
|
17817
17817
|
}
|
17818
17818
|
else if (shapeDetail.connectionTypeId === ShapeFlowChartConnectionType.Checklist) {
|
17819
|
-
connectionName =
|
17819
|
+
connectionName = LANG.BPMN.LINK_TO_CHECKLIST;
|
17820
17820
|
}
|
17821
17821
|
if (shapeDetail.connectionTypeId !== ShapeFlowChartConnectionType.Activity) {
|
17822
17822
|
list[i]["style"].cursor = 'pointer';
|
@@ -22022,11 +22022,12 @@
|
|
22022
22022
|
_this.naturalImageWidth = _this.imageMapData.imageWidth;
|
22023
22023
|
_this.initFormControl();
|
22024
22024
|
_this.initSvgIcons(iconRegistry, sanitizer);
|
22025
|
+
_this.selectedTarget = data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same;
|
22025
22026
|
return _this;
|
22026
22027
|
}
|
22027
22028
|
QMSCKEditorImageMapComponent.prototype.initDefaultValues = function () {
|
22028
22029
|
this.selectedLinkType = exports.LinkType.url;
|
22029
|
-
this.selectedTarget = exports.TargetTypeName.new;
|
22030
|
+
this.selectedTarget = this.data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same;
|
22030
22031
|
this.selectedProtocol = exports.ProtocolTypeName.http;
|
22031
22032
|
this.url = '';
|
22032
22033
|
this.processedUrl = '';
|
@@ -22269,7 +22270,7 @@
|
|
22269
22270
|
this.myImageMap.areas[this.currentAreaId].aalt = this.anchorText;
|
22270
22271
|
}
|
22271
22272
|
else {
|
22272
|
-
this.myImageMap.areas[this.currentAreaId].atarget = this.selectedTarget || exports.TargetTypeName.new;
|
22273
|
+
this.myImageMap.areas[this.currentAreaId].atarget = this.selectedTarget || (this.data.defaultTargetNewWindow ? exports.TargetTypeName.new : exports.TargetTypeName.same);
|
22273
22274
|
this.myImageMap.areas[this.currentAreaId].aalt = this.advisoryTitle;
|
22274
22275
|
}
|
22275
22276
|
this.myImageMap.areas[this.currentAreaId].ahref = ahref;
|
@@ -23138,7 +23139,7 @@
|
|
23138
23139
|
}(joint.shapes.standard.Link));
|
23139
23140
|
app.Link = Link;
|
23140
23141
|
})(exports.app || (exports.app = {}));
|
23141
|
-
var ɵ0$
|
23142
|
+
var ɵ0$5 = function (flags) {
|
23142
23143
|
if (this.hasFlag(flags, 'RENDER')) {
|
23143
23144
|
this.render();
|
23144
23145
|
}
|
@@ -23173,7 +23174,7 @@
|
|
23173
23174
|
position: ['TRANSFORM'],
|
23174
23175
|
angle: ['TRANSFORM']
|
23175
23176
|
},
|
23176
|
-
confirmUpdate: ɵ0$
|
23177
|
+
confirmUpdate: ɵ0$5,
|
23177
23178
|
render: ɵ1,
|
23178
23179
|
update: ɵ2
|
23179
23180
|
});
|
@@ -23203,7 +23204,7 @@
|
|
23203
23204
|
erd: erd,
|
23204
23205
|
uml: uml,
|
23205
23206
|
org: org,
|
23206
|
-
'ɵ0': ɵ0$
|
23207
|
+
'ɵ0': ɵ0$5,
|
23207
23208
|
'ɵ1': ɵ1,
|
23208
23209
|
'ɵ2': ɵ2
|
23209
23210
|
});
|
@@ -29842,6 +29843,7 @@
|
|
29842
29843
|
data.editorContent = this.qmsckContentInput;
|
29843
29844
|
data.linkJavaScriptLinksAllowed = this.qmsckData.linkJavaScriptLinksAllowed;
|
29844
29845
|
data.enabledInterconnected = this.qmsckData.enabledInterconnected;
|
29846
|
+
data.defaultTargetNewWindow = this.qmsckData.defaultTargetNewWindow;
|
29845
29847
|
var dialogTemplate = this.dialog.open(QMSCKEditorImageMapComponent, {
|
29846
29848
|
data: data,
|
29847
29849
|
disableClose: true,
|
@@ -31359,7 +31361,7 @@
|
|
31359
31361
|
selectionChangeEvent: [{ type: i0.Output }]
|
31360
31362
|
};
|
31361
31363
|
|
31362
|
-
var ɵ0$
|
31364
|
+
var ɵ0$4 = { displayDefaultIndicatorType: false };
|
31363
31365
|
var QmsStepperModule = /** @class */ (function () {
|
31364
31366
|
function QmsStepperModule() {
|
31365
31367
|
}
|
@@ -31383,7 +31385,7 @@
|
|
31383
31385
|
],
|
31384
31386
|
providers: [{
|
31385
31387
|
provide: stepper$1.STEPPER_GLOBAL_OPTIONS,
|
31386
|
-
useValue: ɵ0$
|
31388
|
+
useValue: ɵ0$4
|
31387
31389
|
}]
|
31388
31390
|
},] }
|
31389
31391
|
];
|
@@ -33420,7 +33422,7 @@
|
|
33420
33422
|
PaginationSize["large"] = "large";
|
33421
33423
|
PaginationSize["mobile"] = "mobile";
|
33422
33424
|
})(exports.PaginationSize || (exports.PaginationSize = {}));
|
33423
|
-
var ɵ0$
|
33425
|
+
var ɵ0$3 = { overlayPanelClass: 'customCDKpanel' };
|
33424
33426
|
var QMSPaginatorComponent = /** @class */ (function () {
|
33425
33427
|
function QMSPaginatorComponent(trans) {
|
33426
33428
|
this.trans = trans;
|
@@ -33640,7 +33642,7 @@
|
|
33640
33642
|
providers: [
|
33641
33643
|
{
|
33642
33644
|
provide: select.MAT_SELECT_CONFIG,
|
33643
|
-
useValue: ɵ0$
|
33645
|
+
useValue: ɵ0$3,
|
33644
33646
|
},
|
33645
33647
|
],
|
33646
33648
|
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 +35505,7 @@
|
|
35503
35505
|
])
|
35504
35506
|
];
|
35505
35507
|
|
35506
|
-
var ɵ0$
|
35508
|
+
var ɵ0$2 = {
|
35507
35509
|
clickAction: 'noop'
|
35508
35510
|
};
|
35509
35511
|
var SelectDepartmentComponent = /** @class */ (function () {
|
@@ -35789,7 +35791,7 @@
|
|
35789
35791
|
providers: [
|
35790
35792
|
{
|
35791
35793
|
provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
|
35792
|
-
useValue: ɵ0$
|
35794
|
+
useValue: ɵ0$2
|
35793
35795
|
}
|
35794
35796
|
],
|
35795
35797
|
animations: [SelectDepartmentAnimationTrigger],
|
@@ -36011,7 +36013,7 @@
|
|
36011
36013
|
return QMSSelectAccessDialog;
|
36012
36014
|
}());
|
36013
36015
|
|
36014
|
-
var ɵ0 = {
|
36016
|
+
var ɵ0$1 = {
|
36015
36017
|
clickAction: 'noop'
|
36016
36018
|
};
|
36017
36019
|
var QMSSelectAccessDialogComponent = /** @class */ (function () {
|
@@ -36601,7 +36603,7 @@
|
|
36601
36603
|
providers: [
|
36602
36604
|
{
|
36603
36605
|
provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
|
36604
|
-
useValue: ɵ0
|
36606
|
+
useValue: ɵ0$1
|
36605
36607
|
}
|
36606
36608
|
],
|
36607
36609
|
encapsulation: i0.ViewEncapsulation.None,
|
@@ -36670,6 +36672,1657 @@
|
|
36670
36672
|
return FilterPersonModel;
|
36671
36673
|
}());
|
36672
36674
|
|
36675
|
+
var SelectProcessDataTreeComponent = /** @class */ (function () {
|
36676
|
+
function SelectProcessDataTreeComponent(cdRef, domSanitizer, appIconService, iconRegistry, eleRef, trans, overlay, viewContainerRef, treeDepartmentService) {
|
36677
|
+
var _this = this;
|
36678
|
+
this.cdRef = cdRef;
|
36679
|
+
this.domSanitizer = domSanitizer;
|
36680
|
+
this.appIconService = appIconService;
|
36681
|
+
this.iconRegistry = iconRegistry;
|
36682
|
+
this.eleRef = eleRef;
|
36683
|
+
this.trans = trans;
|
36684
|
+
this.overlay = overlay;
|
36685
|
+
this.viewContainerRef = viewContainerRef;
|
36686
|
+
this.treeDepartmentService = treeDepartmentService;
|
36687
|
+
this.spinnerArr = new Array(12).fill(0);
|
36688
|
+
this.arrSkeleton = new Array(6).fill(0);
|
36689
|
+
this.height = '50vh';
|
36690
|
+
this.config = new QMSSelectDepartmentTreeConfig();
|
36691
|
+
this.isIncludeChildren = false;
|
36692
|
+
this.onSearchEvent = new i0.EventEmitter();
|
36693
|
+
this.onPagingSearchEvent = new i0.EventEmitter();
|
36694
|
+
this.onValueChangeEvent = new i0.EventEmitter();
|
36695
|
+
this.selectionNodeChangeEvent = new i0.EventEmitter();
|
36696
|
+
this.onCheckNodeEvent = new i0.EventEmitter();
|
36697
|
+
this.onExpandNodeEvent = new i0.EventEmitter();
|
36698
|
+
this.onLoadMoreEvent = new i0.EventEmitter();
|
36699
|
+
this.onCheckItemSearchEvent = new i0.EventEmitter();
|
36700
|
+
this.onCheckAllItemSearchEvent = new i0.EventEmitter();
|
36701
|
+
this.toggleIncludeChildEvent = new i0.EventEmitter();
|
36702
|
+
this.MODE_VIEW_ENUM = exports.ModeDepartmentTreeeViewEnum;
|
36703
|
+
this.ITEM_SIZE = 50;
|
36704
|
+
this.ngUnsubscribe = new rxjs.Subject();
|
36705
|
+
this.resultSearchSelected = [];
|
36706
|
+
this.resultSelected = [];
|
36707
|
+
this.getDataTree$ = new rxjs.BehaviorSubject([]);
|
36708
|
+
this.searchDepartment$ = new rxjs.BehaviorSubject(new QMSDepartmentPagingModel());
|
36709
|
+
this.resultSearch = [];
|
36710
|
+
this.getIndexView$ = new rxjs.BehaviorSubject(0);
|
36711
|
+
this.scrollToNodeEvent$ = new rxjs.Subject();
|
36712
|
+
this.getActiveNodeEvent$ = new rxjs.Subject();
|
36713
|
+
this.activeNode = '';
|
36714
|
+
this.PAGINATION_SIZE = exports.PaginationSize;
|
36715
|
+
this.PAGE_SIZE_OPTION = [5, 10, 15, 20, 25, 100];
|
36716
|
+
this.CURRENT_PAGESIZE = 10;
|
36717
|
+
this.nestedTreeNodeMap = new Map();
|
36718
|
+
this.flatTreeNodeMap = new Map();
|
36719
|
+
this.checkListSelection = new collections.SelectionModel(true);
|
36720
|
+
this.checkListSelectionSearch = new collections.SelectionModel(true);
|
36721
|
+
this._selectedList = [];
|
36722
|
+
this.selectedListAfterDataNodeChange$ = new rxjs.Subject();
|
36723
|
+
this.formSearchControl = new forms.FormControl('');
|
36724
|
+
this.getLoading$ = new rxjs.BehaviorSubject(false);
|
36725
|
+
this.getLoadingMore$ = new rxjs.BehaviorSubject(true);
|
36726
|
+
this.untilDestroyLoadMore$ = new rxjs.Subject();
|
36727
|
+
this.onBeforeInitNodeSelected$ = new rxjs.Subject();
|
36728
|
+
this.textSearchSubject$ = new rxjs.BehaviorSubject('');
|
36729
|
+
this.itemIconType = ItemIconType;
|
36730
|
+
this._transformer = function (node, level) {
|
36731
|
+
var flatNode = _this.convertToFlatNode(node) || new QMSFlatNodeTree();
|
36732
|
+
flatNode.id = node.id;
|
36733
|
+
flatNode.name = node.name;
|
36734
|
+
flatNode.expandable = (node.children && node.children.length > 0) || (!!node.childCount) || node.expandable;
|
36735
|
+
flatNode.level = level;
|
36736
|
+
flatNode.parentId = node.parentId;
|
36737
|
+
flatNode.markedGetChildren = node.children.length > 0;
|
36738
|
+
flatNode.itemIcon = node.itemIcon;
|
36739
|
+
flatNode.itemIconSvg = node.itemIconSvg;
|
36740
|
+
flatNode.isFile = node.isFile;
|
36741
|
+
flatNode.disabled = node.disabled;
|
36742
|
+
flatNode.isGroup = node.isGroup;
|
36743
|
+
flatNode.groupId = node.groupId;
|
36744
|
+
flatNode.externalName = node.externalName;
|
36745
|
+
flatNode.childCount = node.childCount;
|
36746
|
+
flatNode.selectedChildCount = node.selectedChildCount;
|
36747
|
+
flatNode.markedGetChildCountRecurrsive = node.markedGetChildCountRecurrsive;
|
36748
|
+
flatNode.isIncludeChildWhenChecked = node.isIncludeChildWhenChecked;
|
36749
|
+
_this.flatTreeNodeMap.set(flatNode, node);
|
36750
|
+
_this.nestedTreeNodeMap.set(node, flatNode);
|
36751
|
+
return flatNode;
|
36752
|
+
};
|
36753
|
+
this.getLevel = function (node) { return node === null || node === void 0 ? void 0 : node.level; };
|
36754
|
+
this._getChild = function (node) { return node.children; };
|
36755
|
+
this.isExpandable = function (node) { return node.expandable; };
|
36756
|
+
this.hasChild = function (_, node) { return node.expandable; };
|
36757
|
+
this._handlingLazyObject = {
|
36758
|
+
checkAllSearch: false,
|
36759
|
+
checkItemSearch: false,
|
36760
|
+
checkNode: false,
|
36761
|
+
expand: false
|
36762
|
+
};
|
36763
|
+
// Init tree data
|
36764
|
+
this.getDataTree$
|
36765
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
36766
|
+
.subscribe(function (data) {
|
36767
|
+
if (!_this.dataSource)
|
36768
|
+
return;
|
36769
|
+
_this.dataSource.data = data;
|
36770
|
+
_this.cdRef.detectChanges();
|
36771
|
+
});
|
36772
|
+
// Register icon
|
36773
|
+
appIconService.registerProcessIcon(iconRegistry, domSanitizer);
|
36774
|
+
appIconService.registerProcessAreaIcon(iconRegistry, domSanitizer);
|
36775
|
+
appIconService.registerDocumentIcon(iconRegistry, domSanitizer);
|
36776
|
+
appIconService.registerFolderIcon(iconRegistry, domSanitizer);
|
36777
|
+
appIconService.registerDeviationIcon(iconRegistry, domSanitizer);
|
36778
|
+
appIconService.registerChecklistIcon(iconRegistry, domSanitizer);
|
36779
|
+
appIconService.registerRiskIcon(iconRegistry, domSanitizer);
|
36780
|
+
this.trans.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
|
36781
|
+
if (res) {
|
36782
|
+
_this.LANG = _this.trans.getObjectLang(res);
|
36783
|
+
}
|
36784
|
+
});
|
36785
|
+
this._handleSearchEvent();
|
36786
|
+
this._handleActiveNodeEvent();
|
36787
|
+
this._handleItemSelectionChanged();
|
36788
|
+
this.getLoading$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (res) {
|
36789
|
+
res ? _this.formSearchControl.disable() : _this.formSearchControl.enable();
|
36790
|
+
})).subscribe();
|
36791
|
+
}
|
36792
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "rowsSkeleton", {
|
36793
|
+
set: function (value) {
|
36794
|
+
this.arrSkeleton = new Array(value).fill(0);
|
36795
|
+
},
|
36796
|
+
enumerable: false,
|
36797
|
+
configurable: true
|
36798
|
+
});
|
36799
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "departmentRoots", {
|
36800
|
+
get: function () {
|
36801
|
+
if (!this.treeControl)
|
36802
|
+
return;
|
36803
|
+
return this.treeControl.dataNodes.filter(function (node) { return node.level === 0; });
|
36804
|
+
},
|
36805
|
+
enumerable: false,
|
36806
|
+
configurable: true
|
36807
|
+
});
|
36808
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isAllDepartmentSelected", {
|
36809
|
+
get: function () {
|
36810
|
+
var _this = this;
|
36811
|
+
return !!this.treeControl && this.treeControl.dataNodes.every(function (node) { return _this.isSelectedNode(node); });
|
36812
|
+
},
|
36813
|
+
enumerable: false,
|
36814
|
+
configurable: true
|
36815
|
+
});
|
36816
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isIndeterminateCheckboxAllTree", {
|
36817
|
+
get: function () {
|
36818
|
+
return !this.isAllDepartmentSelected && this.checkListSelection.selected.length > 0;
|
36819
|
+
},
|
36820
|
+
enumerable: false,
|
36821
|
+
configurable: true
|
36822
|
+
});
|
36823
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "currentTreeData", {
|
36824
|
+
get: function () {
|
36825
|
+
return this.getDataTree$.getValue();
|
36826
|
+
},
|
36827
|
+
enumerable: false,
|
36828
|
+
configurable: true
|
36829
|
+
});
|
36830
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "isSelectAllResultSearch", {
|
36831
|
+
get: function () {
|
36832
|
+
var _this = this;
|
36833
|
+
return this.resultSearch.length && this.resultSearch.every(function (x) { return _this.checkListSelectionSearch.isSelected(x); });
|
36834
|
+
},
|
36835
|
+
enumerable: false,
|
36836
|
+
configurable: true
|
36837
|
+
});
|
36838
|
+
Object.defineProperty(SelectProcessDataTreeComponent.prototype, "indeterminateSearchResult", {
|
36839
|
+
get: function () {
|
36840
|
+
var _this = this;
|
36841
|
+
return !this.isSelectAllResultSearch && !!this.resultSearch.length && this.resultSearch.some(function (x) { return _this.checkListSelectionSearch.isSelected(x); });
|
36842
|
+
},
|
36843
|
+
enumerable: false,
|
36844
|
+
configurable: true
|
36845
|
+
});
|
36846
|
+
SelectProcessDataTreeComponent.prototype.ngAfterContentInit = function () {
|
36847
|
+
this.getLoadingMore$.next(false);
|
36848
|
+
this.cdRef.detectChanges();
|
36849
|
+
};
|
36850
|
+
SelectProcessDataTreeComponent.prototype.ngAfterViewInit = function () {
|
36851
|
+
var _this = this;
|
36852
|
+
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) {
|
36853
|
+
_this.getLoadingMore$.next(false);
|
36854
|
+
if (value === 0)
|
36855
|
+
_this.cdkVirtualScrollViewport &&
|
36856
|
+
_this.cdkVirtualScrollViewport.scrolledIndexChange
|
36857
|
+
.pipe(operators.takeUntil(_this.untilDestroyLoadMore$), operators.map(function (_) { return _this.cdkVirtualScrollViewport.measureScrollOffset('bottom'); }), operators.pairwise(), operators.filter(function (_b) {
|
36858
|
+
var _c = __read(_b, 2), x1 = _c[0], x2 = _c[1];
|
36859
|
+
return x1 > x2 && x2 < 140;
|
36860
|
+
}), operators.throttleTime(200), operators.tap(function (_) {
|
36861
|
+
if (_this.getLoadingMore$.value)
|
36862
|
+
return;
|
36863
|
+
if (!_this.config.lazy) {
|
36864
|
+
_this.onDestroyLoadMore();
|
36865
|
+
return;
|
36866
|
+
}
|
36867
|
+
_this.onLoadMoreEvent.emit();
|
36868
|
+
_this.getLoadingMore$.next(true);
|
36869
|
+
}))
|
36870
|
+
.subscribe();
|
36871
|
+
})).subscribe();
|
36872
|
+
this.onBeforeInitNodeSelected$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (_) {
|
36873
|
+
_this._handleListSelected();
|
36874
|
+
_this.getLoadingMore$.next(false);
|
36875
|
+
})).subscribe();
|
36876
|
+
this.cdRef.detectChanges();
|
36877
|
+
};
|
36878
|
+
SelectProcessDataTreeComponent.prototype.ngOnInit = function () {
|
36879
|
+
this.isIncludeChildren = this.config.isIncludeChildren;
|
36880
|
+
this._initTreeData();
|
36881
|
+
if (!this.config.lazy) {
|
36882
|
+
this._handleListSelected();
|
36883
|
+
return;
|
36884
|
+
}
|
36885
|
+
//action for lazy config
|
36886
|
+
this._initListSelected();
|
36887
|
+
this._handleAfterDataNodeChangeEvent();
|
36888
|
+
this.selectedListAfterDataNodeChange$.next(this.treeControl.dataNodes);
|
36889
|
+
};
|
36890
|
+
SelectProcessDataTreeComponent.prototype.ngOnDestroy = function () {
|
36891
|
+
this.ngUnsubscribe.next();
|
36892
|
+
this.ngUnsubscribe.complete();
|
36893
|
+
};
|
36894
|
+
SelectProcessDataTreeComponent.prototype.onDestroyLoadMore = function () {
|
36895
|
+
this.untilDestroyLoadMore$.next();
|
36896
|
+
this.untilDestroyLoadMore$.complete();
|
36897
|
+
};
|
36898
|
+
SelectProcessDataTreeComponent.prototype._initTreeData = function () {
|
36899
|
+
this.treeControl = new tree.FlatTreeControl(this.getLevel, this.isExpandable);
|
36900
|
+
this.treeFlattener = new tree$1.MatTreeFlattener(this._transformer, this.getLevel, this.isExpandable, this._getChild);
|
36901
|
+
this.dataSource = new tree$1.MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
36902
|
+
var _treeDataInput = ___namespace.cloneDeep(this.config.treeData);
|
36903
|
+
if (!_treeDataInput.length)
|
36904
|
+
return;
|
36905
|
+
var treeData = this.treeDepartmentService.convertToTreeData(_treeDataInput);
|
36906
|
+
this.updateDataTree(treeData);
|
36907
|
+
this.getLoading$.next(false);
|
36908
|
+
};
|
36909
|
+
SelectProcessDataTreeComponent.prototype._handleListSelected = function () {
|
36910
|
+
if (!this.config.selectedList.length)
|
36911
|
+
return;
|
36912
|
+
var selectedList = this.config.selectedList.sort(function (x, y) { return x.isGroup ? -1 : y.isGroup ? 1 : 0; });
|
36913
|
+
for (var i = 0; i < selectedList.length; i++) {
|
36914
|
+
var item = selectedList[i];
|
36915
|
+
var node = this.getNodeById(item.id);
|
36916
|
+
if (node) {
|
36917
|
+
var nestedNode = this.convertToNestedNode(node);
|
36918
|
+
nestedNode.isGroup = item.isGroup;
|
36919
|
+
nestedNode.groupId = item.groupId;
|
36920
|
+
this.checkListSelection.select(node);
|
36921
|
+
this.handleCheckNode(node);
|
36922
|
+
this.onExpandAllParent(node);
|
36923
|
+
}
|
36924
|
+
}
|
36925
|
+
this.cdRef.detectChanges();
|
36926
|
+
};
|
36927
|
+
SelectProcessDataTreeComponent.prototype._initListSelected = function () {
|
36928
|
+
var _b;
|
36929
|
+
this._selectedList = this.treeDepartmentService.convertToTreeData(this.config.selectedList);
|
36930
|
+
//Convert array selectedList into nested array as 1 level form
|
36931
|
+
var indexRemove = [];
|
36932
|
+
var _loop_1 = function (i) {
|
36933
|
+
var item = this_1._selectedList[i];
|
36934
|
+
var result = this_1.treeDepartmentService.getDescendantsOfNode(item);
|
36935
|
+
item.children = result;
|
36936
|
+
var index = this_1._selectedList.findIndex(function (x) { return result.some(function (x1) { return x1.id === x.id; }); });
|
36937
|
+
if (index < 0)
|
36938
|
+
return "continue";
|
36939
|
+
indexRemove.push(index);
|
36940
|
+
};
|
36941
|
+
var this_1 = this;
|
36942
|
+
for (var i = 0; i < this._selectedList.length; i++) {
|
36943
|
+
_loop_1(i);
|
36944
|
+
}
|
36945
|
+
this._selectedList = this._selectedList.filter(function (_, index) { return !indexRemove.includes(index); });
|
36946
|
+
(_b = this.resultSelected).push.apply(_b, __spreadArray([], __read(this._selectedList)));
|
36947
|
+
this.onValueChangeEvent.emit(this.resultSelected);
|
36948
|
+
};
|
36949
|
+
// handle selected list when data nodes change
|
36950
|
+
SelectProcessDataTreeComponent.prototype._handleAfterDataNodeChangeEvent = function () {
|
36951
|
+
var _this = this;
|
36952
|
+
if (this.config.lazy) {
|
36953
|
+
this.selectedListAfterDataNodeChange$
|
36954
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.tap(function (data) {
|
36955
|
+
if (!_this._selectedList.length)
|
36956
|
+
return;
|
36957
|
+
_this._selectedList.forEach(function (item) {
|
36958
|
+
if (!item.parentId) {
|
36959
|
+
var node = _this.getNodeById(item.id);
|
36960
|
+
if (node)
|
36961
|
+
item.parentId = node.parentId;
|
36962
|
+
}
|
36963
|
+
});
|
36964
|
+
var _loop_2 = function (i) {
|
36965
|
+
var _b;
|
36966
|
+
var element = data[i];
|
36967
|
+
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; })); });
|
36968
|
+
if (!!item) {
|
36969
|
+
var node = _this.getNodeById(item.id);
|
36970
|
+
if (!node)
|
36971
|
+
return "continue";
|
36972
|
+
var nestedNode = _this.convertToNestedNode(node);
|
36973
|
+
nestedNode.isGroup = item.isGroup;
|
36974
|
+
nestedNode.groupId = item.groupId;
|
36975
|
+
_this.checkListSelection.select(node);
|
36976
|
+
var descendants = _this.getListChildrenOfNode(node);
|
36977
|
+
if (node.markedGetChildren) {
|
36978
|
+
if (!item.children.length)
|
36979
|
+
return "continue";
|
36980
|
+
var itemSelect = descendants.filter(function (x) { return item.children.map(function (x1) { return x1.id; }).includes(x.id); });
|
36981
|
+
if (!itemSelect.length)
|
36982
|
+
return "continue";
|
36983
|
+
itemSelect.forEach(function (_item) {
|
36984
|
+
var _nestedNode = _this.convertToNestedNode(_item);
|
36985
|
+
_nestedNode.groupId = item.children[0].groupId;
|
36986
|
+
_nestedNode.isGroup = false;
|
36987
|
+
});
|
36988
|
+
(_b = _this.checkListSelection).select.apply(_b, __spreadArray([], __read(itemSelect)));
|
36989
|
+
}
|
36990
|
+
}
|
36991
|
+
};
|
36992
|
+
for (var i = 0; i < data.length; i++) {
|
36993
|
+
_loop_2(i);
|
36994
|
+
}
|
36995
|
+
}))
|
36996
|
+
.subscribe();
|
36997
|
+
}
|
36998
|
+
};
|
36999
|
+
/**
|
37000
|
+
* This method use for lazy mode, do some thing before init list node selected
|
37001
|
+
* @param callback
|
37002
|
+
* @returns
|
37003
|
+
*/
|
37004
|
+
SelectProcessDataTreeComponent.prototype.onBeforeInitNodeSelected = function (callback) {
|
37005
|
+
return __awaiter(this, void 0, void 0, function () {
|
37006
|
+
return __generator(this, function (_b) {
|
37007
|
+
switch (_b.label) {
|
37008
|
+
case 0:
|
37009
|
+
if (!this.config.lazy)
|
37010
|
+
return [2 /*return*/];
|
37011
|
+
this.getLoadingMore$.next(true);
|
37012
|
+
if (!!!callback) return [3 /*break*/, 2];
|
37013
|
+
return [4 /*yield*/, callback()];
|
37014
|
+
case 1:
|
37015
|
+
_b.sent();
|
37016
|
+
_b.label = 2;
|
37017
|
+
case 2:
|
37018
|
+
this.onBeforeInitNodeSelected$.next();
|
37019
|
+
return [2 /*return*/];
|
37020
|
+
}
|
37021
|
+
});
|
37022
|
+
});
|
37023
|
+
};
|
37024
|
+
//Handle item selection changed
|
37025
|
+
SelectProcessDataTreeComponent.prototype._handleItemSelectionChanged = function () {
|
37026
|
+
var _this = this;
|
37027
|
+
this.checkListSelection.changed
|
37028
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
37029
|
+
.subscribe(function (_b) {
|
37030
|
+
var added = _b.added, removed = _b.removed;
|
37031
|
+
var checkExistInResult = function (node) { return _this.resultSelected.findIndex(function (x) { return x.id === node.id; }) > -1; };
|
37032
|
+
if (added.length) {
|
37033
|
+
added.forEach(function (node) {
|
37034
|
+
var nestedNode = ___namespace.cloneDeep(_this.convertToNestedNode(node));
|
37035
|
+
nestedNode.children = [];
|
37036
|
+
if (!_this.config.lazy)
|
37037
|
+
nestedNode.childCount = _this.getListChildrenOfNode(node).length;
|
37038
|
+
var existGroup = ___namespace.cloneDeep(_this.getAllParentNode(node)
|
37039
|
+
.map(function (item) { return _this.convertToNestedNode(item); })
|
37040
|
+
.reverse()
|
37041
|
+
.find(function (x) { return x.isGroup; }));
|
37042
|
+
if (!!existGroup) {
|
37043
|
+
var flatExistGroup_1 = _this.getNodeById(existGroup.id);
|
37044
|
+
nestedNode.groupId = existGroup.id;
|
37045
|
+
var groupResult = _this.resultSelected.find(function (x) { return x.id === existGroup.id; });
|
37046
|
+
if (groupResult && !groupResult.children.some(function (x) { return x.id === nestedNode.id; })) {
|
37047
|
+
groupResult.isGroup = existGroup.isGroup;
|
37048
|
+
groupResult.children.push(nestedNode);
|
37049
|
+
}
|
37050
|
+
_this._onSelectionNodeChangeEvent('updated', [groupResult]);
|
37051
|
+
// re-filter result selected
|
37052
|
+
_this.resultSelected = _this.resultSelected.filter(function (item) { return !_this.getListChildrenOfNode(flatExistGroup_1).map(function (x) { return x.id; }).includes(item.id); });
|
37053
|
+
return;
|
37054
|
+
}
|
37055
|
+
if (checkExistInResult(node))
|
37056
|
+
return;
|
37057
|
+
_this.resultSelected.push(nestedNode);
|
37058
|
+
_this._onSelectionNodeChangeEvent('added', [nestedNode]);
|
37059
|
+
});
|
37060
|
+
}
|
37061
|
+
if (removed.length) {
|
37062
|
+
removed.forEach(function (node) {
|
37063
|
+
var nestedNode = _this.convertToNestedNode(node);
|
37064
|
+
var children = _this.getListChildrenOfNode(node);
|
37065
|
+
if (nestedNode.isGroup) {
|
37066
|
+
var _item = _this.resultSelected.find(function (x) { return x.id === node.id; });
|
37067
|
+
if (!_item)
|
37068
|
+
return;
|
37069
|
+
children.forEach(function (item) { return item.groupId = null; });
|
37070
|
+
_this.resultSelected.splice(_this.resultSelected.indexOf(_item), 1);
|
37071
|
+
_this._onSelectionNodeChangeEvent('removed', [_item]);
|
37072
|
+
return;
|
37073
|
+
}
|
37074
|
+
var group = _this.resultSelected.find(function (x) { return x.id === nestedNode.groupId; });
|
37075
|
+
if (!group) {
|
37076
|
+
var _item = _this.resultSelected.find(function (x) { return x.id === node.id; });
|
37077
|
+
if (!_item)
|
37078
|
+
return;
|
37079
|
+
_this.resultSelected.splice(_this.resultSelected.indexOf(_item), 1);
|
37080
|
+
_this._onSelectionNodeChangeEvent('removed', [_item]);
|
37081
|
+
return;
|
37082
|
+
}
|
37083
|
+
var childNodes = _this.getListChildrenOfNode(node).concat(node);
|
37084
|
+
var _loop_3 = function (i) {
|
37085
|
+
var item = childNodes[i];
|
37086
|
+
var _node = _this.getNodeById(item.id);
|
37087
|
+
if (group.children.some(function (x) { return x.id === _node.id; }) && !_this.isSelectedNode(_node)) {
|
37088
|
+
var _item = group.children.find(function (x) { return x.id === item.id; });
|
37089
|
+
if (!_item)
|
37090
|
+
return { value: void 0 };
|
37091
|
+
group.children.splice(group.children.indexOf(_item), 1);
|
37092
|
+
_this._onSelectionNodeChangeEvent('updated', [group]);
|
37093
|
+
}
|
37094
|
+
};
|
37095
|
+
for (var i = 0; i < childNodes.length; i++) {
|
37096
|
+
var state_1 = _loop_3(i);
|
37097
|
+
if (typeof state_1 === "object")
|
37098
|
+
return state_1.value;
|
37099
|
+
}
|
37100
|
+
});
|
37101
|
+
}
|
37102
|
+
_this._mapToResultSearch();
|
37103
|
+
_this.onValueChangeEvent.emit(_this.resultSelected);
|
37104
|
+
});
|
37105
|
+
};
|
37106
|
+
SelectProcessDataTreeComponent.prototype._onSelectionNodeChangeEvent = function (state, data) {
|
37107
|
+
switch (state) {
|
37108
|
+
case 'removed':
|
37109
|
+
this.selectionNodeChangeEvent.emit({
|
37110
|
+
removed: data,
|
37111
|
+
added: [],
|
37112
|
+
updated: [],
|
37113
|
+
source: new collections.SelectionModel(true, this.resultSelected)
|
37114
|
+
});
|
37115
|
+
break;
|
37116
|
+
case 'updated':
|
37117
|
+
this.selectionNodeChangeEvent.emit({
|
37118
|
+
removed: [],
|
37119
|
+
added: [],
|
37120
|
+
updated: data,
|
37121
|
+
source: new collections.SelectionModel(true, this.resultSelected)
|
37122
|
+
});
|
37123
|
+
break;
|
37124
|
+
case 'added':
|
37125
|
+
this.selectionNodeChangeEvent.emit({
|
37126
|
+
removed: [],
|
37127
|
+
added: data,
|
37128
|
+
updated: [],
|
37129
|
+
source: new collections.SelectionModel(true, this.resultSelected)
|
37130
|
+
});
|
37131
|
+
break;
|
37132
|
+
default:
|
37133
|
+
return;
|
37134
|
+
}
|
37135
|
+
};
|
37136
|
+
SelectProcessDataTreeComponent.prototype._handleSearchEvent = function () {
|
37137
|
+
var _this = this;
|
37138
|
+
this.searchDepartment$
|
37139
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
37140
|
+
.subscribe(function (result) {
|
37141
|
+
_this.resultSearch = [];
|
37142
|
+
_this.CURRENT_PAGESIZE = result.pageSize;
|
37143
|
+
_this.getLoading$.next(false);
|
37144
|
+
if (result && result.length) {
|
37145
|
+
result.data.forEach(function (item) {
|
37146
|
+
var _a;
|
37147
|
+
var node = _this.getNodeById(item.id);
|
37148
|
+
var location = [];
|
37149
|
+
if (_this.config.lazy) {
|
37150
|
+
location = ((_a = item.path) === null || _a === void 0 ? void 0 : _a.map(function (x) { return ({ name: x }); })) || [];
|
37151
|
+
}
|
37152
|
+
else {
|
37153
|
+
var parents = node ? _this.getAllParentNode(node) : [];
|
37154
|
+
location = parents.length ? parents.map(function (x) { return ({
|
37155
|
+
id: x.id,
|
37156
|
+
name: x.name,
|
37157
|
+
}); }).reverse() : [];
|
37158
|
+
}
|
37159
|
+
_this.resultSearch.push(Object.assign(Object.assign({}, item), { disabled: !_this.config.lazy && _this.config.checkSearchMappingTree && !node, location: __spreadArray(__spreadArray([], __read(location)), [
|
37160
|
+
{
|
37161
|
+
id: item.id,
|
37162
|
+
name: item.name,
|
37163
|
+
}
|
37164
|
+
]), isLoading: false }));
|
37165
|
+
});
|
37166
|
+
_this.textSearchSubject$.next(_this.formSearchControl.value);
|
37167
|
+
if (_this.config.clearCheckListSelectionSearchWhenHandle)
|
37168
|
+
_this.checkListSelectionSearch.clear();
|
37169
|
+
_this._mapToResultSearch();
|
37170
|
+
_this.setIndexView(1);
|
37171
|
+
}
|
37172
|
+
});
|
37173
|
+
};
|
37174
|
+
SelectProcessDataTreeComponent.prototype._handleActiveNodeEvent = function () {
|
37175
|
+
var _this = this;
|
37176
|
+
this.scrollToNodeEvent$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.switchMap(function (val) {
|
37177
|
+
var delayTiming = _this.getIndexView$.value === 1 ? 700 : 0;
|
37178
|
+
_this.setIndexView(0);
|
37179
|
+
return rxjs.of(val).pipe(operators.delay(delayTiming), operators.takeUntil(_this.ngUnsubscribe));
|
37180
|
+
}))
|
37181
|
+
.subscribe(function (res) {
|
37182
|
+
_this.onScrollIntoNode(res);
|
37183
|
+
});
|
37184
|
+
this.getActiveNodeEvent$.pipe(operators.takeUntil(this.ngUnsubscribe), operators.switchMap(function (val) {
|
37185
|
+
_this.activeNode = val;
|
37186
|
+
return rxjs.timer(1500);
|
37187
|
+
}))
|
37188
|
+
.subscribe(function (_) {
|
37189
|
+
_this.activeNode = '';
|
37190
|
+
});
|
37191
|
+
};
|
37192
|
+
SelectProcessDataTreeComponent.prototype.updateDataTree = function (data) {
|
37193
|
+
this.getDataTree$.next(data);
|
37194
|
+
};
|
37195
|
+
SelectProcessDataTreeComponent.prototype.setLoadingStateNode = function (isLoading, nodeId) {
|
37196
|
+
var node = this.getNodeById(nodeId);
|
37197
|
+
if (!node)
|
37198
|
+
return;
|
37199
|
+
node.isLoading = isLoading;
|
37200
|
+
this.checkLoadingOfParent(node);
|
37201
|
+
};
|
37202
|
+
SelectProcessDataTreeComponent.prototype.onExpandNode = function (node) {
|
37203
|
+
if (!(node === null || node === void 0 ? void 0 : node.expandable))
|
37204
|
+
return;
|
37205
|
+
this.treeControl.toggle(node);
|
37206
|
+
if (this.config.lazy && this.treeControl.isExpanded(node) && !node.markedGetChildren) {
|
37207
|
+
node.isLoading = true;
|
37208
|
+
this.checkLoadingOfParent(node);
|
37209
|
+
}
|
37210
|
+
this.onExpandNodeEvent.emit(node);
|
37211
|
+
};
|
37212
|
+
SelectProcessDataTreeComponent.prototype.onOptionSearchSelected = function (value) {
|
37213
|
+
var flatNode = this.getNodeById(value.id);
|
37214
|
+
if (!flatNode)
|
37215
|
+
return;
|
37216
|
+
this.checkListSelection.select(flatNode);
|
37217
|
+
this.handleCheckNode(flatNode);
|
37218
|
+
this.onScrollIntoNode(flatNode.id);
|
37219
|
+
};
|
37220
|
+
SelectProcessDataTreeComponent.prototype.onCheckAllRootTreeNode = function () {
|
37221
|
+
var _b;
|
37222
|
+
var _this = this;
|
37223
|
+
if (this.config.isSelectOne || !this.config.activeSelectAllNode)
|
37224
|
+
return;
|
37225
|
+
if (this.isAllDepartmentSelected) {
|
37226
|
+
this.treeControl.dataNodes.forEach(function (node) {
|
37227
|
+
var nestedNode = _this.convertToNestedNode(node);
|
37228
|
+
nestedNode.isGroup = false;
|
37229
|
+
});
|
37230
|
+
(_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(this.treeControl.dataNodes)));
|
37231
|
+
return;
|
37232
|
+
}
|
37233
|
+
;
|
37234
|
+
this.departmentRoots.forEach(function (node) {
|
37235
|
+
if (!_this.isIncludeChildren) {
|
37236
|
+
_this.treeControl.dataNodes.filter(function (x) { return !_this.isSelectedNode(x); })
|
37237
|
+
.forEach(function (x) { return _this.onCheckNode(x); });
|
37238
|
+
return;
|
37239
|
+
}
|
37240
|
+
if (!_this.isSelectedNode(node)) {
|
37241
|
+
_this.onCheckNode(node);
|
37242
|
+
return;
|
37243
|
+
}
|
37244
|
+
var nestedNode = _this.convertToNestedNode(node);
|
37245
|
+
if (nestedNode.isGroup && _this.isCheckAll(node) || !node.expandable)
|
37246
|
+
return;
|
37247
|
+
_this.getListChildrenOfNode(node)
|
37248
|
+
.filter(function (item) { return !_this.isSelectedNode(item); })
|
37249
|
+
.forEach(function (item) { return !_this.isSelectedNode(item) && _this.onCheckNode(item); });
|
37250
|
+
if (!nestedNode.isGroup) {
|
37251
|
+
_this.checkListSelection.deselect(node);
|
37252
|
+
_this.onCheckNode(node);
|
37253
|
+
return;
|
37254
|
+
}
|
37255
|
+
});
|
37256
|
+
};
|
37257
|
+
SelectProcessDataTreeComponent.prototype.onCheckNode = function (node, fireEventCheckNode) {
|
37258
|
+
var _this = this;
|
37259
|
+
if (fireEventCheckNode === void 0) { fireEventCheckNode = true; }
|
37260
|
+
if (!node)
|
37261
|
+
return;
|
37262
|
+
if (fireEventCheckNode)
|
37263
|
+
this.onCheckNodeEvent.emit(node);
|
37264
|
+
this.checkListSelection.toggle(node);
|
37265
|
+
if (this.config.isSelectOne) {
|
37266
|
+
this._handleSelectOne(node.id);
|
37267
|
+
return;
|
37268
|
+
}
|
37269
|
+
if (this.config.lazy && node.expandable && !node.markedGetChildren && fireEventCheckNode) {
|
37270
|
+
if (!this._handlingLazyObject.checkNode) {
|
37271
|
+
this.handleCheckNode(node);
|
37272
|
+
return;
|
37273
|
+
}
|
37274
|
+
node.isLoading = this.isIncludeChildren;
|
37275
|
+
var children = this.getListChildrenOfNode(node).filter(function (x) { return x.expandable && !x.markedGetChildren; });
|
37276
|
+
children.forEach(function (x) { return x.isLoading = _this.isIncludeChildren; });
|
37277
|
+
return;
|
37278
|
+
}
|
37279
|
+
this.handleCheckNode(node);
|
37280
|
+
};
|
37281
|
+
SelectProcessDataTreeComponent.prototype._handleSelectOne = function (nodeId) {
|
37282
|
+
var nodeTree = this.treeControl.dataNodes.find(function (node) { return node.id === nodeId; });
|
37283
|
+
var reSelectSelection = function () {
|
37284
|
+
var params = [];
|
37285
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
37286
|
+
params[_i] = arguments[_i];
|
37287
|
+
}
|
37288
|
+
params.forEach(function (selection) {
|
37289
|
+
var selected = selection.selected.filter(function (x) { return x.id !== nodeId; });
|
37290
|
+
selection.deselect.apply(selection, __spreadArray([], __read(selected)));
|
37291
|
+
});
|
37292
|
+
};
|
37293
|
+
if (!nodeTree) {
|
37294
|
+
var item = this.checkListSelectionSearch.selected.find(function (x) { return x.id === nodeId; });
|
37295
|
+
if (!item)
|
37296
|
+
return;
|
37297
|
+
this.resultSelected = [{
|
37298
|
+
id: item.id,
|
37299
|
+
parentId: item.parentId,
|
37300
|
+
name: item.name,
|
37301
|
+
externalName: item.externalName,
|
37302
|
+
children: []
|
37303
|
+
}];
|
37304
|
+
this._selectedList = __spreadArray([], __read(this.resultSelected));
|
37305
|
+
this.onValueChangeEvent.emit(this.resultSelected);
|
37306
|
+
reSelectSelection(this.checkListSelection, this.checkListSelectionSearch);
|
37307
|
+
this.cdRef.detectChanges();
|
37308
|
+
return;
|
37309
|
+
}
|
37310
|
+
if (this.isSelectedNode(nodeTree)) {
|
37311
|
+
var nestedNode = this.convertToNestedNode(this.checkListSelection.selected[0]);
|
37312
|
+
this._selectedList = __spreadArray([], __read(this.resultSelected));
|
37313
|
+
reSelectSelection(this.checkListSelection, this.checkListSelectionSearch);
|
37314
|
+
return;
|
37315
|
+
}
|
37316
|
+
this.resultSelected = [];
|
37317
|
+
this._selectedList = [];
|
37318
|
+
};
|
37319
|
+
SelectProcessDataTreeComponent.prototype.onExpandAllParent = function (node) {
|
37320
|
+
var _this = this;
|
37321
|
+
var parents = this.getAllParentNode(node);
|
37322
|
+
if (parents === null || parents === void 0 ? void 0 : parents.length) {
|
37323
|
+
parents.forEach(function (parent) {
|
37324
|
+
if (!_this.treeControl.isExpanded(parent))
|
37325
|
+
_this.onExpandNode(parent);
|
37326
|
+
});
|
37327
|
+
}
|
37328
|
+
};
|
37329
|
+
SelectProcessDataTreeComponent.prototype.onRemoveNode = function (nodeId) {
|
37330
|
+
var flatNode = this.getNodeById(nodeId);
|
37331
|
+
if (!flatNode) {
|
37332
|
+
var item = this._selectedList.find(function (x) { return x.id === nodeId; });
|
37333
|
+
if (!item)
|
37334
|
+
return;
|
37335
|
+
this._updateSelectedList('remove', item, this._selectedList, this.resultSelected);
|
37336
|
+
this.cdRef.detectChanges();
|
37337
|
+
return;
|
37338
|
+
}
|
37339
|
+
this.checkListSelection.deselect(flatNode);
|
37340
|
+
this.handleCheckNode(flatNode);
|
37341
|
+
};
|
37342
|
+
SelectProcessDataTreeComponent.prototype.onSelectNode = function () {
|
37343
|
+
var _b;
|
37344
|
+
var nodeIds = [];
|
37345
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
37346
|
+
nodeIds[_i] = arguments[_i];
|
37347
|
+
}
|
37348
|
+
var nodes = this.treeControl.dataNodes.filter(function (x) { return nodeIds.includes(x.id); });
|
37349
|
+
if (!nodes.length)
|
37350
|
+
return;
|
37351
|
+
(_b = this.checkListSelection).select.apply(_b, __spreadArray([], __read(nodes)));
|
37352
|
+
};
|
37353
|
+
SelectProcessDataTreeComponent.prototype.onDeselectNode = function () {
|
37354
|
+
var _b;
|
37355
|
+
var nodeIds = [];
|
37356
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
37357
|
+
nodeIds[_i] = arguments[_i];
|
37358
|
+
}
|
37359
|
+
var nodes = this.treeControl.dataNodes.filter(function (x) { return nodeIds.includes(x.id); });
|
37360
|
+
if (!nodes.length)
|
37361
|
+
return;
|
37362
|
+
(_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(nodes)));
|
37363
|
+
};
|
37364
|
+
/**
|
37365
|
+
* Toggles a value between selected and deselected.
|
37366
|
+
* @param nodeId :id of node
|
37367
|
+
*/
|
37368
|
+
SelectProcessDataTreeComponent.prototype.onToggleNode = function (nodeId) {
|
37369
|
+
var node = this.getNodeById(nodeId);
|
37370
|
+
if (!node)
|
37371
|
+
return;
|
37372
|
+
this.checkListSelection.toggle(node);
|
37373
|
+
};
|
37374
|
+
SelectProcessDataTreeComponent.prototype.isIndeterminate = function (node) {
|
37375
|
+
var _this = this;
|
37376
|
+
var childSelected = this.getListChildrenOfNode(node).filter(function (item) { return _this.isSelectedNode(item); });
|
37377
|
+
return (!!childSelected.length && !this.isSelectedNode(node));
|
37378
|
+
};
|
37379
|
+
SelectProcessDataTreeComponent.prototype.isCheckAll = function (node) {
|
37380
|
+
var _this = this;
|
37381
|
+
var listCheck = __spreadArray(__spreadArray([], __read(this.getListChildrenOfNode(node))), [node]);
|
37382
|
+
return listCheck.every(function (item) { return _this.isSelectedNode(item); });
|
37383
|
+
};
|
37384
|
+
/**
|
37385
|
+
* This function handle check node of tree
|
37386
|
+
* @param node node of tree
|
37387
|
+
* @param callback do something before handle check node
|
37388
|
+
* @returns
|
37389
|
+
*/
|
37390
|
+
SelectProcessDataTreeComponent.prototype.onBeforeCheckNode = function (node, callback) {
|
37391
|
+
return __awaiter(this, void 0, void 0, function () {
|
37392
|
+
return __generator(this, function (_b) {
|
37393
|
+
switch (_b.label) {
|
37394
|
+
case 0:
|
37395
|
+
this._handlingLazyObject.checkNode = true;
|
37396
|
+
if (!!!callback) return [3 /*break*/, 2];
|
37397
|
+
return [4 /*yield*/, callback(node)];
|
37398
|
+
case 1:
|
37399
|
+
_b.sent();
|
37400
|
+
_b.label = 2;
|
37401
|
+
case 2:
|
37402
|
+
this.handleCheckNode(node);
|
37403
|
+
this._handlingLazyObject.checkNode = false;
|
37404
|
+
return [2 /*return*/];
|
37405
|
+
}
|
37406
|
+
});
|
37407
|
+
});
|
37408
|
+
};
|
37409
|
+
SelectProcessDataTreeComponent.prototype.handleCheckNode = function (node) {
|
37410
|
+
var _b, _c, _d;
|
37411
|
+
var _this = this;
|
37412
|
+
var isSelected = this.isSelectedNode(node);
|
37413
|
+
var childSelected = this.getChildrenSelected(node);
|
37414
|
+
var nestedNode = this.convertToNestedNode(node);
|
37415
|
+
if (isSelected) {
|
37416
|
+
// Check existed group
|
37417
|
+
var existedGroup_1 = this.getAllParentNode(node).find(function (x) { return _this.convertToNestedNode(x).isGroup; });
|
37418
|
+
if (!this.isIncludeChildren) {
|
37419
|
+
nestedNode.groupId = existedGroup_1 === null || existedGroup_1 === void 0 ? void 0 : existedGroup_1.id;
|
37420
|
+
return;
|
37421
|
+
}
|
37422
|
+
var children = this.getListChildrenOfNode(node);
|
37423
|
+
nestedNode.isGroup = !existedGroup_1 && !!children.length;
|
37424
|
+
if (!children.length)
|
37425
|
+
return;
|
37426
|
+
children.forEach(function (x) {
|
37427
|
+
var _node = _this.convertToNestedNode(x);
|
37428
|
+
_node.groupId = existedGroup_1 ? existedGroup_1.id : node.id;
|
37429
|
+
_node.isGroup = false;
|
37430
|
+
});
|
37431
|
+
this.updateDataTree(this.currentTreeData);
|
37432
|
+
(_b = this.checkListSelection).deselect.apply(_b, __spreadArray([], __read(childSelected.map(function (x) { return _this.resetNode(x); }))));
|
37433
|
+
(_c = this.checkListSelection).select.apply(_c, __spreadArray([], __read(children.map(function (x) { return _this.resetNode(x); }))));
|
37434
|
+
return;
|
37435
|
+
}
|
37436
|
+
var _selectedIndex = this._selectedList.findIndex(function (x) { return x.id === node.id; });
|
37437
|
+
_selectedIndex > -1 && this._selectedList.splice(_selectedIndex, 1);
|
37438
|
+
var deselectNodes = (this.isIncludeChildren || nestedNode.isGroup) ? childSelected : [node];
|
37439
|
+
(_d = this.checkListSelection).deselect.apply(_d, __spreadArray([], __read(deselectNodes)));
|
37440
|
+
nestedNode.isGroup = false;
|
37441
|
+
this.updateDataTree(this.currentTreeData);
|
37442
|
+
return;
|
37443
|
+
};
|
37444
|
+
SelectProcessDataTreeComponent.prototype.resetNode = function (node) {
|
37445
|
+
node.isGroup = false;
|
37446
|
+
return node;
|
37447
|
+
};
|
37448
|
+
SelectProcessDataTreeComponent.prototype.isSelectedNode = function (node) {
|
37449
|
+
return node && this.checkListSelection.isSelected(node);
|
37450
|
+
};
|
37451
|
+
SelectProcessDataTreeComponent.prototype.getChildrenSelected = function (node) {
|
37452
|
+
var _this = this;
|
37453
|
+
return this.getListChildrenOfNode(node).filter(function (x) { return _this.isSelectedNode(x); });
|
37454
|
+
};
|
37455
|
+
/**
|
37456
|
+
* Gets a list of the data node's subtree of descendent data nodes.
|
37457
|
+
* @param node
|
37458
|
+
* @returns
|
37459
|
+
*/
|
37460
|
+
SelectProcessDataTreeComponent.prototype.getListChildrenOfNode = function (node) {
|
37461
|
+
var flatNode = this.getNodeById(node.id);
|
37462
|
+
if (!flatNode)
|
37463
|
+
return [];
|
37464
|
+
return this.treeControl.getDescendants(flatNode);
|
37465
|
+
};
|
37466
|
+
SelectProcessDataTreeComponent.prototype._mapToNestedListNode = function (flatNodeList) {
|
37467
|
+
var _this = this;
|
37468
|
+
return flatNodeList.map(function (item) { return _this.convertToNestedNode(item); });
|
37469
|
+
};
|
37470
|
+
SelectProcessDataTreeComponent.prototype.convertToNestedNode = function (node) {
|
37471
|
+
return this.flatTreeNodeMap.get(node) || {};
|
37472
|
+
};
|
37473
|
+
SelectProcessDataTreeComponent.prototype.convertToFlatNode = function (node) {
|
37474
|
+
return this.nestedTreeNodeMap.get(node);
|
37475
|
+
};
|
37476
|
+
SelectProcessDataTreeComponent.prototype.getAllParentNode = function (node) {
|
37477
|
+
var listParent = [];
|
37478
|
+
var parent = this.getParentNode(node);
|
37479
|
+
while (parent) {
|
37480
|
+
listParent.push(parent);
|
37481
|
+
parent = this.getParentNode(parent);
|
37482
|
+
}
|
37483
|
+
return listParent;
|
37484
|
+
};
|
37485
|
+
SelectProcessDataTreeComponent.prototype.getParentNode = function (node) {
|
37486
|
+
var currentLevel = this.getLevel(node);
|
37487
|
+
if (currentLevel < 1)
|
37488
|
+
return;
|
37489
|
+
var index = this.treeControl.dataNodes.indexOf(node) - 1;
|
37490
|
+
for (var i = index; i >= 0; i--) {
|
37491
|
+
var currentNode = this.treeControl.dataNodes[i];
|
37492
|
+
if (this.getLevel(currentNode) < currentLevel) {
|
37493
|
+
return currentNode;
|
37494
|
+
}
|
37495
|
+
}
|
37496
|
+
return;
|
37497
|
+
};
|
37498
|
+
SelectProcessDataTreeComponent.prototype.getItemIconType = function (item) {
|
37499
|
+
if (!!item.itemMatIcon)
|
37500
|
+
return this.itemIconType.name;
|
37501
|
+
if (!!item.itemIconSvg)
|
37502
|
+
return this.itemIconType.svg;
|
37503
|
+
if (!!item.itemIcon)
|
37504
|
+
return this.itemIconType.path;
|
37505
|
+
return;
|
37506
|
+
};
|
37507
|
+
SelectProcessDataTreeComponent.prototype.onScrollIntoNode = function (nodeId) {
|
37508
|
+
var flatNode = this.getNodeById(nodeId);
|
37509
|
+
if (!nodeId)
|
37510
|
+
return;
|
37511
|
+
this.onExpandNode(flatNode);
|
37512
|
+
this.onExpandAllParent(flatNode);
|
37513
|
+
var index = this.treeControl.dataNodes.findIndex(function (x) { return x.id === flatNode.id; });
|
37514
|
+
if (!this.cdkVirtualScrollViewport)
|
37515
|
+
return;
|
37516
|
+
this.cdkVirtualScrollViewport.scrollToIndex(index, 'smooth');
|
37517
|
+
this.getActiveNodeEvent$.next(nodeId);
|
37518
|
+
};
|
37519
|
+
SelectProcessDataTreeComponent.prototype.onSearch = function () {
|
37520
|
+
var _a;
|
37521
|
+
if (!this.formSearchControl.value || ((_a = this.formSearchControl.value) === null || _a === void 0 ? void 0 : _a.trim()) === '')
|
37522
|
+
return;
|
37523
|
+
this.getLoading$.next(true);
|
37524
|
+
this.setIndexView(1);
|
37525
|
+
this.onSearchEvent.emit(this.formSearchControl.value);
|
37526
|
+
if (!this.paginatorSearch)
|
37527
|
+
return;
|
37528
|
+
this.paginatorSearch.changePage(0);
|
37529
|
+
this.paginatorSearch.renderDisplayNumberOfpages();
|
37530
|
+
};
|
37531
|
+
SelectProcessDataTreeComponent.prototype.setResultSearch = function (data) {
|
37532
|
+
this.searchDepartment$.next(data);
|
37533
|
+
};
|
37534
|
+
SelectProcessDataTreeComponent.prototype.onClickResultItem = function (item) {
|
37535
|
+
var node = this.getNodeById(item.id);
|
37536
|
+
if (node) {
|
37537
|
+
this.scrollToNode(node.id);
|
37538
|
+
}
|
37539
|
+
};
|
37540
|
+
SelectProcessDataTreeComponent.prototype.onBreadCrumbItemClick = function (item) {
|
37541
|
+
var _this = this;
|
37542
|
+
var node = this.getNodeById(item.id);
|
37543
|
+
if (node) {
|
37544
|
+
this.setIndexView(0);
|
37545
|
+
rxjs.of(node.id).pipe(operators.delay(700), operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
|
37546
|
+
_this.onScrollIntoNode(res);
|
37547
|
+
});
|
37548
|
+
}
|
37549
|
+
};
|
37550
|
+
SelectProcessDataTreeComponent.prototype.onCheckItemSearchResult = function (item) {
|
37551
|
+
var _b;
|
37552
|
+
this.checkListSelectionSearch.toggle(item);
|
37553
|
+
if (this.config.isSelectOne) {
|
37554
|
+
(_b = this.checkListSelectionSearch).deselect.apply(_b, __spreadArray([], __read(this.checkListSelectionSearch.selected.filter(function (x) { return x.id != item.id; }))));
|
37555
|
+
}
|
37556
|
+
this.onCheckItemSearchEvent.emit({
|
37557
|
+
state: this.checkListSelectionSearch.isSelected(item),
|
37558
|
+
item: item
|
37559
|
+
});
|
37560
|
+
if (this.config.lazy) {
|
37561
|
+
if (!this._handlingLazyObject.checkItemSearch) {
|
37562
|
+
this._handleCheckResutlSearch(item);
|
37563
|
+
return;
|
37564
|
+
}
|
37565
|
+
return;
|
37566
|
+
}
|
37567
|
+
this._handleCheckResutlSearch(item);
|
37568
|
+
this.onValueChangeEvent.emit(this.resultSelected);
|
37569
|
+
};
|
37570
|
+
SelectProcessDataTreeComponent.prototype.onBeforeCheckItemSearch = function (item, callback) {
|
37571
|
+
return __awaiter(this, void 0, void 0, function () {
|
37572
|
+
var isSelect;
|
37573
|
+
return __generator(this, function (_b) {
|
37574
|
+
switch (_b.label) {
|
37575
|
+
case 0:
|
37576
|
+
item.isLoading = true;
|
37577
|
+
this._handlingLazyObject.checkItemSearch = true;
|
37578
|
+
isSelect = this.isSelectItemSearch(item.id);
|
37579
|
+
if (!!!callback) return [3 /*break*/, 2];
|
37580
|
+
return [4 /*yield*/, callback(item)];
|
37581
|
+
case 1:
|
37582
|
+
_b.sent();
|
37583
|
+
_b.label = 2;
|
37584
|
+
case 2:
|
37585
|
+
item.isLoading = false;
|
37586
|
+
this._handleCheckResutlSearch(item, isSelect);
|
37587
|
+
this.onValueChangeEvent.emit(this.resultSelected);
|
37588
|
+
this._handlingLazyObject.checkItemSearch = false;
|
37589
|
+
return [2 /*return*/];
|
37590
|
+
}
|
37591
|
+
});
|
37592
|
+
});
|
37593
|
+
};
|
37594
|
+
SelectProcessDataTreeComponent.prototype.onBeforeCheckAllSearch = function (callback) {
|
37595
|
+
return __awaiter(this, void 0, void 0, function () {
|
37596
|
+
var i, item;
|
37597
|
+
return __generator(this, function (_b) {
|
37598
|
+
switch (_b.label) {
|
37599
|
+
case 0:
|
37600
|
+
this._handlingLazyObject.checkAllSearch = true;
|
37601
|
+
if (!!!callback) return [3 /*break*/, 2];
|
37602
|
+
return [4 /*yield*/, callback(this.resultSearch)];
|
37603
|
+
case 1:
|
37604
|
+
_b.sent();
|
37605
|
+
_b.label = 2;
|
37606
|
+
case 2:
|
37607
|
+
this._handlingLazyObject.checkAllSearch = false;
|
37608
|
+
if (!this.resultSearch.length)
|
37609
|
+
return [2 /*return*/];
|
37610
|
+
for (i = 0; i < this.resultSearch.length; i++) {
|
37611
|
+
item = this.resultSearch[i];
|
37612
|
+
this._handleCheckResutlSearch(item);
|
37613
|
+
}
|
37614
|
+
return [2 /*return*/];
|
37615
|
+
}
|
37616
|
+
});
|
37617
|
+
});
|
37618
|
+
};
|
37619
|
+
SelectProcessDataTreeComponent.prototype.canHandleItemSearchResult = function (item) {
|
37620
|
+
if (!this.treeControl)
|
37621
|
+
return false;
|
37622
|
+
return this.treeControl.dataNodes.some(function (node) { return node.id === item.id; }) || this.config.lazy;
|
37623
|
+
};
|
37624
|
+
SelectProcessDataTreeComponent.prototype._mapToResultSearch = function () {
|
37625
|
+
var _this = this;
|
37626
|
+
if (!!this.resultSearch.length)
|
37627
|
+
this.resultSearch.forEach(function (item) {
|
37628
|
+
var _a;
|
37629
|
+
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; })); });
|
37630
|
+
isExistInResultSelected ? _this.checkListSelectionSearch.select(item) : _this.checkListSelectionSearch.deselect(item);
|
37631
|
+
});
|
37632
|
+
};
|
37633
|
+
SelectProcessDataTreeComponent.prototype._handleCheckResutlSearch = function (item, state) {
|
37634
|
+
if (state === void 0) { state = this.isSelectItemSearch(item.id); }
|
37635
|
+
item.isLoading = false;
|
37636
|
+
var currentNode = this.getNodeById(item.id.toString());
|
37637
|
+
if (!!currentNode) {
|
37638
|
+
if (state) {
|
37639
|
+
if (this.checkListSelection.isSelected(currentNode))
|
37640
|
+
return;
|
37641
|
+
if (this.checkListSelectionSearch.isSelected(item))
|
37642
|
+
this.checkListSelection.select(currentNode);
|
37643
|
+
}
|
37644
|
+
else {
|
37645
|
+
this.checkListSelection.deselect(currentNode);
|
37646
|
+
}
|
37647
|
+
this.config.isSelectOne ? this._handleSelectOne(currentNode.id) : this.handleCheckNode(currentNode);
|
37648
|
+
this.cdRef.detectChanges();
|
37649
|
+
return;
|
37650
|
+
}
|
37651
|
+
if (this.config.isSelectOne) {
|
37652
|
+
this._handleSelectOne(item.id);
|
37653
|
+
return;
|
37654
|
+
}
|
37655
|
+
this._updateSelectedList(state ? 'add' : 'remove', item, this._selectedList, this.resultSelected);
|
37656
|
+
};
|
37657
|
+
SelectProcessDataTreeComponent.prototype.isSelectItemSearch = function (id) {
|
37658
|
+
return this.checkListSelectionSearch.selected.some(function (x) { return x.id === id; });
|
37659
|
+
};
|
37660
|
+
SelectProcessDataTreeComponent.prototype._updateSelectedList = function (state, item) {
|
37661
|
+
var _this = this;
|
37662
|
+
var selectedLists = [];
|
37663
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
37664
|
+
selectedLists[_i - 2] = arguments[_i];
|
37665
|
+
}
|
37666
|
+
if (!item)
|
37667
|
+
return;
|
37668
|
+
selectedLists.forEach(function (selectedList) {
|
37669
|
+
var itemExisted = selectedList.find(function (x) { return x.id === item.id; });
|
37670
|
+
switch (state) {
|
37671
|
+
case 'add':
|
37672
|
+
if (item.groupId) {
|
37673
|
+
var group = selectedList.find(function (x) { return x.id === item.groupId; });
|
37674
|
+
if (!group && !itemExisted) {
|
37675
|
+
selectedList.push(item);
|
37676
|
+
}
|
37677
|
+
!group.children.some(function (x) { return x.id === item.id; }) && group.children.push(item);
|
37678
|
+
return;
|
37679
|
+
}
|
37680
|
+
!itemExisted && selectedList.push(item);
|
37681
|
+
break;
|
37682
|
+
case 'remove':
|
37683
|
+
if (!itemExisted) {
|
37684
|
+
var group = selectedList.find(function (x) { return x.children.some(function (x1) { return x1.id === item.id; }); });
|
37685
|
+
if (!group)
|
37686
|
+
return;
|
37687
|
+
var index = group.children.findIndex(function (x) { return x.id === item.id; });
|
37688
|
+
if (index < 0)
|
37689
|
+
return;
|
37690
|
+
group.children.splice(index, 1);
|
37691
|
+
return;
|
37692
|
+
}
|
37693
|
+
selectedList.splice(selectedList.indexOf(itemExisted), 1);
|
37694
|
+
var itemSelectionSearch = _this.checkListSelectionSearch.selected.find(function (x) { return x.id === itemExisted.id; });
|
37695
|
+
itemSelectionSearch && _this.checkListSelectionSearch.deselect(itemSelectionSearch);
|
37696
|
+
break;
|
37697
|
+
default:
|
37698
|
+
break;
|
37699
|
+
}
|
37700
|
+
});
|
37701
|
+
};
|
37702
|
+
SelectProcessDataTreeComponent.prototype.onSelectAllSearchResult = function (checked) {
|
37703
|
+
checked = !checked;
|
37704
|
+
if (!this.resultSearch.length)
|
37705
|
+
return;
|
37706
|
+
if (this.config.handleCheckAllItemSearch) {
|
37707
|
+
var _loop_4 = function (i) {
|
37708
|
+
var _b;
|
37709
|
+
var item = this_2.resultSearch[i];
|
37710
|
+
if (checked) {
|
37711
|
+
var treeNode = this_2.treeControl.dataNodes.find(function (node) { return node.id === item.id; });
|
37712
|
+
var canSelect = (!!treeNode || this_2.config.lazy);
|
37713
|
+
if (!canSelect)
|
37714
|
+
return "continue";
|
37715
|
+
!this_2.checkListSelectionSearch.isSelected(item) && this_2.checkListSelectionSearch.select(item);
|
37716
|
+
}
|
37717
|
+
else {
|
37718
|
+
var _itemSelections = this_2.checkListSelectionSearch.selected.filter(function (x) { return x.id === item.id; });
|
37719
|
+
if (_itemSelections.length)
|
37720
|
+
(_b = this_2.checkListSelectionSearch).deselect.apply(_b, __spreadArray([], __read(_itemSelections)));
|
37721
|
+
}
|
37722
|
+
if (!this_2.config.lazy || !this_2._handlingLazyObject.checkAllSearch)
|
37723
|
+
this_2._handleCheckResutlSearch(item, checked);
|
37724
|
+
};
|
37725
|
+
var this_2 = this;
|
37726
|
+
for (var i = 0; i < this.resultSearch.length; i++) {
|
37727
|
+
_loop_4(i);
|
37728
|
+
}
|
37729
|
+
}
|
37730
|
+
this.onCheckAllItemSearchEvent.emit(checked);
|
37731
|
+
this.onValueChangeEvent.emit(this.resultSelected);
|
37732
|
+
};
|
37733
|
+
SelectProcessDataTreeComponent.prototype.isDisableChecboxAllSearch = function () {
|
37734
|
+
return this.resultSearch && this.resultSearch.every(function (x) { return x.disabled; });
|
37735
|
+
};
|
37736
|
+
SelectProcessDataTreeComponent.prototype.onPagingSearchResult = function (val) {
|
37737
|
+
this.getLoading$.next(true);
|
37738
|
+
this.onPagingSearchEvent.emit(val);
|
37739
|
+
};
|
37740
|
+
SelectProcessDataTreeComponent.prototype.scrollToNode = function (nodeId) {
|
37741
|
+
this.scrollToNodeEvent$.next(nodeId);
|
37742
|
+
};
|
37743
|
+
SelectProcessDataTreeComponent.prototype.setIndexView = function (index) {
|
37744
|
+
if (index === 1 && this.config.resetToggleIncludeChildWhenChangeView) {
|
37745
|
+
this.isIncludeChildren = false;
|
37746
|
+
}
|
37747
|
+
this.getIndexView$.next(index);
|
37748
|
+
};
|
37749
|
+
SelectProcessDataTreeComponent.prototype.canActiveNodeExternal = function (node) {
|
37750
|
+
var _this = this;
|
37751
|
+
var allParent = this.getAllParentNode(node);
|
37752
|
+
return !allParent || allParent.every(function (item) { return _this.treeControl.isExpanded(item); });
|
37753
|
+
};
|
37754
|
+
SelectProcessDataTreeComponent.prototype.getHeightStyleRefNode = function (nodeId) {
|
37755
|
+
var nodeEle = this.eleRef.nativeElement.querySelector(".mat-tree-node#mat-node-" + nodeId);
|
37756
|
+
return ((nodeEle === null || nodeEle === void 0 ? void 0 : nodeEle.clientHeight) || 0) + "px";
|
37757
|
+
};
|
37758
|
+
SelectProcessDataTreeComponent.prototype.getSelectedNodeStorage = function () {
|
37759
|
+
return JSON.parse(localStorage.getItem('selectedNode'));
|
37760
|
+
};
|
37761
|
+
SelectProcessDataTreeComponent.prototype.setSelectedNodeStorage = function (node) {
|
37762
|
+
this.isIncludeChildren && localStorage.setItem('selectedNode', JSON.stringify(node));
|
37763
|
+
};
|
37764
|
+
SelectProcessDataTreeComponent.prototype.setDefaultPaginatorSize = function (options) {
|
37765
|
+
this.PAGE_SIZE_OPTION = options;
|
37766
|
+
};
|
37767
|
+
SelectProcessDataTreeComponent.prototype.trackBy = function (index, item) {
|
37768
|
+
return item;
|
37769
|
+
};
|
37770
|
+
/**
|
37771
|
+
* This function use for lazy load children of node
|
37772
|
+
* @param node node update. if node is null data auto insert as roots
|
37773
|
+
* @param data list children to update node.
|
37774
|
+
* @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.
|
37775
|
+
*/
|
37776
|
+
SelectProcessDataTreeComponent.prototype.updateChildOfNode = function (node, data, mode) {
|
37777
|
+
var _b;
|
37778
|
+
if (data === void 0) { data = []; }
|
37779
|
+
if (mode === void 0) { mode = 'update'; }
|
37780
|
+
node.isLoading = false;
|
37781
|
+
this.checkLoadingOfParent(node);
|
37782
|
+
var nestedNode = this.convertToNestedNode(node);
|
37783
|
+
var dataNodes = this.treeDepartmentService.convertToTreeData(data).filter(function (x) { return x.parentId === node.id; });
|
37784
|
+
if (!nestedNode)
|
37785
|
+
return;
|
37786
|
+
switch (mode) {
|
37787
|
+
case 'insert':
|
37788
|
+
(_b = nestedNode.children).push.apply(_b, __spreadArray([], __read(dataNodes)));
|
37789
|
+
break;
|
37790
|
+
case 'update':
|
37791
|
+
nestedNode.children = dataNodes;
|
37792
|
+
break;
|
37793
|
+
}
|
37794
|
+
this.updateDataTree(this.currentTreeData);
|
37795
|
+
var _node = this.getNodeById(node.id);
|
37796
|
+
var nodes = this.treeControl.getDescendants(_node);
|
37797
|
+
for (var i = 0; i < this.resultSelected.length; i++) {
|
37798
|
+
var item = this.resultSelected[i];
|
37799
|
+
this._reUpdateSelectionNode(item.id);
|
37800
|
+
var descendants = this.treeDepartmentService.getDescendantsOfNode(item);
|
37801
|
+
if (!descendants.length)
|
37802
|
+
continue;
|
37803
|
+
for (var j = 0; j < descendants.length; j++) {
|
37804
|
+
var child = descendants[j];
|
37805
|
+
this._reUpdateSelectionNode(child.id);
|
37806
|
+
}
|
37807
|
+
}
|
37808
|
+
this.selectedListAfterDataNodeChange$.next(__spreadArray([_node], __read(nodes)));
|
37809
|
+
};
|
37810
|
+
//re-select when update children of node
|
37811
|
+
SelectProcessDataTreeComponent.prototype._reUpdateSelectionNode = function (nodeId) {
|
37812
|
+
var node = this.getNodeById(nodeId);
|
37813
|
+
if (!node || this.checkListSelection.isSelected(node))
|
37814
|
+
return;
|
37815
|
+
var existInSelection = this.checkListSelection.selected.find(function (x) { return x.id == node.id; });
|
37816
|
+
if (existInSelection)
|
37817
|
+
this.checkListSelection.deselect(existInSelection);
|
37818
|
+
this.checkListSelection.select(node);
|
37819
|
+
};
|
37820
|
+
SelectProcessDataTreeComponent.prototype.checkLoadingOfParent = function (node) {
|
37821
|
+
var allParent = this.getAllParentNode(node);
|
37822
|
+
if (!allParent.length)
|
37823
|
+
return;
|
37824
|
+
for (var i = 0; i < allParent.length; i++) {
|
37825
|
+
var parent = allParent[i];
|
37826
|
+
var descendants = this.treeControl.getDescendants(parent);
|
37827
|
+
parent.isLoading = descendants.some(function (x) { return x.isLoading; });
|
37828
|
+
}
|
37829
|
+
};
|
37830
|
+
SelectProcessDataTreeComponent.prototype.getNodeById = function (id) {
|
37831
|
+
return this.treeControl.dataNodes.find(function (node) { return node.id === id; }) || undefined;
|
37832
|
+
};
|
37833
|
+
SelectProcessDataTreeComponent.prototype.getRootOfNode = function (node) {
|
37834
|
+
var allParent = this.getAllParentNode(node);
|
37835
|
+
if (!allParent.length)
|
37836
|
+
return undefined;
|
37837
|
+
return allParent.pop();
|
37838
|
+
};
|
37839
|
+
SelectProcessDataTreeComponent.prototype.addRootTree = function (data) {
|
37840
|
+
if (data === void 0) { data = []; }
|
37841
|
+
this.getLoadingMore$.next(false);
|
37842
|
+
if (!data.length)
|
37843
|
+
return;
|
37844
|
+
var treeNodeData = this.treeDepartmentService.convertToTreeData(data);
|
37845
|
+
// re-check root was existed in tree
|
37846
|
+
for (var i = 0; i < treeNodeData.length; i++) {
|
37847
|
+
var item = treeNodeData[i];
|
37848
|
+
var node = this.getNodeById(item.id);
|
37849
|
+
if (!!node && node.expandable && !node.markedGetChildren) {
|
37850
|
+
var nestedNode = this.convertToNestedNode(node);
|
37851
|
+
nestedNode.children = item.children;
|
37852
|
+
nestedNode.markedGetChildren = true;
|
37853
|
+
return;
|
37854
|
+
}
|
37855
|
+
if (!node)
|
37856
|
+
this.currentTreeData.push(item);
|
37857
|
+
}
|
37858
|
+
this.updateDataTree(this.currentTreeData);
|
37859
|
+
this.selectedListAfterDataNodeChange$.next(data);
|
37860
|
+
};
|
37861
|
+
SelectProcessDataTreeComponent.prototype.getCheckedStatusNode = function (node) {
|
37862
|
+
return this.isSelectedNode(node);
|
37863
|
+
};
|
37864
|
+
SelectProcessDataTreeComponent.prototype.updateNodeInformation = function (node) {
|
37865
|
+
var nestedNode = this.convertToNestedNode(node);
|
37866
|
+
if (!nestedNode) {
|
37867
|
+
return;
|
37868
|
+
}
|
37869
|
+
nestedNode.childCount = node.childCount;
|
37870
|
+
nestedNode.name = node.name;
|
37871
|
+
nestedNode.itemIcon = node.itemIcon;
|
37872
|
+
nestedNode.itemIconSvg = node.itemIconSvg;
|
37873
|
+
nestedNode.selectedChildCount = node.selectedChildCount;
|
37874
|
+
nestedNode.markedGetChildCountRecurrsive = node.markedGetChildCountRecurrsive;
|
37875
|
+
nestedNode.isIncludeChildWhenChecked = node.isIncludeChildWhenChecked;
|
37876
|
+
};
|
37877
|
+
SelectProcessDataTreeComponent.prototype.updateSelectedResultData = function (node) {
|
37878
|
+
var nodeResult = this.resultSelected.find(function (x) { return x.id === node.id; });
|
37879
|
+
if (nodeResult) {
|
37880
|
+
nodeResult.childCount = node.childCount;
|
37881
|
+
nodeResult.selectedChildCount = node.selectedChildCount;
|
37882
|
+
}
|
37883
|
+
};
|
37884
|
+
SelectProcessDataTreeComponent.prototype.callCheckNodeOutside = function (node) {
|
37885
|
+
this.checkListSelection.toggle(node);
|
37886
|
+
//this.handleCheckNode(node);
|
37887
|
+
};
|
37888
|
+
return SelectProcessDataTreeComponent;
|
37889
|
+
}());
|
37890
|
+
SelectProcessDataTreeComponent.decorators = [
|
37891
|
+
{ type: i0.Component, args: [{
|
37892
|
+
selector: 'qms-select-process-data-tree',
|
37893
|
+
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>",
|
37894
|
+
animations: [
|
37895
|
+
AnimationTreeDepartment
|
37896
|
+
],
|
37897
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
37898
|
+
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}}"]
|
37899
|
+
},] }
|
37900
|
+
];
|
37901
|
+
SelectProcessDataTreeComponent.ctorParameters = function () { return [
|
37902
|
+
{ type: i0.ChangeDetectorRef },
|
37903
|
+
{ type: platformBrowser.DomSanitizer },
|
37904
|
+
{ type: QMSIconRegistryService },
|
37905
|
+
{ type: icon.MatIconRegistry },
|
37906
|
+
{ type: i0.ElementRef },
|
37907
|
+
{ type: TranslateLibraryService },
|
37908
|
+
{ type: overlay.Overlay },
|
37909
|
+
{ type: i0.ViewContainerRef },
|
37910
|
+
{ type: QMSSelectDepartmentTreeGlobalService }
|
37911
|
+
]; };
|
37912
|
+
SelectProcessDataTreeComponent.propDecorators = {
|
37913
|
+
rowsSkeleton: [{ type: i0.Input }],
|
37914
|
+
height: [{ type: i0.Input }],
|
37915
|
+
config: [{ type: i0.Input }],
|
37916
|
+
onSearchEvent: [{ type: i0.Output }],
|
37917
|
+
onPagingSearchEvent: [{ type: i0.Output }],
|
37918
|
+
onValueChangeEvent: [{ type: i0.Output }],
|
37919
|
+
selectionNodeChangeEvent: [{ type: i0.Output }],
|
37920
|
+
onCheckNodeEvent: [{ type: i0.Output }],
|
37921
|
+
onExpandNodeEvent: [{ type: i0.Output }],
|
37922
|
+
onLoadMoreEvent: [{ type: i0.Output }],
|
37923
|
+
onCheckItemSearchEvent: [{ type: i0.Output }],
|
37924
|
+
onCheckAllItemSearchEvent: [{ type: i0.Output }],
|
37925
|
+
toggleIncludeChildEvent: [{ type: i0.Output }],
|
37926
|
+
cdkVirtualScrollViewport: [{ type: i0.ViewChild, args: [scrolling.CdkVirtualScrollViewport,] }],
|
37927
|
+
paginatorSearch: [{ type: i0.ViewChild, args: ['paginatorSearch',] }]
|
37928
|
+
};
|
37929
|
+
|
37930
|
+
var QMSSelectProcessDataTreeModule = /** @class */ (function () {
|
37931
|
+
function QMSSelectProcessDataTreeModule() {
|
37932
|
+
}
|
37933
|
+
return QMSSelectProcessDataTreeModule;
|
37934
|
+
}());
|
37935
|
+
QMSSelectProcessDataTreeModule.decorators = [
|
37936
|
+
{ type: i0.NgModule, args: [{
|
37937
|
+
declarations: [
|
37938
|
+
SelectProcessDataTreeComponent
|
37939
|
+
],
|
37940
|
+
exports: [
|
37941
|
+
SelectProcessDataTreeComponent
|
37942
|
+
],
|
37943
|
+
imports: [
|
37944
|
+
i1.CommonModule,
|
37945
|
+
tree$1.MatTreeModule,
|
37946
|
+
checkbox.MatCheckboxModule,
|
37947
|
+
autocomplete.MatAutocompleteModule,
|
37948
|
+
icon.MatIconModule,
|
37949
|
+
progressBar.MatProgressBarModule,
|
37950
|
+
QmsAngularModule,
|
37951
|
+
input.MatInputModule,
|
37952
|
+
forms.ReactiveFormsModule,
|
37953
|
+
forms.FormsModule,
|
37954
|
+
button.MatButtonModule,
|
37955
|
+
expansion.MatExpansionModule,
|
37956
|
+
slideToggle.MatSlideToggleModule,
|
37957
|
+
QMSButtonModule,
|
37958
|
+
formField.MatFormFieldModule,
|
37959
|
+
chips.MatChipsModule,
|
37960
|
+
SharedModule,
|
37961
|
+
QMSBreadcrumbModule,
|
37962
|
+
core.MatRippleModule,
|
37963
|
+
QmsPaginatorModule,
|
37964
|
+
paginator.MatPaginatorModule,
|
37965
|
+
divider.MatDividerModule,
|
37966
|
+
scrolling.ScrollingModule,
|
37967
|
+
progressSpinner.MatProgressSpinnerModule
|
37968
|
+
]
|
37969
|
+
},] }
|
37970
|
+
];
|
37971
|
+
|
37972
|
+
var ɵ0 = {
|
37973
|
+
clickAction: 'noop'
|
37974
|
+
};
|
37975
|
+
var SelectProcessDataComponent = /** @class */ (function () {
|
37976
|
+
function SelectProcessDataComponent(cdRef, dialogRef, data, trans) {
|
37977
|
+
var _this = this;
|
37978
|
+
this.cdRef = cdRef;
|
37979
|
+
this.dialogRef = dialogRef;
|
37980
|
+
this.data = data;
|
37981
|
+
this.trans = trans;
|
37982
|
+
this.ngUnsubscribe = new rxjs.Subject();
|
37983
|
+
this.onPagingEvent = new i0.EventEmitter();
|
37984
|
+
this.popupData = new SelectDepartmentPopupData();
|
37985
|
+
this.resultSelected = [];
|
37986
|
+
this.onSearchEvent = new i0.EventEmitter();
|
37987
|
+
this.onCheckNodeEvent = new i0.EventEmitter();
|
37988
|
+
this.onExpandNodeEvent = new i0.EventEmitter();
|
37989
|
+
this.onLoadMoreEvent = new i0.EventEmitter();
|
37990
|
+
this.onCheckItemSearchEvent = new i0.EventEmitter();
|
37991
|
+
this.onCheckAllItemSearchEvent = new i0.EventEmitter();
|
37992
|
+
this.toggleIncludeChildEvent = new i0.EventEmitter();
|
37993
|
+
this.resultSearch = [];
|
37994
|
+
this.isActiveViewSearch = false;
|
37995
|
+
this.trans.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
|
37996
|
+
if (res) {
|
37997
|
+
_this.LANG = _this.trans.getObjectLang(res);
|
37998
|
+
}
|
37999
|
+
});
|
38000
|
+
// Init popup data
|
38001
|
+
this.popupData = ___namespace.cloneDeep(this.data);
|
38002
|
+
}
|
38003
|
+
Object.defineProperty(SelectProcessDataComponent.prototype, "isIncludeChild", {
|
38004
|
+
get: function () {
|
38005
|
+
return !!this.treeProcessData && this.treeProcessData.isIncludeChildren;
|
38006
|
+
},
|
38007
|
+
enumerable: false,
|
38008
|
+
configurable: true
|
38009
|
+
});
|
38010
|
+
SelectProcessDataComponent.prototype.ngAfterViewInit = function () {
|
38011
|
+
console.log(this.treeProcessData);
|
38012
|
+
this.cdRef.detectChanges();
|
38013
|
+
};
|
38014
|
+
SelectProcessDataComponent.prototype.onCloseDialog = function () {
|
38015
|
+
this.dialogRef.close(this.treeProcessData.resultSelected);
|
38016
|
+
};
|
38017
|
+
SelectProcessDataComponent.prototype.ngOnInit = function () {
|
38018
|
+
};
|
38019
|
+
SelectProcessDataComponent.prototype.ngOnDestroy = function () {
|
38020
|
+
this.ngUnsubscribe.next();
|
38021
|
+
this.ngUnsubscribe.complete();
|
38022
|
+
};
|
38023
|
+
Object.defineProperty(SelectProcessDataComponent.prototype, "currentTreeData", {
|
38024
|
+
get: function () {
|
38025
|
+
return this.treeProcessData ? this.treeProcessData.currentTreeData : [];
|
38026
|
+
},
|
38027
|
+
enumerable: false,
|
38028
|
+
configurable: true
|
38029
|
+
});
|
38030
|
+
SelectProcessDataComponent.prototype.displayWhenSelectDepartmentOption = function ($event) {
|
38031
|
+
return '';
|
38032
|
+
};
|
38033
|
+
SelectProcessDataComponent.prototype.onScrollToNode = function (node) {
|
38034
|
+
// this.treeProcessData.scrollToNode(node.id);
|
38035
|
+
};
|
38036
|
+
SelectProcessDataComponent.prototype.onRemoveNode = function (node) {
|
38037
|
+
this.treeProcessData.onRemoveNode(node.id);
|
38038
|
+
};
|
38039
|
+
/**
|
38040
|
+
* Gets a list of the data node's subtree of descendent data nodes.
|
38041
|
+
*/
|
38042
|
+
SelectProcessDataComponent.prototype.getChildrenNode = function (node) {
|
38043
|
+
return this.treeProcessData.getListChildrenOfNode(node);
|
38044
|
+
};
|
38045
|
+
SelectProcessDataComponent.prototype.onResultDepartmentChange = function (data) {
|
38046
|
+
var _this = this;
|
38047
|
+
this.resultSelected = data.map(function (item) {
|
38048
|
+
return Object.assign(Object.assign({}, item), { tooltip: _this.generateTootip(item) });
|
38049
|
+
});
|
38050
|
+
};
|
38051
|
+
SelectProcessDataComponent.prototype.defaultFormatTooltipNode = function (node) {
|
38052
|
+
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;
|
38053
|
+
};
|
38054
|
+
SelectProcessDataComponent.prototype.generateTootip = function (node) {
|
38055
|
+
return !!this.popupData.formatTooltipItemResult ? this.popupData.formatTooltipItemResult(node) : this.defaultFormatTooltipNode(node);
|
38056
|
+
};
|
38057
|
+
SelectProcessDataComponent.prototype.updateResultSearch = function (data) {
|
38058
|
+
if (!this.treeProcessData)
|
38059
|
+
return;
|
38060
|
+
this.treeProcessData.setResultSearch(data);
|
38061
|
+
};
|
38062
|
+
SelectProcessDataComponent.prototype.formatString = function () {
|
38063
|
+
var replacements = [];
|
38064
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
38065
|
+
replacements[_i] = arguments[_i];
|
38066
|
+
}
|
38067
|
+
var result = arguments[0];
|
38068
|
+
for (var i = 0; i < arguments.length - 1; i++) {
|
38069
|
+
var reg = new RegExp("\\{" + i + "\\}", 'gm');
|
38070
|
+
result = result.replace(reg, arguments[i + 1]);
|
38071
|
+
}
|
38072
|
+
return result;
|
38073
|
+
};
|
38074
|
+
/**
|
38075
|
+
* This function use for lazy load children of node
|
38076
|
+
* @param node node update
|
38077
|
+
* @param data list children to update node.
|
38078
|
+
* @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.
|
38079
|
+
*/
|
38080
|
+
SelectProcessDataComponent.prototype.updateChildOfNode = function (node, data, mode) {
|
38081
|
+
if (mode === void 0) { mode = 'update'; }
|
38082
|
+
this.treeProcessData.updateChildOfNode(node, data, mode);
|
38083
|
+
};
|
38084
|
+
SelectProcessDataComponent.prototype.addRootTree = function (data) {
|
38085
|
+
if (data === void 0) { data = []; }
|
38086
|
+
this.treeProcessData.addRootTree(data);
|
38087
|
+
};
|
38088
|
+
/**
|
38089
|
+
* This function handle check node of tree
|
38090
|
+
* @param node node of tree
|
38091
|
+
* @param callback do something before handle check node
|
38092
|
+
* @returns
|
38093
|
+
*/
|
38094
|
+
SelectProcessDataComponent.prototype.onBeforeCheckNode = function (node, callback) {
|
38095
|
+
return this.treeProcessData.onBeforeCheckNode(node, callback);
|
38096
|
+
};
|
38097
|
+
SelectProcessDataComponent.prototype.handleCheckNode = function (node) {
|
38098
|
+
if (!this.treeProcessData)
|
38099
|
+
return;
|
38100
|
+
this.treeProcessData.handleCheckNode(node);
|
38101
|
+
};
|
38102
|
+
/**
|
38103
|
+
* This method use for lazy mode, do some thing before init list node selected
|
38104
|
+
* @param callback
|
38105
|
+
* @returns
|
38106
|
+
*/
|
38107
|
+
SelectProcessDataComponent.prototype.onBeforeInitNodeSelected = function (callback) {
|
38108
|
+
return __awaiter(this, void 0, void 0, function () {
|
38109
|
+
return __generator(this, function (_a) {
|
38110
|
+
switch (_a.label) {
|
38111
|
+
case 0:
|
38112
|
+
if (!this.treeProcessData)
|
38113
|
+
return [2 /*return*/];
|
38114
|
+
if (!!!callback) return [3 /*break*/, 2];
|
38115
|
+
return [4 /*yield*/, this.treeProcessData.onBeforeInitNodeSelected(callback)];
|
38116
|
+
case 1:
|
38117
|
+
_a.sent();
|
38118
|
+
_a.label = 2;
|
38119
|
+
case 2: return [2 /*return*/];
|
38120
|
+
}
|
38121
|
+
});
|
38122
|
+
});
|
38123
|
+
};
|
38124
|
+
/**
|
38125
|
+
* Get node by id of node
|
38126
|
+
* @param nodeId id of node
|
38127
|
+
* @returns
|
38128
|
+
*/
|
38129
|
+
SelectProcessDataComponent.prototype.findNode = function (nodeId) {
|
38130
|
+
if (!this.treeProcessData)
|
38131
|
+
return;
|
38132
|
+
return this.treeProcessData.treeControl.dataNodes.find(function (node) { return node.id === nodeId.toString(); });
|
38133
|
+
};
|
38134
|
+
/**
|
38135
|
+
* This method use for lazy mode, do some thing before select all result search
|
38136
|
+
* @param callback
|
38137
|
+
* @returns
|
38138
|
+
*/
|
38139
|
+
SelectProcessDataComponent.prototype.onBeforeCheckAllSearch = function (callback) {
|
38140
|
+
return __awaiter(this, void 0, void 0, function () {
|
38141
|
+
return __generator(this, function (_a) {
|
38142
|
+
switch (_a.label) {
|
38143
|
+
case 0:
|
38144
|
+
if (!this.treeProcessData)
|
38145
|
+
return [2 /*return*/];
|
38146
|
+
return [4 /*yield*/, this.treeProcessData.onBeforeCheckAllSearch(callback)];
|
38147
|
+
case 1:
|
38148
|
+
_a.sent();
|
38149
|
+
return [2 /*return*/];
|
38150
|
+
}
|
38151
|
+
});
|
38152
|
+
});
|
38153
|
+
};
|
38154
|
+
/**
|
38155
|
+
* This method use for lazy mode, do some thing before check item result
|
38156
|
+
* @param callback
|
38157
|
+
* @returns
|
38158
|
+
*/
|
38159
|
+
SelectProcessDataComponent.prototype.onBeforeCheckItemSearch = function (item, callback) {
|
38160
|
+
return this.treeProcessData.onBeforeCheckItemSearch(item, callback);
|
38161
|
+
};
|
38162
|
+
SelectProcessDataComponent.prototype.setLoadingStateNode = function (isLoading, nodeId) {
|
38163
|
+
!!this.treeProcessData && this.treeProcessData.setLoadingStateNode(isLoading, nodeId);
|
38164
|
+
};
|
38165
|
+
/**
|
38166
|
+
* Select a value or an array of values.
|
38167
|
+
*/
|
38168
|
+
SelectProcessDataComponent.prototype.onSelectNode = function () {
|
38169
|
+
var _a;
|
38170
|
+
var nodeIds = [];
|
38171
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
38172
|
+
nodeIds[_i] = arguments[_i];
|
38173
|
+
}
|
38174
|
+
(_a = this.treeProcessData).onSelectNode.apply(_a, __spreadArray([], __read(nodeIds)));
|
38175
|
+
};
|
38176
|
+
/**
|
38177
|
+
* Deselects a value or an array of values.
|
38178
|
+
*/
|
38179
|
+
SelectProcessDataComponent.prototype.onDeselectNode = function () {
|
38180
|
+
var _a;
|
38181
|
+
var nodeIds = [];
|
38182
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
38183
|
+
nodeIds[_i] = arguments[_i];
|
38184
|
+
}
|
38185
|
+
(_a = this.treeProcessData).onDeselectNode.apply(_a, __spreadArray([], __read(nodeIds)));
|
38186
|
+
};
|
38187
|
+
/**
|
38188
|
+
* Toggles a value between selected and deselected.
|
38189
|
+
*/
|
38190
|
+
SelectProcessDataComponent.prototype.onToggleNode = function (nodeId) {
|
38191
|
+
this.treeProcessData.onToggleNode(nodeId);
|
38192
|
+
};
|
38193
|
+
SelectProcessDataComponent.prototype.getNodeById = function (nodeId) {
|
38194
|
+
return this.treeProcessData.getNodeById(nodeId);
|
38195
|
+
};
|
38196
|
+
SelectProcessDataComponent.prototype.isNodeLoading = function (nodeId) {
|
38197
|
+
if (!this.treeProcessData)
|
38198
|
+
return false;
|
38199
|
+
var node = this.treeProcessData.getNodeById(nodeId);
|
38200
|
+
return !!node && node.isLoading;
|
38201
|
+
};
|
38202
|
+
SelectProcessDataComponent.prototype.setLoadingMore = function (state) {
|
38203
|
+
if (!this.treeProcessData)
|
38204
|
+
return;
|
38205
|
+
this.treeProcessData.getLoadingMore$.next(state);
|
38206
|
+
};
|
38207
|
+
SelectProcessDataComponent.prototype.setLoading = function (state) {
|
38208
|
+
if (!this.treeProcessData)
|
38209
|
+
return;
|
38210
|
+
this.treeProcessData.getLoading$.next(state);
|
38211
|
+
};
|
38212
|
+
SelectProcessDataComponent.prototype.setLoadingNode = function (nodeId, state) {
|
38213
|
+
if (!this.treeProcessData)
|
38214
|
+
return;
|
38215
|
+
var node = this.treeProcessData.getNodeById(nodeId);
|
38216
|
+
if (!!node)
|
38217
|
+
node.isLoading = state;
|
38218
|
+
};
|
38219
|
+
SelectProcessDataComponent.prototype.updateTreeData = function (data) {
|
38220
|
+
if (data === void 0) { data = this.currentTreeData; }
|
38221
|
+
!!this.treeProcessData && this.treeProcessData.updateDataTree(data);
|
38222
|
+
};
|
38223
|
+
SelectProcessDataComponent.prototype.onDestroyLoadMore = function () {
|
38224
|
+
this.treeProcessData.onDestroyLoadMore();
|
38225
|
+
};
|
38226
|
+
SelectProcessDataComponent.prototype.setSelectedListData = function (data) {
|
38227
|
+
this.popupData.config.selectedList = data;
|
38228
|
+
};
|
38229
|
+
SelectProcessDataComponent.prototype.getCheckedStatusNode = function (node) {
|
38230
|
+
return this.treeProcessData.getCheckedStatusNode(node);
|
38231
|
+
};
|
38232
|
+
SelectProcessDataComponent.prototype.updateNodeInformation = function (node) {
|
38233
|
+
return this.treeProcessData.updateNodeInformation(node);
|
38234
|
+
};
|
38235
|
+
SelectProcessDataComponent.prototype.updateSelectedResultData = function (node) {
|
38236
|
+
return this.treeProcessData.updateSelectedResultData(node);
|
38237
|
+
};
|
38238
|
+
SelectProcessDataComponent.prototype.getAllParentNode = function (node) {
|
38239
|
+
return this.treeProcessData.getAllParentNode(node);
|
38240
|
+
};
|
38241
|
+
SelectProcessDataComponent.prototype.onCheckNode = function (node, fireEventCheckNode) {
|
38242
|
+
if (fireEventCheckNode === void 0) { fireEventCheckNode = true; }
|
38243
|
+
return this.treeProcessData.onCheckNode(node, fireEventCheckNode);
|
38244
|
+
};
|
38245
|
+
SelectProcessDataComponent.prototype.getChildrenSelected = function (node) {
|
38246
|
+
return this.treeProcessData.getChildrenSelected(node);
|
38247
|
+
};
|
38248
|
+
return SelectProcessDataComponent;
|
38249
|
+
}());
|
38250
|
+
SelectProcessDataComponent.decorators = [
|
38251
|
+
{ type: i0.Component, args: [{
|
38252
|
+
selector: 'qms-select-process-data',
|
38253
|
+
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>",
|
38254
|
+
providers: [
|
38255
|
+
{
|
38256
|
+
provide: checkbox.MAT_CHECKBOX_DEFAULT_OPTIONS,
|
38257
|
+
useValue: ɵ0
|
38258
|
+
}
|
38259
|
+
],
|
38260
|
+
animations: [SelectDepartmentAnimationTrigger],
|
38261
|
+
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}}"]
|
38262
|
+
},] }
|
38263
|
+
];
|
38264
|
+
SelectProcessDataComponent.ctorParameters = function () { return [
|
38265
|
+
{ type: i0.ChangeDetectorRef },
|
38266
|
+
{ type: dialog.MatDialogRef },
|
38267
|
+
{ type: SelectDepartmentPopupData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
|
38268
|
+
{ type: TranslateLibraryService }
|
38269
|
+
]; };
|
38270
|
+
SelectProcessDataComponent.propDecorators = {
|
38271
|
+
treeProcessData: [{ type: i0.ViewChild, args: ['treeProcessData',] }],
|
38272
|
+
onPagingEvent: [{ type: i0.Output }],
|
38273
|
+
onSearchEvent: [{ type: i0.Output }],
|
38274
|
+
onCheckNodeEvent: [{ type: i0.Output }],
|
38275
|
+
onExpandNodeEvent: [{ type: i0.Output }],
|
38276
|
+
onLoadMoreEvent: [{ type: i0.Output }],
|
38277
|
+
onCheckItemSearchEvent: [{ type: i0.Output }],
|
38278
|
+
onCheckAllItemSearchEvent: [{ type: i0.Output }],
|
38279
|
+
toggleIncludeChildEvent: [{ type: i0.Output }]
|
38280
|
+
};
|
38281
|
+
|
38282
|
+
var QMSSelectProcessDataModule = /** @class */ (function () {
|
38283
|
+
function QMSSelectProcessDataModule() {
|
38284
|
+
}
|
38285
|
+
return QMSSelectProcessDataModule;
|
38286
|
+
}());
|
38287
|
+
QMSSelectProcessDataModule.decorators = [
|
38288
|
+
{ type: i0.NgModule, args: [{
|
38289
|
+
declarations: [
|
38290
|
+
SelectProcessDataComponent,
|
38291
|
+
],
|
38292
|
+
imports: [
|
38293
|
+
i1.CommonModule,
|
38294
|
+
progressBar.MatProgressBarModule,
|
38295
|
+
tree$1.MatTreeModule,
|
38296
|
+
checkbox.MatCheckboxModule,
|
38297
|
+
forms.ReactiveFormsModule,
|
38298
|
+
forms.FormsModule,
|
38299
|
+
QmsAngularModule,
|
38300
|
+
icon.MatIconModule,
|
38301
|
+
QMSTreeModule,
|
38302
|
+
button.MatButtonModule,
|
38303
|
+
dialog.MatDialogModule,
|
38304
|
+
expansion.MatExpansionModule,
|
38305
|
+
autocomplete.MatAutocompleteModule,
|
38306
|
+
input.MatInputModule,
|
38307
|
+
QMSAppIconModule,
|
38308
|
+
QMSButtonModule,
|
38309
|
+
slideToggle.MatSlideToggleModule,
|
38310
|
+
QMSButtonModule,
|
38311
|
+
formField.MatFormFieldModule,
|
38312
|
+
chips.MatChipsModule,
|
38313
|
+
QMSSelectProcessDataTreeModule,
|
38314
|
+
divider.MatDividerModule,
|
38315
|
+
progressSpinner.MatProgressSpinnerModule
|
38316
|
+
],
|
38317
|
+
exports: [
|
38318
|
+
SelectProcessDataComponent
|
38319
|
+
],
|
38320
|
+
schemas: [
|
38321
|
+
i0.CUSTOM_ELEMENTS_SCHEMA
|
38322
|
+
]
|
38323
|
+
},] }
|
38324
|
+
];
|
38325
|
+
|
36673
38326
|
/*
|
36674
38327
|
* Public API Surface of qms-angular
|
36675
38328
|
*/
|
@@ -36858,6 +38511,8 @@
|
|
36858
38511
|
exports.QMSSelectIncludeChildrenModule = QMSSelectIncludeChildrenModule;
|
36859
38512
|
exports.QMSSelectOneGlobalService = QMSSelectOneGlobalService;
|
36860
38513
|
exports.QMSSelectOneModule = QMSSelectOneModule;
|
38514
|
+
exports.QMSSelectProcessDataModule = QMSSelectProcessDataModule;
|
38515
|
+
exports.QMSSelectProcessDataTreeModule = QMSSelectProcessDataTreeModule;
|
36861
38516
|
exports.QMSSelectProcessDocumentGlobalService = QMSSelectProcessDocumentGlobalService;
|
36862
38517
|
exports.QMSSelectProcessDocumentModule = QMSSelectProcessDocumentModule;
|
36863
38518
|
exports.QMSSideSheetModule = QMSSideSheetModule;
|
@@ -36948,6 +38603,8 @@
|
|
36948
38603
|
exports.SelectOnePopupData = SelectOnePopupData;
|
36949
38604
|
exports.SelectOption = SelectOption;
|
36950
38605
|
exports.SelectPopupData = SelectPopupData;
|
38606
|
+
exports.SelectProcessDataComponent = SelectProcessDataComponent;
|
38607
|
+
exports.SelectProcessDataTreeComponent = SelectProcessDataTreeComponent;
|
36951
38608
|
exports.SelectProcessDocumentPopupComponent = SelectProcessDocumentPopupComponent;
|
36952
38609
|
exports.SelectProcessDocumentPopupData = SelectProcessDocumentPopupData;
|
36953
38610
|
exports.SelectedOption = SelectedOption;
|