ato-water-lib 0.0.131 → 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: {
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: {
5553
5535
  visible: true,
5554
5536
  }, extendedDataResponsive: {
5555
5537
  visible: false,
5556
5538
  } }),
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: {
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: {
5558
5540
  visible: true,
5559
5541
  }, extendedDataResponsive: {
5560
5542
  visible: false,
5561
5543
  } }),
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: {
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: {
5563
5545
  visible: true,
5564
5546
  }, extendedDataResponsive: {
5565
5547
  visible: false,
5566
5548
  } }),
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: {
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: {
5568
5554
  visible: true,
5569
5555
  }, extendedDataResponsive: {
5570
5556
  visible: false,
5571
5557
  } }),
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: {
5573
- visible: true,
5574
- }, extendedDataResponsive: {
5575
- visible: false,
5576
- } }),
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,
@@ -6362,15 +6338,13 @@ class AtoDefaultGojsEditor {
6362
6338
  // Remove Node and Node Group
6363
6339
  _.forEach((_b = this.myDiagram.nodeTemplateMap) === null || _b === void 0 ? void 0 : _b.Hb, (temp) => {
6364
6340
  var _a, _b;
6365
- if ((temp === null || temp === void 0 ? void 0 : temp.key) &&
6366
- !((_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)))) {
6367
6342
  this.myDiagram.nodeTemplateMap.remove(temp === null || temp === void 0 ? void 0 : temp.key);
6368
6343
  }
6369
6344
  });
6370
6345
  _.forEach((_c = this.myDiagram.groupTemplateMap) === null || _c === void 0 ? void 0 : _c.Hb, (temp) => {
6371
6346
  var _a, _b;
6372
- if ((temp === null || temp === void 0 ? void 0 : temp.key) &&
6373
- !((_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)))) {
6374
6348
  this.myDiagram.groupTemplateMap.remove(temp === null || temp === void 0 ? void 0 : temp.key);
6375
6349
  }
6376
6350
  });
@@ -6397,13 +6371,11 @@ class AtoDefaultGojsEditor {
6397
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);
6398
6372
  return;
6399
6373
  }
6400
- if ((node === null || node === void 0 ? void 0 : node.type) ===
6401
- 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) {
6402
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);
6403
6376
  return;
6404
6377
  }
6405
- if ((node === null || node === void 0 ? void 0 : node.type) ===
6406
- 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) {
6407
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);
6408
6380
  return;
6409
6381
  }
@@ -6411,8 +6383,7 @@ class AtoDefaultGojsEditor {
6411
6383
  this.makeGroupZoneTemplate();
6412
6384
  return;
6413
6385
  }
6414
- if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
6415
- (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)) {
6416
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);
6417
6388
  return;
6418
6389
  }
@@ -6437,13 +6408,11 @@ class AtoDefaultGojsEditor {
6437
6408
  }
6438
6409
  // Not Group
6439
6410
  // Component Water Normal
6440
- if (((_b = AtoGojsEditorModel.TYPE_TEMPLATE_WATER_NORMAL) === null || _b === void 0 ? void 0 : _b.includes(node === null || node === void 0 ? void 0 : node.type)) &&
6441
- !(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)) {
6442
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 : '');
6443
6413
  }
6444
6414
  // Component Water Withdraw Or Discharge
6445
- 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)) &&
6446
- !(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)) {
6447
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 : '');
6448
6417
  }
6449
6418
  // Component Energy Normal
@@ -6496,8 +6465,7 @@ class AtoDefaultGojsEditor {
6496
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);
6497
6466
  }
6498
6467
  // Plant Cell
6499
- if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PLANT_CELL &&
6500
- !(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)) {
6501
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);
6502
6470
  }
6503
6471
  }
@@ -6526,8 +6494,7 @@ class AtoDefaultGojsEditor {
6526
6494
  this.myDiagram.dragSelectingTool = (_m = this.initialOptions) === null || _m === void 0 ? void 0 : _m.dragSelectingTool;
6527
6495
  this.myDiagram.toolManager.draggingTool.isGridSnapEnabled =
6528
6496
  (_p = (_o = this.initialOptions) === null || _o === void 0 ? void 0 : _o['draggingTool.isGridSnapEnabled']) !== null && _p !== void 0 ? _p : false;
6529
- if (this.myDiagram.toolManager &&
6530
- this.myDiagram.toolManager.draggingTool) {
6497
+ if (this.myDiagram.toolManager && this.myDiagram.toolManager.draggingTool) {
6531
6498
  if ((_q = this.initialOptions) === null || _q === void 0 ? void 0 : _q['draggingTool.gridSnapCellSize']) {
6532
6499
  this.myDiagram.toolManager.draggingTool.gridSnapCellSize =
6533
6500
  (_r = this.initialOptions) === null || _r === void 0 ? void 0 : _r['draggingTool.gridSnapCellSize'];
@@ -6545,8 +6512,7 @@ class AtoDefaultGojsEditor {
6545
6512
  (_v = this.initialOptions) === null || _v === void 0 ? void 0 : _v['linkingTool.linkValidation'];
6546
6513
  }
6547
6514
  }
6548
- this.myDiagram.contentAlignment =
6549
- (_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;
6550
6516
  this.myDiagram.layout = (_y = this.initialOptions) === null || _y === void 0 ? void 0 : _y.layout;
6551
6517
  // this.myDiagram.minViewportBounds = new go.Rect(0, 0, 1200, 1200);
6552
6518
  if (!!((_z = this.editor) === null || _z === void 0 ? void 0 : _z.data)) {
@@ -6571,8 +6537,7 @@ class AtoDefaultGojsEditor {
6571
6537
  this.isAddedModelChangedListeners = true;
6572
6538
  this.myDiagram.addModelChangedListener(function (e) {
6573
6539
  var _a;
6574
- if (e.change === go.ChangedEvent.Remove &&
6575
- e.propertyName === 'nodeDataArray') {
6540
+ if (e.change === go.ChangedEvent.Remove && e.propertyName === 'nodeDataArray') {
6576
6541
  const data = e.oldValue;
6577
6542
  self.onDeleteNode.emit(data);
6578
6543
  }
@@ -6801,12 +6766,7 @@ class AtoDefaultGojsEditor {
6801
6766
  }
6802
6767
  initSolarDiagram() {
6803
6768
  const { SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERIES: BATTERY, INVERTERS: INVERTER, } = AtoGojsEditorModel.ENUM_TEMPLATES;
6804
- const ListItemsCreateEntityTemplate = [
6805
- SOLAR_POWER,
6806
- POWER_CONDITIONING_UNIT,
6807
- BATTERY,
6808
- INVERTER,
6809
- ];
6769
+ const ListItemsCreateEntityTemplate = [SOLAR_POWER, POWER_CONDITIONING_UNIT, BATTERY, INVERTER];
6810
6770
  ListItemsCreateEntityTemplate.map((e) => {
6811
6771
  if (!!AtoGojsEditorModel.NODE_TEMPLATES[e]) {
6812
6772
  this.makeEntityTemplateEnergy(AtoGojsEditorModel.NODE_TEMPLATES[e].icon, AtoGojsEditorModel.NODE_TEMPLATES[e].name);
@@ -6884,11 +6844,7 @@ class AtoDefaultGojsEditor {
6884
6844
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
6885
6845
  margin: 4,
6886
6846
  }, new go.Binding('text', 'textComponent'))),
6887
- }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => x ? 'white' : 'transparent')
6888
- // new go.Binding('margin', 'isFormat', (x) =>
6889
- // x ? new go.Margin(5, 0, 5, 5) : new go.Margin(5, 5, 5, 5),
6890
- // ),
6891
- )));
6847
+ }, new go.Binding('text', 'textComponent'), new go.Binding('background', 'textComponent', (x) => (x ? 'white' : 'transparent')))));
6892
6848
  // arrow
6893
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) => ![
6894
6850
  AtoGojsEditorModel.ENUM_LINK_TYPES.PIPE_ANIMATION,
@@ -7002,9 +6958,7 @@ class AtoDefaultGojsEditor {
7002
6958
  click: function (e, obj) {
7003
6959
  alert('Option 2 clicked!');
7004
6960
  },
7005
- })
7006
- // ... add more options as needed ...
7007
- );
6961
+ }));
7008
6962
  const node = this.$(go.Node, 'Spot', {
7009
6963
  // fromSpot: go.Spot.RightSide,
7010
6964
  // toSpot: go.Spot.LeftSide,
@@ -7057,8 +7011,7 @@ class AtoDefaultGojsEditor {
7057
7011
  doubleClick: (e, obj) => {
7058
7012
  var _a, _b, _c, _d, _e;
7059
7013
  const node = obj.part;
7060
- if (((_a = node === null || node === void 0 ? void 0 : node.ob) === null || _a === void 0 ? void 0 : _a.isTypeInflowOfPlantCell) &&
7061
- !((_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)) {
7062
7015
  // obj?.data?.onSelected(node?.ob?.nodePlantCellParent);
7063
7016
  // this.isShowNodeInfo
7064
7017
  // ? self.onDoubleClickNode.emit({
@@ -7374,11 +7327,10 @@ class AtoDefaultGojsEditor {
7374
7327
  ? this.generateActionGroup([
7375
7328
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
7376
7329
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
7377
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
7378
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
7379
- .IMMERSED_UF_WATER_TREATMENTS].name,
7380
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES
7381
- .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,
7382
7334
  ].includes(title)
7383
7335
  ? [
7384
7336
  AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
@@ -7435,8 +7387,7 @@ class AtoDefaultGojsEditor {
7435
7387
  var _a;
7436
7388
  return !(((_a = AtoGojsEditorModel.TYPE_COMPONENT_WATER) === null || _a === void 0 ? void 0 : _a.includes(data === null || data === void 0 ? void 0 : data.systemType)) &&
7437
7389
  (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7438
- (data === null || data === void 0 ? void 0 : data.topologyType) !==
7439
- ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
7390
+ (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
7440
7391
  })))), this.$(go.Panel, 'Vertical', {
7441
7392
  alignment: go.Spot.Left,
7442
7393
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
@@ -7630,19 +7581,7 @@ class AtoDefaultGojsEditor {
7630
7581
  AtoDefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS,
7631
7582
  // DefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
7632
7583
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7633
- ])
7634
- // new go.Binding('visible', 'isNotAction', (x) => !x),
7635
- )
7636
- // this.$(
7637
- // go.Panel,
7638
- // 'Horizontal',
7639
- // { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
7640
- // this.generateActionGroup([DefaultGojsEditor.ENUM_ACTIONS.ONLY_DETAILS]),
7641
- // new go.Binding('visible', '', (x) => {
7642
- // return x?.isOnlyDetails && !x?.isNotAction ? true : false;
7643
- // }),
7644
- // ),
7645
- ),
7584
+ ]))),
7646
7585
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7647
7586
  margin: 4,
7648
7587
  }, new go.Binding('text', 'name').makeTwoWay())),
@@ -7679,7 +7618,8 @@ class AtoDefaultGojsEditor {
7679
7618
  alignment: go.Spot.Center,
7680
7619
  desiredSize: new go.Size(size.w - 20, size.h - 65),
7681
7620
  imageStretch: go.GraphObject.Uniform,
7682
- }, 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, {
7683
7623
  row: 2,
7684
7624
  margin: new go.Margin(10, 0, 3, 0),
7685
7625
  editable: true,
@@ -7698,12 +7638,7 @@ class AtoDefaultGojsEditor {
7698
7638
  }), this.$(go.Panel, 'Vertical', {
7699
7639
  alignment: go.Spot.Right,
7700
7640
  alignmentFocus: new go.Spot(1, 0.5, -8, 0),
7701
- })
7702
- // this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true),
7703
- // this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true),
7704
- // this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false),
7705
- // this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false),
7706
- );
7641
+ }));
7707
7642
  this.myDiagram.nodeTemplateMap.set(title, node);
7708
7643
  }
7709
7644
  makeEntityWithdrawOrDischarge(icon, title, size = {
@@ -7783,15 +7718,7 @@ class AtoDefaultGojsEditor {
7783
7718
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7784
7719
  margin: 4,
7785
7720
  }, new go.Binding('text', 'name').makeTwoWay())),
7786
- }, new go.Binding('text', 'name').makeTwoWay()
7787
- // {
7788
- // // define a tooltip for each node that displays the color as text
7789
- // toolTip: this.$(
7790
- // 'ToolTip',
7791
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
7792
- // ), // end of Adornment
7793
- // },
7794
- ))), this.$(go.Panel, 'Vertical', {
7721
+ }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.Panel, 'Vertical', {
7795
7722
  alignment: go.Spot.Left,
7796
7723
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
7797
7724
  }), this.$(go.Panel, 'Vertical', {
@@ -7867,7 +7794,6 @@ class AtoDefaultGojsEditor {
7867
7794
  return this.$('Button', {
7868
7795
  click: function (e, obj) {
7869
7796
  var _a, _b, _c;
7870
- self.openActionMenu();
7871
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) => {
7872
7798
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7873
7799
  // Filter Insight button
@@ -7875,32 +7801,26 @@ class AtoDefaultGojsEditor {
7875
7801
  return !!((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a['ob']) === null || _b === void 0 ? void 0 : _b.id);
7876
7802
  }
7877
7803
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME &&
7878
- ((_d = (_c = obj.part) === null || _c === void 0 ? void 0 : _c['ob']) === null || _d === void 0 ? void 0 : _d.type) !==
7879
- 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 &&
7880
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)) &&
7881
- ((_j = (_h = obj.part) === null || _h === void 0 ? void 0 : _h['ob']) === null || _j === void 0 ? void 0 : _j.topologyType) !==
7882
- ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7883
- ((_l = (_k = obj.part) === null || _k === void 0 ? void 0 : _k['ob']) === null || _l === void 0 ? void 0 : _l.topologyType) !==
7884
- 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) {
7885
7808
  return false;
7886
7809
  }
7887
7810
  if (action === AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW &&
7888
7811
  self.plantSatus === ATO_EPlantType.BASIC_PLANT &&
7889
- ((_o = (_m = obj.part) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.type) ===
7890
- 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) {
7891
7813
  return false;
7892
7814
  }
7893
7815
  return true;
7894
7816
  }).map((e) => {
7895
7817
  var _a, _b, _c, _d;
7896
- if (ATO_ECOMPONENT_PLANT_TYPE.STEAM ===
7897
- ((_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) &&
7898
7819
  e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
7899
7820
  return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
7900
7821
  }
7901
7822
  if (e === AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS &&
7902
- ((_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) ===
7903
- 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) {
7904
7824
  return AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD;
7905
7825
  }
7906
7826
  return e;
@@ -7942,8 +7862,7 @@ class AtoDefaultGojsEditor {
7942
7862
  case AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME:
7943
7863
  onClickFn = () => {
7944
7864
  var _a, _b, _c, _d, _e;
7945
- if (((_b = (_a = obj.part) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.type) ===
7946
- 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) {
7947
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));
7948
7867
  // LayoutService.setToolTipComponentDataStatic({
7949
7868
  // component: RenameBoxComponent,
@@ -7988,6 +7907,7 @@ class AtoDefaultGojsEditor {
7988
7907
  onClickFn();
7989
7908
  } });
7990
7909
  });
7910
+ self.openActionMenu();
7991
7911
  },
7992
7912
  'ButtonBorder.strokeWidth': 0,
7993
7913
  'ButtonBorder.fill': 'white',
@@ -8035,8 +7955,7 @@ class AtoDefaultGojsEditor {
8035
7955
  if ((nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable) !== undefined && (nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable) !== null) {
8036
7956
  newnode.movable = nodedata === null || nodedata === void 0 ? void 0 : nodedata.movable;
8037
7957
  }
8038
- newnode.location = new go.Point(fromnode.location.x + 160, fromnode.location.y +
8039
- 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);
8040
7959
  e.diagram.commitTransaction('Create Node and Link');
8041
7960
  });
8042
7961
  }
@@ -8059,20 +7978,12 @@ class AtoDefaultGojsEditor {
8059
7978
  return this.isEmptyYLoc(locYAlreadyExist, i);
8060
7979
  }
8061
7980
  isEmptyYLoc(locYAlreadyExist, i) {
8062
- if (!_.some(locYAlreadyExist, (x) => x <
8063
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
8064
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
8065
- x >
8066
- i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
8067
- 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)) {
8068
7983
  return i;
8069
7984
  }
8070
- if (!_.some(locYAlreadyExist, (x) => x <
8071
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT +
8072
- AtoDefaultGojsEditor.DISTANCE_2_OUTPUT / 2 &&
8073
- x >
8074
- -i * AtoDefaultGojsEditor.DISTANCE_2_OUTPUT -
8075
- 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)) {
8076
7987
  return -i;
8077
7988
  }
8078
7989
  return null;
@@ -8108,9 +8019,7 @@ class AtoDefaultGojsEditor {
8108
8019
  width: 40,
8109
8020
  height: 40,
8110
8021
  alignment: align,
8111
- stretch: horizontal
8112
- ? go.GraphObject.Horizontal
8113
- : go.GraphObject.Vertical,
8022
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
8114
8023
  portId: name,
8115
8024
  fromSpot: spot,
8116
8025
  fromLinkable: output,
@@ -8157,35 +8066,7 @@ class AtoDefaultGojsEditor {
8157
8066
  stroke: '#919CA5',
8158
8067
  width: 40,
8159
8068
  height: 40, // Match the panel's height
8160
- })
8161
- // this.$(
8162
- // go.TextBlock,
8163
- // {
8164
- // name: 'textBlock',
8165
- // margin: 4,
8166
- // text: '\uf0da', // Mã Unicode tương ứng với fa-caret-left
8167
- // font: '900 12px "Font Awesome 6 Pro"',
8168
- // stroke: 'white', // Đặt màu chữ thành màu trắng
8169
- // cursor: 'pointer',
8170
- // visible: false,
8171
- // },
8172
- // new go.Binding('text', 'name', (_) => {
8173
- // switch (name) {
8174
- // case 'T':
8175
- // case 'B': {
8176
- // return '\uf0d7';
8177
- // }
8178
- // case 'L':
8179
- // case 'R': {
8180
- // return '\uf0da';
8181
- // }
8182
- // default: {
8183
- // return '\uf0d7';
8184
- // }
8185
- // }
8186
- // }),
8187
- // ),
8188
- );
8069
+ }));
8189
8070
  }
8190
8071
  makePort(name, align, spot, output, input) {
8191
8072
  // if (this._initialOptions.isReadOnly) {
@@ -8200,9 +8081,7 @@ class AtoDefaultGojsEditor {
8200
8081
  width: horizontal ? NaN : 8,
8201
8082
  height: !horizontal ? NaN : 8,
8202
8083
  alignment: align,
8203
- stretch: horizontal
8204
- ? go.GraphObject.Horizontal
8205
- : go.GraphObject.Vertical,
8084
+ stretch: horizontal ? go.GraphObject.Horizontal : go.GraphObject.Vertical,
8206
8085
  portId: name,
8207
8086
  fromSpot: spot,
8208
8087
  fromLinkable: output,
@@ -8251,12 +8130,10 @@ class AtoDefaultGojsEditor {
8251
8130
  return false;
8252
8131
  }
8253
8132
  if (data === null || data === void 0 ? void 0 : data.flowOfPlantCell) {
8254
- if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW &&
8255
- name === 'L') {
8133
+ if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW && name === 'L') {
8256
8134
  return true;
8257
8135
  }
8258
- if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.OUTFLOW &&
8259
- name === 'R') {
8136
+ if ((data === null || data === void 0 ? void 0 : data.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.OUTFLOW && name === 'R') {
8260
8137
  return true;
8261
8138
  }
8262
8139
  return false;
@@ -8350,84 +8227,7 @@ class AtoDefaultGojsEditor {
8350
8227
  // stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
8351
8228
  strokeWidth: 2,
8352
8229
  // strokeDashArray: [5, 5],
8353
- })
8354
- // this.$(go.Placeholder),
8355
- // this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0) }),
8356
- )
8357
- // this.$(go.TextBlock, title, {
8358
- // row: 0,
8359
- // margin: new go.Margin(0, 0, 0, 0),
8360
- // stroke: '#444444',
8361
- // font: 'normal 10pt Arial',
8362
- // textAlign: 'center',
8363
- // alignment: go.Spot.Left,
8364
- // },
8365
- // new go.Binding('text', 'key').makeTwoWay(),),
8366
- // this.$(
8367
- // go.Panel,
8368
- // 'Table',
8369
- // {
8370
- // alignment: go.Spot.TopLeft,
8371
- // alignmentFocus: new go.Spot(0, 0, -10, -10),
8372
- // // padding: new go.Margin(0, 0, 50, 0),
8373
- // },
8374
- // this.$(
8375
- // go.Panel,
8376
- // 'Horizontal',
8377
- // {
8378
- // row: 0,
8379
- // alignment: go.Spot.Left,
8380
- // },
8381
- // this.$(go.Picture, icon, {
8382
- // row: 0,
8383
- // // alignment: go.Spot.Center,
8384
- // alignment: go.Spot.Left,
8385
- // maxSize: new go.Size(40, 40),
8386
- // imageStretch: go.GraphObject.Uniform,
8387
- // }),
8388
- // this.$(
8389
- // go.Panel,
8390
- // 'Table',
8391
- // {
8392
- // column: 1,
8393
- // defaultAlignment: go.Spot.Left,
8394
- // alignmentFocus: new go.Spot(0, 0, 0, 20),
8395
- // },
8396
- // this.$(go.TextBlock, title, {
8397
- // row: 0,
8398
- // margin: new go.Margin(3, 3, 5, 10),
8399
- // // maxSize: new go.Size(size.w - 20, NaN),
8400
- // stroke: '#444444',
8401
- // font: 'normal 10pt Arial',
8402
- // textAlign: 'center',
8403
- // alignment: go.Spot.Left,
8404
- // }),
8405
- // this.$(
8406
- // go.TextBlock,
8407
- // {
8408
- // row: 1,
8409
- // margin: new go.Margin(0, 3, 3, 10),
8410
- // editable: true,
8411
- // // maxSize: new go.Size(size.w - 20, 40),
8412
- // stroke: '#000D42',
8413
- // font: 'bold 10pt Arial',
8414
- // textAlign: 'center',
8415
- // wrap: go.TextBlock.None,
8416
- // overflow: go.TextBlock.OverflowEllipsis,
8417
- // },
8418
- // new go.Binding('text', 'name').makeTwoWay(),
8419
- // {
8420
- // // define a tooltip for each node that displays the color as text
8421
- // toolTip: this.$(
8422
- // 'ToolTip',
8423
- // this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name')),
8424
- // ), // end of Adornment
8425
- // },
8426
- // ),
8427
- // ),
8428
- // ),
8429
- // ),
8430
- );
8230
+ })));
8431
8231
  this.myDiagram.groupTemplateMap.set(title, node);
8432
8232
  }
8433
8233
  makeGroupTemplate(icon, title, size = { w: 80, h: 80 }) {
@@ -8565,9 +8365,7 @@ class AtoDefaultGojsEditor {
8565
8365
  // imageStretch: go.GraphObject.Uniform,
8566
8366
  // margin: new go.Margin(130, 0, 0, 0),
8567
8367
  }, new go.Binding('margin', 'margin'), new go.Binding('width', 'width'), new go.Binding('height', 'height'), new go.Binding('source', '', (data) => {
8568
- return (data === null || data === void 0 ? void 0 : data.source)
8569
- ? data === null || data === void 0 ? void 0 : data.source
8570
- : 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;
8571
8369
  }))));
8572
8370
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE, node);
8573
8371
  }
@@ -8666,8 +8464,7 @@ class AtoDefaultGojsEditor {
8666
8464
  cursor: 'pointer',
8667
8465
  click: (e, obj) => {
8668
8466
  var _a, _b, _c, _d;
8669
- 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) ===
8670
- 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) {
8671
8468
  return;
8672
8469
  }
8673
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]));
@@ -8725,8 +8522,7 @@ class AtoDefaultGojsEditor {
8725
8522
  ? `${(data === null || data === void 0 ? void 0 : data.tagName) || ''} `
8726
8523
  : ''}${data === null || data === void 0 ? void 0 : data.value}`;
8727
8524
  }), new go.Binding('visible', '', (data) => {
8728
- if (!!this._initialOptions.isReadOnly &&
8729
- (data === null || data === void 0 ? void 0 : data.tagName)) {
8525
+ if (!!this._initialOptions.isReadOnly && (data === null || data === void 0 ? void 0 : data.tagName)) {
8730
8526
  return true;
8731
8527
  }
8732
8528
  return !!(data === null || data === void 0 ? void 0 : data.value);
@@ -8741,9 +8537,7 @@ class AtoDefaultGojsEditor {
8741
8537
  }), new go.Binding('maxSize', '', (data) => {
8742
8538
  var _a, _b, _c, _d;
8743
8539
  if (!(data === null || data === void 0 ? void 0 : data.isReadOnly) && !this._initialOptions.isReadOnly) {
8744
- return new go.Size(((_a = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _a === void 0 ? void 0 : _a.width)
8745
- ? ((_b = data === null || data === void 0 ? void 0 : data.maxSizeValue) === null || _b === void 0 ? void 0 : _b.width) - 15
8746
- : 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);
8747
8541
  }
8748
8542
  return data === null || data === void 0 ? void 0 : data.maxSizeValue;
8749
8543
  }), new go.Binding('font', '', (data) => {
@@ -8763,13 +8557,11 @@ class AtoDefaultGojsEditor {
8763
8557
  height: 14,
8764
8558
  width: 14,
8765
8559
  }, new go.Binding('visible', '', (data, panel) => {
8766
- 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;
8767
8561
  }), new go.Binding('opacity', '', (data, panel) => {
8768
8562
  return (data === null || data === void 0 ? void 0 : data.isEditable) === false ? 0.6 : 1;
8769
8563
  })))),
8770
- }
8771
- // new go.Binding('text', 'name')
8772
- )));
8564
+ })));
8773
8565
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, node);
8774
8566
  }
8775
8567
  makeMassBalance() {
@@ -8867,7 +8659,9 @@ class AtoDefaultGojsEditor {
8867
8659
  fill: '#FCFCFD',
8868
8660
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
8869
8661
  strokeWidth: 2,
8870
- }), 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', {
8871
8665
  width: 0,
8872
8666
  height: 0,
8873
8667
  alignment: new go.Spot(0, 0.5, 0, 112),
@@ -9157,8 +8951,7 @@ class AtoDefaultGojsEditor {
9157
8951
  // : node?.layout;
9158
8952
  if ((data === null || data === void 0 ? void 0 : data.layoutValue) !== (data === null || data === void 0 ? void 0 : data.layoutValueClone)) {
9159
8953
  data.layoutValueClone = data === null || data === void 0 ? void 0 : data.layoutValue;
9160
- return (data === null || data === void 0 ? void 0 : data.layoutValue) ===
9161
- AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
8954
+ return (data === null || data === void 0 ? void 0 : data.layoutValue) === AtoGojsEditorModel.ENUM_LAYOUT_EDITOR.AUTO
9162
8955
  ? self.$(go.LayeredDigraphLayout, { direction: 0 })
9163
8956
  : self.$(go.Layout);
9164
8957
  }
@@ -9322,82 +9115,7 @@ class AtoDefaultGojsEditor {
9322
9115
  AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS,
9323
9116
  AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
9324
9117
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
9325
- ])
9326
- // this.$(
9327
- // // Edit Text
9328
- // 'Button',
9329
- // {
9330
- // click: self.editTextGroupZone,
9331
- // 'ButtonBorder.strokeWidth': 0,
9332
- // 'ButtonBorder.fill': 'white',
9333
- // },
9334
- // this.$(go.TextBlock, {
9335
- // margin: 4,
9336
- // text: '\ue1bf',
9337
- // font: '20px "Font Awesome 6 Pro"',
9338
- // cursor: 'pointer',
9339
- // stroke: '#2c2c2c',
9340
- // }),
9341
- // ),
9342
- // this.$(
9343
- // // Open Detail
9344
- // 'Button',
9345
- // {
9346
- // click: (e, obj: any) => {
9347
- // const node = obj.part;
9348
- // self.onOpenDetail.emit({
9349
- // node,
9350
- // });
9351
- // },
9352
- // 'ButtonBorder.strokeWidth': 0,
9353
- // 'ButtonBorder.fill': 'white',
9354
- // },
9355
- //
9356
- // this.$(go.TextBlock, {
9357
- // margin: 4,
9358
- // text: '\ue49a',
9359
- // font: '20px "Font Awesome 6 Pro"',
9360
- // cursor: 'pointer',
9361
- // }),
9362
- // ),
9363
- // !this._initialOptions.isReadOnly
9364
- // ? this.$(
9365
- // 'Button',
9366
- // {
9367
- // actionMove: self.dragNewNode, // defined below, to support dragging from the button
9368
- // _dragData: {
9369
- // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
9370
- // name: 0,
9371
- // color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
9372
- // },
9373
- // click: self.clickNewNode, // defined below, to support a click on the button
9374
- // 'ButtonBorder.strokeWidth': 0,
9375
- // 'ButtonBorder.fill': 'white',
9376
- // },
9377
- // this.$(go.TextBlock, {
9378
- // margin: 4,
9379
- // text: '\ue157',
9380
- // font: '20px "Font Awesome 6 Pro"',
9381
- // cursor: 'pointer',
9382
- // stroke: '#2c2c2c',
9383
- // }),
9384
- // )
9385
- // : {},
9386
- // this.$(
9387
- // 'Button',
9388
- // {
9389
- // click: self.deleteNode,
9390
- // 'ButtonBorder.strokeWidth': 0,
9391
- // 'ButtonBorder.fill': 'white',
9392
- // },
9393
- // this.$(go.TextBlock, {
9394
- // margin: 4,
9395
- // text: '\uf2ed',
9396
- // font: '20px "Font Awesome 6 Pro"',
9397
- // cursor: 'pointer',
9398
- // }),
9399
- // ),
9400
- )),
9118
+ ]))),
9401
9119
  }, this.$(go.Panel, 'Auto', this.$(go.Shape, 'RoundedRectangle', {
9402
9120
  fill: 'transparent',
9403
9121
  stroke: AtoGojsEditorModel.ENUM_COLORS.RESOLUTION_BLUE,
@@ -9512,10 +9230,7 @@ class AtoDefaultGojsEditor {
9512
9230
  value: x === null || x === void 0 ? void 0 : x.quantity,
9513
9231
  unit: x === null || x === void 0 ? void 0 : x.unit,
9514
9232
  });
9515
- return ((_a = formatted.shortenedNumber +
9516
- ' ' +
9517
- formatted.unitPrefixes +
9518
- (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 : '';
9519
9234
  }), new go.Binding('visible', 'data', (x) => typeof (x === null || x === void 0 ? void 0 : x.quantity) === 'number')), this.$(go.TextBlock, {
9520
9235
  margin: new go.Margin(0, 5, 10, 0),
9521
9236
  textAlign: 'center',
@@ -9781,8 +9496,7 @@ class AtoDefaultGojsEditor {
9781
9496
  // return;
9782
9497
  // }
9783
9498
  // const newDocument = newWindow?.document;
9784
- 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) &&
9785
- !((_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)) {
9786
9500
  return;
9787
9501
  }
9788
9502
  const svg = this.myDiagram.makeSvg({
@@ -9803,8 +9517,7 @@ class AtoDefaultGojsEditor {
9803
9517
  svgElement.setAttribute('stroke', 'rgba(64, 181, 206, 0.6)');
9804
9518
  }
9805
9519
  // Empty Value
9806
- if ((graphObject === null || graphObject === void 0 ? void 0 : graphObject.name) === 'textBlockValue' ||
9807
- (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') {
9808
9521
  svgElement.textContent = '';
9809
9522
  }
9810
9523
  if (svgElement.clipPath) {
@@ -9853,6 +9566,45 @@ class AtoDefaultGojsEditor {
9853
9566
  this.menuTrigger.openMenu();
9854
9567
  }
9855
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
+ // }
9856
9608
  unsubscribeAll() {
9857
9609
  if (this._subscriptionList) {
9858
9610
  this._subscriptionList.unsubscribe();