ato-water-lib 0.0.39 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/lib/components/asset-flow/asset-flow.component.mjs +19 -9
- package/esm2020/lib/constants/components-group-const.mjs +13 -13
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/ato-water-lib.mjs +31 -20
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +30 -20
- package/fesm2020/ato-water-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/esm2020/public-api.mjs
CHANGED
@@ -13,4 +13,6 @@ export * from './lib/directive/ato-loading.directive';
|
|
13
13
|
export * from './lib/directive/ng-var.directive';
|
14
14
|
// Enum
|
15
15
|
export * from './lib/constants/components-group-const';
|
16
|
-
|
16
|
+
// Model
|
17
|
+
export * from './lib/models/gojs-editor.model';
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2F0by13YXRlci1saWIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxZQUFZO0FBQ1osY0FBYyw4REFBOEQsQ0FBQztBQUM3RSxjQUFjLGtEQUFrRCxDQUFDO0FBQ2pFLGNBQWMsZ0VBQWdFLENBQUM7QUFDL0UsWUFBWTtBQUNaLGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxPQUFPO0FBQ1AsY0FBYyx3Q0FBd0MsQ0FBQztBQUN2RCxRQUFRO0FBQ1IsY0FBYyxnQ0FBZ0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgYXRvLXdhdGVyLWxpYlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2F0by13YXRlci1saWIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9hdG8td2F0ZXItbGliLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9hdG8td2F0ZXItbGliLm1vZHVsZSc7XG4vLyBDb21wb25lbnRcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvZmxvdy1kaWFncmFtLWxpYi9mbG93LWRpYWdyYW0tbGliLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2Fzc2V0LWZsb3cvYXNzZXQtZmxvdy5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9hc3NldC1wYXJhbXMtdmlldy9hc3NldC1wYXJhbXMtdmlldy5jb21wb25lbnQnO1xuLy8gRGlyZWN0aXZlXG5leHBvcnQgKiBmcm9tICcuL2xpYi9kaXJlY3RpdmUvYXRvLWxvYWRpbmcuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RpcmVjdGl2ZS9uZy12YXIuZGlyZWN0aXZlJztcbi8vIEVudW1cbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbnN0YW50cy9jb21wb25lbnRzLWdyb3VwLWNvbnN0Jztcbi8vIE1vZGVsXG5leHBvcnQgKiBmcm9tICcuL2xpYi9tb2RlbHMvZ29qcy1lZGl0b3IubW9kZWwnO1xuXG5cblxuIl19
|
@@ -7554,7 +7554,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7554
7554
|
[AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER]: {
|
7555
7555
|
nodeDataArray: [
|
7556
7556
|
{
|
7557
|
-
key:
|
7557
|
+
key: 86,
|
7558
7558
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
|
7559
7559
|
group: 100,
|
7560
7560
|
loc: '0 0',
|
@@ -7566,7 +7566,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7566
7566
|
color: '#a8438d',
|
7567
7567
|
},
|
7568
7568
|
{
|
7569
|
-
key:
|
7569
|
+
key: 87,
|
7570
7570
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.EMPTY,
|
7571
7571
|
group: 100,
|
7572
7572
|
data: {
|
@@ -7582,48 +7582,48 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7582
7582
|
loc: '700 300',
|
7583
7583
|
}
|
7584
7584
|
},
|
7585
|
-
Object.assign(Object.assign({ key:
|
7585
|
+
Object.assign(Object.assign({ key: 88, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, loc: '320 60', 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, assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
|
7586
7586
|
visible: true,
|
7587
7587
|
}, extendedDataResponsive: {
|
7588
7588
|
visible: false,
|
7589
7589
|
} }),
|
7590
|
-
Object.assign(Object.assign({ key:
|
7590
|
+
Object.assign(Object.assign({ key: 89, 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__FLOW]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__FLOW].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
|
7591
7591
|
visible: true,
|
7592
7592
|
}, extendedDataResponsive: {
|
7593
7593
|
visible: false,
|
7594
7594
|
} }),
|
7595
|
-
Object.assign(Object.assign({ key:
|
7595
|
+
Object.assign(Object.assign({ key: 90, 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__CHEMISTRY]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.MAKEUP_WATER__CHEMISTRY].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 120 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
|
7596
7596
|
visible: true,
|
7597
7597
|
}, extendedDataResponsive: {
|
7598
7598
|
visible: false,
|
7599
7599
|
} }),
|
7600
|
-
Object.assign(Object.assign({ key:
|
7600
|
+
Object.assign(Object.assign({ key: 91, 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 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
|
7601
7601
|
visible: true,
|
7602
7602
|
}, extendedDataResponsive: {
|
7603
7603
|
visible: false,
|
7604
7604
|
} }),
|
7605
|
-
Object.assign(Object.assign({ key:
|
7605
|
+
Object.assign(Object.assign({ key: 92, 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 }))), assetLayers: ATO_ASSET_LAYERS.FLOW, extendedData: {
|
7606
7606
|
visible: true,
|
7607
7607
|
}, extendedDataResponsive: {
|
7608
7608
|
visible: false,
|
7609
7609
|
} }),
|
7610
|
-
Object.assign(Object.assign({ key:
|
7610
|
+
Object.assign(Object.assign({ key: 93, 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 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
|
7611
7611
|
visible: true,
|
7612
7612
|
}, extendedDataResponsive: {
|
7613
7613
|
visible: false,
|
7614
7614
|
} }),
|
7615
|
-
Object.assign(Object.assign({ key:
|
7615
|
+
Object.assign(Object.assign({ key: 94, 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 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
|
7616
7616
|
visible: true,
|
7617
7617
|
}, extendedDataResponsive: {
|
7618
7618
|
visible: false,
|
7619
7619
|
} }),
|
7620
|
-
Object.assign(Object.assign({ key:
|
7620
|
+
Object.assign(Object.assign({ key: 95, type: AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE, group: 100, padding: new go.Margin(0, 0, 0, 0), loc: '30 50' }, DATA_WATER_SYSTEMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS]), { minSizeValue: new go.Size(100, NaN), selectable: false, dataTable: ASSET_CATEGORY_PARAMS[WATER_SYSTEMS_NAME.SYSTEM_KPIS].map((e) => (Object.assign(Object.assign({}, e), { value: '', isEditable: true, maxSizeValue: 130 }))), assetLayers: ATO_ASSET_LAYERS.CHEMISTRY, extendedData: {
|
7621
7621
|
visible: true,
|
7622
7622
|
}, extendedDataResponsive: {
|
7623
7623
|
visible: false,
|
7624
7624
|
} }),
|
7625
7625
|
{
|
7626
|
-
key:
|
7626
|
+
key: 96,
|
7627
7627
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.IMAGE_TEMPLATE,
|
7628
7628
|
source: AtoGojsEditorModel.IMAGE_COOLING_TOWER_PATH,
|
7629
7629
|
group: 100,
|
@@ -7637,7 +7637,7 @@ const ATO_COMPONENTS_GROUP_DATA = {
|
|
7637
7637
|
}
|
7638
7638
|
},
|
7639
7639
|
{
|
7640
|
-
key:
|
7640
|
+
key: 97,
|
7641
7641
|
type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_LABEL,
|
7642
7642
|
group: 100,
|
7643
7643
|
loc: '250 25',
|
@@ -8047,8 +8047,7 @@ class AssetFlowComponent {
|
|
8047
8047
|
}, 1000);
|
8048
8048
|
}
|
8049
8049
|
checkResponsiveView() {
|
8050
|
-
if ((this === null || this === void 0 ? void 0 : this.systemType) ===
|
8051
|
-
AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
|
8050
|
+
if ((this === null || this === void 0 ? void 0 : this.systemType) === AtoGojsEditorModel.ENUM_TYPES.COOLING_TOWER) {
|
8052
8051
|
this.isResponsiveView = window.innerWidth < 1024;
|
8053
8052
|
}
|
8054
8053
|
else {
|
@@ -8061,7 +8060,7 @@ class AssetFlowComponent {
|
|
8061
8060
|
this.flowData = AssetFlowComponent.getDefaultFlowData({
|
8062
8061
|
systemType: this.systemType,
|
8063
8062
|
isUseBase64: this.isUseBase64,
|
8064
|
-
assetLayer: this.assetLayer
|
8063
|
+
assetLayer: this.assetLayer,
|
8065
8064
|
});
|
8066
8065
|
}
|
8067
8066
|
_.forEach((_b = this.flowData) === null || _b === void 0 ? void 0 : _b.nodeDataArray, (node) => {
|
@@ -8081,10 +8080,16 @@ class AssetFlowComponent {
|
|
8081
8080
|
const flowData = Object.assign(Object.assign(Object.assign({}, defaultData), _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[defaultData === null || defaultData === void 0 ? void 0 : defaultData.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
|
8082
8081
|
// Reponsive
|
8083
8082
|
_.forEach(flowData === null || flowData === void 0 ? void 0 : flowData.nodeDataArray, (node) => {
|
8083
|
+
var _a;
|
8084
8084
|
node = _.merge(node, node[`extendedData${window.innerWidth < 1024 ? 'Responsive' : ''}`]);
|
8085
|
+
if (node === null || node === void 0 ? void 0 : node.assetLayers) {
|
8086
|
+
node.visible =
|
8087
|
+
(node === null || node === void 0 ? void 0 : node.assetLayers) ===
|
8088
|
+
((_a = defaultData === null || defaultData === void 0 ? void 0 : defaultData.assetLayer) !== null && _a !== void 0 ? _a : ATO_ASSET_LAYERS.FLOW);
|
8089
|
+
}
|
8085
8090
|
});
|
8086
8091
|
// assetLayer
|
8087
|
-
flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x =>
|
8092
|
+
// flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)))
|
8088
8093
|
if (defaultData === null || defaultData === void 0 ? void 0 : defaultData.isUseBase64) {
|
8089
8094
|
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');
|
8090
8095
|
if (itemImageTemp) {
|
@@ -8095,15 +8100,21 @@ class AssetFlowComponent {
|
|
8095
8100
|
}
|
8096
8101
|
setFlowData(data) {
|
8097
8102
|
// const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
|
8098
|
-
|
8103
|
+
_.forEach(data.nodeDataArray, (node) => {
|
8104
|
+
if (node === null || node === void 0 ? void 0 : node.assetLayers) {
|
8105
|
+
node.visible = (node === null || node === void 0 ? void 0 : node.assetLayers) === this.assetLayer;
|
8106
|
+
}
|
8107
|
+
});
|
8108
|
+
this.flowData = Object.assign({}, data);
|
8099
8109
|
this.updateDataTableAssetParams(data);
|
8100
8110
|
}
|
8101
8111
|
updateDataTableAssetParams(data) {
|
8102
8112
|
var _a, _b;
|
8103
|
-
this.dataTableAssetParams = _.forEach((_b = (_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE &&
|
8113
|
+
this.dataTableAssetParams = _.forEach((_b = (_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray) === null || _b === void 0 ? void 0 : _b.filter((e) => (e === null || e === void 0 ? void 0 : e.type) === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE &&
|
8114
|
+
(e === null || e === void 0 ? void 0 : e.assetLayers) === (data === null || data === void 0 ? void 0 : data.assetLayer)), (x) => {
|
8104
8115
|
var _a, _b, _c;
|
8105
8116
|
if (!(data === null || data === void 0 ? void 0 : data.isRefresh)) {
|
8106
|
-
x.isCollapsed = (_c = (_b = (_a = this.assetParamsViewTemp) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find(y => (y === null || y === void 0 ? void 0 : y.key) === (x === null || x === void 0 ? void 0 : x.key))) === null || _c === void 0 ? void 0 : _c.isCollapsed;
|
8117
|
+
x.isCollapsed = (_c = (_b = (_a = this.assetParamsViewTemp) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((y) => (y === null || y === void 0 ? void 0 : y.key) === (x === null || x === void 0 ? void 0 : x.key))) === null || _c === void 0 ? void 0 : _c.isCollapsed;
|
8107
8118
|
}
|
8108
8119
|
});
|
8109
8120
|
}
|
@@ -8217,5 +8228,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
8217
8228
|
* Generated bundle index. Do not edit.
|
8218
8229
|
*/
|
8219
8230
|
|
8220
|
-
export { ASSET_CATEGORY_PARAMS, ATO_ASSET_LAYERS, ATO_COMPONENTS_GROUP_DATA, AssetFlowComponent, AtoAssetParamsViewComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoNgVarDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService, COMPONENTS_GROUP_TYPE, DATA_ASSET_PARAMETER_FIELDS, DATA_WATER_SYSTEMS, ENUM_ASSET_PARAMETERS, WATER_SYSTEMS_NAME };
|
8231
|
+
export { ASSET_CATEGORY_PARAMS, ATO_ASSET_LAYERS, ATO_COMPONENTS_GROUP_DATA, AssetFlowComponent, AtoAssetParamsViewComponent, AtoFlowDiagramLibComponent, AtoGojsEditorModel, AtoLoadingDirective, AtoNgVarDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService, COMPONENTS_GROUP_TYPE, DATA_ASSET_PARAMETER_FIELDS, DATA_WATER_SYSTEMS, ENUM_ASSET_PARAMETERS, WATER_SYSTEMS_NAME };
|
8221
8232
|
//# sourceMappingURL=ato-water-lib.mjs.map
|