ato-water-lib 0.0.62 → 0.0.65

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,11 +72,19 @@ export class AssetFlowComponent {
72
72
  const isResponsiveView = window.innerWidth < 1024;
73
73
  // Reponsive
74
74
  _.forEach(flowData?.nodeDataArray, (node) => {
75
- node = _.merge(node, node[`extendedData${isResponsiveView ? 'Responsive' : ''}`]);
75
+ const propertyNameExtend = `extendedData${defaultData.isFrom && node?.isFrom ? `isFrom${defaultData.isFrom}` : ''}${isResponsiveView ? 'Responsive' : ''}`;
76
+ node = _.merge(node, node[propertyNameExtend]);
76
77
  if (node?.assetLayers) {
77
78
  node.visible =
78
79
  node?.assetLayers === defaultData?.assetLayer &&
79
- node[`extendedData${isResponsiveView ? 'Responsive' : ''}`]?.visible;
80
+ node[propertyNameExtend]?.visible;
81
+ }
82
+ if (defaultData.isFrom && node?.dataTable) {
83
+ _.forEach(node?.dataTable, item => {
84
+ if (item?.isFrom) {
85
+ item.visible = item?.isFrom === defaultData.isFrom;
86
+ }
87
+ });
80
88
  }
81
89
  });
82
90
  // assetLayer
@@ -91,13 +99,21 @@ export class AssetFlowComponent {
91
99
  }
92
100
  setFlowData(data) {
93
101
  _.forEach(data.nodeDataArray, (node) => {
94
- node = _.merge(node, node[`extendedData${this.isResponsiveView ? 'Responsive' : ''}`]);
102
+ const propertyNameExtend = `extendedData${data.isFrom && node?.isFrom ? `isFrom${data.isFrom}` : ''}${this.isResponsiveView ? 'Responsive' : ''}`;
103
+ node = _.merge(node, node[propertyNameExtend]);
95
104
  if (node?.assetLayers) {
96
105
  node.visible =
97
106
  node?.assetLayers === data.assetLayer &&
98
- node[`extendedData${this.isResponsiveView ? 'Responsive' : ''}`]
107
+ node[propertyNameExtend]
99
108
  ?.visible;
100
109
  }
110
+ if (data.isFrom && node?.dataTable) {
111
+ _.forEach(node?.dataTable, item => {
112
+ if (item?.isFrom) {
113
+ item.visible = item?.isFrom === data.isFrom;
114
+ }
115
+ });
116
+ }
101
117
  });
102
118
  this.flowData = {
103
119
  ...data,
@@ -114,7 +130,7 @@ export class AssetFlowComponent {
114
130
  }
115
131
  }
116
132
  AssetFlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssetFlowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
117
- AssetFlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssetFlowComponent, selector: "ato-asset-flow", inputs: { assetLayer: "assetLayer", selectedComponent: "selectedComponent", systemType: "systemType", isUseBase64: "isUseBase64", flowData: "flowData", getFlowDataCallBack: "getFlowDataCallBack" }, outputs: { onClickParamOfTableEvent: "onClickParamOfTableEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "gjFlowDiagramTemp", first: true, predicate: AtoFlowDiagramLibComponent, descendants: true }, { propertyName: "assetParamsViewTemp", first: true, predicate: AtoAssetParamsViewComponent, 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 #assetParamsViewTemp\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;min-height:30vh}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: ["data", "isLoading"] }, { kind: "directive", type: i3.AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }, { kind: "component", type: i4.AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: ["isEditView", "data"], outputs: ["clickParamTableRow"] }] });
133
+ AssetFlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssetFlowComponent, selector: "ato-asset-flow", inputs: { assetLayer: "assetLayer", selectedComponent: "selectedComponent", systemType: "systemType", isUseBase64: "isUseBase64", isFrom: "isFrom", flowData: "flowData", getFlowDataCallBack: "getFlowDataCallBack" }, outputs: { onClickParamOfTableEvent: "onClickParamOfTableEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "gjFlowDiagramTemp", first: true, predicate: AtoFlowDiagramLibComponent, descendants: true }, { propertyName: "assetParamsViewTemp", first: true, predicate: AtoAssetParamsViewComponent, 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 #assetParamsViewTemp\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;min-height:30vh}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: ["data", "isLoading"] }, { kind: "directive", type: i3.AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }, { kind: "component", type: i4.AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: ["isEditView", "data"], outputs: ["clickParamTableRow"] }] });
118
134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssetFlowComponent, decorators: [{
119
135
  type: Component,
120
136
  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 #assetParamsViewTemp\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;min-height:30vh}\n"] }]
@@ -134,6 +150,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
134
150
  type: Output
135
151
  }], isUseBase64: [{
136
152
  type: Input
153
+ }], isFrom: [{
154
+ type: Input
137
155
  }], flowData: [{
138
156
  type: Input
139
157
  }], getFlowDataCallBack: [{
@@ -142,4 +160,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
142
160
  type: HostListener,
143
161
  args: ['window:resize', ['$event']]
144
162
  }] } });
145
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXQtZmxvdy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hdG8td2F0ZXItbGliL3NyYy9saWIvY29tcG9uZW50cy9hc3NldC1mbG93L2Fzc2V0LWZsb3cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXRvLXdhdGVyLWxpYi9zcmMvbGliL2NvbXBvbmVudHMvYXNzZXQtZmxvdy9hc3NldC1mbG93LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsWUFBWSxFQUNaLFlBQVksRUFDWixLQUFLLEVBRUwsTUFBTSxFQUNOLFNBQVMsR0FDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQixPQUFPLENBQUMsTUFBTSxRQUFRLENBQUM7QUFDdkIsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzdELE9BQU8sRUFFTCx5QkFBeUIsR0FDMUIsTUFBTSx3Q0FBd0MsQ0FBQztBQUdoRCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRSxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxrREFBa0QsQ0FBQztBQUMvRixPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxnREFBZ0QsQ0FBQzs7Ozs7O0FBTzVGLE1BQU0sT0FBTyxrQkFBa0I7SUFML0I7UUFhWSw2QkFBd0IsR0FDaEMsSUFBSSxZQUFZLEVBQU8s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