ato-water-lib 0.0.87 → 0.0.90
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/lib/ato-water-lib.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/ato-water-lib.module.mjs +15 -15
- package/{esm2020 → esm2022}/lib/ato-water-lib.service.mjs +5 -5
- package/esm2022/lib/components/asset-flow/asset-flow.component.mjs +174 -0
- package/{esm2020 → esm2022}/lib/components/asset-params-view/asset-params-view.component.mjs +7 -9
- package/esm2022/lib/components/flow-diagram-lib/flow-diagram-lib.component.mjs +55 -0
- package/esm2022/lib/directive/ato-loading.directive.mjs +59 -0
- package/esm2022/lib/directive/ng-var.directive.mjs +33 -0
- package/esm2022/lib/models/default-gojs-editor.model.mjs +3582 -0
- package/esm2022/lib/models/gojs-data.model.mjs +10 -0
- package/esm2022/lib/models/gojs-editor.model.mjs +1799 -0
- package/esm2022/lib/services/utils/utils.service.mjs +133 -0
- package/{fesm2020 → fesm2022}/ato-water-lib.mjs +199 -168
- package/fesm2022/ato-water-lib.mjs.map +1 -0
- package/lib/components/asset-flow/asset-flow.component.d.ts +1 -1
- package/lib/components/asset-params-view/asset-params-view.component.d.ts +1 -1
- package/lib/components/flow-diagram-lib/flow-diagram-lib.component.d.ts +1 -1
- package/lib/constants/components-group-const.d.ts +1 -1
- package/lib/directive/ato-loading.directive.d.ts +1 -1
- package/lib/directive/ng-var.directive.d.ts +1 -1
- package/lib/models/default-gojs-editor.model.d.ts +2 -2
- package/lib/models/gojs-editor.model.d.ts +4 -4
- package/package.json +7 -13
- package/esm2020/lib/components/asset-flow/asset-flow.component.mjs +0 -165
- package/esm2020/lib/components/flow-diagram-lib/flow-diagram-lib.component.mjs +0 -54
- package/esm2020/lib/directive/ato-loading.directive.mjs +0 -55
- package/esm2020/lib/directive/ng-var.directive.mjs +0 -31
- package/esm2020/lib/models/default-gojs-editor.model.mjs +0 -3567
- package/esm2020/lib/models/gojs-data.model.mjs +0 -6
- package/esm2020/lib/models/gojs-editor.model.mjs +0 -1797
- package/esm2020/lib/services/utils/utils.service.mjs +0 -133
- package/fesm2015/ato-water-lib.mjs +0 -9049
- package/fesm2015/ato-water-lib.mjs.map +0 -1
- package/fesm2020/ato-water-lib.mjs.map +0 -1
- /package/{esm2020 → esm2022}/ato-water-lib.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/applicable-prefixes-const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/base64.const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/components-group-const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/icon-base64.const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/key.const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/plant.constant.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/constants/value.const.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/ato-asset-flow.model.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
import { Component } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export class AtoWaterLibComponent {
|
4
|
-
}
|
5
|
-
|
6
|
-
AtoWaterLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AtoWaterLibComponent, selector: "lib-ato-water-lib", ngImport: i0, template: `
|
4
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
5
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: AtoWaterLibComponent, selector: "lib-ato-water-lib", ngImport: i0, template: `
|
7
6
|
<p>
|
8
7
|
ato-water-lib works!
|
9
8
|
</p>
|
10
9
|
`, isInline: true });
|
11
|
-
|
10
|
+
}
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibComponent, decorators: [{
|
12
12
|
type: Component,
|
13
13
|
args: [{ selector: 'lib-ato-water-lib', template: `
|
14
14
|
<p>
|
@@ -16,4 +16,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
16
16
|
</p>
|
17
17
|
` }]
|
18
18
|
}] });
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvLXdhdGVyLWxpYi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hdG8td2F0ZXItbGliL3NyYy9saWIvYXRvLXdhdGVyLWxpYi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFZMUMsTUFBTSxPQUFPLG9CQUFvQjt1R0FBcEIsb0JBQW9COzJGQUFwQixvQkFBb0IseURBUnJCOzs7O0dBSVQ7OzJGQUlVLG9CQUFvQjtrQkFWaEMsU0FBUzsrQkFDRSxtQkFBbUIsWUFDbkI7Ozs7R0FJVCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICdsaWItYXRvLXdhdGVyLWxpYicsXG4gIHRlbXBsYXRlOiBgXG4gICAgPHA+XG4gICAgICBhdG8td2F0ZXItbGliIHdvcmtzIVxuICAgIDwvcD5cbiAgYCxcbiAgc3R5bGVzOiBbXG4gIF1cbn0pXG5leHBvcnQgY2xhc3MgQXRvV2F0ZXJMaWJDb21wb25lbnQge1xuXG59XG4iXX0=
|
@@ -8,21 +8,21 @@ import { AtoAssetParamsViewComponent } from './components/asset-params-view/asse
|
|
8
8
|
import { AtoNgVarDirective } from './directive/ng-var.directive';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
export class AtoWaterLibModule {
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
12
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
|
13
|
+
AtoFlowDiagramLibComponent,
|
14
|
+
AssetFlowComponent,
|
15
|
+
AtoLoadingDirective,
|
16
|
+
AtoAssetParamsViewComponent,
|
17
|
+
AtoNgVarDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
|
18
|
+
AtoFlowDiagramLibComponent,
|
19
|
+
AssetFlowComponent,
|
20
|
+
AtoLoadingDirective,
|
21
|
+
AtoAssetParamsViewComponent,
|
22
|
+
AtoNgVarDirective] });
|
23
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
|
11
24
|
}
|
12
|
-
|
13
|
-
AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
|
14
|
-
AtoFlowDiagramLibComponent,
|
15
|
-
AssetFlowComponent,
|
16
|
-
AtoLoadingDirective,
|
17
|
-
AtoAssetParamsViewComponent,
|
18
|
-
AtoNgVarDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
|
19
|
-
AtoFlowDiagramLibComponent,
|
20
|
-
AssetFlowComponent,
|
21
|
-
AtoLoadingDirective,
|
22
|
-
AtoAssetParamsViewComponent,
|
23
|
-
AtoNgVarDirective] });
|
24
|
-
AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibModule, decorators: [{
|
26
26
|
type: NgModule,
|
27
27
|
args: [{
|
28
28
|
declarations: [
|
@@ -46,4 +46,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
46
46
|
]
|
47
47
|
}]
|
48
48
|
}] });
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvLXdhdGVyLWxpYi5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hdG8td2F0ZXItbGliL3NyYy9saWIvYXRvLXdhdGVyLWxpYi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNqRSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSwwREFBMEQsQ0FBQztBQUN0RyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQztBQUNsRixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDeEUsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU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G9uZW50LFxuICAgIEF0b05nVmFyRGlyZWN0aXZlLFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIEF0b1dhdGVyTGliTW9kdWxlIHsgfVxuIl19
|
@@ -2,13 +2,13 @@ import { Injectable } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export class AtoWaterLibService {
|
4
4
|
constructor() { }
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
6
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibService, providedIn: 'root' });
|
5
7
|
}
|
6
|
-
|
7
|
-
AtoWaterLibService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibService, providedIn: 'root' });
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibService, decorators: [{
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoWaterLibService, decorators: [{
|
9
9
|
type: Injectable,
|
10
10
|
args: [{
|
11
11
|
providedIn: 'root'
|
12
12
|
}]
|
13
|
-
}], ctorParameters:
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
13
|
+
}], ctorParameters: () => [] });
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvLXdhdGVyLWxpYi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYXRvLXdhdGVyLWxpYi9zcmMvbGliL2F0by13YXRlci1saWIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQyxNQUFNLE9BQU8sa0JBQWtCO0lBRTdCLGdCQUFnQixDQUFDO3VHQUZOLGtCQUFrQjsyR0FBbEIsa0JBQWtCLGNBRmpCLE1BQU07OzJGQUVQLGtCQUFrQjtrQkFIOUIsVUFBVTttQkFBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIEF0b1dhdGVyTGliU2VydmljZSB7XG5cbiAgY29uc3RydWN0b3IoKSB7IH1cbn1cbiJdfQ==
|
@@ -0,0 +1,174 @@
|
|
1
|
+
import { Component, EventEmitter, HostListener, Input, Output, ViewChild, } from '@angular/core';
|
2
|
+
import * as go from 'gojs';
|
3
|
+
import _ from 'lodash';
|
4
|
+
import { AtoGoJSBase64 } from '../../constants/base64.const';
|
5
|
+
import { ATO_COMPONENTS_GROUP_DATA, } from '../../constants/components-group-const';
|
6
|
+
import { AtoGojsEditorModel } from '../../models/gojs-editor.model';
|
7
|
+
import { AtoAssetParamsViewComponent } from '../asset-params-view/asset-params-view.component';
|
8
|
+
import { AtoFlowDiagramLibComponent } from '../flow-diagram-lib/flow-diagram-lib.component';
|
9
|
+
import * as i0 from "@angular/core";
|
10
|
+
import * as i1 from "@angular/common";
|
11
|
+
import * as i2 from "../flow-diagram-lib/flow-diagram-lib.component";
|
12
|
+
import * as i3 from "../../directive/ato-loading.directive";
|
13
|
+
import * as i4 from "../asset-params-view/asset-params-view.component";
|
14
|
+
export class AssetFlowComponent {
|
15
|
+
assetLayer;
|
16
|
+
gjFlowDiagramTemp;
|
17
|
+
assetParamsViewTemp;
|
18
|
+
selectedComponent;
|
19
|
+
systemType;
|
20
|
+
onClickParamOfTableEvent = new EventEmitter();
|
21
|
+
isUseBase64 = false;
|
22
|
+
isFrom;
|
23
|
+
$ = go.GraphObject.make;
|
24
|
+
options = {
|
25
|
+
layout: this.$(go.LayeredDigraphLayout, {
|
26
|
+
// direction: 0,
|
27
|
+
}),
|
28
|
+
// isReadOnly: true,
|
29
|
+
};
|
30
|
+
_flowData;
|
31
|
+
set flowData(v) {
|
32
|
+
this._flowData = v;
|
33
|
+
this.updateDataTableAssetParams({ ...v, assetLayer: this.assetLayer });
|
34
|
+
}
|
35
|
+
get flowData() {
|
36
|
+
return this._flowData;
|
37
|
+
}
|
38
|
+
// Reponsive
|
39
|
+
dataTableAssetParams;
|
40
|
+
// @Input() isResponsiveView = false;
|
41
|
+
get isResponsiveView() {
|
42
|
+
return window.innerWidth < 1024;
|
43
|
+
}
|
44
|
+
getFlowDataCallBack;
|
45
|
+
timeoutResizeWindow;
|
46
|
+
onResize(event) {
|
47
|
+
// Now only Support Cooling Tower Responsive
|
48
|
+
if (this.timeoutResizeWindow) {
|
49
|
+
clearTimeout(this.timeoutResizeWindow);
|
50
|
+
}
|
51
|
+
this.timeoutResizeWindow = setTimeout(() => {
|
52
|
+
this.updateLocationReponsive();
|
53
|
+
}, 1000);
|
54
|
+
}
|
55
|
+
updateLocationReponsive() {
|
56
|
+
if (!this.flowData?.nodeDataArray) {
|
57
|
+
this.flowData = AssetFlowComponent.getDefaultFlowData({
|
58
|
+
systemType: this.systemType,
|
59
|
+
isUseBase64: this.isUseBase64,
|
60
|
+
assetLayer: this.assetLayer,
|
61
|
+
});
|
62
|
+
}
|
63
|
+
_.forEach(this.flowData?.nodeDataArray, (node) => {
|
64
|
+
node = _.merge(node, node[`extendedData${this.isResponsiveView ? 'Responsive' : ''}`]);
|
65
|
+
});
|
66
|
+
this.setFlowData(_.cloneDeep(this.flowData));
|
67
|
+
}
|
68
|
+
ngOnInit() {
|
69
|
+
this.updateLocationReponsive();
|
70
|
+
}
|
71
|
+
onClickParamOfTable($event) {
|
72
|
+
this.onClickParamOfTableEvent.emit($event);
|
73
|
+
}
|
74
|
+
static getDefaultFlowData(defaultData) {
|
75
|
+
const flowData = {
|
76
|
+
...defaultData,
|
77
|
+
..._.cloneDeep(ATO_COMPONENTS_GROUP_DATA)[defaultData?.systemType],
|
78
|
+
linkFromPortIdProperty: 'fromPort',
|
79
|
+
linkToPortIdProperty: 'toPort',
|
80
|
+
};
|
81
|
+
const isResponsiveView = window.innerWidth < 1024;
|
82
|
+
// Reponsive
|
83
|
+
_.forEach(flowData?.nodeDataArray, (node) => {
|
84
|
+
const propertyNameExtend = `extendedData${defaultData.isFrom && node?.isFrom ? `isFrom${defaultData.isFrom}` : ''}${isResponsiveView ? 'Responsive' : ''}`;
|
85
|
+
node = _.merge(node, node[propertyNameExtend]);
|
86
|
+
if (node?.assetLayers) {
|
87
|
+
node.visible =
|
88
|
+
node?.assetLayers === defaultData?.assetLayer &&
|
89
|
+
node[propertyNameExtend]?.visible;
|
90
|
+
}
|
91
|
+
if (defaultData.isFrom && node?.dataTable) {
|
92
|
+
_.forEach(node?.dataTable, item => {
|
93
|
+
if (item?.isFrom) {
|
94
|
+
item.visible = item?.isFrom === defaultData.isFrom;
|
95
|
+
}
|
96
|
+
item = _.merge(item, item[`extendedDataIsFrom${defaultData.isFrom}`]);
|
97
|
+
});
|
98
|
+
}
|
99
|
+
});
|
100
|
+
// assetLayer
|
101
|
+
// flowData.nodeDataArray = _.filter(flowData.nodeDataArray, x => !x?.assetLayers || (x?.assetLayers && x?.assetLayers === (defaultData?.assetLayer ?? ATO_ASSET_LAYERS.FLOW)))
|
102
|
+
if (defaultData?.isUseBase64) {
|
103
|
+
const itemImageTemp = flowData?.nodeDataArray?.find((x) => x?.type === 'Image Template');
|
104
|
+
if (itemImageTemp) {
|
105
|
+
itemImageTemp.source = AtoGoJSBase64[defaultData?.systemType];
|
106
|
+
}
|
107
|
+
}
|
108
|
+
return flowData;
|
109
|
+
}
|
110
|
+
setFlowData(data) {
|
111
|
+
_.forEach(data.nodeDataArray, (node) => {
|
112
|
+
const propertyNameExtend = `extendedData${data.isFrom && node?.isFrom ? `isFrom${data.isFrom}` : ''}${this.isResponsiveView ? 'Responsive' : ''}`;
|
113
|
+
node = _.merge(node, node[propertyNameExtend]);
|
114
|
+
if (node?.assetLayers) {
|
115
|
+
node.visible =
|
116
|
+
node?.assetLayers === data.assetLayer &&
|
117
|
+
node[propertyNameExtend]
|
118
|
+
?.visible;
|
119
|
+
}
|
120
|
+
if (data.isFrom && node?.dataTable) {
|
121
|
+
_.forEach(node?.dataTable, item => {
|
122
|
+
if (item?.isFrom) {
|
123
|
+
item.visible = item?.isFrom === data.isFrom;
|
124
|
+
}
|
125
|
+
item = _.merge(item, item[`extendedDataIsFrom${data.isFrom}`]);
|
126
|
+
});
|
127
|
+
}
|
128
|
+
});
|
129
|
+
this.flowData = {
|
130
|
+
...data,
|
131
|
+
};
|
132
|
+
this.updateDataTableAssetParams(data);
|
133
|
+
}
|
134
|
+
updateDataTableAssetParams(data) {
|
135
|
+
this.dataTableAssetParams = _.forEach(this.flowData?.nodeDataArray?.filter((e) => e?.type === AtoGojsEditorModel.ENUM_TEMPLATES.PARAM_TABLE &&
|
136
|
+
(data?.assetLayer ? (e?.assetLayers === data?.assetLayer) : true)), (x) => {
|
137
|
+
if (!data?.isRefresh) {
|
138
|
+
x.isCollapsed = this.assetParamsViewTemp?.data?.find((y) => y?.key === x?.key)?.isCollapsed;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
}
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AssetFlowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", 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"] }] });
|
144
|
+
}
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AssetFlowComponent, decorators: [{
|
146
|
+
type: Component,
|
147
|
+
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"] }]
|
148
|
+
}], propDecorators: { assetLayer: [{
|
149
|
+
type: Input
|
150
|
+
}], gjFlowDiagramTemp: [{
|
151
|
+
type: ViewChild,
|
152
|
+
args: [AtoFlowDiagramLibComponent]
|
153
|
+
}], assetParamsViewTemp: [{
|
154
|
+
type: ViewChild,
|
155
|
+
args: [AtoAssetParamsViewComponent]
|
156
|
+
}], selectedComponent: [{
|
157
|
+
type: Input
|
158
|
+
}], systemType: [{
|
159
|
+
type: Input
|
160
|
+
}], onClickParamOfTableEvent: [{
|
161
|
+
type: Output
|
162
|
+
}], isUseBase64: [{
|
163
|
+
type: Input
|
164
|
+
}], isFrom: [{
|
165
|
+
type: Input
|
166
|
+
}], flowData: [{
|
167
|
+
type: Input
|
168
|
+
}], getFlowDataCallBack: [{
|
169
|
+
type: Input
|
170
|
+
}], onResize: [{
|
171
|
+
type: HostListener,
|
172
|
+
args: ['window:resize', ['$event']]
|
173
|
+
}] } });
|
174
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN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→ esm2022}/lib/components/asset-params-view/asset-params-view.component.mjs
RENAMED
@@ -2,20 +2,18 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
import * as i1 from "@angular/common";
|
4
4
|
export class AtoAssetParamsViewComponent {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
this.clickParamTableRow = new EventEmitter();
|
9
|
-
}
|
5
|
+
isEditView = false;
|
6
|
+
data = [];
|
7
|
+
clickParamTableRow = new EventEmitter();
|
10
8
|
onClickRowParam(itemTable) {
|
11
9
|
if (this.isEditView && itemTable?.isEditable) {
|
12
10
|
this.clickParamTableRow.emit(itemTable);
|
13
11
|
}
|
14
12
|
}
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoAssetParamsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: { isEditView: "isEditView", data: "data" }, outputs: { clickParamTableRow: "clickParamTableRow" }, ngImport: i0, template: "<div class=\"d-flex flex-column flex-gap-2\">\n <div class=\"\" *ngFor=\"let tableParam of data\">\n <ng-template\n [ngTemplateOutlet]=\"tableParamTemplate\"\n [ngTemplateOutletContext]=\"{\n data: tableParam\n }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #tableParamTemplate let-data=\"data\">\n <div\n class=\"d-flex flex-column asset-param-item w-100\"\n [style.backgroundColor]=\"data?.color\"\n >\n <div\n class=\"d-flex align-items-center justify-content-between py-1 pl-1 pr-2 cursor-pointer\"\n (click)=\"data.isCollapsed = !data.isCollapsed\"\n >\n <div class=\"font-size-14px flex-grow-1 text-truncate color-white\">\n {{ data?.title }}\n </div>\n <svg\n *ngIf=\"data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z\"\n />\n </svg>\n <svg\n *ngIf=\"!data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"\n />\n </svg>\n </div>\n <div class=\"px-1 pb-1\" *ngIf=\"!data.isCollapsed\">\n <div\n class=\"table-asset-param-wrapper\"\n [style.backgroundColor]=\"data?.bgColor\"\n >\n <table>\n <tbody>\n <tr\n *ngFor=\"let itemTable of data?.dataTable\"\n (click)=\"onClickRowParam(itemTable)\"\n class=\"cursor-pointer\"\n >\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n {{ itemTable?.name }}\n </td>\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n <div class=\"d-flex align-items-center flex-gap-2\">\n <div\n class=\"mr-auto font-size-13px flex-grow-1\"\n [style.color]=\"itemTable?.color\"\n >\n {{ itemTable?.value }}\n </div>\n <svg *ngIf=\"isEditView && itemTable?.isEditable\" class=\"svg-15px\" fill=\"#333333\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z\"/></svg>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".asset-param-item{border-radius:5px}.asset-param-item .table-asset-param-wrapper{border-radius:5px;background-color:#f0f8ff}.asset-param-item .table-asset-param-wrapper table{border-collapse:collapse;width:100%}.asset-param-item .table-asset-param-wrapper table tbody tr td{border:1px solid red;height:30px;padding:4px}.asset-param-item .table-asset-param-wrapper table tbody tr td:first-child{width:30%}.asset-param-item .table-asset-param-wrapper table tbody tr td:last-child{width:70%}.color-white{color:#fff}.flex-gap-2{gap:.5rem}.svg-15px{width:15px;height:15px;flex:0 0 15px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
15
15
|
}
|
16
|
-
|
17
|
-
AtoAssetParamsViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AtoAssetParamsViewComponent, selector: "ato-asset-params-view", inputs: { isEditView: "isEditView", data: "data" }, outputs: { clickParamTableRow: "clickParamTableRow" }, ngImport: i0, template: "<div class=\"d-flex flex-column flex-gap-2\">\n <div class=\"\" *ngFor=\"let tableParam of data\">\n <ng-template\n [ngTemplateOutlet]=\"tableParamTemplate\"\n [ngTemplateOutletContext]=\"{\n data: tableParam\n }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #tableParamTemplate let-data=\"data\">\n <div\n class=\"d-flex flex-column asset-param-item w-100\"\n [style.backgroundColor]=\"data?.color\"\n >\n <div\n class=\"d-flex align-items-center justify-content-between py-1 pl-1 pr-2 cursor-pointer\"\n (click)=\"data.isCollapsed = !data.isCollapsed\"\n >\n <div class=\"font-size-14px flex-grow-1 text-truncate color-white\">\n {{ data?.title }}\n </div>\n <svg\n *ngIf=\"data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z\"\n />\n </svg>\n <svg\n *ngIf=\"!data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"\n />\n </svg>\n </div>\n <div class=\"px-1 pb-1\" *ngIf=\"!data.isCollapsed\">\n <div\n class=\"table-asset-param-wrapper\"\n [style.backgroundColor]=\"data?.bgColor\"\n >\n <table>\n <tbody>\n <tr\n *ngFor=\"let itemTable of data?.dataTable\"\n (click)=\"onClickRowParam(itemTable)\"\n class=\"cursor-pointer\"\n >\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n {{ itemTable?.name }}\n </td>\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n <div class=\"d-flex align-items-center flex-gap-2\">\n <div\n class=\"mr-auto font-size-13px flex-grow-1\"\n [style.color]=\"itemTable?.color\"\n >\n {{ itemTable?.value }}\n </div>\n <svg *ngIf=\"isEditView && itemTable?.isEditable\" class=\"svg-15px\" fill=\"#333333\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z\"/></svg>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".asset-param-item{border-radius:5px}.asset-param-item .table-asset-param-wrapper{border-radius:5px;background-color:#f0f8ff}.asset-param-item .table-asset-param-wrapper table{border-collapse:collapse;width:100%}.asset-param-item .table-asset-param-wrapper table tbody tr td{border:1px solid red;height:30px;padding:4px}.asset-param-item .table-asset-param-wrapper table tbody tr td:first-child{width:30%}.asset-param-item .table-asset-param-wrapper table tbody tr td:last-child{width:70%}.color-white{color:#fff}.flex-gap-2{gap:.5rem}.svg-15px{width:15px;height:15px;flex:0 0 15px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoAssetParamsViewComponent, decorators: [{
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoAssetParamsViewComponent, decorators: [{
|
19
17
|
type: Component,
|
20
18
|
args: [{ selector: 'ato-asset-params-view', template: "<div class=\"d-flex flex-column flex-gap-2\">\n <div class=\"\" *ngFor=\"let tableParam of data\">\n <ng-template\n [ngTemplateOutlet]=\"tableParamTemplate\"\n [ngTemplateOutletContext]=\"{\n data: tableParam\n }\"\n ></ng-template>\n </div>\n</div>\n\n<ng-template #tableParamTemplate let-data=\"data\">\n <div\n class=\"d-flex flex-column asset-param-item w-100\"\n [style.backgroundColor]=\"data?.color\"\n >\n <div\n class=\"d-flex align-items-center justify-content-between py-1 pl-1 pr-2 cursor-pointer\"\n (click)=\"data.isCollapsed = !data.isCollapsed\"\n >\n <div class=\"font-size-14px flex-grow-1 text-truncate color-white\">\n {{ data?.title }}\n </div>\n <svg\n *ngIf=\"data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z\"\n />\n </svg>\n <svg\n *ngIf=\"!data.isCollapsed\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n fill=\"#FFFF\"\n class=\"fa-solid font-size-14px color-white svg-15px\"\n >\n <path\n d=\"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"\n />\n </svg>\n </div>\n <div class=\"px-1 pb-1\" *ngIf=\"!data.isCollapsed\">\n <div\n class=\"table-asset-param-wrapper\"\n [style.backgroundColor]=\"data?.bgColor\"\n >\n <table>\n <tbody>\n <tr\n *ngFor=\"let itemTable of data?.dataTable\"\n (click)=\"onClickRowParam(itemTable)\"\n class=\"cursor-pointer\"\n >\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n {{ itemTable?.name }}\n </td>\n <td\n class=\"font-size-13px\"\n [style.borderColor]=\"data?.borderTable\"\n >\n <div class=\"d-flex align-items-center flex-gap-2\">\n <div\n class=\"mr-auto font-size-13px flex-grow-1\"\n [style.color]=\"itemTable?.color\"\n >\n {{ itemTable?.value }}\n </div>\n <svg *ngIf=\"isEditView && itemTable?.isEditable\" class=\"svg-15px\" fill=\"#333333\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z\"/></svg>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".asset-param-item{border-radius:5px}.asset-param-item .table-asset-param-wrapper{border-radius:5px;background-color:#f0f8ff}.asset-param-item .table-asset-param-wrapper table{border-collapse:collapse;width:100%}.asset-param-item .table-asset-param-wrapper table tbody tr td{border:1px solid red;height:30px;padding:4px}.asset-param-item .table-asset-param-wrapper table tbody tr td:first-child{width:30%}.asset-param-item .table-asset-param-wrapper table tbody tr td:last-child{width:70%}.color-white{color:#fff}.flex-gap-2{gap:.5rem}.svg-15px{width:15px;height:15px;flex:0 0 15px}\n"] }]
|
21
19
|
}], propDecorators: { isEditView: [{
|
@@ -25,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
25
23
|
}], clickParamTableRow: [{
|
26
24
|
type: Output
|
27
25
|
}] } });
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
26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b3JdPVwiZGF0YT8uYmdDb2xvclwiXG4gICAgICA+XG4gICAgICAgIDx0YWJsZT5cbiAgICAgICAgICA8dGJvZHk+XG4gICAgICAgICAgICA8dHJcbiAgICAgICAgICAgICAgKm5nRm9yPVwibGV0IGl0ZW1UYWJsZSBvZiBkYXRhPy5kYXRhVGFibGVcIlxuICAgICAgICAgICAgICAoY2xpY2spPVwib25DbGlja1Jvd1BhcmFtKGl0ZW1UYWJsZSlcIlxuICAgICAgICAgICAgICBjbGFzcz1cImN1cnNvci1wb2ludGVyXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPHRkXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJmb250LXNpemUtMTNweFwiXG4gICAgICAgICAgICAgICAgW3N0eWxlLmJvcmRlckNvbG9yXT1cImRhdGE/LmJvcmRlclRhYmxlXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHt7IGl0ZW1UYWJsZT8ubmFtZSB9fVxuICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8dGRcbiAgICAgICAgICAgICAgICBjbGFzcz1cImZvbnQtc2l6ZS0xM3B4XCJcbiAgICAgICAgICAgICAgICBbc3R5bGUuYm9yZGVyQ29sb3JdPVwiZGF0YT8uYm9yZGVyVGFibGVcIlxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImQtZmxleCBhbGlnbi1pdGVtcy1jZW50ZXIgZmxleC1nYXAtMlwiPlxuICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cIm1yLWF1dG8gZm9udC1zaXplLTEzcHggZmxleC1ncm93LTFcIlxuICAgICAgICAgICAgICAgICAgICBbc3R5bGUuY29sb3JdPVwiaXRlbVRhYmxlPy5jb2xvclwiXG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHt7IGl0ZW1UYWJsZT8udmFsdWUgfX1cbiAgICA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MjIuMSAxNy45LTQwIDQwLTQwSDIwMGMxMy4zIDAgMjQtMTAuNyAyNC0yNHMtMTAuNy0yNC0yNC0yNEg4OHpcIi8+PC9zdmc+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICA8L3RyPlxuICAgICAgICAgIDwvdGJvZHk+XG4gICAgICAgIDwvdGFibGU+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L25nLXRlbXBsYXRlPlxuIl19
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
2
|
+
import { AtoDefaultGojsEditor } from '../../models/default-gojs-editor.model';
|
3
|
+
import { AtoGojsEditorModel } from '../../models/gojs-editor.model';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "@angular/common";
|
6
|
+
import * as i2 from "../../directive/ato-loading.directive";
|
7
|
+
export class AtoFlowDiagramLibComponent extends AtoDefaultGojsEditor {
|
8
|
+
myDiagramDivTemp;
|
9
|
+
_data = null;
|
10
|
+
set data(v) {
|
11
|
+
this._data = v;
|
12
|
+
this.loadDiagram();
|
13
|
+
}
|
14
|
+
isLoading = false;
|
15
|
+
get data() {
|
16
|
+
return this._data;
|
17
|
+
}
|
18
|
+
constructor(_elRef) {
|
19
|
+
super(_elRef);
|
20
|
+
this.actions = [
|
21
|
+
AtoDefaultGojsEditor.ACTIONS[AtoDefaultGojsEditor.ENUM_ACTIONS.DETAILS],
|
22
|
+
AtoDefaultGojsEditor.ACTIONS[AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE],
|
23
|
+
];
|
24
|
+
this.unsubscribeAll();
|
25
|
+
}
|
26
|
+
ngOnInit() {
|
27
|
+
this.addSubscribes(this.committedTransactionSubject?.subscribe((e) => {
|
28
|
+
this.onModelChangeListenerEvent.emit(e);
|
29
|
+
}));
|
30
|
+
}
|
31
|
+
loadDiagram() {
|
32
|
+
this.editor = new AtoGojsEditorModel({
|
33
|
+
class: 'go.GraphLinksModel',
|
34
|
+
nodeCategoryProperty: 'type',
|
35
|
+
...this.data,
|
36
|
+
});
|
37
|
+
}
|
38
|
+
findNodeForKey(key) {
|
39
|
+
this.myDiagram.select(this.myDiagram.findNodeForKey(key));
|
40
|
+
}
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoFlowDiagramLibComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: AtoFlowDiagramLibComponent, selector: "ato-flow-diagram-lib", inputs: { data: "data", isLoading: "isLoading" }, viewQueries: [{ propertyName: "myDiagramDivTemp", first: true, predicate: ["myDiagramDivTemp"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp class=\"flex-grow-1 {{myDiagramDiv}}\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.AtoLoadingDirective, selector: "[atoLoading]", inputs: ["appLoading"] }] });
|
43
|
+
}
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoFlowDiagramLibComponent, decorators: [{
|
45
|
+
type: Component,
|
46
|
+
args: [{ selector: 'ato-flow-diagram-lib', template: "<div class=\"w-100 h-100 gj-flow-diagram-wrapper\" atoLoading [appLoading]=\"data === null || !!isLoading\">\n <div class=\"w-100 h-100 d-flex\">\n <!-- <button\n id=\"actionMenuId\"\n class=\"invisible-btn\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n #menuTrigger=\"matMenuTrigger\"\n ></button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let item of actions\" (click)=\"item?.onClick($event)\">\n <div class=\"d-flex flex-gap-2\">\n <div><i class=\"{{ item?.iconClassName }}\"></i></div>\n <div>{{ item?.name }}</div>\n </div>\n </button>\n </mat-menu> -->\n\n <div #myDiagramDivTemp class=\"flex-grow-1 {{myDiagramDiv}}\"></div>\n <div *ngIf=\"initialOptions?.isReadOnly && !data?.nodeDataArray?.length\" class=\"empty-data\">\n <!-- <nz-empty nzNotFoundImage=\"simple\"></nz-empty> -->\n No Data\n </div>\n </div>\n</div>\n" }]
|
47
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { myDiagramDivTemp: [{
|
48
|
+
type: ViewChild,
|
49
|
+
args: ['myDiagramDivTemp']
|
50
|
+
}], data: [{
|
51
|
+
type: Input
|
52
|
+
}], isLoading: [{
|
53
|
+
type: Input
|
54
|
+
}] } });
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxvdy1kaWFncmFtLWxpYi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hdG8td2F0ZXItb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AgLi4udGhpcy5kYXRhLFxuICAgICAgfSk7XG4gIH1cblxuICBmaW5kTm9kZUZvcktleShrZXk6IG51bWJlciB8IHN0cmluZykge1xuICAgICAgdGhpcy5teURpYWdyYW0uc2VsZWN0KHRoaXMubXlEaWFncmFtLmZpbmROb2RlRm9yS2V5KGtleSkpO1xuICB9XG59XG5cblxuXG5cblxuIiwiPGRpdiBjbGFzcz1cInctMTAwIGgtMTAwIGdqLWZsb3ctZGlhZ3JhbS13cmFwcGVyXCIgYXRvTG9hZGluZyBbYXBwTG9hZGluZ109XCJkYXRhID09PSBudWxsIHx8ICEhaXNMb2FkaW5nXCI+XG4gICAgPGRpdiBjbGFzcz1cInctMTAwIGgtMTAwIGQtZmxleFwiPlxuICAgICAgICA8IS0tIDxidXR0b25cbiAgICAgICAgICAgIGlkPVwiYWN0aW9uTWVudUlkXCJcbiAgICAgICAgICAgIGNsYXNzPVwiaW52aXNpYmxlLWJ0blwiXG4gICAgICAgICAgICBtYXQtYnV0dG9uXG4gICAgICAgICAgICBbbWF0TWVudVRyaWdnZXJGb3JdPVwibWVudVwiXG4gICAgICAgICAgICAjbWVudVRyaWdnZXI9XCJtYXRNZW51VHJpZ2dlclwiXG4gICAgICAgID48L2J1dHRvbj5cbiAgICAgICAgPG1hdC1tZW51ICNtZW51PVwibWF0TWVudVwiPlxuICAgICAgICAgICAgPGJ1dHRvbiBtYXQtbWVudS1pdGVtICpuZ0Zvcj1cImxldCBpdGVtIG9mIGFjdGlvbnNcIiAoY2xpY2spPVwiaXRlbT8ub25DbGljaygkZXZlbnQpXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImQtZmxleCBmbGV4LWdhcC0yXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+PGkgY2xhc3M9XCJ7eyBpdGVtPy5pY29uQ2xhc3NOYW1lIH19XCI+PC9pPjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pnt7IGl0ZW0/Lm5hbWUgfX08L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICA8L21hdC1tZW51PiAtLT5cblxuICAgICAgICA8ZGl2ICNteURpYWdyYW1EaXZUZW1wIGNsYXNzPVwiZmxleC1ncm93LTEge3tteURpYWdyYW1EaXZ9fVwiPjwvZGl2PlxuICAgICAgICA8ZGl2ICpuZ0lmPVwiaW5pdGlhbE9wdGlvbnM/LmlzUmVhZE9ubHkgJiYgIWRhdGE/Lm5vZGVEYXRhQXJyYXk/Lmxlbmd0aFwiIGNsYXNzPVwiZW1wdHktZGF0YVwiPlxuICAgICAgICAgICAgPCEtLSA8bnotZW1wdHkgbnpOb3RGb3VuZEltYWdlPVwic2ltcGxlXCI+PC9uei1lbXB0eT4gLS0+XG4gICAgICAgICAgICBObyBEYXRhXG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class AtoLoadingDirective {
|
4
|
+
el;
|
5
|
+
renderer;
|
6
|
+
appLoading;
|
7
|
+
spinnerWrapper;
|
8
|
+
constructor(el, renderer) {
|
9
|
+
this.el = el;
|
10
|
+
this.renderer = renderer;
|
11
|
+
this.spinnerWrapper = this.renderer.createElement('div');
|
12
|
+
this.renderer.setStyle(this.spinnerWrapper, 'position', 'absolute');
|
13
|
+
this.renderer.setStyle(this.spinnerWrapper, 'top', '0');
|
14
|
+
this.renderer.setStyle(this.spinnerWrapper, 'left', '0');
|
15
|
+
this.renderer.setStyle(this.spinnerWrapper, 'width', '100%');
|
16
|
+
this.renderer.setStyle(this.spinnerWrapper, 'height', '100%');
|
17
|
+
this.renderer.setStyle(this.spinnerWrapper, 'display', 'flex');
|
18
|
+
this.renderer.setStyle(this.spinnerWrapper, 'align-items', 'center');
|
19
|
+
this.renderer.setStyle(this.spinnerWrapper, 'justify-content', 'center');
|
20
|
+
this.renderer.setStyle(this.spinnerWrapper, 'background', 'rgba(255, 255, 255, 0.7)');
|
21
|
+
this.renderer.setStyle(this.spinnerWrapper, 'z-index', '10');
|
22
|
+
const spinner = this.renderer.createElement('img');
|
23
|
+
this.renderer.setAttribute(spinner, 'src', 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ibWFyZ2luOiBhdXRvOyBiYWNrZ3JvdW5kOiByZ2IoMjU1LCAyNTUsIDI1NSk7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IGFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyIgd2lkdGg9Ijg4cHgiIGhlaWdodD0iODhweCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KPGRlZnMgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+CiAgPG1hc2sgaWQ9ImxkaW8tdmN5YjQ1YmFvdWstbWFzayIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+CiAgICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0id2hpdGUiIHN0eWxlPSJhbmltYXRpb24tcGxheS1zdGF0ZTogcnVubmluZzsgYW5pbWF0aW9uLWRlbGF5OiAwczsiPjwvcmVjdD4KICA8L21hc2s+CjwvZGVmcz4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');
|
27
|
+
this.renderer.appendChild(this.spinnerWrapper, spinner);
|
28
|
+
}
|
29
|
+
ngOnChanges(changes) {
|
30
|
+
if (changes['appLoading']) {
|
31
|
+
if (this.appLoading) {
|
32
|
+
this.showSpinner();
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
this.hideSpinner();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
showSpinner() {
|
40
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
41
|
+
this.renderer.appendChild(this.el.nativeElement, this.spinnerWrapper);
|
42
|
+
}
|
43
|
+
hideSpinner() {
|
44
|
+
if (this.el.nativeElement.contains(this.spinnerWrapper)) {
|
45
|
+
this.renderer.removeChild(this.el.nativeElement, this.spinnerWrapper);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoLoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
49
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: { appLoading: "appLoading" }, usesOnChanges: true, ngImport: i0 });
|
50
|
+
}
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoLoadingDirective, decorators: [{
|
52
|
+
type: Directive,
|
53
|
+
args: [{
|
54
|
+
selector: '[atoLoading]'
|
55
|
+
}]
|
56
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { appLoading: [{
|
57
|
+
type: Input
|
58
|
+
}] } });
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvLWxvYWRpbmcuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsi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0aGlzLmVsLm5hdGl2ZUVsZW1lbnQsIHRoaXMuc3Bpbm5lcldyYXBwZXIpO1xuICB9XG5cbiAgcHJpdmF0ZSBoaWRlU3Bpbm5lcigpOiB2b2lkIHtcbiAgICBpZiAodGhpcy5lbC5uYXRpdmVFbGVtZW50LmNvbnRhaW5zKHRoaXMuc3Bpbm5lcldyYXBwZXIpKSB7XG4gICAgICB0aGlzLnJlbmRlcmVyLnJlbW92ZUNoaWxkKHRoaXMuZWwubmF0aXZlRWxlbWVudCwgdGhpcy5zcGlubmVyV3JhcHBlcik7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ==
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class AtoNgVarDirective {
|
4
|
+
templateRef;
|
5
|
+
vcRef;
|
6
|
+
set ngAtoVar(context) {
|
7
|
+
this.context.$implicit = this.context.ngAtoVar = context;
|
8
|
+
if (!this.hasView) {
|
9
|
+
this.vcRef.createEmbeddedView(this.templateRef, this.context);
|
10
|
+
this.hasView = true;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
context = {
|
14
|
+
$implicit: null,
|
15
|
+
ngAtoVar: null,
|
16
|
+
};
|
17
|
+
hasView = false;
|
18
|
+
constructor(templateRef, vcRef) {
|
19
|
+
this.templateRef = templateRef;
|
20
|
+
this.vcRef = vcRef;
|
21
|
+
}
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoNgVarDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
23
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: AtoNgVarDirective, selector: "[ngAtoVar]", inputs: { ngAtoVar: "ngAtoVar" }, ngImport: i0 });
|
24
|
+
}
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AtoNgVarDirective, decorators: [{
|
26
|
+
type: Directive,
|
27
|
+
args: [{
|
28
|
+
selector: '[ngAtoVar]',
|
29
|
+
}]
|
30
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { ngAtoVar: [{
|
31
|
+
type: Input
|
32
|
+
}] } });
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctdmFyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2F0by13YXRlci1saWIvc3JjL2xpYi9kaXJlY3RpdmUvbmctdmFyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBaUMsTUFBTSxlQUFlLENBQUM7O0FBS2hGLE1BQU0sT0FBTyxpQkFBaUI7SUFxQlI7SUFBdUM7SUFwQjNELElBQ0ksUUFBUSxDQUFDLE9BQWdCO1FBQ3pCLElBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQztRQUV6RCxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1lBQ2hCLElBQUksQ0FBQyxLQUFLLENBQUMsa0JBQWtCLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7WUFDOUQsSUFBSSxDQUFDLE9BQU8sR0FBRyxJQUFJLENBQUM7UUFDeEIsQ0FBQztJQUNMLENBQUM7SUFFTyxPQUFPLEdBR1g7UUFDQSxTQUFTLEVBQUUsSUFBSTtRQUNmLFFBQVEsRUFBRSxJQUFJO0tBQ2pCLENBQUM7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