ato-water-lib 0.0.40 → 0.0.42

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ import { Component, EventEmitter, HostListener, Input, Output, ViewChild, } from
2
2
  import * as go from 'gojs';
3
3
  import _ from 'lodash';
4
4
  import { AtoGoJSBase64 } from '../../constants/base64.const';
5
- import { ATO_ASSET_LAYERS, ATO_COMPONENTS_GROUP_DATA } from '../../constants/components-group-const';
5
+ import { ATO_ASSET_LAYERS, ATO_COMPONENTS_GROUP_DATA, } from '../../constants/components-group-const';
6
6
  import { AtoGojsEditorModel } from '../../models/gojs-editor.model';
7
7
  import { AtoAssetParamsViewComponent } from '../asset-params-view/asset-params-view.component';
8
8
  import { AtoFlowDiagramLibComponent } from '../flow-diagram-lib/flow-diagram-lib.component';
@@ -42,8 +42,7 @@ export class AssetFlowComponent {
42
42
  }, 1000);
43
43
  }
44
44
  checkResponsiveView() {
45
- if (this?.systemType ===
46
- AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
45
+ if (this?.systemType === AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
47
46
  this.isResponsiveView = window.innerWidth < 1024;
48
47
  }
49
48
  else {
@@ -55,7 +54,7 @@ export class AssetFlowComponent {
55
54
  this.flowData = AssetFlowComponent.getDefaultFlowData({
56
55
  systemType: this.systemType,
57
56
  isUseBase64: this.isUseBase64,
58
- assetLayer: this.assetLayer
57
+ assetLayer: this.assetLayer,
59
58
  });
60
59
  }
61
60
  _.forEach(this.flowData?.nodeDataArray, (node) => {
@@ -80,9 +79,14 @@ export class AssetFlowComponent {
80
79
  // Reponsive
81
80
  _.forEach(flowData?.nodeDataArray, (node) => {
82
81
  node = _.merge(node, node[`extendedData${window.innerWidth < 1024 ? 'Responsive' : ''}`]);
82
+ if (node?.assetLayers) {
83
+ node.visible =
84
+ node?.assetLayers ===
85
+ (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW);
86
+ }
83
87
  });
84
88
  // assetLayer
85
- flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)));
89
+ // flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)))
86
90
  if (defaultData?.isUseBase64) {
87
91
  const itemImageTemp = flowData?.nodeDataArray?.find((x) => x?.type === 'Image Template');
88
92
  if (itemImageTemp) {
@@ -93,9 +97,9 @@ export class AssetFlowComponent {
93
97
  }
94
98
  setFlowData(data) {
95
99
  // const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
96
- _.forEach(data.nodeDataArray, node => {
100
+ _.forEach(data.nodeDataArray, (node) => {
97
101
  if (node?.assetLayers) {
98
- node.visible = node?.assetLayers === this.assetLayer;
102
+ node.visible = node?.assetLayers === data.assetLayer;
99
103
  }
100
104
  });
101
105
  this.flowData = {
@@ -105,9 +109,10 @@ export class AssetFlowComponent {
105
109
  this.updateDataTableAssetParams(data);
106
110
  }
107
111
  updateDataTableAssetParams(data) {
108
- this.dataTableAssetParams = _.forEach(this.flowData?.nodeDataArray?.filter((e) => e?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE && e?.assetLayers === data?.assetLayer), x => {
112
+ this.dataTableAssetParams = _.forEach(this.flowData?.nodeDataArray?.filter((e) => e?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE &&
113
+ e?.assetLayers === data?.assetLayer), (x) => {
109
114
  if (!data?.isRefresh) {
110
- x.isCollapsed = this.assetParamsViewTemp?.data?.find(y => y?.key === x?.key)?.isCollapsed;
115
+ x.isCollapsed = this.assetParamsViewTemp?.data?.find((y) => y?.key === x?.key)?.isCollapsed;
111
116
  }
112
117
  });
113
118
  }
@@ -143,4 +148,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
143
148
  type: HostListener,
144
149
  args: ['window:resize', ['$event']]
145
150
  }] } });
146
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXQtZmxvdy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hdG8td2F0ZXItbGliL3NyYy9saWIvY29tcG9uZW50cy9hc3NldC1mbG93L2Fzc2V0LWZsb3cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXRvLXdhdGVyLWxpYi9zcmMvbGliL2NvbXBvbmVudHMvYXNzZXQtZmxvdy9hc3NldC1mbG93LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsWUFBWSxFQUNaLFlBQVksRUFDWixLQUFLLEVBRUwsTUFBTSxFQUNOLFNBQVMsR0FDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQixPQUFPLENBQUMsTUFBTSxRQUFRLENBQUM7QUFDdkIsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzdELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSx5QkFBeUIsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBR3JHLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BFLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGtEQUFrRCxDQUFDO0FBQy9GLE9BQU8sRUFBRSwwQkFBMEIsRUFBRSxNQUFNLGdEQUFnRCxDQUFDOzs7Ozs7QUFPNUYsTUFBTSxPQUFPLGtCQUFrQjtJQUwvQjtRQWFZLDZCQUF3QixH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