ato-water-lib 0.0.18 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,9 @@ export * from './lib/ato-water-lib.module';
7
7
  // Component
8
8
  export * from './lib/components/flow-diagram-lib/flow-diagram-lib.component';
9
9
  export * from './lib/components/asset-flow/asset-flow.component';
10
+ export * from './lib/components/asset-params-view/asset-params-view.component';
10
11
  // Directive
11
12
  export * from './lib/directive/ato-loading.directive';
13
+ export * from './lib/directive/ng-var.directive';
12
14
  // Css
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2F0by13YXRlci1saWIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxZQUFZO0FBQ1osY0FBYyw4REFBOEQsQ0FBQztBQUM3RSxjQUFjLGtEQUFrRCxDQUFDO0FBQ2pFLFlBQVk7QUFDWixjQUFjLHVDQUF1QyxDQUFDO0FBQ3RELE1BQU0iLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGF0by13YXRlci1saWJcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9hdG8td2F0ZXItbGliLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXRvLXdhdGVyLWxpYi5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXRvLXdhdGVyLWxpYi5tb2R1bGUnO1xuLy8gQ29tcG9uZW50XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2Zsb3ctZGlhZ3JhbS1saWIvZmxvdy1kaWFncmFtLWxpYi5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9hc3NldC1mbG93L2Fzc2V0LWZsb3cuY29tcG9uZW50Jztcbi8vIERpcmVjdGl2ZVxuZXhwb3J0ICogZnJvbSAnLi9saWIvZGlyZWN0aXZlL2F0by1sb2FkaW5nLmRpcmVjdGl2ZSc7XG4vLyBDc3NcblxuXG5cbiJdfQ==
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2F0by13YXRlci1saWIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxZQUFZO0FBQ1osY0FBYyw4REFBOEQsQ0FBQztBQUM3RSxjQUFjLGtEQUFrRCxDQUFDO0FBQ2pFLGNBQWMsZ0VBQWdFLENBQUM7QUFDL0UsWUFBWTtBQUNaLGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxNQUFNIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhdG8td2F0ZXItbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYXRvLXdhdGVyLWxpYi5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F0by13YXRlci1saWIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F0by13YXRlci1saWIubW9kdWxlJztcbi8vIENvbXBvbmVudFxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9mbG93LWRpYWdyYW0tbGliL2Zsb3ctZGlhZ3JhbS1saWIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvYXNzZXQtZmxvdy9hc3NldC1mbG93LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2Fzc2V0LXBhcmFtcy12aWV3L2Fzc2V0LXBhcmFtcy12aWV3LmNvbXBvbmVudCc7XG4vLyBEaXJlY3RpdmVcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RpcmVjdGl2ZS9hdG8tbG9hZGluZy5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGlyZWN0aXZlL25nLXZhci5kaXJlY3RpdmUnO1xuLy8gQ3NzXG5cblxuXG4iXX0=
@@ -1,14 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, EventEmitter, Directive, ViewChild, Input, Output, NgModule } from '@angular/core';
2
+ import { Injectable, Component, EventEmitter, Directive, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';
3
3
  import { __awaiter } from 'tslib';
4
4
  import * as go from 'gojs';
5
- import go__default from 'gojs';
6
5
  import _ from 'lodash';
7
6
  import moment from 'moment';
8
7
  import { Subject, Subscription } from 'rxjs';
9
8
  import * as i1 from '@angular/common';
10
9
  import { DecimalPipe, CommonModule } from '@angular/common';
11
10
  import { v4 } from 'uuid';
11
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
12
+ import { BrowserModule } from '@angular/platform-browser';
12
13
 
13
14
  class AtoWaterLibService {
14
15
  constructor() { }
@@ -1031,6 +1032,7 @@ class AtoGojsEditorModel {
1031
1032
  ENUM_TEMPLATES["TURBINES"] = "Turbines";
1032
1033
  // Plant Basic
1033
1034
  ENUM_TEMPLATES["GROUP_BASIC_COMPONENT"] = "Group Basic Component";
1035
+ ENUM_TEMPLATES["TEXT_LABEL"] = "label";
1034
1036
  })(ENUM_TEMPLATES = AtoGojsEditorModel.ENUM_TEMPLATES || (AtoGojsEditorModel.ENUM_TEMPLATES = {}));
1035
1037
  // System Types
1036
1038
  let ENUM_TYPES;
@@ -1740,6 +1742,9 @@ class AtoGojsEditorModel {
1740
1742
  [ENUM_TEMPLATES.VALUE_LABEL]: {
1741
1743
  name: ENUM_TEMPLATES.VALUE_LABEL,
1742
1744
  },
1745
+ [ENUM_TEMPLATES.TEXT_LABEL]: {
1746
+ name: ENUM_TEMPLATES.TEXT_LABEL,
1747
+ },
1743
1748
  [ENUM_TEMPLATES.DATA_BOX]: {
1744
1749
  name: ENUM_TEMPLATES.DATA_BOX,
1745
1750
  },
@@ -3451,6 +3456,10 @@ class AtoDefaultGojsEditor {
3451
3456
  if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.VALUE_LABEL) {
3452
3457
  this.makeValueLabelTemplate();
3453
3458
  }
3459
+ // Label
3460
+ if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL) {
3461
+ this.makeTextLabelTemplate();
3462
+ }
3454
3463
  // Zone item
3455
3464
  if ((node === null || node === void 0 ? void 0 : node.type) === AtoGojsEditorModel.ENUM_TEMPLATES.ZONE_ENERGY_ITEM) {
3456
3465
  this.makeZoneItemTemplate();
@@ -3930,6 +3939,19 @@ class AtoDefaultGojsEditor {
3930
3939
  }), new go.Binding('visible', 'data', (x) => typeof (x === null || x === void 0 ? void 0 : x.quantity) === 'number')))));
3931
3940
  this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.VALUE_LABEL, node);
3932
3941
  }
3942
+ makeTextLabelTemplate(size = { w: NaN, h: 20 }) {
3943
+ const node = this.$(go.Node, 'Auto', {
3944
+ movable: false,
3945
+ isSelected: false,
3946
+ }, new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), this.$(go.Panel, 'Auto', this.$(go.Panel, 'Horizontal', this.$(go.TextBlock, {
3947
+ margin: new go.Margin(0, 5, 10, 0),
3948
+ textAlign: 'center',
3949
+ font: 'bold 16px Arial',
3950
+ wrap: go.TextBlock.WrapFit,
3951
+ stroke: AtoGojsEditorModel.ENUM_COLORS.CERULEAN,
3952
+ }, new go.Binding('stroke', 'color'), new go.Binding('text', 'name'), new go.Binding('visible', 'visible')))));
3953
+ this.myDiagram.nodeTemplateMap.set(AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL, node);
3954
+ }
3933
3955
  makeTextTemplate(size = { w: AtoGojsEditorModel.GRID_SIZE * 5, h: AtoGojsEditorModel.GRID_SIZE * 2 }) {
3934
3956
  const self = this;
3935
3957
  const contextMenu = this.$(go.Adornment, 'Vertical', this.$('ContextMenuButton', this.$(go.TextBlock, 'Option 1'), {
@@ -5262,7 +5284,9 @@ class AtoDefaultGojsEditor {
5262
5284
  {
5263
5285
  zOrder: 2,
5264
5286
  // padding: new go.Margin(0, 0, 0, 200),
5265
- }, new go.Binding('padding', 'padding'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
5287
+ }, new go.Binding('padding', 'padding'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('visible', '', (data) => {
5288
+ return typeof (data === null || data === void 0 ? void 0 : data.visible) === 'boolean' ? data === null || data === void 0 ? void 0 : data.visible : true;
5289
+ }),
5266
5290
  // Header
5267
5291
  this.$(go.Panel, 'Auto', {
5268
5292
  stretch: go.GraphObject.Fill,
@@ -6487,10 +6511,10 @@ class AtoFlowDiagramLibComponent extends AtoDefaultGojsEditor {
6487
6511
  }
6488
6512
  }
6489
6513
  AtoFlowDiagramLibComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoFlowDiagramLibComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6490
- AtoFlowDiagramLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: { data: "data", isLoading: "isLoading" }, viewQueries: [{ propertyName: "myDiagramDivTemp", first: true, predicate: ["myDiagramDivTemp"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\" style=\"height: 100%\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp [id]=\"myDiagramDiv\" class=\"flex-grow-1\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }] });
6514
+ AtoFlowDiagramLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: { data: "data", isLoading: "isLoading" }, viewQueries: [{ propertyName: "myDiagramDivTemp", first: true, predicate: ["myDiagramDivTemp"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp [id]=\"myDiagramDiv\" class=\"flex-grow-1\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }] });
6491
6515
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoFlowDiagramLibComponent, decorators: [{
6492
6516
  type: Component,
6493
- args: [{ selector: 'ato-flow-diagram-lib', template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\" style=\"height: 100%\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp [id]=\"myDiagramDiv\" class=\"flex-grow-1\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n" }]
6517
+ args: [{ selector: 'ato-flow-diagram-lib', template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp [id]=\"myDiagramDiv\" class=\"flex-grow-1\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n" }]
6494
6518
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { myDiagramDivTemp: [{
6495
6519
  type: ViewChild,
6496
6520
  args: ['myDiagramDivTemp']
@@ -6969,7 +6993,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6969
6993
  colorValue: '',
6970
6994
  tooltip: '',
6971
6995
  },
6972
- Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '20 10', padding: new go__default.Margin(0, 0, 0, 20) }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.CERULEAN]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: [
6996
+ Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '20 10', padding: new go.Margin(0, 0, 0, 20) }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.CERULEAN]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: [
6973
6997
  {
6974
6998
  key: '',
6975
6999
  name: ENUM_ASSET_PARAMETERS.FEED_FLOW_RATE,
@@ -6995,7 +7019,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
6995
7019
  isEditable: true,
6996
7020
  },
6997
7021
  ] }),
6998
- Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '420 40' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.DANUBE]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: [
7022
+ Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '420 40' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.DANUBE]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: [
6999
7023
  {
7000
7024
  key: '',
7001
7025
  name: ENUM_ASSET_PARAMETERS.REJECTION_RATE_SALT_PASSAGE,
@@ -7015,7 +7039,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7015
7039
  isEditable: true,
7016
7040
  },
7017
7041
  ] }),
7018
- Object.assign(Object.assign({ key: 96, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '590 150' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.FOUNTAIN_BLUE]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: [
7042
+ Object.assign(Object.assign({ key: 96, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '590 150' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.FOUNTAIN_BLUE]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: [
7019
7043
  {
7020
7044
  key: '',
7021
7045
  name: ENUM_ASSET_PARAMETERS.PERMEATE_FLOW_RATE,
@@ -7035,7 +7059,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7035
7059
  isEditable: true,
7036
7060
  },
7037
7061
  ] }),
7038
- Object.assign(Object.assign({ key: 97, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '30 370' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.GALLIANO]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: [
7062
+ Object.assign(Object.assign({ key: 97, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '30 370' }, AtoGojsEditorModel.PARAM_TABLE_STYLE[AtoGojsEditorModel.ENUM_COLORS.GALLIANO]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: [
7039
7063
  {
7040
7064
  key: '',
7041
7065
  name: ENUM_ASSET_PARAMETERS.CONCENTRATE_FLOW_RATE,
@@ -7061,7 +7085,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7061
7085
  source: AtoGojsEditorModel.IMAGE_RO_WATER_TREATMENT_PATH,
7062
7086
  group: 100,
7063
7087
  loc: '0 0',
7064
- margin: new go__default.Margin(130, 0, 0, 0),
7088
+ margin: new go.Margin(130, 0, 0, 0),
7065
7089
  selectable: false,
7066
7090
  },
7067
7091
  {
@@ -7470,7 +7494,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7470
7494
  [AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER]: {
7471
7495
  nodeDataArray: [
7472
7496
  {
7473
- key: 92,
7497
+ key: 88,
7474
7498
  type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7475
7499
  group: 100,
7476
7500
  loc: '0 0',
@@ -7482,7 +7506,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7482
7506
  color: '#a8438d',
7483
7507
  },
7484
7508
  {
7485
- key: 93,
7509
+ key: 89,
7486
7510
  type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7487
7511
  group: 100,
7488
7512
  loc: '1000 700',
@@ -7493,21 +7517,117 @@ const ATO_COMPONENTS_GROUP_DATA = {
7493
7517
  name: 'bottom-right-marker',
7494
7518
  color: '#a8438d',
7495
7519
  },
7496
- Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '30 160', padding: new go__default.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 140 }))) }),
7497
- Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go__default.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7498
- Object.assign(Object.assign({ key: 96, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go__default.Margin(0, 0, 0, 0), loc: '580 250' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WARMER_WATER]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WARMER_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7499
- Object.assign(Object.assign({ key: 97, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go__default.Margin(0, 0, 0, 0), loc: '580 560' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7500
- Object.assign(Object.assign({ key: 98, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go__default.Margin(0, 0, 0, 0), loc: '450 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))) }),
7501
- Object.assign(Object.assign({ key: 99, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go__default.Margin(0, 0, 0, 0), loc: '730 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY]), { minSizeValue: new go__default.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))) }),
7520
+ Object.assign(Object.assign({ key: 90, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '30 160', padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 140 }))), visible: true }),
7521
+ Object.assign(Object.assign({ key: 91, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 270' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7522
+ Object.assign(Object.assign({ key: 92, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 250' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WARMER_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WARMER_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7523
+ Object.assign(Object.assign({ key: 93, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '580 560' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))) }),
7524
+ Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '450 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))) }),
7525
+ Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '730 20' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))) }),
7502
7526
  {
7503
- key: 91,
7527
+ key: 96,
7528
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE,
7529
+ source: AtoGojsEditorModel.IMAGE_COOLING_TOWER_PATH,
7530
+ group: 100,
7531
+ loc: '0 0',
7532
+ margin: new go.Margin(195, 20, 0, 0),
7533
+ selectable: false,
7534
+ },
7535
+ // {
7536
+ // key: 97,
7537
+ // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7538
+ // group: 100,
7539
+ // loc: '250 25',
7540
+ // name: 'Evaporation Loss',
7541
+ // color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
7542
+ // visible: false,
7543
+ // },
7544
+ // {
7545
+ // key: 98,
7546
+ // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7547
+ // group: 100,
7548
+ // loc: '110 290',
7549
+ // name: 'Makeup Water',
7550
+ // color: AtoGojsEditorModel.ENUM_COLORS.CERULEAN,
7551
+ // visible: false,
7552
+ // },
7553
+ // {
7554
+ // key: 99,
7555
+ // type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7556
+ // group: 100,
7557
+ // loc: '580 435',
7558
+ // name: 'Blowdown Water',
7559
+ // color: AtoGojsEditorModel.ENUM_COLORS.CARROT_ORANGE,
7560
+ // visible: false,
7561
+ // },
7562
+ { key: 100, type: AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER, isGroup: true, name: 'Group' },
7563
+ ],
7564
+ linkDataArray: [],
7565
+ },
7566
+ [AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER + '_RESPONSIVE']: {
7567
+ nodeDataArray: [
7568
+ {
7569
+ key: 88,
7570
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7571
+ group: 100,
7572
+ loc: '0 0',
7573
+ data: {
7574
+ quantity: 2222,
7575
+ unit: 'm³',
7576
+ },
7577
+ name: 'top-left-marker',
7578
+ color: '#a8438d',
7579
+ },
7580
+ {
7581
+ key: 89,
7582
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
7583
+ group: 100,
7584
+ loc: '700 300',
7585
+ data: {
7586
+ quantity: 3333,
7587
+ unit: 'm³',
7588
+ },
7589
+ name: 'bottom-right-marker',
7590
+ color: '#a8438d',
7591
+ },
7592
+ Object.assign(Object.assign({ key: 90, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_TOWER_ANALYSIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), visible: false }),
7593
+ Object.assign(Object.assign({ key: 91, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.COOLING_WATER_CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), visible: false }),
7594
+ Object.assign(Object.assign({ key: 92, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.EVAPORATION_LOSS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 140 }))), visible: false }),
7595
+ Object.assign(Object.assign({ key: 93, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.MAKEUP_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), visible: false }),
7596
+ Object.assign(Object.assign({ key: 94, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.WARMER_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.WARMER_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), visible: false }),
7597
+ Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0) }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.BLOWDOWN_WATER].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), visible: false }),
7598
+ {
7599
+ key: 96,
7504
7600
  type: AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE,
7505
7601
  source: AtoGojsEditorModel.IMAGE_COOLING_TOWER_PATH,
7506
7602
  group: 100,
7507
7603
  loc: '0 0',
7508
- margin: new go__default.Margin(195, 20, 0, 0),
7604
+ margin: new go.Margin(20, 20, 0, 0),
7509
7605
  selectable: false,
7510
7606
  },
7607
+ {
7608
+ key: 97,
7609
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7610
+ group: 100,
7611
+ loc: '250 25',
7612
+ name: 'Evaporation Loss',
7613
+ color: AtoGojsEditorModel.ENUM_COLORS.FLAMINGO,
7614
+ },
7615
+ {
7616
+ key: 98,
7617
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7618
+ group: 100,
7619
+ loc: '110 290',
7620
+ name: 'Makeup Water',
7621
+ color: AtoGojsEditorModel.ENUM_COLORS.CERULEAN,
7622
+ },
7623
+ {
7624
+ key: 99,
7625
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
7626
+ group: 100,
7627
+ loc: '580 435',
7628
+ name: 'Blowdown Water',
7629
+ color: AtoGojsEditorModel.ENUM_COLORS.CARROT_ORANGE,
7630
+ },
7511
7631
  { key: 100, type: AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER, isGroup: true, name: 'Group' },
7512
7632
  ],
7513
7633
  linkDataArray: [],
@@ -7520,7 +7640,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
7520
7640
  source: AtoGojsEditorModel.IMAGE_BOILER_PATH,
7521
7641
  group: 100,
7522
7642
  loc: '0 0',
7523
- margin: new go__default.Margin(0, 0, 0, 0),
7643
+ margin: new go.Margin(0, 0, 0, 0),
7524
7644
  selectable: false,
7525
7645
  width: 1038,
7526
7646
  height: 516,
@@ -7664,6 +7784,58 @@ const ATO_COMPONENTS_GROUP_DATA = {
7664
7784
  },
7665
7785
  };
7666
7786
 
7787
+ class AtoNgVarDirective {
7788
+ set ngVar(context) {
7789
+ this.context.$implicit = this.context.ngVar = context;
7790
+ if (!this.hasView) {
7791
+ this.vcRef.createEmbeddedView(this.templateRef, this.context);
7792
+ this.hasView = true;
7793
+ }
7794
+ }
7795
+ constructor(templateRef, vcRef) {
7796
+ this.templateRef = templateRef;
7797
+ this.vcRef = vcRef;
7798
+ this.context = {
7799
+ $implicit: null,
7800
+ ngVar: null,
7801
+ };
7802
+ this.hasView = false;
7803
+ }
7804
+ }
7805
+ AtoNgVarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoNgVarDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
7806
+ AtoNgVarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoNgVarDirective, selector: "[ngVar]", inputs: { ngVar: "ngVar" }, ngImport: i0 });
7807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoNgVarDirective, decorators: [{
7808
+ type: Directive,
7809
+ args: [{
7810
+ selector: '[ngVar]',
7811
+ }]
7812
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { ngVar: [{
7813
+ type: Input
7814
+ }] } });
7815
+
7816
+ class AtoAssetParamsViewComponent {
7817
+ constructor() {
7818
+ this.isEditView = false;
7819
+ this.data = [];
7820
+ this.clickParamTableRow = new EventEmitter();
7821
+ }
7822
+ onClickRowParam(itemTable) {
7823
+ this.clickParamTableRow.emit(itemTable);
7824
+ }
7825
+ }
7826
+ AtoAssetParamsViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoAssetParamsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7827
+ AtoAssetParamsViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: { isEditView: "isEditView", data: "data" }, outputs: { clickParamTableRow: "clickParamTableRow" }, ngImport: i0, template: "<div class=\"d-flex flex-column flex-gap-2\">\n <div class=\"\" *ngFor=\"let tableParam of data\">\n <ng-template\n [ngTemplateOutlet]=\"tableParamTemplate\"\n [ngTemplateOutletContext]=\"{\n data: tableParam\n }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #tableParamTemplate let-data=\"data\">\n <div\n class=\"d-flex flex-column asset-param-item w-100\"\n *ngVar=\"{ isCollapsed: true } as vars\"\n [style.backgroundColor]=\"data?.color\"\n >\n <div\n class=\"d-flex align-items-center justify-content-between py-1 pl-1 pr-2 cursor-pointer\"\n (click)=\"vars.isCollapsed = !vars.isCollapsed\"\n >\n <div class=\"font-size-14px flex-grow-1 text-truncate color-white\">{{ data?.title }}</div>\n <i\n class=\"fa-solid font-size-14px color-white {{ vars.isCollapsed ? 'fa-angle-right' : 'fa-angle-down' }}\"\n ></i>\n </div>\n <div class=\"px-1 pb-1\" *ngIf=\"!vars.isCollapsed\">\n <div class=\"table-asset-param-wrapper\" [style.backgroundColor]=\"data?.bgColor\">\n <table>\n <tbody>\n <tr\n *ngFor=\"let itemTable of data?.dataTable\"\n (click)=\"onClickRowParam(itemTable)\"\n class=\"cursor-pointer\"\n >\n <td class=\"font-size-13px\" [style.borderColor]=\"data?.borderTable\">\n {{ itemTable?.name }}\n </td>\n <td class=\"font-size-13px\" [style.borderColor]=\"data?.borderTable\">\n <div class=\"d-flex align-items-center\">\n <div\n class=\"mr-auto font-size-13px text-truncate flex-grow-1\"\n [style.color]=\"itemTable?.color\"\n >\n {{ itemTable?.value }}\n </div>\n <i *ngIf=\"isEditView\" class=\"fal fa-edit font-size-14px color-night-rider\"></i>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".asset-param-item{border-radius:5px}.asset-param-item .table-asset-param-wrapper{border-radius:5px;background-color:#f0f8ff}.asset-param-item .table-asset-param-wrapper table{border-collapse:collapse;width:100%}.asset-param-item .table-asset-param-wrapper table tbody tr td{border:1px solid red;height:30px;padding:4px}.color-white{color:#fff}.flex-gap-2{gap:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AtoNgVarDirective, selector: "[ngVar]", inputs: ["ngVar"] }] });
7828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoAssetParamsViewComponent, decorators: [{
7829
+ type: Component,
7830
+ args: [{ selector: 'ato-asset-params-view', template: "<div class=\"d-flex flex-column flex-gap-2\">\n <div class=\"\" *ngFor=\"let tableParam of data\">\n <ng-template\n [ngTemplateOutlet]=\"tableParamTemplate\"\n [ngTemplateOutletContext]=\"{\n data: tableParam\n }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #tableParamTemplate let-data=\"data\">\n <div\n class=\"d-flex flex-column asset-param-item w-100\"\n *ngVar=\"{ isCollapsed: true } as vars\"\n [style.backgroundColor]=\"data?.color\"\n >\n <div\n class=\"d-flex align-items-center justify-content-between py-1 pl-1 pr-2 cursor-pointer\"\n (click)=\"vars.isCollapsed = !vars.isCollapsed\"\n >\n <div class=\"font-size-14px flex-grow-1 text-truncate color-white\">{{ data?.title }}</div>\n <i\n class=\"fa-solid font-size-14px color-white {{ vars.isCollapsed ? 'fa-angle-right' : 'fa-angle-down' }}\"\n ></i>\n </div>\n <div class=\"px-1 pb-1\" *ngIf=\"!vars.isCollapsed\">\n <div class=\"table-asset-param-wrapper\" [style.backgroundColor]=\"data?.bgColor\">\n <table>\n <tbody>\n <tr\n *ngFor=\"let itemTable of data?.dataTable\"\n (click)=\"onClickRowParam(itemTable)\"\n class=\"cursor-pointer\"\n >\n <td class=\"font-size-13px\" [style.borderColor]=\"data?.borderTable\">\n {{ itemTable?.name }}\n </td>\n <td class=\"font-size-13px\" [style.borderColor]=\"data?.borderTable\">\n <div class=\"d-flex align-items-center\">\n <div\n class=\"mr-auto font-size-13px text-truncate flex-grow-1\"\n [style.color]=\"itemTable?.color\"\n >\n {{ itemTable?.value }}\n </div>\n <i *ngIf=\"isEditView\" class=\"fal fa-edit font-size-14px color-night-rider\"></i>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".asset-param-item{border-radius:5px}.asset-param-item .table-asset-param-wrapper{border-radius:5px;background-color:#f0f8ff}.asset-param-item .table-asset-param-wrapper table{border-collapse:collapse;width:100%}.asset-param-item .table-asset-param-wrapper table tbody tr td{border:1px solid red;height:30px;padding:4px}.color-white{color:#fff}.flex-gap-2{gap:.5rem}\n"] }]
7831
+ }], propDecorators: { isEditView: [{
7832
+ type: Input
7833
+ }], data: [{
7834
+ type: Input
7835
+ }], clickParamTableRow: [{
7836
+ type: Output
7837
+ }] } });
7838
+
7667
7839
  class AssetFlowComponent {
7668
7840
  constructor() {
7669
7841
  this.onClickParamOfTableEvent = new EventEmitter();
@@ -7676,16 +7848,57 @@ class AssetFlowComponent {
7676
7848
  // isReadOnly: true,
7677
7849
  };
7678
7850
  this.flowData = {};
7851
+ this.isResponsiveView = false;
7852
+ }
7853
+ onResize(event) {
7854
+ // Now only Support Cooling Tower Responsive
7855
+ if (this.timeoutResizeWindow) {
7856
+ clearTimeout(this.timeoutResizeWindow);
7857
+ }
7858
+ this.timeoutResizeWindow = setTimeout(() => {
7859
+ this.checkResponsiveView();
7860
+ this.updateLocationReponsive();
7861
+ }, 1000);
7862
+ }
7863
+ checkResponsiveView() {
7864
+ if ((this === null || this === void 0 ? void 0 : this.systemType) ===
7865
+ AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
7866
+ this.isResponsiveView = window.innerWidth < 1024;
7867
+ }
7868
+ else {
7869
+ this.isResponsiveView = false;
7870
+ }
7871
+ }
7872
+ updateLocationReponsive() {
7873
+ var _a, _b, _c, _d, _e, _f;
7874
+ if (!((_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray)) {
7875
+ this.setFlowData(_.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]);
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
+ }
7879
+ _.forEach((_d = _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]) === null || _d === void 0 ? void 0 : _d.nodeDataArray, (node) => {
7880
+ var _a, _b;
7881
+ 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
+ if (itemFind) {
7883
+ itemFind.visible = (node === null || node === void 0 ? void 0 : node.visible) === false ? false : true;
7884
+ itemFind.loc = node === null || node === void 0 ? void 0 : node.loc;
7885
+ itemFind.margin = node === null || node === void 0 ? void 0 : node.margin;
7886
+ itemFind.padding = node === null || node === void 0 ? void 0 : node.padding;
7887
+ }
7888
+ });
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);
7890
+ this.setFlowData(_.cloneDeep(this.flowData));
7679
7891
  }
7680
7892
  ngOnInit() {
7681
- this.flowData = this.getDefaultFlowData();
7893
+ this.checkResponsiveView();
7894
+ this.updateLocationReponsive();
7682
7895
  }
7683
7896
  onClickParamOfTable($event) {
7684
7897
  this.onClickParamOfTableEvent.emit($event);
7685
7898
  }
7686
7899
  getDefaultFlowData() {
7687
7900
  var _a;
7688
- const flowData = Object.assign(Object.assign({}, ATO_COMPONENTS_GROUP_DATA[this.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
7901
+ const flowData = Object.assign(Object.assign({}, _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
7689
7902
  if (this.isUseBase64) {
7690
7903
  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');
7691
7904
  if (itemImageTemp) {
@@ -7699,10 +7912,10 @@ class AssetFlowComponent {
7699
7912
  }
7700
7913
  }
7701
7914
  AssetFlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssetFlowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7702
- AssetFlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssetFlowComponent, selector: "ato-asset-flow", inputs: { selectedComponent: "selectedComponent", systemType: "systemType", isUseBase64: "isUseBase64", flowData: "flowData" }, outputs: { onClickParamOfTableEvent: "onClickParamOfTableEvent" }, viewQueries: [{ propertyName: "gjFlowDiagramTemp", first: true, predicate: AtoFlowDiagramLibComponent, descendants: true }], ngImport: i0, template: "<div class=\"h-100\" atoLoading [appLoading]=\"flowData === null\">\n <ato-flow-diagram-lib\n *ngIf=\"flowData !== null\"\n #gjFlowDiagramTemp\n [data]=\"flowData\"\n [initialOptions]=\"options\"\n (onClikParamOfTable)=\"onClickParamOfTable($event)\"\n ></ato-flow-diagram-lib>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: ["data", "isLoading"] }, { kind: "directive", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }] });
7915
+ AssetFlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssetFlowComponent, selector: "ato-asset-flow", inputs: { selectedComponent: "selectedComponent", systemType: "systemType", isUseBase64: "isUseBase64", flowData: "flowData", isResponsiveView: "isResponsiveView", getFlowDataCallBack: "getFlowDataCallBack" }, outputs: { onClickParamOfTableEvent: "onClickParamOfTableEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "gjFlowDiagramTemp", first: true, predicate: AtoFlowDiagramLibComponent, descendants: true }], ngImport: i0, template: "<div class=\"h-100 d-flex flex-column flex-gap-3 flex-grow-1 overflow-auto px-3 pb-3\">\n <div class=\"h-100 d-flex flex-column\" atoLoading [appLoading]=\"flowData === null\">\n <ato-flow-diagram-lib\n *ngIf=\"flowData !== null\"\n #gjFlowDiagramTemp\n [data]=\"flowData\"\n [initialOptions]=\"options\"\n (onClikParamOfTable)=\"onClickParamOfTable($event)\"\n [class]=\"!!isResponsiveView ? 'diagram-responsive-view' : 'flex-grow-1'\"\n ></ato-flow-diagram-lib>\n <div class=\"mt-2\" *ngIf=\"isResponsiveView\">\n <ato-asset-params-view\n [data]=\"dataTableAssetParams\"\n [isEditView]=\"true\"\n (clickParamTableRow)=\"onClickParamOfTable($event)\"\n ></ato-asset-params-view>\n </div>\n </div>\n</div>\n\n", styles: [".diagram-responsive-view{height:30vh}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: ["data", "isLoading"] }, { kind: "directive", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }, { kind: "component", type: AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: ["isEditView", "data"], outputs: ["clickParamTableRow"] }] });
7703
7916
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssetFlowComponent, decorators: [{
7704
7917
  type: Component,
7705
- args: [{ selector: 'ato-asset-flow', template: "<div class=\"h-100\" atoLoading [appLoading]=\"flowData === null\">\n <ato-flow-diagram-lib\n *ngIf=\"flowData !== null\"\n #gjFlowDiagramTemp\n [data]=\"flowData\"\n [initialOptions]=\"options\"\n (onClikParamOfTable)=\"onClickParamOfTable($event)\"\n ></ato-flow-diagram-lib>\n</div>\n" }]
7918
+ args: [{ selector: 'ato-asset-flow', template: "<div class=\"h-100 d-flex flex-column flex-gap-3 flex-grow-1 overflow-auto px-3 pb-3\">\n <div class=\"h-100 d-flex flex-column\" atoLoading [appLoading]=\"flowData === null\">\n <ato-flow-diagram-lib\n *ngIf=\"flowData !== null\"\n #gjFlowDiagramTemp\n [data]=\"flowData\"\n [initialOptions]=\"options\"\n (onClikParamOfTable)=\"onClickParamOfTable($event)\"\n [class]=\"!!isResponsiveView ? 'diagram-responsive-view' : 'flex-grow-1'\"\n ></ato-flow-diagram-lib>\n <div class=\"mt-2\" *ngIf=\"isResponsiveView\">\n <ato-asset-params-view\n [data]=\"dataTableAssetParams\"\n [isEditView]=\"true\"\n (clickParamTableRow)=\"onClickParamOfTable($event)\"\n ></ato-asset-params-view>\n </div>\n </div>\n</div>\n\n", styles: [".diagram-responsive-view{height:30vh}\n"] }]
7706
7919
  }], propDecorators: { gjFlowDiagramTemp: [{
7707
7920
  type: ViewChild,
7708
7921
  args: [AtoFlowDiagramLibComponent]
@@ -7716,6 +7929,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7716
7929
  type: Input
7717
7930
  }], flowData: [{
7718
7931
  type: Input
7932
+ }], isResponsiveView: [{
7933
+ type: Input
7934
+ }], getFlowDataCallBack: [{
7935
+ type: Input
7936
+ }], onResize: [{
7937
+ type: HostListener,
7938
+ args: ['window:resize', ['$event']]
7719
7939
  }] } });
7720
7940
 
7721
7941
  class AtoWaterLibModule {
@@ -7724,11 +7944,21 @@ AtoWaterLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versio
7724
7944
  AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
7725
7945
  AtoFlowDiagramLibComponent,
7726
7946
  AssetFlowComponent,
7727
- AtoLoadingDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
7947
+ AtoLoadingDirective,
7948
+ AtoAssetParamsViewComponent,
7949
+ AtoNgVarDirective], imports: [CommonModule,
7950
+ BrowserModule,
7951
+ ReactiveFormsModule,
7952
+ FormsModule], exports: [AtoWaterLibComponent,
7728
7953
  AtoFlowDiagramLibComponent,
7729
7954
  AssetFlowComponent,
7730
- AtoLoadingDirective] });
7731
- AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
7955
+ AtoLoadingDirective,
7956
+ AtoAssetParamsViewComponent,
7957
+ 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] });
7732
7962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
7733
7963
  type: NgModule,
7734
7964
  args: [{
@@ -7737,15 +7967,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7737
7967
  AtoFlowDiagramLibComponent,
7738
7968
  AssetFlowComponent,
7739
7969
  AtoLoadingDirective,
7970
+ AtoAssetParamsViewComponent,
7971
+ AtoNgVarDirective,
7740
7972
  ],
7741
7973
  imports: [
7742
- CommonModule
7974
+ CommonModule,
7975
+ BrowserModule,
7976
+ ReactiveFormsModule,
7977
+ FormsModule,
7743
7978
  ],
7744
7979
  exports: [
7745
7980
  AtoWaterLibComponent,
7746
7981
  AtoFlowDiagramLibComponent,
7747
7982
  AssetFlowComponent,
7748
- AtoLoadingDirective
7983
+ AtoLoadingDirective,
7984
+ AtoAssetParamsViewComponent,
7985
+ AtoNgVarDirective
7749
7986
  ]
7750
7987
  }]
7751
7988
  }] });
@@ -7759,5 +7996,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7759
7996
  * Generated bundle index. Do not edit.
7760
7997
  */
7761
7998
 
7762
- export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
7999
+ export { AssetFlowComponent, AtoAssetParamsViewComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoNgVarDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
7763
8000
  //# sourceMappingURL=ato-water-lib.mjs.map