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
package/fesm2015/qms-angular.js
CHANGED
@@ -4451,7 +4451,7 @@ class TreeComponent {
|
|
4451
4451
|
for (let i = 0; i < obj.children.length; i++) {
|
4452
4452
|
if (obj.children[i].children) {
|
4453
4453
|
this.getChild(obj.children[i]);
|
4454
|
-
delete obj.children[i].children;
|
4454
|
+
// delete obj.children[i].children;
|
4455
4455
|
this.listChildNode.push(obj.children[i]);
|
4456
4456
|
}
|
4457
4457
|
else {
|
@@ -4606,7 +4606,7 @@ class TreeComponent {
|
|
4606
4606
|
for (let i = 0; i < this.treeControl.dataNodes.length; i++) {
|
4607
4607
|
if (this.treeControl.dataNodes[i].id === node.id &&
|
4608
4608
|
this.treeControl.dataNodes[i].parentId === node.parentId &&
|
4609
|
-
!this.treeControl.dataNodes[i].disabled
|
4609
|
+
!this.treeControl.dataNodes[i].disabled) {
|
4610
4610
|
if (!this.checklistSelection.isSelected(this.treeControl.dataNodes[i]))
|
4611
4611
|
this.checklistSelection.toggle(this.treeControl.dataNodes[i]);
|
4612
4612
|
}
|
@@ -5387,43 +5387,31 @@ class RelatedPopupComponent {
|
|
5387
5387
|
removeCheckedNodeList(item) {
|
5388
5388
|
this.selectedData = [];
|
5389
5389
|
this.selectedData2 = [];
|
5390
|
-
this.checkedNodeList = this.checkedNodeList.filter(x => (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()));
|
5391
|
-
const tempArr = [];
|
5392
|
-
const tempArrDocument = [];
|
5390
|
+
this.checkedNodeList = this.checkedNodeList.filter(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())); });
|
5393
5391
|
const newSelectProcessList = [];
|
5394
5392
|
const newSelectDocumentList = [];
|
5395
|
-
this.commonCheckedList.
|
5396
|
-
this.checkedNodeList.forEach(x => {
|
5397
|
-
if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
|
5398
|
-
tempArr.push(element);
|
5399
|
-
}
|
5400
|
-
});
|
5401
|
-
});
|
5393
|
+
this.commonCheckedList = this.commonCheckedList.filter(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())); });
|
5402
5394
|
this.singleProcessList.forEach(element => {
|
5403
5395
|
this.checkedNodeList.forEach(x => {
|
5404
|
-
|
5396
|
+
var _a, _b;
|
5397
|
+
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())) {
|
5405
5398
|
newSelectProcessList.push(element);
|
5406
5399
|
}
|
5407
5400
|
});
|
5408
5401
|
});
|
5409
5402
|
this.singleProcessList = newSelectProcessList;
|
5410
|
-
this.selectedData =
|
5411
|
-
this.documentCheckedList.
|
5412
|
-
this.checkedNodeList.forEach(x => {
|
5413
|
-
if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
|
5414
|
-
tempArrDocument.push(element);
|
5415
|
-
}
|
5416
|
-
});
|
5417
|
-
});
|
5403
|
+
this.selectedData = this.commonCheckedList;
|
5404
|
+
this.documentCheckedList = this.documentCheckedList.filter(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())); });
|
5418
5405
|
this.singleDocumentList.forEach(element => {
|
5419
5406
|
this.checkedNodeList.forEach(x => {
|
5420
|
-
|
5407
|
+
var _a, _b;
|
5408
|
+
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())) {
|
5421
5409
|
newSelectDocumentList.push(element);
|
5422
5410
|
}
|
5423
5411
|
});
|
5424
5412
|
});
|
5425
5413
|
this.singleDocumentList = newSelectDocumentList;
|
5426
|
-
this.selectedData2 =
|
5414
|
+
this.selectedData2 = this.commonCheckedList;
|
5427
5415
|
// when remove check node list, related options need refresh disabled options
|
5428
5416
|
this.refreshRelatedOptions();
|
5429
5417
|
}
|
@@ -5492,7 +5480,8 @@ class RelatedPopupComponent {
|
|
5492
5480
|
this.selectedNode = [];
|
5493
5481
|
if (this.treeConfig1.showCheckBox) {
|
5494
5482
|
index = this.checkedNodeList.findIndex(x => {
|
5495
|
-
|
5483
|
+
var _a, _b;
|
5484
|
+
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());
|
5496
5485
|
});
|
5497
5486
|
}
|
5498
5487
|
if (index < 0) {
|
@@ -5503,13 +5492,15 @@ class RelatedPopupComponent {
|
|
5503
5492
|
case this.dataType.document:
|
5504
5493
|
// document
|
5505
5494
|
const isExistInDisabled = this.disabledList2.findIndex(x => {
|
5506
|
-
|
5495
|
+
var _a, _b;
|
5496
|
+
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());
|
5507
5497
|
});
|
5508
5498
|
if (isExistInDisabled >= 0) {
|
5509
5499
|
return;
|
5510
5500
|
}
|
5511
5501
|
position = this.treeData2.findIndex(x => {
|
5512
|
-
|
5502
|
+
var _a;
|
5503
|
+
return x.childId === item.id && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
5513
5504
|
});
|
5514
5505
|
if (position >= 0) {
|
5515
5506
|
node = this.treeData2[position];
|
@@ -5622,7 +5613,8 @@ class RelatedPopupComponent {
|
|
5622
5613
|
break;
|
5623
5614
|
case this.dataType.area:
|
5624
5615
|
position = this.treeData1.findIndex(x => {
|
5625
|
-
|
5616
|
+
var _a, _b;
|
5617
|
+
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());
|
5626
5618
|
});
|
5627
5619
|
typeId = item.itemType;
|
5628
5620
|
if (position >= 0) {
|
@@ -5660,13 +5652,15 @@ class RelatedPopupComponent {
|
|
5660
5652
|
break;
|
5661
5653
|
case this.dataType.process:
|
5662
5654
|
const isExistInProcessDisabled = this.disabledList.findIndex(x => {
|
5663
|
-
|
5655
|
+
var _a, _b;
|
5656
|
+
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());
|
5664
5657
|
});
|
5665
5658
|
if (isExistInProcessDisabled >= 0) {
|
5666
5659
|
return;
|
5667
5660
|
}
|
5668
5661
|
position = this.treeData1.findIndex(x => {
|
5669
|
-
|
5662
|
+
var _a;
|
5663
|
+
return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
5670
5664
|
});
|
5671
5665
|
if (position >= 0) {
|
5672
5666
|
node = this.treeData1[position];
|
@@ -5759,7 +5753,8 @@ class RelatedPopupComponent {
|
|
5759
5753
|
case this.dataType.checklistCategory:
|
5760
5754
|
case this.dataType.riskFolder:
|
5761
5755
|
position = this.treeData1.findIndex(x => {
|
5762
|
-
|
5756
|
+
var _a, _b;
|
5757
|
+
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() : '');
|
5763
5758
|
});
|
5764
5759
|
this.selectNodeRecursive(this.treeData1[position], item.itemType);
|
5765
5760
|
break;
|
@@ -5767,7 +5762,8 @@ class RelatedPopupComponent {
|
|
5767
5762
|
case this.dataType.checklist:
|
5768
5763
|
case this.dataType.risk:
|
5769
5764
|
position = this.treeData1.findIndex(x => {
|
5770
|
-
|
5765
|
+
var _a;
|
5766
|
+
return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === ((_a = item.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
5771
5767
|
});
|
5772
5768
|
if (position >= 0) {
|
5773
5769
|
node = this.treeData1[position];
|
@@ -5798,7 +5794,7 @@ class RelatedPopupComponent {
|
|
5798
5794
|
parentId: item.parentId
|
5799
5795
|
};
|
5800
5796
|
let nodeChildren = this.treeData1.
|
5801
|
-
filter(x => x.rootId === item.rootId).
|
5797
|
+
filter(x => x.rootId === item.rootId && x.childId).
|
5802
5798
|
map(x => {
|
5803
5799
|
return {
|
5804
5800
|
id: x.childId,
|
@@ -5848,8 +5844,8 @@ class RelatedPopupComponent {
|
|
5848
5844
|
}
|
5849
5845
|
getCommonCheckedNode(list) {
|
5850
5846
|
this.checkedNodeList = [];
|
5851
|
-
this.commonCheckedList = [];
|
5852
5847
|
this.singleProcessList = [];
|
5848
|
+
this.commonCheckedList = [];
|
5853
5849
|
this.checkedNodeList = [...this.singleDocumentList];
|
5854
5850
|
if (list.length) {
|
5855
5851
|
list.forEach(item => {
|
@@ -5914,23 +5910,12 @@ class RelatedPopupComponent {
|
|
5914
5910
|
this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
|
5915
5911
|
}
|
5916
5912
|
}
|
5917
|
-
this.selectedData = this.
|
5918
|
-
return {
|
5919
|
-
id: item.id,
|
5920
|
-
name: item.itemName,
|
5921
|
-
parentId: item.parentId,
|
5922
|
-
levelType: item.levelType,
|
5923
|
-
level: 0,
|
5924
|
-
expandable: true,
|
5925
|
-
hasChild: true,
|
5926
|
-
disabled: false
|
5927
|
-
};
|
5928
|
-
});
|
5913
|
+
this.selectedData = this.commonCheckedList;
|
5929
5914
|
}
|
5930
5915
|
getDocumentCheckedNode(list) {
|
5931
5916
|
this.checkedNodeList = [];
|
5932
|
-
this.documentCheckedList = [];
|
5933
5917
|
this.singleDocumentList = [];
|
5918
|
+
this.documentCheckedList = [];
|
5934
5919
|
this.checkedNodeList = [...this.singleProcessList];
|
5935
5920
|
if (list.length) {
|
5936
5921
|
list.forEach(item => {
|
@@ -5995,6 +5980,7 @@ class RelatedPopupComponent {
|
|
5995
5980
|
this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
|
5996
5981
|
}
|
5997
5982
|
}
|
5983
|
+
this.selectedData2 = this.documentCheckedList;
|
5998
5984
|
}
|
5999
5985
|
onCloseClick() {
|
6000
5986
|
this.selectedFolder = null;
|
@@ -6198,7 +6184,7 @@ class RelatedPopupComponent {
|
|
6198
6184
|
return null;
|
6199
6185
|
}
|
6200
6186
|
toggleSelectItem(node) {
|
6201
|
-
const selectedNode = this.checkedNodeList.find(x => (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()));
|
6187
|
+
const selectedNode = this.checkedNodeList.find(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())); });
|
6202
6188
|
if (selectedNode) {
|
6203
6189
|
this.removeCheckedNodeList({
|
6204
6190
|
id: selectedNode.id,
|
@@ -6215,7 +6201,7 @@ class RelatedPopupComponent {
|
|
6215
6201
|
}
|
6216
6202
|
}
|
6217
6203
|
isNodeSelected(node) {
|
6218
|
-
return this.checkedNodeList.filter(x => (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase())).length > 0;
|
6204
|
+
return this.checkedNodeList.filter(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;
|
6219
6205
|
}
|
6220
6206
|
getChildrenOfFolder(node, type) {
|
6221
6207
|
if (this.splitView) {
|
@@ -6256,26 +6242,32 @@ class RelatedPopupComponent {
|
|
6256
6242
|
return this.getModuleFilteredOptions(moduleId).length > 0;
|
6257
6243
|
}
|
6258
6244
|
selectNodeTreeEvent(node) {
|
6259
|
-
const index = this.
|
6260
|
-
|
6245
|
+
const index = this.commonCheckedList.findIndex(x => {
|
6246
|
+
var _a, _b;
|
6247
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
6248
|
+
&& (!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;
|
6249
|
+
});
|
6261
6250
|
if (index >= 0) {
|
6262
|
-
this.
|
6251
|
+
this.commonCheckedList = this.commonCheckedList.filter((_, ind) => ind !== index);
|
6263
6252
|
}
|
6264
6253
|
else {
|
6265
|
-
this.selectedData = [...this.selectedData, node];
|
6266
6254
|
this.commonCheckedList = [...this.commonCheckedList, node];
|
6267
6255
|
}
|
6256
|
+
this.selectedData = this.commonCheckedList;
|
6268
6257
|
}
|
6269
6258
|
selectNodeTree2Event(node) {
|
6270
|
-
const index = this.
|
6271
|
-
|
6259
|
+
const index = this.documentCheckedList.findIndex(x => {
|
6260
|
+
var _a, _b;
|
6261
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
6262
|
+
&& (!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;
|
6263
|
+
});
|
6272
6264
|
if (index >= 0) {
|
6273
|
-
this.
|
6265
|
+
this.documentCheckedList = this.documentCheckedList.filter((_, ind) => ind !== index);
|
6274
6266
|
}
|
6275
6267
|
else {
|
6276
|
-
this.selectedData2 = [...this.selectedData2, node];
|
6277
6268
|
this.documentCheckedList = [...this.documentCheckedList, node];
|
6278
6269
|
}
|
6270
|
+
this.selectedData2 = this.documentCheckedList;
|
6279
6271
|
}
|
6280
6272
|
getChildNodeSelectOne(listChildren) {
|
6281
6273
|
this.listChildrenSelectOne = [];
|
@@ -6283,7 +6275,7 @@ class RelatedPopupComponent {
|
|
6283
6275
|
}
|
6284
6276
|
hasSelected(related) {
|
6285
6277
|
const arrDisabledList = this.disabledList.concat(this.disabledList2);
|
6286
|
-
return arrDisabledList.some(node => node.id.toUpperCase() === related.id.toUpperCase() && (!related.parentId || related.parentId.toLowerCase() === node.parentId.toLowerCase()));
|
6278
|
+
return arrDisabledList.some(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())); });
|
6287
6279
|
}
|
6288
6280
|
toRelatedOptions(relateds) {
|
6289
6281
|
const results = [];
|
@@ -18529,10 +18521,6 @@ class SelectOneDialog {
|
|
18529
18521
|
return related ? related.itemName : undefined;
|
18530
18522
|
}
|
18531
18523
|
selectItemSearched(item) {
|
18532
|
-
var _a;
|
18533
|
-
if ((_a = this.treeConfig) === null || _a === void 0 ? void 0 : _a.selectOne) {
|
18534
|
-
this.disabledList = [];
|
18535
|
-
}
|
18536
18524
|
// reset to root
|
18537
18525
|
this.expandToChildNode = [''];
|
18538
18526
|
this.checkedNodeList = [];
|
@@ -18560,7 +18548,8 @@ class SelectOneDialog {
|
|
18560
18548
|
itemType: typeId,
|
18561
18549
|
itemNumberId: item.itemNumberId,
|
18562
18550
|
levelType: item.levelType,
|
18563
|
-
parentId: node.rootId
|
18551
|
+
parentId: node.rootId,
|
18552
|
+
parentName: node.rootName
|
18564
18553
|
});
|
18565
18554
|
}
|
18566
18555
|
if (this.treeConfig.canHaveDupId) {
|
@@ -19969,21 +19958,23 @@ class SelectProcessDocumentPopupComponent {
|
|
19969
19958
|
removeCheckedNodeList(item) {
|
19970
19959
|
this.selectedData = [];
|
19971
19960
|
this.selectedData2 = [];
|
19972
|
-
this.checkedNodeList = this.checkedNodeList.filter(x => (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()));
|
19961
|
+
this.checkedNodeList = this.checkedNodeList.filter(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())); });
|
19973
19962
|
const tempArr = [];
|
19974
19963
|
const tempArrDocument = [];
|
19975
19964
|
const newSelectProcessList = [];
|
19976
19965
|
const newSelectDocumentList = [];
|
19977
19966
|
this.commonCheckedList.forEach(element => {
|
19978
19967
|
this.checkedNodeList.forEach(x => {
|
19979
|
-
|
19968
|
+
var _a, _b;
|
19969
|
+
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())) {
|
19980
19970
|
tempArr.push(element);
|
19981
19971
|
}
|
19982
19972
|
});
|
19983
19973
|
});
|
19984
19974
|
this.singleProcessList.forEach(element => {
|
19985
19975
|
this.checkedNodeList.forEach(x => {
|
19986
|
-
|
19976
|
+
var _a, _b;
|
19977
|
+
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())) {
|
19987
19978
|
newSelectProcessList.push(element);
|
19988
19979
|
}
|
19989
19980
|
});
|
@@ -19994,14 +19985,16 @@ class SelectProcessDocumentPopupComponent {
|
|
19994
19985
|
}
|
19995
19986
|
this.documentCheckedList.forEach(element => {
|
19996
19987
|
this.checkedNodeList.forEach(x => {
|
19997
|
-
|
19988
|
+
var _a, _b;
|
19989
|
+
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())) {
|
19998
19990
|
tempArrDocument.push(element);
|
19999
19991
|
}
|
20000
19992
|
});
|
20001
19993
|
});
|
20002
19994
|
this.singleDocumentList.forEach(element => {
|
20003
19995
|
this.checkedNodeList.forEach(x => {
|
20004
|
-
|
19996
|
+
var _a, _b;
|
19997
|
+
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())) {
|
20005
19998
|
newSelectDocumentList.push(element);
|
20006
19999
|
}
|
20007
20000
|
});
|
@@ -20071,15 +20064,16 @@ class SelectProcessDocumentPopupComponent {
|
|
20071
20064
|
this.selectedNode = [];
|
20072
20065
|
if (this.treeConfig1.showCheckBox) {
|
20073
20066
|
index = this.checkedNodeList.findIndex(x => {
|
20074
|
-
|
20067
|
+
var _a, _b;
|
20068
|
+
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;
|
20075
20069
|
});
|
20076
20070
|
}
|
20077
20071
|
if (index < 0) {
|
20078
20072
|
if (item.itemType === this.dataType.document || item.itemType === this.dataType.folder) {
|
20079
20073
|
// document
|
20080
20074
|
const isExistInDisabled = this.disabledList2.findIndex(x => {
|
20081
|
-
var _a;
|
20082
|
-
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);
|
20075
|
+
var _a, _b, _c;
|
20076
|
+
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);
|
20083
20077
|
}) >= 0;
|
20084
20078
|
if (isExistInDisabled) {
|
20085
20079
|
return;
|
@@ -20088,8 +20082,8 @@ class SelectProcessDocumentPopupComponent {
|
|
20088
20082
|
}
|
20089
20083
|
else if (item.itemType === this.dataType.area || item.itemType === this.dataType.process) {
|
20090
20084
|
const isExistInDisabled = this.disabledList.findIndex(x => {
|
20091
|
-
var _a;
|
20092
|
-
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);
|
20085
|
+
var _a, _b, _c;
|
20086
|
+
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);
|
20093
20087
|
}) >= 0;
|
20094
20088
|
if (isExistInDisabled) {
|
20095
20089
|
return;
|
@@ -20111,14 +20105,20 @@ class SelectProcessDocumentPopupComponent {
|
|
20111
20105
|
newNodeDocs.displayId = +item.itemNumberId;
|
20112
20106
|
newNodeDocs.expandable = item.itemType == DataType$1.folder || item.itemType == DataType$1.area ? true : false;
|
20113
20107
|
if (item.itemType == DataType$1.folder || item.itemType == DataType$1.document) {
|
20114
|
-
if (this.treeData2.findIndex(x =>
|
20115
|
-
|
20108
|
+
if (this.treeData2.findIndex(x => {
|
20109
|
+
var _a, _b;
|
20110
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
20111
|
+
(!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;
|
20112
|
+
}) >= 0) {
|
20116
20113
|
this.treeData2 = [...this.treeData2, newNodeDocs];
|
20117
20114
|
}
|
20118
20115
|
}
|
20119
20116
|
else {
|
20120
|
-
if (this.treeData1.findIndex(x =>
|
20121
|
-
|
20117
|
+
if (this.treeData1.findIndex(x => {
|
20118
|
+
var _a, _b;
|
20119
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
20120
|
+
(!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;
|
20121
|
+
}) >= 0) {
|
20122
20122
|
this.treeData1 = [...this.treeData1, newNodeDocs];
|
20123
20123
|
}
|
20124
20124
|
}
|
@@ -20137,11 +20137,14 @@ class SelectProcessDocumentPopupComponent {
|
|
20137
20137
|
this.documentCheckedList = [];
|
20138
20138
|
this.commonCheckedList = [];
|
20139
20139
|
}
|
20140
|
-
const index = this.checkedNodeList.findIndex(x =>
|
20141
|
-
|
20140
|
+
const index = this.checkedNodeList.findIndex(x => {
|
20141
|
+
var _a, _b;
|
20142
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
20143
|
+
(!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;
|
20144
|
+
});
|
20142
20145
|
if (index < 0) {
|
20143
20146
|
if (item.itemType == DataType$1.folder || item.itemType == DataType$1.document) {
|
20144
|
-
if (this.documentCheckedList.findIndex(x => x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase()) < 0) {
|
20147
|
+
if (this.documentCheckedList.findIndex(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) {
|
20145
20148
|
this.documentCheckedList.push({
|
20146
20149
|
id: newNodeDocs.id,
|
20147
20150
|
name: newNodeDocs.name,
|
@@ -20156,7 +20159,7 @@ class SelectProcessDocumentPopupComponent {
|
|
20156
20159
|
}
|
20157
20160
|
}
|
20158
20161
|
else {
|
20159
|
-
if (this.commonCheckedList.findIndex(x => x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase()) < 0) {
|
20162
|
+
if (this.commonCheckedList.findIndex(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) {
|
20160
20163
|
this.commonCheckedList.push({
|
20161
20164
|
id: newNodeDocs.id,
|
20162
20165
|
name: newNodeDocs.name,
|
@@ -20208,16 +20211,18 @@ class SelectProcessDocumentPopupComponent {
|
|
20208
20211
|
};
|
20209
20212
|
if (x.itemType === DataType$1.area || x.itemType === DataType$1.process) {
|
20210
20213
|
this.treeData1.forEach(item => {
|
20214
|
+
var _a, _b;
|
20211
20215
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
20212
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
20216
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
20213
20217
|
selectProcess.push(node);
|
20214
20218
|
}
|
20215
20219
|
});
|
20216
20220
|
}
|
20217
20221
|
else {
|
20218
20222
|
this.treeData2.forEach(item => {
|
20223
|
+
var _a, _b;
|
20219
20224
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
20220
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
20225
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
20221
20226
|
selectDocument.push(node);
|
20222
20227
|
}
|
20223
20228
|
});
|
@@ -20229,14 +20234,20 @@ class SelectProcessDocumentPopupComponent {
|
|
20229
20234
|
this.selectedData2 = [...this.selectedData2, ...selectDocument];
|
20230
20235
|
}
|
20231
20236
|
if (item.itemType === DataType$1.folder || item.itemType === DataType$1.document) {
|
20232
|
-
if (this.selectedData2.findIndex(x =>
|
20233
|
-
|
20237
|
+
if (this.selectedData2.findIndex(x => {
|
20238
|
+
var _a, _b;
|
20239
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
20240
|
+
(!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;
|
20241
|
+
}) < 0) {
|
20234
20242
|
this.selectedData2 = [...this.selectedData2, item];
|
20235
20243
|
}
|
20236
20244
|
}
|
20237
20245
|
else {
|
20238
|
-
if (this.selectedData.findIndex(x =>
|
20239
|
-
|
20246
|
+
if (this.selectedData.findIndex(x => {
|
20247
|
+
var _a, _b;
|
20248
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
20249
|
+
(!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;
|
20250
|
+
}) < 0) {
|
20240
20251
|
this.selectedData = [...this.selectedData, item];
|
20241
20252
|
}
|
20242
20253
|
}
|
@@ -20374,7 +20385,7 @@ class SelectProcessDocumentPopupComponent {
|
|
20374
20385
|
return null;
|
20375
20386
|
}
|
20376
20387
|
toggleSelectItem(node) {
|
20377
|
-
const selectedNode = this.checkedNodeList.find(x => (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()));
|
20388
|
+
const selectedNode = this.checkedNodeList.find(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())); });
|
20378
20389
|
if (selectedNode) {
|
20379
20390
|
this.removeCheckedNodeList({
|
20380
20391
|
id: selectedNode.id,
|
@@ -20394,7 +20405,7 @@ class SelectProcessDocumentPopupComponent {
|
|
20394
20405
|
}
|
20395
20406
|
}
|
20396
20407
|
isNodeSelected(node) {
|
20397
|
-
return this.checkedNodeList.filter(x => (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase())).length > 0;
|
20408
|
+
return this.checkedNodeList.filter(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;
|
20398
20409
|
}
|
20399
20410
|
getChildrenOfFolder(node, type) {
|
20400
20411
|
let item = new QMSProcessDocumentItem();
|
@@ -20417,8 +20428,11 @@ class SelectProcessDocumentPopupComponent {
|
|
20417
20428
|
if (!node.itemType) {
|
20418
20429
|
return;
|
20419
20430
|
}
|
20420
|
-
const index = this.checkedNodeList.findIndex(x =>
|
20421
|
-
|
20431
|
+
const index = this.checkedNodeList.findIndex(x => {
|
20432
|
+
var _a, _b;
|
20433
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
20434
|
+
&& (!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;
|
20435
|
+
});
|
20422
20436
|
if (index >= 0) {
|
20423
20437
|
this.removeCheckedNodeList({
|
20424
20438
|
id: node.id,
|
@@ -20436,12 +20450,18 @@ class SelectProcessDocumentPopupComponent {
|
|
20436
20450
|
let status = 0;
|
20437
20451
|
let statusName = '';
|
20438
20452
|
if (node.itemType == DataType$1.folder || node.itemType == DataType$1.document) {
|
20439
|
-
item = this.treeData2.find(x =>
|
20440
|
-
|
20453
|
+
item = this.treeData2.find(x => {
|
20454
|
+
var _a, _b;
|
20455
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
20456
|
+
&& (!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;
|
20457
|
+
});
|
20441
20458
|
}
|
20442
20459
|
else {
|
20443
|
-
item = this.treeData1.find(x =>
|
20444
|
-
|
20460
|
+
item = this.treeData1.find(x => {
|
20461
|
+
var _a, _b;
|
20462
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
20463
|
+
&& (!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;
|
20464
|
+
});
|
20445
20465
|
}
|
20446
20466
|
if (item) {
|
20447
20467
|
statusName = item.statusName;
|
@@ -20509,7 +20529,7 @@ class SelectProcessDocumentPopupComponent {
|
|
20509
20529
|
SelectProcessDocumentPopupComponent.decorators = [
|
20510
20530
|
{ type: Component, args: [{
|
20511
20531
|
selector: 'qms-select-process-document',
|
20512
|
-
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",
|
20532
|
+
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",
|
20513
20533
|
encapsulation: ViewEncapsulation.None,
|
20514
20534
|
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}"]
|
20515
20535
|
},] }
|