qms-angular 1.1.21 → 1.1.22

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.
@@ -133,8 +133,8 @@
133
133
  "CONTENT": "Content",
134
134
  "TEMPLATE": "Template",
135
135
  "CONTENT_TEMPLATE": "Content Template",
136
- "CREATE_NEW_TEMPLATE": "Create new tempplate",
137
- "UPDATE_TEMPLATE": "Update tempplate",
136
+ "CREATE_NEW_TEMPLATE": "Create new template",
137
+ "UPDATE_TEMPLATE": "Update template",
138
138
  "TITLE": "Title",
139
139
  "DESCRIPTION": "Description",
140
140
  "SAVE": "Save",
@@ -28526,6 +28526,7 @@
28526
28526
  this.moduleName = '';
28527
28527
  this.treeData1 = [];
28528
28528
  this.treeData2 = [];
28529
+ this.checkedNodeList = [];
28529
28530
  this.selectedNode = [];
28530
28531
  this.disabledList = [];
28531
28532
  this.disabledList2 = [];
@@ -28625,6 +28626,7 @@
28625
28626
  this.singleSelectedNode = data.treeConfig1.singleSelectedNode;
28626
28627
  this.disabledList = data.disabledList || [];
28627
28628
  this.disabledList2 = data.disabledList2 || [];
28629
+ this.checkedNodeList = data.checkedNodeList || [];
28628
28630
  this.splitView = data.splitView;
28629
28631
  this.isSelectOne = data.isSelectOne;
28630
28632
  this.canOnlySelectItem = data.canOnlySelectItem;
@@ -28653,6 +28655,7 @@
28653
28655
  _this.LANG = _this.translate.getObjectLang(res);
28654
28656
  }
28655
28657
  });
28658
+ this.setSelectedData();
28656
28659
  this.globalService.searchRelated.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
28657
28660
  if (res && res.length) {
28658
28661
  _this.filteredOptions = _this.toRelatedOptions(res);
@@ -28679,43 +28682,7 @@
28679
28682
  listNodeDocs_1.push(newNodeDocs);
28680
28683
  }
28681
28684
  });
28682
- if (_this.checkedNodeList.length) {
28683
- _this.selectedData = [];
28684
- _this.selectedData2 = [];
28685
- var selectProcess_1 = [];
28686
- var selectDocument_1 = [];
28687
- _this.checkedNodeList.forEach(function (x) {
28688
- var newNode = {
28689
- disabled: false,
28690
- expandable: (x.itemType == exports.DataType.area || x.itemType == exports.DataType.folder) ? true : false,
28691
- hasChild: (x.itemType == exports.DataType.area || x.itemType == exports.DataType.folder) ? true : false,
28692
- id: x.id,
28693
- level: 0,
28694
- levelType: undefined,
28695
- name: x.itemName,
28696
- parentId: x.parentId
28697
- };
28698
- if (x.itemType === exports.DataType.area || x.itemType === exports.DataType.process) {
28699
- _this.treeData1.forEach(function (item) {
28700
- if (item.id && x.id === item.id) {
28701
- selectProcess_1.push(newNode);
28702
- }
28703
- });
28704
- }
28705
- else {
28706
- _this.treeData2.forEach(function (item) {
28707
- if (item.id && x.id === item.id) {
28708
- selectDocument_1.push(newNode);
28709
- }
28710
- });
28711
- }
28712
- });
28713
- _this.selectedData = __spreadArray(__spreadArray([], __read(_this.selectedData)), __read(selectProcess_1));
28714
- _this.selectedData2 = __spreadArray(__spreadArray([], __read(_this.selectedData2)), __read(selectDocument_1));
28715
- if (_this.splitView && _this.isSelectOne) {
28716
- _this.idCheckIconSplitView = _this.idToCheckSelectOne(_this.checkedNodeList[0].id, _this.checkedNodeList[0].parentId);
28717
- }
28718
- }
28685
+ _this.setSelectedData();
28719
28686
  }
28720
28687
  });
28721
28688
  this.myControl.valueChanges.pipe(operators.debounceTime(1000)).subscribe(function (val) {
@@ -28732,6 +28699,7 @@
28732
28699
  }
28733
28700
  });
28734
28701
  _this.treeData1 = __spreadArray(__spreadArray([], __read(_this.treeData1)), __read(notShownChildren_1));
28702
+ _this.setSelectedData();
28735
28703
  }
28736
28704
  });
28737
28705
  this.globalService.getFolderChildren.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
@@ -28744,11 +28712,53 @@
28744
28712
  }
28745
28713
  });
28746
28714
  _this.treeData2 = __spreadArray(__spreadArray([], __read(_this.treeData2)), __read(notShownChildren_2));
28715
+ _this.setSelectedData();
28747
28716
  }
28748
28717
  });
28749
28718
  this.itemType = this.dataType.process;
28750
28719
  this.searchOrder = this.getSearchOrder();
28751
28720
  };
28721
+ SelectProcessDocumentPopupComponent.prototype.setSelectedData = function () {
28722
+ var _this = this;
28723
+ if (this.checkedNodeList.length) {
28724
+ this.selectedData = [];
28725
+ this.selectedData2 = [];
28726
+ var selectProcess_1 = [];
28727
+ var selectDocument_1 = [];
28728
+ this.checkedNodeList.forEach(function (x) {
28729
+ var newNode = {
28730
+ disabled: false,
28731
+ expandable: (x.itemType == exports.DataType.area || x.itemType == exports.DataType.folder) ? true : false,
28732
+ hasChild: (x.itemType == exports.DataType.area || x.itemType == exports.DataType.folder) ? true : false,
28733
+ id: x.id,
28734
+ level: 0,
28735
+ levelType: undefined,
28736
+ name: x.itemName,
28737
+ parentId: x.parentId
28738
+ };
28739
+ if (x.itemType === exports.DataType.area || x.itemType === exports.DataType.process) {
28740
+ _this.treeData1.forEach(function (item) {
28741
+ if (item.id && x.id === item.id) {
28742
+ selectProcess_1.push(newNode);
28743
+ }
28744
+ });
28745
+ }
28746
+ else {
28747
+ _this.treeData2.forEach(function (item) {
28748
+ if (item.id && x.id === item.id) {
28749
+ selectDocument_1.push(newNode);
28750
+ }
28751
+ });
28752
+ }
28753
+ });
28754
+ this.selectedData = __spreadArray(__spreadArray([], __read(this.selectedData)), __read(selectProcess_1));
28755
+ this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), __read(selectDocument_1));
28756
+ this.documentCheckedList = __spreadArray(__spreadArray([], __read(this.selectedData)), __read(this.selectedData2));
28757
+ if (this.splitView && this.isSelectOne) {
28758
+ this.idCheckIconSplitView = this.idToCheckSelectOne(this.checkedNodeList[0].id, this.checkedNodeList[0].parentId);
28759
+ }
28760
+ }
28761
+ };
28752
28762
  SelectProcessDocumentPopupComponent.prototype.ngAfterViewChecked = function () {
28753
28763
  this.cdRef.detectChanges();
28754
28764
  if (this.filteredOptions && this.filteredOptions.length) {