ato-water-lib 0.0.38 → 0.0.39
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 -5
- package/esm2020/lib/models/gojs-data.model.mjs +1 -1
- package/fesm2015/ato-water-lib.mjs +19 -6
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +18 -4
- package/fesm2020/ato-water-lib.mjs.map +1 -1
- package/lib/components/asset-flow/asset-flow.component.d.ts +6 -2
- package/lib/models/gojs-data.model.d.ts +1 -1
- package/package.json +1 -1
@@ -8179,9 +8179,15 @@ class AssetFlowComponent {
|
|
8179
8179
|
}),
|
8180
8180
|
// isReadOnly: true,
|
8181
8181
|
};
|
8182
|
-
this.flowData = {};
|
8183
8182
|
this.isResponsiveView = false;
|
8184
8183
|
}
|
8184
|
+
set flowData(v) {
|
8185
|
+
this._flowData = v;
|
8186
|
+
this.updateDataTableAssetParams({ ...v, assetLayer: this.assetLayer });
|
8187
|
+
}
|
8188
|
+
get flowData() {
|
8189
|
+
return this._flowData;
|
8190
|
+
}
|
8185
8191
|
onResize(event) {
|
8186
8192
|
// Now only Support Cooling Tower Responsive
|
8187
8193
|
if (this.timeoutResizeWindow) {
|
@@ -8223,10 +8229,15 @@ class AssetFlowComponent {
|
|
8223
8229
|
}
|
8224
8230
|
static getDefaultFlowData(defaultData) {
|
8225
8231
|
const flowData = {
|
8232
|
+
...defaultData,
|
8226
8233
|
..._.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[defaultData?.systemType],
|
8227
8234
|
linkFromPortIdProperty: 'fromPort',
|
8228
8235
|
linkToPortIdProperty: 'toPort',
|
8229
8236
|
};
|
8237
|
+
// Reponsive
|
8238
|
+
_.forEach(flowData?.nodeDataArray, (node) => {
|
8239
|
+
node = _.merge(node, node[`extendedData${window.innerWidth < 1024 ? 'Responsive' : ''}`]);
|
8240
|
+
});
|
8230
8241
|
// assetLayer
|
8231
8242
|
flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)));
|
8232
8243
|
if (defaultData?.isUseBase64) {
|
@@ -8238,12 +8249,15 @@ class AssetFlowComponent {
|
|
8238
8249
|
return flowData;
|
8239
8250
|
}
|
8240
8251
|
setFlowData(data) {
|
8241
|
-
const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
|
8252
|
+
// const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
|
8242
8253
|
this.flowData = {
|
8243
8254
|
...data,
|
8244
|
-
nodeDataArray: _.filter(data.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers ===
|
8255
|
+
nodeDataArray: _.filter(data.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === data?.assetLayer))
|
8245
8256
|
};
|
8246
|
-
this.
|
8257
|
+
this.updateDataTableAssetParams(data);
|
8258
|
+
}
|
8259
|
+
updateDataTableAssetParams(data) {
|
8260
|
+
this.dataTableAssetParams = _.forEach(this.flowData?.nodeDataArray?.filter((e) => e?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE && e?.assetLayers === data?.assetLayer), x => {
|
8247
8261
|
if (!data?.isRefresh) {
|
8248
8262
|
x.isCollapsed = this.assetParamsViewTemp?.data?.find(y => y?.key === x?.key)?.isCollapsed;
|
8249
8263
|
}
|