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.
@@ -7051,40 +7051,43 @@ class AtoDefaultGojsEditor {
7051
7051
  : null;
7052
7052
  }
7053
7053
  },
7054
- selectionAdornmentTemplate: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
7055
- // { height: 62 },
7056
- this.$(go.Shape, {
7057
- fill: null,
7058
- stroke: 'dodgerblue',
7059
- strokeWidth: 4,
7060
- }), this.$(go.Placeholder,
7061
- // { padding: new go.Margin(8, 3, 0, 3) },
7062
- new go.Binding('padding', '', (x) => {
7063
- return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell)
7064
- ? (x === null || x === void 0 ? void 0 : x.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW
7065
- ? new go.Margin(0, 0, 0, 20)
7066
- : new go.Margin(0, 20, 0, 0)
7067
- : null;
7068
- })), new go.Binding('height', '', (x) => {
7069
- // const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
7070
- const height = (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.height) + 10 : null;
7071
- if ((x === null || x === void 0 ? void 0 : x.group_visible) || (x === null || x === void 0 ? void 0 : x.isSelectBox)) {
7072
- return (height !== null && height !== void 0 ? height : 0) + 44;
7073
- }
7074
- return height;
7075
- }), new go.Binding('width', '', (x) => {
7076
- return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.width) + 12 : null;
7077
- })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
7078
- // more
7079
- !this._initialOptions.isReadOnly
7080
- ? this.generateActionGroup([
7081
- AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
7082
- AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
7083
- AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
7084
- AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7085
- ])
7086
- : {})),
7087
- }, 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'),
7054
+ selectionAdorned: false,
7055
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
7056
+ ? null
7057
+ : this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
7058
+ // { height: 62 },
7059
+ this.$(go.Shape, {
7060
+ fill: null,
7061
+ stroke: 'dodgerblue',
7062
+ strokeWidth: 4,
7063
+ }), this.$(go.Placeholder,
7064
+ // { padding: new go.Margin(8, 3, 0, 3) },
7065
+ new go.Binding('padding', '', (x) => {
7066
+ return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell)
7067
+ ? (x === null || x === void 0 ? void 0 : x.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW
7068
+ ? new go.Margin(0, 0, 0, 20)
7069
+ : new go.Margin(0, 20, 0, 0)
7070
+ : null;
7071
+ })), new go.Binding('height', '', (x) => {
7072
+ // const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
7073
+ const height = (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.height) + 10 : null;
7074
+ if ((x === null || x === void 0 ? void 0 : x.group_visible) || (x === null || x === void 0 ? void 0 : x.isSelectBox)) {
7075
+ return (height !== null && height !== void 0 ? height : 0) + 44;
7076
+ }
7077
+ return height;
7078
+ }), new go.Binding('width', '', (x) => {
7079
+ return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.width) + 12 : null;
7080
+ })), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
7081
+ // more
7082
+ !this._initialOptions.isReadOnly
7083
+ ? this.generateActionGroup([
7084
+ AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
7085
+ AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
7086
+ AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
7087
+ AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7088
+ ])
7089
+ : {})),
7090
+ }, 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 === null || self === void 0 ? void 0 : self.isSelectBox)), new go.Binding('opacity', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.opacity) !== null && _a !== void 0 ? _a : 1; }),
7088
7091
  // new go.Binding('alignment', 'alignment', function(loc) {
7089
7092
  // return new go.Spot(0, 0, loc.x, 0);
7090
7093
  // }).ofObject(),
@@ -7105,7 +7108,7 @@ class AtoDefaultGojsEditor {
7105
7108
  source: ICONS_BASE64['uf2f6_output'],
7106
7109
  height: 14,
7107
7110
  width: 14,
7108
- }, new go.Binding('source', '', (x) => ICONS_BASE64[x === null || x === void 0 ? void 0 : x.group_source_icon])), new go.Binding('visible', '', (x) => { var _a; return (_a = ((x === null || x === void 0 ? void 0 : x.group_visible) || (x === null || x === void 0 ? void 0 : x.isSelectBox))) !== null && _a !== void 0 ? _a : false; })), this.$(go.Panel, 'Auto', {
7111
+ }, new go.Binding('source', '', (x) => ICONS_BASE64[x === null || x === void 0 ? void 0 : x.group_source_icon])), new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.group_visible) !== null && _a !== void 0 ? _a : false; })), this.$(go.Panel, 'Auto', {
7109
7112
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7110
7113
  margin: 2,
7111
7114
  }, new go.Binding('text', '', function (data) {
@@ -7131,10 +7134,19 @@ class AtoDefaultGojsEditor {
7131
7134
  fill: AtoGojsEditorModel.ENUM_COLORS.LIGHT_BLUE,
7132
7135
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
7133
7136
  name: 'textNodeShape',
7137
+ strokeWidth: 1,
7134
7138
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
7135
- return (x === null || x === void 0 ? void 0 : x.isSelectBox) ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x === null || x === void 0 ? void 0 : x.stroke;
7139
+ var _a;
7140
+ if (x === null || x === void 0 ? void 0 : x.isSelectBox) {
7141
+ return AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE;
7142
+ }
7143
+ return (_a = x === null || x === void 0 ? void 0 : x.stroke) !== null && _a !== void 0 ? _a : AtoGojsEditorModel.ENUM_COLORS.LINK_WATER;
7136
7144
  }), new go.Binding('strokeWidth', '', (x) => {
7137
- return (x === null || x === void 0 ? void 0 : x.isSelectBox) ? 3 : x === null || x === void 0 ? void 0 : x.strokeWidth;
7145
+ var _a;
7146
+ if (x === null || x === void 0 ? void 0 : x.isSelectBox) {
7147
+ return 3;
7148
+ }
7149
+ return (_a = x === null || x === void 0 ? void 0 : x.strokeWidth) !== null && _a !== void 0 ? _a : 1;
7138
7150
  })), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', { alignment: go.Spot.Center },
7139
7151
  // Alert
7140
7152
  this.$(go.Panel, 'Auto', {
@@ -7201,25 +7213,15 @@ class AtoDefaultGojsEditor {
7201
7213
  // }
7202
7214
  // },
7203
7215
  // }),
7204
- // this.$(go.Picture, {
7205
- // alignment: go.Spot.TopRight,
7206
- // margin: new go.Margin(10, 10, 10, 10),
7207
- // source: ICONS_BASE64['uf2f6_output'],
7208
- // height: 14,
7209
- // width: 14,
7210
- // }),
7211
- 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', {
7212
- height: 16,
7213
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = ((x === null || x === void 0 ? void 0 : x.group_visible) || (x === null || x === void 0 ? void 0 : x.isSelectBox))) !== null && _a !== void 0 ? _a : false; }))), this.$(go.Panel, 'Auto', {
7216
+ this.$(go.Picture, {
7214
7217
  alignment: go.Spot.TopRight,
7215
- alignmentFocus: go.Spot.TopRight,
7216
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; }), this.$(go.Picture, {
7217
- alignment: go.Spot.Right,
7218
- margin: new go.Margin(2, 0, 0, 0),
7218
+ margin: new go.Margin(0, 0, 0, 0),
7219
7219
  source: ICONS_BASE64['uf14a'],
7220
- height: 17,
7220
+ height: 14,
7221
7221
  width: 14,
7222
- })));
7222
+ }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : 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', {
7223
+ height: 16,
7224
+ }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.group_visible) !== null && _a !== void 0 ? _a : false; }))));
7223
7225
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE, node);
7224
7226
  }
7225
7227
  arrowForPlantCell(size, flowDirection) {
@@ -7359,14 +7361,19 @@ class AtoDefaultGojsEditor {
7359
7361
  },
7360
7362
  click: (e, obj) => {
7361
7363
  var _a, _b, _c, _d;
7362
- if ((_a = obj === null || obj === void 0 ? void 0 : obj.data) === null || _a === void 0 ? void 0 : _a.onSelected) {
7363
- (_b = obj === null || obj === void 0 ? void 0 : obj.data) === null || _b === void 0 ? void 0 : _b.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
7364
- self.onClickCompoent.emit({
7365
- left: (_c = e === null || e === void 0 ? void 0 : e['Wr']) === null || _c === void 0 ? void 0 : _c.x,
7366
- top: (_d = e === null || e === void 0 ? void 0 : e['Wr']) === null || _d === void 0 ? void 0 : _d.y,
7367
- node: node,
7368
- component: obj === null || obj === void 0 ? void 0 : obj.data,
7369
- });
7364
+ const outputPayload = {
7365
+ left: (_a = e === null || e === void 0 ? void 0 : e['Wr']) === null || _a === void 0 ? void 0 : _a.x,
7366
+ top: (_b = e === null || e === void 0 ? void 0 : e['Wr']) === null || _b === void 0 ? void 0 : _b.y,
7367
+ node: node,
7368
+ component: obj === null || obj === void 0 ? void 0 : obj.data,
7369
+ };
7370
+ if (this.isSelectBox) {
7371
+ self.onClickCompoent.emit(outputPayload);
7372
+ return;
7373
+ }
7374
+ if ((_c = obj === null || obj === void 0 ? void 0 : obj.data) === null || _c === void 0 ? void 0 : _c.onSelected) {
7375
+ (_d = obj === null || obj === void 0 ? void 0 : obj.data) === null || _d === void 0 ? void 0 : _d.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
7376
+ self.onClickCompoent.emit(outputPayload);
7370
7377
  }
7371
7378
  },
7372
7379
  selectionChanged: (e) => {
@@ -7375,7 +7382,7 @@ class AtoDefaultGojsEditor {
7375
7382
  (_b = e === null || e === void 0 ? void 0 : e.data) === null || _b === void 0 ? void 0 : _b.onSelected(null);
7376
7383
  }
7377
7384
  },
7378
- selectionAdornmentTemplate: this._initialOptions.isReadOnly
7385
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
7379
7386
  ? null
7380
7387
  : this.$(go.Adornment, 'Spot', {
7381
7388
  shadowVisible: true,
@@ -7386,7 +7393,12 @@ class AtoDefaultGojsEditor {
7386
7393
  fill: null,
7387
7394
  stroke: 'dodgerblue',
7388
7395
  strokeWidth: 4,
7389
- }), this.$(go.Placeholder, { padding: 3 })), this.$(go.Panel, 'Horizontal', {
7396
+ }), this.$(go.Placeholder, { padding: 3 }), new go.Binding('height', '', (x) => {
7397
+ if (x === null || x === void 0 ? void 0 : x.plantCellNameBelong) {
7398
+ return 130;
7399
+ }
7400
+ return null;
7401
+ })), this.$(go.Panel, 'Horizontal', {
7390
7402
  alignment: go.Spot.TopRight,
7391
7403
  alignmentFocus: go.Spot.Bottom,
7392
7404
  background: 'white',
@@ -7396,8 +7408,7 @@ class AtoDefaultGojsEditor {
7396
7408
  ? this.generateActionGroup([
7397
7409
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
7398
7410
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
7399
- AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
7400
- .name,
7411
+ AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
7401
7412
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
7402
7413
  AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
7403
7414
  ].includes(title)
@@ -7415,28 +7426,43 @@ class AtoDefaultGojsEditor {
7415
7426
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7416
7427
  ])
7417
7428
  : {})),
7418
- toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7419
- margin: 4,
7420
- }, new go.Binding('text', 'name').makeTwoWay())),
7421
7429
  },
7422
7430
  // new go.Binding('location', 'loc', go.Point.parse),
7423
- 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', {
7431
+ 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 === null || self === void 0 ? void 0 : self.isSelectBox)), new go.Binding('opacity', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.opacity) !== null && _a !== void 0 ? _a : 1; }), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
7424
7432
  alignment: go.Spot.Left,
7425
- padding: new go.Margin(1, 1, 0, 1),
7426
- margin: new go.Margin(0, 0, 0, 4),
7427
- height: 14,
7428
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.Panel, 'Auto', {
7433
+ margin: new go.Margin(0, 0, 0, 0),
7434
+ }, this.$(go.TextBlock, {
7435
+ font: 'bold 10pt Arial',
7436
+ width: size.w,
7437
+ overflow: go.TextBlock.OverflowEllipsis,
7438
+ alignment: go.Spot.Center,
7439
+ wrap: go.TextBlock.None,
7440
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7441
+ margin: 4,
7442
+ }, new go.Binding('text', 'plantCellNameBelong'))),
7443
+ }, new go.Binding('text', 'plantCellNameBelong')), new go.Binding('visible', '', (x) => ((x === null || x === void 0 ? void 0 : x.plantCellNameBelong) ? true : false))), this.$(go.Panel, 'Auto', {
7429
7444
  width: size.w,
7430
7445
  height: size.h,
7446
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7447
+ margin: 4,
7448
+ }, new go.Binding('text', 'name').makeTwoWay())),
7431
7449
  }, this.$(go.Shape, 'RoundedRectangle', {
7432
7450
  fill: 'white',
7433
7451
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
7434
7452
  strokeWidth: 1,
7435
7453
  // strokeDashArray: [5, 5],
7436
7454
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
7437
- return (x === null || x === void 0 ? void 0 : x.isSelectBox) ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x === null || x === void 0 ? void 0 : x.stroke;
7455
+ var _a;
7456
+ if (x === null || x === void 0 ? void 0 : x.isSelectBox) {
7457
+ return AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE;
7458
+ }
7459
+ return (_a = x === null || x === void 0 ? void 0 : x.stroke) !== null && _a !== void 0 ? _a : AtoGojsEditorModel.ENUM_COLORS.LINK_WATER;
7438
7460
  }), new go.Binding('strokeWidth', '', (x) => {
7439
- return (x === null || x === void 0 ? void 0 : x.isSelectBox) ? 3 : x === null || x === void 0 ? void 0 : x.strokeWidth;
7461
+ var _a;
7462
+ if (x === null || x === void 0 ? void 0 : x.isSelectBox) {
7463
+ return 3;
7464
+ }
7465
+ return (_a = x === null || x === void 0 ? void 0 : x.strokeWidth) !== null && _a !== void 0 ? _a : 1;
7440
7466
  })), this.$(go.Panel, 'Table', this.$(go.Picture, icon, {
7441
7467
  row: 1,
7442
7468
  alignment: go.Spot.Center,
@@ -7466,18 +7492,37 @@ class AtoDefaultGojsEditor {
7466
7492
  return !(((_a = AtoGojsEditorModel.TYPE_COMPONENT_WATER) === null || _a === void 0 ? void 0 : _a.includes(data === null || data === void 0 ? void 0 : data.systemType)) &&
7467
7493
  (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
7468
7494
  (data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
7469
- }))))),
7470
- // Select box
7471
- this.$(go.Panel, 'Auto', {
7495
+ }))), this.$(go.Picture, {
7472
7496
  alignment: go.Spot.TopRight,
7473
- alignmentFocus: go.Spot.TopRight,
7474
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; }), this.$(go.Picture, {
7475
- alignment: go.Spot.Right,
7476
- margin: new go.Margin(2, 0, 0, 0),
7497
+ margin: new go.Margin(0, 0, 0, 0),
7477
7498
  source: ICONS_BASE64['uf14a'],
7478
- height: 17,
7499
+ height: 14,
7479
7500
  width: 14,
7480
- })), this.$(go.Panel, 'Vertical', {
7501
+ }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.TextBlock, '', {
7502
+ alignment: go.Spot.TopLeft,
7503
+ margin: new go.Margin(2, 0, 0, 2),
7504
+ stroke: '#DC8FA9',
7505
+ font: 'bold 9pt Arial',
7506
+ textAlign: 'left',
7507
+ }, new go.Binding('text', '', (x) => x === null || x === void 0 ? void 0 : x.group_text), new go.Binding('stroke', '', (x) => x === null || x === void 0 ? void 0 : x.group_text_stroke)))),
7508
+ // Select box
7509
+ // this.$(
7510
+ // go.Panel,
7511
+ // 'Auto',
7512
+ // {
7513
+ // alignment: go.Spot.TopRight,
7514
+ // alignmentFocus: go.Spot.TopRight,
7515
+ // },
7516
+ // // new go.Binding('visible', '', (x) => x?.isSelectBox ?? false),
7517
+ // this.$(go.Picture, {
7518
+ // alignment: go.Spot.Right,
7519
+ // margin: new go.Margin(2, 0, 0, 0),
7520
+ // source: ICONS_BASE64['uf14a'],
7521
+ // height: 17,
7522
+ // width: 14,
7523
+ // }),
7524
+ // ),
7525
+ this.$(go.Panel, 'Vertical', {
7481
7526
  alignment: go.Spot.Left,
7482
7527
  alignmentFocus: new go.Spot(0, 0.5, 8, 0),
7483
7528
  }), this.$(go.Panel, 'Vertical', {
@@ -7674,11 +7719,11 @@ class AtoDefaultGojsEditor {
7674
7719
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7675
7720
  margin: 4,
7676
7721
  }, new go.Binding('text', 'name').makeTwoWay())),
7677
- }, 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 },
7722
+ }, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'), new go.Binding('selectionAdorned', '', (x) => !(x === null || x === void 0 ? void 0 : x.isNodeSelectionAdorned)), new go.Binding('visible', 'visible'), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Auto', { width: size.w, height: size.h },
7678
7723
  // this.$(go.Shape, 'RoundedRectangle', {
7679
7724
  // fill: 'white',
7680
7725
  // stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
7681
- // // strokeDashArray: [5, 5],
7726
+ // // s trokeDashArray: [5, 5],
7682
7727
  // }),
7683
7728
  // this.$(go.Placeholder, { padding: new go.Margin(0, 0, 0, 0), visible: false }),
7684
7729
  this.$(go.Panel, 'Auto', {
@@ -7688,7 +7733,7 @@ class AtoDefaultGojsEditor {
7688
7733
  fill: 'white',
7689
7734
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
7690
7735
  strokeDashArray: [5, 5],
7691
- }), this.$(go.Panel, 'Table', this.$(go.TextBlock, title, {
7736
+ }, 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, {
7692
7737
  row: 0,
7693
7738
  margin: new go.Margin(3, 0, 10, 0),
7694
7739
  desiredSize: new go.Size(size.w - 20, 15),
@@ -7721,10 +7766,14 @@ class AtoDefaultGojsEditor {
7721
7766
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7722
7767
  margin: 4,
7723
7768
  }, new go.Binding('text', 'name').makeTwoWay())),
7724
- }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.Panel, 'Horizontal', {
7725
- height: 16,
7726
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.group_visible) !== null && _a !== void 0 ? _a : false; }), this.$(go.TextBlock, '+Select Component', {
7727
- margin: new go.Margin(0, 2, 0, 0),
7769
+ }, new go.Binding('text', 'name').makeTwoWay()))), this.$(go.TextBlock, '', {
7770
+ alignment: go.Spot.TopLeft,
7771
+ margin: new go.Margin(4, 0, 0, 4),
7772
+ stroke: '#DC8FA9',
7773
+ font: 'bold 9pt Arial',
7774
+ textAlign: 'left',
7775
+ }, new go.Binding('text', '', (x) => x === null || x === void 0 ? void 0 : x.group_text), new go.Binding('stroke', '', (x) => x === null || x === void 0 ? void 0 : x.group_text_stroke))), this.$(go.Panel, 'Horizontal', new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isCanSelectComponent) !== null && _a !== void 0 ? _a : false; }), this.$(go.TextBlock, '+Select Component', {
7776
+ margin: new go.Margin(4, 0, 0, 0),
7728
7777
  stroke: '#3863A6',
7729
7778
  font: 'bold 9pt Arial',
7730
7779
  textAlign: 'left',
@@ -7750,14 +7799,19 @@ class AtoDefaultGojsEditor {
7750
7799
  },
7751
7800
  click: (e, obj) => {
7752
7801
  var _a, _b, _c, _d;
7753
- if ((_a = obj === null || obj === void 0 ? void 0 : obj.data) === null || _a === void 0 ? void 0 : _a.onSelected) {
7754
- (_b = obj === null || obj === void 0 ? void 0 : obj.data) === null || _b === void 0 ? void 0 : _b.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
7755
- self.onClickCompoent.emit({
7756
- left: (_c = e === null || e === void 0 ? void 0 : e['Wr']) === null || _c === void 0 ? void 0 : _c.x,
7757
- top: (_d = e === null || e === void 0 ? void 0 : e['Wr']) === null || _d === void 0 ? void 0 : _d.y,
7758
- node: node,
7759
- component: obj === null || obj === void 0 ? void 0 : obj.data,
7760
- });
7802
+ const outputPayload = {
7803
+ left: (_a = e === null || e === void 0 ? void 0 : e['Wr']) === null || _a === void 0 ? void 0 : _a.x,
7804
+ top: (_b = e === null || e === void 0 ? void 0 : e['Wr']) === null || _b === void 0 ? void 0 : _b.y,
7805
+ node: node,
7806
+ component: obj === null || obj === void 0 ? void 0 : obj.data,
7807
+ };
7808
+ if (this.isSelectBox) {
7809
+ self.onClickCompoent.emit(outputPayload);
7810
+ return;
7811
+ }
7812
+ if ((_c = obj === null || obj === void 0 ? void 0 : obj.data) === null || _c === void 0 ? void 0 : _c.onSelected) {
7813
+ (_d = obj === null || obj === void 0 ? void 0 : obj.data) === null || _d === void 0 ? void 0 : _d.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
7814
+ self.onClickCompoent.emit(outputPayload);
7761
7815
  }
7762
7816
  },
7763
7817
  selectionChanged: (e) => {
@@ -7766,13 +7820,16 @@ class AtoDefaultGojsEditor {
7766
7820
  (_b = e === null || e === void 0 ? void 0 : e.data) === null || _b === void 0 ? void 0 : _b.onSelected(null);
7767
7821
  }
7768
7822
  },
7769
- selectionAdornmentTemplate: this._initialOptions.isReadOnly
7823
+ selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
7770
7824
  ? null
7771
7825
  : this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
7772
7826
  fill: null,
7773
7827
  stroke: 'dodgerblue',
7774
7828
  strokeWidth: 4,
7775
7829
  }), this.$(go.Placeholder, { padding: 3 }), new go.Binding('height', '', (x) => {
7830
+ if (x === null || x === void 0 ? void 0 : x.plantCellNameBelong) {
7831
+ return 130;
7832
+ }
7776
7833
  if (x === null || x === void 0 ? void 0 : x.isSelectBox) {
7777
7834
  return 124;
7778
7835
  }
@@ -7786,24 +7843,30 @@ class AtoDefaultGojsEditor {
7786
7843
  AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
7787
7844
  AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
7788
7845
  ]))),
7846
+ }, 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 === null || self === void 0 ? void 0 : self.isSelectBox)), new go.Binding('opacity', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.opacity) !== null && _a !== void 0 ? _a : 1; }), this.$(go.Panel, 'Vertical', this.$(go.Panel, 'Horizontal', {
7847
+ alignment: go.Spot.Left,
7848
+ margin: new go.Margin(0, 0, 0, 0),
7849
+ }, this.$(go.TextBlock, {
7850
+ font: 'bold 10pt Arial',
7851
+ width: size.w,
7852
+ overflow: go.TextBlock.OverflowEllipsis,
7853
+ alignment: go.Spot.Center,
7854
+ wrap: go.TextBlock.None,
7789
7855
  toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7790
7856
  margin: 4,
7791
- }, new go.Binding('text', 'name').makeTwoWay())),
7792
- }, 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', {
7793
- alignment: go.Spot.Left,
7794
- padding: new go.Margin(1, 1, 0, 1),
7795
- margin: new go.Margin(0, 0, 0, 4),
7796
- height: 14,
7797
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.Panel, 'Auto', {
7857
+ }, new go.Binding('text', 'plantCellNameBelong'))),
7858
+ }, new go.Binding('text', 'plantCellNameBelong')), new go.Binding('visible', '', (x) => ((x === null || x === void 0 ? void 0 : x.plantCellNameBelong) ? true : false))), this.$(go.Panel, 'Auto', {
7798
7859
  width: size.w,
7799
7860
  height: size.h,
7861
+ toolTip: this.$('ToolTip', this.$(go.TextBlock, {
7862
+ margin: 4,
7863
+ }, new go.Binding('text', 'name').makeTwoWay())),
7800
7864
  }, this.$(go.Shape, 'RoundedRectangle', {
7801
7865
  fill: 'white',
7802
7866
  stroke: AtoGojsEditorModel.ENUM_COLORS.LINK_WATER,
7803
- strokeWidth: 3,
7804
7867
  }, new go.Binding('fill', 'fill'), new go.Binding('stroke', '', (x) => {
7805
7868
  return (x === null || x === void 0 ? void 0 : x.isSelectBox) ? AtoGojsEditorModel.ENUM_COLORS.TORY_BLUE : x === null || x === void 0 ? void 0 : x.stroke;
7806
- })), this.$(go.Panel, 'Table',
7869
+ }), new go.Binding('strokeWidth', 'strokeWidth')), this.$(go.Panel, 'Table',
7807
7870
  // this.$(go.TextBlock, title, {
7808
7871
  // row: 0,
7809
7872
  // margin: new go.Margin(3, 3, 10, 3),
@@ -7840,7 +7903,13 @@ class AtoDefaultGojsEditor {
7840
7903
  // }
7841
7904
  // },
7842
7905
  // }),
7843
- this.$(go.TextBlock, '', {
7906
+ this.$(go.Picture, {
7907
+ alignment: go.Spot.TopRight,
7908
+ margin: new go.Margin(0, 0, 0, 0),
7909
+ source: ICONS_BASE64['uf14a'],
7910
+ height: 14,
7911
+ width: 14,
7912
+ }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.TextBlock, '', {
7844
7913
  alignment: go.Spot.TopLeft,
7845
7914
  margin: new go.Margin(2, 0, 0, 2),
7846
7915
  stroke: '#DC8FA9',
@@ -7867,18 +7936,7 @@ class AtoDefaultGojsEditor {
7867
7936
  alignmentFocus: new go.Spot(1, 0.5, -8, 0),
7868
7937
  }),
7869
7938
  // four named ports, one on each side:
7870
- 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))),
7871
- // Select box
7872
- this.$(go.Panel, 'Auto', {
7873
- alignment: go.Spot.TopRight,
7874
- alignmentFocus: go.Spot.TopRight,
7875
- }, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; }), this.$(go.Picture, {
7876
- alignment: go.Spot.Right,
7877
- margin: new go.Margin(2, 0, 0, 0),
7878
- source: ICONS_BASE64['uf14a'],
7879
- height: 17,
7880
- width: 14,
7881
- })));
7939
+ 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))));
7882
7940
  this.myDiagram.nodeTemplateMap.set(title, node);
7883
7941
  }
7884
7942
  editTextGroupZone(e, button) {
@@ -8097,7 +8155,7 @@ class AtoDefaultGojsEditor {
8097
8155
  const diagram = fromnode.diagram;
8098
8156
  const model = diagram.model;
8099
8157
  const nodedata = Object.assign(Object.assign({}, model.copyNodeData(dragData)), { key: UtilsService.generateUUID() });
8100
- model.addNodeData(Object.assign(Object.assign({}, nodedata), { isEditable: true, shortenedNumber: 0, isFormat: false, dataCollectionMethod: AtoGojsEditorModel.DATA_COLLECTION_METHOD.MANUAL, color: AtoGojsEditorModel.COLOR_COLLECTION_METHOD[AtoGojsEditorModel.DATA_COLLECTION_METHOD.MANUAL].color, group: (_a = fromnode === null || fromnode === void 0 ? void 0 : fromnode.ob) === null || _a === void 0 ? void 0 : _a.group, value: 0 }));
8158
+ model.addNodeData(Object.assign(Object.assign({}, nodedata), { isEditable: true, shortenedNumber: 0, isFormat: false, dataCollectionMethod: AtoGojsEditorModel.DATA_COLLECTION_METHOD.MANUAL, color: AtoGojsEditorModel.COLOR_COLLECTION_METHOD[AtoGojsEditorModel.DATA_COLLECTION_METHOD.MANUAL].color, group: (_a = fromnode === null || fromnode === void 0 ? void 0 : fromnode.ob) === null || _a === void 0 ? void 0 : _a.group, value: 0, parentTopologyId: this.topologyId }));
8101
8159
  const newnode = diagram.findNodeForData(nodedata);
8102
8160
  const linkdata = model.copyLinkData({});
8103
8161
  model.setFromKeyForLinkData(linkdata, model.getKeyForNodeData(fromnode.data));
@@ -8256,7 +8314,7 @@ class AtoDefaultGojsEditor {
8256
8314
  }
8257
8315
  case 'T':
8258
8316
  case 'L': {
8259
- panel.background = 'rgb(103,151,207)';
8317
+ panel.background = '#54bbba';
8260
8318
  break;
8261
8319
  }
8262
8320
  default: {
@@ -8293,14 +8351,16 @@ class AtoDefaultGojsEditor {
8293
8351
  switch (name) {
8294
8352
  case 'B':
8295
8353
  case 'R': {
8296
- if ((data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterDischargeDestinations) {
8354
+ if ((data === null || data === void 0 ? void 0 : data.type) !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
8355
+ (data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterDischargeDestinations) {
8297
8356
  return false;
8298
8357
  }
8299
8358
  return !(data === null || data === void 0 ? void 0 : data.isNotSelectOutput);
8300
8359
  }
8301
8360
  case 'T':
8302
8361
  case 'L': {
8303
- if ((data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterWithdrawSources) {
8362
+ if ((data === null || data === void 0 ? void 0 : data.type) !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
8363
+ (data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterWithdrawSources) {
8304
8364
  return false;
8305
8365
  }
8306
8366
  return !(data === null || data === void 0 ? void 0 : data.isNotSelectInput);
@@ -9776,7 +9836,7 @@ class AtoDefaultGojsEditor {
9776
9836
  }
9777
9837
  }
9778
9838
  AtoDefaultGojsEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoDefaultGojsEditor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
9779
- 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 });
9839
+ 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 });
9780
9840
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoDefaultGojsEditor, decorators: [{
9781
9841
  type: Directive
9782
9842
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menuTrigger: [{
@@ -9784,6 +9844,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
9784
9844
  args: ['menuTrigger']
9785
9845
  }], linkValidation: [{
9786
9846
  type: Input
9847
+ }], topologyId: [{
9848
+ type: Input
9787
9849
  }], initialOptions: [{
9788
9850
  type: Input
9789
9851
  }], editor: [{