ato-water-lib 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
@@ -7554,7 +7554,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7554
7554
  [AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER]: {
7555
7555
  nodeDataArray: [
7556
7556
  {
7557
- key: 88,
7557
+ key: 86,
7558
7558
  type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7559
7559
  group: 100,
7560
7560
  loc: '0 0',
@@ -7566,7 +7566,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7566
7566
  color: '#a8438d',
7567
7567
  },
7568
7568
  {
7569
- key: 89,
7569
+ key: 87,
7570
7570
  type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7571
7571
  group: 100,
7572
7572
  data: {
@@ -7582,48 +7582,48 @@ const ATO_COMPONENTS_GROUP_DATA = {
7582
7582
  loc: '700 300',
7583
7583
  }
7584
7584
  },
7585
- Object.assign(Object.assign({ key: 90, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '320 60', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 140 }))), visible: true, assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7585
+ Object.assign(Object.assign({ key: 88, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '320 60', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 140 }))), visible: true, assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7586
7586
  visible: true,
7587
7587
  }, extendedDataResponsive: {
7588
7588
  visible: false,
7589
7589
  } }),
7590
- Object.assign(Object.assign({ key: 91, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7590
+ Object.assign(Object.assign({ key: 89, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7591
7591
  visible: true,
7592
7592
  }, extendedDataResponsive: {
7593
7593
  visible: false,
7594
7594
  } }),
7595
- Object.assign(Object.assign({ key: 92, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7595
+ Object.assign(Object.assign({ key: 90, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7596
7596
  visible: true,
7597
7597
  }, extendedDataResponsive: {
7598
7598
  visible: false,
7599
7599
  } }),
7600
- Object.assign(Object.assign({ key: 93, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 250' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WARMER_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WARMER_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7600
+ Object.assign(Object.assign({ key: 91, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 250' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WARMER_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WARMER_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7601
7601
  visible: true,
7602
7602
  }, extendedDataResponsive: {
7603
7603
  visible: false,
7604
7604
  } }),
7605
- Object.assign(Object.assign({ key: 93, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 560' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7605
+ Object.assign(Object.assign({ key: 92, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 560' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
7606
7606
  visible: true,
7607
7607
  }, extendedDataResponsive: {
7608
7608
  visible: false,
7609
7609
  } }),
7610
- Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '450 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7610
+ Object.assign(Object.assign({ key: 93, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '450 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7611
7611
  visible: true,
7612
7612
  }, extendedDataResponsive: {
7613
7613
  visible: false,
7614
7614
  } }),
7615
- Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '730 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7615
+ Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '730 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7616
7616
  visible: true,
7617
7617
  }, extendedDataResponsive: {
7618
7618
  visible: false,
7619
7619
  } }),
7620
- Object.assign(Object.assign({ key: 96, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 50' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7620
+ Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 50' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
7621
7621
  visible: true,
7622
7622
  }, extendedDataResponsive: {
7623
7623
  visible: false,
7624
7624
  } }),
7625
7625
  {
7626
- key: 97,
7626
+ key: 96,
7627
7627
  type: AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE,
7628
7628
  source: AtoGojsEditorModel.IMAGE_COOLING_TOWER_PATH,
7629
7629
  group: 100,
@@ -7637,7 +7637,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7637
7637
  }
7638
7638
  },
7639
7639
  {
7640
- key: 98,
7640
+ key: 97,
7641
7641
  type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7642
7642
  group: 100,
7643
7643
  loc: '250 25',
@@ -8047,8 +8047,7 @@ class AssetFlowComponent {
8047
8047
  }, 1000);
8048
8048
  }
8049
8049
  checkResponsiveView() {
8050
- if ((this === null || this === void 0 ? void 0 : this.systemType) ===
8051
- AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
8050
+ if ((this === null || this === void 0 ? void 0 : this.systemType) === AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
8052
8051
  this.isResponsiveView = window.innerWidth < 1024;
8053
8052
  }
8054
8053
  else {
@@ -8061,7 +8060,7 @@ class AssetFlowComponent {
8061
8060
  this.flowData = AssetFlowComponent.getDefaultFlowData({
8062
8061
  systemType: this.systemType,
8063
8062
  isUseBase64: this.isUseBase64,
8064
- assetLayer: this.assetLayer
8063
+ assetLayer: this.assetLayer,
8065
8064
  });
8066
8065
  }
8067
8066
  _.forEach((_b = this.flowData) === null || _b === void 0 ? void 0 : _b.nodeDataArray, (node) => {
@@ -8081,10 +8080,16 @@ class AssetFlowComponent {
8081
8080
  const flowData = Object.assign(Object.assign(Object.assign({}, defaultData), _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[defaultData === null || defaultData === void 0 ? void 0 : defaultData.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
8082
8081
  // Reponsive
8083
8082
  _.forEach(flowData === null || flowData === void 0 ? void 0 : flowData.nodeDataArray, (node) => {
8083
+ var _a;
8084
8084
  node = _.merge(node, node[`extendedData${window.innerWidth < 1024 ? 'Responsive' : ''}`]);
8085
+ if (node === null || node === void 0 ? void 0 : node.assetLayers) {
8086
+ node.visible =
8087
+ (node === null || node === void 0 ? void 0 : node.assetLayers) ===
8088
+ ((_a = defaultData === null || defaultData === void 0 ? void 0 : defaultData.assetLayer) !== null && _a !== void 0 ? _a : ATO_ASSET_LAYERS.FLOW);
8089
+ }
8085
8090
  });
8086
8091
  // assetLayer
8087
- flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => { var _a; return !(x === null || x === void 0 ? void 0 : x.assetLayers) || ((x === null || x === void 0 ? void 0 : x.assetLayers) && (x === null || x === void 0 ? void 0 : x.assetLayers) === ((_a = defaultData === null || defaultData === void 0 ? void 0 : defaultData.assetLayer) !== null && _a !== void 0 ? _a : ATO_ASSET_LAYERS.FLOW)); });
8092
+ // flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)))
8088
8093
  if (defaultData === null || defaultData === void 0 ? void 0 : defaultData.isUseBase64) {
8089
8094
  const itemImageTemp = (_a = flowData === null || flowData === void 0 ? void 0 : flowData.nodeDataArray) === null || _a === void 0 ? void 0 : _a.find((x) => (x === null || x === void 0 ? void 0 : x.type) === 'Image Template');
8090
8095
  if (itemImageTemp) {
@@ -8095,7 +8100,7 @@ class AssetFlowComponent {
8095
8100
  }
8096
8101
  setFlowData(data) {
8097
8102
  // const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
8098
- _.forEach(data.nodeDataArray, node => {
8103
+ _.forEach(data.nodeDataArray, (node) => {
8099
8104
  if (node === null || node === void 0 ? void 0 : node.assetLayers) {
8100
8105
  node.visible = (node === null || node === void 0 ? void 0 : node.assetLayers) === this.assetLayer;
8101
8106
  }
@@ -8105,10 +8110,11 @@ class AssetFlowComponent {
8105
8110
  }
8106
8111
  updateDataTableAssetParams(data) {
8107
8112
  var _a, _b;
8108
- this.dataTableAssetParams = _.forEach((_b = (_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE && (e === null || e === void 0 ? void 0 : e.assetLayers) === (data === null || data === void 0 ? void 0 : data.assetLayer)), x => {
8113
+ this.dataTableAssetParams = _.forEach((_b = (_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE &&
8114
+ (e === null || e === void 0 ? void 0 : e.assetLayers) === (data === null || data === void 0 ? void 0 : data.assetLayer)), (x) => {
8109
8115
  var _a, _b, _c;
8110
8116
  if (!(data === null || data === void 0 ? void 0 : data.isRefresh)) {
8111
- x.isCollapsed = (_c = (_b = (_a = this.assetParamsViewTemp) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find(y => (y === null || y === void 0 ? void 0 : y.key) === (x === null || x === void 0 ? void 0 : x.key))) === null || _c === void 0 ? void 0 : _c.isCollapsed;
8117
+ x.isCollapsed = (_c = (_b = (_a = this.assetParamsViewTemp) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((y) => (y === null || y === void 0 ? void 0 : y.key) === (x === null || x === void 0 ? void 0 : x.key))) === null || _c === void 0 ? void 0 : _c.isCollapsed;
8112
8118
  }
8113
8119
  });
8114
8120
  }