qms-angular 1.0.80 → 1.0.81
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 +113 -90
- 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-process-document/select-process-document.component.js +64 -33
- package/esm2015/lib/components/tree/tree.component.js +2 -2
- package/fesm2015/qms-angular.js +111 -88
- package/fesm2015/qms-angular.js.map +1 -1
- package/package.json +1 -1
- package/src/themes/core/_form.scss +4 -0
@@ -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;
|
@@ -21059,21 +21051,23 @@
|
|
21059
21051
|
var _this = this;
|
21060
21052
|
this.selectedData = [];
|
21061
21053
|
this.selectedData2 = [];
|
21062
|
-
this.checkedNodeList = this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()); });
|
21054
|
+
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())); });
|
21063
21055
|
var tempArr = [];
|
21064
21056
|
var tempArrDocument = [];
|
21065
21057
|
var newSelectProcessList = [];
|
21066
21058
|
var newSelectDocumentList = [];
|
21067
21059
|
this.commonCheckedList.forEach(function (element) {
|
21068
21060
|
_this.checkedNodeList.forEach(function (x) {
|
21069
|
-
|
21061
|
+
var _a, _b;
|
21062
|
+
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())) {
|
21070
21063
|
tempArr.push(element);
|
21071
21064
|
}
|
21072
21065
|
});
|
21073
21066
|
});
|
21074
21067
|
this.singleProcessList.forEach(function (element) {
|
21075
21068
|
_this.checkedNodeList.forEach(function (x) {
|
21076
|
-
|
21069
|
+
var _a, _b;
|
21070
|
+
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())) {
|
21077
21071
|
newSelectProcessList.push(element);
|
21078
21072
|
}
|
21079
21073
|
});
|
@@ -21084,14 +21078,16 @@
|
|
21084
21078
|
}
|
21085
21079
|
this.documentCheckedList.forEach(function (element) {
|
21086
21080
|
_this.checkedNodeList.forEach(function (x) {
|
21087
|
-
|
21081
|
+
var _a, _b;
|
21082
|
+
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())) {
|
21088
21083
|
tempArrDocument.push(element);
|
21089
21084
|
}
|
21090
21085
|
});
|
21091
21086
|
});
|
21092
21087
|
this.singleDocumentList.forEach(function (element) {
|
21093
21088
|
_this.checkedNodeList.forEach(function (x) {
|
21094
|
-
|
21089
|
+
var _a, _b;
|
21090
|
+
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())) {
|
21095
21091
|
newSelectDocumentList.push(element);
|
21096
21092
|
}
|
21097
21093
|
});
|
@@ -21161,15 +21157,16 @@
|
|
21161
21157
|
this.selectedNode = [];
|
21162
21158
|
if (this.treeConfig1.showCheckBox) {
|
21163
21159
|
index = this.checkedNodeList.findIndex(function (x) {
|
21164
|
-
|
21160
|
+
var _a, _b;
|
21161
|
+
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;
|
21165
21162
|
});
|
21166
21163
|
}
|
21167
21164
|
if (index < 0) {
|
21168
21165
|
if (item.itemType === this.dataType.document || item.itemType === this.dataType.folder) {
|
21169
21166
|
// document
|
21170
21167
|
var isExistInDisabled = this.disabledList2.findIndex(function (x) {
|
21171
|
-
var _a;
|
21172
|
-
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);
|
21168
|
+
var _a, _b, _c;
|
21169
|
+
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);
|
21173
21170
|
}) >= 0;
|
21174
21171
|
if (isExistInDisabled) {
|
21175
21172
|
return;
|
@@ -21178,8 +21175,8 @@
|
|
21178
21175
|
}
|
21179
21176
|
else if (item.itemType === this.dataType.area || item.itemType === this.dataType.process) {
|
21180
21177
|
var isExistInDisabled = this.disabledList.findIndex(function (x) {
|
21181
|
-
var _a;
|
21182
|
-
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);
|
21178
|
+
var _a, _b, _c;
|
21179
|
+
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);
|
21183
21180
|
}) >= 0;
|
21184
21181
|
if (isExistInDisabled) {
|
21185
21182
|
return;
|
@@ -21201,14 +21198,20 @@
|
|
21201
21198
|
newNodeDocs.displayId = +item.itemNumberId;
|
21202
21199
|
newNodeDocs.expandable = item.itemType == exports.DataType.folder || item.itemType == exports.DataType.area ? true : false;
|
21203
21200
|
if (item.itemType == exports.DataType.folder || item.itemType == exports.DataType.document) {
|
21204
|
-
if (this.treeData2.findIndex(function (x) {
|
21205
|
-
|
21201
|
+
if (this.treeData2.findIndex(function (x) {
|
21202
|
+
var _a, _b;
|
21203
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21204
|
+
(!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;
|
21205
|
+
}) >= 0) {
|
21206
21206
|
this.treeData2 = __spreadArray(__spreadArray([], __read(this.treeData2)), [newNodeDocs]);
|
21207
21207
|
}
|
21208
21208
|
}
|
21209
21209
|
else {
|
21210
|
-
if (this.treeData1.findIndex(function (x) {
|
21211
|
-
|
21210
|
+
if (this.treeData1.findIndex(function (x) {
|
21211
|
+
var _a, _b;
|
21212
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21213
|
+
(!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;
|
21214
|
+
}) >= 0) {
|
21212
21215
|
this.treeData1 = __spreadArray(__spreadArray([], __read(this.treeData1)), [newNodeDocs]);
|
21213
21216
|
}
|
21214
21217
|
}
|
@@ -21227,11 +21230,14 @@
|
|
21227
21230
|
this.documentCheckedList = [];
|
21228
21231
|
this.commonCheckedList = [];
|
21229
21232
|
}
|
21230
|
-
var index = this.checkedNodeList.findIndex(function (x) {
|
21231
|
-
|
21233
|
+
var index = this.checkedNodeList.findIndex(function (x) {
|
21234
|
+
var _a, _b;
|
21235
|
+
return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() &&
|
21236
|
+
(!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;
|
21237
|
+
});
|
21232
21238
|
if (index < 0) {
|
21233
21239
|
if (item.itemType == exports.DataType.folder || item.itemType == exports.DataType.document) {
|
21234
|
-
if (this.documentCheckedList.findIndex(function (x) { return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase(); }) < 0) {
|
21240
|
+
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) {
|
21235
21241
|
this.documentCheckedList.push({
|
21236
21242
|
id: newNodeDocs.id,
|
21237
21243
|
name: newNodeDocs.name,
|
@@ -21246,7 +21252,7 @@
|
|
21246
21252
|
}
|
21247
21253
|
}
|
21248
21254
|
else {
|
21249
|
-
if (this.commonCheckedList.findIndex(function (x) { return x.id.toLowerCase() === newNodeDocs.id.toLowerCase() && x.parentId.toLowerCase() === newNodeDocs.parentId.toLowerCase(); }) < 0) {
|
21255
|
+
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) {
|
21250
21256
|
this.commonCheckedList.push({
|
21251
21257
|
id: newNodeDocs.id,
|
21252
21258
|
name: newNodeDocs.name,
|
@@ -21299,16 +21305,18 @@
|
|
21299
21305
|
};
|
21300
21306
|
if (x.itemType === exports.DataType.area || x.itemType === exports.DataType.process) {
|
21301
21307
|
_this.treeData1.forEach(function (item) {
|
21308
|
+
var _a, _b;
|
21302
21309
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
21303
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
21310
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
21304
21311
|
selectProcess.push(node);
|
21305
21312
|
}
|
21306
21313
|
});
|
21307
21314
|
}
|
21308
21315
|
else {
|
21309
21316
|
_this.treeData2.forEach(function (item) {
|
21317
|
+
var _a, _b;
|
21310
21318
|
if (item.id && x.id.toLowerCase() === item.id.toLowerCase() &&
|
21311
|
-
(!x.parentId || x.parentId.toLowerCase() === item.parentId.toLowerCase())) {
|
21319
|
+
(!x.parentId || ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = item.parentId) === null || _b === void 0 ? void 0 : _b.toLowerCase()))) {
|
21312
21320
|
selectDocument.push(node);
|
21313
21321
|
}
|
21314
21322
|
});
|
@@ -21320,14 +21328,20 @@
|
|
21320
21328
|
this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), __read(selectDocument));
|
21321
21329
|
}
|
21322
21330
|
if (item.itemType === exports.DataType.folder || item.itemType === exports.DataType.document) {
|
21323
|
-
if (this.selectedData2.findIndex(function (x) {
|
21324
|
-
|
21331
|
+
if (this.selectedData2.findIndex(function (x) {
|
21332
|
+
var _a, _b;
|
21333
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
21334
|
+
(!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;
|
21335
|
+
}) < 0) {
|
21325
21336
|
this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), [item]);
|
21326
21337
|
}
|
21327
21338
|
}
|
21328
21339
|
else {
|
21329
|
-
if (this.selectedData.findIndex(function (x) {
|
21330
|
-
|
21340
|
+
if (this.selectedData.findIndex(function (x) {
|
21341
|
+
var _a, _b;
|
21342
|
+
return x.id.toLowerCase() === item.id.toLowerCase() &&
|
21343
|
+
(!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;
|
21344
|
+
}) < 0) {
|
21331
21345
|
this.selectedData = __spreadArray(__spreadArray([], __read(this.selectedData)), [item]);
|
21332
21346
|
}
|
21333
21347
|
}
|
@@ -21466,7 +21480,7 @@
|
|
21466
21480
|
return null;
|
21467
21481
|
};
|
21468
21482
|
SelectProcessDocumentPopupComponent.prototype.toggleSelectItem = function (node) {
|
21469
|
-
var selectedNode = this.checkedNodeList.find(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); });
|
21483
|
+
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())); });
|
21470
21484
|
if (selectedNode) {
|
21471
21485
|
this.removeCheckedNodeList({
|
21472
21486
|
id: selectedNode.id,
|
@@ -21486,7 +21500,7 @@
|
|
21486
21500
|
}
|
21487
21501
|
};
|
21488
21502
|
SelectProcessDocumentPopupComponent.prototype.isNodeSelected = function (node) {
|
21489
|
-
return this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); }).length > 0;
|
21503
|
+
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;
|
21490
21504
|
};
|
21491
21505
|
SelectProcessDocumentPopupComponent.prototype.getChildrenOfFolder = function (node, type) {
|
21492
21506
|
var item = new QMSProcessDocumentItem();
|
@@ -21509,8 +21523,11 @@
|
|
21509
21523
|
if (!node.itemType) {
|
21510
21524
|
return;
|
21511
21525
|
}
|
21512
|
-
var index = this.checkedNodeList.findIndex(function (x) {
|
21513
|
-
|
21526
|
+
var index = this.checkedNodeList.findIndex(function (x) {
|
21527
|
+
var _a, _b;
|
21528
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21529
|
+
&& (!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;
|
21530
|
+
});
|
21514
21531
|
if (index >= 0) {
|
21515
21532
|
this.removeCheckedNodeList({
|
21516
21533
|
id: node.id,
|
@@ -21528,12 +21545,18 @@
|
|
21528
21545
|
var status = 0;
|
21529
21546
|
var statusName = '';
|
21530
21547
|
if (node.itemType == exports.DataType.folder || node.itemType == exports.DataType.document) {
|
21531
|
-
item = this.treeData2.find(function (x) {
|
21532
|
-
|
21548
|
+
item = this.treeData2.find(function (x) {
|
21549
|
+
var _a, _b;
|
21550
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21551
|
+
&& (!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;
|
21552
|
+
});
|
21533
21553
|
}
|
21534
21554
|
else {
|
21535
|
-
item = this.treeData1.find(function (x) {
|
21536
|
-
|
21555
|
+
item = this.treeData1.find(function (x) {
|
21556
|
+
var _a, _b;
|
21557
|
+
return x.id.toLowerCase() === node.id.toLowerCase()
|
21558
|
+
&& (!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;
|
21559
|
+
});
|
21537
21560
|
}
|
21538
21561
|
if (item) {
|
21539
21562
|
statusName = item.statusName;
|
@@ -21588,7 +21611,7 @@
|
|
21588
21611
|
return arrDisabledList.some(function (node) { return node.id.toUpperCase() === related.id.toUpperCase(); });
|
21589
21612
|
};
|
21590
21613
|
SelectProcessDocumentPopupComponent.prototype.toRelatedOptions = function (relateds) {
|
21591
|
-
var e_1,
|
21614
|
+
var e_1, _d;
|
21592
21615
|
var results = [];
|
21593
21616
|
try {
|
21594
21617
|
for (var relateds_1 = __values(relateds), relateds_1_1 = relateds_1.next(); !relateds_1_1.done; relateds_1_1 = relateds_1.next()) {
|
@@ -21599,7 +21622,7 @@
|
|
21599
21622
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
21600
21623
|
finally {
|
21601
21624
|
try {
|
21602
|
-
if (relateds_1_1 && !relateds_1_1.done && (
|
21625
|
+
if (relateds_1_1 && !relateds_1_1.done && (_d = relateds_1.return)) _d.call(relateds_1);
|
21603
21626
|
}
|
21604
21627
|
finally { if (e_1) throw e_1.error; }
|
21605
21628
|
}
|