ato-water-lib 0.0.130 → 0.0.132

Sign up to get free protection for your applications and to get access to all the features.
@@ -3451,11 +3451,9 @@ var ENUM_ASSET_PARAMETERS;
3451
3451
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_WET_BULB_TEMPERATURE"] = "DA Wet Bulb Temperature";
3452
3452
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_RANGE"] = "DARange";
3453
3453
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_APPROACH"] = "DAApproach";
3454
- // Cooling Tower -- Performance -- Efficiency and Performance
3455
- ENUM_ASSET_PARAMETERS["EFFICIENCY_DAILY_AVERAGE"] = "Efficiency Daily Average";
3456
- ENUM_ASSET_PARAMETERS["EFFICIENCY_ADJUSTED_DAILY_AVERAGE"] = "Efficiency Adjusted Daily Average";
3457
- ENUM_ASSET_PARAMETERS["LG_RATIO"] = "L/G Ratio";
3458
- ENUM_ASSET_PARAMETERS["NTU"] = "NTU";
3454
+ // Cooling Tower -- Performance -- Efficiency
3455
+ ENUM_ASSET_PARAMETERS["DAILY_EFFICIENCY_AVG"] = "Daily Efficiency Avg";
3456
+ ENUM_ASSET_PARAMETERS["ADJUSTED_EFFICIENCY_DAILY_AVG"] = "Adjusted Efficiency Daily Avg";
3459
3457
  // Cooling Tower -- Performance -- Water & Energy Consumption
3460
3458
  ENUM_ASSET_PARAMETERS["WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE"] = "Make Up Water Flow Rate";
3461
3459
  ENUM_ASSET_PARAMETERS["WATER_ENERGY_CONSUMPTION_BLOWDOWN_FLOW_RATE"] = "Blowdown Water Flow Rate";
@@ -3475,8 +3473,8 @@ var ENUM_ASSET_PARAMETERS;
3475
3473
  ENUM_ASSET_PARAMETERS["KPIS_SUPPLY_TEMPERATURE"] = "KPIs Supply Temperature";
3476
3474
  ENUM_ASSET_PARAMETERS["KPIS_RANGE"] = "KPIs Range";
3477
3475
  ENUM_ASSET_PARAMETERS["KPIS_APPROACH"] = "KPIs Approach";
3478
- ENUM_ASSET_PARAMETERS["KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE"] = "KPIs Efficiency Adjusted Daily Average";
3479
- ENUM_ASSET_PARAMETERS["KPIS_LG_RATIO"] = "KPIs L/G Ratio";
3476
+ ENUM_ASSET_PARAMETERS["DAILY_EFFICIENCY"] = "Daily Efficiency";
3477
+ ENUM_ASSET_PARAMETERS["ADJUSTED_EFFICIENCY"] = "Adjusted Efficiency";
3480
3478
  })(ENUM_ASSET_PARAMETERS || (ENUM_ASSET_PARAMETERS = {}));
3481
3479
  var WATER_SYSTEMS_NAME;
3482
3480
  (function (WATER_SYSTEMS_NAME) {
@@ -3544,7 +3542,7 @@ var WATER_SYSTEMS_NAME;
3544
3542
  // For Cooling Tower - Performance
3545
3543
  WATER_SYSTEMS_NAME["VISUAL_MANAGEMENT"] = "Visual Management";
3546
3544
  WATER_SYSTEMS_NAME["DATA_ANALYSIS"] = "Data Analysis";
3547
- WATER_SYSTEMS_NAME["EFFICIENCY_AND_PERFORMANCE"] = "Efficiency and Performance";
3545
+ WATER_SYSTEMS_NAME["EFFICIENCY"] = "Efficiency";
3548
3546
  WATER_SYSTEMS_NAME["WATER_AND_ENERGY_CONSUMPTION"] = "Water & Energy Consumption";
3549
3547
  WATER_SYSTEMS_NAME["CHEMICALS_CONSUMPTION"] = "Chemicals Consumption";
3550
3548
  WATER_SYSTEMS_NAME["DESIGN_PARAMETERS"] = "Design Parameters";
@@ -3975,21 +3973,13 @@ const DATA_ASSET_PARAMETER_FIELDS = {
3975
3973
  isFrom: ATO_MAPPER_FROM.INDICATOR,
3976
3974
  },
3977
3975
  // Cooling Tower -- Performance -- Efficiency and Performance
3978
- [ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE]: {
3979
- name: ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE,
3980
- key: ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE,
3981
- },
3982
- [ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE]: {
3983
- name: ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
3984
- key: ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
3976
+ [ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG]: {
3977
+ name: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG,
3978
+ key: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG,
3985
3979
  },
3986
- [ENUM_ASSET_PARAMETERS.LG_RATIO]: {
3987
- name: ENUM_ASSET_PARAMETERS.COMMON_LG_RATIO,
3988
- key: ENUM_ASSET_PARAMETERS.LG_RATIO,
3989
- },
3990
- [ENUM_ASSET_PARAMETERS.NTU]: {
3991
- name: ENUM_ASSET_PARAMETERS.NTU,
3992
- key: ENUM_ASSET_PARAMETERS.NTU,
3980
+ [ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG]: {
3981
+ name: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG,
3982
+ key: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG,
3993
3983
  },
3994
3984
  // Cooling Tower -- Performance -- Water & Energy Consumption
3995
3985
  [ENUM_ASSET_PARAMETERS.WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE]: {
@@ -4075,18 +4065,18 @@ const DATA_ASSET_PARAMETER_FIELDS = {
4075
4065
  visible: false,
4076
4066
  isFrom: ATO_MAPPER_FROM.INDICATOR,
4077
4067
  },
4078
- [ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE]: {
4079
- name: 'Efficiency Adjusted Daily Average',
4080
- key: ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
4068
+ [ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY]: {
4069
+ name: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY,
4070
+ key: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY,
4081
4071
  value: 'Mapping in Efficiency & Performance section',
4082
4072
  isEditable: false,
4083
4073
  isReadOnly: true,
4084
4074
  visible: false,
4085
4075
  isFrom: ATO_MAPPER_FROM.INDICATOR,
4086
4076
  },
4087
- [ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO]: {
4088
- name: ENUM_ASSET_PARAMETERS.COMMON_LG_RATIO,
4089
- key: ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO,
4077
+ [ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY]: {
4078
+ name: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY,
4079
+ key: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY,
4090
4080
  value: 'Mapping in Efficiency & Performance section',
4091
4081
  isEditable: false,
4092
4082
  isReadOnly: true,
@@ -4361,8 +4351,8 @@ const DATA_WATER_SYSTEMS = {
4361
4351
  title: WATER_SYSTEMS_NAME.DATA_ANALYSIS,
4362
4352
  ...STYLE_TABLE_PARAM.LONDON_HUE,
4363
4353
  },
4364
- [WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE]: {
4365
- title: WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE,
4354
+ [WATER_SYSTEMS_NAME.EFFICIENCY]: {
4355
+ title: WATER_SYSTEMS_NAME.EFFICIENCY,
4366
4356
  ...STYLE_TABLE_PARAM.LONDON_HUE,
4367
4357
  },
4368
4358
  [WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION]: {
@@ -4484,11 +4474,9 @@ const ASSET_CATEGORY_PARAMS = {
4484
4474
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DATA_ANALYSIS_RANGE],
4485
4475
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DATA_ANALYSIS_APPROACH],
4486
4476
  ],
4487
- [WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE]: [
4488
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE],
4489
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE],
4490
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.LG_RATIO],
4491
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.NTU],
4477
+ [WATER_SYSTEMS_NAME.EFFICIENCY]: [
4478
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG],
4479
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG],
4492
4480
  ],
4493
4481
  [WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION]: [
4494
4482
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE],
@@ -4512,8 +4500,8 @@ const ASSET_CATEGORY_PARAMS = {
4512
4500
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_SUPPLY_TEMPERATURE],
4513
4501
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_RANGE],
4514
4502
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_APPROACH],
4515
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE],
4516
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO],
4503
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY],
4504
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY],
4517
4505
  ],
4518
4506
  };
4519
4507
  // For Boiler
@@ -4658,21 +4646,15 @@ const ASSET_CATEGORY_PARAMS__RO_WATER_TREATMENT = {
4658
4646
  [WATER_SYSTEMS_NAME.RO_PRE_FILTER__FLOW]: [
4659
4647
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DIFFERENTIAL_PRESSURE],
4660
4648
  ],
4661
- [WATER_SYSTEMS_NAME.RO_HP_PUMP__FLOW]: [
4662
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PRESSURE],
4663
- ],
4649
+ [WATER_SYSTEMS_NAME.RO_HP_PUMP__FLOW]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PRESSURE]],
4664
4650
  [WATER_SYSTEMS_NAME.RO_FEED__CHEMISTRY]: [
4665
4651
  // DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TDS],
4666
4652
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY],
4667
4653
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TEMPERATURE],
4668
4654
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
4669
4655
  ],
4670
- [WATER_SYSTEMS_NAME.RO_CONCENTRATE__CHEMISTRY]: [
4671
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY],
4672
- ],
4673
- [WATER_SYSTEMS_NAME.RO_RO__CHEMISTRY]: [
4674
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.REJECTION_RATE],
4675
- ],
4656
+ [WATER_SYSTEMS_NAME.RO_CONCENTRATE__CHEMISTRY]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY]],
4657
+ [WATER_SYSTEMS_NAME.RO_RO__CHEMISTRY]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.REJECTION_RATE]],
4676
4658
  [WATER_SYSTEMS_NAME.RO_PERMEATE__CHEMISTRY]: [
4677
4659
  // DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TDS],
4678
4660
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
@@ -4699,7 +4681,7 @@ var ATO_ASSET_LAYERS;
4699
4681
  ATO_ASSET_LAYERS["FLOW"] = "Flow";
4700
4682
  ATO_ASSET_LAYERS["CHEMISTRY"] = "Chemistry";
4701
4683
  ATO_ASSET_LAYERS["ANALYTICS"] = "Analytics";
4702
- ATO_ASSET_LAYERS["PERFORMANCE"] = "Performance";
4684
+ ATO_ASSET_LAYERS["EFFICIENCY"] = "Efficiency";
4703
4685
  })(ATO_ASSET_LAYERS || (ATO_ASSET_LAYERS = {}));
4704
4686
  var ATO_SPOT_LOCATION_TYPE;
4705
4687
  (function (ATO_SPOT_LOCATION_TYPE) {
@@ -6053,7 +6035,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6053
6035
  extendedData: {
6054
6036
  margin: new go.Margin(195, 20, 0, 0),
6055
6037
  },
6056
- extendedDataPerformance: {
6038
+ extendedDataEfficiency: {
6057
6039
  margin: new go.Margin(260, 20, 0, 0),
6058
6040
  },
6059
6041
  extendedDataResponsive: {
@@ -6121,7 +6103,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6121
6103
  waterSystem: WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT,
6122
6104
  })),
6123
6105
  visible: true,
6124
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6106
+ assetLayers: ATO_ASSET_LAYERS.EFFICIENCY,
6125
6107
  extendedData: {
6126
6108
  visible: true,
6127
6109
  },
@@ -6147,7 +6129,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6147
6129
  desiredSizeNameParam: new go.Size(136, 14),
6148
6130
  waterSystem: WATER_SYSTEMS_NAME.DATA_ANALYSIS,
6149
6131
  })),
6150
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6132
+ assetLayers: ATO_ASSET_LAYERS.EFFICIENCY,
6151
6133
  extendedData: {
6152
6134
  visible: true,
6153
6135
  },
@@ -6160,69 +6142,19 @@ const ATO_COMPONENTS_GROUP_DATA = {
6160
6142
  type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
6161
6143
  group: 100,
6162
6144
  padding: new go.Margin(0, 0, 0, 0),
6163
- loc: '667 620',
6164
- ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE],
6145
+ loc: '667 630',
6146
+ ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EFFICIENCY],
6165
6147
  minSizeValue: new go.Size(100, NaN),
6166
6148
  selectable: false,
6167
- dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE].map((e) => ({
6149
+ dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EFFICIENCY].map((e) => ({
6168
6150
  ...e,
6169
6151
  value: '',
6170
6152
  isEditable: true,
6171
6153
  desiredSizeValue: new go.Size(100, 14),
6172
6154
  desiredNameParam: new go.Size(160, 14),
6173
- waterSystem: WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE,
6155
+ waterSystem: WATER_SYSTEMS_NAME.EFFICIENCY,
6174
6156
  })),
6175
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6176
- extendedData: {
6177
- visible: true,
6178
- },
6179
- extendedDataResponsive: {
6180
- visible: false,
6181
- },
6182
- },
6183
- {
6184
- key: 104,
6185
- type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
6186
- group: 100,
6187
- padding: new go.Margin(0, 0, 0, 0),
6188
- loc: '10 420',
6189
- ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION],
6190
- minSizeValue: new go.Size(100, NaN),
6191
- selectable: false,
6192
- dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION].map((e) => ({
6193
- ...e,
6194
- value: '',
6195
- isEditable: true,
6196
- maxSizeValue: new go.Size(128, 14),
6197
- maxSizeNameParam: new go.Size(140, 14),
6198
- waterSystem: WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION,
6199
- })),
6200
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6201
- extendedData: {
6202
- visible: true,
6203
- },
6204
- extendedDataResponsive: {
6205
- visible: false,
6206
- },
6207
- },
6208
- {
6209
- key: 107,
6210
- type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
6211
- group: 100,
6212
- padding: new go.Margin(0, 0, 0, 0),
6213
- loc: '10 640',
6214
- ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION],
6215
- minSizeValue: new go.Size(100, NaN),
6216
- selectable: false,
6217
- dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION].map((e) => ({
6218
- ...e,
6219
- value: '',
6220
- isEditable: true,
6221
- desiredSizeValue: new go.Size(120, 14),
6222
- desiredSizeNameParam: new go.Size(145, 14),
6223
- waterSystem: WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION,
6224
- })),
6225
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6157
+ assetLayers: ATO_ASSET_LAYERS.EFFICIENCY,
6226
6158
  extendedData: {
6227
6159
  visible: true,
6228
6160
  },
@@ -6243,10 +6175,13 @@ const ATO_COMPONENTS_GROUP_DATA = {
6243
6175
  ...e,
6244
6176
  isEditable: true,
6245
6177
  maxSizeValue: new go.Size(120, 14),
6178
+ // minSizeValue: new go.Size(120, 14),
6246
6179
  maxSizeNameParam: new go.Size(180, 14),
6180
+ // desiredSize: new go.Size(180, 14),
6247
6181
  waterSystem: WATER_SYSTEMS_NAME.DESIGN_PARAMETERS,
6182
+ isCreateDirectly: true,
6248
6183
  })),
6249
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6184
+ assetLayers: ATO_ASSET_LAYERS.EFFICIENCY,
6250
6185
  extendedData: {
6251
6186
  visible: true,
6252
6187
  },
@@ -6269,7 +6204,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6269
6204
  desiredSizeNameParam: new go.Size(135, 14),
6270
6205
  waterSystem: WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE,
6271
6206
  })),
6272
- assetLayers: ATO_ASSET_LAYERS.PERFORMANCE,
6207
+ assetLayers: ATO_ASSET_LAYERS.EFFICIENCY,
6273
6208
  isFrom: ATO_MAPPER_FROM.INDICATOR,
6274
6209
  extendedData: {
6275
6210
  visible: false,
@@ -6496,30 +6431,32 @@ const ATO_COMPONENTS_GROUP_DATA = {
6496
6431
  visible: false,
6497
6432
  },
6498
6433
  },
6499
- {
6500
- key: 147,
6501
- type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
6502
- group: 150,
6503
- loc: '15 350',
6504
- padding: new go.Margin(0, 0, 0, 0),
6505
- ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW],
6506
- minSizeValue: new go.Size(100, NaN),
6507
- selectable: false,
6508
- dataTable: ASSET_CATEGORY_PARAMS__IMMERSED_UF[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW].map((e) => ({
6509
- ...e,
6510
- value: '',
6511
- isEditable: true,
6512
- maxSizeValue: new go.Size(140, 14),
6513
- waterSystem: WATER_SYSTEMS_NAME.IMMERSED_UF_FEED,
6514
- })),
6515
- assetLayers: ATO_ASSET_LAYERS.FLOW,
6516
- extendedData: {
6517
- visible: true,
6518
- },
6519
- extendedDataResponsive: {
6520
- visible: false,
6521
- },
6522
- },
6434
+ // {
6435
+ // key: 147,
6436
+ // type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
6437
+ // group: 150,
6438
+ // loc: '15 350',
6439
+ // padding: new go.Margin(0, 0, 0, 0),
6440
+ // ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW],
6441
+ // minSizeValue: new go.Size(100, NaN),
6442
+ // selectable: false,
6443
+ // dataTable: ASSET_CATEGORY_PARAMS__IMMERSED_UF[
6444
+ // WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW
6445
+ // ].map((e) => ({
6446
+ // ...e,
6447
+ // value: '',
6448
+ // isEditable: true,
6449
+ // maxSizeValue: new go.Size(140, 14),
6450
+ // waterSystem: WATER_SYSTEMS_NAME.IMMERSED_UF_FEED,
6451
+ // })),
6452
+ // assetLayers: ATO_ASSET_LAYERS.FLOW,
6453
+ // extendedData: {
6454
+ // visible: true,
6455
+ // },
6456
+ // extendedDataResponsive: {
6457
+ // visible: false,
6458
+ // },
6459
+ // },
6523
6460
  {
6524
6461
  key: 150,
6525
6462
  type: AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS,
@@ -7560,14 +7497,12 @@ class AtoDefaultGojsEditor {
7560
7497
  });
7561
7498
  // Remove Node and Node Group
7562
7499
  _.forEach(this.myDiagram.nodeTemplateMap?.Hb, (temp) => {
7563
- if (temp?.key &&
7564
- !this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
7500
+ if (temp?.key && !this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
7565
7501
  this.myDiagram.nodeTemplateMap.remove(temp?.key);
7566
7502
  }
7567
7503
  });
7568
7504
  _.forEach(this.myDiagram.groupTemplateMap?.Hb, (temp) => {
7569
- if (temp?.key &&
7570
- !this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
7505
+ if (temp?.key && !this.editor.data?.nodeDataArray?.some((node) => node?.type === temp?.key)) {
7571
7506
  this.myDiagram.groupTemplateMap.remove(temp?.key);
7572
7507
  }
7573
7508
  });
@@ -7593,13 +7528,11 @@ class AtoDefaultGojsEditor {
7593
7528
  this.makeGroupCoolingTowerTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7594
7529
  return;
7595
7530
  }
7596
- if (node?.type ===
7597
- AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS) {
7531
+ if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS) {
7598
7532
  this.makeGroupImmersedUFTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7599
7533
  return;
7600
7534
  }
7601
- if (node?.type ===
7602
- AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS) {
7535
+ if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS) {
7603
7536
  this.makeGroupCoolingTowerTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7604
7537
  return;
7605
7538
  }
@@ -7607,8 +7540,7 @@ class AtoDefaultGojsEditor {
7607
7540
  this.makeGroupZoneTemplate();
7608
7541
  return;
7609
7542
  }
7610
- if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
7611
- node?.isGroup) {
7543
+ if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL && node?.isGroup) {
7612
7544
  this.groupPlantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7613
7545
  return;
7614
7546
  }
@@ -7632,13 +7564,11 @@ class AtoDefaultGojsEditor {
7632
7564
  }
7633
7565
  // Not Group
7634
7566
  // Component Water Normal
7635
- if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL?.includes(node?.type) &&
7636
- !node?.isGroup) {
7567
+ if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL?.includes(node?.type) && !node?.isGroup) {
7637
7568
  this.makeEntityTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon ?? '', AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name ?? '');
7638
7569
  }
7639
7570
  // Component Water Withdraw Or Discharge
7640
- if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE?.includes(node?.type) &&
7641
- !node?.isGroup) {
7571
+ if (AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE?.includes(node?.type) && !node?.isGroup) {
7642
7572
  this.makeEntityWithdrawOrDischarge(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon ?? '', AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name ?? '');
7643
7573
  }
7644
7574
  // Component Energy Normal
@@ -7691,8 +7621,7 @@ class AtoDefaultGojsEditor {
7691
7621
  this.makeSpecialTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7692
7622
  }
7693
7623
  // Plant Cell
7694
- if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
7695
- !node?.isGroup) {
7624
+ if (node?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL && !node?.isGroup) {
7696
7625
  this.plantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node?.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node?.type].name);
7697
7626
  }
7698
7627
  }
@@ -7720,8 +7649,7 @@ class AtoDefaultGojsEditor {
7720
7649
  this.myDiagram.dragSelectingTool = this.initialOptions?.dragSelectingTool;
7721
7650
  this.myDiagram.toolManager.draggingTool.isGridSnapEnabled =
7722
7651
  this.initialOptions?.['draggingTool.isGridSnapEnabled'] ?? false;
7723
- if (this.myDiagram.toolManager &&
7724
- this.myDiagram.toolManager.draggingTool) {
7652
+ if (this.myDiagram.toolManager && this.myDiagram.toolManager.draggingTool) {
7725
7653
  if (this.initialOptions?.['draggingTool.gridSnapCellSize']) {
7726
7654
  this.myDiagram.toolManager.draggingTool.gridSnapCellSize =
7727
7655
  this.initialOptions?.['draggingTool.gridSnapCellSize'];
@@ -7739,8 +7667,7 @@ class AtoDefaultGojsEditor {
7739
7667
  this.initialOptions?.['linkingTool.linkValidation'];
7740
7668
  }
7741
7669
  }
7742
- this.myDiagram.contentAlignment =
7743
- this.initialOptions?.contentAlignment ?? go.Spot.Center;
7670
+ this.myDiagram.contentAlignment = this.initialOptions?.contentAlignment ?? go.Spot.Center;
7744
7671
  this.myDiagram.layout = this.initialOptions?.layout;
7745
7672
  // this.myDiagram.minViewportBounds = new go.Rect(0, 0, 1200, 1200);
7746
7673
  if (!!this.editor?.data) {
@@ -7764,8 +7691,7 @@ class AtoDefaultGojsEditor {
7764
7691
  // if (!this.isAddedModelChangedListeners) {
7765
7692
  this.isAddedModelChangedListeners = true;
7766
7693
  this.myDiagram.addModelChangedListener(function (e) {
7767
- if (e.change === go.ChangedEvent.Remove &&
7768
- e.propertyName === 'nodeDataArray') {
7694
+ if (e.change === go.ChangedEvent.Remove && e.propertyName === 'nodeDataArray') {
7769
7695
  const data = e.oldValue;
7770
7696
  self.onDeleteNode.emit(data);
7771
7697
  }
@@ -7994,12 +7920,7 @@ class AtoDefaultGojsEditor {
7994
7920
  }
7995
7921
  initSolarDiagram() {
7996
7922
  const { SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERIES: BATTERY, INVERTERS: INVERTER, } = AtoGojsEditorModel.ENUM_TEMPLATES;
7997
- const ListItemsCreateEntityTemplate = [
7998
- SOLAR_POWER,
7999
- POWER_CONDITIONING_UNIT,
8000
- BATTERY,
8001
- INVERTER,
8002
- ];
7923
+ const ListItemsCreateEntityTemplate = [SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERY, INVERTER];
8003
7924
  ListItemsCreateEntityTemplate.map((e) => {
8004
7925
  if (!!AtoGojsEditorModel.NODE_TEMPLATES[e]) {
8005
7926
  this.makeEntityTemplateEnergy(AtoGojsEditorModel.NODE_TEMPLATES[e].icon, AtoGojsEditorModel.NODE_TEMPLATES[e].name);
@@ -8080,11 +8001,7 @@ class AtoDefaultGojsEditor {
8080
8001
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8081
8002
  margin: 4,
8082
8003
  }, new go.Binding('text', 'textComponent'))),
8083
- }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => x ? 'white' : 'transparent')
8084
- // new go.Binding('margin', 'isFormat', (x) =>
8085
- // x ? new go.Margin(5, 0, 5, 5) : new go.Margin(5, 5, 5, 5),
8086
- // ),
8087
- )));
8004
+ }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => (x ? 'white' : 'transparent')))));
8088
8005
  // arrow
8089
8006
  elements.push(this.$(go.Shape, // the "from" arrowhead
8090
8007
  {
@@ -8201,9 +8118,7 @@ class AtoDefaultGojsEditor {
8201
8118
  click: function (e, obj) {
8202
8119
  alert('Option 2 clicked!');
8203
8120
  },
8204
- })
8205
- // ... add more options as needed ...
8206
- );
8121
+ }));
8207
8122
  const node = this.$(go.Node, 'Spot', {
8208
8123
  // fromSpot: go.Spot.RightSide,
8209
8124
  // toSpot: go.Spot.LeftSide,
@@ -8254,8 +8169,7 @@ class AtoDefaultGojsEditor {
8254
8169
  },
8255
8170
  doubleClick: (e, obj) => {
8256
8171
  const node = obj.part;
8257
- if (node?.ob?.isTypeInflowOfPlantCell &&
8258
- !this._initialOptions?.isReadOnly) {
8172
+ if (node?.ob?.isTypeInflowOfPlantCell && !this._initialOptions?.isReadOnly) {
8259
8173
  // obj?.data?.onSelected(node?.ob?.nodePlantCellParent);
8260
8174
  // this.isShowNodeInfo
8261
8175
  // ? self.onDoubleClickNode.emit({
@@ -8563,11 +8477,10 @@ class AtoDefaultGojsEditor {
8563
8477
  ? this.generateActionGroup([
8564
8478
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
8565
8479
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
8566
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
8567
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
8568
- .IMMERSED_UF_WATER_TREATMENTS].name,
8569
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
8570
- .PRESSURIZED_UF_WATER_TREATMENTS].name,
8480
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
8481
+ .name,
8482
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
8483
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
8571
8484
  ].includes(title)
8572
8485
  ? [
8573
8486
  AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
@@ -8623,8 +8536,7 @@ class AtoDefaultGojsEditor {
8623
8536
  }, new go.Binding('text', 'name').makeTwoWay(), new go.Binding('editable', '', (data) => {
8624
8537
  return !(AtoGojsEditorModel.TYPE_COMPONENT_WATER?.includes(data?.systemType) &&
8625
8538
  data?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
8626
- data?.topologyType !==
8627
- ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
8539
+ data?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
8628
8540
  })))), this.$(go.Panel, 'Vertical', {
8629
8541
  alignment: go.Spot.Left,
8630
8542
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
@@ -8811,19 +8723,7 @@ class AtoDefaultGojsEditor {
8811
8723
  AtoDefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS,
8812
8724
  // DefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
8813
8725
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
8814
- ])
8815
- // new go.Binding('visible', 'isNotAction', (x) => !x),
8816
- )
8817
- // this.$(
8818
- // go.Panel,
8819
- // 'Horizontal',
8820
- // { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
8821
- // this.generateActionGroup([DefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS]),
8822
- // new go.Binding('visible', '', (x) => {
8823
- // return x?.isOnlyDetails && !x?.isNotAction ? true : false;
8824
- // }),
8825
- // ),
8826
- ),
8726
+ ]))),
8827
8727
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8828
8728
  margin: 4,
8829
8729
  }, new go.Binding('text', 'name').makeTwoWay())),
@@ -8861,7 +8761,8 @@ class AtoDefaultGojsEditor {
8861
8761
  desiredSize: new go.Size(size.w - 20, size.h - 65),
8862
8762
  imageStretch: go.GraphObject.Uniform,
8863
8763
  }, new go.Binding('source', 'pathImage', (x) => x ??
8864
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL].icon)), this.$(go.TextBlock, {
8764
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL]
8765
+ .icon)), this.$(go.TextBlock, {
8865
8766
  row: 2,
8866
8767
  margin: new go.Margin(10, 0, 3, 0),
8867
8768
  editable: true,
@@ -8880,12 +8781,7 @@ class AtoDefaultGojsEditor {
8880
8781
  }), this.$(go.Panel, 'Vertical', {
8881
8782
  alignment: go.Spot.Right,
8882
8783
  alignmentFocus: new go.Spot(1, 0.5, -8, 0),
8883
- })
8884
- // this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true),
8885
- // this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true),
8886
- // this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false),
8887
- // this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false),
8888
- );
8784
+ }));
8889
8785
  this.myDiagram.nodeTemplateMap.set(title, node);
8890
8786
  }
8891
8787
  makeEntityWithdrawOrDischarge(icon, title, size = {
@@ -8963,15 +8859,7 @@ class AtoDefaultGojsEditor {
8963
8859
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8964
8860
  margin: 4,
8965
8861
  }, new go.Binding('text', 'name').makeTwoWay())),
8966
- }, new go.Binding('text', 'name').makeTwoWay()
8967
- // {
8968
- // // define a tooltip for each node that displays the color as text
8969
- // toolTip: this.$(
8970
- // 'ToolTip',
8971
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
8972
- // ), // end of Adornment
8973
- // },
8974
- ))), this.$(go.Panel, 'Vertical', {
8862
+ }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.Panel, 'Vertical', {
8975
8863
  alignment: go.Spot.Left,
8976
8864
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
8977
8865
  }), this.$(go.Panel, 'Vertical', {
@@ -9052,38 +8940,31 @@ class AtoDefaultGojsEditor {
9052
8940
  const self = this;
9053
8941
  return this.$('Button', {
9054
8942
  click: function (e, obj) {
9055
- self.openActionMenu();
9056
8943
  const filteredActions = _.filter(obj.part?.['ob']?.actions ?? actions, (action) => {
9057
8944
  // Filter Insight button
9058
8945
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
9059
8946
  return !!obj.part?.['ob']?.id;
9060
8947
  }
9061
8948
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME &&
9062
- obj.part?.['ob']?.type !==
9063
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
8949
+ obj.part?.['ob']?.type !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
9064
8950
  AtoGojsEditorModel.TYPE_COMPONENT_WATER?.includes(obj.part?.['ob']?.systemType) &&
9065
- obj.part?.['ob']?.topologyType !==
9066
- ATO_ECOMPONENT_PLANT_TYPE.WATER &&
9067
- obj.part?.['ob']?.topologyType !==
9068
- ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL) {
8951
+ obj.part?.['ob']?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
8952
+ obj.part?.['ob']?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL) {
9069
8953
  return false;
9070
8954
  }
9071
8955
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW &&
9072
8956
  self.plantSatus === ATO_EPlantType.BASIC_PLANT &&
9073
- obj.part?.data?.type ===
9074
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
8957
+ obj.part?.data?.type === AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
9075
8958
  return false;
9076
8959
  }
9077
8960
  return true;
9078
8961
  }).map((e) => {
9079
- if (ATO_ECOMPONENT_PLANT_TYPE.STEAM ===
9080
- obj.part?.['ob']?.topologyType &&
8962
+ if (ATO_ECOMPONENT_PLANT_TYPE.STEAM === obj.part?.['ob']?.topologyType &&
9081
8963
  e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
9082
8964
  return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
9083
8965
  }
9084
8966
  if (e === AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS &&
9085
- obj?.part?.['ob']?.systemType ===
9086
- AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
8967
+ obj?.part?.['ob']?.systemType === AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
9087
8968
  return AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD;
9088
8969
  }
9089
8970
  return e;
@@ -9124,8 +9005,7 @@ class AtoDefaultGojsEditor {
9124
9005
  break;
9125
9006
  case AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME:
9126
9007
  onClickFn = () => {
9127
- if (obj.part?.data?.type ===
9128
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
9008
+ if (obj.part?.data?.type === AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
9129
9009
  self.onRename.emit({
9130
9010
  left: e?.['Wr']?.x - 50,
9131
9011
  top: e?.['Wr']?.y,
@@ -9180,6 +9060,7 @@ class AtoDefaultGojsEditor {
9180
9060
  },
9181
9061
  };
9182
9062
  });
9063
+ self.openActionMenu();
9183
9064
  },
9184
9065
  'ButtonBorder.strokeWidth': 0,
9185
9066
  'ButtonBorder.fill': 'white',
@@ -9235,8 +9116,7 @@ class AtoDefaultGojsEditor {
9235
9116
  if (nodedata?.movable !== undefined && nodedata?.movable !== null) {
9236
9117
  newnode.movable = nodedata?.movable;
9237
9118
  }
9238
- newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y +
9239
- this.findLocYFromnode(fromnode) * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT);
9119
+ newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y + this.findLocYFromnode(fromnode) * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT);
9240
9120
  e.diagram.commitTransaction('Create Node and Link');
9241
9121
  }
9242
9122
  findLocYFromnode(fromnode) {
@@ -9256,20 +9136,12 @@ class AtoDefaultGojsEditor {
9256
9136
  return this.isEmptyYLoc(locYAlreadyExist, i);
9257
9137
  }
9258
9138
  isEmptyYLoc(locYAlreadyExist, i) {
9259
- if (!_.some(locYAlreadyExist, (x) => x <
9260
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
9261
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
9262
- x >
9263
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
9264
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
9139
+ if (!_.some(locYAlreadyExist, (x) => x < i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT + AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
9140
+ x > i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT - AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
9265
9141
  return i;
9266
9142
  }
9267
- if (!_.some(locYAlreadyExist, (x) => x <
9268
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
9269
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
9270
- x >
9271
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
9272
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
9143
+ if (!_.some(locYAlreadyExist, (x) => x < -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT + AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
9144
+ x > -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT - AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
9273
9145
  return -i;
9274
9146
  }
9275
9147
  return null;
@@ -9305,9 +9177,7 @@ class AtoDefaultGojsEditor {
9305
9177
  width: 40,
9306
9178
  height: 40,
9307
9179
  alignment: align,
9308
- stretch: horizontal
9309
- ? go.GraphObject.Horizontal
9310
- : go.GraphObject.Vertical,
9180
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
9311
9181
  portId: name,
9312
9182
  fromSpot: spot,
9313
9183
  fromLinkable: output,
@@ -9354,35 +9224,7 @@ class AtoDefaultGojsEditor {
9354
9224
  stroke: '#919CA5',
9355
9225
  width: 40,
9356
9226
  height: 40, // Match the panel's height
9357
- })
9358
- // this.$(
9359
- // go.TextBlock,
9360
- // {
9361
- // name: 'textBlock',
9362
- // margin: 4,
9363
- // text: '\uf0da', // Mã Unicode tương ứng với fa-caret-left
9364
- // font: '900 12px "Font Awesome 6 Pro"',
9365
- // stroke: 'white', // Đặt màu chữ thành màu trắng
9366
- // cursor: 'pointer',
9367
- // visible: false,
9368
- // },
9369
- // new go.Binding('text', 'name', (_) => {
9370
- // switch (name) {
9371
- // case 'T':
9372
- // case 'B': {
9373
- // return '\uf0d7';
9374
- // }
9375
- // case 'L':
9376
- // case 'R': {
9377
- // return '\uf0da';
9378
- // }
9379
- // default: {
9380
- // return '\uf0d7';
9381
- // }
9382
- // }
9383
- // }),
9384
- // ),
9385
- );
9227
+ }));
9386
9228
  }
9387
9229
  makePort(name, align, spot, output, input) {
9388
9230
  // if (this._initialOptions.isReadOnly) {
@@ -9397,9 +9239,7 @@ class AtoDefaultGojsEditor {
9397
9239
  width: horizontal ? NaN : 8,
9398
9240
  height: !horizontal ? NaN : 8,
9399
9241
  alignment: align,
9400
- stretch: horizontal
9401
- ? go.GraphObject.Horizontal
9402
- : go.GraphObject.Vertical,
9242
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
9403
9243
  portId: name,
9404
9244
  fromSpot: spot,
9405
9245
  fromLinkable: output,
@@ -9448,12 +9288,10 @@ class AtoDefaultGojsEditor {
9448
9288
  return false;
9449
9289
  }
9450
9290
  if (data?.flowOfPlantCell) {
9451
- if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW &&
9452
- name === 'L') {
9291
+ if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW && name === 'L') {
9453
9292
  return true;
9454
9293
  }
9455
- if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.OUTFLOW &&
9456
- name === 'R') {
9294
+ if (data?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.OUTFLOW && name === 'R') {
9457
9295
  return true;
9458
9296
  }
9459
9297
  return false;
@@ -9547,84 +9385,7 @@ class AtoDefaultGojsEditor {
9547
9385
  // stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
9548
9386
  strokeWidth: 2,
9549
9387
  // strokeDashArray: [5, 5],
9550
- })
9551
- // this.$(go.Placeholder),
9552
- // this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0) }),
9553
- )
9554
- // this.$(go.TextBlock, title, {
9555
- // row: 0,
9556
- // margin: new go.Margin(0, 0, 0, 0),
9557
- // stroke: '#444444',
9558
- // font: 'normal 10pt Arial',
9559
- // textAlign: 'center',
9560
- // alignment: go.Spot.Left,
9561
- // },
9562
- // new go.Binding('text', 'key').makeTwoWay(),),
9563
- // this.$(
9564
- // go.Panel,
9565
- // 'Table',
9566
- // {
9567
- // alignment: go.Spot.TopLeft,
9568
- // alignmentFocus: new go.Spot(0, 0, -10, -10),
9569
- // // padding: new go.Margin(0, 0, 50, 0),
9570
- // },
9571
- // this.$(
9572
- // go.Panel,
9573
- // 'Horizontal',
9574
- // {
9575
- // row: 0,
9576
- // alignment: go.Spot.Left,
9577
- // },
9578
- // this.$(go.Picture, icon, {
9579
- // row: 0,
9580
- // // alignment: go.Spot.Center,
9581
- // alignment: go.Spot.Left,
9582
- // maxSize: new go.Size(40, 40),
9583
- // imageStretch: go.GraphObject.Uniform,
9584
- // }),
9585
- // this.$(
9586
- // go.Panel,
9587
- // 'Table',
9588
- // {
9589
- // column: 1,
9590
- // defaultAlignment: go.Spot.Left,
9591
- // alignmentFocus: new go.Spot(0, 0, 0, 20),
9592
- // },
9593
- // this.$(go.TextBlock, title, {
9594
- // row: 0,
9595
- // margin: new go.Margin(3, 3, 5, 10),
9596
- // // maxSize: new go.Size(size.w - 20, NaN),
9597
- // stroke: '#444444',
9598
- // font: 'normal 10pt Arial',
9599
- // textAlign: 'center',
9600
- // alignment: go.Spot.Left,
9601
- // }),
9602
- // this.$(
9603
- // go.TextBlock,
9604
- // {
9605
- // row: 1,
9606
- // margin: new go.Margin(0, 3, 3, 10),
9607
- // editable: true,
9608
- // // maxSize: new go.Size(size.w - 20, 40),
9609
- // stroke: '#000D42',
9610
- // font: 'bold 10pt Arial',
9611
- // textAlign: 'center',
9612
- // wrap: go.TextBlock.None,
9613
- // overflow: go.TextBlock.OverflowEllipsis,
9614
- // },
9615
- // new go.Binding('text', 'name').makeTwoWay(),
9616
- // {
9617
- // // define a tooltip for each node that displays the color as text
9618
- // toolTip: this.$(
9619
- // 'ToolTip',
9620
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
9621
- // ), // end of Adornment
9622
- // },
9623
- // ),
9624
- // ),
9625
- // ),
9626
- // ),
9627
- );
9388
+ })));
9628
9389
  this.myDiagram.groupTemplateMap.set(title, node);
9629
9390
  }
9630
9391
  makeGroupTemplate(icon, title, size = { w: 80, h: 80 }) {
@@ -9761,9 +9522,7 @@ class AtoDefaultGojsEditor {
9761
9522
  // imageStretch: go.GraphObject.Uniform,
9762
9523
  // margin: new go.Margin(130, 0, 0, 0),
9763
9524
  }, new go.Binding('margin', 'margin'), new go.Binding('width', 'width'), new go.Binding('height', 'height'), new go.Binding('source', '', (data) => {
9764
- return data?.source
9765
- ? data?.source
9766
- : AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH;
9525
+ return data?.source ? data?.source : AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH;
9767
9526
  }))));
9768
9527
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE, node);
9769
9528
  }
@@ -9864,8 +9623,7 @@ class AtoDefaultGojsEditor {
9864
9623
  itemTemplate: this.$(go.Panel, 'TableRow', {
9865
9624
  cursor: 'pointer',
9866
9625
  click: (e, obj) => {
9867
- if (obj.panel.part.data?.dataTable[obj.row]?.isEditable ===
9868
- false) {
9626
+ if (obj.panel.part.data?.dataTable[obj.row]?.isEditable === false) {
9869
9627
  return;
9870
9628
  }
9871
9629
  self.onClikParamOfTable.emit({
@@ -9924,8 +9682,7 @@ class AtoDefaultGojsEditor {
9924
9682
  ? `${data?.tagName || ''} `
9925
9683
  : ''}${data?.value}`;
9926
9684
  }), new go.Binding('visible', '', (data) => {
9927
- if (!!this._initialOptions.isReadOnly &&
9928
- data?.tagName) {
9685
+ if (!!this._initialOptions.isReadOnly && data?.tagName) {
9929
9686
  return true;
9930
9687
  }
9931
9688
  return !!data?.value;
@@ -9939,9 +9696,7 @@ class AtoDefaultGojsEditor {
9939
9696
  return data.color;
9940
9697
  }), new go.Binding('maxSize', '', (data) => {
9941
9698
  if (!data?.isReadOnly && !this._initialOptions.isReadOnly) {
9942
- return new go.Size(data?.maxSizeValue?.width
9943
- ? data?.maxSizeValue?.width - 15
9944
- : NaN, data?.maxSizeValue?.height ?? NaN);
9699
+ return new go.Size(data?.maxSizeValue?.width ? data?.maxSizeValue?.width - 15 : NaN, data?.maxSizeValue?.height ?? NaN);
9945
9700
  }
9946
9701
  return data?.maxSizeValue;
9947
9702
  }), new go.Binding('font', '', (data) => {
@@ -9961,13 +9716,11 @@ class AtoDefaultGojsEditor {
9961
9716
  height: 14,
9962
9717
  width: 14,
9963
9718
  }, new go.Binding('visible', '', (data, panel) => {
9964
- return (!data?.isReadOnly && !this._initialOptions.isReadOnly);
9719
+ return !data?.isReadOnly && !this._initialOptions.isReadOnly;
9965
9720
  }), new go.Binding('opacity', '', (data, panel) => {
9966
9721
  return data?.isEditable === false ? 0.6 : 1;
9967
9722
  })))),
9968
- }
9969
- // new go.Binding('text', 'name')
9970
- )));
9723
+ })));
9971
9724
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, node);
9972
9725
  }
9973
9726
  makeMassBalance() {
@@ -10065,7 +9818,9 @@ class AtoDefaultGojsEditor {
10065
9818
  fill: '#FCFCFD',
10066
9819
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
10067
9820
  strokeWidth: 2,
10068
- }), this.$(go.Placeholder, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), { padding: new go.Margin(0, 0, 0, 0) })), this.$(go.Panel, 'Spot', {
9821
+ }), this.$(go.Placeholder, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), {
9822
+ padding: new go.Margin(0, 0, 0, 0),
9823
+ })), this.$(go.Panel, 'Spot', {
10069
9824
  width: 0,
10070
9825
  height: 0,
10071
9826
  alignment: new go.Spot(0, 0.5, 0, 112),
@@ -10354,8 +10109,7 @@ class AtoDefaultGojsEditor {
10354
10109
  // : node?.layout;
10355
10110
  if (data?.layoutValue !== data?.layoutValueClone) {
10356
10111
  data.layoutValueClone = data?.layoutValue;
10357
- return data?.layoutValue ===
10358
- AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
10112
+ return data?.layoutValue === AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
10359
10113
  ? self.$(go.LayeredDigraphLayout, { direction: 0 })
10360
10114
  : self.$(go.Layout);
10361
10115
  }
@@ -10516,82 +10270,7 @@ class AtoDefaultGojsEditor {
10516
10270
  AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS,
10517
10271
  AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
10518
10272
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
10519
- ])
10520
- // this.$(
10521
- // // Edit Text
10522
- // 'Button',
10523
- // {
10524
- // click: self.editTextGroupZone,
10525
- // 'ButtonBorder.strokeWidth': 0,
10526
- // 'ButtonBorder.fill': 'white',
10527
- // },
10528
- // this.$(go.TextBlock, {
10529
- // margin: 4,
10530
- // text: '\ue1bf',
10531
- // font: '20px "Font Awesome 6 Pro"',
10532
- // cursor: 'pointer',
10533
- // stroke: '#2c2c2c',
10534
- // }),
10535
- // ),
10536
- // this.$(
10537
- // // Open Detail
10538
- // 'Button',
10539
- // {
10540
- // click: (e, obj: any) => {
10541
- // const node = obj.part;
10542
- // self.onOpenDetail.emit({
10543
- // node,
10544
- // });
10545
- // },
10546
- // 'ButtonBorder.strokeWidth': 0,
10547
- // 'ButtonBorder.fill': 'white',
10548
- // },
10549
- //
10550
- // this.$(go.TextBlock, {
10551
- // margin: 4,
10552
- // text: '\ue49a',
10553
- // font: '20px "Font Awesome 6 Pro"',
10554
- // cursor: 'pointer',
10555
- // }),
10556
- // ),
10557
- // !this._initialOptions.isReadOnly
10558
- // ? this.$(
10559
- // 'Button',
10560
- // {
10561
- // actionMove: self.dragNewNode, // defined below, to support dragging from the button
10562
- // _dragData: {
10563
- // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
10564
- // name: 0,
10565
- // color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
10566
- // },
10567
- // click: self.clickNewNode, // defined below, to support a click on the button
10568
- // 'ButtonBorder.strokeWidth': 0,
10569
- // 'ButtonBorder.fill': 'white',
10570
- // },
10571
- // this.$(go.TextBlock, {
10572
- // margin: 4,
10573
- // text: '\ue157',
10574
- // font: '20px "Font Awesome 6 Pro"',
10575
- // cursor: 'pointer',
10576
- // stroke: '#2c2c2c',
10577
- // }),
10578
- // )
10579
- // : {},
10580
- // this.$(
10581
- // 'Button',
10582
- // {
10583
- // click: self.deleteNode,
10584
- // 'ButtonBorder.strokeWidth': 0,
10585
- // 'ButtonBorder.fill': 'white',
10586
- // },
10587
- // this.$(go.TextBlock, {
10588
- // margin: 4,
10589
- // text: '\uf2ed',
10590
- // font: '20px "Font Awesome 6 Pro"',
10591
- // cursor: 'pointer',
10592
- // }),
10593
- // ),
10594
- )),
10273
+ ]))),
10595
10274
  }, this.$(go.Panel, 'Auto', this.$(go.Shape, 'RoundedRectangle', {
10596
10275
  fill: 'transparent',
10597
10276
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
@@ -10705,10 +10384,7 @@ class AtoDefaultGojsEditor {
10705
10384
  value: x?.quantity,
10706
10385
  unit: x?.unit,
10707
10386
  });
10708
- return (formatted.shortenedNumber +
10709
- ' ' +
10710
- formatted.unitPrefixes +
10711
- x?.unit ?? '');
10387
+ return formatted.shortenedNumber + ' ' + formatted.unitPrefixes + x?.unit ?? '';
10712
10388
  }), new go.Binding('visible', 'data', (x) => typeof x?.quantity === 'number')), this.$(go.TextBlock, {
10713
10389
  margin: new go.Margin(0, 5, 10, 0),
10714
10390
  textAlign: 'center',
@@ -10963,8 +10639,7 @@ class AtoDefaultGojsEditor {
10963
10639
  // return;
10964
10640
  // }
10965
10641
  // const newDocument = newWindow?.document;
10966
- if (!this.myDiagram?.model?.nodeDataArray?.length &&
10967
- !this.myDiagram?.model?.linkDataArray?.length) {
10642
+ if (!this.myDiagram?.model?.nodeDataArray?.length && !this.myDiagram?.model?.linkDataArray?.length) {
10968
10643
  return;
10969
10644
  }
10970
10645
  const svg = this.myDiagram.makeSvg({
@@ -10985,8 +10660,7 @@ class AtoDefaultGojsEditor {
10985
10660
  svgElement.setAttribute('stroke', 'rgba(64, 181, 206, 0.6)');
10986
10661
  }
10987
10662
  // Empty Value
10988
- if (graphObject?.name === 'textBlockValue' ||
10989
- graphObject?.name === 'textBlockUnitPrefixes') {
10663
+ if (graphObject?.name === 'textBlockValue' || graphObject?.name === 'textBlockUnitPrefixes') {
10990
10664
  svgElement.textContent = '';
10991
10665
  }
10992
10666
  if (svgElement.clipPath) {
@@ -11035,6 +10709,45 @@ class AtoDefaultGojsEditor {
11035
10709
  this.menuTrigger.openMenu();
11036
10710
  }
11037
10711
  }
10712
+ // openActionMenu(data: {
10713
+ // e: any,
10714
+ // obj: any,
10715
+ // type?: string;
10716
+ // }) {
10717
+ // let mousePt = this.myDiagram.lastInput.viewPoint;
10718
+ // let template = document.getElementById(this.actionMenuId);
10719
+ // switch (data?.type) {
10720
+ // case 'droplist': {
10721
+ // // When this node is clicked, adjust the menu position
10722
+ // const buttonRect = data?.obj?.part?.actualBounds;
10723
+ // const diagram = data?.e.diagram;
10724
+ // const point = diagram.transformDocToView(new go.Point(buttonRect?.x, buttonRect?.bottom));
10725
+ // mousePt = {
10726
+ // x: point.x,
10727
+ // y: point.y
10728
+ // }
10729
+ // break;
10730
+ // }
10731
+ // case 'action': {
10732
+ // mousePt = this.myDiagram.lastInput.viewPoint;
10733
+ // this.optionList = this.actions;
10734
+ // template = document.getElementById(this.actionMenuId);
10735
+ // break;
10736
+ // }
10737
+ // default: {
10738
+ // mousePt = this.myDiagram.lastInput.viewPoint;
10739
+ // this.optionList = this.actions;
10740
+ // template = document.getElementById(this.actionMenuId);
10741
+ // }
10742
+ // }
10743
+ // if (template) {
10744
+ // template.style.display = '';
10745
+ // template.style.position = 'absolute';
10746
+ // template.style.left = mousePt.x + 'px';
10747
+ // template.style.top = mousePt.y + 'px';
10748
+ // this.menuTrigger.openMenu();
10749
+ // }
10750
+ // }
11038
10751
  unsubscribeAll() {
11039
10752
  if (this._subscriptionList) {
11040
10753
  this._subscriptionList.unsubscribe();