qms-angular 1.0.56 → 1.0.60

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.
Files changed (63) hide show
  1. package/bundles/qms-angular.umd.js +1348 -492
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/qms-app-bar/qms-app-bar.component.js +1 -1
  4. package/esm2015/lib/components/related/model/related-data.model.js +1 -1
  5. package/esm2015/lib/components/related/popup/related-popup.component.js +258 -25
  6. package/esm2015/lib/components/select-include-children/enum/select-option-type.enum.js +7 -0
  7. package/esm2015/lib/components/select-include-children/index.js +2 -0
  8. package/esm2015/lib/components/select-include-children/model/select-option.model.js +1 -1
  9. package/esm2015/lib/components/select-include-children/model/select-popup-data.model.js +1 -1
  10. package/esm2015/lib/components/select-include-children/model/select-search-option.model.js +4 -0
  11. package/esm2015/lib/components/select-include-children/model/seleted-option.model.js +3 -0
  12. package/esm2015/lib/components/select-include-children/public_api.js +9 -0
  13. package/esm2015/lib/components/select-include-children/select-include-children.component.js +404 -317
  14. package/esm2015/lib/components/select-include-children/services/select-global.service.js +3 -7
  15. package/esm2015/lib/components/select-one/common/data-type.enum.js +14 -0
  16. package/esm2015/lib/components/select-one/common/document-folder-type.enum.js +12 -0
  17. package/esm2015/lib/components/select-one/common/module-type.enum.js +8 -0
  18. package/esm2015/lib/components/select-one/common/select-data.model.js +3 -0
  19. package/esm2015/lib/components/select-one/common/selected-node.model.js +3 -0
  20. package/esm2015/lib/components/select-one/common/selectone-popup-data.model.js +11 -0
  21. package/esm2015/lib/components/select-one/common/show-hide-search-result.const.js +6 -0
  22. package/esm2015/lib/components/select-one/index.js +2 -0
  23. package/esm2015/lib/components/select-one/public_api.js +7 -0
  24. package/esm2015/lib/components/select-one/select-one.component.js +343 -0
  25. package/esm2015/lib/components/select-one/select-one.module.js +53 -0
  26. package/esm2015/lib/components/select-one/service/select-one-global.service.js +17 -0
  27. package/esm2015/lib/components/tree/tree.component.js +86 -13
  28. package/esm2015/public-api.js +3 -6
  29. package/fesm2015/qms-angular.js +1275 -454
  30. package/fesm2015/qms-angular.js.map +1 -1
  31. package/lib/components/related/model/related-data.model.d.ts +1 -0
  32. package/lib/components/related/popup/related-popup.component.d.ts +1 -0
  33. package/lib/components/select-include-children/enum/select-option-type.enum.d.ts +5 -0
  34. package/lib/components/select-include-children/index.d.ts +1 -0
  35. package/lib/components/select-include-children/model/select-option.model.d.ts +2 -0
  36. package/lib/components/select-include-children/model/select-popup-data.model.d.ts +4 -0
  37. package/lib/components/select-include-children/model/select-search-option.model.d.ts +7 -0
  38. package/lib/components/select-include-children/model/seleted-option.model.d.ts +15 -0
  39. package/lib/components/select-include-children/public_api.d.ts +8 -0
  40. package/lib/components/select-include-children/select-include-children.component.d.ts +32 -18
  41. package/lib/components/select-include-children/services/select-global.service.d.ts +3 -5
  42. package/lib/components/select-one/common/data-type.enum.d.ts +12 -0
  43. package/lib/components/select-one/common/document-folder-type.enum.d.ts +10 -0
  44. package/lib/components/select-one/common/module-type.enum.d.ts +6 -0
  45. package/lib/components/select-one/common/select-data.model.d.ts +12 -0
  46. package/lib/components/select-one/common/selected-node.model.d.ts +12 -0
  47. package/lib/components/select-one/common/selectone-popup-data.model.d.ts +12 -0
  48. package/lib/components/select-one/common/show-hide-search-result.const.d.ts +5 -0
  49. package/lib/components/select-one/index.d.ts +1 -0
  50. package/lib/components/select-one/public_api.d.ts +6 -0
  51. package/lib/components/select-one/select-one.component.d.ts +77 -0
  52. package/lib/components/select-one/select-one.module.d.ts +2 -0
  53. package/lib/components/select-one/service/select-one-global.service.d.ts +7 -0
  54. package/lib/components/tree/tree.component.d.ts +6 -0
  55. package/package.json +1 -1
  56. package/public-api.d.ts +2 -5
  57. package/qms-angular.metadata.json +1 -1
  58. package/src/assets/qms-ckeditor-plugin/package-lock.json +9 -12177
  59. package/src/lib/components/qms-app-bar/qms-app-bar.component.scss +7 -0
  60. package/src/lib/components/select-include-children/select-include-children.component.scss +5 -0
  61. package/src/lib/components/select-one/select-one.component.scss +240 -0
  62. package/src/assets/qms-ckeditor-plugin/src/dist/ckeditor.dev.js +0 -173
  63. package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/dist/qmsCKEditorFullscreenPlugin.dev.js +0 -87
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/radio'), require('@angular/material/dialog'), require('rxjs/operators'), require('@angular/material/autocomplete'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/material/input'), require('@angular/material/card'), require('@angular/material/icon'), require('@angular/material/checkbox'), require('@angular/material/chips'), require('@angular/material/button'), require('@angular/material/core'), require('@angular/material/progress-spinner'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/cdk/collections'), require('@angular/platform-browser/animations'), require('moment'), require('@angular/material/list'), require('@angular/material/expansion'), require('@angular/cdk/scrolling'), require('@angular/material/sidenav'), require('@angular/material/tree'), require('@angular/material/menu'), require('@angular/platform-browser'), require('@angular/cdk/tree'), require('@angular/common/http'), require('@angular/material/button-toggle'), require('@angular/material/select'), require('@angular/material/snack-bar'), require('@ckeditor/ckeditor5-angular'), require('jquery'), require('lodash'), require('@angular/material/tooltip'), require('@angular/material/badge'), require('@angular/material/toolbar'), require('@angular/cdk/stepper'), require('@angular/material/stepper'), require('@angular/material/slide-toggle')) :
3
3
  typeof define === 'function' && define.amd ? define('qms-angular', ['exports', '@angular/core', 'rxjs', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/radio', '@angular/material/dialog', 'rxjs/operators', '@angular/material/autocomplete', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/material/input', '@angular/material/card', '@angular/material/icon', '@angular/material/checkbox', '@angular/material/chips', '@angular/material/button', '@angular/material/core', '@angular/material/progress-spinner', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/cdk/collections', '@angular/platform-browser/animations', 'moment', '@angular/material/list', '@angular/material/expansion', '@angular/cdk/scrolling', '@angular/material/sidenav', '@angular/material/tree', '@angular/material/menu', '@angular/platform-browser', '@angular/cdk/tree', '@angular/common/http', '@angular/material/button-toggle', '@angular/material/select', '@angular/material/snack-bar', '@ckeditor/ckeditor5-angular', 'jquery', 'lodash', '@angular/material/tooltip', '@angular/material/badge', '@angular/material/toolbar', '@angular/cdk/stepper', '@angular/material/stepper', '@angular/material/slide-toggle'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['qms-angular'] = {}, global.ng.core, global.rxjs, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.radio, global.ng.material.dialog, global.rxjs.operators, global.ng.material.autocomplete, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.input, global.ng.material.card, global.ng.material.icon, global.ng.material.checkbox, global.ng.material.chips, global.ng.material.button, global.ng.material.core, global.ng.material.progressSpinner, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.collections, global.ng.platformBrowser.animations, global.moment, global.ng.material.list, global.ng.material.expansion, global.ng.cdk.scrolling, global.ng.material.sidenav, global.ng.material.tree, global.ng.material.menu, global.ng.platformBrowser, global.ng.cdk.tree, global.ng.common.http, global.ng.material.buttonToggle, global.ng.material.select, global.ng.material.snackBar, global.ckeditor5Angular, global.$, global._, global.ng.material.tooltip, global.ng.material.badge, global.ng.material.toolbar, global.ng.cdk.stepper, global.ng.material.stepper, global.ng.material.slideToggle));
5
- }(this, (function (exports, i0, rxjs, common, forms, formField, radio, dialog, operators, autocomplete, overlay, portal, input, card, icon, checkbox, chips, button, core, progressSpinner, a11y, coercion, collections, animations, moment, list, expansion, scrolling, sidenav, tree$1, menu, platformBrowser, tree, i1, buttonToggle, select, snackBar, ckeditor5Angular, $, _, tooltip, badge, toolbar, stepper$1, stepper, slideToggle) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['qms-angular'] = {}, global.ng.core, global.rxjs, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.radio, global.ng.material.dialog, global.rxjs.operators, global.ng.material.autocomplete, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.input, global.ng.material.card, global.ng.material.icon, global.ng.material.checkbox, global.ng.material.chips, global.ng.material.button, global.ng.material.core, global.ng.material.progressSpinner, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.collections, global.ng.platformBrowser.animations, global.moment, global.ng.material.list, global.ng.material.expansion, global.ng.cdk.scrolling, global.ng.material.sidenav, global.ng.material.tree, global.ng.material.menu, global.ng.platformBrowser, global.ng.cdk.tree, global.ng.common.http, global.ng.material.buttonToggle, global.ng.material.select, global.ng.material.snackBar, global.ckeditor5Angular, global.$$1, global._, global.ng.material.tooltip, global.ng.material.badge, global.ng.material.toolbar, global.ng.cdk.stepper, global.ng.material.stepper, global.ng.material.slideToggle));
5
+ }(this, (function (exports, i0, rxjs, common, forms, formField, radio, dialog, operators, autocomplete, overlay, portal, input, card, icon, checkbox, chips, button, core, progressSpinner, a11y, coercion, collections, animations, moment, list, expansion, scrolling, sidenav, tree$1, menu, platformBrowser, tree, i1, buttonToggle, select, snackBar, ckeditor5Angular, $$1, _, tooltip, badge, toolbar, stepper$1, stepper, slideToggle) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -27,7 +27,7 @@
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
28
  var moment__namespace = /*#__PURE__*/_interopNamespace(moment);
29
29
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
- var $__namespace = /*#__PURE__*/_interopNamespace($);
30
+ var $__namespace = /*#__PURE__*/_interopNamespace($$1);
31
31
  var ___namespace = /*#__PURE__*/_interopNamespace(_);
32
32
 
33
33
  var QmsAngularService = /** @class */ (function () {
@@ -4271,7 +4271,7 @@
4271
4271
  },] }
4272
4272
  ];
4273
4273
 
4274
- var DataType;
4274
+ var DataType$1;
4275
4275
  (function (DataType) {
4276
4276
  DataType[DataType["process"] = 2] = "process";
4277
4277
  DataType[DataType["document"] = 1] = "document";
@@ -4283,9 +4283,9 @@
4283
4283
  DataType[DataType["deviationType"] = 8] = "deviationType";
4284
4284
  DataType[DataType["checklistCategory"] = 9] = "checklistCategory";
4285
4285
  DataType[DataType["riskFolder"] = 10] = "riskFolder";
4286
- })(DataType || (DataType = {}));
4286
+ })(DataType$1 || (DataType$1 = {}));
4287
4287
 
4288
- var DocumentNodeType;
4288
+ var DocumentNodeType$1;
4289
4289
  (function (DocumentNodeType) {
4290
4290
  DocumentNodeType[DocumentNodeType["Document"] = 1] = "Document";
4291
4291
  DocumentNodeType[DocumentNodeType["LinkDocument"] = 2] = "LinkDocument";
@@ -4295,7 +4295,7 @@
4295
4295
  DocumentNodeType[DocumentNodeType["TopFolder"] = 6] = "TopFolder";
4296
4296
  DocumentNodeType[DocumentNodeType["DepartmentFolder"] = 7] = "DepartmentFolder";
4297
4297
  DocumentNodeType[DocumentNodeType["RegionalFolder"] = 8] = "RegionalFolder";
4298
- })(DocumentNodeType || (DocumentNodeType = {}));
4298
+ })(DocumentNodeType$1 || (DocumentNodeType$1 = {}));
4299
4299
 
4300
4300
  var RelatedConst = /** @class */ (function () {
4301
4301
  function RelatedConst() {
@@ -4420,6 +4420,7 @@
4420
4420
  this.selectedData = [];
4421
4421
  this.selectedRiskData = [];
4422
4422
  this.disabledList = [];
4423
+ this.expandToChildNode = [];
4423
4424
  this.selectNodeEvent = new i0.EventEmitter();
4424
4425
  this.selectFolderEvent = new i0.EventEmitter();
4425
4426
  this.checkBoxEvent = new i0.EventEmitter();
@@ -4456,7 +4457,7 @@
4456
4457
  this.isChecked = false;
4457
4458
  this.idCheckIcon = '';
4458
4459
  this.listChildNode = [];
4459
- this.dataType = DataType;
4460
+ this.dataType = DataType$1;
4460
4461
  this.transformer = function (node, level) {
4461
4462
  var checkHasChild = true;
4462
4463
  if (!node.children) {
@@ -4469,7 +4470,7 @@
4469
4470
  else if (!!node.children &&
4470
4471
  node.children.length &&
4471
4472
  node.children.length === 1 &&
4472
- !node.children[0].name.length &&
4473
+ !node.children[0].name &&
4473
4474
  node.id.toString() === _this.areaOfCurrentProcess) {
4474
4475
  checkHasChild = false;
4475
4476
  }
@@ -4517,19 +4518,25 @@
4517
4518
  (changes.selectedData.currentValue.length > 0 ||
4518
4519
  JSON.stringify(changes.selectedData.currentValue) !==
4519
4520
  JSON.stringify(changes.selectedData.previousValue))) {
4520
- this.checkSelected(changes.selectedData.currentValue);
4521
- }
4522
- else {
4523
- for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4524
- this.checklistSelection.deselect(this.treeControl.dataNodes[i]);
4521
+ if (changes.selectedData.currentValue) {
4522
+ this.checkSelected(changes.selectedData.currentValue);
4523
+ }
4524
+ else {
4525
+ for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4526
+ this.checklistSelection.deselect(this.treeControl.dataNodes[i]);
4527
+ }
4525
4528
  }
4526
4529
  }
4527
4530
  if (changes.disabledList && JSON.stringify(changes.disabledList.currentValue) !== JSON.stringify(changes.disabledList.previousValue)) {
4528
4531
  this.checkDisabledList();
4529
4532
  }
4533
+ // expand all parent to show node
4534
+ if (changes.expandToChildNode && JSON.stringify(changes.expandToChildNode.currentValue) !== JSON.stringify(changes.expandToChildNode.previousValue)) {
4535
+ this.openExpandToChildNode();
4536
+ }
4530
4537
  };
4531
4538
  TreeComponent.prototype.ngOnInit = function () {
4532
- this.initTreeData();
4539
+ // this.initTreeData();
4533
4540
  };
4534
4541
  TreeComponent.prototype.initTreeData = function () {
4535
4542
  var _this = this;
@@ -4573,6 +4580,10 @@
4573
4580
  if (this.treeConfig.expandAll) {
4574
4581
  this.treeControl.expandAll();
4575
4582
  }
4583
+ //Disabled node
4584
+ if (this.disabledList.length) {
4585
+ this.checkDisabledList();
4586
+ }
4576
4587
  // Risk Tree
4577
4588
  if (this.selectedRiskData.length) {
4578
4589
  var selectedData_1 = [];
@@ -4591,15 +4602,69 @@
4591
4602
  this.checkSelected(selectedData_1);
4592
4603
  this.checkBoxEvent.emit(selectedData_1);
4593
4604
  }
4594
- //check disabled list
4595
- this.checkDisabledList();
4605
+ if (this.parentNodeOnClick) {
4606
+ for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4607
+ var tree = this.treeControl.dataNodes[i];
4608
+ if (this.parentNodeOnClick.parentId === tree.id || this.parentNodeOnClick.id === tree.id) {
4609
+ this.getParent(tree);
4610
+ }
4611
+ }
4612
+ }
4613
+ };
4614
+ TreeComponent.prototype.getParent = function (node) {
4615
+ var treeControl = this.treeControl;
4616
+ var currentLevel = treeControl.getLevel(node);
4617
+ if (currentLevel < 1) {
4618
+ return null;
4619
+ }
4620
+ var index = treeControl.dataNodes.indexOf(node) - 1;
4621
+ for (var i = index; i >= 0; i--) {
4622
+ var currentNode = treeControl.dataNodes[i];
4623
+ if (treeControl.getLevel(currentNode) < currentLevel) {
4624
+ treeControl.expand(currentNode);
4625
+ return currentNode;
4626
+ }
4627
+ }
4628
+ };
4629
+ TreeComponent.prototype.openExpandToChildNode = function () {
4630
+ var _this = this;
4631
+ if (this.expandToChildNode.length) {
4632
+ if (this.expandToChildNode[0] === '') {
4633
+ this.idCheckIcon = '';
4634
+ this.treeControl.collapseAll();
4635
+ this.cdRef.detectChanges();
4636
+ return;
4637
+ }
4638
+ var itemMarkChecked = this.expandToChildNode[this.expandToChildNode.length - 1].toUpperCase();
4639
+ this.idCheckIcon = itemMarkChecked;
4640
+ // get all children nodes on same level
4641
+ var listChildNodeSameLevel = this.findChildNode(itemMarkChecked, this.dataSource.data);
4642
+ // get all children in all level
4643
+ this.listChildNode = [];
4644
+ this.getChild(listChildNodeSameLevel);
4645
+ this.getChildNodeSelectOne.emit(this.listChildNode);
4646
+ var _loop_2 = function (i) {
4647
+ if (itemMarkChecked === this_2.treeControl.dataNodes[i].id) {
4648
+ this_2.selectNodeEvent.emit(this_2.treeControl.dataNodes[i]);
4649
+ }
4650
+ this_2.expandToChildNode.forEach(function (el) {
4651
+ if (_this.treeControl.dataNodes[i].id === el.toUpperCase()) {
4652
+ _this.treeControl.expand(_this.treeControl.dataNodes[i]);
4653
+ }
4654
+ });
4655
+ };
4656
+ var this_2 = this;
4657
+ for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4658
+ _loop_2(i);
4659
+ }
4660
+ }
4596
4661
  };
4597
4662
  TreeComponent.prototype.checkDisabledList = function () {
4598
4663
  var _this = this;
4599
4664
  // Disable List
4600
4665
  if (this.disabledList.length) {
4601
- var _loop_2 = function (i) {
4602
- this_2.disabledList.forEach(function (x) {
4666
+ var _loop_3 = function (i) {
4667
+ this_3.disabledList.forEach(function (x) {
4603
4668
  var _a;
4604
4669
  if (x.id === _this.treeControl.dataNodes[i].id
4605
4670
  && (!x.parentId || x.parentId === ((_a = _this.treeControl.dataNodes[i]) === null || _a === void 0 ? void 0 : _a.parentId))) {
@@ -4607,9 +4672,9 @@
4607
4672
  }
4608
4673
  });
4609
4674
  };
4610
- var this_2 = this;
4675
+ var this_3 = this;
4611
4676
  for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4612
- _loop_2(i);
4677
+ _loop_3(i);
4613
4678
  }
4614
4679
  }
4615
4680
  //Selected node with select one
@@ -4622,26 +4687,26 @@
4622
4687
  this.listChildNode = [];
4623
4688
  this.getChild(listChildNodeSameLevel);
4624
4689
  this.getChildNodeSelectOne.emit(this.listChildNode);
4625
- var _loop_3 = function (i) {
4626
- if (itemMarkChecked === this_3.treeControl.dataNodes[i].id) {
4627
- this_3.selectNodeEvent.emit(this_3.treeControl.dataNodes[i]);
4690
+ var _loop_4 = function (i) {
4691
+ if (itemMarkChecked === this_4.treeControl.dataNodes[i].id) {
4692
+ this_4.selectNodeEvent.emit(this_4.treeControl.dataNodes[i]);
4628
4693
  }
4629
- this_3.disabledList.forEach(function (el) {
4694
+ this_4.disabledList.forEach(function (el) {
4630
4695
  if (_this.treeControl.dataNodes[i].id === el.toUpperCase()) {
4631
4696
  _this.treeControl.expand(_this.treeControl.dataNodes[i]);
4632
4697
  }
4633
4698
  });
4634
4699
  // remove all children nodes when user dont need to show them
4635
- this_3.listChildNode.forEach(function (el) {
4700
+ this_4.listChildNode.forEach(function (el) {
4636
4701
  var _a;
4637
4702
  if (el.id && ((_a = _this.treeControl.dataNodes[i]) === null || _a === void 0 ? void 0 : _a.id) === el.id) {
4638
4703
  _this.treeControl.dataNodes.splice(i, 1);
4639
4704
  }
4640
4705
  });
4641
4706
  };
4642
- var this_3 = this;
4707
+ var this_4 = this;
4643
4708
  for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
4644
- _loop_3(i);
4709
+ _loop_4(i);
4645
4710
  }
4646
4711
  }
4647
4712
  else {
@@ -4699,7 +4764,7 @@
4699
4764
  _this.checklistSelection.deselect(tree);
4700
4765
  for (var j = 0; j < itemSelected.length; j++) {
4701
4766
  var element = itemSelected[j];
4702
- if (tree.id === element.id && (!element.parentId || tree.parentId === element.parentId) && !tree.disabled) {
4767
+ if (tree.id === element.id && (!element.parentId || tree.parentId === element.parentId)) {
4703
4768
  _this.checklistSelection.select(tree);
4704
4769
  }
4705
4770
  }
@@ -4755,6 +4820,7 @@
4755
4820
  TreeComponent.prototype.todoItemSelectionToggle = function (node) {
4756
4821
  var _v, _w;
4757
4822
  var _this = this;
4823
+ this.selectNodeEvent.emit(node);
4758
4824
  // tree have duplicate node
4759
4825
  if (this.treeConfig.canHaveDupId) {
4760
4826
  for (var i = 0; i < this.treeControl.dataNodes.length; i++) {
@@ -4824,7 +4890,9 @@
4824
4890
  }
4825
4891
  }
4826
4892
  });
4827
- this.checkBoxEvent.emit(this.checklistSelection.selected);
4893
+ setTimeout(function () {
4894
+ _this.checkBoxEvent.emit(_this.checklistSelection.selected);
4895
+ }, 500);
4828
4896
  };
4829
4897
  TreeComponent.prototype.todoFolderSelection = function (nodes) {
4830
4898
  var _this = this;
@@ -4853,11 +4921,11 @@
4853
4921
  TreeComponent.prototype.checkDataTypeSelectNode = function (node) {
4854
4922
  var itemType = -1;
4855
4923
  switch (this.moduleId) {
4856
- case DataType.process:
4857
- itemType = node.expandable ? DataType.area : DataType.process;
4924
+ case DataType$1.process:
4925
+ itemType = node.expandable ? DataType$1.area : DataType$1.process;
4858
4926
  break;
4859
- case DataType.document:
4860
- itemType = node.expandable ? DataType.folder : DataType.document;
4927
+ case DataType$1.document:
4928
+ itemType = node.expandable ? DataType$1.folder : DataType$1.document;
4861
4929
  break;
4862
4930
  default:
4863
4931
  itemType = this.moduleId;
@@ -5037,17 +5105,17 @@
5037
5105
  return this.treeControl.isExpanded(node) ? this.openIcon : this.closeIcon;
5038
5106
  }
5039
5107
  switch (this.moduleId) {
5040
- case DataType.document: {
5108
+ case DataType$1.document: {
5041
5109
  var nodeData = this.treeData.filter(function (x) { return x.rootId === node.id; });
5042
5110
  if (nodeData.length > 0) {
5043
5111
  switch (nodeData[0].levelType) {
5044
- case DocumentNodeType.DepartmentFolder:
5112
+ case DocumentNodeType$1.DepartmentFolder:
5045
5113
  return this.treeControl.isExpanded(node) ? 'department_folder_outlined' : 'department_folder';
5046
- case DocumentNodeType.RegionalFolder:
5114
+ case DocumentNodeType$1.RegionalFolder:
5047
5115
  return this.treeControl.isExpanded(node) ? 'regional_folder_outlined' : 'regional_folder';
5048
- case DocumentNodeType.TopFolder:
5116
+ case DocumentNodeType$1.TopFolder:
5049
5117
  return this.treeControl.isExpanded(node) ? 'enterprise_folder_outlined' : 'enterprise_folder';
5050
- case DocumentNodeType.Folder:
5118
+ case DocumentNodeType$1.Folder:
5051
5119
  return this.treeControl.isExpanded(node) ? 'local_folder_outlined' : 'local_folder';
5052
5120
  default:
5053
5121
  return this.treeControl.isExpanded(node) ? 'folder_outlined' : 'folder';
@@ -5055,7 +5123,7 @@
5055
5123
  }
5056
5124
  return this.treeControl.isExpanded(node) ? 'keyboard_up' : 'keyboard_down';
5057
5125
  }
5058
- case DataType.process:
5126
+ case DataType$1.process:
5059
5127
  return this.treeControl.isExpanded(node) ? 'process_area_outlined' : 'process_area';
5060
5128
  default:
5061
5129
  return this.treeControl.isExpanded(node) ? 'keyboard_up' : 'keyboard_down';
@@ -5063,26 +5131,26 @@
5063
5131
  };
5064
5132
  TreeComponent.prototype.getItemIcon = function (node) {
5065
5133
  switch (this.moduleId) {
5066
- case DataType.document:
5134
+ case DataType$1.document:
5067
5135
  switch (node.levelType) {
5068
- case DocumentNodeType.DepartmentFolder:
5136
+ case DocumentNodeType$1.DepartmentFolder:
5069
5137
  return 'document_department';
5070
- case DocumentNodeType.RegionalFolder:
5138
+ case DocumentNodeType$1.RegionalFolder:
5071
5139
  return 'document_regional';
5072
- case DocumentNodeType.TopFolder:
5140
+ case DocumentNodeType$1.TopFolder:
5073
5141
  return 'document_enterprise';
5074
- case DocumentNodeType.Folder:
5142
+ case DocumentNodeType$1.Folder:
5075
5143
  return 'document_local';
5076
5144
  default:
5077
5145
  return 'document';
5078
5146
  }
5079
- case DataType.process:
5147
+ case DataType$1.process:
5080
5148
  return 'process';
5081
- case DataType.checklist:
5149
+ case DataType$1.checklist:
5082
5150
  return 'checklist';
5083
- case DataType.deviation:
5151
+ case DataType$1.deviation:
5084
5152
  return 'deviation';
5085
- case DataType.risk:
5153
+ case DataType$1.risk:
5086
5154
  return 'risk';
5087
5155
  default:
5088
5156
  return 'document';
@@ -5096,12 +5164,20 @@
5096
5164
  TreeComponent.prototype.getNodeId = function (node) {
5097
5165
  return "_" + (node.parentId ? node.parentId : '') + "_" + node.id + "_" + node.level;
5098
5166
  };
5167
+ TreeComponent.prototype.getNodeByIdAndParentId = function (nodeId, parentId) {
5168
+ return this.treeControl.dataNodes.find(function (x) {
5169
+ return x.id === nodeId && x.parentId === parentId;
5170
+ });
5171
+ };
5172
+ TreeComponent.prototype.expandNode = function (node) {
5173
+ this.treeControl.expand(node);
5174
+ };
5099
5175
  return TreeComponent;
5100
5176
  }());
5101
5177
  TreeComponent.decorators = [
5102
5178
  { type: i0.Component, args: [{
5103
5179
  selector: 'qms-tree',
5104
- template: "<mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"tree__container\"\r\n>\r\n <mat-tree-node\r\n class=\"tree-branch\"\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n >\r\n <!-- form thu 1 - child -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n >\r\n </mat-checkbox>\r\n\r\n <!-- form thu 2 -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"ml-10 checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <div\r\n class=\"expand-node\"\r\n *ngIf=\"node.name && !onlyFolder\"\r\n [class.bgSelected]=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n (click)=\"selectNode(node)\"\r\n >\r\n <div class=\"expand-node__text\">\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.name && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n >\r\n {{ itemIcon }}\r\n </mat-icon>\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.svg && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"itemIconSvg\"\r\n >\r\n </mat-icon>\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.path && !onlyCheckBoxForChild\"\r\n class=\"mat-icon\"\r\n [src]=\"itemIconPath\"\r\n />\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.base64 && !onlyCheckBoxForChild\"\r\n class=\"mat-icon image-base64\"\r\n [src]=\"getImagePath()\"\r\n />\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.none && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getItemIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.name }}</span>\r\n </div>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </div>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <!-- form thu 1 - parent -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"showCheckBox && !onlyCheckBoxForChild\"\r\n [checked]=\"descendantsAllSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <button\r\n class=\"button-boder\"\r\n mat-icon-button\r\n matTreeNodeToggle\r\n [disableRipple]=\"!node.hasChild\"\r\n [attr.aria-label]=\"'toggle ' + node.filename\"\r\n >\r\n <mat-icon\r\n *ngIf=\"openIcon && closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : closeIconColor\r\n }\"\r\n >{{ getNodeIcon(node) }}</mat-icon\r\n >\r\n <mat-icon\r\n *ngIf=\"!openIcon || !closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngClass]=\"{\r\n 'open-icon': treeControl.isExpanded(node),\r\n 'not-department-icon': moduleId !== dataType.document\r\n }\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span\r\n *ngIf=\"expandOnTitleClick\"\r\n matTreeNodeToggle\r\n class=\"text-node-parent\"\r\n style=\"cursor: pointer\"\r\n (click)=\"onExpandNode(node)\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : '#000000'\r\n }\"\r\n >\r\n <span>{{ node.name }}</span>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </span>\r\n <span\r\n *ngIf=\"!expandOnTitleClick\"\r\n class=\"text-node-parent\"\r\n (click)=\"selectFolderNode(node)\"\r\n style=\"cursor: pointer\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <span>{{ node.name }}</span>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </span>\r\n </mat-tree-node>\r\n</mat-tree>\r\n",
5180
+ template: "<mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"tree__container\"\r\n>\r\n <mat-tree-node\r\n class=\"tree-branch\"\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n >\r\n <!-- form thu 1 - child -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n >\r\n </mat-checkbox>\r\n\r\n <!-- form thu 2 -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"ml-10 checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <div\r\n class=\"expand-node\"\r\n *ngIf=\"node.name && !onlyFolder\"\r\n [class.bgSelected]=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n (click)=\"selectNode(node)\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <div class=\"expand-node__text\">\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.name && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n >\r\n {{ itemIcon }}\r\n </mat-icon>\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.svg && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"itemIconSvg\"\r\n >\r\n </mat-icon>\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.path && !onlyCheckBoxForChild\"\r\n class=\"mat-icon\"\r\n [src]=\"itemIconPath\"\r\n />\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.base64 && !onlyCheckBoxForChild\"\r\n class=\"mat-icon image-base64\"\r\n [src]=\"getImagePath()\"\r\n />\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.none && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getItemIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.name }}</span>\r\n </div>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </div>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <!-- form thu 1 - parent -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild\"\r\n [checked]=\"descendantsAllSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <button\r\n class=\"button-boder\"\r\n mat-icon-button\r\n matTreeNodeToggle\r\n [disableRipple]=\"!node.hasChild\"\r\n [attr.aria-label]=\"'toggle ' + node.filename\"\r\n *ngIf=\"node.name\"\r\n >\r\n <mat-icon\r\n *ngIf=\"openIcon && closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : closeIconColor\r\n }\"\r\n >{{ getNodeIcon(node) }}</mat-icon\r\n >\r\n <mat-icon\r\n *ngIf=\"!openIcon || !closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngClass]=\"{\r\n 'open-icon': treeControl.isExpanded(node),\r\n 'not-department-icon': moduleId !== dataType.document\r\n }\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span\r\n *ngIf=\"expandOnTitleClick\"\r\n matTreeNodeToggle\r\n class=\"text-node-parent\"\r\n style=\"cursor: pointer\"\r\n (click)=\"onExpandNode(node)\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : '#000000'\r\n }\"\r\n >\r\n <span>{{ node.name }}</span>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </span>\r\n <span\r\n *ngIf=\"!expandOnTitleClick\"\r\n class=\"text-node-parent\"\r\n (click)=\"selectFolderNode(node)\"\r\n style=\"cursor: pointer\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <span>{{ node.name }}</span>\r\n <mat-icon\r\n class=\"icon-check\"\r\n *ngIf=\"treeConfig.selectOne && idCheckIcon == node.id\"\r\n >done</mat-icon\r\n >\r\n </span>\r\n </mat-tree-node>\r\n</mat-tree>\r\n",
5105
5181
  encapsulation: i0.ViewEncapsulation.None,
5106
5182
  styles: ["@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWJ0bbck.woff2) format(\"woff2\");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFUZ0bbck.woff2) format(\"woff2\");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWZ0bbck.woff2) format(\"woff2\");unicode-range:U+1f??}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVp0bbck.woff2) format(\"woff2\");unicode-range:U+0370-03ff}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWp0bbck.woff2) format(\"woff2\");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFW50bbck.woff2) format(\"woff2\");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVZ0b.woff2) format(\"woff2\");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2) format(\"woff2\");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2) format(\"woff2\");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2) format(\"woff2\");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format(\"woff2\");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format(\"woff2\");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.tree__container{font-family:Open Sans;font-style:normal;font-weight:400;font-size:.875rem;line-height:19px;color:#323232}.tree__container .mat-tree-node{color:#000;min-height:0}.tree__container .mat-tree-node .mat-checkbox.qms-group-options{padding:0}.tree__container .mat-tree-node .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:11px}.tree__container .button{margin-left:6px}.tree__container .button:focus,.tree__container .button:hover{background-color:#009ef2;border-radius:2px;width:auto}.tree__container .button-boder:focus,.tree__container .button:focus{outline:0}.tree__container .button-folder-boder:focus{outline:0}.tree__container .button-folder-boder:focus,.tree__container .button-folder-boder:hover{background-color:#009ef2;border-radius:2px;width:auto}.tree__container .expand-node{margin-left:8px;min-height:32px;justify-content:space-between;width:100%}.tree__container .expand-node,.tree__container .expand-node .expand-node__text{display:flex;align-items:center}.tree__container .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}.tree__container .expand-node .mat-icon svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.tree__container .expand-node.bgSelected .icon-check{color:#1954a9}.tree__container .text-node-parent{width:100%;display:flex;align-items:center;justify-content:space-between;margin-left:10px;cursor:pointer}.tree__container .text-node-parent.active-item{color:#1954a9!important}.tree__container .text-node-parent.bgSelected .icon-check{color:#1954a9}.tree__container .mr-11{margin-right:11px}.tree__container .ml-10{margin-left:10px}.tree__container .tree-branch:hover{background-color:#e5eefb}.tree__container .image-base64{width:20px;height:20px}.tree__container .mat-checkbox.qms-group-options.mat-checkbox-checked{background:transparent!important}::ng-deep .mat-tree .mat-checkbox.qms-group-options{padding:0}::ng-deep .mat-tree .mat-checkbox.qms-group-options.mat-checkbox-checked{background-color:transparent}::ng-deep .mat-tree .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:0}svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.open-icon.not-department-icon svg path,.open-icon svg path:first-child{fill:#1954a9}"]
5107
5183
  },] }
@@ -5119,6 +5195,8 @@
5119
5195
  selectedRiskData: [{ type: i0.Input }],
5120
5196
  disabledList: [{ type: i0.Input }],
5121
5197
  expandOnTitleClick: [{ type: i0.Input }],
5198
+ expandToChildNode: [{ type: i0.Input }],
5199
+ parentNodeOnClick: [{ type: i0.Input }],
5122
5200
  selectNodeEvent: [{ type: i0.Output }],
5123
5201
  selectFolderEvent: [{ type: i0.Output }],
5124
5202
  checkBoxEvent: [{ type: i0.Output }],
@@ -5165,7 +5243,7 @@
5165
5243
  var RelatedContentComponent = /** @class */ (function () {
5166
5244
  function RelatedContentComponent() {
5167
5245
  this.contents = [];
5168
- this.dataType = DataType;
5246
+ this.dataType = DataType$1;
5169
5247
  this.imageProcess = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOCAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAwLjVWNi41SDJWMTYuNUgxMlYxOC41SDE4VjEyLjVIMTJWMTQuNUg0VjYuNUg2VjQuNUgxMlY2LjVIMThWMC41SDEyVjIuNUg2VjAuNUgwWk00IDIuNVY0LjVIMlYyLjVINFpNMTYgMi41VjQuNUgxNFYyLjVIMTZaTTE2IDE2LjVWMTQuNUgxNFYxNi41SDE2WiIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC42Ii8+DQo8L3N2Zz4NCg==';
5170
5248
  }
5171
5249
  RelatedContentComponent.prototype.ngOnInit = function () {
@@ -5200,7 +5278,7 @@
5200
5278
  this.iconRegistry = iconRegistry;
5201
5279
  this.appIconService = appIconService;
5202
5280
  this.relatedData = [];
5203
- this.dataType = DataType;
5281
+ this.dataType = DataType$1;
5204
5282
  // imageProcess = '../qms-angular/src/assets/images/union.svg';
5205
5283
  this.imageProcess = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOCAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAwLjVWNi41SDJWMTYuNUgxMlYxOC41SDE4VjEyLjVIMTJWMTQuNUg0VjYuNUg2VjQuNUgxMlY2LjVIMThWMC41SDEyVjIuNUg2VjAuNUgwWk00IDIuNVY0LjVIMlYyLjVINFpNMTYgMi41VjQuNUgxNFYyLjVIMTZaTTE2IDE2LjVWMTQuNUgxNFYxNi41SDE2WiIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC42Ii8+DQo8L3N2Zz4NCg==';
5206
5284
  this.updateData = new i0.EventEmitter();
@@ -5255,43 +5333,43 @@
5255
5333
  };
5256
5334
  RelatedListComponent.prototype.getNodeIcon = function (item) {
5257
5335
  switch (item.itemType) {
5258
- case DataType.folder: {
5336
+ case DataType$1.folder: {
5259
5337
  switch (item.levelType) {
5260
- case DocumentNodeType.DepartmentFolder:
5338
+ case DocumentNodeType$1.DepartmentFolder:
5261
5339
  return 'department_folder_outlined';
5262
- case DocumentNodeType.RegionalFolder:
5340
+ case DocumentNodeType$1.RegionalFolder:
5263
5341
  return 'regional_folder_outlined';
5264
- case DocumentNodeType.TopFolder:
5342
+ case DocumentNodeType$1.TopFolder:
5265
5343
  return 'enterprise_folder_outlined';
5266
- case DocumentNodeType.Folder:
5344
+ case DocumentNodeType$1.Folder:
5267
5345
  return 'local_folder_outlined';
5268
5346
  default:
5269
5347
  return 'folder_outlined';
5270
5348
  }
5271
5349
  }
5272
- case DataType.document: {
5350
+ case DataType$1.document: {
5273
5351
  switch (item.levelType) {
5274
- case DocumentNodeType.DepartmentFolder:
5352
+ case DocumentNodeType$1.DepartmentFolder:
5275
5353
  return 'document_department';
5276
- case DocumentNodeType.RegionalFolder:
5354
+ case DocumentNodeType$1.RegionalFolder:
5277
5355
  return 'document_regional';
5278
- case DocumentNodeType.TopFolder:
5356
+ case DocumentNodeType$1.TopFolder:
5279
5357
  return 'document_enterprise';
5280
- case DocumentNodeType.Folder:
5358
+ case DocumentNodeType$1.Folder:
5281
5359
  return 'document_local';
5282
5360
  default:
5283
5361
  return 'document';
5284
5362
  }
5285
5363
  }
5286
- case DataType.area:
5364
+ case DataType$1.area:
5287
5365
  return 'process_area_outlined';
5288
- case DataType.process:
5366
+ case DataType$1.process:
5289
5367
  return 'process';
5290
- case DataType.deviation:
5368
+ case DataType$1.deviation:
5291
5369
  return 'deviation';
5292
- case DataType.checklist:
5370
+ case DataType$1.checklist:
5293
5371
  return 'checklist';
5294
- case DataType.risk:
5372
+ case DataType$1.risk:
5295
5373
  return 'risk';
5296
5374
  default:
5297
5375
  return 'folder_outlined';
@@ -5323,13 +5401,13 @@
5323
5401
  onItemSelect: [{ type: i0.Output }]
5324
5402
  };
5325
5403
 
5326
- var ModuleType;
5404
+ var ModuleType$1;
5327
5405
  (function (ModuleType) {
5328
5406
  ModuleType[ModuleType["documentProcess"] = 1] = "documentProcess";
5329
5407
  ModuleType[ModuleType["deviation"] = 2] = "deviation";
5330
5408
  ModuleType[ModuleType["checklist"] = 3] = "checklist";
5331
5409
  ModuleType[ModuleType["risk"] = 4] = "risk";
5332
- })(ModuleType || (ModuleType = {}));
5410
+ })(ModuleType$1 || (ModuleType$1 = {}));
5333
5411
 
5334
5412
  var PopupData = /** @class */ (function () {
5335
5413
  function PopupData() {
@@ -5383,6 +5461,12 @@
5383
5461
  return SearchRelatedItemsToRisk;
5384
5462
  }());
5385
5463
 
5464
+ var TreeModel = /** @class */ (function () {
5465
+ function TreeModel() {
5466
+ }
5467
+ return TreeModel;
5468
+ }());
5469
+
5386
5470
  var QMSRelatedGlobalService = /** @class */ (function () {
5387
5471
  function QMSRelatedGlobalService() {
5388
5472
  this.searchRelated = new rxjs.BehaviorSubject([]);
@@ -5402,6 +5486,12 @@
5402
5486
  ];
5403
5487
  QMSRelatedGlobalService.ctorParameters = function () { return []; };
5404
5488
 
5489
+ var TreeFlatNode = /** @class */ (function () {
5490
+ function TreeFlatNode() {
5491
+ }
5492
+ return TreeFlatNode;
5493
+ }());
5494
+
5405
5495
  var RelatedPopupComponent = /** @class */ (function () {
5406
5496
  function RelatedPopupComponent(cdRef, translate, dialogRef, globalService, iconRegistry, sanitizer, appIconService, elem, data) {
5407
5497
  this.cdRef = cdRef;
@@ -5426,8 +5516,8 @@
5426
5516
  this.documentCheckedList = [];
5427
5517
  this.singleProcessList = [];
5428
5518
  this.singleDocumentList = [];
5429
- this.module = ModuleType;
5430
- this.dataType = DataType;
5519
+ this.module = ModuleType$1;
5520
+ this.dataType = DataType$1;
5431
5521
  this.itemType = 0;
5432
5522
  this.selectedRiskData = [];
5433
5523
  this.disabledList = [];
@@ -5445,6 +5535,7 @@
5445
5535
  this.listChildrenSelectOne = [];
5446
5536
  this.onSearch = new i0.EventEmitter();
5447
5537
  this.onExpandFolder = new i0.EventEmitter();
5538
+ this.parentNodeSelected = new TreeFlatNode();
5448
5539
  this.moduleId = data.moduleId;
5449
5540
  this.moduleName = data.moduleName;
5450
5541
  this.treeData1 = data.treeData1;
@@ -5491,8 +5582,82 @@
5491
5582
  }
5492
5583
  });
5493
5584
  this.globalService.splitViewValue.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
5494
- if (res) {
5495
- _this.itemInSplitview = res;
5585
+ _this.itemInSplitview = res;
5586
+ if (res.length) {
5587
+ var listNodeProcess_1 = [];
5588
+ var listNodeDocs_1 = [];
5589
+ res.forEach(function (item) {
5590
+ if (item.itemType === DataType$1.process) {
5591
+ var newNodeProcess = new TreeModel();
5592
+ newNodeProcess.childId = item.id;
5593
+ newNodeProcess.childName = item.itemName;
5594
+ newNodeProcess.displayId = +item.itemNumberId;
5595
+ newNodeProcess.parentId = "";
5596
+ newNodeProcess.rootId = item.parentId;
5597
+ newNodeProcess.rootName = item === null || item === void 0 ? void 0 : item.parentName;
5598
+ newNodeProcess.subName = null;
5599
+ newNodeProcess.statusId = item.status;
5600
+ listNodeProcess_1.push(newNodeProcess);
5601
+ }
5602
+ else {
5603
+ var newNodeDocs = new TreeModel();
5604
+ newNodeDocs.childId = item.id;
5605
+ newNodeDocs.childName = item.itemName;
5606
+ newNodeDocs.displayId = +item.itemNumberId;
5607
+ newNodeDocs.parentId = "";
5608
+ newNodeDocs.rootId = item.parentId;
5609
+ newNodeDocs.rootName = item === null || item === void 0 ? void 0 : item.parentName;
5610
+ newNodeDocs.subName = null;
5611
+ newNodeDocs.statusId = item.status;
5612
+ listNodeDocs_1.push(newNodeDocs);
5613
+ }
5614
+ });
5615
+ var idsProcess_1 = new Set(_this.treeData1.map(function (d) { return d.childId; }));
5616
+ _this.treeData1 = __spreadArray(__spreadArray([], __read(_this.treeData1)), __read(listNodeProcess_1.filter(function (d) { return !idsProcess_1.has(d.childId); })));
5617
+ var idsDocs_1 = new Set(_this.treeData2.map(function (d) { return d.childId; }));
5618
+ _this.treeData2 = __spreadArray(__spreadArray([], __read(_this.treeData2)), __read(listNodeDocs_1.filter(function (d) { return !idsDocs_1.has(d.childId); })));
5619
+ if (_this.checkedNodeList.length) {
5620
+ _this.selectedData = [];
5621
+ _this.selectedData2 = [];
5622
+ var selectProcess_1 = [];
5623
+ var selectDocument_1 = [];
5624
+ _this.checkedNodeList.forEach(function (x) {
5625
+ if (x.itemType === DataType$1.area || x.itemType === DataType$1.process) {
5626
+ _this.treeData1.forEach(function (item) {
5627
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5628
+ selectProcess_1.push({
5629
+ disabled: false,
5630
+ expandable: x.itemType == DataType$1.area ? true : false,
5631
+ hasChild: x.itemType == DataType$1.area ? true : false,
5632
+ id: x.id,
5633
+ level: 0,
5634
+ levelType: undefined,
5635
+ name: x.itemName,
5636
+ parentId: x.parentId
5637
+ });
5638
+ }
5639
+ });
5640
+ }
5641
+ else {
5642
+ _this.treeData2.forEach(function (item) {
5643
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5644
+ selectDocument_1.push({
5645
+ disabled: false,
5646
+ expandable: x.itemType == DataType$1.folder ? true : false,
5647
+ hasChild: x.itemType == DataType$1.folder ? true : false,
5648
+ id: x.id,
5649
+ level: 0,
5650
+ levelType: undefined,
5651
+ name: x.itemName,
5652
+ parentId: x.parentId
5653
+ });
5654
+ }
5655
+ });
5656
+ }
5657
+ });
5658
+ _this.selectedData = __spreadArray(__spreadArray([], __read(_this.selectedData)), __read(selectProcess_1));
5659
+ _this.selectedData2 = __spreadArray(__spreadArray([], __read(_this.selectedData2)), __read(selectDocument_1));
5660
+ }
5496
5661
  }
5497
5662
  });
5498
5663
  this.myControl.valueChanges.pipe(operators.debounceTime(1000)).subscribe(function (val) {
@@ -5515,16 +5680,16 @@
5515
5680
  RelatedPopupComponent.prototype.getDataTypeId = function (moduleId) {
5516
5681
  var itemType;
5517
5682
  switch (moduleId) {
5518
- case ModuleType.documentProcess:
5683
+ case ModuleType$1.documentProcess:
5519
5684
  itemType = this.dataType.process;
5520
5685
  break;
5521
- case ModuleType.deviation:
5686
+ case ModuleType$1.deviation:
5522
5687
  itemType = this.dataType.deviation;
5523
5688
  break;
5524
- case ModuleType.checklist:
5689
+ case ModuleType$1.checklist:
5525
5690
  itemType = this.dataType.checklist;
5526
5691
  break;
5527
- case ModuleType.risk:
5692
+ case ModuleType$1.risk:
5528
5693
  itemType = this.dataType.risk;
5529
5694
  break;
5530
5695
  default:
@@ -5630,7 +5795,8 @@
5630
5795
  return related ? related.itemName : undefined;
5631
5796
  };
5632
5797
  RelatedPopupComponent.prototype.selectRelated = function (item) {
5633
- var _a, _b;
5798
+ var _this = this;
5799
+ var _a, _b, _c, _d, _e, _f, _g, _h;
5634
5800
  if (((_a = this.treeConfig1) === null || _a === void 0 ? void 0 : _a.selectOne) || ((_b = this.treeConfig2) === null || _b === void 0 ? void 0 : _b.selectOne)) {
5635
5801
  this.disabledList = [];
5636
5802
  this.disabledList2 = [];
@@ -5662,6 +5828,78 @@
5662
5828
  };
5663
5829
  this.dataTrees.toArray()[1].todoItemSelection([treeNode]);
5664
5830
  }
5831
+ else {
5832
+ var newNodeDocs_1 = new TreeModel();
5833
+ newNodeDocs_1.rootId = (_c = item.breadcumbs[item.breadcumbs.length - 1]) === null || _c === void 0 ? void 0 : _c['id'];
5834
+ newNodeDocs_1.rootName = (_d = item.breadcumbs[item.breadcumbs.length - 1]) === null || _d === void 0 ? void 0 : _d['name'];
5835
+ newNodeDocs_1.parentId = '';
5836
+ newNodeDocs_1.subName = null;
5837
+ newNodeDocs_1.childId = item.id;
5838
+ newNodeDocs_1.childName = item.itemName;
5839
+ newNodeDocs_1.statusId = item === null || item === void 0 ? void 0 : item['itemStatus'];
5840
+ newNodeDocs_1.displayId = +item.itemNumberId;
5841
+ this.treeData2 = __spreadArray(__spreadArray([], __read(this.treeData2)), [newNodeDocs_1]);
5842
+ var newSelectedDocs = new TreeFlatNode();
5843
+ newSelectedDocs.disabled = false;
5844
+ newSelectedDocs.expandable = false;
5845
+ newSelectedDocs.hasChild = false;
5846
+ newSelectedDocs.id = item.id;
5847
+ newSelectedDocs.level = 0;
5848
+ newSelectedDocs.levelType = undefined;
5849
+ newSelectedDocs.name = item.itemName;
5850
+ newSelectedDocs.parentId = (_e = item.breadcumbs[item.breadcumbs.length - 1]) === null || _e === void 0 ? void 0 : _e['id'];
5851
+ this.selectedData2 = [];
5852
+ this.selectedData = [];
5853
+ var selectProcess_2 = [];
5854
+ var selectDocument_2 = [];
5855
+ if (this.checkedNodeList.length) {
5856
+ this.checkedNodeList.forEach(function (x) {
5857
+ if (x.itemType === DataType$1.area || x.itemType === DataType$1.process) {
5858
+ _this.treeData1.forEach(function (item) {
5859
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5860
+ selectProcess_2.push({
5861
+ disabled: false,
5862
+ expandable: x.itemType == DataType$1.area ? true : false,
5863
+ hasChild: x.itemType == DataType$1.area ? true : false,
5864
+ id: x.id,
5865
+ level: 0,
5866
+ levelType: undefined,
5867
+ name: x.itemName,
5868
+ parentId: x.parentId
5869
+ });
5870
+ }
5871
+ });
5872
+ }
5873
+ else {
5874
+ _this.treeData2.forEach(function (item) {
5875
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5876
+ selectDocument_2.push({
5877
+ disabled: false,
5878
+ expandable: x.itemType == DataType$1.folder ? true : false,
5879
+ hasChild: x.itemType == DataType$1.folder ? true : false,
5880
+ id: x.id,
5881
+ level: 0,
5882
+ levelType: undefined,
5883
+ name: x.itemName,
5884
+ parentId: x.parentId
5885
+ });
5886
+ }
5887
+ });
5888
+ }
5889
+ });
5890
+ }
5891
+ this.selectedData = __spreadArray(__spreadArray([], __read(this.selectedData)), __read(selectProcess_2));
5892
+ this.selectedData2 = __spreadArray(__spreadArray(__spreadArray([], __read(this.selectedData2)), __read(selectDocument_2)), [newSelectedDocs]);
5893
+ setTimeout(function () {
5894
+ var treeNode = {
5895
+ id: newNodeDocs_1.childId,
5896
+ name: newNodeDocs_1.childName,
5897
+ children: [],
5898
+ parentId: newNodeDocs_1.rootId
5899
+ };
5900
+ _this.dataTrees.toArray()[1].todoItemSelection([treeNode]);
5901
+ }, 500);
5902
+ }
5665
5903
  }
5666
5904
  else if (item.itemType === this.dataType.folder) {
5667
5905
  position = this.treeData2.findIndex(function (x) {
@@ -5677,7 +5915,9 @@
5677
5915
  itemName: item.itemName,
5678
5916
  itemType: typeId,
5679
5917
  itemNumberId: item.itemNumberId,
5680
- levelType: item.levelType
5918
+ levelType: item.levelType,
5919
+ parentId: item.parentId,
5920
+ parentName: item.parentName
5681
5921
  });
5682
5922
  }
5683
5923
  else {
@@ -5722,7 +5962,9 @@
5722
5962
  itemName: node.rootName,
5723
5963
  itemType: typeId,
5724
5964
  itemNumberId: item.itemNumberId,
5725
- levelType: item.levelType
5965
+ levelType: item.levelType,
5966
+ parentId: item.parentId,
5967
+ parentName: item.parentName
5726
5968
  });
5727
5969
  }
5728
5970
  else {
@@ -5748,7 +5990,7 @@
5748
5990
  else if (item.itemType === this.dataType.deviation ||
5749
5991
  item.itemType === this.dataType.checklist) {
5750
5992
  position = this.treeData1.findIndex(function (x) {
5751
- return x.childId.toLowerCase() === item.id.toLowerCase();
5993
+ return x.childId && x.childId.toLowerCase() === item.id.toLowerCase();
5752
5994
  });
5753
5995
  if (position >= 0) {
5754
5996
  node = this.treeData1[position];
@@ -5764,17 +6006,91 @@
5764
6006
  }
5765
6007
  else {
5766
6008
  position = this.treeData1.findIndex(function (x) {
5767
- return x.childId.toLowerCase() === item.id.toLowerCase();
6009
+ return x.childId && x.childId.toLowerCase() === item.id.toLowerCase();
5768
6010
  });
5769
- node = this.treeData1[position];
5770
- typeId = this.itemType;
5771
- var treeNode = {
5772
- id: node.childId,
5773
- name: node.childName,
5774
- children: [],
5775
- parentId: node.rootId
5776
- };
5777
- this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
6011
+ if (position >= 0) {
6012
+ node = this.treeData1[position];
6013
+ typeId = this.itemType;
6014
+ var treeNode = {
6015
+ id: node.childId,
6016
+ name: node.childName,
6017
+ children: [],
6018
+ parentId: node.rootId
6019
+ };
6020
+ this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
6021
+ }
6022
+ else {
6023
+ var newNodeProcess_1 = new TreeModel();
6024
+ newNodeProcess_1.rootId = (_f = item.breadcumbs[item.breadcumbs.length - 1]) === null || _f === void 0 ? void 0 : _f['id'];
6025
+ newNodeProcess_1.rootName = (_g = item.breadcumbs[item.breadcumbs.length - 1]) === null || _g === void 0 ? void 0 : _g['name'];
6026
+ newNodeProcess_1.parentId = '';
6027
+ newNodeProcess_1.subName = null;
6028
+ newNodeProcess_1.childId = item.id;
6029
+ newNodeProcess_1.childName = item.itemName;
6030
+ newNodeProcess_1.statusId = item === null || item === void 0 ? void 0 : item['itemStatus'];
6031
+ newNodeProcess_1.displayId = +item.itemNumberId;
6032
+ this.treeData1 = __spreadArray(__spreadArray([], __read(this.treeData1)), [newNodeProcess_1]);
6033
+ var newSelectedProcess = new TreeFlatNode();
6034
+ newSelectedProcess.disabled = false;
6035
+ newSelectedProcess.expandable = false;
6036
+ newSelectedProcess.hasChild = false;
6037
+ newSelectedProcess.id = item.id;
6038
+ newSelectedProcess.level = 0;
6039
+ newSelectedProcess.levelType = undefined;
6040
+ newSelectedProcess.name = item.itemName;
6041
+ newSelectedProcess.parentId = (_h = item.breadcumbs[item.breadcumbs.length - 1]) === null || _h === void 0 ? void 0 : _h['id'];
6042
+ this.selectedData = [];
6043
+ this.selectedData2 = [];
6044
+ var selectProcess_3 = [];
6045
+ var selectDocument_3 = [];
6046
+ if (this.checkedNodeList.length) {
6047
+ this.checkedNodeList.forEach(function (x) {
6048
+ if (x.itemType === DataType$1.area || x.itemType === DataType$1.process) {
6049
+ _this.treeData1.forEach(function (item) {
6050
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
6051
+ selectProcess_3.push({
6052
+ disabled: false,
6053
+ expandable: x.itemType == DataType$1.area ? true : false,
6054
+ hasChild: x.itemType == DataType$1.area ? true : false,
6055
+ id: x.id,
6056
+ level: 0,
6057
+ levelType: undefined,
6058
+ name: x.itemName,
6059
+ parentId: x.parentId
6060
+ });
6061
+ }
6062
+ });
6063
+ }
6064
+ else {
6065
+ _this.treeData2.forEach(function (item) {
6066
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
6067
+ selectDocument_3.push({
6068
+ disabled: false,
6069
+ expandable: x.itemType == DataType$1.folder ? true : false,
6070
+ hasChild: x.itemType == DataType$1.folder ? true : false,
6071
+ id: x.id,
6072
+ level: 0,
6073
+ levelType: undefined,
6074
+ name: x.itemName,
6075
+ parentId: x.parentId
6076
+ });
6077
+ }
6078
+ });
6079
+ }
6080
+ });
6081
+ }
6082
+ this.selectedData = __spreadArray(__spreadArray(__spreadArray([], __read(this.selectedData)), __read(selectProcess_3)), [newSelectedProcess]);
6083
+ this.selectedData2 = __spreadArray(__spreadArray([], __read(this.selectedData2)), __read(selectDocument_3));
6084
+ setTimeout(function () {
6085
+ var treeNode = {
6086
+ id: newNodeProcess_1.childId,
6087
+ name: newNodeProcess_1.childName,
6088
+ children: [],
6089
+ parentId: newNodeProcess_1.rootId
6090
+ };
6091
+ _this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
6092
+ }, 500);
6093
+ }
5778
6094
  }
5779
6095
  }
5780
6096
  };
@@ -5810,7 +6126,8 @@
5810
6126
  itemName: x.name,
5811
6127
  itemType: itemType,
5812
6128
  itemNumberId: item.displayId.toString(),
5813
- parentId: item.rootId
6129
+ parentId: item.rootId,
6130
+ parentName: item.rootName
5814
6131
  });
5815
6132
  });
5816
6133
  }
@@ -6004,7 +6321,7 @@
6004
6321
  return (elmHeight + elmMargin);
6005
6322
  };
6006
6323
  RelatedPopupComponent.prototype.getItemChipName = function (item) {
6007
- if (item.itemType === DataType.checklist || item.itemType === DataType.deviation) {
6324
+ if (item.itemType === DataType$1.checklist || item.itemType === DataType$1.deviation) {
6008
6325
  return (item.parentName && item.itemName !== item.parentName) ? item.parentName + "/" + item.itemName : item.itemName;
6009
6326
  }
6010
6327
  return item.itemName;
@@ -6014,43 +6331,43 @@
6014
6331
  };
6015
6332
  RelatedPopupComponent.prototype.getNodeIcon = function (item) {
6016
6333
  switch (item.itemType) {
6017
- case DataType.folder: {
6334
+ case DataType$1.folder: {
6018
6335
  switch (item.levelType) {
6019
- case DocumentNodeType.DepartmentFolder:
6336
+ case DocumentNodeType$1.DepartmentFolder:
6020
6337
  return 'department_folder_outlined';
6021
- case DocumentNodeType.RegionalFolder:
6338
+ case DocumentNodeType$1.RegionalFolder:
6022
6339
  return 'regional_folder_outlined';
6023
- case DocumentNodeType.TopFolder:
6340
+ case DocumentNodeType$1.TopFolder:
6024
6341
  return 'enterprise_folder_outlined';
6025
- case DocumentNodeType.Folder:
6342
+ case DocumentNodeType$1.Folder:
6026
6343
  return 'local_folder_outlined';
6027
6344
  default:
6028
6345
  return 'folder_outlined';
6029
6346
  }
6030
6347
  }
6031
- case DataType.document: {
6348
+ case DataType$1.document: {
6032
6349
  switch (item.levelType) {
6033
- case DocumentNodeType.DepartmentFolder:
6350
+ case DocumentNodeType$1.DepartmentFolder:
6034
6351
  return 'document_department';
6035
- case DocumentNodeType.RegionalFolder:
6352
+ case DocumentNodeType$1.RegionalFolder:
6036
6353
  return 'document_regional';
6037
- case DocumentNodeType.TopFolder:
6354
+ case DocumentNodeType$1.TopFolder:
6038
6355
  return 'document_enterprise';
6039
- case DocumentNodeType.Folder:
6356
+ case DocumentNodeType$1.Folder:
6040
6357
  return 'document_local';
6041
6358
  default:
6042
6359
  return 'document';
6043
6360
  }
6044
6361
  }
6045
- case DataType.area:
6362
+ case DataType$1.area:
6046
6363
  return 'process_area_outlined';
6047
- case DataType.process:
6364
+ case DataType$1.process:
6048
6365
  return 'process';
6049
- case DataType.deviation:
6366
+ case DataType$1.deviation:
6050
6367
  return 'deviation';
6051
- case DataType.checklist:
6368
+ case DataType$1.checklist:
6052
6369
  return 'checklist';
6053
- case DataType.risk:
6370
+ case DataType$1.risk:
6054
6371
  return 'risk';
6055
6372
  default:
6056
6373
  return 'folder_outlined';
@@ -6065,25 +6382,25 @@
6065
6382
  };
6066
6383
  RelatedPopupComponent.prototype.getTitle = function (type) {
6067
6384
  switch (type) {
6068
- case DataType.process:
6385
+ case DataType$1.process:
6069
6386
  return this.LANG.PROCESSES;
6070
- case DataType.area:
6387
+ case DataType$1.area:
6071
6388
  return this.LANG.PROCESS_AREA;
6072
- case DataType.document:
6389
+ case DataType$1.document:
6073
6390
  return this.LANG.DOCUMENTS;
6074
- case DataType.folder:
6391
+ case DataType$1.folder:
6075
6392
  return this.LANG.FOLDER;
6076
- case DataType.deviation:
6393
+ case DataType$1.deviation:
6077
6394
  return this.LANG.DEVIATION;
6078
- case DataType.deviationType:
6395
+ case DataType$1.deviationType:
6079
6396
  return this.LANG.DEVIATION_TYPE;
6080
- case DataType.checklist:
6397
+ case DataType$1.checklist:
6081
6398
  return this.LANG.CHECKLIST;
6082
- case DataType.checklistCategory:
6399
+ case DataType$1.checklistCategory:
6083
6400
  return this.LANG.CHECKLIST_CATEGORY;
6084
- case DataType.risk:
6401
+ case DataType$1.risk:
6085
6402
  return this.LANG.ASSESSMENT;
6086
- case DataType.riskFolder:
6403
+ case DataType$1.riskFolder:
6087
6404
  return this.LANG.FOLDER;
6088
6405
  }
6089
6406
  };
@@ -6132,38 +6449,43 @@
6132
6449
  [].forEach.call(itemElement, function (el) {
6133
6450
  el.classList.add('active-item');
6134
6451
  });
6135
- var item = new IRelated();
6136
- item.id = node.id;
6137
- item.itemType = type;
6138
- item.itemName = node.name;
6139
- item.levelType = node.levelType;
6140
- this.selectedFolder = node;
6141
6452
  if (type === this.dataType.folder) {
6142
6453
  this.splitViewTitle = this.LANG.MESSAGE.DOCUMENTS_IN.toUpperCase() + " \"" + node.name + "\"";
6143
6454
  }
6144
6455
  else if (type === this.dataType.area) {
6145
6456
  this.splitViewTitle = this.LANG.MESSAGE.PROCESSES_IN.toUpperCase() + " \"" + node.name + "\"";
6146
6457
  }
6458
+ var item = new IRelated();
6459
+ item.id = node.id;
6460
+ item.itemType = type;
6461
+ item.itemName = node.name;
6462
+ item.levelType = node.levelType;
6463
+ this.selectedFolder = node;
6464
+ this.parentNodeSelected = new TreeFlatNode();
6465
+ this.parentNodeSelected = Object.assign({}, node);
6147
6466
  this.onExpandFolder.emit(item);
6148
6467
  }
6149
6468
  };
6150
6469
  RelatedPopupComponent.prototype.canShowSearchOption = function (moduleId) {
6151
6470
  if (this.canOnlySelectItem &&
6152
- (moduleId === DataType.checklistCategory
6153
- || moduleId === DataType.riskFolder
6154
- || moduleId === DataType.deviationType
6155
- || (moduleId === DataType.area && this.treeConfig1 && !this.treeConfig1.singleSelectedNode)
6156
- || (moduleId === DataType.folder && this.treeConfig2 && !this.treeConfig2.singleSelectedNode))) {
6471
+ (moduleId === DataType$1.checklistCategory
6472
+ || moduleId === DataType$1.riskFolder
6473
+ || moduleId === DataType$1.deviationType
6474
+ || (moduleId === DataType$1.area && this.treeConfig1 && !this.treeConfig1.singleSelectedNode)
6475
+ || (moduleId === DataType$1.folder && this.treeConfig2 && !this.treeConfig2.singleSelectedNode))) {
6157
6476
  return false;
6158
6477
  }
6159
6478
  return this.getModuleFilteredOptions(moduleId).length > 0;
6160
6479
  };
6161
6480
  RelatedPopupComponent.prototype.selectNodeTreeEvent = function (node) {
6162
6481
  var _a, _b, _c, _d;
6482
+ if (!node.itemType) {
6483
+ return;
6484
+ }
6163
6485
  var position = -1;
6164
6486
  var parentName = '';
6165
6487
  var itemNumberId = '';
6166
- if (node.itemType == DataType.folder || node.itemType == DataType.document) {
6488
+ if (node.itemType == DataType$1.folder || node.itemType == DataType$1.document) {
6167
6489
  position = !node.expandable ? this.treeData2.findIndex(function (p) { return p.childId === node.id && p.rootId === node.parentId; }) :
6168
6490
  this.treeData2.findIndex(function (p) { return p.rootId === node.id; });
6169
6491
  parentName = this.treeData2[position].parentId ? this.treeData2[position].subName : this.treeData2[position].rootName;
@@ -6196,7 +6518,7 @@
6196
6518
  RelatedPopupComponent.decorators = [
6197
6519
  { type: i0.Component, args: [{
6198
6520
  selector: 'qms-related-popup',
6199
- 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\r\n id=\"qmslib_related_popup_search\"\r\n class=\"input__field\"\r\n (click)=\"showSearchResult()\"\r\n >\r\n <input\r\n #name\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n #autoCompleteInputSearch\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 [displayWith]=\"displayRelated\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n class=\"related-viewport\"\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 (click)=\"selectRelated(option)\"\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\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\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 <mat-panel-title *ngIf=\"moduleId === module.deviation\">\r\n {{ LANG.DEVIATION | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.checklist\">\r\n {{ LANG.CHECKLIST | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.risk\">\r\n {{ LANG.ASSESSMENT | 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\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n ></qms-tree>\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\r\n [treeData]=\"treeData2\"\r\n [treeConfig]=\"treeConfig2\"\r\n [selectedData]=\"selectedData2\"\r\n [disabledList]=\"disabledList2\"\r\n (checkBoxEvent)=\"getDocumentCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.folder)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"\r\n qms-scrollbar\r\n qmslib-related-popup-splitview qmslib_related_popup_content\r\n col-6\r\n \"\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 *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\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",
6521
+ 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\r\n id=\"qmslib_related_popup_search\"\r\n class=\"input__field\"\r\n (click)=\"showSearchResult()\"\r\n >\r\n <input\r\n #name\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n #autoCompleteInputSearch\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 [displayWith]=\"displayRelated\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n class=\"related-viewport\"\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 (click)=\"selectRelated(option)\"\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\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\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 <mat-panel-title *ngIf=\"moduleId === module.deviation\">\r\n {{ LANG.DEVIATION | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.checklist\">\r\n {{ LANG.CHECKLIST | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.risk\">\r\n {{ LANG.ASSESSMENT | 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\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n ></qms-tree>\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\r\n [treeData]=\"treeData2\"\r\n [treeConfig]=\"treeConfig2\"\r\n [selectedData]=\"selectedData2\"\r\n [disabledList]=\"disabledList2\"\r\n (checkBoxEvent)=\"getDocumentCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.folder)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"\r\n qms-scrollbar\r\n qmslib-related-popup-splitview qmslib_related_popup_content\r\n col-6\r\n \"\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 *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\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",
6200
6522
  encapsulation: i0.ViewEncapsulation.None,
6201
6523
  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}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:10.25rem}"]
6202
6524
  },] }
@@ -6269,7 +6591,7 @@
6269
6591
  showCheckBox: true,
6270
6592
  allowMultipleCheck: true,
6271
6593
  onlyCheckBoxForChild: false,
6272
- moduleId: DataType.risk,
6594
+ moduleId: DataType$1.risk,
6273
6595
  openIcon: 'keyboard_arrow_up',
6274
6596
  openIconColor: '#1954A9',
6275
6597
  closeIcon: 'keyboard_arrow_down',
@@ -6655,18 +6977,6 @@
6655
6977
  },] }
6656
6978
  ];
6657
6979
 
6658
- var TreeFlatNode = /** @class */ (function () {
6659
- function TreeFlatNode() {
6660
- }
6661
- return TreeFlatNode;
6662
- }());
6663
-
6664
- var TreeModel = /** @class */ (function () {
6665
- function TreeModel() {
6666
- }
6667
- return TreeModel;
6668
- }());
6669
-
6670
6980
  var TreeConfig = /** @class */ (function () {
6671
6981
  function TreeConfig() {
6672
6982
  }
@@ -15955,7 +16265,7 @@
15955
16265
  { type: i0.Component, args: [{
15956
16266
  selector: 'app-qms-app-bar',
15957
16267
  template: "<div class=\"qms-app-bar-container\">\r\n <mat-toolbar class=\"bar-container\" *ngIf=\"!isNomalType\">\r\n <span class=\"w-100\">\r\n <span class=\"col-4 d-inline-flex align-items-lg-center\">\r\n <div *ngIf=\"hideMenuDropdown\" class=\"border align-self-center\">\r\n <div *ngIf=\"logoSvgPath\" class=\"logo-container\">\r\n <img [src]=\"logoSvgPath\" alt=\"\" />\r\n </div>\r\n </div>\r\n <div *ngIf=\"!hideMenuDropdown\">\r\n <button #menu class=\"collapse-icon\" mat-button>\r\n <mat-icon class=\"mat-icon-rtl-mirror\" (click)=\"onMenuClicked()\">\r\n menu\r\n </mat-icon>\r\n </button>\r\n <img [src]=\"logoSvgPath\" alt=\"\" />\r\n </div>\r\n <span class=\"p-3\">{{title}}</span>\r\n <div class=\"spacer\"></div>\r\n </span>\r\n <span class=\"align-items-sm-center col-4 d-inline-flex justify-content-center\">\r\n <div *ngIf=\"imgSvgPath\" class=\"img-container\" [class.bg-transparent]=\"isImgSvgTransparent\">\r\n <img [src]=\"imgSvgPath\" alt=\"\" />\r\n </div>\r\n </span>\r\n <span class=\"col-4 d-inline-flex justify-content-end\">\r\n <button (click)=\"onRightIconClicked(item.icon)\" *ngFor=\"let item of rightIcons\" class=\"menu-item-icon\"\r\n mat-button>\r\n <mat-icon *ngIf=\"item.icon == 'notifications_none'\" matBadge=\"{{notifications}}\"\r\n matBadgeColor=\"warn\">\r\n {{item.icon}}\r\n </mat-icon>\r\n <mat-icon *ngIf=\"item.icon != 'notifications_none'\"\r\n class=\"material-icons-outlined mat-icon-rtl-mirror\">\r\n {{item.icon}}\r\n </mat-icon>\r\n <span class=\"mg-l-3\">{{item.tooltip}}</span>\r\n </button>\r\n </span>\r\n </span>\r\n </mat-toolbar>\r\n <mat-toolbar class=\"bar-prv-container\" *ngIf=\"isNomalType\">\r\n <button class=\"icon-title\" #menu qms-btn-text (click)=\"onClickLeftFirstIcon()\">\r\n <mat-icon class=\"cusor-pointer\">\r\n {{leftFirstIcon}}\r\n </mat-icon>\r\n </button>\r\n <span class=\"content-title\">{{title}}</span>\r\n <div class=\"spacer\"></div>\r\n <div class=\"right-content\">\r\n <button qms-btn-text (click)=\"onCancel()\" class=\"cusor-pointer mr-22\" *ngIf=\"cancelTitle\">\r\n {{cancelTitle}}\r\n </button>\r\n <button qms-btn [disabled]=\"disabledConfirmAction\" class=\"cusor-pointer\" (click)=\"onConfirm()\" *ngIf=\"confirmTitle\">\r\n {{confirmTitle}}\r\n </button>\r\n </div>\r\n </mat-toolbar>\r\n</div>",
15958
- styles: [".qms-app-bar-container{height:56px}.qms-app-bar-container .spacer{flex:1 1 auto}.qms-app-bar-container .mat-toolbar{background:#00324e;color:#fff;height:56px}.qms-app-bar-container .bar-prv-container{background:#e4e4e4}.qms-app-bar-container .bar-prv-container .close-icon,.qms-app-bar-container .bar-prv-container .title-icon{color:#323232}.qms-app-bar-container .bar-prv-container .right-content .mr-22{margin-right:22px}.qms-app-bar-container .bar-prv-container button:first-child:hover{background-color:rgba(0,0,0,.08)}.qms-app-bar-container .bar-prv-container .icon-title{color:#666}.qms-app-bar-container .bar-prv-container .content-title{font-family:Raleway;font-size:18px;font-style:normal;font-weight:600;line-height:21px;letter-spacing:0;text-align:left;color:#323232}.qms-app-bar-container .bar-container{padding:0!important}.qms-app-bar-container .bar-container .logo-container{background:#fff;padding:12px;height:56px}.qms-app-bar-container .bar-container .img-container{height:40px;background:#fff;padding:2px}.qms-app-bar-container .bar-container .bg-transparent{background:transparent;height:40px;padding:2px}"]
16268
+ styles: [".qms-app-bar-container{height:56px}.qms-app-bar-container .spacer{flex:1 1 auto}.qms-app-bar-container .mat-toolbar{background:#00324e;color:#fff;height:56px}.qms-app-bar-container .bar-prv-container{background:#e4e4e4}.qms-app-bar-container .bar-prv-container .close-icon,.qms-app-bar-container .bar-prv-container .title-icon{color:#323232}.qms-app-bar-container .bar-prv-container .right-content .mr-22{margin-right:22px}.qms-app-bar-container .bar-prv-container button:first-child:hover{background-color:rgba(0,0,0,.08)}.qms-app-bar-container .bar-prv-container .icon-title{color:#666;padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.qms-app-bar-container .bar-prv-container .content-title{font-family:Raleway;font-size:18px;font-style:normal;font-weight:600;line-height:21px;letter-spacing:0;text-align:left;color:#323232}.qms-app-bar-container .bar-container{padding:0!important}.qms-app-bar-container .bar-container .logo-container{background:#fff;padding:12px;height:56px}.qms-app-bar-container .bar-container .img-container{height:40px;background:#fff;padding:2px}.qms-app-bar-container .bar-container .bg-transparent{background:transparent;height:40px;padding:2px}"]
15959
16269
  },] }
15960
16270
  ];
15961
16271
  QmsAppBarComponent.ctorParameters = function () { return []; };
@@ -16532,14 +16842,10 @@
16532
16842
 
16533
16843
  var QMSSelectGlobalService = /** @class */ (function () {
16534
16844
  function QMSSelectGlobalService() {
16535
- this.searchRelated = new rxjs.BehaviorSubject([]);
16536
- this.splitViewValue = new rxjs.BehaviorSubject([]);
16845
+ this.searchSelect = new rxjs.BehaviorSubject([]);
16537
16846
  }
16538
16847
  QMSSelectGlobalService.prototype.setSearchResult = function (result) {
16539
- this.searchRelated.next(result);
16540
- };
16541
- QMSSelectGlobalService.prototype.setSplitviewValue = function (result) {
16542
- this.splitViewValue.next(result);
16848
+ this.searchSelect.next(result);
16543
16849
  };
16544
16850
  return QMSSelectGlobalService;
16545
16851
  }());
@@ -16558,14 +16864,21 @@
16558
16864
  SelectConst.HIDE_SEARCH_RESULT = 'HIDE_SEARCH_RESULT';
16559
16865
  SelectConst.SHOW_SEARCH_RESULT = 'SHOW_SEARCH_RESULT';
16560
16866
 
16867
+ exports.SelectOptionTypes = void 0;
16868
+ (function (SelectOptionTypes) {
16869
+ SelectOptionTypes[SelectOptionTypes["SelectOne"] = 1] = "SelectOne";
16870
+ SelectOptionTypes[SelectOptionTypes["IncludeChildren"] = 2] = "IncludeChildren";
16871
+ SelectOptionTypes[SelectOptionTypes["Children"] = 3] = "Children";
16872
+ })(exports.SelectOptionTypes || (exports.SelectOptionTypes = {}));
16873
+
16561
16874
  var SelectIncludeChildrenPopUpComponent = /** @class */ (function () {
16562
- function SelectIncludeChildrenPopUpComponent(cdRef, translate, dialogRef, globalService, iconRegistry, sanitizer, appIconService, elem, data) {
16875
+ function SelectIncludeChildrenPopUpComponent(cdRef, translate, dialogRef, globalService, iconRegistry, domSanitizer, appIconService, elem, data) {
16563
16876
  this.cdRef = cdRef;
16564
16877
  this.translate = translate;
16565
16878
  this.dialogRef = dialogRef;
16566
16879
  this.globalService = globalService;
16567
16880
  this.iconRegistry = iconRegistry;
16568
- this.sanitizer = sanitizer;
16881
+ this.domSanitizer = domSanitizer;
16569
16882
  this.appIconService = appIconService;
16570
16883
  this.elem = elem;
16571
16884
  this.data = data;
@@ -16573,15 +16886,13 @@
16573
16886
  this.headerName = '';
16574
16887
  this.treeData = [];
16575
16888
  this.checkedNodeList = [];
16576
- this.SelectOption = [];
16889
+ this.selectedOptions = [];
16577
16890
  this.selectedData = [];
16578
16891
  this.commonCheckedList = [];
16579
- this.documentCheckedList = [];
16580
- this.singleProcessList = [];
16581
16892
  this.itemType = 0;
16582
16893
  this.selectedRiskData = [];
16583
16894
  this.disabledList = [];
16584
- this.disabledList2 = [];
16895
+ this.orginalDisableList = [];
16585
16896
  this.isDocumentExpanded = true;
16586
16897
  this.isCommonExpanded = true;
16587
16898
  this.singleSelectOption = false;
@@ -16592,23 +16903,34 @@
16592
16903
  this.selectedFolder = null;
16593
16904
  this.listChildrenSelectOne = [];
16594
16905
  this.includeChildren = false;
16906
+ this.itemIconType = ItemIconType;
16595
16907
  this.onSearch = new i0.EventEmitter();
16596
16908
  this.onExpandFolder = new i0.EventEmitter();
16597
16909
  this.headerName = data.headerName;
16598
16910
  this.treeData = data.treeData;
16599
16911
  this.treeConfig = data.treeConfig;
16600
16912
  this.selectedRiskData = (data === null || data === void 0 ? void 0 : data.selectedNode) || [];
16601
- this.disabledList = data.disabledList || [];
16913
+ this.disabledList = $.extend(true, [], data.disabledList || []);
16914
+ this.orginalDisableList = $.extend(true, [], data.disabledList || []);
16602
16915
  this.singleSelectOption = data.treeConfig.singleSelectedNode;
16603
16916
  this.maxSelectItemCount = data.maxSelectItemCount;
16604
- appIconService.registerProcessIcon(iconRegistry, sanitizer);
16605
- appIconService.registerProcessAreaIcon(iconRegistry, sanitizer);
16606
- appIconService.registerDocumentIcon(iconRegistry, sanitizer);
16607
- appIconService.registerFolderIcon(iconRegistry, sanitizer);
16608
- appIconService.registerDeviationIcon(iconRegistry, sanitizer);
16609
- appIconService.registerChecklistIcon(iconRegistry, sanitizer);
16610
- appIconService.registerRiskIcon(iconRegistry, sanitizer);
16917
+ this.checkedNodeList = (data === null || data === void 0 ? void 0 : data.selectedList) || [];
16918
+ this.includeChildren = data === null || data === void 0 ? void 0 : data.includeChildren;
16919
+ this.editItem = data.editItem;
16920
+ appIconService.registerProcessIcon(iconRegistry, domSanitizer);
16921
+ appIconService.registerProcessAreaIcon(iconRegistry, domSanitizer);
16922
+ appIconService.registerDocumentIcon(iconRegistry, domSanitizer);
16923
+ appIconService.registerFolderIcon(iconRegistry, domSanitizer);
16924
+ appIconService.registerDeviationIcon(iconRegistry, domSanitizer);
16925
+ appIconService.registerChecklistIcon(iconRegistry, domSanitizer);
16926
+ appIconService.registerRiskIcon(iconRegistry, domSanitizer);
16611
16927
  }
16928
+ SelectIncludeChildrenPopUpComponent.prototype.ngAfterViewInit = function () {
16929
+ if (this.editItem) {
16930
+ this.focusEditItem(this.editItem);
16931
+ }
16932
+ this.initTree(this.checkedNodeList);
16933
+ };
16612
16934
  SelectIncludeChildrenPopUpComponent.prototype.ngOnDestroy = function () {
16613
16935
  this.ngUnsubscribe.next();
16614
16936
  this.ngUnsubscribe.complete();
@@ -16627,7 +16949,7 @@
16627
16949
  _this.LANG = _this.translate.getObjectLang(res);
16628
16950
  }
16629
16951
  });
16630
- this.globalService.searchRelated.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
16952
+ this.globalService.searchSelect.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
16631
16953
  if (res && res.length) {
16632
16954
  _this.filteredOptions = res;
16633
16955
  }
@@ -16648,37 +16970,99 @@
16648
16970
  this.autoComplete.closePanel();
16649
16971
  }
16650
16972
  };
16651
- SelectIncludeChildrenPopUpComponent.prototype.removeCheckedNodeList = function (item) {
16973
+ SelectIncludeChildrenPopUpComponent.prototype.initTree = function (selectedOptions) {
16652
16974
  var _this = this;
16653
- this.selectedData = [];
16654
- this.checkedNodeList = this.checkedNodeList.filter(function (x) { return (x.id.toLowerCase() !== item.id.toLowerCase() || x.parentId.toLowerCase() !== item.parentId.toLowerCase()); });
16655
- var tempArr = [];
16656
- var tempArrDocument = [];
16657
- var newSelectProcessList = [];
16658
- var newSelectDocumentList = [];
16659
- this.commonCheckedList.forEach(function (element) {
16660
- _this.checkedNodeList.forEach(function (x) {
16661
- if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
16662
- tempArr.push(element);
16663
- }
16664
- });
16665
- });
16666
- this.singleProcessList.forEach(function (element) {
16667
- _this.checkedNodeList.forEach(function (x) {
16668
- if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
16669
- newSelectProcessList.push(element);
16670
- }
16671
- });
16672
- });
16673
- this.singleProcessList = newSelectProcessList;
16674
- this.selectedData = __spreadArray([], __read(tempArr));
16675
- this.documentCheckedList.forEach(function (element) {
16676
- _this.checkedNodeList.forEach(function (x) {
16677
- if (element.id.toLowerCase() === x.id.toLowerCase() && element.parentId.toLowerCase() === x.parentId.toLowerCase()) {
16678
- tempArrDocument.push(element);
16975
+ if (selectedOptions.length > 0) {
16976
+ selectedOptions.forEach(function (element) {
16977
+ _this.selectedOptions.push(element);
16978
+ if (element.type === exports.SelectOptionTypes.IncludeChildren) {
16979
+ _this.selectedOptions = _this.selectedOptions.concat(element.children);
16679
16980
  }
16981
+ _this.selectedData = _this.mapSelectOptionToTreeNode(_this.selectedOptions);
16680
16982
  });
16681
- });
16983
+ }
16984
+ };
16985
+ SelectIncludeChildrenPopUpComponent.prototype.focusEditItem = function (selectedOption) {
16986
+ var node = this.dataTrees.toArray()[0].getNodeByIdAndParentId(selectedOption.id, selectedOption.parentId);
16987
+ if (node) {
16988
+ this.dataTrees.toArray()[0].expandNode(node);
16989
+ var element = document.getElementById("_" + (node.parentId ? node.parentId : '') + "_" + node.id + "_" + node.level);
16990
+ if (element) {
16991
+ element.scrollIntoView(false);
16992
+ }
16993
+ }
16994
+ };
16995
+ SelectIncludeChildrenPopUpComponent.prototype.removeCheckedNodeList = function (item) {
16996
+ var index = this.checkedNodeList.findIndex(function (x) { return (x.id.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase()); });
16997
+ if (index >= 0) {
16998
+ var position = this.selectedOptions.findIndex(function (x) { return x.id === item.id && x.parentId === item.parentId; });
16999
+ if (position >= 0) {
17000
+ this.selectedOptions.splice(position, 1);
17001
+ }
17002
+ if (this.checkedNodeList[index].type === exports.SelectOptionTypes.IncludeChildren) {
17003
+ this.removeIncludeChildren(item);
17004
+ }
17005
+ if (this.includeChildren) {
17006
+ this.refactorSelectList(item);
17007
+ }
17008
+ else {
17009
+ this.checkedNodeList.splice(index, 1);
17010
+ }
17011
+ this.enableSelectedNode({ id: item.id, parentId: item.parentId, itemName: item.name, type: exports.SelectOptionTypes.IncludeChildren });
17012
+ this.selectedData = this.mapSelectOptionToTreeNode(this.selectedOptions);
17013
+ }
17014
+ };
17015
+ SelectIncludeChildrenPopUpComponent.prototype.selectSearchOption = function (item) {
17016
+ var position = this.selectedOptions.findIndex(function (x) { return x.id === item.id && x.parentId === item.parentId; });
17017
+ if (position < 0) {
17018
+ if (this.includeChildren) {
17019
+ this.selectIncludeChildren({
17020
+ id: item.id,
17021
+ name: item.itemName,
17022
+ parentId: item.parentId,
17023
+ level: 0,
17024
+ expandable: true,
17025
+ disabled: false,
17026
+ hasChild: false
17027
+ });
17028
+ this.refactorSelectList({
17029
+ id: item.id,
17030
+ name: item.itemName,
17031
+ parentId: item.parentId,
17032
+ level: 0,
17033
+ expandable: true,
17034
+ disabled: false,
17035
+ hasChild: false
17036
+ });
17037
+ }
17038
+ else {
17039
+ this.selectedOptions.push(item);
17040
+ this.checkedNodeList.push({
17041
+ id: item.id,
17042
+ itemName: item.itemName,
17043
+ type: exports.SelectOptionTypes.SelectOne,
17044
+ parentId: item.parentId,
17045
+ children: [],
17046
+ noChildren: 0,
17047
+ noSelectedChildren: 0
17048
+ });
17049
+ }
17050
+ }
17051
+ this.selectedData = this.mapSelectOptionToTreeNode(this.selectedOptions);
17052
+ };
17053
+ SelectIncludeChildrenPopUpComponent.prototype.getItemIconType = function (item) {
17054
+ if (item.itemIcon && item.itemIcon.length)
17055
+ return this.itemIconType.name;
17056
+ if (item.itemIconPath && item.itemIconPath.length)
17057
+ return this.itemIconType.path;
17058
+ if (item.itemIconBase64 && item.itemIconBase64.length)
17059
+ return this.itemIconType.base64;
17060
+ if (item.itemIconSvg && item.itemIconSvg.length)
17061
+ return this.itemIconType.svg;
17062
+ return this.itemIconType.none;
17063
+ };
17064
+ SelectIncludeChildrenPopUpComponent.prototype.getImagePath = function (item) {
17065
+ return this.domSanitizer.bypassSecurityTrustResourceUrl(item.itemIconBase64);
16682
17066
  };
16683
17067
  SelectIncludeChildrenPopUpComponent.prototype.isMatchTrue = function (arr, arr2) {
16684
17068
  return arr.every(function (i) {
@@ -16714,165 +17098,90 @@
16714
17098
  }
16715
17099
  }
16716
17100
  };
16717
- SelectIncludeChildrenPopUpComponent.prototype.getModuleFilteredOptions = function () {
16718
- if (this.listChildrenSelectOne.length) {
16719
- for (var index = 0; index < this.listChildrenSelectOne.length; index++) {
16720
- var firstEl = this.listChildrenSelectOne[index];
16721
- for (var j = 0; j < this.filteredOptions.length; j++) {
16722
- var secondEl = this.filteredOptions[j];
16723
- if (firstEl.id === secondEl.id) {
16724
- this.filteredOptions.splice(j, 1);
16725
- }
16726
- }
16727
- }
16728
- }
16729
- return this.filteredOptions;
16730
- };
16731
17101
  SelectIncludeChildrenPopUpComponent.prototype.showSearchResult = function () {
16732
17102
  this.autoComplete.openPanel();
16733
17103
  };
16734
17104
  SelectIncludeChildrenPopUpComponent.prototype.displayRelated = function (related) {
16735
17105
  return related ? related.itemName : undefined;
16736
17106
  };
16737
- SelectIncludeChildrenPopUpComponent.prototype.selectSearch = function (item) {
16738
- if (this.treeConfig.selectOne) {
16739
- this.disabledList = [];
16740
- }
16741
- var index = -1;
16742
- this.SelectOption = [];
16743
- if (this.treeConfig.showCheckBox) {
16744
- index = this.checkedNodeList.findIndex(function (x) {
16745
- return x.id === item.id && x.parentId === item.parentId;
16746
- });
16747
- }
16748
- if (index < 0) {
16749
- var position = -1;
16750
- var node = void 0;
16751
- var typeId = void 0;
16752
- }
17107
+ SelectIncludeChildrenPopUpComponent.prototype.getCommonCheckedNode = function (list) {
16753
17108
  };
16754
- SelectIncludeChildrenPopUpComponent.prototype.selectNodeRecursive = function (item) {
17109
+ SelectIncludeChildrenPopUpComponent.prototype.selectIncludeChildren = function (item) {
16755
17110
  var _this = this;
16756
- var position = this.treeData.findIndex(function (x) {
16757
- return x.rootId === item.rootId;
17111
+ var listChildren = [];
17112
+ listChildren = this.getAllChildrenNodeRecursive(listChildren, item);
17113
+ this.selectedOptions.push({
17114
+ id: item.id,
17115
+ itemName: item.name,
17116
+ itemNumberId: item.id,
17117
+ parentId: item.parentId,
17118
+ type: exports.SelectOptionTypes.IncludeChildren
16758
17119
  });
16759
- if (position >= 0) {
16760
- var node = {
16761
- id: item.rootId,
16762
- name: item.rootName,
16763
- children: [],
16764
- parentId: item.parentId
16765
- };
16766
- var nodeChildren = this.treeData.
16767
- filter(function (x) { return x.rootId === item.rootId; }).
16768
- map(function (x) {
17120
+ listChildren.forEach(function (x) {
17121
+ var index = _this.selectedOptions.findIndex(function (node) { return node.id === x.id && node.parentId === x.parentId; });
17122
+ if (index < 0) {
17123
+ _this.selectedOptions.push(x);
17124
+ }
17125
+ });
17126
+ };
17127
+ SelectIncludeChildrenPopUpComponent.prototype.removeIncludeChildren = function (item) {
17128
+ var _this = this;
17129
+ var listChildren = [];
17130
+ listChildren = this.getAllChildrenNodeRecursive(listChildren, item);
17131
+ var itemIndex = this.selectedOptions.findIndex(function (node) { return node.id === item.id && node.parentId === item.parentId; });
17132
+ if (itemIndex >= 0) {
17133
+ this.selectedOptions.splice(itemIndex, 1);
17134
+ }
17135
+ listChildren.forEach(function (x) {
17136
+ var index = _this.selectedOptions.findIndex(function (node) { return node.id === x.id && node.parentId === x.parentId; });
17137
+ if (index >= 0) {
17138
+ _this.selectedOptions.splice(index, 1);
17139
+ }
17140
+ });
17141
+ };
17142
+ SelectIncludeChildrenPopUpComponent.prototype.getAllChildrenNodeRecursive = function (listResult, item) {
17143
+ var _this = this;
17144
+ var children = this.treeData.filter(function (x) { return x.parentId === item.id; });
17145
+ var childrenItem = __spreadArray([], __read(new Set(this.treeData.filter(function (x) { return x.rootId === item.id && !!x.childId; }))));
17146
+ if (childrenItem.length > 0) {
17147
+ childrenItem = childrenItem.filter(function (x) { return listResult.findIndex(function (node) { return node.id === x.childId && node.parentId === x.rootId; }) < 0; });
17148
+ listResult = listResult.concat(__spreadArray([], __read(new Set(childrenItem.map(function (x) {
16769
17149
  return {
16770
17150
  id: x.childId,
16771
- name: item.childName,
16772
- children: [],
16773
- parentId: item.rootId
17151
+ itemName: x.childName,
17152
+ parentId: x.rootId,
17153
+ parentName: x.rootName,
17154
+ type: exports.SelectOptionTypes.Children
17155
+ };
17156
+ })))));
17157
+ }
17158
+ if (children.length > 0) {
17159
+ children = children.filter(function (x) { return listResult.findIndex(function (node) { return node.id === x.rootId && node.parentId === x.parentId; }) < 0; });
17160
+ var uniqueChildren_1 = children.map(function (x) {
17161
+ var _a;
17162
+ return {
17163
+ id: x.rootId,
17164
+ itemName: ((_a = x.parentId) === null || _a === void 0 ? void 0 : _a.length) > 0 ? x.subName : x.rootName,
17165
+ parentId: x.parentId,
17166
+ type: exports.SelectOptionTypes.IncludeChildren
16774
17167
  };
16775
17168
  });
16776
- var nodeSubfolders = this.treeData.
16777
- filter(function (x) { return x.parentId === item.rootId; });
16778
- if (this.treeConfig.showCheckBox) {
16779
- nodeChildren.forEach(function (x) {
16780
- _this.checkedNodeList.push({
16781
- id: x.id,
16782
- itemName: x.name,
16783
- itemNumberId: item.displayId.toString(),
16784
- parentId: item.rootId,
16785
- parentName: item.rootName
16786
- });
16787
- });
16788
- }
16789
- else {
16790
- nodeChildren.forEach(function (x) {
16791
- _this.SelectOption.push({
16792
- id: x.id,
16793
- itemName: x.name,
16794
- itemNumberId: item.displayId.toString(),
16795
- parentId: item.rootId,
16796
- parentName: item.rootName
16797
- });
16798
- });
16799
- }
16800
- this.dataTrees.toArray()[0].todoItemSelection([node].concat(nodeChildren));
16801
- if (nodeSubfolders) {
16802
- nodeSubfolders.forEach(function (folder) {
16803
- _this.selectNodeRecursive(folder);
17169
+ listResult = listResult.concat(uniqueChildren_1.filter(function (x, index) {
17170
+ return index === uniqueChildren_1.findIndex(function (node) { return node.id === x.id && node.parentId === x.parentId; });
17171
+ }));
17172
+ children.forEach(function (node) {
17173
+ listResult = _this.getAllChildrenNodeRecursive(listResult, {
17174
+ id: node.rootId,
17175
+ name: node.rootName,
17176
+ parentId: node.parentId,
17177
+ level: 0,
17178
+ expandable: true,
17179
+ hasChild: true,
17180
+ disabled: false
16804
17181
  });
16805
- }
16806
- }
16807
- return;
16808
- };
16809
- // setTypeProcess(expand) {
16810
- // return expand ? this.dataType.area : this.dataType.process;
16811
- // }
16812
- SelectIncludeChildrenPopUpComponent.prototype.getCommonCheckedNode = function (list) {
16813
- var _this = this;
16814
- this.checkedNodeList = [];
16815
- this.commonCheckedList = [];
16816
- this.singleProcessList = [];
16817
- if (list.length) {
16818
- list.forEach(function (item) {
16819
- var index = _this.checkedNodeList.findIndex(function (x) { return x.id === item.id && x.parentId === item.parentId; });
16820
- if (item.id && index < 0) {
16821
- _this.commonCheckedList.push(item);
16822
- }
16823
- if (_this.singleSelectOption) {
16824
- var position = void 0;
16825
- if (item.expandable) {
16826
- position = _this.treeData.findIndex(function (p) { return p.rootId === item.id; });
16827
- }
16828
- else {
16829
- position = _this.treeData.findIndex(function (p) { return p.childId === item.id; });
16830
- }
16831
- if (position > -1) {
16832
- _this.singleProcessList.push({
16833
- id: item.id,
16834
- itemName: item.name,
16835
- itemNumberId: _this.treeData[position].displayId.toString(),
16836
- parentId: item.parentId,
16837
- levelType: item.levelType
16838
- });
16839
- }
16840
- }
16841
- if (item.id && index < 0 && !item.expandable && !_this.singleSelectOption) {
16842
- var position = _this.treeData.findIndex(function (p) { return p.childId === item.id && p.rootId === item.parentId; });
16843
- if (position > -1) {
16844
- _this.checkedNodeList.push({
16845
- id: item.id,
16846
- itemName: item.name,
16847
- parentId: item.parentId,
16848
- parentName: _this.treeData[position].parentId ? _this.treeData[position].subName : _this.treeData[position].rootName,
16849
- itemNumberId: _this.treeData[position].displayId.toString(),
16850
- levelType: item.levelType
16851
- });
16852
- }
16853
- }
16854
17182
  });
16855
- if (this.singleSelectOption) {
16856
- this.checkedNodeList = __spreadArray(__spreadArray([], __read(this.checkedNodeList)), __read(this.singleProcessList));
16857
- }
16858
- if (this.maxSelectItemCount && this.maxSelectItemCount > 0) {
16859
- var removeList = this.checkedNodeList.slice(0, this.maxSelectItemCount * -1);
16860
- if (removeList.length) {
16861
- removeList.forEach(function (item) {
16862
- _this.removeCheckedNodeList({
16863
- id: item.id,
16864
- name: item.itemName,
16865
- parentId: item.parentId,
16866
- level: 0,
16867
- expandable: true,
16868
- hasChild: true,
16869
- disabled: false
16870
- });
16871
- });
16872
- }
16873
- this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
16874
- }
16875
17183
  }
17184
+ return listResult;
16876
17185
  };
16877
17186
  SelectIncludeChildrenPopUpComponent.prototype.onCloseClick = function () {
16878
17187
  this.selectedFolder = null;
@@ -16880,13 +17189,8 @@
16880
17189
  };
16881
17190
  ;
16882
17191
  SelectIncludeChildrenPopUpComponent.prototype.onAddClick = function () {
16883
- // if (this.treeConfig.showCheckBox) {
16884
17192
  this.selectedFolder = null;
16885
17193
  this.dialogRef.close(this.checkedNodeList);
16886
- // }
16887
- // else {
16888
- // this.dialogRef.close(this.SelectOption);
16889
- // }
16890
17194
  };
16891
17195
  SelectIncludeChildrenPopUpComponent.prototype.getOffsetHeight = function (element, includeMargin) {
16892
17196
  var elmHeight = 0, elmMargin = 0;
@@ -16898,100 +17202,14 @@
16898
17202
  return (elmHeight + elmMargin);
16899
17203
  };
16900
17204
  SelectIncludeChildrenPopUpComponent.prototype.getItemChipName = function (item) {
16901
- return (item.parentName) ? item.parentName + "/" + item.itemName : item.itemName;
17205
+ return "" + item.itemName;
17206
+ };
17207
+ SelectIncludeChildrenPopUpComponent.prototype.getItemSelectedChildrenRatio = function (item) {
17208
+ return item.noSelectedChildren + "/" + item.noChildren;
16902
17209
  };
16903
17210
  SelectIncludeChildrenPopUpComponent.prototype.isEllipsisActive = function (e) {
16904
17211
  return e ? (e.clientWidth < e.scrollWidth) : false;
16905
17212
  };
16906
- // getNodeIcon(item: SelectOption) {
16907
- // switch (item.itemType) {
16908
- // case DataType.folder: {
16909
- // switch (item.levelType) {
16910
- // case DocumentNodeType.DepartmentFolder:
16911
- // return 'department_folder_outlined';
16912
- // case DocumentNodeType.RegionalFolder:
16913
- // return 'regional_folder_outlined';
16914
- // case DocumentNodeType.TopFolder:
16915
- // return 'enterprise_folder_outlined';
16916
- // case DocumentNodeType.Folder:
16917
- // return 'local_folder_outlined';
16918
- // default:
16919
- // return 'folder_outlined';
16920
- // }
16921
- // }
16922
- // case DataType.document: {
16923
- // switch (item.levelType) {
16924
- // case DocumentNodeType.DepartmentFolder:
16925
- // return 'document_department';
16926
- // case DocumentNodeType.RegionalFolder:
16927
- // return 'document_regional';
16928
- // case DocumentNodeType.TopFolder:
16929
- // return 'document_enterprise';
16930
- // case DocumentNodeType.Folder:
16931
- // return 'document_local';
16932
- // default:
16933
- // return 'document';
16934
- // }
16935
- // }
16936
- // case DataType.area:
16937
- // return 'process_area_outlined';
16938
- // case DataType.process:
16939
- // return 'process';
16940
- // case DataType.deviation:
16941
- // return 'deviation';
16942
- // case DataType.checklist:
16943
- // return 'checklist';
16944
- // case DataType.risk:
16945
- // return 'risk';
16946
- // default:
16947
- // return 'folder_outlined';
16948
- // }
16949
- // }
16950
- // getSearchOrder() {
16951
- // let searchTypes = Object.keys(this.dataType)
16952
- // .map(key => ({ value: this.dataType[key], key: key }));
16953
- // searchTypes = searchTypes.slice(searchTypes.length / 2);
16954
- // return searchTypes;
16955
- // }
16956
- // getTitle(type: number) {
16957
- // switch (type) {
16958
- // case DataType.process:
16959
- // return this.LANG.PROCESSES;
16960
- // case DataType.area:
16961
- // return this.LANG.PROCESS_AREA;
16962
- // case DataType.document:
16963
- // return this.LANG.DOCUMENTS;
16964
- // case DataType.folder:
16965
- // return this.LANG.FOLDER;
16966
- // case DataType.deviation:
16967
- // return this.LANG.DEVIATION;
16968
- // case DataType.deviationType:
16969
- // return this.LANG.DEVIATION_TYPE;
16970
- // case DataType.checklist:
16971
- // return this.LANG.CHECKLIST;
16972
- // case DataType.checklistCategory:
16973
- // return this.LANG.CHECKLIST_CATEGORY;
16974
- // case DataType.risk:
16975
- // return this.LANG.ASSESSMENT;
16976
- // case DataType.riskFolder:
16977
- // return this.LANG.FOLDER;
16978
- // }
16979
- // }
16980
- // getParentName(item: SelectOption) {
16981
- // if (item.itemType === this.dataType.checklist || item.itemType === this.dataType.deviation) {
16982
- // return item.parentName;
16983
- // }
16984
- // return null;
16985
- // }
16986
- // getItemId(item: SelectOption) {
16987
- // if (item.itemType === this.dataType.process) {
16988
- // return `${this.LANG.PROCESS_ID}: ${item.itemNumberId}; ${item.statusName}`;
16989
- // }
16990
- // else if (item.itemType === this.dataType.document) {
16991
- // return `${this.LANG.DOCUMENT_ID}: ${item.itemNumberId}; ${item.statusName}`;
16992
- // }
16993
- // return null;
16994
- // }
16995
17213
  SelectIncludeChildrenPopUpComponent.prototype.toggleSelectItem = function (node) {
16996
17214
  var SelectOption = this.checkedNodeList.find(function (x) { return (x.id.toLowerCase() === node.id.toLowerCase() && x.parentId.toLowerCase() === node.parentId.toLowerCase()); });
16997
17215
  if (SelectOption) {
@@ -17030,71 +17248,256 @@
17030
17248
  this.onExpandFolder.emit(item);
17031
17249
  // }
17032
17250
  };
17033
- // canShowSearchOption(moduleId: number) {
17034
- // if (this.canOnlySelectItem &&
17035
- // (moduleId === DataType.checklistCategory
17036
- // || moduleId === DataType.riskFolder
17037
- // || moduleId === DataType.deviationType
17038
- // || (moduleId === DataType.area && this.treeConfig && !this.treeConfig.singleSelectOption)
17039
- // || (moduleId === DataType.folder && this.treeConfig2 && !this.treeConfig2.singleSelectOption)
17040
- // )) {
17041
- // return false;
17042
- // }
17043
- // return this.getModuleFilteredOptions(moduleId).length > 0;
17044
- // }
17045
17251
  SelectIncludeChildrenPopUpComponent.prototype.selectNodeTreeEvent = function (node) {
17046
- var _a, _b;
17047
- var position = -1;
17048
- var parentName = '';
17049
- var itemNumberId = '';
17050
- position = !node.expandable ? this.treeData.findIndex(function (p) { return p.childId === node.id && p.rootId === node.parentId; }) :
17051
- this.treeData.findIndex(function (p) { return p.rootId === node.id; });
17052
- parentName = this.treeData[position].parentId ? this.treeData[position].subName : this.treeData[position].rootName;
17053
- itemNumberId = (_b = (_a = this.treeData[position]) === null || _a === void 0 ? void 0 : _a.displayId) === null || _b === void 0 ? void 0 : _b.toString();
17054
- this.checkedNodeList = [];
17055
- this.checkedNodeList.push({
17056
- id: node.id,
17057
- itemName: node.name,
17058
- parentId: node.parentId,
17059
- parentName: parentName,
17060
- itemNumberId: itemNumberId,
17061
- levelType: node.levelType
17062
- });
17063
- };
17064
- SelectIncludeChildrenPopUpComponent.prototype.getChildNodeSelectOne = function (listChildren) {
17065
- this.listChildrenSelectOne = [];
17066
- this.listChildrenSelectOne = listChildren;
17252
+ var position = this.selectedOptions.findIndex(function (x) { return x.id === node.id && x.parentId === node.parentId; });
17253
+ if (position > -1) {
17254
+ if (this.includeChildren) {
17255
+ if (node.expandable) {
17256
+ this.removeIncludeChildren(node);
17257
+ }
17258
+ else {
17259
+ var itemIndex = this.selectedOptions.findIndex(function (item) { return node.id === item.id && node.parentId === item.parentId; });
17260
+ if (itemIndex >= 0) {
17261
+ this.selectedOptions.splice(itemIndex, 1);
17262
+ }
17263
+ }
17264
+ this.checkedNodeList = this.checkedNodeList.filter(function (x) { return x.id !== node.id || x.parentId !== node.parentId; });
17265
+ this.refactorSelectList(node);
17266
+ }
17267
+ else {
17268
+ var itemIndex = this.selectedOptions.findIndex(function (item) { return node.id === item.id && node.parentId === item.parentId; });
17269
+ if (itemIndex >= 0) {
17270
+ this.selectedOptions.splice(itemIndex, 1);
17271
+ }
17272
+ this.checkedNodeList = this.checkedNodeList.filter(function (x) { return x.id !== node.id || x.parentId !== node.parentId; });
17273
+ }
17274
+ }
17275
+ else {
17276
+ if (this.includeChildren) {
17277
+ if (node.expandable) {
17278
+ this.selectIncludeChildren(node);
17279
+ }
17280
+ else {
17281
+ this.selectedOptions.push({
17282
+ id: node.id,
17283
+ itemName: node.name,
17284
+ itemNumberId: node.id,
17285
+ parentId: node.parentId,
17286
+ type: exports.SelectOptionTypes.Children
17287
+ });
17288
+ }
17289
+ this.refactorSelectList(node);
17290
+ }
17291
+ else {
17292
+ this.selectedOptions.push({
17293
+ id: node.id,
17294
+ itemName: node.name,
17295
+ itemNumberId: node.id,
17296
+ parentId: node.parentId,
17297
+ type: exports.SelectOptionTypes.SelectOne
17298
+ });
17299
+ this.checkedNodeList.push({
17300
+ id: node.id,
17301
+ itemName: node.name,
17302
+ type: exports.SelectOptionTypes.SelectOne,
17303
+ parentId: node.parentId,
17304
+ children: [],
17305
+ noSelectedChildren: 0,
17306
+ noChildren: 0,
17307
+ });
17308
+ }
17309
+ }
17310
+ this.selectedData = this.mapSelectOptionToTreeNode(this.selectedOptions);
17067
17311
  };
17068
17312
  SelectIncludeChildrenPopUpComponent.prototype.setValue = function (e) {
17313
+ var _this = this;
17069
17314
  this.includeChildren = !!e.checked;
17315
+ if (!this.includeChildren) {
17316
+ this.checkedNodeList.forEach(function (node) {
17317
+ _this.disableSelectedNode(node);
17318
+ });
17319
+ }
17320
+ else {
17321
+ this.disabledList = this.orginalDisableList;
17322
+ }
17070
17323
  };
17071
- return SelectIncludeChildrenPopUpComponent;
17072
- }());
17073
- SelectIncludeChildrenPopUpComponent.decorators = [
17074
- { type: i0.Component, args: [{
17075
- selector: 'qms-select-include-children-popup',
17076
- 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>{{ headerName | uppercase }}</span>\r\n </div>\r\n </div>\r\n \r\n <div\r\n id=\"qmslib_related_popup_search\"\r\n class=\"input__field\"\r\n (click)=\"showSearchResult()\"\r\n >\r\n <input\r\n #name\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n #autoCompleteInputSearch\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 [displayWith]=\"displayRelated\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n class=\"related-viewport\"\r\n >\r\n <ng-container *ngFor=\"let type of searchOrder\">\r\n <div\r\n class=\"search__module-result\"\r\n *ngIf=\"filteredOptions\"\r\n >\r\n <span class=\"search__module-title\">Hello</span>\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions()\"\r\n [value]=\"option\"\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\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\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 col-12\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\">\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree\r\n [treeData]=\"treeData\"\r\n [treeConfig]=\"treeConfig\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n ></qms-tree>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n \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)}}</span>\r\n <mat-icon\r\n *ngIf=\"!treeConfig?.selectOne\"\r\n (click)=\"removeCheckedNodeList(item)\"\r\n >cancel</mat-icon\r\n >\r\n </button>\r\n </div>\r\n <div class=\"select__toggle-include\">\r\n <mat-slide-toggle\r\n [checked]=\"includeChildren\"\r\n (change)=\"setValue($event)\"\r\n color=\"default\"\r\n qms-group-options>\r\n <span class=\"text-label\">Select label</span>\r\n </mat-slide-toggle>\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 ",
17077
- encapsulation: i0.ViewEncapsulation.None,
17078
- 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 .select__toggle-include{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:320px}.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}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:10.25rem}"]
17079
- },] }
17080
- ];
17081
- SelectIncludeChildrenPopUpComponent.ctorParameters = function () { return [
17082
- { type: i0.ChangeDetectorRef },
17083
- { type: TranslateLibraryService },
17084
- { type: dialog.MatDialogRef },
17085
- { type: QMSSelectGlobalService },
17086
- { type: icon.MatIconRegistry },
17087
- { type: platformBrowser.DomSanitizer },
17088
- { type: QMSIconRegistryService },
17089
- { type: i0.ElementRef },
17090
- { type: SelectPopupData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
17091
- ]; };
17092
- SelectIncludeChildrenPopUpComponent.propDecorators = {
17093
- dataTrees: [{ type: i0.ViewChildren, args: [TreeComponent, {},] }],
17094
- autoComplete: [{ type: i0.ViewChild, args: ['autoCompleteInputSearch', { read: autocomplete.MatAutocompleteTrigger, static: true },] }],
17095
- onMessage: [{ type: i0.HostListener, args: ['window:message', ['$event'],] }]
17096
- };
17097
-
17324
+ SelectIncludeChildrenPopUpComponent.prototype.mapSelectOptionToTreeNode = function (list) {
17325
+ return list.map(function (x) {
17326
+ return {
17327
+ id: x.id,
17328
+ name: x.itemName,
17329
+ level: 0,
17330
+ expandable: true,
17331
+ hasChild: true,
17332
+ parentId: x.parentId,
17333
+ disabled: false,
17334
+ };
17335
+ });
17336
+ };
17337
+ SelectIncludeChildrenPopUpComponent.prototype.refactorSelectList = function (node) {
17338
+ var _this = this;
17339
+ var parent;
17340
+ var parentList = [];
17341
+ parent = this.treeData.find(function (x) { return x.rootId === node.parentId; });
17342
+ if (parent) {
17343
+ parentList.push({
17344
+ id: parent.rootId,
17345
+ itemName: parent.rootName,
17346
+ parentId: parent.parentId,
17347
+ type: exports.SelectOptionTypes.IncludeChildren
17348
+ });
17349
+ parentList = this.getParentLineOfNode(parentList, parent);
17350
+ }
17351
+ if (parentList.length > 0) {
17352
+ var selectedParentList = parentList.filter(function (x) { return _this.selectedOptions
17353
+ .findIndex(function (selectedNode) { return x.id === selectedNode.id && x.parentId === selectedNode.parentId; }) >= 0; });
17354
+ if (selectedParentList.length > 0) {
17355
+ var highestSelectedNode = selectedParentList[selectedParentList.length - 1];
17356
+ this.combineNodes(highestSelectedNode);
17357
+ }
17358
+ else {
17359
+ this.combineNodes({
17360
+ id: node.id,
17361
+ itemName: node.name,
17362
+ type: exports.SelectOptionTypes.IncludeChildren,
17363
+ parentId: node.parentId
17364
+ });
17365
+ }
17366
+ }
17367
+ else {
17368
+ this.combineNodes({
17369
+ id: node.id,
17370
+ itemName: node.name,
17371
+ type: exports.SelectOptionTypes.IncludeChildren,
17372
+ parentId: node.parentId
17373
+ });
17374
+ }
17375
+ };
17376
+ SelectIncludeChildrenPopUpComponent.prototype.combineNodes = function (root) {
17377
+ var _this = this;
17378
+ var children = [];
17379
+ children = this.getAllChildrenNodeRecursive(children, {
17380
+ id: root.id,
17381
+ name: root.itemName,
17382
+ parentId: root.parentId,
17383
+ level: 0,
17384
+ expandable: true,
17385
+ hasChild: true,
17386
+ disabled: false
17387
+ });
17388
+ var selectedNodeIndex = this.checkedNodeList.findIndex(function (x) { return x.id === root.id && x.parentId === root.parentId; });
17389
+ var nodeList = [];
17390
+ children.forEach(function (child) {
17391
+ var index = _this.checkedNodeList.findIndex(function (node) { return node.id === child.id && node.parentId === child.parentId; });
17392
+ if (index >= 0) {
17393
+ _this.checkedNodeList.splice(index, 1);
17394
+ }
17395
+ var selectIndex = _this.selectedOptions.findIndex(function (node) { return node.id === child.id && node.parentId === child.parentId; });
17396
+ if (selectIndex >= 0) {
17397
+ nodeList.push(child);
17398
+ }
17399
+ });
17400
+ if (nodeList.length > 0 || children.length === 0) {
17401
+ if (selectedNodeIndex < 0) {
17402
+ this.checkedNodeList.push({
17403
+ id: root.id,
17404
+ itemName: root.itemName,
17405
+ type: exports.SelectOptionTypes.IncludeChildren,
17406
+ parentId: root.parentId,
17407
+ children: [],
17408
+ noSelectedChildren: 0,
17409
+ noChildren: 0
17410
+ });
17411
+ selectedNodeIndex = this.checkedNodeList.length - 1;
17412
+ }
17413
+ this.checkedNodeList[selectedNodeIndex].children = nodeList;
17414
+ this.checkedNodeList[selectedNodeIndex].noChildren = children.length;
17415
+ this.checkedNodeList[selectedNodeIndex].noSelectedChildren = nodeList.length;
17416
+ this.checkedNodeList[selectedNodeIndex].type = children.length === 0 ? exports.SelectOptionTypes.SelectOne : exports.SelectOptionTypes.IncludeChildren;
17417
+ }
17418
+ };
17419
+ SelectIncludeChildrenPopUpComponent.prototype.getParentLineOfNode = function (listParent, node) {
17420
+ var parent;
17421
+ parent = this.treeData.find(function (x) { return x.rootId === node.parentId; });
17422
+ if (parent) {
17423
+ listParent = __spreadArray(__spreadArray([], __read(listParent)), [{
17424
+ id: parent.rootId,
17425
+ itemName: parent.rootName,
17426
+ parentId: parent.parentId,
17427
+ type: exports.SelectOptionTypes.IncludeChildren
17428
+ }]);
17429
+ this.getParentLineOfNode(listParent, parent);
17430
+ }
17431
+ return listParent;
17432
+ };
17433
+ SelectIncludeChildrenPopUpComponent.prototype.disableSelectedNode = function (node) {
17434
+ var _this = this;
17435
+ if (node.type === exports.SelectOptionTypes.IncludeChildren) {
17436
+ var children = [];
17437
+ children = this.getAllChildrenNodeRecursive(children, {
17438
+ id: node.id,
17439
+ name: node.itemName,
17440
+ parentId: node.parentId,
17441
+ level: 0,
17442
+ expandable: true,
17443
+ hasChild: true,
17444
+ disabled: false
17445
+ });
17446
+ var disableNodes_1 = [];
17447
+ var index = this.disabledList.findIndex(function (x) { return x.id === node.id && x.parentId === node.parentId; });
17448
+ if (index < 0) {
17449
+ disableNodes_1.push(node);
17450
+ }
17451
+ children.forEach(function (child) {
17452
+ var index = _this.disabledList.findIndex(function (x) { return x.id === child.id && x.parentId === child.parentId; });
17453
+ if (index < 0) {
17454
+ disableNodes_1.push(child);
17455
+ }
17456
+ });
17457
+ this.disabledList = __spreadArray(__spreadArray([], __read(this.disabledList)), __read(disableNodes_1));
17458
+ }
17459
+ };
17460
+ SelectIncludeChildrenPopUpComponent.prototype.enableSelectedNode = function (node) {
17461
+ var children = [];
17462
+ children = this.getAllChildrenNodeRecursive(children, {
17463
+ id: node.id,
17464
+ name: node.itemName,
17465
+ parentId: node.parentId,
17466
+ level: 0,
17467
+ expandable: true,
17468
+ hasChild: true,
17469
+ disabled: false
17470
+ });
17471
+ this.disabledList = this.disabledList.filter(function (x) { return children.filter(function (child) { return (x.id === child.id && x.parentId === child.parentId); }).length === 0; });
17472
+ this.disabledList = this.disabledList.filter(function (x) { return !(x.id === node.id && x.parentId === node.parentId); });
17473
+ };
17474
+ return SelectIncludeChildrenPopUpComponent;
17475
+ }());
17476
+ SelectIncludeChildrenPopUpComponent.decorators = [
17477
+ { type: i0.Component, args: [{
17478
+ selector: 'qms-select-include-children-popup',
17479
+ 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>{{ headerName | uppercase }}</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\n id=\"qmslib_related_popup_search\"\r\n class=\"input__field\"\r\n (click)=\"showSearchResult()\"\r\n >\r\n <input\r\n #name\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n #autoCompleteInputSearch\r\n />\r\n <mat-icon>search</mat-icon>\r\n </div>\r\n <div class=\"select__toggle-include\">\r\n <mat-slide-toggle\r\n [checked]=\"includeChildren\"\r\n (change)=\"setValue($event)\"\r\n color=\"default\"\r\n qms-group-options\r\n >\r\n <span class=\"text-label\">Select label</span>\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"line__divider\"></div>\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"displayRelated\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n class=\"related-viewport\"\r\n >\r\n <div class=\"search__module-result\" *ngIf=\"filteredOptions\">\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of filteredOptions\"\r\n [value]=\"option\"\r\n (click)=\"selectSearchOption(option)\"\r\n >\r\n <qms-list-item type=\"image-square\">\r\n <mat-icon\r\n leading-icon\r\n *ngIf=\"getItemIconType(option) === itemIconType.name\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n type=\"image-square\"\r\n >\r\n {{ option.itemIcon }}\r\n </mat-icon>\r\n\r\n <mat-icon\r\n leading-icon\r\n *ngIf=\"getItemIconType(option) === itemIconType.svg\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n type=\"image-square\"\r\n [svgIcon]=\"option.itemIconSvg\"\r\n >\r\n </mat-icon>\r\n\r\n <img\r\n leading-icon\r\n *ngIf=\"getItemIconType(option) === itemIconType.path\"\r\n class=\"mat-icon\"\r\n [src]=\"option.itemIconPath\"\r\n type=\"image-square\"\r\n />\r\n\r\n <img\r\n leading-icon\r\n *ngIf=\"getItemIconType(option) === itemIconType.base64\"\r\n class=\"mat-icon image-base64\"\r\n [src]=\"getImagePath(option)\"\r\n type=\"image-square\"\r\n />\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 </qms-list-item>\r\n </mat-option>\r\n </div>\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 col-12\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\"\r\n >\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree\r\n [treeData]=\"treeData\"\r\n [treeConfig]=\"treeConfig\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n ></qms-tree>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\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 class=\"select__include-children__count\"\r\n *ngIf=\"item.noSelectedChildren > 0\"\r\n >\r\n {{ getItemSelectedChildrenRatio(item) }}\r\n </span>\r\n </span>\r\n\r\n <mat-icon (click)=\"removeCheckedNodeList(item)\">cancel</mat-icon>\r\n </button>\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</div>\r\n",
17480
+ encapsulation: i0.ViewEncapsulation.None,
17481
+ 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 .select__toggle-include{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:320px}.qmslib__related__popup__container .panel__item .related__item__content span.related__item__content_name .select__include-children__count{font-size:.75rem;color:rgba(0,0,0,.38)}.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}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:10.25rem}"]
17482
+ },] }
17483
+ ];
17484
+ SelectIncludeChildrenPopUpComponent.ctorParameters = function () { return [
17485
+ { type: i0.ChangeDetectorRef },
17486
+ { type: TranslateLibraryService },
17487
+ { type: dialog.MatDialogRef },
17488
+ { type: QMSSelectGlobalService },
17489
+ { type: icon.MatIconRegistry },
17490
+ { type: platformBrowser.DomSanitizer },
17491
+ { type: QMSIconRegistryService },
17492
+ { type: i0.ElementRef },
17493
+ { type: SelectPopupData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
17494
+ ]; };
17495
+ SelectIncludeChildrenPopUpComponent.propDecorators = {
17496
+ dataTrees: [{ type: i0.ViewChildren, args: [TreeComponent, {},] }],
17497
+ autoComplete: [{ type: i0.ViewChild, args: ['autoCompleteInputSearch', { read: autocomplete.MatAutocompleteTrigger, static: true },] }],
17498
+ onMessage: [{ type: i0.HostListener, args: ['window:message', ['$event'],] }]
17499
+ };
17500
+
17098
17501
  var QMSSelectIncludeChildrenModule = /** @class */ (function () {
17099
17502
  function QMSSelectIncludeChildrenModule() {
17100
17503
  }
@@ -17133,6 +17536,12 @@
17133
17536
  },] }
17134
17537
  ];
17135
17538
 
17539
+ var SelectedOption = /** @class */ (function () {
17540
+ function SelectedOption() {
17541
+ }
17542
+ return SelectedOption;
17543
+ }());
17544
+
17136
17545
  var BadgesType;
17137
17546
  (function (BadgesType) {
17138
17547
  BadgesType["circle"] = "1";
@@ -17197,6 +17606,445 @@
17197
17606
  },] }
17198
17607
  ];
17199
17608
 
17609
+ var DataType;
17610
+ (function (DataType) {
17611
+ DataType[DataType["process"] = 2] = "process";
17612
+ DataType[DataType["document"] = 1] = "document";
17613
+ DataType[DataType["area"] = 3] = "area";
17614
+ DataType[DataType["folder"] = 4] = "folder";
17615
+ DataType[DataType["deviation"] = 5] = "deviation";
17616
+ DataType[DataType["checklist"] = 6] = "checklist";
17617
+ DataType[DataType["risk"] = 7] = "risk";
17618
+ DataType[DataType["deviationType"] = 8] = "deviationType";
17619
+ DataType[DataType["checklistCategory"] = 9] = "checklistCategory";
17620
+ DataType[DataType["riskFolder"] = 10] = "riskFolder";
17621
+ })(DataType || (DataType = {}));
17622
+
17623
+ var DocumentNodeType;
17624
+ (function (DocumentNodeType) {
17625
+ DocumentNodeType[DocumentNodeType["Document"] = 1] = "Document";
17626
+ DocumentNodeType[DocumentNodeType["LinkDocument"] = 2] = "LinkDocument";
17627
+ DocumentNodeType[DocumentNodeType["FileDocument"] = 3] = "FileDocument";
17628
+ DocumentNodeType[DocumentNodeType["ShortcutDocument"] = 4] = "ShortcutDocument";
17629
+ DocumentNodeType[DocumentNodeType["Folder"] = 5] = "Folder";
17630
+ DocumentNodeType[DocumentNodeType["TopFolder"] = 6] = "TopFolder";
17631
+ DocumentNodeType[DocumentNodeType["DepartmentFolder"] = 7] = "DepartmentFolder";
17632
+ DocumentNodeType[DocumentNodeType["RegionalFolder"] = 8] = "RegionalFolder";
17633
+ })(DocumentNodeType || (DocumentNodeType = {}));
17634
+
17635
+ var ModuleType;
17636
+ (function (ModuleType) {
17637
+ ModuleType[ModuleType["documentProcess"] = 1] = "documentProcess";
17638
+ ModuleType[ModuleType["deviation"] = 2] = "deviation";
17639
+ ModuleType[ModuleType["checklist"] = 3] = "checklist";
17640
+ ModuleType[ModuleType["risk"] = 4] = "risk";
17641
+ })(ModuleType || (ModuleType = {}));
17642
+
17643
+ var ShowHideSearchResultConst = /** @class */ (function () {
17644
+ function ShowHideSearchResultConst() {
17645
+ }
17646
+ return ShowHideSearchResultConst;
17647
+ }());
17648
+ ShowHideSearchResultConst.IS_DISPLAY_SEARCH_RESULT = 'IS_DISPLAY_SEARCH_RESULT';
17649
+ ShowHideSearchResultConst.HIDE_SEARCH_RESULT = 'HIDE_SEARCH_RESULT';
17650
+ ShowHideSearchResultConst.SHOW_SEARCH_RESULT = 'SHOW_SEARCH_RESULT';
17651
+
17652
+ var SelectOnePopupData = /** @class */ (function () {
17653
+ function SelectOnePopupData() {
17654
+ this.moduleId = 0;
17655
+ this.moduleName = '';
17656
+ this.treeData = [];
17657
+ this.selectedNode = [];
17658
+ this.disabledList = [];
17659
+ this.expandToChildNode = [];
17660
+ }
17661
+ return SelectOnePopupData;
17662
+ }());
17663
+
17664
+ var QMSSelectOneGlobalService = /** @class */ (function () {
17665
+ function QMSSelectOneGlobalService() {
17666
+ this.searchRelated = new rxjs.BehaviorSubject([]);
17667
+ }
17668
+ QMSSelectOneGlobalService.prototype.setSearchRelated = function (result) {
17669
+ this.searchRelated.next(result);
17670
+ };
17671
+ return QMSSelectOneGlobalService;
17672
+ }());
17673
+ QMSSelectOneGlobalService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function QMSSelectOneGlobalService_Factory() { return new QMSSelectOneGlobalService(); }, token: QMSSelectOneGlobalService, providedIn: "root" });
17674
+ QMSSelectOneGlobalService.decorators = [
17675
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
17676
+ ];
17677
+ QMSSelectOneGlobalService.ctorParameters = function () { return []; };
17678
+
17679
+ var SelectOneDialog = /** @class */ (function () {
17680
+ function SelectOneDialog(cdRef, translate, dialogRef, globalService, iconRegistry, sanitizer, appIconService, data) {
17681
+ this.cdRef = cdRef;
17682
+ this.translate = translate;
17683
+ this.dialogRef = dialogRef;
17684
+ this.globalService = globalService;
17685
+ this.iconRegistry = iconRegistry;
17686
+ this.sanitizer = sanitizer;
17687
+ this.appIconService = appIconService;
17688
+ this.data = data;
17689
+ this.ngUnsubscribe = new rxjs.Subject();
17690
+ this.moduleId = 0;
17691
+ this.moduleName = '';
17692
+ this.treeData = [];
17693
+ this.checkedNodeList = [];
17694
+ this.selectedNode = [];
17695
+ this.selectedData = [];
17696
+ this.module = ModuleType;
17697
+ this.dataType = DataType;
17698
+ this.itemType = 0;
17699
+ this.selectedRiskData = [];
17700
+ this.disabledList = [];
17701
+ this.expandToChildNode = [];
17702
+ this.isCommonExpanded = true;
17703
+ this.myControl = new forms.FormControl();
17704
+ this.filteredOptions = [];
17705
+ this.isInputValue = false;
17706
+ this.selectedFolder = null;
17707
+ this.listChildrenSelectOne = [];
17708
+ this.onSearch = new i0.EventEmitter();
17709
+ this.onExpandFolder = new i0.EventEmitter();
17710
+ this.moduleId = data.moduleId;
17711
+ this.moduleName = data.moduleName;
17712
+ this.treeData = data.treeData;
17713
+ this.treeConfig = data.treeConfig;
17714
+ this.selectedRiskData = (data === null || data === void 0 ? void 0 : data.selectedNode) || [];
17715
+ this.disabledList = data.disabledList || [];
17716
+ this.expandToChildNode = data.expandToChildNode;
17717
+ appIconService.registerProcessIcon(iconRegistry, sanitizer);
17718
+ appIconService.registerProcessAreaIcon(iconRegistry, sanitizer);
17719
+ appIconService.registerDocumentIcon(iconRegistry, sanitizer);
17720
+ appIconService.registerFolderIcon(iconRegistry, sanitizer);
17721
+ appIconService.registerDeviationIcon(iconRegistry, sanitizer);
17722
+ appIconService.registerChecklistIcon(iconRegistry, sanitizer);
17723
+ appIconService.registerRiskIcon(iconRegistry, sanitizer);
17724
+ }
17725
+ SelectOneDialog.prototype.ngOnDestroy = function () {
17726
+ this.ngUnsubscribe.next();
17727
+ this.ngUnsubscribe.complete();
17728
+ this.globalService.setSearchRelated([]);
17729
+ this.selectedFolder = null;
17730
+ };
17731
+ SelectOneDialog.prototype.onMessage = function (event) {
17732
+ if (event.data === ShowHideSearchResultConst.HIDE_SEARCH_RESULT) {
17733
+ this.autoComplete.closePanel();
17734
+ }
17735
+ };
17736
+ SelectOneDialog.prototype.ngOnInit = function () {
17737
+ var _this = this;
17738
+ this.translate.getLanguageSubject$.pipe().subscribe(function (res) {
17739
+ if (res) {
17740
+ _this.LANG = _this.translate.getObjectLang(res);
17741
+ }
17742
+ });
17743
+ this.globalService.searchRelated.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
17744
+ if (res && res.length) {
17745
+ _this.filteredOptions = res;
17746
+ }
17747
+ });
17748
+ this.myControl.valueChanges.pipe(operators.debounceTime(1000)).subscribe(function (val) {
17749
+ _this.isInputValue = true;
17750
+ _this.onSearchRelated(val);
17751
+ });
17752
+ this.itemType = this.getDataTypeId(this.moduleId);
17753
+ };
17754
+ SelectOneDialog.prototype.ngAfterViewChecked = function () {
17755
+ this.cdRef.detectChanges();
17756
+ if (this.filteredOptions && this.filteredOptions.length) {
17757
+ this.autoComplete.openPanel();
17758
+ this.setResultHeight();
17759
+ }
17760
+ else if (this.autoComplete) {
17761
+ this.autoComplete.closePanel();
17762
+ }
17763
+ };
17764
+ SelectOneDialog.prototype.getDataTypeId = function (moduleId) {
17765
+ var itemType;
17766
+ switch (moduleId) {
17767
+ case ModuleType.documentProcess:
17768
+ itemType = this.dataType.process;
17769
+ break;
17770
+ case ModuleType.deviation:
17771
+ itemType = this.dataType.deviation;
17772
+ break;
17773
+ case ModuleType.checklist:
17774
+ itemType = this.dataType.checklist;
17775
+ break;
17776
+ case ModuleType.risk:
17777
+ itemType = this.dataType.risk;
17778
+ break;
17779
+ default:
17780
+ itemType = this.dataType.document;
17781
+ break;
17782
+ }
17783
+ return itemType;
17784
+ };
17785
+ SelectOneDialog.prototype.setResultHeight = function (arr) {
17786
+ var maxHeight = 484;
17787
+ var popup_content = document.getElementsByClassName('qmslib_related_popup_content')[0];
17788
+ var line__divider = document.getElementsByClassName('line__divider')[0];
17789
+ if (popup_content && line__divider) {
17790
+ maxHeight = this.getOffsetHeight(popup_content, true) + this.getOffsetHeight(line__divider, true) * 2;
17791
+ }
17792
+ var contentResult = document.getElementsByClassName('cdk-virtual-scroll-content-wrapper')[0];
17793
+ var viewreports = document.getElementsByClassName('related-viewport')[0];
17794
+ if (viewreports) {
17795
+ if (contentResult.offsetHeight <= maxHeight) {
17796
+ viewreports.style.height = contentResult.offsetHeight + "px";
17797
+ }
17798
+ else {
17799
+ viewreports.style.height = maxHeight + "px";
17800
+ }
17801
+ }
17802
+ };
17803
+ SelectOneDialog.prototype.onSearchRelated = function (_val) {
17804
+ this.filteredOptions = [];
17805
+ if (typeof (_val) === 'object') {
17806
+ this.myControl.setValue('');
17807
+ }
17808
+ else if (typeof (_val) === 'string') {
17809
+ if (!!_val) {
17810
+ this.onSearch.emit(_val);
17811
+ }
17812
+ }
17813
+ };
17814
+ SelectOneDialog.prototype.getModuleFilteredOptions = function () {
17815
+ if (this.listChildrenSelectOne.length) {
17816
+ for (var index = 0; index < this.listChildrenSelectOne.length; index++) {
17817
+ var firstEl = this.listChildrenSelectOne[index];
17818
+ for (var j = 0; j < this.filteredOptions.length; j++) {
17819
+ var secondEl = this.filteredOptions[j];
17820
+ if (firstEl.id === secondEl.id) {
17821
+ this.filteredOptions.splice(j, 1);
17822
+ }
17823
+ }
17824
+ }
17825
+ }
17826
+ return this.filteredOptions;
17827
+ };
17828
+ SelectOneDialog.prototype.showSearchResult = function () {
17829
+ this.autoComplete.openPanel();
17830
+ };
17831
+ SelectOneDialog.prototype.displayRelated = function (related) {
17832
+ return related ? related.itemName : undefined;
17833
+ };
17834
+ SelectOneDialog.prototype.selectItemSearched = function (item) {
17835
+ var _a;
17836
+ if ((_a = this.treeConfig) === null || _a === void 0 ? void 0 : _a.selectOne) {
17837
+ this.disabledList = [];
17838
+ }
17839
+ // reset to root
17840
+ this.expandToChildNode = [''];
17841
+ this.checkedNodeList = [];
17842
+ var position = -1;
17843
+ var node;
17844
+ var typeId;
17845
+ position = this.treeData.findIndex(function (x) {
17846
+ return x.rootId === item.id;
17847
+ });
17848
+ typeId = item.itemType;
17849
+ if (position >= 0) {
17850
+ node = this.treeData[position];
17851
+ this.checkedNodeList.push({
17852
+ moduleId: this.moduleId,
17853
+ id: node.rootId,
17854
+ itemName: node.rootName || node.subName,
17855
+ itemType: typeId,
17856
+ itemNumberId: item.itemNumberId,
17857
+ levelType: item.levelType
17858
+ });
17859
+ }
17860
+ var treeNode = {
17861
+ id: node.rootId,
17862
+ name: !!node.rootId ? node.subName : node.rootName,
17863
+ children: [],
17864
+ parentId: node.parentId
17865
+ };
17866
+ this.dataTrees.toArray()[0].todoFolderSelection([treeNode]);
17867
+ return;
17868
+ };
17869
+ SelectOneDialog.prototype.onCloseClick = function () {
17870
+ this.selectedFolder = null;
17871
+ this.dialogRef.close();
17872
+ };
17873
+ ;
17874
+ SelectOneDialog.prototype.onAddClick = function () {
17875
+ this.selectedFolder = null;
17876
+ this.dialogRef.close(this.checkedNodeList);
17877
+ };
17878
+ SelectOneDialog.prototype.getOffsetHeight = function (element, includeMargin) {
17879
+ var elmHeight = 0, elmMargin = 0;
17880
+ elmHeight = element.offsetHeight;
17881
+ if (includeMargin) {
17882
+ var style = window.getComputedStyle(element);
17883
+ elmMargin = parseFloat(style.marginTop.replace('px', '')) + parseFloat(style.marginBottom.replace('px', ''));
17884
+ }
17885
+ return (elmHeight + elmMargin);
17886
+ };
17887
+ SelectOneDialog.prototype.getItemChipName = function (item) {
17888
+ if (item.itemType === DataType.checklist || item.itemType === DataType.deviation) {
17889
+ return (item.parentName && item.itemName !== item.parentName) ? item.parentName + "/" + item.itemName : item.itemName;
17890
+ }
17891
+ return item.itemName;
17892
+ };
17893
+ SelectOneDialog.prototype.isEllipsisActive = function (e) {
17894
+ return e ? (e.clientWidth < e.scrollWidth) : false;
17895
+ };
17896
+ SelectOneDialog.prototype.getNodeIcon = function (item) {
17897
+ switch (item.itemType) {
17898
+ case DataType.folder: {
17899
+ switch (item.levelType) {
17900
+ case DocumentNodeType.DepartmentFolder:
17901
+ return 'department_folder_outlined';
17902
+ case DocumentNodeType.RegionalFolder:
17903
+ return 'regional_folder_outlined';
17904
+ case DocumentNodeType.TopFolder:
17905
+ return 'enterprise_folder_outlined';
17906
+ case DocumentNodeType.Folder:
17907
+ return 'local_folder_outlined';
17908
+ default:
17909
+ return 'folder_outlined';
17910
+ }
17911
+ }
17912
+ case DataType.document: {
17913
+ switch (item.levelType) {
17914
+ case DocumentNodeType.DepartmentFolder:
17915
+ return 'document_department';
17916
+ case DocumentNodeType.RegionalFolder:
17917
+ return 'document_regional';
17918
+ case DocumentNodeType.TopFolder:
17919
+ return 'document_enterprise';
17920
+ case DocumentNodeType.Folder:
17921
+ return 'document_local';
17922
+ default:
17923
+ return 'document';
17924
+ }
17925
+ }
17926
+ case DataType.area:
17927
+ return 'process_area_outlined';
17928
+ case DataType.process:
17929
+ return 'process';
17930
+ case DataType.deviation:
17931
+ return 'deviation';
17932
+ case DataType.checklist:
17933
+ return 'checklist';
17934
+ case DataType.risk:
17935
+ return 'risk';
17936
+ default:
17937
+ return 'folder_outlined';
17938
+ }
17939
+ };
17940
+ SelectOneDialog.prototype.getParentName = function (item) {
17941
+ if (item.itemType === this.dataType.checklist || item.itemType === this.dataType.deviation) {
17942
+ return item.parentName;
17943
+ }
17944
+ return null;
17945
+ };
17946
+ SelectOneDialog.prototype.getItemId = function (item) {
17947
+ if (item.itemType === this.dataType.process) {
17948
+ return this.LANG.PROCESS_ID + ": " + item.itemNumberId + "; " + item.statusName;
17949
+ }
17950
+ else if (item.itemType === this.dataType.document) {
17951
+ return this.LANG.DOCUMENT_ID + ": " + item.itemNumberId + "; " + item.statusName;
17952
+ }
17953
+ return null;
17954
+ };
17955
+ SelectOneDialog.prototype.selectNodeTreeEvent = function (node) {
17956
+ var _a, _b;
17957
+ var position = -1;
17958
+ var parentName = '';
17959
+ var itemNumberId = '';
17960
+ position = !node.expandable ? this.treeData.findIndex(function (p) { return p.childId === node.id && p.rootId === node.parentId; }) :
17961
+ this.treeData.findIndex(function (p) { return p.rootId === node.id; });
17962
+ parentName = this.treeData[position].parentId ? this.treeData[position].subName : this.treeData[position].rootName;
17963
+ itemNumberId = (_b = (_a = this.treeData[position]) === null || _a === void 0 ? void 0 : _a.displayId) === null || _b === void 0 ? void 0 : _b.toString();
17964
+ this.checkedNodeList = [];
17965
+ this.checkedNodeList.push({
17966
+ moduleId: this.moduleId,
17967
+ id: node.id,
17968
+ itemName: node.name,
17969
+ itemType: node.itemType,
17970
+ parentId: node.parentId,
17971
+ parentName: parentName,
17972
+ itemNumberId: itemNumberId,
17973
+ levelType: node.levelType
17974
+ });
17975
+ };
17976
+ SelectOneDialog.prototype.getChildNodeSelectOne = function (listChildren) {
17977
+ this.listChildrenSelectOne = [];
17978
+ this.listChildrenSelectOne = listChildren;
17979
+ };
17980
+ return SelectOneDialog;
17981
+ }());
17982
+ SelectOneDialog.decorators = [
17983
+ { type: i0.Component, args: [{
17984
+ selector: 'qms-select-one',
17985
+ 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 }}</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\n id=\"qmslib_related_popup_search\"\r\n class=\"input__field\"\r\n (click)=\"showSearchResult()\"\r\n >\r\n <input\r\n #name\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n #autoCompleteInputSearch\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 [displayWith]=\"displayRelated\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n class=\"related-viewport\"\r\n >\r\n <div class=\"search__module-result\" *ngIf=\"filteredOptions.length\">\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions()\"\r\n [value]=\"option\"\r\n (click)=\"selectItemSearched(option)\"\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\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\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 </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n\r\n <div class=\"row\">\r\n <div\r\n class=\"qms-scrollbar col-12 qmslib_related_popup_content\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\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 <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree\r\n [treeData]=\"treeData\"\r\n [treeConfig]=\"treeConfig\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"true\"\r\n [expandToChildNode]=\"expandToChildNode\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\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 </button>\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",
17986
+ encapsulation: i0.ViewEncapsulation.None,
17987
+ 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:320px}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:10.25rem}"]
17988
+ },] }
17989
+ ];
17990
+ SelectOneDialog.ctorParameters = function () { return [
17991
+ { type: i0.ChangeDetectorRef },
17992
+ { type: TranslateLibraryService },
17993
+ { type: dialog.MatDialogRef },
17994
+ { type: QMSSelectOneGlobalService },
17995
+ { type: icon.MatIconRegistry },
17996
+ { type: platformBrowser.DomSanitizer },
17997
+ { type: QMSIconRegistryService },
17998
+ { type: SelectOnePopupData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
17999
+ ]; };
18000
+ SelectOneDialog.propDecorators = {
18001
+ dataTrees: [{ type: i0.ViewChildren, args: [TreeComponent, {},] }],
18002
+ autoComplete: [{ type: i0.ViewChild, args: ['autoCompleteInputSearch', { read: autocomplete.MatAutocompleteTrigger, static: true },] }],
18003
+ onMessage: [{ type: i0.HostListener, args: ['window:message', ['$event'],] }]
18004
+ };
18005
+
18006
+ var QMSSelectOneModule = /** @class */ (function () {
18007
+ function QMSSelectOneModule() {
18008
+ }
18009
+ return QMSSelectOneModule;
18010
+ }());
18011
+ QMSSelectOneModule.decorators = [
18012
+ { type: i0.NgModule, args: [{
18013
+ declarations: [
18014
+ SelectOneDialog
18015
+ ],
18016
+ imports: [
18017
+ common.CommonModule,
18018
+ tree$1.MatTreeModule,
18019
+ icon.MatIconModule,
18020
+ button.MatButtonModule,
18021
+ checkbox.MatCheckboxModule,
18022
+ expansion.MatExpansionModule,
18023
+ autocomplete.MatAutocompleteModule,
18024
+ forms.ReactiveFormsModule,
18025
+ scrolling.ScrollingModule,
18026
+ card.MatCardModule,
18027
+ sidenav.MatSidenavModule,
18028
+ list.MatListModule,
18029
+ SharedMaterialModule,
18030
+ QMSListModule,
18031
+ QmsAngularModule,
18032
+ QMSBreadcrumbModule,
18033
+ QMSAppIconModule,
18034
+ QMSTreeModule
18035
+ ],
18036
+ exports: [
18037
+ SelectOneDialog
18038
+ ]
18039
+ },] }
18040
+ ];
18041
+
18042
+ var ISelectOneItem = /** @class */ (function () {
18043
+ function ISelectOneItem() {
18044
+ }
18045
+ return ISelectOneItem;
18046
+ }());
18047
+
17200
18048
  /*
17201
18049
  * Public API Surface of qms-angular
17202
18050
  */
@@ -17228,6 +18076,7 @@
17228
18076
  exports.ENTERPRISE_FOLDER_ICON = ENTERPRISE_FOLDER_ICON;
17229
18077
  exports.ENTERPRISE_FOLDER_OUTLINED_ICON = ENTERPRISE_FOLDER_OUTLINED_ICON;
17230
18078
  exports.FlowChartConst = FlowChartConst;
18079
+ exports.ISelectOneItem = ISelectOneItem;
17231
18080
  exports.IconModel = IconModel;
17232
18081
  exports.InformationCoverItem = InformationCoverItem;
17233
18082
  exports.KEYBOARD_DOWN_ICON = KEYBOARD_DOWN_ICON;
@@ -17329,6 +18178,8 @@
17329
18178
  exports.QMSSearchFieldDirective = QMSSearchFieldDirective;
17330
18179
  exports.QMSSelectGlobalService = QMSSelectGlobalService;
17331
18180
  exports.QMSSelectIncludeChildrenModule = QMSSelectIncludeChildrenModule;
18181
+ exports.QMSSelectOneGlobalService = QMSSelectOneGlobalService;
18182
+ exports.QMSSelectOneModule = QMSSelectOneModule;
17332
18183
  exports.QMSSnackbarConfig = QMSSnackbarConfig;
17333
18184
  exports.QMSSuffixDirective = QMSSuffixDirective;
17334
18185
  exports.QMSSuffixFieldDirective = QMSSuffixFieldDirective;
@@ -17387,8 +18238,13 @@
17387
18238
  exports.SelectConst = SelectConst;
17388
18239
  exports.SelectDialog = SelectDialog;
17389
18240
  exports.SelectIncludeChildrenPopUpComponent = SelectIncludeChildrenPopUpComponent;
18241
+ exports.SelectOneDialog = SelectOneDialog;
18242
+ exports.SelectOnePopupData = SelectOnePopupData;
18243
+ exports.SelectOption = SelectOption;
17390
18244
  exports.SelectPopupData = SelectPopupData;
18245
+ exports.SelectedOption = SelectedOption;
17391
18246
  exports.SharedModule = SharedModule;
18247
+ exports.ShowHideSearchResultConst = ShowHideSearchResultConst;
17392
18248
  exports.SideNav = SideNav;
17393
18249
  exports.SideNavItem = SideNavItem;
17394
18250
  exports.SidenavComponent = SidenavComponent;