qms-angular 1.0.79 → 1.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/qms-angular.umd.js +117 -97
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/related/popup/related-popup.component.js +48 -56
- package/esm2015/lib/components/select-one/select-one.component.js +3 -6
- package/esm2015/lib/components/select-process-document/select-process-document.component.js +65 -34
- package/esm2015/lib/components/tree/tree.component.js +3 -3
- package/fesm2015/qms-angular.js +115 -95
- package/fesm2015/qms-angular.js.map +1 -1
- package/package.json +1 -1
- package/src/themes/core/_form.scss +4 -0
@@ -4967,7 +4967,7 @@
|
|
4967
4967
|
for (var i = 0; i < obj.children.length; i++) {
|
4968
4968
|
if (obj.children[i].children) {
|
4969
4969
|
this.getChild(obj.children[i]);
|
4970
|
-
delete obj.children[i].children;
|
4970
|
+
// delete obj.children[i].children;
|
4971
4971
|
this.listChildNode.push(obj.children[i]);
|
4972
4972
|
}
|
4973
4973
|
else {
|
@@ -5129,7 +5129,7 @@
|
|
5129
5129
|
for (var i = 0; i < _this.treeControl.dataNodes.length; i++) {
|
5130
5130
|
if (_this.treeControl.dataNodes[i].id === node.id &&
|
5131
5131
|
_this.treeControl.dataNodes[i].parentId === node.parentId &&
|
5132
|
-
!_this.treeControl.dataNodes[i].disabled
|
5132
|
+
!_this.treeControl.dataNodes[i].disabled) {
|
5133
5133
|
if (!_this.checklistSelection.isSelected(_this.treeControl.dataNodes[i]))
|
5134
5134
|
_this.checklistSelection.toggle(_this.treeControl.dataNodes[i]);
|
5135
5135
|
}
|
@@ -5972,43 +5972,31 @@
|
|
5972
5972
|
var _this = this;
|
5973
5973
|
this.selectedData = [];
|
5974
5974
|
this.selectedData2 = [];
|
5975
|
-
this.checkedNodeList = this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()); });
|
5976
|
-
var tempArr = [];
|
5977
|
-
var tempArrDocument = [];
|
5975
|
+
this.checkedNodeList = this.checkedNodeList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() !== item.id.toLowerCase() || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
5978
5976
|
var newSelectProcessList = [];
|
5979
5977
|
var newSelectDocumentList = [];
|
5980
|
-
this.commonCheckedList.
|
5981
|
-
_this.checkedNodeList.forEach(function (x) {
|
5982
|
-
if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
|
5983
|
-
tempArr.push(element);
|
5984
|
-
}
|
5985
|
-
});
|
5986
|
-
});
|
5978
|
+
this.commonCheckedList = this.commonCheckedList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() !== item.id.toLowerCase() || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
5987
5979
|
this.singleProcessList.forEach(function (element) {
|
5988
5980
|
_this.checkedNodeList.forEach(function (x) {
|
5989
|
-
|
5981
|
+
var _a, _b;
|
5982
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
5990
5983
|
newSelectProcessList.push(element);
|
5991
5984
|
}
|
5992
5985
|
});
|
5993
5986
|
});
|
5994
5987
|
this.singleProcessList = newSelectProcessList;
|
5995
|
-
this.selectedData =
|
5996
|
-
this.documentCheckedList.
|
5997
|
-
_this.checkedNodeList.forEach(function (x) {
|
5998
|
-
if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
|
5999
|
-
tempArrDocument.push(element);
|
6000
|
-
}
|
6001
|
-
});
|
6002
|
-
});
|
5988
|
+
this.selectedData = this.commonCheckedList;
|
5989
|
+
this.documentCheckedList = this.documentCheckedList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() !== item.id.toLowerCase() || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
6003
5990
|
this.singleDocumentList.forEach(function (element) {
|
6004
5991
|
_this.checkedNodeList.forEach(function (x) {
|
6005
|
-
|
5992
|
+
var _a, _b;
|
5993
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
6006
5994
|
newSelectDocumentList.push(element);
|
6007
5995
|
}
|
6008
5996
|
});
|
6009
5997
|
});
|
6010
5998
|
this.singleDocumentList = newSelectDocumentList;
|
6011
|
-
this.selectedData2 =
|
5999
|
+
this.selectedData2 = this.commonCheckedList;
|
6012
6000
|
// when remove check node list, related options need refresh disabled options
|
6013
6001
|
this.refreshRelatedOptions();
|
6014
6002
|
};
|
@@ -6078,7 +6066,8 @@
|
|
6078
6066
|
this.selectedNode = [];
|
6079
6067
|
if (this.treeConfig1.showCheckBox) {
|
6080
6068
|
index = this.checkedNodeList.findIndex(function (x) {
|
6081
|
-
|
6069
|
+
var _a, _b;
|
6070
|
+
return x.id.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
6082
6071
|
});
|
6083
6072
|
}
|
6084
6073
|
if (index < 0) {
|
@@ -6089,13 +6078,15 @@
|
|
6089
6078
|
case this.dataType.document:
|
6090
6079
|
// document
|
6091
6080
|
var isExistInDisabled = this.disabledList2.findIndex(function (x) {
|
6092
|
-
|
6081
|
+
var _a, _b;
|
6082
|
+
return x.id && x.id.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
6093
6083
|
});
|
6094
6084
|
if (isExistInDisabled >= 0) {
|
6095
6085
|
return;
|
6096
6086
|
}
|
6097
6087
|
position = this.treeData2.findIndex(function (x) {
|
6098
|
-
|
6088
|
+
var _a;
|
6089
|
+
return x.childId === item.id && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
6099
6090
|
});
|
6100
6091
|
if (position >= 0) {
|
6101
6092
|
node = this.treeData2[position];
|
@@ -6208,7 +6199,8 @@
|
|
6208
6199
|
break;
|
6209
6200
|
case this.dataType.area:
|
6210
6201
|
position = this.treeData1.findIndex(function (x) {
|
6211
|
-
|
6202
|
+
var _a, _b;
|
6203
|
+
return x.rootId.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
6212
6204
|
});
|
6213
6205
|
typeId = item.itemType;
|
6214
6206
|
if (position >= 0) {
|
@@ -6246,13 +6238,15 @@
|
|
6246
6238
|
break;
|
6247
6239
|
case this.dataType.process:
|
6248
6240
|
var isExistInProcessDisabled = this.disabledList.findIndex(function (x) {
|
6249
|
-
|
6241
|
+
var _a, _b;
|
6242
|
+
return x.id && x.id.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
6250
6243
|
});
|
6251
6244
|
if (isExistInProcessDisabled >= 0) {
|
6252
6245
|
return;
|
6253
6246
|
}
|
6254
6247
|
position = this.treeData1.findIndex(function (x) {
|
6255
|
-
|
6248
|
+
var _a;
|
6249
|
+
return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
6256
6250
|
});
|
6257
6251
|
if (position >= 0) {
|
6258
6252
|
node = this.treeData1[position];
|
@@ -6345,7 +6339,8 @@
|
|
6345
6339
|
case this.dataType.checklistCategory:
|
6346
6340
|
case this.dataType.riskFolder:
|
6347
6341
|
position = this.treeData1.findIndex(function (x) {
|
6348
|
-
|
6342
|
+
var _a, _b;
|
6343
|
+
return x.rootId.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (item.parentId ? (_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase() : '');
|
6349
6344
|
});
|
6350
6345
|
this.selectNodeRecursive(this.treeData1[position], item.itemType);
|
6351
6346
|
break;
|
@@ -6353,7 +6348,8 @@
|
|
6353
6348
|
case this.dataType.checklist:
|
6354
6349
|
case this.dataType.risk:
|
6355
6350
|
position = this.treeData1.findIndex(function (x) {
|
6356
|
-
|
6351
|
+
var _a;
|
6352
|
+
return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
6357
6353
|
});
|
6358
6354
|
if (position >= 0) {
|
6359
6355
|
node = this.treeData1[position];
|
@@ -6385,7 +6381,7 @@
|
|
6385
6381
|
parentId: item.parentId
|
6386
6382
|
};
|
6387
6383
|
var nodeChildren = this.treeData1.
|
6388
|
-
filter(function (x) { return x.rootId === item.rootId; }).
|
6384
|
+
filter(function (x) { return x.rootId === item.rootId && x.childId; }).
|
6389
6385
|
map(function (x) {
|
6390
6386
|
return {
|
6391
6387
|
id: x.childId,
|
@@ -6436,8 +6432,8 @@
|
|
6436
6432
|
RelatedPopupComponent.prototype.getCommonCheckedNode = function (list) {
|
6437
6433
|
var _this = this;
|
6438
6434
|
this.checkedNodeList = [];
|
6439
|
-
this.commonCheckedList = [];
|
6440
6435
|
this.singleProcessList = [];
|
6436
|
+
this.commonCheckedList = [];
|
6441
6437
|
this.checkedNodeList = __spreadArray([], __read(this.singleDocumentList));
|
6442
6438
|
if (list.length) {
|
6443
6439
|
list.forEach(function (item) {
|
@@ -6502,24 +6498,13 @@
|
|
6502
6498
|
this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
|
6503
6499
|
}
|
6504
6500
|
}
|
6505
|
-
this.selectedData = this.
|
6506
|
-
return {
|
6507
|
-
id: item.id,
|
6508
|
-
name: item.itemName,
|
6509
|
-
parentId: item.parentId,
|
6510
|
-
levelType: item.levelType,
|
6511
|
-
level: 0,
|
6512
|
-
expandable: true,
|
6513
|
-
hasChild: true,
|
6514
|
-
disabled: false
|
6515
|
-
};
|
6516
|
-
});
|
6501
|
+
this.selectedData = this.commonCheckedList;
|
6517
6502
|
};
|
6518
6503
|
RelatedPopupComponent.prototype.getDocumentCheckedNode = function (list) {
|
6519
6504
|
var _this = this;
|
6520
6505
|
this.checkedNodeList = [];
|
6521
|
-
this.documentCheckedList = [];
|
6522
6506
|
this.singleDocumentList = [];
|
6507
|
+
this.documentCheckedList = [];
|
6523
6508
|
this.checkedNodeList = __spreadArray([], __read(this.singleProcessList));
|
6524
6509
|
if (list.length) {
|
6525
6510
|
list.forEach(function (item) {
|
@@ -6584,6 +6569,7 @@
|
|
6584
6569
|
this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
|
6585
6570
|
}
|
6586
6571
|
}
|
6572
|
+
this.selectedData2 = this.documentCheckedList;
|
6587
6573
|
};
|
6588
6574
|
RelatedPopupComponent.prototype.onCloseClick = function () {
|
6589
6575
|
this.selectedFolder = null;
|
@@ -6789,7 +6775,7 @@
|
|
6789
6775
|
return null;
|
6790
6776
|
};
|
6791
6777
|
RelatedPopupComponent.prototype.toggleSelectItem = function (node) {
|
6792
|
-
var selectedNode = this.checkedNodeList.find(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); });
|
6778
|
+
var selectedNode = this.checkedNodeList.find(function (x) { var _a, _b; return (x.id.toLowerCase() === node.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
6793
6779
|
if (selectedNode) {
|
6794
6780
|
this.removeCheckedNodeList({
|
6795
6781
|
id: selectedNode.id,
|
@@ -6806,7 +6792,7 @@
|
|
6806
6792
|
}
|
6807
6793
|
};
|
6808
6794
|
RelatedPopupComponent.prototype.isNodeSelected = function (node) {
|
6809
|
-
return this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); }).length > 0;
|
6795
|
+
return this.checkedNodeList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() === node.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); }).length > 0;
|
6810
6796
|
};
|
6811
6797
|
RelatedPopupComponent.prototype.getChildrenOfFolder = function (node, type) {
|
6812
6798
|
if (this.splitView) {
|
@@ -6847,26 +6833,32 @@
|
|
6847
6833
|
return this.getModuleFilteredOptions(moduleId).length > 0;
|
6848
6834
|
};
|
6849
6835
|
RelatedPopupComponent.prototype.selectNodeTreeEvent = function (node) {
|
6850
|
-
var index = this.
|
6851
|
-
|
6836
|
+
var index = this.commonCheckedList.findIndex(function (x) {
|
6837
|
+
var _a, _b;
|
6838
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
6839
|
+
&& (!node.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === node.expandable;
|
6840
|
+
});
|
6852
6841
|
if (index >= 0) {
|
6853
|
-
this.
|
6842
|
+
this.commonCheckedList = this.commonCheckedList.filter(function (_, ind) { return ind !== index; });
|
6854
6843
|
}
|
6855
6844
|
else {
|
6856
|
-
this.selectedData = __spreadArray(__spreadArray([], __read(this.selectedData)), [node]);
|
6857
6845
|
this.commonCheckedList = __spreadArray(__spreadArray([], __read(this.commonCheckedList)), [node]);
|
6858
6846
|
}
|
6847
|
+
this.selectedData = this.commonCheckedList;
|
6859
6848
|
};
|
6860
6849
|
RelatedPopupComponent.prototype.selectNodeTree2Event = function (node) {
|
6861
|
-
var index = this.
|
6862
|
-
|
6850
|
+
var index = this.documentCheckedList.findIndex(function (x) {
|
6851
|
+
var _a, _b;
|
6852
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
6853
|
+
&& (!node.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === node.expandable;
|
6854
|
+
});
|
6863
6855
|
if (index >= 0) {
|
6864
|
-
this.
|
6856
|
+
this.documentCheckedList = this.documentCheckedList.filter(function (_, ind) { return ind !== index; });
|
6865
6857
|
}
|
6866
6858
|
else {
|
6867
|
-
this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), [node]);
|
6868
6859
|
this.documentCheckedList = __spreadArray(__spreadArray([], __read(this.documentCheckedList)), [node]);
|
6869
6860
|
}
|
6861
|
+
this.selectedData2 = this.documentCheckedList;
|
6870
6862
|
};
|
6871
6863
|
RelatedPopupComponent.prototype.getChildNodeSelectOne = function (listChildren) {
|
6872
6864
|
this.listChildrenSelectOne = [];
|
@@ -6874,7 +6866,7 @@
|
|
6874
6866
|
};
|
6875
6867
|
RelatedPopupComponent.prototype.hasSelected = function (related) {
|
6876
6868
|
var arrDisabledList = this.disabledList.concat(this.disabledList2);
|
6877
|
-
return arrDisabledList.some(function (node) { return node.id.toUpperCase() === related.id.toUpperCase() && (!related.parentId || related.parentId.toLowerCase() === node.parentId.toLowerCase()); });
|
6869
|
+
return arrDisabledList.some(function (node) { var _a, _b; return node.id.toUpperCase() === related.id.toUpperCase() && (!related.parentId || ((_a = related.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
6878
6870
|
};
|
6879
6871
|
RelatedPopupComponent.prototype.toRelatedOptions = function (relateds) {
|
6880
6872
|
var e_1, _j;
|
@@ -19544,10 +19536,6 @@
|
|
19544
19536
|
};
|
19545
19537
|
SelectOneDialog.prototype.selectItemSearched = function (item) {
|
19546
19538
|
var _this = this;
|
19547
|
-
var _a;
|
19548
|
-
if ((_a = this.treeConfig) === null || _a === void 0 ? void 0 : _a.selectOne) {
|
19549
|
-
this.disabledList = [];
|
19550
|
-
}
|
19551
19539
|
// reset to root
|
19552
19540
|
this.expandToChildNode = [''];
|
19553
19541
|
this.checkedNodeList = [];
|
@@ -19575,7 +19563,8 @@
|
|
19575
19563
|
itemType: typeId,
|
19576
19564
|
itemNumberId: item.itemNumberId,
|
19577
19565
|
levelType: item.levelType,
|
19578
|
-
parentId: node.rootId
|
19566
|
+
parentId: node.rootId,
|
19567
|
+
parentName: node.rootName
|
19579
19568
|
});
|
19580
19569
|
}
|
19581
19570
|
if (this.treeConfig.canHaveDupId) {
|
@@ -21063,21 +21052,23 @@
|
|
21063
21052
|
var _this = this;
|
21064
21053
|
this.selectedData = [];
|
21065
21054
|
this.selectedData2 = [];
|
21066
|
-
this.checkedNodeList = this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()); });
|
21055
|
+
this.checkedNodeList = this.checkedNodeList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() !== item.id.toLowerCase() || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
21067
21056
|
var tempArr = [];
|
21068
21057
|
var tempArrDocument = [];
|
21069
21058
|
var newSelectProcessList = [];
|
21070
21059
|
var newSelectDocumentList = [];
|
21071
21060
|
this.commonCheckedList.forEach(function (element) {
|
21072
21061
|
_this.checkedNodeList.forEach(function (x) {
|
21073
|
-
|
21062
|
+
var _a, _b;
|
21063
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
21074
21064
|
tempArr.push(element);
|
21075
21065
|
}
|
21076
21066
|
});
|
21077
21067
|
});
|
21078
21068
|
this.singleProcessList.forEach(function (element) {
|
21079
21069
|
_this.checkedNodeList.forEach(function (x) {
|
21080
|
-
|
21070
|
+
var _a, _b;
|
21071
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
21081
21072
|
newSelectProcessList.push(element);
|
21082
21073
|
}
|
21083
21074
|
});
|
@@ -21088,14 +21079,16 @@
|
|
21088
21079
|
}
|
21089
21080
|
this.documentCheckedList.forEach(function (element) {
|
21090
21081
|
_this.checkedNodeList.forEach(function (x) {
|
21091
|
-
|
21082
|
+
var _a, _b;
|
21083
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
21092
21084
|
tempArrDocument.push(element);
|
21093
21085
|
}
|
21094
21086
|
});
|
21095
21087
|
});
|
21096
21088
|
this.singleDocumentList.forEach(function (element) {
|
21097
21089
|
_this.checkedNodeList.forEach(function (x) {
|
21098
|
-
|
21090
|
+
var _a, _b;
|
21091
|
+
if (element.id.toLowerCase() === x.id.toLowerCase() && ((_a = element.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) {
|
21099
21092
|
newSelectDocumentList.push(element);
|
21100
21093
|
}
|
21101
21094
|
});
|
@@ -21165,15 +21158,16 @@
|
|
21165
21158
|
this.selectedNode = [];
|
21166
21159
|
if (this.treeConfig1.showCheckBox) {
|
21167
21160
|
index = this.checkedNodeList.findIndex(function (x) {
|
21168
|
-
|
21161
|
+
var _a, _b;
|
21162
|
+
return x.id.toLowerCase() === item.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()) && x.itemType === item.itemType;
|
21169
21163
|
});
|
21170
21164
|
}
|
21171
21165
|
if (index < 0) {
|
21172
21166
|
if (item.itemType === this.dataType.document || item.itemType === this.dataType.folder) {
|
21173
21167
|
// document
|
21174
21168
|
var isExistInDisabled = this.disabledList2.findIndex(function (x) {
|
21175
|
-
var _a;
|
21176
|
-
return ((_a = x.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === item.id.toLowerCase() && (!item.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase() && x.itemType === item.itemType);
|
21169
|
+
var _a, _b, _c;
|
21170
|
+
return ((_a = x.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === item.id.toLowerCase() && (!item.parentId || ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_c = item.parentId) === null || _c === void 0 ? void 0 : _c.toLowerCase()) && x.itemType === item.itemType);
|
21177
21171
|
}) >= 0;
|
21178
21172
|
if (isExistInDisabled) {
|
21179
21173
|
return;
|
@@ -21182,8 +21176,8 @@
|
|
21182
21176
|
}
|
21183
21177
|
else if (item.itemType === this.dataType.area || item.itemType === this.dataType.process) {
|
21184
21178
|
var isExistInDisabled = this.disabledList.findIndex(function (x) {
|
21185
|
-
var _a;
|
21186
|
-
return ((_a = x.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === item.id.toLowerCase() && (!item.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase() && x.itemType === item.itemType);
|
21179
|
+
var _a, _b, _c;
|
21180
|
+
return ((_a = x.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === item.id.toLowerCase() && (!item.parentId || ((_b = x.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_c = item.parentId) === null || _c === void 0 ? void 0 : _c.toLowerCase()) && x.itemType === item.itemType);
|
21187
21181
|
}) >= 0;
|
21188
21182
|
if (isExistInDisabled) {
|
21189
21183
|
return;
|
@@ -21205,14 +21199,20 @@
|
|
21205
21199
|
newNodeDocs.displayId = +item.itemNumberId;
|
21206
21200
|
newNodeDocs.expandable = item.itemType == exports.DataType.folder || item.itemType == exports.DataType.area ? true : false;
|
21207
21201
|
if (item.itemType == exports.DataType.folder || item.itemType == exports.DataType.document) {
|
21208
|
-
if (this.treeData2.findIndex(function (x) {
|
21209
|
-
|
21202
|
+
if (this.treeData2.findIndex(function (x) {
|
21203
|
+
var _a, _b;
|
21204
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21205
|
+
(!newNodeDocs.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newNodeDocs.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === newNodeDocs.expandable;
|
21206
|
+
}) >= 0) {
|
21210
21207
|
this.treeData2 = __spreadArray(__spreadArray([], __read(this.treeData2)), [newNodeDocs]);
|
21211
21208
|
}
|
21212
21209
|
}
|
21213
21210
|
else {
|
21214
|
-
if (this.treeData1.findIndex(function (x) {
|
21215
|
-
|
21211
|
+
if (this.treeData1.findIndex(function (x) {
|
21212
|
+
var _a, _b;
|
21213
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21214
|
+
(!newNodeDocs.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newNodeDocs.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === newNodeDocs.expandable;
|
21215
|
+
}) >= 0) {
|
21216
21216
|
this.treeData1 = __spreadArray(__spreadArray([], __read(this.treeData1)), [newNodeDocs]);
|
21217
21217
|
}
|
21218
21218
|
}
|
@@ -21231,11 +21231,14 @@
|
|
21231
21231
|
this.documentCheckedList = [];
|
21232
21232
|
this.commonCheckedList = [];
|
21233
21233
|
}
|
21234
|
-
var index = this.checkedNodeList.findIndex(function (x) {
|
21235
|
-
|
21234
|
+
var index = this.checkedNodeList.findIndex(function (x) {
|
21235
|
+
var _a, _b;
|
21236
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21237
|
+
(!newNodeDocs.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newNodeDocs.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === newNodeDocs.expandable;
|
21238
|
+
});
|
21236
21239
|
if (index < 0) {
|
21237
21240
|
if (item.itemType == exports.DataType.folder || item.itemType == exports.DataType.document) {
|
21238
|
-
if (this.documentCheckedList.findIndex(function (x) { return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase(); }) < 0) {
|
21241
|
+
if (this.documentCheckedList.findIndex(function (x) { var _a, _b; return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newNodeDocs.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()); }) < 0) {
|
21239
21242
|
this.documentCheckedList.push({
|
21240
21243
|
id: newNodeDocs.id,
|
21241
21244
|
name: newNodeDocs.name,
|
@@ -21250,7 +21253,7 @@
|
|
21250
21253
|
}
|
21251
21254
|
}
|
21252
21255
|
else {
|
21253
|
-
if (this.commonCheckedList.findIndex(function (x) { return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase(); }) < 0) {
|
21256
|
+
if (this.commonCheckedList.findIndex(function (x) { var _a, _b; return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newNodeDocs.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()); }) < 0) {
|
21254
21257
|
this.commonCheckedList.push({
|
21255
21258
|
id: newNodeDocs.id,
|
21256
21259
|
name: newNodeDocs.name,
|
@@ -21303,16 +21306,18 @@
|
|
21303
21306
|
};
|
21304
21307
|
if (x.itemType === exports.DataType.area || x.itemType === exports.DataType.process) {
|
21305
21308
|
_this.treeData1.forEach(function (item) {
|
21309
|
+
var _a, _b;
|
21306
21310
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
21307
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
21311
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
21308
21312
|
selectProcess.push(node);
|
21309
21313
|
}
|
21310
21314
|
});
|
21311
21315
|
}
|
21312
21316
|
else {
|
21313
21317
|
_this.treeData2.forEach(function (item) {
|
21318
|
+
var _a, _b;
|
21314
21319
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
21315
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
21320
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
21316
21321
|
selectDocument.push(node);
|
21317
21322
|
}
|
21318
21323
|
});
|
@@ -21324,14 +21329,20 @@
|
|
21324
21329
|
this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), __read(selectDocument));
|
21325
21330
|
}
|
21326
21331
|
if (item.itemType === exports.DataType.folder || item.itemType === exports.DataType.document) {
|
21327
|
-
if (this.selectedData2.findIndex(function (x) {
|
21328
|
-
|
21332
|
+
if (this.selectedData2.findIndex(function (x) {
|
21333
|
+
var _a, _b;
|
21334
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
21335
|
+
(!item.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === item.expandable;
|
21336
|
+
}) < 0) {
|
21329
21337
|
this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), [item]);
|
21330
21338
|
}
|
21331
21339
|
}
|
21332
21340
|
else {
|
21333
|
-
if (this.selectedData.findIndex(function (x) {
|
21334
|
-
|
21341
|
+
if (this.selectedData.findIndex(function (x) {
|
21342
|
+
var _a, _b;
|
21343
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
21344
|
+
(!item.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable === item.expandable;
|
21345
|
+
}) < 0) {
|
21335
21346
|
this.selectedData = __spreadArray(__spreadArray([], __read(this.selectedData)), [item]);
|
21336
21347
|
}
|
21337
21348
|
}
|
@@ -21470,7 +21481,7 @@
|
|
21470
21481
|
return null;
|
21471
21482
|
};
|
21472
21483
|
SelectProcessDocumentPopupComponent.prototype.toggleSelectItem = function (node) {
|
21473
|
-
var selectedNode = this.checkedNodeList.find(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); });
|
21484
|
+
var selectedNode = this.checkedNodeList.find(function (x) { var _a, _b; return (x.id.toLowerCase() === node.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); });
|
21474
21485
|
if (selectedNode) {
|
21475
21486
|
this.removeCheckedNodeList({
|
21476
21487
|
id: selectedNode.id,
|
@@ -21490,7 +21501,7 @@
|
|
21490
21501
|
}
|
21491
21502
|
};
|
21492
21503
|
SelectProcessDocumentPopupComponent.prototype.isNodeSelected = function (node) {
|
21493
|
-
return this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); }).length > 0;
|
21504
|
+
return this.checkedNodeList.filter(function (x) { var _a, _b; return (x.id.toLowerCase() === node.id.toLowerCase() && ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())); }).length > 0;
|
21494
21505
|
};
|
21495
21506
|
SelectProcessDocumentPopupComponent.prototype.getChildrenOfFolder = function (node, type) {
|
21496
21507
|
var item = new QMSProcessDocumentItem();
|
@@ -21513,8 +21524,11 @@
|
|
21513
21524
|
if (!node.itemType) {
|
21514
21525
|
return;
|
21515
21526
|
}
|
21516
|
-
var index = this.checkedNodeList.findIndex(function (x) {
|
21517
|
-
|
21527
|
+
var index = this.checkedNodeList.findIndex(function (x) {
|
21528
|
+
var _a, _b;
|
21529
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21530
|
+
&& (!node.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.itemType === node.itemType;
|
21531
|
+
});
|
21518
21532
|
if (index >= 0) {
|
21519
21533
|
this.removeCheckedNodeList({
|
21520
21534
|
id: node.id,
|
@@ -21532,12 +21546,18 @@
|
|
21532
21546
|
var status = 0;
|
21533
21547
|
var statusName = '';
|
21534
21548
|
if (node.itemType == exports.DataType.folder || node.itemType == exports.DataType.document) {
|
21535
|
-
item = this.treeData2.find(function (x) {
|
21536
|
-
|
21549
|
+
item = this.treeData2.find(function (x) {
|
21550
|
+
var _a, _b;
|
21551
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21552
|
+
&& (!node.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable == node.expandable;
|
21553
|
+
});
|
21537
21554
|
}
|
21538
21555
|
else {
|
21539
|
-
item = this.treeData1.find(function (x) {
|
21540
|
-
|
21556
|
+
item = this.treeData1.find(function (x) {
|
21557
|
+
var _a, _b;
|
21558
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21559
|
+
&& (!node.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = node.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase())) && x.expandable == node.expandable;
|
21560
|
+
});
|
21541
21561
|
}
|
21542
21562
|
if (item) {
|
21543
21563
|
statusName = item.statusName;
|
@@ -21592,7 +21612,7 @@
|
|
21592
21612
|
return arrDisabledList.some(function (node) { return node.id.toUpperCase() === related.id.toUpperCase(); });
|
21593
21613
|
};
|
21594
21614
|
SelectProcessDocumentPopupComponent.prototype.toRelatedOptions = function (relateds) {
|
21595
|
-
var e_1,
|
21615
|
+
var e_1, _d;
|
21596
21616
|
var results = [];
|
21597
21617
|
try {
|
21598
21618
|
for (var relateds_1 = __values(relateds), relateds_1_1 = relateds_1.next(); !relateds_1_1.done; relateds_1_1 = relateds_1.next()) {
|
@@ -21603,7 +21623,7 @@
|
|
21603
21623
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
21604
21624
|
finally {
|
21605
21625
|
try {
|
21606
|
-
if (relateds_1_1 && !relateds_1_1.done && (
|
21626
|
+
if (relateds_1_1 && !relateds_1_1.done && (_d = relateds_1.return)) _d.call(relateds_1);
|
21607
21627
|
}
|
21608
21628
|
finally { if (e_1) throw e_1.error; }
|
21609
21629
|
}
|
@@ -21617,7 +21637,7 @@
|
|
21617
21637
|
SelectProcessDocumentPopupComponent.decorators = [
|
21618
21638
|
{ type: i0.Component, args: [{
|
21619
21639
|
selector: 'qms-select-process-document',
|
21620
|
-
template: "<div id=\"qmslib_related_popup\" class=\"qmslib__related__popup__container\">\r\n <div id=\"qmslib_related_popup_header\">\r\n <span mat-icon-button class=\"button__close\" (click)=\"onCloseClick()\">\r\n <mat-icon mat-icon>close</mat-icon>\r\n </span>\r\n <div id=\"qmslib_related_popup_header_001\" mat-dialog-content>\r\n <span>{{ moduleName | uppercase }}</span>\r\n </div>\r\n </div>\r\n\r\n <div id=\"qmslib_related_popup_search\" class=\"input__field\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-icon>search</mat-icon>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n (optionSelected)=\"selectRelated($event.option.value)\"\r\n [displayWith]=\"displayWhenSelectRelatedOption\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n [class.related-viewport]=\"isInputValue\"\r\n *ngIf=\"filteredOptions.length\"\r\n >\r\n <ng-container *ngFor=\"let type of searchOrder\">\r\n <div\r\n class=\"search__module-result\"\r\n *ngIf=\"canShowSearchOption(type.value)\"\r\n >\r\n <span class=\"search__module-title\">{{ getTitle(type.value) }}</span>\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions(type.value)\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled\"\r\n >\r\n <qms-list-item type=\"image-square\">\r\n <mat-icon\r\n leading-icon\r\n type=\"image-square\"\r\n [svgIcon]=\"getNodeIcon(option)\"\r\n ></mat-icon>\r\n <div qms-list-header>\r\n <div qms-line type=\"subtitle\" class=\"search__option-name\">\r\n {{ option.itemName }}\r\n </div>\r\n <div\r\n class=\"caption\"\r\n *ngIf=\"option.breadcumbs && option.breadcumbs.length\"\r\n >\r\n <qms-breadcrumb\r\n class=\"breadcrumb-containe\"\r\n type=\"table\"\r\n numDisplayItem=\"1\"\r\n [nodes]=\"option.breadcumbs\"\r\n >\r\n </qms-breadcrumb>\r\n </div>\r\n </div>\r\n <div qms-line color=\"default-subtitle\" *ngIf=\"getItemId(option)\">\r\n <span class=\"material-icons-outlined search__description-icon\">\r\n local_offer\r\n </span>\r\n {{ getItemId(option) }}\r\n </div>\r\n </qms-list-item>\r\n </mat-option>\r\n </div>\r\n </ng-container>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n\r\n <div class=\"row\">\r\n <div\r\n class=\"qms-scrollbar qmslib_related_popup_content\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length,\r\n 'col-6': splitView,\r\n 'col-12': !splitView\r\n }\"\r\n >\r\n <mat-expansion-panel\r\n hideToggle\r\n id=\"qmslib_related_popup_common_001\"\r\n [expanded]=\"isCommonExpanded\"\r\n (opened)=\"isCommonExpanded = true\"\r\n (closed)=\"isCommonExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title *ngIf=\"moduleId === module.documentProcess\">\r\n {{ LANG.PROCESSES | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isCommonExpanded ? \"keyboard_arrow_up\" : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree-new\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n (selectFolderEvent)=\"getItemOfFolder($event, dataType.area)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeProcess($event)\"\r\n ></qms-tree-new>\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <div\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n class=\"line__divider\"\r\n ></div>\r\n\r\n <mat-expansion-panel\r\n hideToggle\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n id=\"qmslib_related_popup_document_001\"\r\n [expanded]=\"isDocumentExpanded\"\r\n (opened)=\"isDocumentExpanded = true\"\r\n (closed)=\"isDocumentExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <div class=\"splitview-header\" *ngIf=\"selectedFolder\">\r\n {{ splitViewTitle }}\r\n </div>\r\n <div class=\"expand-node\" *ngFor=\"let node of itemInSplitview\">\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n [checked]=\"isNodeSelected(node)\"\r\n (change)=\"toggleSelectItem(node)\"\r\n *ngIf=\"!hideSplitviewCheckbox\"\r\n >\r\n </mat-checkbox>\r\n <button\r\n class=\"button-boder\"\r\n mat-icon-button\r\n [disableRipple]=\"true\"\r\n (click)=\"toggleSelectItem(node)\"\r\n *ngIf=\"node.itemName\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span\r\n class=\"text-node-item\"\r\n style=\"cursor: pointer\"\r\n (click)=\"toggleSelectItem(node)\"\r\n [class.bgSelected]=\"\r\n isSelectOne &&\r\n idCheckIconSplitView == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >\r\n <span\r\n class=\"text-node\"\r\n [class.select-one-checked]=\"\r\n isSelectOne &&\r\n idCheckIconSplitView ==\r\n idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >{{ node.itemName }}</span\r\n >\r\n <mat-icon\r\n class=\"select-one-checked\"\r\n *ngIf=\"\r\n isSelectOne &&\r\n idCheckIconSplitView ==\r\n idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >\r\n done\r\n </mat-icon>\r\n </span>\r\n </div>\r\n </mat-expansion-panel>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"qms-scrollbar qmslib-related-popup-splitview qmslib_related_popup_content col-6\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\"\r\n >\r\n <div class=\"splitview-header\" *ngIf=\"selectedFolder\">\r\n {{ splitViewTitle }}\r\n </div>\r\n <div class=\"expand-node\" *ngFor=\"let node of itemInSplitview\">\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n [checked]=\"isNodeSelected(node)\"\r\n (change)=\"toggleSelectItem(node)\"\r\n ></mat-checkbox>\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.itemName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12 pr-0 pe-0\">\r\n <div *ngIf=\"checkedNodeList.length\" class=\"panel__item qms-scrollbar\">\r\n <div class=\"related__item__inline\" *ngFor=\"let item of checkedNodeList\">\r\n <button\r\n *ngIf=\"item.itemName\"\r\n mat-button\r\n class=\"related__item__content\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(itemName) ? getItemChipName(item) : ''\r\n }}\"\r\n mode=\"dark\"\r\n >\r\n <span class=\"related__item__content_name\" #itemName>{{\r\n getItemChipName(item)\r\n }}</span>\r\n <mat-icon\r\n *ngIf=\"!(treeConfig1?.selectOne || treeConfig2?.selectOne)\"\r\n (click)=\"removeCheckedNodeList(item)\"\r\n >cancel</mat-icon\r\n >\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <div class=\"confirm__button__groups\">\r\n <button\r\n *ngIf=\"!checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 7px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }}\r\n </button>\r\n <button\r\n *ngIf=\"checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 0px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }} ({{ checkedNodeList.length }})\r\n </button>\r\n <button\r\n qms-btn-text\r\n [ngStyle]=\"{ 'margin-top': checkedNodeList.length ? '0px' : '7px' }\"\r\n (click)=\"onCloseClick()\"\r\n >\r\n {{ LANG.CANCEL }}\r\n </button>\r\n </div>\r\n</div>\r\n",
|
21640
|
+
template: "<div id=\"qmslib_related_popup\" class=\"qmslib__related__popup__container\">\r\n <div id=\"qmslib_related_popup_header\">\r\n <span mat-icon-button class=\"button__close\" (click)=\"onCloseClick()\">\r\n <mat-icon mat-icon>close</mat-icon>\r\n </span>\r\n <div id=\"qmslib_related_popup_header_001\" mat-dialog-content>\r\n <span>{{ moduleName | uppercase }}</span>\r\n </div>\r\n </div>\r\n\r\n <div id=\"qmslib_related_popup_search\" class=\"input__field\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-icon>search</mat-icon>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n (optionSelected)=\"selectRelated($event.option.value)\"\r\n [displayWith]=\"displayWhenSelectRelatedOption\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n [class.related-viewport]=\"isInputValue\"\r\n *ngIf=\"filteredOptions.length\"\r\n >\r\n <ng-container *ngFor=\"let type of searchOrder\">\r\n <div\r\n class=\"search__module-result\"\r\n *ngIf=\"canShowSearchOption(type.value)\"\r\n >\r\n <span class=\"search__module-title\">{{ getTitle(type.value) }}</span>\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions(type.value)\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled\"\r\n >\r\n <qms-list-item type=\"image-square\">\r\n <mat-icon\r\n leading-icon\r\n type=\"image-square\"\r\n [svgIcon]=\"getNodeIcon(option)\"\r\n ></mat-icon>\r\n <div qms-list-header>\r\n <div qms-line type=\"subtitle\" class=\"search__option-name\">\r\n {{ option.itemName }}\r\n </div>\r\n <div\r\n class=\"caption\"\r\n *ngIf=\"option.breadcumbs && option.breadcumbs.length\"\r\n >\r\n <qms-breadcrumb\r\n class=\"breadcrumb-containe\"\r\n type=\"table\"\r\n numDisplayItem=\"1\"\r\n [nodes]=\"option.breadcumbs\"\r\n >\r\n </qms-breadcrumb>\r\n </div>\r\n </div>\r\n <div qms-line color=\"default-subtitle\" *ngIf=\"getItemId(option)\">\r\n <span class=\"material-icons-outlined search__description-icon\">\r\n local_offer\r\n </span>\r\n {{ getItemId(option) }}\r\n </div>\r\n </qms-list-item>\r\n </mat-option>\r\n </div>\r\n </ng-container>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n\r\n <div class=\"row\">\r\n <div\r\n class=\"qms-scrollbar qmslib_related_popup_content\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length,\r\n 'col-6': splitView,\r\n 'col-12': !splitView\r\n }\"\r\n >\r\n <mat-expansion-panel\r\n hideToggle\r\n id=\"qmslib_related_popup_common_001\"\r\n [expanded]=\"isCommonExpanded\"\r\n (opened)=\"isCommonExpanded = true\"\r\n (closed)=\"isCommonExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title *ngIf=\"moduleId === module.documentProcess\">\r\n {{ LANG.PROCESSES | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isCommonExpanded ? \"keyboard_arrow_up\" : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree-new\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n (selectFolderEvent)=\"getItemOfFolder($event, dataType.area)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeProcess($event)\"\r\n ></qms-tree-new>\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <div\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n class=\"line__divider\"\r\n ></div>\r\n\r\n <mat-expansion-panel\r\n hideToggle\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n id=\"qmslib_related_popup_document_001\"\r\n [expanded]=\"isDocumentExpanded\"\r\n (opened)=\"isDocumentExpanded = true\"\r\n (closed)=\"isDocumentExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title> {{ LANG.DOCUMENTS | uppercase }} </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isDocumentExpanded ? \"keyboard_arrow_up\" : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_document_002\">\r\n <qms-tree-new\r\n [treeData]=\"treeData2\"\r\n [treeConfig]=\"treeConfig2\"\r\n [selectedData]=\"selectedData2\"\r\n [disabledList]=\"disabledList2\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.folder)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n (selectFolderEvent)=\"getItemOfFolder($event, dataType.folder)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeDocument($event)\"\r\n ></qms-tree-new>\r\n </div>\r\n </mat-expansion-panel>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"qms-scrollbar qmslib-related-popup-splitview qmslib_related_popup_content col-6\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\"\r\n >\r\n <div class=\"splitview-header\" *ngIf=\"selectedFolder\">\r\n {{ splitViewTitle }}\r\n </div>\r\n <div class=\"expand-node\" *ngFor=\"let node of itemInSplitview\">\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n [checked]=\"isNodeSelected(node)\"\r\n (change)=\"toggleSelectItem(node)\"\r\n ></mat-checkbox>\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.itemName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12 pr-0 pe-0\">\r\n <div *ngIf=\"checkedNodeList.length\" class=\"panel__item qms-scrollbar\">\r\n <div class=\"related__item__inline\" *ngFor=\"let item of checkedNodeList\">\r\n <button\r\n *ngIf=\"item.itemName\"\r\n mat-button\r\n class=\"related__item__content\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(itemName) ? getItemChipName(item) : ''\r\n }}\"\r\n mode=\"dark\"\r\n >\r\n <span class=\"related__item__content_name\" #itemName>{{\r\n getItemChipName(item)\r\n }}</span>\r\n <mat-icon\r\n *ngIf=\"!(treeConfig1?.selectOne || treeConfig2?.selectOne)\"\r\n (click)=\"removeCheckedNodeList(item)\"\r\n >cancel</mat-icon\r\n >\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <div class=\"confirm__button__groups\">\r\n <button\r\n *ngIf=\"!checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 7px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }}\r\n </button>\r\n <button\r\n *ngIf=\"checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 0px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }} ({{ checkedNodeList.length }})\r\n </button>\r\n <button\r\n qms-btn-text\r\n [ngStyle]=\"{ 'margin-top': checkedNodeList.length ? '0px' : '7px' }\"\r\n (click)=\"onCloseClick()\"\r\n >\r\n {{ LANG.CANCEL }}\r\n </button>\r\n </div>\r\n</div>\r\n",
|
21621
21641
|
encapsulation: i0.ViewEncapsulation.None,
|
21622
21642
|
styles: [".qms-scrollbar::-webkit-scrollbar{width:12px}.qms-scrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.12);background-clip:content-box}.qms-scrollbar::-webkit-scrollbar-thumb{background:rgba(0,0,0,.38);border-radius:20px;width:4px;border:4px solid transparent;background-clip:content-box}.qms-scrollbar::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.5);background-clip:content-box;border:4px solid transparent}.qms-scrollbar.none-scroll-bg::-webkit-scrollbar-track{background:transparent;background-clip:content-box}.qms__popup .button__close{float:right;top:-24px;right:-24px;cursor:pointer}.qms__danger button{border:none;color:#fff;padding:0;text-align:center;text-decoration:none;display:inline-block;cursor:pointer;height:20px;width:20px;font-family:Open Sans;font-size:12px;font-weight:600;font-style:normal;line-height:16px}.qms__danger .red{background-color:#9e360f;margin-left:10px}.qms__danger .yellow{background-color:#e4cf53;margin-left:10px;color:#323232}.qms__danger .green{background-color:#00804c;margin-left:10px}.confirm__button__groups{margin-top:11px}.confirm__button__groups button{min-height:36px;width:auto;font-family:Open Sans;font-weight:500;font-size:14px;letter-spacing:1px;line-height:16px;padding-left:15px;padding-right:15px;margin-right:5px;float:right}.confirm__button__groups .confirm{background:#f8f9f9}.confirm__button__groups .confirm:hover{background:#001983;color:#fff}.confirm__button__groups .confirm:disabled{cursor:not-allowed}.confirm__button__groups .cancel{background:#f8f9f9}.confirm__button__groups .cancel:hover{background:#001983;color:#fff}.qmslib__related__popup__container .input__field{display:flex;align-items:center}.qmslib__related__popup__container .input__field input{width:100%;padding:10px;outline:none;border:none;background:#eee}.qmslib__related__popup__container .input__field .mat-icon{margin-left:-30px;cursor:pointer;vertical-align:middle}.qmslib__related__popup__container .line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.qmslib__related__popup__container .button__close{float:right;top:-24px;right:-24px;cursor:pointer}.qmslib__related__popup__container .panel__content{height:450px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .panel__content_item{height:350px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .panel-tree .mat-expansion-panel-body{padding:0 12px 12px}.qmslib__related__popup__container .mat-expansion-panel-header{height:30px;font-size:12px;letter-spacing:1px;font-family:Raleway;font-weight:600;padding:0}.qmslib__related__popup__container .mat-expansion-panel-header .mat-expansion-panel-header-title{align-items:center;margin-left:12px}.qmslib__related__popup__container .mat-expansion-panel-header .related_popup_toggle-btn{width:1.5rem;height:1.5rem;line-height:1.5rem}.qmslib__related__popup__container .mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:none}.qmslib__related__popup__container .panel__item{height:100px;margin-top:12px;overflow-x:hidden;overflow-y:auto;padding-right:5px;width:100%;max-width:100%;display:flex;flex-wrap:wrap;align-content:flex-start}.qmslib__related__popup__container .panel__item .related__item__inline{max-width:100%}.qmslib__related__popup__container .panel__item .related__item__content{height:32px;line-height:32px;background-color:#e5e5e5;max-width:100%;margin-bottom:5px;margin-left:2.5px;margin-right:2.5px}.qmslib__related__popup__container .panel__item .related__item__content .mat-icon{color:#8e8e8e;font-size:24px}.qmslib__related__popup__container .panel__item .related__item__content span.related__item__content_name{display:inline-block;min-width:calc(100% - 13px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:278px}.qmslib__related__popup__container .qmslib-related-popup-splitview{background-color:#fff;border-left:1px solid #ccc;height:450px;overflow-y:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview.panel__content{height:450px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview.panel__content_item{height:350px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview .splitview-header{height:30px;font-size:12px;letter-spacing:1px;font-family:RALEWAY;font-weight:600;display:flex;align-items:center}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options{padding:0}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:11px}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options.mat-checkbox-checked{background:transparent!important}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node{margin-left:8px;display:flex;align-items:center;min-height:40px}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .mat-icon{color:rgba(0,0,0,.6);margin-right:17px;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .mat-icon svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .text-node-item{margin-left:8px;display:flex;align-items:center;min-height:32px;justify-content:space-between;width:100%}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .text-node-item .select-one-checked{color:#1954a9}cdk-virtual-scroll-viewport{overflow-x:hidden}cdk-virtual-scroll-viewport .search__module-result{margin:1.5rem;padding:0 0 .5rem}cdk-virtual-scroll-viewport .search__module-result .search__module-title{font-size:14px;font-weight:600}cdk-virtual-scroll-viewport .search__module-result .search__option{height:auto;line-height:normal;padding:8px 0;border-bottom:1px solid #e0e0e0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item.mat-2-line.image-item{height:auto}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content{margin:0;border-bottom:none}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .wrap-image.image-square{width:2.5rem;height:100%;background:transparent;align-self:center;margin-right:0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .wrap-image.image-square img{width:24px;height:24px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .material-icons-outlined.leading-icon,cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content mat-icon.leading-icon{padding:4px 0 4px 4px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .subtitle{font-weight:400}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .caption{overflow:hidden;line-height:normal;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .caption span.search__result__parent-name{display:inline-block;width:auto;width:calc(100% - 13px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .default-subtitle{color:rgba(0,0,0,.38)}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .search__description-icon{margin-right:0;width:12px;height:12px;font-size:12px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .qms-list-text{border-bottom:none}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .breadcrumb-containe .qms-breadcrumb-item .mat-icon{font-size:16px!important;padding-bottom:1px}cdk-virtual-scroll-viewport .search__module-result svg{display:block}#qmslib_related_popup_header_001{margin-bottom:20px;padding:0;font-weight:600;font-family:Raleway}.padding-5{padding:5px}.mat-autocomplete_related-viewport{height:100%;max-height:100%!important}.mat-autocomplete_related-viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mat-autocomplete_related-viewport .related-viewport{min-height:300px}"]
|
21623
21643
|
},] }
|