ato-water-lib 0.0.25 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,6 @@ import { Subject, Subscription } from 'rxjs';
8
8
  import * as i1 from '@angular/common';
9
9
  import { DecimalPipe, CommonModule } from '@angular/common';
10
10
  import { v4 } from 'uuid';
11
- import { ReactiveFormsModule, FormsModule } from '@angular/forms';
12
- import { BrowserModule } from '@angular/platform-browser';
13
11
 
14
12
  class AtoWaterLibService {
15
13
  constructor() { }
@@ -4740,11 +4738,15 @@ class AtoDefaultGojsEditor {
4740
4738
  }
4741
4739
  return true;
4742
4740
  }).map((e) => {
4743
- var _a, _b;
4741
+ var _a, _b, _c, _d;
4744
4742
  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) &&
4745
4743
  e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
4746
4744
  return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
4747
4745
  }
4746
+ if (e === AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS &&
4747
+ ((_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) {
4748
+ return AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD;
4749
+ }
4748
4750
  return e;
4749
4751
  });
4750
4752
  self.actions = filteredActions.map((action) => {
@@ -4760,6 +4762,7 @@ class AtoDefaultGojsEditor {
4760
4762
  break;
4761
4763
  case AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS:
4762
4764
  case AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS:
4765
+ case AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD:
4763
4766
  onClickFn = () => {
4764
4767
  self.onOpenDetail.emit({
4765
4768
  node: obj.part,
@@ -5354,7 +5357,17 @@ class AtoDefaultGojsEditor {
5354
5357
  // }),
5355
5358
  // ),
5356
5359
  // ),
5357
- itemTemplate: this.$(go.Panel, 'TableRow', this.$(go.TextBlock, '', { column: 0, margin: 2, textAlign: 'left', alignment: go.Spot.Left }, new go.Binding('text', '', (data, panel) => {
5360
+ itemTemplate: this.$(go.Panel, 'TableRow', {
5361
+ cursor: 'pointer',
5362
+ click: (e, obj) => {
5363
+ var _a, _b, _c;
5364
+ 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) {
5365
+ return;
5366
+ }
5367
+ self.onClikParamOfTable.emit(Object.assign({}, (_c = obj.panel.part.data) === null || _c === void 0 ? void 0 : _c.dataTable[obj.row]));
5368
+ },
5369
+ background: 'transparent',
5370
+ }, this.$(go.TextBlock, '', { column: 0, margin: 2, textAlign: 'left', alignment: go.Spot.Left }, new go.Binding('text', '', (data, panel) => {
5358
5371
  return data === null || data === void 0 ? void 0 : data.name;
5359
5372
  })), this.$(go.Panel, 'Table', {
5360
5373
  column: 1,
@@ -5384,11 +5397,6 @@ class AtoDefaultGojsEditor {
5384
5397
  }
5385
5398
  return !!(data === null || data === void 0 ? void 0 : data.value);
5386
5399
  }))),
5387
- }, {
5388
- click: (e, obj) => {
5389
- var _a;
5390
- self.onClikParamOfTable.emit(Object.assign({ pramTable: obj.panel.part.data }, (_a = obj.panel.part.data) === null || _a === void 0 ? void 0 : _a.dataTable[obj === null || obj === void 0 ? void 0 : obj.panel.row]));
5391
- },
5392
5400
  }, new go.Binding('text', '', (data, panel) => {
5393
5401
  return data === null || data === void 0 ? void 0 : data.value;
5394
5402
  }), new go.Binding('stroke', '', (data) => {
@@ -5412,14 +5420,6 @@ class AtoDefaultGojsEditor {
5412
5420
  })), new go.Binding('visible', '', (data) => !!(data === null || data === void 0 ? void 0 : data.toolTipAction))),
5413
5421
  height: 14,
5414
5422
  width: 14,
5415
- }, {
5416
- click: (e, obj) => {
5417
- var _a, _b, _c;
5418
- if (((_b = (_a = obj.panel.part.data) === null || _a === void 0 ? void 0 : _a.dataTable[obj === null || obj === void 0 ? void 0 : obj.panel.row]) === null || _b === void 0 ? void 0 : _b.isEditable) === false) {
5419
- return;
5420
- }
5421
- self.onClikParamOfTable.emit(Object.assign({ pramTable: obj.panel.part.data }, (_c = obj.panel.part.data) === null || _c === void 0 ? void 0 : _c.dataTable[obj === null || obj === void 0 ? void 0 : obj.panel.row]));
5422
- },
5423
5423
  }, new go.Binding('visible', '', (data, panel) => {
5424
5424
  return !this._initialOptions.isReadOnly;
5425
5425
  }), new go.Binding('opacity', '', (data, panel) => {
@@ -6363,6 +6363,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6363
6363
  ENUM_ACTIONS["DATA_MAPPING"] = "Data Mapping";
6364
6364
  ENUM_ACTIONS["MORE"] = "More";
6365
6365
  ENUM_ACTIONS["FLOW_DETAILS"] = "Flow details";
6366
+ ENUM_ACTIONS["FLOW_DETAILS_AND_WIZARD"] = "Flow details & wizard";
6366
6367
  ENUM_ACTIONS["ASSET_PARAMETERS"] = "Asset parameters";
6367
6368
  ENUM_ACTIONS["CHANGE_ICON"] = "Change icon";
6368
6369
  })(ENUM_ACTIONS = AtoDefaultGojsEditor.ENUM_ACTIONS || (AtoDefaultGojsEditor.ENUM_ACTIONS = {}));
@@ -6377,6 +6378,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6377
6378
  iconClassName: 'far fa-arrow-progress',
6378
6379
  onClick: () => { },
6379
6380
  },
6381
+ [ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD]: {
6382
+ name: ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD,
6383
+ iconClassName: 'far fa-arrow-progress',
6384
+ onClick: () => { },
6385
+ },
6380
6386
  [ENUM_ACTIONS.ASSET_PARAMETERS]: {
6381
6387
  name: ENUM_ACTIONS.ASSET_PARAMETERS,
6382
6388
  iconClassName: 'far fa-box-archive',
@@ -7870,13 +7876,11 @@ class AssetFlowComponent {
7870
7876
  }
7871
7877
  }
7872
7878
  updateLocationReponsive() {
7873
- var _a, _b, _c, _d, _e, _f;
7879
+ var _a, _b, _c, _d;
7874
7880
  if (!((_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray)) {
7875
7881
  this.flowData = this.getDefaultFlowData();
7876
- this.dataTableAssetParams = (_c = (_b = this.flowData) === null || _b === void 0 ? void 0 : _b.nodeDataArray) === null || _c === void 0 ? void 0 : _c.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE);
7877
- return;
7878
7882
  }
7879
- _.forEach((_d = _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]) === null || _d === void 0 ? void 0 : _d.nodeDataArray, (node) => {
7883
+ _.forEach((_b = _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]) === null || _b === void 0 ? void 0 : _b.nodeDataArray, (node) => {
7880
7884
  var _a, _b;
7881
7885
  const itemFind = (_b = (_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.find((x) => (node === null || node === void 0 ? void 0 : node.key) === (x === null || x === void 0 ? void 0 : x.key));
7882
7886
  if (itemFind) {
@@ -7886,7 +7890,7 @@ class AssetFlowComponent {
7886
7890
  itemFind.padding = node === null || node === void 0 ? void 0 : node.padding;
7887
7891
  }
7888
7892
  });
7889
- this.dataTableAssetParams = (_f = (_e = this.flowData) === null || _e === void 0 ? void 0 : _e.nodeDataArray) === null || _f === void 0 ? void 0 : _f.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE);
7893
+ this.dataTableAssetParams = (_d = (_c = this.flowData) === null || _c === void 0 ? void 0 : _c.nodeDataArray) === null || _d === void 0 ? void 0 : _d.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE);
7890
7894
  this.setFlowData(_.cloneDeep(this.flowData));
7891
7895
  }
7892
7896
  ngOnInit() {
@@ -7898,7 +7902,7 @@ class AssetFlowComponent {
7898
7902
  }
7899
7903
  getDefaultFlowData() {
7900
7904
  var _a;
7901
- const flowData = Object.assign(Object.assign({}, _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
7905
+ const flowData = Object.assign(Object.assign({}, _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
7902
7906
  if (this.isUseBase64) {
7903
7907
  const itemImageTemp = (_a = flowData === null || flowData === void 0 ? void 0 : flowData.nodeDataArray) === null || _a === void 0 ? void 0 : _a.find((x) => (x === null || x === void 0 ? void 0 : x.type) === 'Image Template');
7904
7908
  if (itemImageTemp) {
@@ -7946,19 +7950,13 @@ AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
7946
7950
  AssetFlowComponent,
7947
7951
  AtoLoadingDirective,
7948
7952
  AtoAssetParamsViewComponent,
7949
- AtoNgVarDirective], imports: [CommonModule,
7950
- BrowserModule,
7951
- ReactiveFormsModule,
7952
- FormsModule], exports: [AtoWaterLibComponent,
7953
+ AtoNgVarDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
7953
7954
  AtoFlowDiagramLibComponent,
7954
7955
  AssetFlowComponent,
7955
7956
  AtoLoadingDirective,
7956
7957
  AtoAssetParamsViewComponent,
7957
7958
  AtoNgVarDirective] });
7958
- AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule,
7959
- BrowserModule,
7960
- ReactiveFormsModule,
7961
- FormsModule] });
7959
+ AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
7962
7960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
7963
7961
  type: NgModule,
7964
7962
  args: [{
@@ -7972,9 +7970,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7972
7970
  ],
7973
7971
  imports: [
7974
7972
  CommonModule,
7975
- BrowserModule,
7976
- ReactiveFormsModule,
7977
- FormsModule,
7978
7973
  ],
7979
7974
  exports: [
7980
7975
  AtoWaterLibComponent,