qms-angular 1.0.52 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QmsAngular
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.5.
4
4
 
5
5
  ## Code scaffolding
6
6
 
@@ -22,3 +22,48 @@ Run `ng test qms-angular` to execute the unit tests via [Karma](https://karma-ru
22
22
  ## Further help
23
23
 
24
24
  To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
25
+
26
+
27
+ ## Installation
28
+
29
+ Install node modules.
30
+
31
+ ```bash
32
+ npm i
33
+ ```
34
+ In your common styles, import qms theming.
35
+
36
+ ```css
37
+ @import 'qms-angular/lib.theme';
38
+ ```
39
+
40
+ Should add some script in build angular.json
41
+
42
+ ```typescript
43
+ "assets": [
44
+ ...
45
+ {
46
+ "glob": "**/*",
47
+ "input": "dist/qms-angular/src/assets",
48
+ "output": "/assets/"
49
+ }
50
+ ],
51
+ ....
52
+ "scripts": [
53
+ ...
54
+ "./node_module/qms-angular/src/assets/jointjs/js/gd.js",
55
+ "./node_module/qms-angular/src/assets/jointjs/js/client.js",
56
+ "./node_module/qms-angular/src/assets/jointjs/js/jquery/jquery.js",
57
+ "./node_module/qms-angular/src/assets/jointjs/js/lodash/lodash.js",
58
+ "./node_module/qms-angular/src/assets/jointjs/js/backbone/backbone.js",
59
+ "./node_module/qms-angular/src/assets/jointjs/js/rappid.js",
60
+ "./node_module/qms-angular/src/assets/jointjs/js/example.js",
61
+ "./node_module/qms-angular/src/assets/jointjs/js/joint.format.svg.js",
62
+ "./node_module/qms-angular/src/assets/jointjs/js/joint.format.raster.js"
63
+ ]
64
+ ```
65
+
66
+ ## Usage: Can import in your main modules.
67
+ ```python
68
+ import { QmsAngularModule, QMSButtonModule... } from 'qms-angular';
69
+ ```
@@ -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.$, 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';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -13,12 +13,14 @@
13
13
  var d = Object.getOwnPropertyDescriptor(e, k);
14
14
  Object.defineProperty(n, k, d.get ? d : {
15
15
  enumerable: true,
16
- get: function () { return e[k]; }
16
+ get: function () {
17
+ return e[k];
18
+ }
17
19
  });
18
20
  }
19
21
  });
20
22
  }
21
- n["default"] = e;
23
+ n['default'] = e;
22
24
  return Object.freeze(n);
23
25
  }
24
26
 
@@ -2470,7 +2472,7 @@
2470
2472
  ar[i] = from[i];
2471
2473
  }
2472
2474
  }
2473
- return to.concat(ar || Array.prototype.slice.call(from));
2475
+ return to.concat(ar || from);
2474
2476
  }
2475
2477
  function __await(v) {
2476
2478
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -4816,7 +4818,21 @@
4816
4818
  for (var i = 0; i < _this.treeControl.dataNodes.length; i++) {
4817
4819
  if (_this.treeControl.dataNodes[i].id === node.id &&
4818
4820
  _this.treeControl.dataNodes[i].parentId === node.parentId &&
4819
- !_this.treeControl.dataNodes[i].disabled) {
4821
+ !_this.treeControl.dataNodes[i].disabled && !_this.treeControl.dataNodes[i].expandable) {
4822
+ if (!_this.checklistSelection.isSelected(_this.treeControl.dataNodes[i]))
4823
+ _this.checklistSelection.toggle(_this.treeControl.dataNodes[i]);
4824
+ }
4825
+ }
4826
+ });
4827
+ this.checkBoxEvent.emit(this.checklistSelection.selected);
4828
+ };
4829
+ TreeComponent.prototype.todoFolderSelection = function (nodes) {
4830
+ var _this = this;
4831
+ nodes.forEach(function (node) {
4832
+ for (var i = 0; i < _this.treeControl.dataNodes.length; i++) {
4833
+ if (_this.treeControl.dataNodes[i].id === node.id &&
4834
+ _this.treeControl.dataNodes[i].parentId === node.parentId &&
4835
+ !_this.treeControl.dataNodes[i].disabled && _this.treeControl.dataNodes[i].expandable) {
4820
4836
  if (!_this.checklistSelection.isSelected(_this.treeControl.dataNodes[i]))
4821
4837
  _this.checklistSelection.toggle(_this.treeControl.dataNodes[i]);
4822
4838
  }
@@ -5614,7 +5630,8 @@
5614
5630
  return related ? related.itemName : undefined;
5615
5631
  };
5616
5632
  RelatedPopupComponent.prototype.selectRelated = function (item) {
5617
- if (this.treeConfig1.selectOne || this.treeConfig2.selectOne) {
5633
+ var _a, _b;
5634
+ if (((_a = this.treeConfig1) === null || _a === void 0 ? void 0 : _a.selectOne) || ((_b = this.treeConfig2) === null || _b === void 0 ? void 0 : _b.selectOne)) {
5618
5635
  this.disabledList = [];
5619
5636
  this.disabledList2 = [];
5620
5637
  }
@@ -5634,17 +5651,25 @@
5634
5651
  position = this.treeData2.findIndex(function (x) {
5635
5652
  return x.childId === item.id;
5636
5653
  });
5637
- node = this.treeData2[position];
5638
- typeId = this.dataType.document;
5639
- this.dataTrees.toArray()[1].todoItemSelectionById([item.id]);
5654
+ if (position >= 0) {
5655
+ node = this.treeData2[position];
5656
+ typeId = this.dataType.document;
5657
+ var treeNode = {
5658
+ id: node.childId,
5659
+ name: node.childName,
5660
+ children: [],
5661
+ parentId: node.rootId
5662
+ };
5663
+ this.dataTrees.toArray()[1].todoItemSelection([treeNode]);
5664
+ }
5640
5665
  }
5641
5666
  else if (item.itemType === this.dataType.folder) {
5642
5667
  position = this.treeData2.findIndex(function (x) {
5643
5668
  return x.rootId === item.id;
5644
5669
  });
5645
- node = this.treeData2[position];
5646
5670
  typeId = item.itemType;
5647
5671
  if (position >= 0) {
5672
+ node = this.treeData2[position];
5648
5673
  if (this.treeConfig2.showCheckBox) {
5649
5674
  this.checkedNodeList.push({
5650
5675
  moduleId: this.moduleId,
@@ -5665,7 +5690,13 @@
5665
5690
  levelType: item.levelType
5666
5691
  });
5667
5692
  }
5668
- this.dataTrees.toArray()[1].todoItemSelectionById([item.id]);
5693
+ var treeNode = {
5694
+ id: node.rootId,
5695
+ name: !!node.rootId ? node.subName : node.rootName,
5696
+ children: [],
5697
+ parentId: node.parentId
5698
+ };
5699
+ this.dataTrees.toArray()[1].todoFolderSelection([treeNode]);
5669
5700
  }
5670
5701
  return;
5671
5702
  }
@@ -5681,9 +5712,9 @@
5681
5712
  position = this.treeData1.findIndex(function (x) {
5682
5713
  return x.rootId === item.id;
5683
5714
  });
5684
- node = this.treeData1[position];
5685
5715
  typeId = item.itemType;
5686
5716
  if (position >= 0) {
5717
+ node = this.treeData1[position];
5687
5718
  if (this.treeConfig1.showCheckBox) {
5688
5719
  this.checkedNodeList.push({
5689
5720
  moduleId: this.moduleId,
@@ -5705,13 +5736,35 @@
5705
5736
  });
5706
5737
  }
5707
5738
  }
5708
- this.dataTrees.toArray()[0].todoItemSelectionById([item.id]);
5739
+ var treeNode = {
5740
+ id: node.rootId,
5741
+ name: !!node.rootId ? node.subName : node.rootName,
5742
+ children: [],
5743
+ parentId: node.parentId
5744
+ };
5745
+ this.dataTrees.toArray()[0].todoFolderSelection([treeNode]);
5709
5746
  return;
5710
5747
  }
5711
5748
  else if (item.itemType === this.dataType.deviation ||
5712
5749
  item.itemType === this.dataType.checklist) {
5713
5750
  position = this.treeData1.findIndex(function (x) {
5714
- return x.childId === item.id && x.rootId === item.parentId;
5751
+ return x.childId.toLowerCase() === item.id.toLowerCase();
5752
+ });
5753
+ if (position >= 0) {
5754
+ node = this.treeData1[position];
5755
+ typeId = this.itemType;
5756
+ var treeNode = {
5757
+ id: node.childId,
5758
+ name: node.childName,
5759
+ children: [],
5760
+ parentId: node.rootId
5761
+ };
5762
+ this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
5763
+ }
5764
+ }
5765
+ else {
5766
+ position = this.treeData1.findIndex(function (x) {
5767
+ return x.childId.toLowerCase() === item.id.toLowerCase();
5715
5768
  });
5716
5769
  node = this.treeData1[position];
5717
5770
  typeId = this.itemType;
@@ -5723,17 +5776,6 @@
5723
5776
  };
5724
5777
  this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
5725
5778
  }
5726
- else {
5727
- // process, risk,...
5728
- position = this.treeData1.findIndex(function (x) {
5729
- return x.childId.toLowerCase() === item.id.toLowerCase();
5730
- });
5731
- node = this.treeData1[position];
5732
- typeId = this.itemType;
5733
- if (node) {
5734
- this.dataTrees.toArray()[0].todoItemSelectionById([node.childId]);
5735
- }
5736
- }
5737
5779
  }
5738
5780
  };
5739
5781
  RelatedPopupComponent.prototype.selectNodeRecursive = function (item, itemType) {
@@ -17364,17 +17406,17 @@
17364
17406
  exports.no = no;
17365
17407
  exports.notExceedSize = notExceedSize;
17366
17408
  exports.requiredFileType = requiredFileType;
17367
- exports["ɵ1"] = ɵ1;
17368
- exports["ɵa"] = SharedMaterialModule;
17369
- exports["ɵb"] = QMSCKEditorTemplateComponent;
17370
- exports["ɵc"] = QMSCKEditorTreeService;
17371
- exports["ɵd"] = LinkAttachmentComponent;
17372
- exports["ɵe"] = QMSCKEditorTooltipComponent;
17373
- exports["ɵf"] = QMSCKEditorTooltip;
17374
- exports["ɵg"] = QMSCKEditorImageMapComponent;
17375
- exports["ɵh"] = QMSCKEditorImageMap;
17409
+ exports1 = ɵ1;
17410
+ exports.ɵa = SharedMaterialModule;
17411
+ exports.ɵb = QMSCKEditorTemplateComponent;
17412
+ exports.ɵc = QMSCKEditorTreeService;
17413
+ exports.ɵd = LinkAttachmentComponent;
17414
+ exports.ɵe = QMSCKEditorTooltipComponent;
17415
+ exports.ɵf = QMSCKEditorTooltip;
17416
+ exports.ɵg = QMSCKEditorImageMapComponent;
17417
+ exports.ɵh = QMSCKEditorImageMap;
17376
17418
 
17377
17419
  Object.defineProperty(exports, '__esModule', { value: true });
17378
17420
 
17379
- }));
17421
+ })));
17380
17422
  //# sourceMappingURL=qms-angular.umd.js.map