ato-water-lib 0.0.26 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/lib/ato-water-lib.module.mjs +2 -2
- package/esm2020/lib/components/asset-flow/asset-flow.component.mjs +3 -5
- package/esm2020/lib/models/default-gojs-editor.model.mjs +24 -19
- package/fesm2015/ato-water-lib.mjs +29 -22
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +26 -23
- package/fesm2020/ato-water-lib.mjs.map +1 -1
- package/lib/components/asset-flow/asset-flow.component.d.ts +908 -0
- package/lib/models/default-gojs-editor.model.d.ts +1 -0
- package/package.json +1 -1
@@ -4738,11 +4738,15 @@ class AtoDefaultGojsEditor {
|
|
4738
4738
|
}
|
4739
4739
|
return true;
|
4740
4740
|
}).map((e) => {
|
4741
|
-
var _a, _b;
|
4741
|
+
var _a, _b, _c, _d;
|
4742
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) &&
|
4743
4743
|
e === AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT) {
|
4744
4744
|
return AtoDefaultGojsEditor.ENUM_ACTIONS.DATA_MAPPING;
|
4745
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
|
+
}
|
4746
4750
|
return e;
|
4747
4751
|
});
|
4748
4752
|
self.actions = filteredActions.map((action) => {
|
@@ -4758,6 +4762,7 @@ class AtoDefaultGojsEditor {
|
|
4758
4762
|
break;
|
4759
4763
|
case AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS:
|
4760
4764
|
case AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS:
|
4765
|
+
case AtoDefaultGojsEditor.ENUM_ACTIONS.FLOW_DETAILS_AND_WIZARD:
|
4761
4766
|
onClickFn = () => {
|
4762
4767
|
self.onOpenDetail.emit({
|
4763
4768
|
node: obj.part,
|
@@ -5352,7 +5357,17 @@ class AtoDefaultGojsEditor {
|
|
5352
5357
|
// }),
|
5353
5358
|
// ),
|
5354
5359
|
// ),
|
5355
|
-
itemTemplate: this.$(go.Panel, 'TableRow',
|
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) => {
|
5356
5371
|
return data === null || data === void 0 ? void 0 : data.name;
|
5357
5372
|
})), this.$(go.Panel, 'Table', {
|
5358
5373
|
column: 1,
|
@@ -5382,11 +5397,6 @@ class AtoDefaultGojsEditor {
|
|
5382
5397
|
}
|
5383
5398
|
return !!(data === null || data === void 0 ? void 0 : data.value);
|
5384
5399
|
}))),
|
5385
|
-
}, {
|
5386
|
-
click: (e, obj) => {
|
5387
|
-
var _a;
|
5388
|
-
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]));
|
5389
|
-
},
|
5390
5400
|
}, new go.Binding('text', '', (data, panel) => {
|
5391
5401
|
return data === null || data === void 0 ? void 0 : data.value;
|
5392
5402
|
}), new go.Binding('stroke', '', (data) => {
|
@@ -5410,14 +5420,6 @@ class AtoDefaultGojsEditor {
|
|
5410
5420
|
})), new go.Binding('visible', '', (data) => !!(data === null || data === void 0 ? void 0 : data.toolTipAction))),
|
5411
5421
|
height: 14,
|
5412
5422
|
width: 14,
|
5413
|
-
}, {
|
5414
|
-
click: (e, obj) => {
|
5415
|
-
var _a, _b, _c;
|
5416
|
-
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) {
|
5417
|
-
return;
|
5418
|
-
}
|
5419
|
-
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]));
|
5420
|
-
},
|
5421
5423
|
}, new go.Binding('visible', '', (data, panel) => {
|
5422
5424
|
return !this._initialOptions.isReadOnly;
|
5423
5425
|
}), new go.Binding('opacity', '', (data, panel) => {
|
@@ -6361,6 +6363,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
6361
6363
|
ENUM_ACTIONS["DATA_MAPPING"] = "Data Mapping";
|
6362
6364
|
ENUM_ACTIONS["MORE"] = "More";
|
6363
6365
|
ENUM_ACTIONS["FLOW_DETAILS"] = "Flow details";
|
6366
|
+
ENUM_ACTIONS["FLOW_DETAILS_AND_WIZARD"] = "Flow details & wizard";
|
6364
6367
|
ENUM_ACTIONS["ASSET_PARAMETERS"] = "Asset parameters";
|
6365
6368
|
ENUM_ACTIONS["CHANGE_ICON"] = "Change icon";
|
6366
6369
|
})(ENUM_ACTIONS = AtoDefaultGojsEditor.ENUM_ACTIONS || (AtoDefaultGojsEditor.ENUM_ACTIONS = {}));
|
@@ -6375,6 +6378,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
6375
6378
|
iconClassName: 'far fa-arrow-progress',
|
6376
6379
|
onClick: () => { },
|
6377
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
|
+
},
|
6378
6386
|
[ENUM_ACTIONS.ASSET_PARAMETERS]: {
|
6379
6387
|
name: ENUM_ACTIONS.ASSET_PARAMETERS,
|
6380
6388
|
iconClassName: 'far fa-box-archive',
|
@@ -7868,13 +7876,11 @@ class AssetFlowComponent {
|
|
7868
7876
|
}
|
7869
7877
|
}
|
7870
7878
|
updateLocationReponsive() {
|
7871
|
-
var _a, _b
|
7879
|
+
var _a, _b;
|
7872
7880
|
if (!((_a = this.flowData) === null || _a === void 0 ? void 0 : _a.nodeDataArray)) {
|
7873
7881
|
this.flowData = this.getDefaultFlowData();
|
7874
|
-
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);
|
7875
|
-
return;
|
7876
7882
|
}
|
7877
|
-
_.forEach((
|
7883
|
+
_.forEach((_b = _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType + (this.isResponsiveView ? '_RESPONSIVE' : '')]) === null || _b === void 0 ? void 0 : _b.nodeDataArray, (node) => {
|
7878
7884
|
var _a, _b;
|
7879
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));
|
7880
7886
|
if (itemFind) {
|
@@ -7884,7 +7890,6 @@ class AssetFlowComponent {
|
|
7884
7890
|
itemFind.padding = node === null || node === void 0 ? void 0 : node.padding;
|
7885
7891
|
}
|
7886
7892
|
});
|
7887
|
-
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);
|
7888
7893
|
this.setFlowData(_.cloneDeep(this.flowData));
|
7889
7894
|
}
|
7890
7895
|
ngOnInit() {
|
@@ -7896,7 +7901,7 @@ class AssetFlowComponent {
|
|
7896
7901
|
}
|
7897
7902
|
getDefaultFlowData() {
|
7898
7903
|
var _a;
|
7899
|
-
const flowData = Object.assign(Object.assign({}, _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType
|
7904
|
+
const flowData = Object.assign(Object.assign({}, _.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[this.systemType]), { linkFromPortIdProperty: 'fromPort', linkToPortIdProperty: 'toPort' });
|
7900
7905
|
if (this.isUseBase64) {
|
7901
7906
|
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');
|
7902
7907
|
if (itemImageTemp) {
|
@@ -7906,7 +7911,9 @@ class AssetFlowComponent {
|
|
7906
7911
|
return flowData;
|
7907
7912
|
}
|
7908
7913
|
setFlowData(data) {
|
7914
|
+
var _a, _b;
|
7909
7915
|
this.flowData = Object.assign({}, data);
|
7916
|
+
this.dataTableAssetParams = (_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);
|
7910
7917
|
}
|
7911
7918
|
}
|
7912
7919
|
AssetFlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssetFlowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
@@ -7963,7 +7970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7963
7970
|
AtoNgVarDirective,
|
7964
7971
|
],
|
7965
7972
|
imports: [
|
7966
|
-
CommonModule
|
7973
|
+
CommonModule,
|
7967
7974
|
],
|
7968
7975
|
exports: [
|
7969
7976
|
AtoWaterLibComponent,
|