ato-water-lib 0.0.137 → 0.0.139

Sign up to get free protection for your applications and to get access to all the features.
@@ -8206,40 +8206,43 @@ class AtoDefaultGojsEditor {
8206
8206
  : null;
8207
8207
  }
8208
8208
  },
8209
- selectionAdornmentTemplate: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
8210
- // { height: 62 },
8211
- this.$(go.Shape, {
8212
- fill: null,
8213
- stroke: 'dodgerblue',
8214
- strokeWidth: 4,
8215
- }), this.$(go.Placeholder,
8216
- // { padding: new go.Margin(8, 3, 0, 3) },
8217
- new go.Binding('padding', '', (x) => {
8218
- return x?.isTypeInflowOfPlantCell
8219
- ? x?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW
8220
- ? new go.Margin(0, 0, 0, 20)
8221
- : new go.Margin(0, 20, 0, 0)
8222
- : null;
8223
- })), new go.Binding('height', '', (x) => {
8224
- // const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
8225
- const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
8226
- if (x?.group_visible || x?.isSelectBox) {
8227
- return (height ?? 0) + 44;
8228
- }
8229
- return height;
8230
- }), new go.Binding('width', '', (x) => {
8231
- return x?.isTypeInflowOfPlantCell ? x?.width + 12 : null;
8232
- })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
8233
- // more
8234
- !this._initialOptions.isReadOnly
8235
- ? this.generateActionGroup([
8236
- AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
8237
- AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
8238
- AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
8239
- AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
8240
- ])
8241
- : {})),
8242
- }, new go.Binding('visible', 'visible'), new go.Binding('fromSpot', 'fromSpot'), new go.Binding('toSpot', 'toSpot'), new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'),
8209
+ selectionAdorned: false,
8210
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
8211
+ ? null
8212
+ : this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
8213
+ // { height: 62 },
8214
+ this.$(go.Shape, {
8215
+ fill: null,
8216
+ stroke: 'dodgerblue',
8217
+ strokeWidth: 4,
8218
+ }), this.$(go.Placeholder,
8219
+ // { padding: new go.Margin(8, 3, 0, 3) },
8220
+ new go.Binding('padding', '', (x) => {
8221
+ return x?.isTypeInflowOfPlantCell
8222
+ ? x?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW
8223
+ ? new go.Margin(0, 0, 0, 20)
8224
+ : new go.Margin(0, 20, 0, 0)
8225
+ : null;
8226
+ })), new go.Binding('height', '', (x) => {
8227
+ // const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
8228
+ const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
8229
+ if (x?.group_visible || x?.isSelectBox) {
8230
+ return (height ?? 0) + 44;
8231
+ }
8232
+ return height;
8233
+ }), new go.Binding('width', '', (x) => {
8234
+ return x?.isTypeInflowOfPlantCell ? x?.width + 12 : null;
8235
+ })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
8236
+ // more
8237
+ !this._initialOptions.isReadOnly
8238
+ ? this.generateActionGroup([
8239
+ AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
8240
+ AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
8241
+ AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
8242
+ AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
8243
+ ])
8244
+ : {})),
8245
+ }, new go.Binding('visible', 'visible'), new go.Binding('fromSpot', 'fromSpot'), new go.Binding('toSpot', 'toSpot'), new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), new go.Binding('selectionAdorned', '', (x) => !self?.isSelectBox), new go.Binding('opacity', '', (x) => x?.opacity ?? 1),
8243
8246
  // new go.Binding('alignment', 'alignment', function(loc) {
8244
8247
  // return new go.Spot(0, 0, loc.x, 0);
8245
8248
  // }).ofObject(),
@@ -8260,7 +8263,7 @@ class AtoDefaultGojsEditor {
8260
8263
  source: ICONS_BASE64['uf2f6_output'],
8261
8264
  height: 14,
8262
8265
  width: 14,
8263
- }, new go.Binding('source', '', (x) => ICONS_BASE64[x?.group_source_icon])), new go.Binding('visible', '', (x) => (x?.group_visible || x?.isSelectBox) ?? false)), this.$(go.Panel, 'Auto', {
8266
+ }, new go.Binding('source', '', (x) => ICONS_BASE64[x?.group_source_icon])), new go.Binding('visible', '', (x) => x?.group_visible ?? false)), this.$(go.Panel, 'Auto', {
8264
8267
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8265
8268
  margin: 2,
8266
8269
  }, new go.Binding('text', '', function (data) {
@@ -8285,10 +8288,17 @@ class AtoDefaultGojsEditor {
8285
8288
  fill: AtoGojsEditorModel.ENUM_COLORS.LIGHT_BLUE,
8286
8289
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
8287
8290
  name: 'textNodeShape',
8291
+ strokeWidth: 1,
8288
8292
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
8289
- return x?.isSelectBox ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x?.stroke;
8293
+ if (x?.isSelectBox) {
8294
+ return AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE;
8295
+ }
8296
+ return x?.stroke ?? AtoGojsEditorModel.ENUM_COLORS.LINK_WATER;
8290
8297
  }), new go.Binding('strokeWidth', '', (x) => {
8291
- return x?.isSelectBox ? 3 : x?.strokeWidth;
8298
+ if (x?.isSelectBox) {
8299
+ return 3;
8300
+ }
8301
+ return x?.strokeWidth ?? 1;
8292
8302
  })), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', { alignment: go.Spot.Center },
8293
8303
  // Alert
8294
8304
  this.$(go.Panel, 'Auto', {
@@ -8354,25 +8364,15 @@ class AtoDefaultGojsEditor {
8354
8364
  // }
8355
8365
  // },
8356
8366
  // }),
8357
- // this.$(go.Picture, {
8358
- // alignment: go.Spot.TopRight,
8359
- // margin: new go.Margin(10, 10, 10, 10),
8360
- // source: ICONS_BASE64['uf2f6_output'],
8361
- // height: 14,
8362
- // width: 14,
8363
- // }),
8364
- this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false)), this.arrowForPlantCell(size, ATO_ENUM_FLOW_DIRECTION.INFLOW))), this.$(go.Panel, 'Horizontal', {
8365
- height: 16,
8366
- }, new go.Binding('visible', '', (x) => (x?.group_visible || x?.isSelectBox) ?? false))), this.$(go.Panel, 'Auto', {
8367
+ this.$(go.Picture, {
8367
8368
  alignment: go.Spot.TopRight,
8368
- alignmentFocus: go.Spot.TopRight,
8369
- }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false), this.$(go.Picture, {
8370
- alignment: go.Spot.Right,
8371
- margin: new go.Margin(2, 0, 0, 0),
8369
+ margin: new go.Margin(0, 0, 0, 0),
8372
8370
  source: ICONS_BASE64['uf14a'],
8373
- height: 17,
8371
+ height: 14,
8374
8372
  width: 14,
8375
- })));
8373
+ }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false)), this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false)), this.arrowForPlantCell(size, ATO_ENUM_FLOW_DIRECTION.INFLOW))), this.$(go.Panel, 'Horizontal', {
8374
+ height: 16,
8375
+ }, new go.Binding('visible', '', (x) => x?.group_visible ?? false))));
8376
8376
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE, node);
8377
8377
  }
8378
8378
  arrowForPlantCell(size, flowDirection) {
@@ -8507,14 +8507,19 @@ class AtoDefaultGojsEditor {
8507
8507
  // self.showPoint(obj?.part?.location);
8508
8508
  },
8509
8509
  click: (e, obj) => {
8510
+ const outputPayload = {
8511
+ left: e?.['Wr']?.x,
8512
+ top: e?.['Wr']?.y,
8513
+ node: node,
8514
+ component: obj?.data,
8515
+ };
8516
+ if (this.isSelectBox) {
8517
+ self.onClickCompoent.emit(outputPayload);
8518
+ return;
8519
+ }
8510
8520
  if (obj?.data?.onSelected) {
8511
8521
  obj?.data?.onSelected(obj?.data);
8512
- self.onClickCompoent.emit({
8513
- left: e?.['Wr']?.x,
8514
- top: e?.['Wr']?.y,
8515
- node: node,
8516
- component: obj?.data,
8517
- });
8522
+ self.onClickCompoent.emit(outputPayload);
8518
8523
  }
8519
8524
  },
8520
8525
  selectionChanged: (e) => {
@@ -8522,7 +8527,7 @@ class AtoDefaultGojsEditor {
8522
8527
  e?.data?.onSelected(null);
8523
8528
  }
8524
8529
  },
8525
- selectionAdornmentTemplate: this._initialOptions.isReadOnly
8530
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
8526
8531
  ? null
8527
8532
  : this.$(go.Adornment, 'Spot', {
8528
8533
  shadowVisible: true,
@@ -8533,7 +8538,12 @@ class AtoDefaultGojsEditor {
8533
8538
  fill: null,
8534
8539
  stroke: 'dodgerblue',
8535
8540
  strokeWidth: 4,
8536
- }), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', {
8541
+ }), this.$(go.Placeholder, { padding: 3 }), new go.Binding('height', '', (x) => {
8542
+ if (x?.plantCellNameBelong) {
8543
+ return 130;
8544
+ }
8545
+ return null;
8546
+ })), this.$(go.Panel, 'Horizontal', {
8537
8547
  alignment: go.Spot.TopRight,
8538
8548
  alignmentFocus: go.Spot.Bottom,
8539
8549
  background: 'white',
@@ -8543,8 +8553,7 @@ class AtoDefaultGojsEditor {
8543
8553
  ? this.generateActionGroup([
8544
8554
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
8545
8555
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
8546
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
8547
- .name,
8556
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
8548
8557
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
8549
8558
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
8550
8559
  ].includes(title)
@@ -8562,28 +8571,41 @@ class AtoDefaultGojsEditor {
8562
8571
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
8563
8572
  ])
8564
8573
  : {})),
8565
- toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8566
- margin: 4,
8567
- }, new go.Binding('text', 'name').makeTwoWay())),
8568
8574
  },
8569
8575
  // new go.Binding('location', 'loc', go.Point.parse),
8570
- new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('visible', 'visible'), new go.Binding('deletable', 'deletable'), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
8576
+ new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('visible', 'visible'), new go.Binding('deletable', 'deletable'), new go.Binding('selectionAdorned', '', (x) => !self?.isSelectBox), new go.Binding('opacity', '', (x) => x?.opacity ?? 1), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
8571
8577
  alignment: go.Spot.Left,
8572
- padding: new go.Margin(1, 1, 0, 1),
8573
- margin: new go.Margin(0, 0, 0, 4),
8574
- height: 14,
8575
- }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false)), this.$(go.Panel, 'Auto', {
8578
+ margin: new go.Margin(0, 0, 0, 0),
8579
+ }, this.$(go.TextBlock, {
8580
+ font: 'bold 10pt Arial',
8581
+ width: size.w,
8582
+ overflow: go.TextBlock.OverflowEllipsis,
8583
+ alignment: go.Spot.Center,
8584
+ wrap: go.TextBlock.None,
8585
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8586
+ margin: 4,
8587
+ }, new go.Binding('text', 'plantCellNameBelong'))),
8588
+ }, new go.Binding('text', 'plantCellNameBelong')), new go.Binding('visible', '', (x) => (x?.plantCellNameBelong ? true : false))), this.$(go.Panel, 'Auto', {
8576
8589
  width: size.w,
8577
8590
  height: size.h,
8591
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8592
+ margin: 4,
8593
+ }, new go.Binding('text', 'name').makeTwoWay())),
8578
8594
  }, this.$(go.Shape, 'RoundedRectangle', {
8579
8595
  fill: 'white',
8580
8596
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
8581
8597
  strokeWidth: 1,
8582
8598
  // strokeDashArray: [5, 5],
8583
8599
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
8584
- return x?.isSelectBox ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x?.stroke;
8600
+ if (x?.isSelectBox) {
8601
+ return AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE;
8602
+ }
8603
+ return x?.stroke ?? AtoGojsEditorModel.ENUM_COLORS.LINK_WATER;
8585
8604
  }), new go.Binding('strokeWidth', '', (x) => {
8586
- return x?.isSelectBox ? 3 : x?.strokeWidth;
8605
+ if (x?.isSelectBox) {
8606
+ return 3;
8607
+ }
8608
+ return x?.strokeWidth ?? 1;
8587
8609
  })), this.$(go.Panel, 'Table', this.$(go.Picture, icon, {
8588
8610
  row: 1,
8589
8611
  alignment: go.Spot.Center,
@@ -8612,18 +8634,37 @@ class AtoDefaultGojsEditor {
8612
8634
  return !(AtoGojsEditorModel.TYPE_COMPONENT_WATER?.includes(data?.systemType) &&
8613
8635
  data?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
8614
8636
  data?.topologyType !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
8615
- }))))),
8616
- // Select box
8617
- this.$(go.Panel, 'Auto', {
8637
+ }))), this.$(go.Picture, {
8618
8638
  alignment: go.Spot.TopRight,
8619
- alignmentFocus: go.Spot.TopRight,
8620
- }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false), this.$(go.Picture, {
8621
- alignment: go.Spot.Right,
8622
- margin: new go.Margin(2, 0, 0, 0),
8639
+ margin: new go.Margin(0, 0, 0, 0),
8623
8640
  source: ICONS_BASE64['uf14a'],
8624
- height: 17,
8641
+ height: 14,
8625
8642
  width: 14,
8626
- })), this.$(go.Panel, 'Vertical', {
8643
+ }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false)), this.$(go.TextBlock, '', {
8644
+ alignment: go.Spot.TopLeft,
8645
+ margin: new go.Margin(2, 0, 0, 2),
8646
+ stroke: '#DC8FA9',
8647
+ font: 'bold 9pt Arial',
8648
+ textAlign: 'left',
8649
+ }, new go.Binding('text', '', (x) => x?.group_text), new go.Binding('stroke', '', (x) => x?.group_text_stroke)))),
8650
+ // Select box
8651
+ // this.$(
8652
+ // go.Panel,
8653
+ // 'Auto',
8654
+ // {
8655
+ // alignment: go.Spot.TopRight,
8656
+ // alignmentFocus: go.Spot.TopRight,
8657
+ // },
8658
+ // // new go.Binding('visible', '', (x) => x?.isSelectBox ?? false),
8659
+ // this.$(go.Picture, {
8660
+ // alignment: go.Spot.Right,
8661
+ // margin: new go.Margin(2, 0, 0, 0),
8662
+ // source: ICONS_BASE64['uf14a'],
8663
+ // height: 17,
8664
+ // width: 14,
8665
+ // }),
8666
+ // ),
8667
+ this.$(go.Panel, 'Vertical', {
8627
8668
  alignment: go.Spot.Left,
8628
8669
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
8629
8670
  }), this.$(go.Panel, 'Vertical', {
@@ -8813,11 +8854,11 @@ class AtoDefaultGojsEditor {
8813
8854
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8814
8855
  margin: 4,
8815
8856
  }, new go.Binding('text', 'name').makeTwoWay())),
8816
- }, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), this.$(go.Panel, 'Auto', { width: size.w, height: size.h },
8857
+ }, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), new go.Binding('selectionAdorned', '', (x) => !x?.isNodeSelectionAdorned), new go.Binding('visible', 'visible'), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Auto', { width: size.w, height: size.h },
8817
8858
  // this.$(go.Shape, 'RoundedRectangle', {
8818
8859
  // fill: 'white',
8819
8860
  // stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
8820
- // // strokeDashArray: [5, 5],
8861
+ // // s trokeDashArray: [5, 5],
8821
8862
  // }),
8822
8863
  // this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0), visible: false }),
8823
8864
  this.$(go.Panel, 'Auto', {
@@ -8827,7 +8868,7 @@ class AtoDefaultGojsEditor {
8827
8868
  fill: 'white',
8828
8869
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
8829
8870
  strokeDashArray: [5, 5],
8830
- }), this.$(go.Panel, 'Table', this.$(go.TextBlock, title, {
8871
+ }, new go.Binding('fill', 'fill'), new go.Binding('stroke', 'stroke'), new go.Binding('strokeWidth', 'strokeWidth'), new go.Binding('strokeDashArray', 'strokeDashArray')), this.$(go.Panel, 'Table', this.$(go.TextBlock, title, {
8831
8872
  row: 0,
8832
8873
  margin: new go.Margin(3, 0, 10, 0),
8833
8874
  desiredSize: new go.Size(size.w - 20, 15),
@@ -8861,10 +8902,14 @@ class AtoDefaultGojsEditor {
8861
8902
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8862
8903
  margin: 4,
8863
8904
  }, new go.Binding('text', 'name').makeTwoWay())),
8864
- }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.Panel, 'Horizontal', {
8865
- height: 16,
8866
- }, new go.Binding('visible', '', (x) => x?.group_visible ?? false), this.$(go.TextBlock, '+Select Component', {
8867
- margin: new go.Margin(0, 2, 0, 0),
8905
+ }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.TextBlock, '', {
8906
+ alignment: go.Spot.TopLeft,
8907
+ margin: new go.Margin(4, 0, 0, 4),
8908
+ stroke: '#DC8FA9',
8909
+ font: 'bold 9pt Arial',
8910
+ textAlign: 'left',
8911
+ }, new go.Binding('text', '', (x) => x?.group_text), new go.Binding('stroke', '', (x) => x?.group_text_stroke))), this.$(go.Panel, 'Horizontal', new go.Binding('visible', '', (x) => x?.isCanSelectComponent ?? false), this.$(go.TextBlock, '+Select Component', {
8912
+ margin: new go.Margin(4, 0, 0, 0),
8868
8913
  stroke: '#3863A6',
8869
8914
  font: 'bold 9pt Arial',
8870
8915
  textAlign: 'left',
@@ -8889,14 +8934,19 @@ class AtoDefaultGojsEditor {
8889
8934
  // self.showPoint(obj?.part?.location);
8890
8935
  },
8891
8936
  click: (e, obj) => {
8937
+ const outputPayload = {
8938
+ left: e?.['Wr']?.x,
8939
+ top: e?.['Wr']?.y,
8940
+ node: node,
8941
+ component: obj?.data,
8942
+ };
8943
+ if (this.isSelectBox) {
8944
+ self.onClickCompoent.emit(outputPayload);
8945
+ return;
8946
+ }
8892
8947
  if (obj?.data?.onSelected) {
8893
8948
  obj?.data?.onSelected(obj?.data);
8894
- self.onClickCompoent.emit({
8895
- left: e?.['Wr']?.x,
8896
- top: e?.['Wr']?.y,
8897
- node: node,
8898
- component: obj?.data,
8899
- });
8949
+ self.onClickCompoent.emit(outputPayload);
8900
8950
  }
8901
8951
  },
8902
8952
  selectionChanged: (e) => {
@@ -8904,13 +8954,16 @@ class AtoDefaultGojsEditor {
8904
8954
  e?.data?.onSelected(null);
8905
8955
  }
8906
8956
  },
8907
- selectionAdornmentTemplate: this._initialOptions.isReadOnly
8957
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
8908
8958
  ? null
8909
8959
  : this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
8910
8960
  fill: null,
8911
8961
  stroke: 'dodgerblue',
8912
8962
  strokeWidth: 4,
8913
8963
  }), this.$(go.Placeholder, { padding: 3 }), new go.Binding('height', '', (x) => {
8964
+ if (x?.plantCellNameBelong) {
8965
+ return 130;
8966
+ }
8914
8967
  if (x?.isSelectBox) {
8915
8968
  return 124;
8916
8969
  }
@@ -8924,24 +8977,30 @@ class AtoDefaultGojsEditor {
8924
8977
  AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
8925
8978
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
8926
8979
  ]))),
8980
+ }, new go.Binding('visible', 'visible'), new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), new go.Binding('selectionAdorned', '', (x) => !self?.isSelectBox), new go.Binding('opacity', '', (x) => x?.opacity ?? 1), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
8981
+ alignment: go.Spot.Left,
8982
+ margin: new go.Margin(0, 0, 0, 0),
8983
+ }, this.$(go.TextBlock, {
8984
+ font: 'bold 10pt Arial',
8985
+ width: size.w,
8986
+ overflow: go.TextBlock.OverflowEllipsis,
8987
+ alignment: go.Spot.Center,
8988
+ wrap: go.TextBlock.None,
8927
8989
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8928
8990
  margin: 4,
8929
- }, new go.Binding('text', 'name').makeTwoWay())),
8930
- }, new go.Binding('visible', 'visible'), new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
8931
- alignment: go.Spot.Left,
8932
- padding: new go.Margin(1, 1, 0, 1),
8933
- margin: new go.Margin(0, 0, 0, 4),
8934
- height: 14,
8935
- }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false)), this.$(go.Panel, 'Auto', {
8991
+ }, new go.Binding('text', 'plantCellNameBelong'))),
8992
+ }, new go.Binding('text', 'plantCellNameBelong')), new go.Binding('visible', '', (x) => (x?.plantCellNameBelong ? true : false))), this.$(go.Panel, 'Auto', {
8936
8993
  width: size.w,
8937
8994
  height: size.h,
8995
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
8996
+ margin: 4,
8997
+ }, new go.Binding('text', 'name').makeTwoWay())),
8938
8998
  }, this.$(go.Shape, 'RoundedRectangle', {
8939
8999
  fill: 'white',
8940
9000
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
8941
- strokeWidth: 3,
8942
9001
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
8943
9002
  return x?.isSelectBox ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x?.stroke;
8944
- })), this.$(go.Panel, 'Table',
9003
+ }), new go.Binding('strokeWidth', 'strokeWidth')), this.$(go.Panel, 'Table',
8945
9004
  // this.$(go.TextBlock, title, {
8946
9005
  // row: 0,
8947
9006
  // margin: new go.Margin(3, 3, 10, 3),
@@ -8978,7 +9037,13 @@ class AtoDefaultGojsEditor {
8978
9037
  // }
8979
9038
  // },
8980
9039
  // }),
8981
- this.$(go.TextBlock, '', {
9040
+ this.$(go.Picture, {
9041
+ alignment: go.Spot.TopRight,
9042
+ margin: new go.Margin(0, 0, 0, 0),
9043
+ source: ICONS_BASE64['uf14a'],
9044
+ height: 14,
9045
+ width: 14,
9046
+ }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false)), this.$(go.TextBlock, '', {
8982
9047
  alignment: go.Spot.TopLeft,
8983
9048
  margin: new go.Margin(2, 0, 0, 2),
8984
9049
  stroke: '#DC8FA9',
@@ -9005,18 +9070,7 @@ class AtoDefaultGojsEditor {
9005
9070
  alignmentFocus: new go.Spot(1, 0.5, -8, 0),
9006
9071
  }),
9007
9072
  // four named ports, one on each side:
9008
- this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false))),
9009
- // Select box
9010
- this.$(go.Panel, 'Auto', {
9011
- alignment: go.Spot.TopRight,
9012
- alignmentFocus: go.Spot.TopRight,
9013
- }, new go.Binding('visible', '', (x) => x?.isSelectBox ?? false), this.$(go.Picture, {
9014
- alignment: go.Spot.Right,
9015
- margin: new go.Margin(2, 0, 0, 0),
9016
- source: ICONS_BASE64['uf14a'],
9017
- height: 17,
9018
- width: 14,
9019
- })));
9073
+ this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false))));
9020
9074
  this.myDiagram.nodeTemplateMap.set(title, node);
9021
9075
  }
9022
9076
  editTextGroupZone(e, button) {
@@ -9255,6 +9309,7 @@ class AtoDefaultGojsEditor {
9255
9309
  color: AtoGojsEditorModel.COLOR_COLLECTION_METHOD[AtoGojsEditorModel.DATA_COLLECTION_METHOD.MANUAL].color,
9256
9310
  group: fromnode?.ob?.group,
9257
9311
  value: 0,
9312
+ parentTopologyId: this.topologyId,
9258
9313
  });
9259
9314
  const newnode = diagram.findNodeForData(nodedata);
9260
9315
  const linkdata = model.copyLinkData({});
@@ -9411,7 +9466,7 @@ class AtoDefaultGojsEditor {
9411
9466
  }
9412
9467
  case 'T':
9413
9468
  case 'L': {
9414
- panel.background = 'rgb(103,151,207)';
9469
+ panel.background = '#54bbba';
9415
9470
  break;
9416
9471
  }
9417
9472
  default: {
@@ -9448,14 +9503,16 @@ class AtoDefaultGojsEditor {
9448
9503
  switch (name) {
9449
9504
  case 'B':
9450
9505
  case 'R': {
9451
- if (data?.systemType === AtoGojsEditorModel.WaterDischargeDestinations) {
9506
+ if (data?.type !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
9507
+ data?.systemType === AtoGojsEditorModel.WaterDischargeDestinations) {
9452
9508
  return false;
9453
9509
  }
9454
9510
  return !data?.isNotSelectOutput;
9455
9511
  }
9456
9512
  case 'T':
9457
9513
  case 'L': {
9458
- if (data?.systemType === AtoGojsEditorModel.WaterWithdrawSources) {
9514
+ if (data?.type !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
9515
+ data?.systemType === AtoGojsEditorModel.WaterWithdrawSources) {
9459
9516
  return false;
9460
9517
  }
9461
9518
  return !data?.isNotSelectInput;
@@ -10916,7 +10973,7 @@ class AtoDefaultGojsEditor {
10916
10973
  }
10917
10974
  }
10918
10975
  AtoDefaultGojsEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoDefaultGojsEditor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
10919
- AtoDefaultGojsEditor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoDefaultGojsEditor, inputs: { linkValidation: "linkValidation", initialOptions: "initialOptions", editor: "editor", isShowNodeInfo: "isShowNodeInfo", isSelectBox: "isSelectBox", plantSatus: "plantSatus" }, outputs: { onModelChangeListenerEvent: "onModelChangeListenerEvent", onClickInfoButton: "onClickInfoButton", onOpenWizard: "onOpenWizard", onOpenDetail: "onOpenDetail", onOpenAssetParameter: "onOpenAssetParameter", onOpenInsightMapping: "onOpenInsightMapping", onHoverInfoButton: "onHoverInfoButton", onHoverAlert: "onHoverAlert", onDoubleClickNode: "onDoubleClickNode", onOpenChangeIcon: "onOpenChangeIcon", onClickCompoent: "onClickCompoent", callbackImageTopology: "callbackImageTopology", onClikParamOfTable: "onClikParamOfTable", onDeleteNode: "onDeleteNode", onUndo: "onUndo", onRename: "onRename" }, viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0 });
10976
+ AtoDefaultGojsEditor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoDefaultGojsEditor, inputs: { linkValidation: "linkValidation", topologyId: "topologyId", initialOptions: "initialOptions", editor: "editor", isShowNodeInfo: "isShowNodeInfo", isSelectBox: "isSelectBox", plantSatus: "plantSatus" }, outputs: { onModelChangeListenerEvent: "onModelChangeListenerEvent", onClickInfoButton: "onClickInfoButton", onOpenWizard: "onOpenWizard", onOpenDetail: "onOpenDetail", onOpenAssetParameter: "onOpenAssetParameter", onOpenInsightMapping: "onOpenInsightMapping", onHoverInfoButton: "onHoverInfoButton", onHoverAlert: "onHoverAlert", onDoubleClickNode: "onDoubleClickNode", onOpenChangeIcon: "onOpenChangeIcon", onClickCompoent: "onClickCompoent", callbackImageTopology: "callbackImageTopology", onClikParamOfTable: "onClikParamOfTable", onDeleteNode: "onDeleteNode", onUndo: "onUndo", onRename: "onRename" }, viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0 });
10920
10977
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoDefaultGojsEditor, decorators: [{
10921
10978
  type: Directive
10922
10979
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menuTrigger: [{
@@ -10924,6 +10981,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
10924
10981
  args: ['menuTrigger']
10925
10982
  }], linkValidation: [{
10926
10983
  type: Input
10984
+ }], topologyId: [{
10985
+ type: Input
10927
10986
  }], initialOptions: [{
10928
10987
  type: Input
10929
10988
  }], editor: [{