@provoly/dashboard 0.12.3 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/svgs/datasource.svg +4 -0
- package/assets/svgs/datasources.svg +4 -0
- package/assets/svgs/loader.svg +13 -0
- package/dataset/style/_o-pry-dataset-detail.scss +11 -2
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/lib/core/components/upload/upload.component.mjs +1 -1
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +3 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +19 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +4 -2
- package/esm2022/pipeline/components/pipeline-list/pipeline-list.component.mjs +1 -7
- package/esm2022/pipeline/factory/pipeline-component-factory.service.mjs +5 -5
- package/esm2022/pipeline-components/filter/filter.module.mjs +2 -2
- package/esm2022/pipeline-components/filter/node-class/filter-node.class.mjs +2 -2
- package/esm2022/pipeline-components/input-datasource/input-datasource.module.mjs +2 -2
- package/esm2022/pipeline-components/input-datasource/node-class/input-datasourse-node.class.mjs +2 -2
- package/esm2022/pipeline-components/noop/noop.module.mjs +2 -2
- package/esm2022/pipeline-components/output-dataset/output-dataset.module.mjs +2 -2
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-dataset.mjs +2 -2
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-filter.mjs +2 -2
- package/fesm2022/provoly-dashboard-pipeline-components-filter.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-input-datasource.mjs +2 -2
- package/fesm2022/provoly-dashboard-pipeline-components-input-datasource.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-noop.mjs +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-noop.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-output-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-pipeline-components-output-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-pipeline.mjs +5 -11
- package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +2 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +32 -8
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/dashboard/components/dashboard.component.d.ts +1 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +3 -2
- package/lib/dashboard/store/dashboard.effects.d.ts +1 -0
- package/lib/dashboard/store/dashboard.reducers.d.ts +1 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +16 -0
- package/package.json +42 -38
- package/pipeline/components/pipeline-list/pipeline-list.component.d.ts +1 -2
- package/pipeline/factory/pipeline-component-factory.service.d.ts +1 -2
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +202 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/index.spec.d.ts +1 -0
- package/schematics/ng-add/index.spec.js +42 -0
- package/schematics/ng-add/index.spec.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +10 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +62 -0
- package/schematics/utils/file-contents.function.d.ts +2 -0
- package/schematics/utils/file-contents.function.js +12 -0
- package/schematics/utils/file-contents.function.js.map +1 -0
- package/schematics/utils/package-json.interface.d.ts +6 -0
- package/schematics/utils/package-json.interface.js +3 -0
- package/schematics/utils/package-json.interface.js.map +1 -0
- package/styles-theme/components-theme/_o-dashboard.theme.scss +12 -0
- package/styles-theme/main-theme.scss +1 -0
|
@@ -26,6 +26,7 @@ export declare class DashboardComponent extends SubscriptionnerDirective impleme
|
|
|
26
26
|
separators$: Observable<WidgetLayout[]>;
|
|
27
27
|
nonFillerWidgets$: Observable<number>;
|
|
28
28
|
widgetsInstances: Array<BaseWidgetComponent>;
|
|
29
|
+
loading$: Observable<boolean>;
|
|
29
30
|
set staticDashboard(window: DashboardManifest);
|
|
30
31
|
CloseOnDragOut: boolean;
|
|
31
32
|
gridRef: ElementRef;
|
|
@@ -208,11 +208,12 @@ export declare const DashboardActions: {
|
|
|
208
208
|
}) => {
|
|
209
209
|
manifests: ManifestDescription[];
|
|
210
210
|
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) received manifests list">>;
|
|
211
|
-
fetchStaticManifest: import("@ngrx/store").ActionCreator<"[Dashboard] fetching staticManifest", (props: {
|
|
211
|
+
fetchStaticManifest: import("@ngrx/store").ActionCreator<"[Dashboard] (bus) fetching staticManifest", (props: {
|
|
212
212
|
id: string;
|
|
213
213
|
}) => {
|
|
214
214
|
id: string;
|
|
215
|
-
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] fetching staticManifest">>;
|
|
215
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) fetching staticManifest">>;
|
|
216
|
+
endLoading: import("@ngrx/store").ActionCreator<"[Dashboard] end loading", () => import("@ngrx/store/src/models").TypedAction<"[Dashboard] end loading">>;
|
|
216
217
|
updateStaticManifest: import("@ngrx/store").ActionCreator<"[Dashboard] (bus) received staticManifest", (props: {
|
|
217
218
|
staticManifest: GlobalManifest;
|
|
218
219
|
}) => {
|
|
@@ -53,6 +53,7 @@ export declare class DashboardEffects {
|
|
|
53
53
|
fetchStaticManifest$: import("rxjs").Observable<{
|
|
54
54
|
staticManifest: GlobalManifest;
|
|
55
55
|
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) received staticManifest">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
56
|
+
fetchStaticManifestLoading$: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[Dashboard] end loading">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
56
57
|
loadAndActivateManifest$: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) follow manifest route"> | ({
|
|
57
58
|
tenants?: string[] | undefined;
|
|
58
59
|
manifest: GlobalManifest;
|
|
@@ -15,6 +15,7 @@ export declare const DashboardSelectors: {
|
|
|
15
15
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
16
16
|
currentId: string;
|
|
17
17
|
staticManifest: GlobalManifest;
|
|
18
|
+
loading: boolean;
|
|
18
19
|
}) => number>;
|
|
19
20
|
currentManifestId: MemoizedSelector<object, string, (s1: {
|
|
20
21
|
sender: string;
|
|
@@ -23,6 +24,7 @@ export declare const DashboardSelectors: {
|
|
|
23
24
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
24
25
|
currentId: string;
|
|
25
26
|
staticManifest: GlobalManifest;
|
|
27
|
+
loading: boolean;
|
|
26
28
|
}) => string>;
|
|
27
29
|
globalManifest: MemoizedSelector<object, {
|
|
28
30
|
windows: DashboardManifest[];
|
|
@@ -38,6 +40,7 @@ export declare const DashboardSelectors: {
|
|
|
38
40
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
39
41
|
currentId: string;
|
|
40
42
|
staticManifest: GlobalManifest;
|
|
43
|
+
loading: boolean;
|
|
41
44
|
}) => {
|
|
42
45
|
windows: DashboardManifest[];
|
|
43
46
|
refreshRates?: {
|
|
@@ -82,6 +85,7 @@ export declare const DashboardSelectors: {
|
|
|
82
85
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
83
86
|
currentId: string;
|
|
84
87
|
staticManifest: GlobalManifest;
|
|
88
|
+
loading: boolean;
|
|
85
89
|
}) => import("../../core/model/manifest.interface").ManifestDescription[]>;
|
|
86
90
|
gridLayout: MemoizedSelector<object, DashboardGridLayout, (s1: DashboardManifest) => DashboardGridLayout>;
|
|
87
91
|
tenants: MemoizedSelector<object, string[], (s1: {
|
|
@@ -91,6 +95,7 @@ export declare const DashboardSelectors: {
|
|
|
91
95
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
92
96
|
currentId: string;
|
|
93
97
|
staticManifest: GlobalManifest;
|
|
98
|
+
loading: boolean;
|
|
94
99
|
}) => string[]>;
|
|
95
100
|
resultSets: MemoizedSelector<object, ResultSets, (s1: {
|
|
96
101
|
resultSets: ResultSets;
|
|
@@ -290,6 +295,7 @@ export declare const DashboardSelectors: {
|
|
|
290
295
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
291
296
|
currentId: string;
|
|
292
297
|
staticManifest: GlobalManifest;
|
|
298
|
+
loading: boolean;
|
|
293
299
|
}, s2: number) => number[]>;
|
|
294
300
|
dashboard: MemoizedSelector<object, {
|
|
295
301
|
params: DashboardCellParams;
|
|
@@ -320,6 +326,7 @@ export declare const DashboardSelectors: {
|
|
|
320
326
|
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
321
327
|
currentId: string;
|
|
322
328
|
staticManifest: GlobalManifest;
|
|
329
|
+
loading: boolean;
|
|
323
330
|
}) => {
|
|
324
331
|
windows: DashboardManifest[];
|
|
325
332
|
refreshRates?: {
|
|
@@ -328,6 +335,15 @@ export declare const DashboardSelectors: {
|
|
|
328
335
|
locked?: boolean | undefined;
|
|
329
336
|
filters?: Filter[] | undefined;
|
|
330
337
|
}>;
|
|
338
|
+
loading: MemoizedSelector<object, boolean, (s1: {
|
|
339
|
+
sender: string;
|
|
340
|
+
tenants: string[];
|
|
341
|
+
manifest: GlobalManifest;
|
|
342
|
+
list: import("../../core/model/manifest.interface").ManifestDescription[];
|
|
343
|
+
currentId: string;
|
|
344
|
+
staticManifest: GlobalManifest;
|
|
345
|
+
loading: boolean;
|
|
346
|
+
}) => boolean>;
|
|
331
347
|
quickOrder: MemoizedSelector<object, {
|
|
332
348
|
[id: string]: ResultOrder | undefined;
|
|
333
349
|
}, (s1: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provoly/dashboard",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "0.12.5",
|
|
4
|
+
"type": "commonjs",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "15.x || 16.x",
|
|
7
7
|
"@angular/cdk": "14.x || 15.x || 16.x",
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
"esm": "./esm2022/admin/provoly-dashboard-admin.mjs",
|
|
44
44
|
"default": "./fesm2022/provoly-dashboard-admin.mjs"
|
|
45
45
|
},
|
|
46
|
-
"./dataset": {
|
|
47
|
-
"types": "./dataset/index.d.ts",
|
|
48
|
-
"esm2022": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
49
|
-
"esm": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
50
|
-
"default": "./fesm2022/provoly-dashboard-dataset.mjs"
|
|
51
|
-
},
|
|
52
46
|
"./import": {
|
|
53
47
|
"types": "./import/index.d.ts",
|
|
54
48
|
"esm2022": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
55
49
|
"esm": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
56
50
|
"default": "./fesm2022/provoly-dashboard-import.mjs"
|
|
57
51
|
},
|
|
52
|
+
"./dataset": {
|
|
53
|
+
"types": "./dataset/index.d.ts",
|
|
54
|
+
"esm2022": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
55
|
+
"esm": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
56
|
+
"default": "./fesm2022/provoly-dashboard-dataset.mjs"
|
|
57
|
+
},
|
|
58
58
|
"./notification": {
|
|
59
59
|
"types": "./notification/index.d.ts",
|
|
60
60
|
"esm2022": "./esm2022/notification/provoly-dashboard-notification.mjs",
|
|
@@ -97,30 +97,6 @@
|
|
|
97
97
|
"esm": "./esm2022/toolbox/provoly-dashboard-toolbox.mjs",
|
|
98
98
|
"default": "./fesm2022/provoly-dashboard-toolbox.mjs"
|
|
99
99
|
},
|
|
100
|
-
"./filters/date": {
|
|
101
|
-
"types": "./filters/date/index.d.ts",
|
|
102
|
-
"esm2022": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
|
|
103
|
-
"esm": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
|
|
104
|
-
"default": "./fesm2022/provoly-dashboard-filters-date.mjs"
|
|
105
|
-
},
|
|
106
|
-
"./filters/list": {
|
|
107
|
-
"types": "./filters/list/index.d.ts",
|
|
108
|
-
"esm2022": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
|
|
109
|
-
"esm": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
|
|
110
|
-
"default": "./fesm2022/provoly-dashboard-filters-list.mjs"
|
|
111
|
-
},
|
|
112
|
-
"./filters/number": {
|
|
113
|
-
"types": "./filters/number/index.d.ts",
|
|
114
|
-
"esm2022": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
|
|
115
|
-
"esm": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
|
|
116
|
-
"default": "./fesm2022/provoly-dashboard-filters-number.mjs"
|
|
117
|
-
},
|
|
118
|
-
"./filters/text": {
|
|
119
|
-
"types": "./filters/text/index.d.ts",
|
|
120
|
-
"esm2022": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
|
|
121
|
-
"esm": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
|
|
122
|
-
"default": "./fesm2022/provoly-dashboard-filters-text.mjs"
|
|
123
|
-
},
|
|
124
100
|
"./components/card": {
|
|
125
101
|
"types": "./components/card/index.d.ts",
|
|
126
102
|
"esm2022": "./esm2022/components/card/provoly-dashboard-components-card.mjs",
|
|
@@ -157,6 +133,30 @@
|
|
|
157
133
|
"esm": "./esm2022/components/stepper/provoly-dashboard-components-stepper.mjs",
|
|
158
134
|
"default": "./fesm2022/provoly-dashboard-components-stepper.mjs"
|
|
159
135
|
},
|
|
136
|
+
"./filters/date": {
|
|
137
|
+
"types": "./filters/date/index.d.ts",
|
|
138
|
+
"esm2022": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
|
|
139
|
+
"esm": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
|
|
140
|
+
"default": "./fesm2022/provoly-dashboard-filters-date.mjs"
|
|
141
|
+
},
|
|
142
|
+
"./filters/list": {
|
|
143
|
+
"types": "./filters/list/index.d.ts",
|
|
144
|
+
"esm2022": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
|
|
145
|
+
"esm": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
|
|
146
|
+
"default": "./fesm2022/provoly-dashboard-filters-list.mjs"
|
|
147
|
+
},
|
|
148
|
+
"./filters/number": {
|
|
149
|
+
"types": "./filters/number/index.d.ts",
|
|
150
|
+
"esm2022": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
|
|
151
|
+
"esm": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
|
|
152
|
+
"default": "./fesm2022/provoly-dashboard-filters-number.mjs"
|
|
153
|
+
},
|
|
154
|
+
"./filters/text": {
|
|
155
|
+
"types": "./filters/text/index.d.ts",
|
|
156
|
+
"esm2022": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
|
|
157
|
+
"esm": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
|
|
158
|
+
"default": "./fesm2022/provoly-dashboard-filters-text.mjs"
|
|
159
|
+
},
|
|
160
160
|
"./pipeline-components/filter": {
|
|
161
161
|
"types": "./pipeline-components/filter/index.d.ts",
|
|
162
162
|
"esm2022": "./esm2022/pipeline-components/filter/provoly-dashboard-pipeline-components-filter.mjs",
|
|
@@ -187,18 +187,18 @@
|
|
|
187
187
|
"esm": "./esm2022/pipeline-components/subgraph/provoly-dashboard-pipeline-components-subgraph.mjs",
|
|
188
188
|
"default": "./fesm2022/provoly-dashboard-pipeline-components-subgraph.mjs"
|
|
189
189
|
},
|
|
190
|
-
"./tooltips/attribute": {
|
|
191
|
-
"types": "./tooltips/attribute/index.d.ts",
|
|
192
|
-
"esm2022": "./esm2022/tooltips/attribute/provoly-dashboard-tooltips-attribute.mjs",
|
|
193
|
-
"esm": "./esm2022/tooltips/attribute/provoly-dashboard-tooltips-attribute.mjs",
|
|
194
|
-
"default": "./fesm2022/provoly-dashboard-tooltips-attribute.mjs"
|
|
195
|
-
},
|
|
196
190
|
"./tooltips/cluster": {
|
|
197
191
|
"types": "./tooltips/cluster/index.d.ts",
|
|
198
192
|
"esm2022": "./esm2022/tooltips/cluster/provoly-dashboard-tooltips-cluster.mjs",
|
|
199
193
|
"esm": "./esm2022/tooltips/cluster/provoly-dashboard-tooltips-cluster.mjs",
|
|
200
194
|
"default": "./fesm2022/provoly-dashboard-tooltips-cluster.mjs"
|
|
201
195
|
},
|
|
196
|
+
"./tooltips/attribute": {
|
|
197
|
+
"types": "./tooltips/attribute/index.d.ts",
|
|
198
|
+
"esm2022": "./esm2022/tooltips/attribute/provoly-dashboard-tooltips-attribute.mjs",
|
|
199
|
+
"esm": "./esm2022/tooltips/attribute/provoly-dashboard-tooltips-attribute.mjs",
|
|
200
|
+
"default": "./fesm2022/provoly-dashboard-tooltips-attribute.mjs"
|
|
201
|
+
},
|
|
202
202
|
"./widgets/widget-aggregated-chart": {
|
|
203
203
|
"types": "./widgets/widget-aggregated-chart/index.d.ts",
|
|
204
204
|
"esm2022": "./esm2022/widgets/widget-aggregated-chart/provoly-dashboard-widgets-widget-aggregated-chart.mjs",
|
|
@@ -260,6 +260,10 @@
|
|
|
260
260
|
"default": "./fesm2022/provoly-dashboard-widgets-widget-tile.mjs"
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
|
+
"schematics": "./schematics/collection.json",
|
|
264
|
+
"ng-add": {
|
|
265
|
+
"save": true
|
|
266
|
+
},
|
|
263
267
|
"module": "fesm2022/provoly-dashboard.mjs",
|
|
264
268
|
"typings": "index.d.ts",
|
|
265
269
|
"sideEffects": false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import { ElementRef, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { Store } from '@ngrx/store';
|
|
4
4
|
import { ViewMode } from '@provoly/dashboard';
|
|
@@ -26,7 +26,6 @@ export declare class PryPipelineListComponent {
|
|
|
26
26
|
ViewMode: typeof ViewMode;
|
|
27
27
|
private confirmExecutionRef?;
|
|
28
28
|
constructor(store: Store, overlay: Overlay, viewContainerRef: ViewContainerRef);
|
|
29
|
-
readonly connectedPosition: ConnectedPosition;
|
|
30
29
|
toggleMoreDropdown($event: any, index: number, transfo: PryTransfo): void;
|
|
31
30
|
closeDropdown(): void;
|
|
32
31
|
toggleState(selectedTransfo: PryTransfo): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
3
|
import { PipelinePropertiesPanelComponent } from '../components/pipeline-properties-panel.component';
|
|
4
4
|
import { BaseNode } from '../node-class/base-node.class';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare const PIPELINE_COMPONENT_MODULES: InjectionToken<string>;
|
|
7
6
|
export interface PipelineComponentDefinition {
|
|
8
7
|
type: string;
|
|
9
8
|
label: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Add @provoly/dashboard to the project.",
|
|
6
|
+
"factory": "./ng-add/index",
|
|
7
|
+
"schema": "./ng-add/schema.json"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
14
|
+
const utility_1 = require("@schematics/angular/utility");
|
|
15
|
+
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
16
|
+
const file_contents_function_1 = require("../utils/file-contents.function");
|
|
17
|
+
function projectSetup(options) {
|
|
18
|
+
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
context.logger.info('Adding @provoly/dashboard to project');
|
|
20
|
+
addDependencies(tree, options);
|
|
21
|
+
context.logger.info('Plan node install');
|
|
22
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
23
|
+
return addProvolyForRoot(options, context, tree);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.default = projectSetup;
|
|
27
|
+
function addDependencies(tree, options) {
|
|
28
|
+
console.log('Adding provoly dependencies');
|
|
29
|
+
const packageJson = JSON.parse((0, file_contents_function_1.getFileContent)(tree, '/package.json'));
|
|
30
|
+
const dependencies = [
|
|
31
|
+
{ type: dependencies_1.NodeDependencyType.Default, version: packageJson.version, name: '@provoly/dashboard' },
|
|
32
|
+
{ type: dependencies_1.NodeDependencyType.Default, version: '^9.0.0', name: 'uuid' },
|
|
33
|
+
{ type: dependencies_1.NodeDependencyType.Default, version: '^3.1.3', name: 'fast-deep-equal' },
|
|
34
|
+
{ type: dependencies_1.NodeDependencyType.Default, version: '^1.2.3', name: 'css-element-queries' },
|
|
35
|
+
{ type: dependencies_1.NodeDependencyType.Default, version: '^6.0.0', name: 'buffer' },
|
|
36
|
+
{ type: dependencies_1.NodeDependencyType.Dev, version: '^9.0.0', name: '@types/uuid' }
|
|
37
|
+
];
|
|
38
|
+
if (options.widgets.includes('widget-map')) {
|
|
39
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^7.0.0', name: 'ol' });
|
|
40
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^4.1.0', name: 'ol-layerswitcher' });
|
|
41
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^10.6.0', name: 'ol-mapbox-style' });
|
|
42
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^10.6.0', name: 'ol-mapbox-style' });
|
|
43
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^2.9.0', name: 'proj4' });
|
|
44
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^4.0.2', name: 'shpjs' });
|
|
45
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^0.0.1', name: 'geojson-to-kml' });
|
|
46
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^3.7.1', name: 'jszip' });
|
|
47
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^6.5.3', name: '@types/ol' });
|
|
48
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^2.5.2', name: '@types/proj4' });
|
|
49
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^3.4.1', name: '@types/shpjs' });
|
|
50
|
+
}
|
|
51
|
+
if (options.widgets.includes('widget-aggregated-chart')) {
|
|
52
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^5.21.0', name: 'vega' });
|
|
53
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^6.20.5', name: 'vega-embed' });
|
|
54
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^5.2.0', name: 'vega-lite' });
|
|
55
|
+
}
|
|
56
|
+
if (options.widgets.includes('widget-graph')) {
|
|
57
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^3.0.0', name: 'd3-drag' });
|
|
58
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^3.0.0', name: 'd3-force' });
|
|
59
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^3.0.0', name: 'd3-selection' });
|
|
60
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^3.0.1', name: '@types/d3-dispatch' });
|
|
61
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^3.0.1', name: '@types/d3-drag' });
|
|
62
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^3.0.3', name: '@types/d3-force' });
|
|
63
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^3.0.0', name: '@types/d3-timer' });
|
|
64
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Dev, version: '^0.7.47', name: '@types/dagre' });
|
|
65
|
+
}
|
|
66
|
+
if (options.pipeline) {
|
|
67
|
+
dependencies.push({ type: dependencies_1.NodeDependencyType.Default, version: '^0.7.10', name: 'litegraph.js' });
|
|
68
|
+
}
|
|
69
|
+
dependencies.forEach((d) => {
|
|
70
|
+
(0, dependencies_1.addPackageJsonDependency)(tree, d);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function widgetImports(options, context, external) {
|
|
74
|
+
context.logger.info('...Building widgets imports');
|
|
75
|
+
const definitions = [
|
|
76
|
+
{
|
|
77
|
+
name: 'widget-aggregated-chart',
|
|
78
|
+
path: '@provoly/dashboard/widgets/widget-aggregated-chart',
|
|
79
|
+
moduleName: 'WidgetAggregatedChartModule',
|
|
80
|
+
type: 'chart'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'widget-detail',
|
|
84
|
+
path: '@provoly/dashboard/widgets/widget-detail',
|
|
85
|
+
moduleName: 'WidgetDetailModule',
|
|
86
|
+
type: 'detail'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'widget-graph',
|
|
90
|
+
path: '@provoly/dashboard/widgets/widget-graph',
|
|
91
|
+
moduleName: 'WidgetGraphModule',
|
|
92
|
+
type: 'graph'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'widget-iframe',
|
|
96
|
+
path: '@provoly/dashboard/widgets/widget-iframe',
|
|
97
|
+
moduleName: 'WidgetIframeModule',
|
|
98
|
+
type: 'iframe'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'widget-image',
|
|
102
|
+
path: '@provoly/dashboard/widgets/widget-image',
|
|
103
|
+
moduleName: 'WidgetImageModule',
|
|
104
|
+
type: 'image'
|
|
105
|
+
},
|
|
106
|
+
{ name: 'widget-map', path: '@provoly/dashboard/widgets/widget-map', moduleName: 'WidgetMapModule', type: 'map' },
|
|
107
|
+
{
|
|
108
|
+
name: 'widget-table',
|
|
109
|
+
path: '@provoly/dashboard/widgets/widget-table',
|
|
110
|
+
moduleName: 'WidgetTableModule',
|
|
111
|
+
type: 'table'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'widget-template',
|
|
115
|
+
path: '@provoly/dashboard/widgets/widget-template',
|
|
116
|
+
moduleName: 'WidgetTemplateModule',
|
|
117
|
+
type: 'template'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'widget-tile',
|
|
121
|
+
path: '@provoly/dashboard/widgets/widget-tile',
|
|
122
|
+
moduleName: 'WidgetTileModule',
|
|
123
|
+
type: 'tile'
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
let imports = [];
|
|
127
|
+
definitions.forEach((definition) => {
|
|
128
|
+
if (options.widgets.includes(definition.name)) {
|
|
129
|
+
imports.push(definition.type +
|
|
130
|
+
':' +
|
|
131
|
+
`{ name: '${definition.type}', load: () => import('${definition.path}').then((module) => ${external('widgetLoader', '@provoly/dashboard')}(module, '${definition.moduleName}')) }`);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return '{' + imports.join(',') + '}';
|
|
135
|
+
}
|
|
136
|
+
function provolyUrls(options, context) {
|
|
137
|
+
context.logger.info('...Building url options');
|
|
138
|
+
const urlOptions = {};
|
|
139
|
+
['pryUrl', 'path', 'mapUrl', 'wsUrl', 'geoServerUrl'].forEach((option) => {
|
|
140
|
+
var _a;
|
|
141
|
+
if (options[option]) {
|
|
142
|
+
urlOptions[option] = (_a = options[option]) !== null && _a !== void 0 ? _a : '';
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
return JSON.stringify(urlOptions);
|
|
146
|
+
}
|
|
147
|
+
function addProvolyForRoot(options, context, tree) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
context.logger.info('Adding provoly module import');
|
|
150
|
+
const pryImportModule = 'PryDashboardModule';
|
|
151
|
+
try {
|
|
152
|
+
const modulePath = 'src/app/app.module.ts';
|
|
153
|
+
if (!tree.exists(modulePath)) {
|
|
154
|
+
throw new schematics_1.SchematicsException(`Module file ${modulePath} doesn't exist.`);
|
|
155
|
+
}
|
|
156
|
+
const recorder = tree.beginUpdate(modulePath);
|
|
157
|
+
tree.commitUpdate(recorder);
|
|
158
|
+
// Add an import `MyLibModule` from `provoly/dashboard` to the root of the user's project.
|
|
159
|
+
return (0, utility_1.addRootImport)(options.projectName, ({ code, external }) => code `${external(pryImportModule, '@provoly/dashboard')}.forRoot(
|
|
160
|
+
${widgetImports(options, context, external)},
|
|
161
|
+
${provolyUrls(options, context)},
|
|
162
|
+
{
|
|
163
|
+
attribute: {
|
|
164
|
+
name: 'attribute',
|
|
165
|
+
load: () =>
|
|
166
|
+
import('@provoly/dashboard/tooltips/attribute').then((module) =>
|
|
167
|
+
${external('tooltipLoader', '@provoly/dashboard')}(module, 'PryAttributeTooltipModule')
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
text: {
|
|
173
|
+
name: 'text',
|
|
174
|
+
load: () =>
|
|
175
|
+
import('@provoly/dashboard/filters/text').then((module) => ${external('filterLoader', '@provoly/dashboard')}(module, 'PryTextFilterModule'))
|
|
176
|
+
},
|
|
177
|
+
date: {
|
|
178
|
+
name: 'date',
|
|
179
|
+
load: () =>
|
|
180
|
+
import('@provoly/dashboard/filters/date').then((module) => ${external('filterLoader', '@provoly/dashboard')}(module, 'PryDateFilterModule'))
|
|
181
|
+
},
|
|
182
|
+
list: {
|
|
183
|
+
name: 'list',
|
|
184
|
+
load: () =>
|
|
185
|
+
import('@provoly/dashboard/filters/list').then((module) => ${external('filterLoader', '@provoly/dashboard')}(module, 'PryListFilterModule'))
|
|
186
|
+
},
|
|
187
|
+
number: {
|
|
188
|
+
name: 'number',
|
|
189
|
+
load: () =>
|
|
190
|
+
import('@provoly/dashboard/filters/number').then((module) => ${external('filterLoader', '@provoly/dashboard')}(module, 'PryNumberFilterModule'))
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
[]
|
|
194
|
+
)`);
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
context.logger.info('Project module not found: You have to manually add Provoly import');
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/provoly/dashboard/schematics/ng-add/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAA+F;AAC/F,4DAA0E;AAC1E,yDAA4D;AAC5D,2EAAwG;AACxG,4EAAiE;AAIjE,SAAwB,YAAY,CAAC,OAA4B;IAC/D,OAAO,CAAO,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QAC5D,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACzC,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAC9C,OAAO,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC,CAAA,CAAC;AACJ,CAAC;AARD,+BAQC;AAED,SAAS,eAAe,CAAC,IAAU,EAAE,OAA4B;IAC/D,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAE3C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,uCAAc,EAAC,IAAI,EAAE,eAAe,CAAC,CAAgB,CAAC;IAErF,MAAM,YAAY,GAAG;QACnB,EAAE,IAAI,EAAE,iCAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE;QAC9F,EAAE,IAAI,EAAE,iCAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;QACrE,EAAE,IAAI,EAAE,iCAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAA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QAEpD,MAAM,eAAe,GAAG,oBAAoB,CAAC;QAE7C,IAAI;YACF,MAAM,UAAU,GAAG,uBAAuB,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;gBAC5B,MAAM,IAAI,gCAAmB,CAAC,eAAe,UAAU,iBAAiB,CAAC,CAAC;aAC3E;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC9C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAE5B,0FAA0F;YAC1F,OAAO,IAAA,uBAAa,EAClB,OAAO,CAAC,WAAW,EACnB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA,GAAG,QAAQ,CAAC,eAAe,EAAE,oBAAoB,CAAC;QAC5E,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;QACzC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC;;;;;;gBAMrB,QAAQ,CAAC,eAAe,EAAE,oBAAoB,CAAC;;;;;;;;yEAQU,QAAQ,CACnE,cAAc,EACd,oBAAoB,CACrB;;;;;yEAK4D,QAAQ,CACnE,cAAc,EACd,oBAAoB,CACrB;;;;;yEAK4D,QAAQ,CACnE,cAAc,EACd,oBAAoB,CACrB;;;;;2EAK8D,QAAQ,CACrE,cAAc,EACd,oBAAoB,CACrB;;;;MAIP,CACD,CAAC;SACH;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;YACzF,OAAO;SACR;IACH,CAAC;CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const file_contents_function_1 = require("../utils/file-contents.function");
|
|
16
|
+
const schematicName = 'ng-add';
|
|
17
|
+
describe(schematicName, () => {
|
|
18
|
+
const runner = new testing_1.SchematicTestRunner('schematics', path.join(__dirname, '../collection.json'));
|
|
19
|
+
let tree;
|
|
20
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
tree = yield runner.runExternalSchematic('@schematics/angular', 'ng-new', { name: 'test-project', version: '0.0.0', directory: '.' }, new testing_1.UnitTestTree(schematics_1.Tree.empty()));
|
|
22
|
+
}));
|
|
23
|
+
it('should add main dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
yield runner.runSchematic(schematicName, { widgets: [], pipeline: false, projectName: 'test-project' }, tree);
|
|
25
|
+
const packageJson = JSON.parse((0, file_contents_function_1.getFileContent)(tree, '/package.json'));
|
|
26
|
+
expect(packageJson.dependencies['@provoly/dashboard']).toBe(packageJson.version);
|
|
27
|
+
expect(packageJson.dependencies['uuid']).toBe('^9.0.0');
|
|
28
|
+
expect(packageJson.devDependencies['@types/uuid']).toBe('^9.0.0');
|
|
29
|
+
expect(packageJson.dependencies['ol']).toBe(undefined);
|
|
30
|
+
expect(runner.tasks.some((task) => task.name === 'node-package')).toBe(true);
|
|
31
|
+
}));
|
|
32
|
+
it('should add specific dependencies', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
yield runner.runSchematic(schematicName, { widgets: ['widget-map'], pipeline: false, projectName: 'test-project' }, tree);
|
|
34
|
+
const packageJson = JSON.parse((0, file_contents_function_1.getFileContent)(tree, '/package.json'));
|
|
35
|
+
expect(packageJson.dependencies['@provoly/dashboard']).toBe(packageJson.version);
|
|
36
|
+
expect(packageJson.dependencies['uuid']).toBe('^9.0.0');
|
|
37
|
+
expect(packageJson.devDependencies['@types/uuid']).toBe('^9.0.0');
|
|
38
|
+
expect(packageJson.dependencies['ol']).toBe('^7.0.0');
|
|
39
|
+
expect(runner.tasks.some((task) => task.name === 'node-package')).toBe(true);
|
|
40
|
+
}));
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=index.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../../projects/provoly/dashboard/schematics/ng-add/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAuF;AACvF,6BAA6B;AAC7B,4EAAiE;AAIjE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACjG,IAAI,IAAkB,CAAC;IAEvB,UAAU,CAAC,GAAS,EAAE;QACpB,IAAI,GAAG,MAAM,MAAM,CAAC,oBAAoB,CACtC,qBAAqB,EACrB,QAAQ,EACR,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAC1D,IAAI,sBAAY,CAAC,iBAAI,CAAC,KAAK,EAAE,CAAC,CAC/B,CAAC;IACJ,CAAC,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