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.
@@ -3455,11 +3455,9 @@ var ENUM_ASSET_PARAMETERS;
3455
3455
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_WET_BULB_TEMPERATURE"] = "DA Wet Bulb Temperature";
3456
3456
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_RANGE"] = "DARange";
3457
3457
  ENUM_ASSET_PARAMETERS["DATA_ANALYSIS_APPROACH"] = "DAApproach";
3458
- // Cooling Tower -- Performance -- Efficiency and Performance
3459
- ENUM_ASSET_PARAMETERS["EFFICIENCY_DAILY_AVERAGE"] = "Efficiency Daily Average";
3460
- ENUM_ASSET_PARAMETERS["EFFICIENCY_ADJUSTED_DAILY_AVERAGE"] = "Efficiency Adjusted Daily Average";
3461
- ENUM_ASSET_PARAMETERS["LG_RATIO"] = "L/G Ratio";
3462
- ENUM_ASSET_PARAMETERS["NTU"] = "NTU";
3458
+ // Cooling Tower -- Performance -- Efficiency
3459
+ ENUM_ASSET_PARAMETERS["DAILY_EFFICIENCY_AVG"] = "Daily Efficiency Avg";
3460
+ ENUM_ASSET_PARAMETERS["ADJUSTED_EFFICIENCY_DAILY_AVG"] = "Adjusted Efficiency Daily Avg";
3463
3461
  // Cooling Tower -- Performance -- Water & Energy Consumption
3464
3462
  ENUM_ASSET_PARAMETERS["WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE"] = "Make Up Water Flow Rate";
3465
3463
  ENUM_ASSET_PARAMETERS["WATER_ENERGY_CONSUMPTION_BLOWDOWN_FLOW_RATE"] = "Blowdown Water Flow Rate";
@@ -3479,8 +3477,8 @@ var ENUM_ASSET_PARAMETERS;
3479
3477
  ENUM_ASSET_PARAMETERS["KPIS_SUPPLY_TEMPERATURE"] = "KPIs Supply Temperature";
3480
3478
  ENUM_ASSET_PARAMETERS["KPIS_RANGE"] = "KPIs Range";
3481
3479
  ENUM_ASSET_PARAMETERS["KPIS_APPROACH"] = "KPIs Approach";
3482
- ENUM_ASSET_PARAMETERS["KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE"] = "KPIs Efficiency Adjusted Daily Average";
3483
- ENUM_ASSET_PARAMETERS["KPIS_LG_RATIO"] = "KPIs L/G Ratio";
3480
+ ENUM_ASSET_PARAMETERS["DAILY_EFFICIENCY"] = "Daily Efficiency";
3481
+ ENUM_ASSET_PARAMETERS["ADJUSTED_EFFICIENCY"] = "Adjusted Efficiency";
3484
3482
  })(ENUM_ASSET_PARAMETERS || (ENUM_ASSET_PARAMETERS = {}));
3485
3483
  var WATER_SYSTEMS_NAME;
3486
3484
  (function (WATER_SYSTEMS_NAME) {
@@ -3548,7 +3546,7 @@ var WATER_SYSTEMS_NAME;
3548
3546
  // For Cooling Tower - Performance
3549
3547
  WATER_SYSTEMS_NAME["VISUAL_MANAGEMENT"] = "Visual Management";
3550
3548
  WATER_SYSTEMS_NAME["DATA_ANALYSIS"] = "Data Analysis";
3551
- WATER_SYSTEMS_NAME["EFFICIENCY_AND_PERFORMANCE"] = "Efficiency and Performance";
3549
+ WATER_SYSTEMS_NAME["EFFICIENCY"] = "Efficiency";
3552
3550
  WATER_SYSTEMS_NAME["WATER_AND_ENERGY_CONSUMPTION"] = "Water & Energy Consumption";
3553
3551
  WATER_SYSTEMS_NAME["CHEMICALS_CONSUMPTION"] = "Chemicals Consumption";
3554
3552
  WATER_SYSTEMS_NAME["DESIGN_PARAMETERS"] = "Design Parameters";
@@ -3979,21 +3977,13 @@ const DATA_ASSET_PARAMETER_FIELDS = {
3979
3977
  isFrom: ATO_MAPPER_FROM.INDICATOR,
3980
3978
  },
3981
3979
  // Cooling Tower -- Performance -- Efficiency and Performance
3982
- [ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE]: {
3983
- name: ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE,
3984
- key: ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE,
3985
- },
3986
- [ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE]: {
3987
- name: ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
3988
- key: ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
3989
- },
3990
- [ENUM_ASSET_PARAMETERS.LG_RATIO]: {
3991
- name: ENUM_ASSET_PARAMETERS.COMMON_LG_RATIO,
3992
- key: ENUM_ASSET_PARAMETERS.LG_RATIO,
3980
+ [ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG]: {
3981
+ name: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG,
3982
+ key: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG,
3993
3983
  },
3994
- [ENUM_ASSET_PARAMETERS.NTU]: {
3995
- name: ENUM_ASSET_PARAMETERS.NTU,
3996
- key: ENUM_ASSET_PARAMETERS.NTU,
3984
+ [ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG]: {
3985
+ name: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG,
3986
+ key: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG,
3997
3987
  },
3998
3988
  // Cooling Tower -- Performance -- Water & Energy Consumption
3999
3989
  [ENUM_ASSET_PARAMETERS.WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE]: {
@@ -4079,18 +4069,18 @@ const DATA_ASSET_PARAMETER_FIELDS = {
4079
4069
  visible: false,
4080
4070
  isFrom: ATO_MAPPER_FROM.INDICATOR,
4081
4071
  },
4082
- [ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE]: {
4083
- name: 'Efficiency Adjusted Daily Average',
4084
- key: ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE,
4072
+ [ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY]: {
4073
+ name: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY,
4074
+ key: ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY,
4085
4075
  value: 'Mapping in Efficiency & Performance section',
4086
4076
  isEditable: false,
4087
4077
  isReadOnly: true,
4088
4078
  visible: false,
4089
4079
  isFrom: ATO_MAPPER_FROM.INDICATOR,
4090
4080
  },
4091
- [ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO]: {
4092
- name: ENUM_ASSET_PARAMETERS.COMMON_LG_RATIO,
4093
- key: ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO,
4081
+ [ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY]: {
4082
+ name: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY,
4083
+ key: ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY,
4094
4084
  value: 'Mapping in Efficiency & Performance section',
4095
4085
  isEditable: false,
4096
4086
  isReadOnly: true,
@@ -4191,7 +4181,7 @@ const DATA_WATER_SYSTEMS = {
4191
4181
  // Cooling Tower --- Performance view
4192
4182
  [WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT]: Object.assign({ title: WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT }, STYLE_TABLE_PARAM.LONDON_HUE),
4193
4183
  [WATER_SYSTEMS_NAME.DATA_ANALYSIS]: Object.assign({ title: WATER_SYSTEMS_NAME.DATA_ANALYSIS }, STYLE_TABLE_PARAM.LONDON_HUE),
4194
- [WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE]: Object.assign({ title: WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE }, STYLE_TABLE_PARAM.LONDON_HUE),
4184
+ [WATER_SYSTEMS_NAME.EFFICIENCY]: Object.assign({ title: WATER_SYSTEMS_NAME.EFFICIENCY }, STYLE_TABLE_PARAM.LONDON_HUE),
4195
4185
  [WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION]: Object.assign({ title: WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION }, STYLE_TABLE_PARAM.CERULEAN),
4196
4186
  [WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION]: Object.assign({ title: WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION }, STYLE_TABLE_PARAM.LONDON_HUE),
4197
4187
  [WATER_SYSTEMS_NAME.DESIGN_PARAMETERS]: Object.assign({ title: WATER_SYSTEMS_NAME.DESIGN_PARAMETERS }, STYLE_TABLE_PARAM.LONDON_HUE),
@@ -4299,11 +4289,9 @@ const ASSET_CATEGORY_PARAMS = {
4299
4289
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DATA_ANALYSIS_RANGE],
4300
4290
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DATA_ANALYSIS_APPROACH],
4301
4291
  ],
4302
- [WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE]: [
4303
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.EFFICIENCY_DAILY_AVERAGE],
4304
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.EFFICIENCY_ADJUSTED_DAILY_AVERAGE],
4305
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.LG_RATIO],
4306
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.NTU],
4292
+ [WATER_SYSTEMS_NAME.EFFICIENCY]: [
4293
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY_AVG],
4294
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY_DAILY_AVG],
4307
4295
  ],
4308
4296
  [WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION]: [
4309
4297
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.WATER_ENERGY_CONSUMPTION_MAKEUP_FLOW_RATE],
@@ -4327,8 +4315,8 @@ const ASSET_CATEGORY_PARAMS = {
4327
4315
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_SUPPLY_TEMPERATURE],
4328
4316
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_RANGE],
4329
4317
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_APPROACH],
4330
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_EFFICIENCY_ADJUSTED_DAILY_AVERAGE],
4331
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.KPIS_LG_RATIO],
4318
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DAILY_EFFICIENCY],
4319
+ DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.ADJUSTED_EFFICIENCY],
4332
4320
  ],
4333
4321
  };
4334
4322
  // For Boiler
@@ -4473,21 +4461,15 @@ const ASSET_CATEGORY_PARAMS__RO_WATER_TREATMENT = {
4473
4461
  [WATER_SYSTEMS_NAME.RO_PRE_FILTER__FLOW]: [
4474
4462
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.DIFFERENTIAL_PRESSURE],
4475
4463
  ],
4476
- [WATER_SYSTEMS_NAME.RO_HP_PUMP__FLOW]: [
4477
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PRESSURE],
4478
- ],
4464
+ [WATER_SYSTEMS_NAME.RO_HP_PUMP__FLOW]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PRESSURE]],
4479
4465
  [WATER_SYSTEMS_NAME.RO_FEED__CHEMISTRY]: [
4480
4466
  // DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TDS],
4481
4467
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY],
4482
4468
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TEMPERATURE],
4483
4469
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
4484
4470
  ],
4485
- [WATER_SYSTEMS_NAME.RO_CONCENTRATE__CHEMISTRY]: [
4486
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY],
4487
- ],
4488
- [WATER_SYSTEMS_NAME.RO_RO__CHEMISTRY]: [
4489
- DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.REJECTION_RATE],
4490
- ],
4471
+ [WATER_SYSTEMS_NAME.RO_CONCENTRATE__CHEMISTRY]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.CONDUCTIVITY]],
4472
+ [WATER_SYSTEMS_NAME.RO_RO__CHEMISTRY]: [DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.REJECTION_RATE]],
4491
4473
  [WATER_SYSTEMS_NAME.RO_PERMEATE__CHEMISTRY]: [
4492
4474
  // DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.TDS],
4493
4475
  DATA_ASSET_PARAMETER_FIELDS[ENUM_ASSET_PARAMETERS.PH],
@@ -4514,7 +4496,7 @@ var ATO_ASSET_LAYERS;
4514
4496
  ATO_ASSET_LAYERS["FLOW"] = "Flow";
4515
4497
  ATO_ASSET_LAYERS["CHEMISTRY"] = "Chemistry";
4516
4498
  ATO_ASSET_LAYERS["ANALYTICS"] = "Analytics";
4517
- ATO_ASSET_LAYERS["PERFORMANCE"] = "Performance";
4499
+ ATO_ASSET_LAYERS["EFFICIENCY"] = "Efficiency";
4518
4500
  })(ATO_ASSET_LAYERS || (ATO_ASSET_LAYERS = {}));
4519
4501
  var ATO_SPOT_LOCATION_TYPE;
4520
4502
  (function (ATO_SPOT_LOCATION_TYPE) {
@@ -5500,7 +5482,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
5500
5482
  extendedData: {
5501
5483
  margin: new go.Margin(195, 20, 0, 0),
5502
5484
  },
5503
- extendedDataPerformance: {
5485
+ extendedDataEfficiency: {
5504
5486
  margin: new go.Margin(260, 20, 0, 0),
5505
5487
  },
5506
5488
  extendedDataResponsive: {
@@ -5549,37 +5531,31 @@ const ATO_COMPONENTS_GROUP_DATA = {
5549
5531
  visible: true,
5550
5532
  },
5551
5533
  },
5552
- Object.assign(Object.assign({ key: 101, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '343 10', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: new go.Size(130, 14), maxSizeNameParam: new go.Size(160, 14), waterSystem: WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT }))), visible: true, assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5553
- visible: true,
5554
- }, extendedDataResponsive: {
5555
- visible: false,
5556
- } }),
5557
- Object.assign(Object.assign({ key: 102, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 230' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.DATA_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.DATA_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: (e === null || e === void 0 ? void 0 : e.value) || '', isEditable: (e === null || e === void 0 ? void 0 : e.isEditable) === false ? false : true, isFrom: ATO_MAPPER_FROM.INDICATOR, maxSizeValue: new go.Size(130, 14), desiredSizeNameParam: new go.Size(136, 14), waterSystem: WATER_SYSTEMS_NAME.DATA_ANALYSIS }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5534
+ Object.assign(Object.assign({ key: 101, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '343 10', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: new go.Size(130, 14), maxSizeNameParam: new go.Size(160, 14), waterSystem: WATER_SYSTEMS_NAME.VISUAL_MANAGEMENT }))), visible: true, assetLayers: ATO_ASSET_LAYERS.EFFICIENCY, extendedData: {
5558
5535
  visible: true,
5559
5536
  }, extendedDataResponsive: {
5560
5537
  visible: false,
5561
5538
  } }),
5562
- Object.assign(Object.assign({ key: 103, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '667 620' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, desiredSizeValue: new go.Size(100, 14), desiredNameParam: new go.Size(160, 14), waterSystem: WATER_SYSTEMS_NAME.EFFICIENCY_AND_PERFORMANCE }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5539
+ Object.assign(Object.assign({ key: 102, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 230' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.DATA_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.DATA_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: (e === null || e === void 0 ? void 0 : e.value) || '', isEditable: (e === null || e === void 0 ? void 0 : e.isEditable) === false ? false : true, isFrom: ATO_MAPPER_FROM.INDICATOR, maxSizeValue: new go.Size(130, 14), desiredSizeNameParam: new go.Size(136, 14), waterSystem: WATER_SYSTEMS_NAME.DATA_ANALYSIS }))), assetLayers: ATO_ASSET_LAYERS.EFFICIENCY, extendedData: {
5563
5540
  visible: true,
5564
5541
  }, extendedDataResponsive: {
5565
5542
  visible: false,
5566
5543
  } }),
5567
- Object.assign(Object.assign({ key: 104, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 420' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: new go.Size(128, 14), maxSizeNameParam: new go.Size(140, 14), waterSystem: WATER_SYSTEMS_NAME.WATER_AND_ENERGY_CONSUMPTION }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5544
+ Object.assign(Object.assign({ key: 103, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '667 630' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EFFICIENCY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EFFICIENCY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, desiredSizeValue: new go.Size(100, 14), desiredNameParam: new go.Size(160, 14), waterSystem: WATER_SYSTEMS_NAME.EFFICIENCY }))), assetLayers: ATO_ASSET_LAYERS.EFFICIENCY, extendedData: {
5568
5545
  visible: true,
5569
5546
  }, extendedDataResponsive: {
5570
5547
  visible: false,
5571
5548
  } }),
5572
- Object.assign(Object.assign({ key: 107, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 640' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, desiredSizeValue: new go.Size(120, 14), desiredSizeNameParam: new go.Size(145, 14), waterSystem: WATER_SYSTEMS_NAME.CHEMICALS_CONSUMPTION }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5549
+ Object.assign(Object.assign({ key: 105, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '670 10' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.DESIGN_PARAMETERS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.DESIGN_PARAMETERS].map((e) => (Object.assign(Object.assign({}, e), { isEditable: true, maxSizeValue: new go.Size(120, 14),
5550
+ // minSizeValue: new go.Size(120, 14),
5551
+ maxSizeNameParam: new go.Size(180, 14),
5552
+ // desiredSize: new go.Size(180, 14),
5553
+ waterSystem: WATER_SYSTEMS_NAME.DESIGN_PARAMETERS, isCreateDirectly: true }))), assetLayers: ATO_ASSET_LAYERS.EFFICIENCY, extendedData: {
5573
5554
  visible: true,
5574
5555
  }, extendedDataResponsive: {
5575
5556
  visible: false,
5576
5557
  } }),
5577
- Object.assign(Object.assign({ key: 105, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '670 10' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.DESIGN_PARAMETERS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.DESIGN_PARAMETERS].map((e) => (Object.assign(Object.assign({}, e), { isEditable: true, maxSizeValue: new go.Size(120, 14), maxSizeNameParam: new go.Size(180, 14), waterSystem: WATER_SYSTEMS_NAME.DESIGN_PARAMETERS }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, extendedData: {
5578
- visible: true,
5579
- }, extendedDataResponsive: {
5580
- visible: false,
5581
- } }),
5582
- Object.assign(Object.assign({ key: 106, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 10' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE].map((e) => (Object.assign(Object.assign({}, e), { maxSizeValue: new go.Size(130, 14), desiredSizeNameParam: new go.Size(135, 14), waterSystem: WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE }))), assetLayers: ATO_ASSET_LAYERS.PERFORMANCE, isFrom: ATO_MAPPER_FROM.INDICATOR, extendedData: {
5558
+ Object.assign(Object.assign({ key: 106, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '10 10' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE].map((e) => (Object.assign(Object.assign({}, e), { maxSizeValue: new go.Size(130, 14), desiredSizeNameParam: new go.Size(135, 14), waterSystem: WATER_SYSTEMS_NAME.SYSTEM_KPIS__COOLING_TOWER__PERFORMANCE }))), assetLayers: ATO_ASSET_LAYERS.EFFICIENCY, isFrom: ATO_MAPPER_FROM.INDICATOR, extendedData: {
5583
5559
  visible: false,
5584
5560
  }, extendedDataResponsive: {
5585
5561
  visible: false,
@@ -5685,11 +5661,32 @@ const ATO_COMPONENTS_GROUP_DATA = {
5685
5661
  }, extendedDataResponsive: {
5686
5662
  visible: false,
5687
5663
  } }),
5688
- Object.assign(Object.assign({ key: 147, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 150, loc: '15 350', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS__IMMERSED_UF[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: new go.Size(140, 14), waterSystem: WATER_SYSTEMS_NAME.IMMERSED_UF_FEED }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
5689
- visible: true,
5690
- }, extendedDataResponsive: {
5691
- visible: false,
5692
- } }),
5664
+ // {
5665
+ // key: 147,
5666
+ // type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE,
5667
+ // group: 150,
5668
+ // loc: '15 350',
5669
+ // padding: new go.Margin(0, 0, 0, 0),
5670
+ // ...DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW],
5671
+ // minSizeValue: new go.Size(100, NaN),
5672
+ // selectable: false,
5673
+ // dataTable: ASSET_CATEGORY_PARAMS__IMMERSED_UF[
5674
+ // WATER_SYSTEMS_NAME.IMMERSED_UF_FEED__FLOW
5675
+ // ].map((e) => ({
5676
+ // ...e,
5677
+ // value: '',
5678
+ // isEditable: true,
5679
+ // maxSizeValue: new go.Size(140, 14),
5680
+ // waterSystem: WATER_SYSTEMS_NAME.IMMERSED_UF_FEED,
5681
+ // })),
5682
+ // assetLayers: ATO_ASSET_LAYERS.FLOW,
5683
+ // extendedData: {
5684
+ // visible: true,
5685
+ // },
5686
+ // extendedDataResponsive: {
5687
+ // visible: false,
5688
+ // },
5689
+ // },
5693
5690
  {
5694
5691
  key: 150,
5695
5692
  type: AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS,
@@ -6341,15 +6338,13 @@ class AtoDefaultGojsEditor {
6341
6338
  // Remove Node and Node Group
6342
6339
  _.forEach((_b = this.myDiagram.nodeTemplateMap) === null || _b === void 0 ? void 0 : _b.Hb, (temp) => {
6343
6340
  var _a, _b;
6344
- if ((temp === null || temp === void 0 ? void 0 : temp.key) &&
6345
- !((_b = (_a = this.editor.data) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.some((node) => (node === null || node === void 0 ? void 0 : node.type) === (temp === null || temp === void 0 ? void 0 : temp.key)))) {
6341
+ if ((temp === null || temp === void 0 ? void 0 : temp.key) && !((_b = (_a = this.editor.data) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.some((node) => (node === null || node === void 0 ? void 0 : node.type) === (temp === null || temp === void 0 ? void 0 : temp.key)))) {
6346
6342
  this.myDiagram.nodeTemplateMap.remove(temp === null || temp === void 0 ? void 0 : temp.key);
6347
6343
  }
6348
6344
  });
6349
6345
  _.forEach((_c = this.myDiagram.groupTemplateMap) === null || _c === void 0 ? void 0 : _c.Hb, (temp) => {
6350
6346
  var _a, _b;
6351
- if ((temp === null || temp === void 0 ? void 0 : temp.key) &&
6352
- !((_b = (_a = this.editor.data) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.some((node) => (node === null || node === void 0 ? void 0 : node.type) === (temp === null || temp === void 0 ? void 0 : temp.key)))) {
6347
+ if ((temp === null || temp === void 0 ? void 0 : temp.key) && !((_b = (_a = this.editor.data) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.some((node) => (node === null || node === void 0 ? void 0 : node.type) === (temp === null || temp === void 0 ? void 0 : temp.key)))) {
6353
6348
  this.myDiagram.groupTemplateMap.remove(temp === null || temp === void 0 ? void 0 : temp.key);
6354
6349
  }
6355
6350
  });
@@ -6376,13 +6371,11 @@ class AtoDefaultGojsEditor {
6376
6371
  this.makeGroupCoolingTowerTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6377
6372
  return;
6378
6373
  }
6379
- if ((node === null || node === void 0 ? void 0 : node.type) ===
6380
- AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS) {
6374
+ if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS) {
6381
6375
  this.makeGroupImmersedUFTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6382
6376
  return;
6383
6377
  }
6384
- if ((node === null || node === void 0 ? void 0 : node.type) ===
6385
- AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS) {
6378
+ if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS) {
6386
6379
  this.makeGroupCoolingTowerTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6387
6380
  return;
6388
6381
  }
@@ -6390,8 +6383,7 @@ class AtoDefaultGojsEditor {
6390
6383
  this.makeGroupZoneTemplate();
6391
6384
  return;
6392
6385
  }
6393
- if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
6394
- (node === null || node === void 0 ? void 0 : node.isGroup)) {
6386
+ if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL && (node === null || node === void 0 ? void 0 : node.isGroup)) {
6395
6387
  this.groupPlantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6396
6388
  return;
6397
6389
  }
@@ -6416,13 +6408,11 @@ class AtoDefaultGojsEditor {
6416
6408
  }
6417
6409
  // Not Group
6418
6410
  // Component Water Normal
6419
- if (((_b = AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL) === null || _b === void 0 ? void 0 : _b.includes(node === null || node === void 0 ? void 0 : node.type)) &&
6420
- !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6411
+ if (((_b = AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL) === null || _b === void 0 ? void 0 : _b.includes(node === null || node === void 0 ? void 0 : node.type)) && !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6421
6412
  this.makeEntityTemplate((_c = AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon) !== null && _c !== void 0 ? _c : '', (_d = AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name) !== null && _d !== void 0 ? _d : '');
6422
6413
  }
6423
6414
  // Component Water Withdraw Or Discharge
6424
- if (((_e = AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE) === null || _e === void 0 ? void 0 : _e.includes(node === null || node === void 0 ? void 0 : node.type)) &&
6425
- !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6415
+ if (((_e = AtoGojsEditorModel.TYPE_TEMPLATE_WATER_WITHDRAW_OR_DISCHARGE) === null || _e === void 0 ? void 0 : _e.includes(node === null || node === void 0 ? void 0 : node.type)) && !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6426
6416
  this.makeEntityWithdrawOrDischarge((_f = AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon) !== null && _f !== void 0 ? _f : '', (_g = AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name) !== null && _g !== void 0 ? _g : '');
6427
6417
  }
6428
6418
  // Component Energy Normal
@@ -6475,8 +6465,7 @@ class AtoDefaultGojsEditor {
6475
6465
  this.makeSpecialTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6476
6466
  }
6477
6467
  // Plant Cell
6478
- if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
6479
- !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6468
+ if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL && !(node === null || node === void 0 ? void 0 : node.isGroup)) {
6480
6469
  this.plantCellTemplate(AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].icon, AtoGojsEditorModel.NODE_TEMPLATES[node === null || node === void 0 ? void 0 : node.type].name);
6481
6470
  }
6482
6471
  }
@@ -6505,8 +6494,7 @@ class AtoDefaultGojsEditor {
6505
6494
  this.myDiagram.dragSelectingTool = (_m = this.initialOptions) === null || _m === void 0 ? void 0 : _m.dragSelectingTool;
6506
6495
  this.myDiagram.toolManager.draggingTool.isGridSnapEnabled =
6507
6496
  (_p = (_o = this.initialOptions) === null || _o === void 0 ? void 0 : _o['draggingTool.isGridSnapEnabled']) !== null && _p !== void 0 ? _p : false;
6508
- if (this.myDiagram.toolManager &&
6509
- this.myDiagram.toolManager.draggingTool) {
6497
+ if (this.myDiagram.toolManager && this.myDiagram.toolManager.draggingTool) {
6510
6498
  if ((_q = this.initialOptions) === null || _q === void 0 ? void 0 : _q['draggingTool.gridSnapCellSize']) {
6511
6499
  this.myDiagram.toolManager.draggingTool.gridSnapCellSize =
6512
6500
  (_r = this.initialOptions) === null || _r === void 0 ? void 0 : _r['draggingTool.gridSnapCellSize'];
@@ -6524,8 +6512,7 @@ class AtoDefaultGojsEditor {
6524
6512
  (_v = this.initialOptions) === null || _v === void 0 ? void 0 : _v['linkingTool.linkValidation'];
6525
6513
  }
6526
6514
  }
6527
- this.myDiagram.contentAlignment =
6528
- (_x = (_w = this.initialOptions) === null || _w === void 0 ? void 0 : _w.contentAlignment) !== null && _x !== void 0 ? _x : go.Spot.Center;
6515
+ this.myDiagram.contentAlignment = (_x = (_w = this.initialOptions) === null || _w === void 0 ? void 0 : _w.contentAlignment) !== null && _x !== void 0 ? _x : go.Spot.Center;
6529
6516
  this.myDiagram.layout = (_y = this.initialOptions) === null || _y === void 0 ? void 0 : _y.layout;
6530
6517
  // this.myDiagram.minViewportBounds = new go.Rect(0, 0, 1200, 1200);
6531
6518
  if (!!((_z = this.editor) === null || _z === void 0 ? void 0 : _z.data)) {
@@ -6550,8 +6537,7 @@ class AtoDefaultGojsEditor {
6550
6537
  this.isAddedModelChangedListeners = true;
6551
6538
  this.myDiagram.addModelChangedListener(function (e) {
6552
6539
  var _a;
6553
- if (e.change === go.ChangedEvent.Remove &&
6554
- e.propertyName === 'nodeDataArray') {
6540
+ if (e.change === go.ChangedEvent.Remove && e.propertyName === 'nodeDataArray') {
6555
6541
  const data = e.oldValue;
6556
6542
  self.onDeleteNode.emit(data);
6557
6543
  }
@@ -6780,12 +6766,7 @@ class AtoDefaultGojsEditor {
6780
6766
  }
6781
6767
  initSolarDiagram() {
6782
6768
  const { SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERIES: BATTERY, INVERTERS: INVERTER, } = AtoGojsEditorModel.ENUM_TEMPLATES;
6783
- const ListItemsCreateEntityTemplate = [
6784
- SOLAR_POWER,
6785
- POWER_CONDITIONING_UNIT,
6786
- BATTERY,
6787
- INVERTER,
6788
- ];
6769
+ const ListItemsCreateEntityTemplate = [SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERY, INVERTER];
6789
6770
  ListItemsCreateEntityTemplate.map((e) => {
6790
6771
  if (!!AtoGojsEditorModel.NODE_TEMPLATES[e]) {
6791
6772
  this.makeEntityTemplateEnergy(AtoGojsEditorModel.NODE_TEMPLATES[e].icon, AtoGojsEditorModel.NODE_TEMPLATES[e].name);
@@ -6863,11 +6844,7 @@ class AtoDefaultGojsEditor {
6863
6844
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
6864
6845
  margin: 4,
6865
6846
  }, new go.Binding('text', 'textComponent'))),
6866
- }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => x ? 'white' : 'transparent')
6867
- // new go.Binding('margin', 'isFormat', (x) =>
6868
- // x ? new go.Margin(5, 0, 5, 5) : new go.Margin(5, 5, 5, 5),
6869
- // ),
6870
- )));
6847
+ }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => (x ? 'white' : 'transparent')))));
6871
6848
  // arrow
6872
6849
  elements.push(this.$(go.Shape, Object.assign({}, (_c = AtoGojsEditorModel.LINK_TEMPLATES[AtoGojsEditorModel.ENUM_LINK_TYPES.SIMPLE]) === null || _c === void 0 ? void 0 : _c.arrow), new go.Binding('visible', 'type', (x) => ![
6873
6850
  AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE_ANIMATION,
@@ -6981,9 +6958,7 @@ class AtoDefaultGojsEditor {
6981
6958
  click: function (e, obj) {
6982
6959
  alert('Option 2 clicked!');
6983
6960
  },
6984
- })
6985
- // ... add more options as needed ...
6986
- );
6961
+ }));
6987
6962
  const node = this.$(go.Node, 'Spot', {
6988
6963
  // fromSpot: go.Spot.RightSide,
6989
6964
  // toSpot: go.Spot.LeftSide,
@@ -7036,8 +7011,7 @@ class AtoDefaultGojsEditor {
7036
7011
  doubleClick: (e, obj) => {
7037
7012
  var _a, _b, _c, _d, _e;
7038
7013
  const node = obj.part;
7039
- if (((_a = node === null || node === void 0 ? void 0 : node.ob) === null || _a === void 0 ? void 0 : _a.isTypeInflowOfPlantCell) &&
7040
- !((_b = this._initialOptions) === null || _b === void 0 ? void 0 : _b.isReadOnly)) {
7014
+ if (((_a = node === null || node === void 0 ? void 0 : node.ob) === null || _a === void 0 ? void 0 : _a.isTypeInflowOfPlantCell) && !((_b = this._initialOptions) === null || _b === void 0 ? void 0 : _b.isReadOnly)) {
7041
7015
  // obj?.data?.onSelected(node?.ob?.nodePlantCellParent);
7042
7016
  // this.isShowNodeInfo
7043
7017
  // ? self.onDoubleClickNode.emit({
@@ -7353,11 +7327,10 @@ class AtoDefaultGojsEditor {
7353
7327
  ? this.generateActionGroup([
7354
7328
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
7355
7329
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
7356
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
7357
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
7358
- .IMMERSED_UF_WATER_TREATMENTS].name,
7359
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
7360
- .PRESSURIZED_UF_WATER_TREATMENTS].name,
7330
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
7331
+ .name,
7332
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
7333
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
7361
7334
  ].includes(title)
7362
7335
  ? [
7363
7336
  AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
@@ -7414,8 +7387,7 @@ class AtoDefaultGojsEditor {
7414
7387
  var _a;
7415
7388
  return !(((_a = AtoGojsEditorModel.TYPE_COMPONENT_WATER) === null || _a === void 0 ? void 0 : _a.includes(data === null || data === void 0 ? void 0 : data.systemType)) &&
7416
7389
  (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7417
- (data === null || data === void 0 ? void 0 : data.topologyType) !==
7418
- ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
7390
+ (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
7419
7391
  })))), this.$(go.Panel, 'Vertical', {
7420
7392
  alignment: go.Spot.Left,
7421
7393
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
@@ -7609,19 +7581,7 @@ class AtoDefaultGojsEditor {
7609
7581
  AtoDefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS,
7610
7582
  // DefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
7611
7583
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7612
- ])
7613
- // new go.Binding('visible', 'isNotAction', (x) => !x),
7614
- )
7615
- // this.$(
7616
- // go.Panel,
7617
- // 'Horizontal',
7618
- // { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
7619
- // this.generateActionGroup([DefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS]),
7620
- // new go.Binding('visible', '', (x) => {
7621
- // return x?.isOnlyDetails && !x?.isNotAction ? true : false;
7622
- // }),
7623
- // ),
7624
- ),
7584
+ ]))),
7625
7585
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7626
7586
  margin: 4,
7627
7587
  }, new go.Binding('text', 'name').makeTwoWay())),
@@ -7658,7 +7618,8 @@ class AtoDefaultGojsEditor {
7658
7618
  alignment: go.Spot.Center,
7659
7619
  desiredSize: new go.Size(size.w - 20, size.h - 65),
7660
7620
  imageStretch: go.GraphObject.Uniform,
7661
- }, new go.Binding('source', 'pathImage', (x) => x !== null && x !== void 0 ? x : AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL].icon)), this.$(go.TextBlock, {
7621
+ }, new go.Binding('source', 'pathImage', (x) => x !== null && x !== void 0 ? x : AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL]
7622
+ .icon)), this.$(go.TextBlock, {
7662
7623
  row: 2,
7663
7624
  margin: new go.Margin(10, 0, 3, 0),
7664
7625
  editable: true,
@@ -7677,12 +7638,7 @@ class AtoDefaultGojsEditor {
7677
7638
  }), this.$(go.Panel, 'Vertical', {
7678
7639
  alignment: go.Spot.Right,
7679
7640
  alignmentFocus: new go.Spot(1, 0.5, -8, 0),
7680
- })
7681
- // this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true),
7682
- // this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true),
7683
- // this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false),
7684
- // this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false),
7685
- );
7641
+ }));
7686
7642
  this.myDiagram.nodeTemplateMap.set(title, node);
7687
7643
  }
7688
7644
  makeEntityWithdrawOrDischarge(icon, title, size = {
@@ -7762,15 +7718,7 @@ class AtoDefaultGojsEditor {
7762
7718
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7763
7719
  margin: 4,
7764
7720
  }, new go.Binding('text', 'name').makeTwoWay())),
7765
- }, new go.Binding('text', 'name').makeTwoWay()
7766
- // {
7767
- // // define a tooltip for each node that displays the color as text
7768
- // toolTip: this.$(
7769
- // 'ToolTip',
7770
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
7771
- // ), // end of Adornment
7772
- // },
7773
- ))), this.$(go.Panel, 'Vertical', {
7721
+ }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.Panel, 'Vertical', {
7774
7722
  alignment: go.Spot.Left,
7775
7723
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
7776
7724
  }), this.$(go.Panel, 'Vertical', {
@@ -7846,7 +7794,6 @@ class AtoDefaultGojsEditor {
7846
7794
  return this.$('Button', {
7847
7795
  click: function (e, obj) {
7848
7796
  var _a, _b, _c;
7849
- self.openActionMenu();
7850
7797
  const filteredActions = _.filter((_c = (_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a['ob']) === null || _b === void 0 ? void 0 : _b.actions) !== null && _c !== void 0 ? _c : actions, (action) => {
7851
7798
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7852
7799
  // Filter Insight button
@@ -7854,32 +7801,26 @@ class AtoDefaultGojsEditor {
7854
7801
  return !!((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a['ob']) === null || _b === void 0 ? void 0 : _b.id);
7855
7802
  }
7856
7803
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME &&
7857
- ((_d = (_c = obj.part) === null || _c === void 0 ? void 0 : _c['ob']) === null || _d === void 0 ? void 0 : _d.type) !==
7858
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
7804
+ ((_d = (_c = obj.part) === null || _c === void 0 ? void 0 : _c['ob']) === null || _d === void 0 ? void 0 : _d.type) !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
7859
7805
  ((_e = AtoGojsEditorModel.TYPE_COMPONENT_WATER) === null || _e === void 0 ? void 0 : _e.includes((_g = (_f = obj.part) === null || _f === void 0 ? void 0 : _f['ob']) === null || _g === void 0 ? void 0 : _g.systemType)) &&
7860
- ((_j = (_h = obj.part) === null || _h === void 0 ? void 0 : _h['ob']) === null || _j === void 0 ? void 0 : _j.topologyType) !==
7861
- ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7862
- ((_l = (_k = obj.part) === null || _k === void 0 ? void 0 : _k['ob']) === null || _l === void 0 ? void 0 : _l.topologyType) !==
7863
- ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL) {
7806
+ ((_j = (_h = obj.part) === null || _h === void 0 ? void 0 : _h['ob']) === null || _j === void 0 ? void 0 : _j.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7807
+ ((_l = (_k = obj.part) === null || _k === void 0 ? void 0 : _k['ob']) === null || _l === void 0 ? void 0 : _l.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL) {
7864
7808
  return false;
7865
7809
  }
7866
7810
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW &&
7867
7811
  self.plantSatus === ATO_EPlantType.BASIC_PLANT &&
7868
- ((_o = (_m = obj.part) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.type) ===
7869
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
7812
+ ((_o = (_m = obj.part) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.type) === AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
7870
7813
  return false;
7871
7814
  }
7872
7815
  return true;
7873
7816
  }).map((e) => {
7874
7817
  var _a, _b, _c, _d;
7875
- if (ATO_ECOMPONENT_PLANT_TYPE.STEAM ===
7876
- ((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a['ob']) === null || _b === void 0 ? void 0 : _b.topologyType) &&
7818
+ if (ATO_ECOMPONENT_PLANT_TYPE.STEAM === ((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a['ob']) === null || _b === void 0 ? void 0 : _b.topologyType) &&
7877
7819
  e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
7878
7820
  return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
7879
7821
  }
7880
7822
  if (e === AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS &&
7881
- ((_d = (_c = obj === null || obj === void 0 ? void 0 : obj.part) === null || _c === void 0 ? void 0 : _c['ob']) === null || _d === void 0 ? void 0 : _d.systemType) ===
7882
- AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
7823
+ ((_d = (_c = obj === null || obj === void 0 ? void 0 : obj.part) === null || _c === void 0 ? void 0 : _c['ob']) === null || _d === void 0 ? void 0 : _d.systemType) === AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
7883
7824
  return AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD;
7884
7825
  }
7885
7826
  return e;
@@ -7921,8 +7862,7 @@ class AtoDefaultGojsEditor {
7921
7862
  case AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME:
7922
7863
  onClickFn = () => {
7923
7864
  var _a, _b, _c, _d, _e;
7924
- if (((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.type) ===
7925
- AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
7865
+ if (((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.type) === AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE) {
7926
7866
  self.onRename.emit(Object.assign({ left: ((_c = e === null || e === void 0 ? void 0 : e['Wr']) === null || _c === void 0 ? void 0 : _c.x) - 50, top: (_d = e === null || e === void 0 ? void 0 : e['Wr']) === null || _d === void 0 ? void 0 : _d.y }, (_e = obj.part) === null || _e === void 0 ? void 0 : _e.data));
7927
7867
  // LayoutService.setToolTipComponentDataStatic({
7928
7868
  // component: RenameBoxComponent,
@@ -7967,6 +7907,7 @@ class AtoDefaultGojsEditor {
7967
7907
  onClickFn();
7968
7908
  } });
7969
7909
  });
7910
+ self.openActionMenu();
7970
7911
  },
7971
7912
  'ButtonBorder.strokeWidth': 0,
7972
7913
  'ButtonBorder.fill': 'white',
@@ -8014,8 +7955,7 @@ class AtoDefaultGojsEditor {
8014
7955
  if ((nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable) !== undefined && (nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable) !== null) {
8015
7956
  newnode.movable = nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable;
8016
7957
  }
8017
- newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y +
8018
- this.findLocYFromnode(fromnode) * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT);
7958
+ newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y + this.findLocYFromnode(fromnode) * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT);
8019
7959
  e.diagram.commitTransaction('Create Node and Link');
8020
7960
  });
8021
7961
  }
@@ -8038,20 +7978,12 @@ class AtoDefaultGojsEditor {
8038
7978
  return this.isEmptyYLoc(locYAlreadyExist, i);
8039
7979
  }
8040
7980
  isEmptyYLoc(locYAlreadyExist, i) {
8041
- if (!_.some(locYAlreadyExist, (x) => x <
8042
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
8043
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
8044
- x >
8045
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
8046
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
7981
+ if (!_.some(locYAlreadyExist, (x) => x < i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT + AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
7982
+ x > i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT - AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
8047
7983
  return i;
8048
7984
  }
8049
- if (!_.some(locYAlreadyExist, (x) => x <
8050
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
8051
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
8052
- x >
8053
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
8054
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
7985
+ if (!_.some(locYAlreadyExist, (x) => x < -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT + AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
7986
+ x > -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT - AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2)) {
8055
7987
  return -i;
8056
7988
  }
8057
7989
  return null;
@@ -8087,9 +8019,7 @@ class AtoDefaultGojsEditor {
8087
8019
  width: 40,
8088
8020
  height: 40,
8089
8021
  alignment: align,
8090
- stretch: horizontal
8091
- ? go.GraphObject.Horizontal
8092
- : go.GraphObject.Vertical,
8022
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
8093
8023
  portId: name,
8094
8024
  fromSpot: spot,
8095
8025
  fromLinkable: output,
@@ -8136,35 +8066,7 @@ class AtoDefaultGojsEditor {
8136
8066
  stroke: '#919CA5',
8137
8067
  width: 40,
8138
8068
  height: 40, // Match the panel's height
8139
- })
8140
- // this.$(
8141
- // go.TextBlock,
8142
- // {
8143
- // name: 'textBlock',
8144
- // margin: 4,
8145
- // text: '\uf0da', // Mã Unicode tương ứng với fa-caret-left
8146
- // font: '900 12px "Font Awesome 6 Pro"',
8147
- // stroke: 'white', // Đặt màu chữ thành màu trắng
8148
- // cursor: 'pointer',
8149
- // visible: false,
8150
- // },
8151
- // new go.Binding('text', 'name', (_) => {
8152
- // switch (name) {
8153
- // case 'T':
8154
- // case 'B': {
8155
- // return '\uf0d7';
8156
- // }
8157
- // case 'L':
8158
- // case 'R': {
8159
- // return '\uf0da';
8160
- // }
8161
- // default: {
8162
- // return '\uf0d7';
8163
- // }
8164
- // }
8165
- // }),
8166
- // ),
8167
- );
8069
+ }));
8168
8070
  }
8169
8071
  makePort(name, align, spot, output, input) {
8170
8072
  // if (this._initialOptions.isReadOnly) {
@@ -8179,9 +8081,7 @@ class AtoDefaultGojsEditor {
8179
8081
  width: horizontal ? NaN : 8,
8180
8082
  height: !horizontal ? NaN : 8,
8181
8083
  alignment: align,
8182
- stretch: horizontal
8183
- ? go.GraphObject.Horizontal
8184
- : go.GraphObject.Vertical,
8084
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
8185
8085
  portId: name,
8186
8086
  fromSpot: spot,
8187
8087
  fromLinkable: output,
@@ -8230,12 +8130,10 @@ class AtoDefaultGojsEditor {
8230
8130
  return false;
8231
8131
  }
8232
8132
  if (data === null || data === void 0 ? void 0 : data.flowOfPlantCell) {
8233
- if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW &&
8234
- name === 'L') {
8133
+ if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW && name === 'L') {
8235
8134
  return true;
8236
8135
  }
8237
- if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.OUTFLOW &&
8238
- name === 'R') {
8136
+ if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.OUTFLOW && name === 'R') {
8239
8137
  return true;
8240
8138
  }
8241
8139
  return false;
@@ -8329,84 +8227,7 @@ class AtoDefaultGojsEditor {
8329
8227
  // stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
8330
8228
  strokeWidth: 2,
8331
8229
  // strokeDashArray: [5, 5],
8332
- })
8333
- // this.$(go.Placeholder),
8334
- // this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0) }),
8335
- )
8336
- // this.$(go.TextBlock, title, {
8337
- // row: 0,
8338
- // margin: new go.Margin(0, 0, 0, 0),
8339
- // stroke: '#444444',
8340
- // font: 'normal 10pt Arial',
8341
- // textAlign: 'center',
8342
- // alignment: go.Spot.Left,
8343
- // },
8344
- // new go.Binding('text', 'key').makeTwoWay(),),
8345
- // this.$(
8346
- // go.Panel,
8347
- // 'Table',
8348
- // {
8349
- // alignment: go.Spot.TopLeft,
8350
- // alignmentFocus: new go.Spot(0, 0, -10, -10),
8351
- // // padding: new go.Margin(0, 0, 50, 0),
8352
- // },
8353
- // this.$(
8354
- // go.Panel,
8355
- // 'Horizontal',
8356
- // {
8357
- // row: 0,
8358
- // alignment: go.Spot.Left,
8359
- // },
8360
- // this.$(go.Picture, icon, {
8361
- // row: 0,
8362
- // // alignment: go.Spot.Center,
8363
- // alignment: go.Spot.Left,
8364
- // maxSize: new go.Size(40, 40),
8365
- // imageStretch: go.GraphObject.Uniform,
8366
- // }),
8367
- // this.$(
8368
- // go.Panel,
8369
- // 'Table',
8370
- // {
8371
- // column: 1,
8372
- // defaultAlignment: go.Spot.Left,
8373
- // alignmentFocus: new go.Spot(0, 0, 0, 20),
8374
- // },
8375
- // this.$(go.TextBlock, title, {
8376
- // row: 0,
8377
- // margin: new go.Margin(3, 3, 5, 10),
8378
- // // maxSize: new go.Size(size.w - 20, NaN),
8379
- // stroke: '#444444',
8380
- // font: 'normal 10pt Arial',
8381
- // textAlign: 'center',
8382
- // alignment: go.Spot.Left,
8383
- // }),
8384
- // this.$(
8385
- // go.TextBlock,
8386
- // {
8387
- // row: 1,
8388
- // margin: new go.Margin(0, 3, 3, 10),
8389
- // editable: true,
8390
- // // maxSize: new go.Size(size.w - 20, 40),
8391
- // stroke: '#000D42',
8392
- // font: 'bold 10pt Arial',
8393
- // textAlign: 'center',
8394
- // wrap: go.TextBlock.None,
8395
- // overflow: go.TextBlock.OverflowEllipsis,
8396
- // },
8397
- // new go.Binding('text', 'name').makeTwoWay(),
8398
- // {
8399
- // // define a tooltip for each node that displays the color as text
8400
- // toolTip: this.$(
8401
- // 'ToolTip',
8402
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
8403
- // ), // end of Adornment
8404
- // },
8405
- // ),
8406
- // ),
8407
- // ),
8408
- // ),
8409
- );
8230
+ })));
8410
8231
  this.myDiagram.groupTemplateMap.set(title, node);
8411
8232
  }
8412
8233
  makeGroupTemplate(icon, title, size = { w: 80, h: 80 }) {
@@ -8544,9 +8365,7 @@ class AtoDefaultGojsEditor {
8544
8365
  // imageStretch: go.GraphObject.Uniform,
8545
8366
  // margin: new go.Margin(130, 0, 0, 0),
8546
8367
  }, new go.Binding('margin', 'margin'), new go.Binding('width', 'width'), new go.Binding('height', 'height'), new go.Binding('source', '', (data) => {
8547
- return (data === null || data === void 0 ? void 0 : data.source)
8548
- ? data === null || data === void 0 ? void 0 : data.source
8549
- : AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH;
8368
+ return (data === null || data === void 0 ? void 0 : data.source) ? data === null || data === void 0 ? void 0 : data.source : AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH;
8550
8369
  }))));
8551
8370
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE, node);
8552
8371
  }
@@ -8645,8 +8464,7 @@ class AtoDefaultGojsEditor {
8645
8464
  cursor: 'pointer',
8646
8465
  click: (e, obj) => {
8647
8466
  var _a, _b, _c, _d;
8648
- if (((_b = (_a = obj.panel.part.data) === null || _a === void 0 ? void 0 : _a.dataTable[obj.row]) === null || _b === void 0 ? void 0 : _b.isEditable) ===
8649
- false) {
8467
+ if (((_b = (_a = obj.panel.part.data) === null || _a === void 0 ? void 0 : _a.dataTable[obj.row]) === null || _b === void 0 ? void 0 : _b.isEditable) === false) {
8650
8468
  return;
8651
8469
  }
8652
8470
  self.onClikParamOfTable.emit(Object.assign({}, (_c = obj.panel.part.data) === null || _c === void 0 ? void 0 : _c.dataTable[((_d = obj.panel.part.data) === null || _d === void 0 ? void 0 : _d.isShowDataLongitudinal) ? 0 : obj.row]));
@@ -8704,8 +8522,7 @@ class AtoDefaultGojsEditor {
8704
8522
  ? `${(data === null || data === void 0 ? void 0 : data.tagName) || ''} `
8705
8523
  : ''}${data === null || data === void 0 ? void 0 : data.value}`;
8706
8524
  }), new go.Binding('visible', '', (data) => {
8707
- if (!!this._initialOptions.isReadOnly &&
8708
- (data === null || data === void 0 ? void 0 : data.tagName)) {
8525
+ if (!!this._initialOptions.isReadOnly && (data === null || data === void 0 ? void 0 : data.tagName)) {
8709
8526
  return true;
8710
8527
  }
8711
8528
  return !!(data === null || data === void 0 ? void 0 : data.value);
@@ -8720,9 +8537,7 @@ class AtoDefaultGojsEditor {
8720
8537
  }), new go.Binding('maxSize', '', (data) => {
8721
8538
  var _a, _b, _c, _d;
8722
8539
  if (!(data === null || data === void 0 ? void 0 : data.isReadOnly) && !this._initialOptions.isReadOnly) {
8723
- return new go.Size(((_a = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _a === void 0 ? void 0 : _a.width)
8724
- ? ((_b = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _b === void 0 ? void 0 : _b.width) - 15
8725
- : NaN, (_d = (_c = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : NaN);
8540
+ return new go.Size(((_a = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _a === void 0 ? void 0 : _a.width) ? ((_b = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _b === void 0 ? void 0 : _b.width) - 15 : NaN, (_d = (_c = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : NaN);
8726
8541
  }
8727
8542
  return data === null || data === void 0 ? void 0 : data.maxSizeValue;
8728
8543
  }), new go.Binding('font', '', (data) => {
@@ -8742,13 +8557,11 @@ class AtoDefaultGojsEditor {
8742
8557
  height: 14,
8743
8558
  width: 14,
8744
8559
  }, new go.Binding('visible', '', (data, panel) => {
8745
- return (!(data === null || data === void 0 ? void 0 : data.isReadOnly) && !this._initialOptions.isReadOnly);
8560
+ return !(data === null || data === void 0 ? void 0 : data.isReadOnly) && !this._initialOptions.isReadOnly;
8746
8561
  }), new go.Binding('opacity', '', (data, panel) => {
8747
8562
  return (data === null || data === void 0 ? void 0 : data.isEditable) === false ? 0.6 : 1;
8748
8563
  })))),
8749
- }
8750
- // new go.Binding('text', 'name')
8751
- )));
8564
+ })));
8752
8565
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, node);
8753
8566
  }
8754
8567
  makeMassBalance() {
@@ -8846,7 +8659,9 @@ class AtoDefaultGojsEditor {
8846
8659
  fill: '#FCFCFD',
8847
8660
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
8848
8661
  strokeWidth: 2,
8849
- }), 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', {
8662
+ }), this.$(go.Placeholder, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), {
8663
+ padding: new go.Margin(0, 0, 0, 0),
8664
+ })), this.$(go.Panel, 'Spot', {
8850
8665
  width: 0,
8851
8666
  height: 0,
8852
8667
  alignment: new go.Spot(0, 0.5, 0, 112),
@@ -9136,8 +8951,7 @@ class AtoDefaultGojsEditor {
9136
8951
  // : node?.layout;
9137
8952
  if ((data === null || data === void 0 ? void 0 : data.layoutValue) !== (data === null || data === void 0 ? void 0 : data.layoutValueClone)) {
9138
8953
  data.layoutValueClone = data === null || data === void 0 ? void 0 : data.layoutValue;
9139
- return (data === null || data === void 0 ? void 0 : data.layoutValue) ===
9140
- AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
8954
+ return (data === null || data === void 0 ? void 0 : data.layoutValue) === AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
9141
8955
  ? self.$(go.LayeredDigraphLayout, { direction: 0 })
9142
8956
  : self.$(go.Layout);
9143
8957
  }
@@ -9301,82 +9115,7 @@ class AtoDefaultGojsEditor {
9301
9115
  AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS,
9302
9116
  AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
9303
9117
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
9304
- ])
9305
- // this.$(
9306
- // // Edit Text
9307
- // 'Button',
9308
- // {
9309
- // click: self.editTextGroupZone,
9310
- // 'ButtonBorder.strokeWidth': 0,
9311
- // 'ButtonBorder.fill': 'white',
9312
- // },
9313
- // this.$(go.TextBlock, {
9314
- // margin: 4,
9315
- // text: '\ue1bf',
9316
- // font: '20px "Font Awesome 6 Pro"',
9317
- // cursor: 'pointer',
9318
- // stroke: '#2c2c2c',
9319
- // }),
9320
- // ),
9321
- // this.$(
9322
- // // Open Detail
9323
- // 'Button',
9324
- // {
9325
- // click: (e, obj: any) => {
9326
- // const node = obj.part;
9327
- // self.onOpenDetail.emit({
9328
- // node,
9329
- // });
9330
- // },
9331
- // 'ButtonBorder.strokeWidth': 0,
9332
- // 'ButtonBorder.fill': 'white',
9333
- // },
9334
- //
9335
- // this.$(go.TextBlock, {
9336
- // margin: 4,
9337
- // text: '\ue49a',
9338
- // font: '20px "Font Awesome 6 Pro"',
9339
- // cursor: 'pointer',
9340
- // }),
9341
- // ),
9342
- // !this._initialOptions.isReadOnly
9343
- // ? this.$(
9344
- // 'Button',
9345
- // {
9346
- // actionMove: self.dragNewNode, // defined below, to support dragging from the button
9347
- // _dragData: {
9348
- // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
9349
- // name: 0,
9350
- // color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
9351
- // },
9352
- // click: self.clickNewNode, // defined below, to support a click on the button
9353
- // 'ButtonBorder.strokeWidth': 0,
9354
- // 'ButtonBorder.fill': 'white',
9355
- // },
9356
- // this.$(go.TextBlock, {
9357
- // margin: 4,
9358
- // text: '\ue157',
9359
- // font: '20px "Font Awesome 6 Pro"',
9360
- // cursor: 'pointer',
9361
- // stroke: '#2c2c2c',
9362
- // }),
9363
- // )
9364
- // : {},
9365
- // this.$(
9366
- // 'Button',
9367
- // {
9368
- // click: self.deleteNode,
9369
- // 'ButtonBorder.strokeWidth': 0,
9370
- // 'ButtonBorder.fill': 'white',
9371
- // },
9372
- // this.$(go.TextBlock, {
9373
- // margin: 4,
9374
- // text: '\uf2ed',
9375
- // font: '20px "Font Awesome 6 Pro"',
9376
- // cursor: 'pointer',
9377
- // }),
9378
- // ),
9379
- )),
9118
+ ]))),
9380
9119
  }, this.$(go.Panel, 'Auto', this.$(go.Shape, 'RoundedRectangle', {
9381
9120
  fill: 'transparent',
9382
9121
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
@@ -9491,10 +9230,7 @@ class AtoDefaultGojsEditor {
9491
9230
  value: x === null || x === void 0 ? void 0 : x.quantity,
9492
9231
  unit: x === null || x === void 0 ? void 0 : x.unit,
9493
9232
  });
9494
- return ((_a = formatted.shortenedNumber +
9495
- ' ' +
9496
- formatted.unitPrefixes +
9497
- (x === null || x === void 0 ? void 0 : x.unit)) !== null && _a !== void 0 ? _a : '');
9233
+ return (_a = formatted.shortenedNumber + ' ' + formatted.unitPrefixes + (x === null || x === void 0 ? void 0 : x.unit)) !== null && _a !== void 0 ? _a : '';
9498
9234
  }), new go.Binding('visible', 'data', (x) => typeof (x === null || x === void 0 ? void 0 : x.quantity) === 'number')), this.$(go.TextBlock, {
9499
9235
  margin: new go.Margin(0, 5, 10, 0),
9500
9236
  textAlign: 'center',
@@ -9760,8 +9496,7 @@ class AtoDefaultGojsEditor {
9760
9496
  // return;
9761
9497
  // }
9762
9498
  // const newDocument = newWindow?.document;
9763
- if (!((_c = (_b = (_a = this.myDiagram) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.nodeDataArray) === null || _c === void 0 ? void 0 : _c.length) &&
9764
- !((_f = (_e = (_d = this.myDiagram) === null || _d === void 0 ? void 0 : _d.model) === null || _e === void 0 ? void 0 : _e.linkDataArray) === null || _f === void 0 ? void 0 : _f.length)) {
9499
+ if (!((_c = (_b = (_a = this.myDiagram) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.nodeDataArray) === null || _c === void 0 ? void 0 : _c.length) && !((_f = (_e = (_d = this.myDiagram) === null || _d === void 0 ? void 0 : _d.model) === null || _e === void 0 ? void 0 : _e.linkDataArray) === null || _f === void 0 ? void 0 : _f.length)) {
9765
9500
  return;
9766
9501
  }
9767
9502
  const svg = this.myDiagram.makeSvg({
@@ -9782,8 +9517,7 @@ class AtoDefaultGojsEditor {
9782
9517
  svgElement.setAttribute('stroke', 'rgba(64, 181, 206, 0.6)');
9783
9518
  }
9784
9519
  // Empty Value
9785
- if ((graphObject === null || graphObject === void 0 ? void 0 : graphObject.name) === 'textBlockValue' ||
9786
- (graphObject === null || graphObject === void 0 ? void 0 : graphObject.name) === 'textBlockUnitPrefixes') {
9520
+ if ((graphObject === null || graphObject === void 0 ? void 0 : graphObject.name) === 'textBlockValue' || (graphObject === null || graphObject === void 0 ? void 0 : graphObject.name) === 'textBlockUnitPrefixes') {
9787
9521
  svgElement.textContent = '';
9788
9522
  }
9789
9523
  if (svgElement.clipPath) {
@@ -9832,6 +9566,45 @@ class AtoDefaultGojsEditor {
9832
9566
  this.menuTrigger.openMenu();
9833
9567
  }
9834
9568
  }
9569
+ // openActionMenu(data: {
9570
+ // e: any,
9571
+ // obj: any,
9572
+ // type?: string;
9573
+ // }) {
9574
+ // let mousePt = this.myDiagram.lastInput.viewPoint;
9575
+ // let template = document.getElementById(this.actionMenuId);
9576
+ // switch (data?.type) {
9577
+ // case 'droplist': {
9578
+ // // When this node is clicked, adjust the menu position
9579
+ // const buttonRect = data?.obj?.part?.actualBounds;
9580
+ // const diagram = data?.e.diagram;
9581
+ // const point = diagram.transformDocToView(new go.Point(buttonRect?.x, buttonRect?.bottom));
9582
+ // mousePt = {
9583
+ // x: point.x,
9584
+ // y: point.y
9585
+ // }
9586
+ // break;
9587
+ // }
9588
+ // case 'action': {
9589
+ // mousePt = this.myDiagram.lastInput.viewPoint;
9590
+ // this.optionList = this.actions;
9591
+ // template = document.getElementById(this.actionMenuId);
9592
+ // break;
9593
+ // }
9594
+ // default: {
9595
+ // mousePt = this.myDiagram.lastInput.viewPoint;
9596
+ // this.optionList = this.actions;
9597
+ // template = document.getElementById(this.actionMenuId);
9598
+ // }
9599
+ // }
9600
+ // if (template) {
9601
+ // template.style.display = '';
9602
+ // template.style.position = 'absolute';
9603
+ // template.style.left = mousePt.x + 'px';
9604
+ // template.style.top = mousePt.y + 'px';
9605
+ // this.menuTrigger.openMenu();
9606
+ // }
9607
+ // }
9835
9608
  unsubscribeAll() {
9836
9609
  if (this._subscriptionList) {
9837
9610
  this._subscriptionList.unsubscribe();