ato-water-lib 0.0.37 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,8 +8249,15 @@ class AssetFlowComponent {
8238
8249
  return flowData;
8239
8250
  }
8240
8251
  setFlowData(data) {
8241
- this.flowData = { ...data };
8242
- this.dataTableAssetParams = _.forEach(this.flowData?.nodeDataArray?.filter((e) => e?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE && e?.assetLayers?.includes(this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)), x => {
8252
+ // const layer = data?.assetLayer ?? this?.assetLayer ?? ATO_ASSET_LAYERS.FLOW;
8253
+ this.flowData = {
8254
+ ...data,
8255
+ nodeDataArray: _.filter(data.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === data?.assetLayer))
8256
+ };
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 => {
8243
8261
  if (!data?.isRefresh) {
8244
8262
  x.isCollapsed = this.assetParamsViewTemp?.data?.find(y => y?.key === x?.key)?.isCollapsed;
8245
8263
  }
@@ -8350,11 +8368,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
8350
8368
  /*
8351
8369
  * Public API Surface of ato-water-lib
8352
8370
  */
8353
- // Css
8354
8371
 
8355
8372
  /**
8356
8373
  * Generated bundle index. Do not edit.
8357
8374
  */
8358
8375
 
8359
- export { AssetFlowComponent, AtoAssetParamsViewComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoNgVarDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
8376
+ 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 };
8360
8377
  //# sourceMappingURL=ato-water-lib.mjs.map