@provoly/dashboard 0.14.8 → 0.14.9
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/admin/components/admin-metadata-user/admin-metadata-user.component.d.ts +1 -1
- package/admin/components/admin-metadata-user/store/admin-metadata-user.action.d.ts +0 -11
- package/admin/components/admin-metadata-user/store/admin-metadata-user.effects.d.ts +2 -7
- package/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.d.ts +1 -3
- package/admin/components/admin-metadata-user/store/admin-metadata-user.selector.d.ts +1 -4
- package/admin/components/admin-user/store/admin-user.action.d.ts +1 -52
- package/admin/components/admin-user/store/admin-user.effects.d.ts +0 -28
- package/admin/components/admin-user/store/admin-user.reducer.d.ts +1 -2
- package/admin/components/admin-user/store/admin-user.selector.d.ts +0 -1
- package/admin/store/admin.service.d.ts +1 -4
- package/components/metadata-editor/metadata-editor.component.d.ts +6 -4
- package/components/metadata-editor/metadata-editor.module.d.ts +7 -6
- package/components/metadata-editor/public-api.d.ts +1 -0
- package/components/metadata-editor/store/metadata.action.d.ts +63 -1
- package/components/metadata-editor/store/metadata.effects.d.ts +33 -0
- package/components/metadata-editor/store/metadata.reducer.d.ts +3 -1
- package/components/metadata-editor/store/metadata.selector.d.ts +2 -0
- package/components/metadata-editor/store/metadata.service.d.ts +5 -1
- package/components/metadata-editor/style/_o-metadata-editor.scss +15 -0
- package/components/metadata-editor/style/css.component.d.ts +5 -0
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-edit/admin-abac-rules-edit.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-new/admin-abac-rules-new.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/components/metadata-condition/metadata-condition.component.mjs +2 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +4 -4
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -3
- package/esm2022/admin/components/admin-metadata/shared/form-metadata/form-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.mjs +3 -5
- package/esm2022/admin/components/admin-metadata-user/admin-metadata-user.component.mjs +9 -10
- package/esm2022/admin/components/admin-metadata-user/admin-user-edit-metadata/admin-user-edit-metadata.component.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.mjs +7 -3
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.action.mjs +1 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.effects.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.mjs +8 -28
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.selector.mjs +2 -6
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +9 -10
- package/esm2022/admin/components/admin-user/admin-user.component.mjs +1 -1
- package/esm2022/admin/components/admin-user/store/admin-user.action.mjs +2 -11
- package/esm2022/admin/components/admin-user/store/admin-user.effects.mjs +1 -19
- package/esm2022/admin/components/admin-user/store/admin-user.reducer.mjs +2 -7
- package/esm2022/admin/components/admin-user/store/admin-user.selector.mjs +1 -3
- package/esm2022/admin/store/admin.effects.mjs +1 -1
- package/esm2022/admin/store/admin.service.mjs +1 -16
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +37 -21
- package/esm2022/components/metadata-editor/metadata-editor.module.mjs +5 -4
- package/esm2022/components/metadata-editor/public-api.mjs +2 -1
- package/esm2022/components/metadata-editor/store/metadata.action.mjs +14 -2
- package/esm2022/components/metadata-editor/store/metadata.effects.mjs +21 -1
- package/esm2022/components/metadata-editor/store/metadata.reducer.mjs +18 -2
- package/esm2022/components/metadata-editor/store/metadata.selector.mjs +6 -2
- package/esm2022/components/metadata-editor/store/metadata.service.mjs +21 -1
- package/esm2022/components/metadata-editor/style/css.component.mjs +11 -0
- package/esm2022/dataset/i18n/fr.translations.mjs +2 -2
- package/esm2022/import/i18n/en.translations.mjs +4 -1
- package/esm2022/import/i18n/fr.translations.mjs +4 -1
- package/esm2022/import/store/import.effects.mjs +8 -1
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +10 -6
- package/esm2022/lib/core/components/snackbar/snackbar.service.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/core/model/display-options.interface.mjs +1 -1
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/public-api.mjs +2 -1
- package/esm2022/lib/core/model/widget-vega-manifest.interface.mjs +2 -0
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -4
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +4 -4
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +3 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +15 -9
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +5 -5
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +23 -1
- package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +139 -0
- package/esm2022/widgets/widget-vega/i18n/en.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/i18n/fr.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.mjs +5 -0
- package/esm2022/widgets/widget-vega/public-api.mjs +3 -0
- package/esm2022/widgets/widget-vega/style/css.component.mjs +11 -0
- package/esm2022/widgets/widget-vega/widget-vega.module.mjs +68 -0
- package/fesm2022/provoly-dashboard-admin.mjs +122 -197
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +124 -28
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +13 -0
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +3 -3
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +42 -13
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +235 -0
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -0
- package/fesm2022/provoly-dashboard.mjs +23 -14
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/i18n/en.translations.d.ts +3 -0
- package/import/i18n/fr.translations.d.ts +3 -0
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/core/model/display-options.interface.d.ts +1 -1
- package/lib/core/model/manifest.interface.d.ts +2 -1
- package/lib/core/model/public-api.d.ts +1 -0
- package/lib/core/model/widget-vega-manifest.interface.d.ts +5 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +6 -4
- package/lib/dashboard/store/dashboard.effects.d.ts +2 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
- package/package.json +7 -1
- package/schematics/ng-add/index.js +7 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +2 -1
- package/styles/components/_o-tabs.scss +1 -7
- package/widgets/widget-map/component/widget-map.component.d.ts +3 -1
- package/widgets/widget-map/utils/xml-utils.class.d.ts +2 -0
- package/widgets/widget-vega/component/widget-vega.component.d.ts +37 -0
- package/widgets/widget-vega/i18n/en.translations.d.ts +10 -0
- package/widgets/widget-vega/i18n/fr.translations.d.ts +10 -0
- package/widgets/widget-vega/index.d.ts +5 -0
- package/widgets/widget-vega/public-api.d.ts +2 -0
- package/widgets/widget-vega/style/_o-widget-vega.scss +6 -0
- package/widgets/widget-vega/style/css.component.d.ts +5 -0
- package/widgets/widget-vega/widget-vega.module.d.ts +19 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import * as i3 from '@angular/common';
|
|
2
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Component, ViewEncapsulation, Inject, ViewChild, NgModule } from '@angular/core';
|
|
5
|
+
import * as i2 from '@provoly/dashboard';
|
|
6
|
+
import { DataWidgetComponent, WIDGET_HEADER_HEIGHT, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryI18nModule } from '@provoly/dashboard';
|
|
7
|
+
import { Subject, combineLatest, filter } from 'rxjs';
|
|
8
|
+
import { map } from 'rxjs/operators';
|
|
9
|
+
import embed from 'vega-embed';
|
|
10
|
+
import * as i1 from '@ngrx/store';
|
|
11
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
12
|
+
import { FormsModule } from '@angular/forms';
|
|
13
|
+
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
14
|
+
import { WidgetMapModule } from '@provoly/dashboard/widgets/widget-map';
|
|
15
|
+
|
|
16
|
+
class PryWidgetVegaCssComponent {
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryWidgetVegaCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryWidgetVegaCssComponent, selector: "pry-widget-vega-css", ngImport: i0, template: '', isInline: true, styles: ["textarea.a-form-field.a-text-area{overflow:unset;height:31.25rem}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryWidgetVegaCssComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{ selector: 'pry-widget-vega-css', template: '', encapsulation: ViewEncapsulation.None, styles: ["textarea.a-form-field.a-text-area{overflow:unset;height:31.25rem}\n"] }]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
class WidgetVegaComponent extends DataWidgetComponent {
|
|
26
|
+
constructor(store, translateService, el, document, snackService) {
|
|
27
|
+
super(store, el);
|
|
28
|
+
this.translateService = translateService;
|
|
29
|
+
this.document = document;
|
|
30
|
+
this.snackService = snackService;
|
|
31
|
+
this.trigger$ = new Subject();
|
|
32
|
+
this.optionsCopy = { baseSpec: {}, placeData: [] };
|
|
33
|
+
this.formattedBaseSpec = '{}';
|
|
34
|
+
this.initialFormattedBaseSpec = '{}';
|
|
35
|
+
this.options$ = this.manifest$.pipe(map((manifest) => (manifest.options ?? {})));
|
|
36
|
+
this.subscriptions.add(this.options$.subscribe((options) => {
|
|
37
|
+
this.optionsCopy = JSON.parse(JSON.stringify(options));
|
|
38
|
+
this.formattedBaseSpec = JSON.stringify(this.optionsCopy.baseSpec, undefined, 4);
|
|
39
|
+
this.initialFormattedBaseSpec = JSON.stringify(this.optionsCopy.baseSpec, undefined, 4);
|
|
40
|
+
}));
|
|
41
|
+
this.vegaSpec$ = combineLatest([this.options$, this.resultSet$, this.widgetSize$, this.displayHeader$]).pipe(filter(([options, rs, size, header]) => !!rs), map(([options, rs, size, header]) => {
|
|
42
|
+
const data = WidgetVegaComponent.getValues(rs);
|
|
43
|
+
const vegaSpec = WidgetVegaComponent.placeData(options, JSON.parse(JSON.stringify(options.baseSpec)), data);
|
|
44
|
+
vegaSpec.width = size.width - 15;
|
|
45
|
+
vegaSpec.height = size.height - 40 - (header ? WIDGET_HEADER_HEIGHT : 0);
|
|
46
|
+
vegaSpec.autosize = { type: 'fit', contains: 'padding' };
|
|
47
|
+
vegaSpec.padding = 15;
|
|
48
|
+
console.log(JSON.stringify(vegaSpec, undefined, 4));
|
|
49
|
+
return vegaSpec;
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
static getValues(data) {
|
|
53
|
+
return Object.keys(data.items)
|
|
54
|
+
.map((clazz) => data.items[clazz].map((item) => WidgetVegaComponent.transformProvolyModelToClassic(item)))
|
|
55
|
+
.flat();
|
|
56
|
+
}
|
|
57
|
+
static transformProvolyModelToClassic(values) {
|
|
58
|
+
const result = {};
|
|
59
|
+
Object.keys(values.attributes).forEach((key) => {
|
|
60
|
+
result[key] = values.attributes[key].value;
|
|
61
|
+
});
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
static placeData(options, baseSpec, data) {
|
|
65
|
+
const clone = JSON.parse(JSON.stringify(baseSpec));
|
|
66
|
+
let ref = clone;
|
|
67
|
+
(options.placeData ?? []).forEach((prop, idx, arr) => {
|
|
68
|
+
if (ref) {
|
|
69
|
+
if (idx < arr.length - 1) {
|
|
70
|
+
ref = ref[prop];
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
ref[prop] = data;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return clone;
|
|
78
|
+
}
|
|
79
|
+
ngAfterViewInit() {
|
|
80
|
+
this.subscriptions.add(combineLatest([this.vegaSpec$, this.trigger$, this.widgetSize$]).subscribe(([spec, _, size]) => {
|
|
81
|
+
if (this.vega) {
|
|
82
|
+
this.view?.finalize();
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
if (this.document.debugFNTP !== undefined) {
|
|
85
|
+
console.log(JSON.stringify(spec, undefined, 4));
|
|
86
|
+
}
|
|
87
|
+
embed(this.vega.nativeElement, JSON.parse(JSON.stringify(spec)), {
|
|
88
|
+
actions: false,
|
|
89
|
+
renderer: 'canvas',
|
|
90
|
+
formatLocale: {
|
|
91
|
+
decimal: this.translateService.instant('@pry.format.decimal'),
|
|
92
|
+
thousands: this.translateService.instant('@pry.format.thousands'),
|
|
93
|
+
grouping: this.translateService.instant('@pry.format.grouping'),
|
|
94
|
+
currency: this.translateService.instant('@pry.format.currency'),
|
|
95
|
+
percent: '\u202f%'
|
|
96
|
+
}
|
|
97
|
+
}).then((result) => (this.view = result.view));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
setTimeout(() => this.trigger$.next(), 100);
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
103
|
+
this.trigger$.next();
|
|
104
|
+
}
|
|
105
|
+
toImage() {
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
resolve(this.vega.nativeElement.querySelectorAll('canvas')[0].toDataURL('image/png'));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
emitManifest() {
|
|
111
|
+
this.manifestModified.emit({
|
|
112
|
+
widgetIndex: this.widgetIndex,
|
|
113
|
+
manifest: { ...this.manifest, options: this.optionsCopy }
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
changePlaceData($event) {
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
const expr = $event.currentTarget.value;
|
|
119
|
+
this.optionsCopy.placeData = expr
|
|
120
|
+
.split('.')
|
|
121
|
+
.map((val) => (parseInt(val) + '' === `${val}` ? parseInt(val) : val));
|
|
122
|
+
}
|
|
123
|
+
changeSpec($event) {
|
|
124
|
+
try {
|
|
125
|
+
// @ts-ignore
|
|
126
|
+
this.optionsCopy.baseSpec = JSON.parse($event.currentTarget.value);
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
const message = this.snackService.open({
|
|
130
|
+
type: 'error',
|
|
131
|
+
message: this.translateService.instant('@pry.widget.vega.notParseableSpec'),
|
|
132
|
+
action: this.translateService.instant('@pry.widget.vega.specReinit')
|
|
133
|
+
});
|
|
134
|
+
message?.subscribe(() => {
|
|
135
|
+
this.optionsCopy.baseSpec = this.initialFormattedBaseSpec;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaComponent, deps: [{ token: i1.Store }, { token: i2.PryI18nService }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: i2.PrySnackbarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
140
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: WidgetVegaComponent, selector: "pry-widget-vega", viewQueries: [{ propertyName: "vega", first: true, predicate: ["vega"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-vega-css></pry-widget-vega-css>\n<div class=\"o-widget o-widget--chart\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"placeData_src\">{{ '@pry.widget.vega.placeData' | i18n }}</label>\n <input\n class=\"a-form-field\"\n id=\"placeData_src\"\n type=\"text\"\n [value]=\"(optionsCopy.placeData ?? []).join('.')\"\n (input)=\"changePlaceData($event)\"\n />\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"spec_src\">{{ '@pry.widget.vega.spec' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area\"\n id=\"spec_src\"\n [value]=\"formattedBaseSpec\"\n (input)=\"changeSpec($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget--chart--chart\" #vega></div>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: PryWidgetVegaCssComponent, selector: "pry-widget-vega-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }] }); }
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaComponent, decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{ selector: 'pry-widget-vega', template: "<pry-widget-vega-css></pry-widget-vega-css>\n<div class=\"o-widget o-widget--chart\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"placeData_src\">{{ '@pry.widget.vega.placeData' | i18n }}</label>\n <input\n class=\"a-form-field\"\n id=\"placeData_src\"\n type=\"text\"\n [value]=\"(optionsCopy.placeData ?? []).join('.')\"\n (input)=\"changePlaceData($event)\"\n />\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"spec_src\">{{ '@pry.widget.vega.spec' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area\"\n id=\"spec_src\"\n [value]=\"formattedBaseSpec\"\n (input)=\"changeSpec($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget--chart--chart\" #vega></div>\n</div>\n" }]
|
|
145
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.PryI18nService }, { type: i0.ElementRef }, { type: Document, decorators: [{
|
|
146
|
+
type: Inject,
|
|
147
|
+
args: [DOCUMENT]
|
|
148
|
+
}] }, { type: i2.PrySnackbarService }]; }, propDecorators: { vega: [{
|
|
149
|
+
type: ViewChild,
|
|
150
|
+
args: ['vega']
|
|
151
|
+
}] } });
|
|
152
|
+
|
|
153
|
+
const enTranslations = {
|
|
154
|
+
'@pry': {
|
|
155
|
+
widget: {
|
|
156
|
+
vega: {
|
|
157
|
+
placeData: 'Expression leading to data in Vega config',
|
|
158
|
+
spec: 'Vega configuration'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const frTranslations = {
|
|
165
|
+
'@pry': {
|
|
166
|
+
widget: {
|
|
167
|
+
vega: {
|
|
168
|
+
placeData: 'Expression menant à la place des données dans la configuration Vega',
|
|
169
|
+
spec: 'Configuration Vega'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
class WidgetVegaModule extends BaseWidgetModule {
|
|
176
|
+
constructor(pryTranslateService) {
|
|
177
|
+
super();
|
|
178
|
+
this.pryTranslateService = pryTranslateService;
|
|
179
|
+
this.pryTranslateService.addLangObject('fr', 'widget-vega', frTranslations);
|
|
180
|
+
this.pryTranslateService.addLangObject('en', 'widget-vega', enTranslations);
|
|
181
|
+
}
|
|
182
|
+
getComponent() {
|
|
183
|
+
return WidgetVegaComponent;
|
|
184
|
+
}
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaModule, deps: [{ token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
186
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaModule, declarations: [WidgetVegaComponent, PryWidgetVegaCssComponent], imports: [CommonModule,
|
|
187
|
+
FormsModule,
|
|
188
|
+
OverlayModule,
|
|
189
|
+
PryCoreModule,
|
|
190
|
+
PryDashboardModule,
|
|
191
|
+
PrySelectModule,
|
|
192
|
+
PryIconModule,
|
|
193
|
+
PryCheckboxModule,
|
|
194
|
+
PryToggleModule,
|
|
195
|
+
WidgetMapModule,
|
|
196
|
+
PryI18nModule], exports: [WidgetVegaComponent] }); }
|
|
197
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaModule, imports: [CommonModule,
|
|
198
|
+
FormsModule,
|
|
199
|
+
OverlayModule,
|
|
200
|
+
PryCoreModule,
|
|
201
|
+
PryDashboardModule,
|
|
202
|
+
PrySelectModule,
|
|
203
|
+
PryIconModule,
|
|
204
|
+
PryCheckboxModule,
|
|
205
|
+
PryToggleModule,
|
|
206
|
+
WidgetMapModule,
|
|
207
|
+
PryI18nModule] }); }
|
|
208
|
+
}
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WidgetVegaModule, decorators: [{
|
|
210
|
+
type: NgModule,
|
|
211
|
+
args: [{
|
|
212
|
+
declarations: [WidgetVegaComponent, PryWidgetVegaCssComponent],
|
|
213
|
+
imports: [
|
|
214
|
+
CommonModule,
|
|
215
|
+
FormsModule,
|
|
216
|
+
OverlayModule,
|
|
217
|
+
PryCoreModule,
|
|
218
|
+
PryDashboardModule,
|
|
219
|
+
PrySelectModule,
|
|
220
|
+
PryIconModule,
|
|
221
|
+
PryCheckboxModule,
|
|
222
|
+
PryToggleModule,
|
|
223
|
+
WidgetMapModule,
|
|
224
|
+
PryI18nModule
|
|
225
|
+
],
|
|
226
|
+
exports: [WidgetVegaComponent]
|
|
227
|
+
}]
|
|
228
|
+
}], ctorParameters: function () { return [{ type: i2.PryI18nService }]; } });
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Generated bundle index. Do not edit.
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
export { WidgetVegaComponent, WidgetVegaModule };
|
|
235
|
+
//# sourceMappingURL=provoly-dashboard-widgets-widget-vega.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-widgets-widget-vega.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-vega/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-vega/component/widget-vega.component.ts","../../../../projects/provoly/dashboard/widgets/widget-vega/component/widget-vega.component.html","../../../../projects/provoly/dashboard/widgets/widget-vega/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-vega/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-vega/widget-vega.module.ts","../../../../projects/provoly/dashboard/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-vega-css',\n template: '',\n styleUrls: ['./_o-widget-vega.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetVegaCssComponent {}\n","import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Component, ElementRef, Inject, ViewChild } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport {\n AttributeSimpleValue,\n DataWidgetComponent,\n Item,\n PryI18nService,\n PrySnackbarService,\n ResultSet,\n ValueType,\n VegaWidgetOptions,\n WIDGET_HEADER_HEIGHT\n} from '@provoly/dashboard';\nimport { combineLatest, filter, Observable, Subject } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { View } from 'vega';\nimport embed, { VisualizationSpec } from 'vega-embed';\n\n@Component({\n selector: 'pry-widget-vega',\n templateUrl: './widget-vega.component.html'\n})\nexport class WidgetVegaComponent extends DataWidgetComponent implements AfterViewInit {\n @ViewChild('vega') vega!: ElementRef;\n view?: View;\n vegaSpec$: Observable<VisualizationSpec>;\n trigger$ = new Subject<void>();\n options$: Observable<any>;\n optionsCopy: VegaWidgetOptions = { baseSpec: {}, placeData: [] };\n formattedBaseSpec: string = '{}';\n initialFormattedBaseSpec: string = '{}';\n\n constructor(\n store: Store<any>,\n private translateService: PryI18nService,\n el: ElementRef,\n @Inject(DOCUMENT) private document: Document,\n private snackService: PrySnackbarService\n ) {\n super(store, el);\n\n this.options$ = this.manifest$.pipe(map((manifest) => (manifest.options ?? {}) as any));\n this.subscriptions.add(\n this.options$.subscribe((options) => {\n this.optionsCopy = JSON.parse(JSON.stringify(options));\n this.formattedBaseSpec = JSON.stringify(this.optionsCopy.baseSpec, undefined, 4);\n this.initialFormattedBaseSpec = JSON.stringify(this.optionsCopy.baseSpec, undefined, 4);\n })\n );\n\n this.vegaSpec$ = combineLatest([this.options$, this.resultSet$, this.widgetSize$, this.displayHeader$]).pipe(\n filter(([options, rs, size, header]) => !!rs),\n map(([options, rs, size, header]) => {\n const data = WidgetVegaComponent.getValues(rs);\n\n const vegaSpec = WidgetVegaComponent.placeData(options, JSON.parse(JSON.stringify(options.baseSpec)), data);\n\n vegaSpec.width = size.width - 15;\n vegaSpec.height = size.height - 40 - (header ? WIDGET_HEADER_HEIGHT : 0);\n vegaSpec.autosize = { type: 'fit', contains: 'padding' };\n vegaSpec.padding = 15;\n\n console.log(JSON.stringify(vegaSpec, undefined, 4));\n\n return vegaSpec;\n })\n );\n }\n\n static getValues(data: ResultSet) {\n return Object.keys(data.items)\n .map((clazz) => data.items[clazz].map((item) => WidgetVegaComponent.transformProvolyModelToClassic(item)))\n .flat();\n }\n\n static transformProvolyModelToClassic(values: Item) {\n const result = {} as { [key: string]: ValueType };\n Object.keys(values.attributes).forEach((key) => {\n result[key] = (values.attributes[key] as AttributeSimpleValue).value;\n });\n\n return result;\n }\n\n static placeData(options: VegaWidgetOptions, baseSpec: any, data: { [key: string]: ValueType }[]) {\n const clone = JSON.parse(JSON.stringify(baseSpec));\n let ref = clone;\n (options.placeData ?? []).forEach((prop, idx, arr) => {\n if (ref) {\n if (idx < arr.length - 1) {\n ref = ref[prop];\n } else {\n ref[prop] = data;\n }\n }\n });\n return clone;\n }\n\n ngAfterViewInit() {\n this.subscriptions.add(\n combineLatest([this.vegaSpec$, this.trigger$, this.widgetSize$]).subscribe(([spec, _, size]) => {\n if (this.vega) {\n this.view?.finalize();\n\n // @ts-ignore\n if (this.document.debugFNTP !== undefined) {\n console.log(JSON.stringify(spec, undefined, 4));\n }\n\n embed(this.vega.nativeElement, JSON.parse(JSON.stringify(spec)), {\n actions: false,\n renderer: 'canvas',\n formatLocale: {\n decimal: this.translateService.instant('@pry.format.decimal'),\n thousands: this.translateService.instant('@pry.format.thousands'),\n grouping: this.translateService.instant('@pry.format.grouping'),\n currency: this.translateService.instant('@pry.format.currency'),\n percent: '\\u202f%'\n }\n }).then((result) => (this.view = result.view));\n } else {\n setTimeout(() => this.trigger$.next(), 100);\n }\n })\n );\n this.trigger$.next();\n }\n\n override toImage(): Promise<string> {\n return new Promise((resolve, reject) => {\n resolve(this.vega.nativeElement.querySelectorAll('canvas')[0].toDataURL('image/png'));\n });\n }\n\n emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n\n changePlaceData($event: Event) {\n // @ts-ignore\n const expr = $event.currentTarget.value;\n this.optionsCopy.placeData = expr\n .split('.')\n .map((val: string) => (parseInt(val) + '' === `${val}` ? parseInt(val) : val));\n }\n\n changeSpec($event: Event) {\n try {\n // @ts-ignore\n this.optionsCopy.baseSpec = JSON.parse($event.currentTarget.value);\n } catch (e) {\n const message = this.snackService.open({\n type: 'error',\n message: this.translateService.instant('@pry.widget.vega.notParseableSpec'),\n action: this.translateService.instant('@pry.widget.vega.specReinit')\n });\n message?.subscribe(() => {\n this.optionsCopy.baseSpec = this.initialFormattedBaseSpec;\n });\n }\n }\n}\n","<pry-widget-vega-css></pry-widget-vega-css>\n<div class=\"o-widget o-widget--chart\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"placeData_src\">{{ '@pry.widget.vega.placeData' | i18n }}</label>\n <input\n class=\"a-form-field\"\n id=\"placeData_src\"\n type=\"text\"\n [value]=\"(optionsCopy.placeData ?? []).join('.')\"\n (input)=\"changePlaceData($event)\"\n />\n </div>\n\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"spec_src\">{{ '@pry.widget.vega.spec' | i18n }}</label>\n <textarea\n class=\"a-form-field a-text-area\"\n id=\"spec_src\"\n [value]=\"formattedBaseSpec\"\n (input)=\"changeSpec($event)\"\n ></textarea>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget--chart--chart\" #vega></div>\n</div>\n","export const enTranslations = {\n '@pry': {\n widget: {\n vega: {\n placeData: 'Expression leading to data in Vega config',\n spec: 'Vega configuration'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n vega: {\n placeData: 'Expression menant à la place des données dans la configuration Vega',\n spec: 'Configuration Vega'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetMapModule } from '@provoly/dashboard/widgets/widget-map';\nimport { WidgetVegaComponent } from './component/widget-vega.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetVegaCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetVegaComponent, PryWidgetVegaCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n WidgetMapModule,\n PryI18nModule\n ],\n exports: [WidgetVegaComponent]\n})\nexport class WidgetVegaModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-vega', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-vega', enTranslations);\n }\n\n override getComponent() {\n return WidgetVegaComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bund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AAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAhBZ,YAAA,EAAA,CAAA,mBAAmB,EAAE,yBAAyB,aAE3D,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;YACf,eAAe;AACf,YAAA,aAAa,aAEL,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAdzB,YAAY;YACZ,WAAW;YACX,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,iBAAiB;YACjB,eAAe;YACf,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIJ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAjB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,yBAAyB,CAAC;AAC9D,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;ACtCD;;AAEG;;;;"}
|
|
@@ -398,7 +398,8 @@ const enTranslations$1 = {
|
|
|
398
398
|
next: 'Next',
|
|
399
399
|
back: 'Back',
|
|
400
400
|
filterByType: 'Filter by type',
|
|
401
|
-
editMetadata: 'Edit metadata'
|
|
401
|
+
editMetadata: 'Edit metadata',
|
|
402
|
+
addMetadata: 'Add metadata'
|
|
402
403
|
},
|
|
403
404
|
snack: {
|
|
404
405
|
default: 'Vega encountered an error using your data and settings.',
|
|
@@ -729,7 +730,8 @@ const frTranslations$1 = {
|
|
|
729
730
|
next: 'Suivant',
|
|
730
731
|
back: 'Retour',
|
|
731
732
|
filterByType: 'Filtrer par type',
|
|
732
|
-
editMetadata: 'Modifier la métadonnée'
|
|
733
|
+
editMetadata: 'Modifier la métadonnée',
|
|
734
|
+
addMetadata: 'Ajouter la métadonnée'
|
|
733
735
|
},
|
|
734
736
|
snack: {
|
|
735
737
|
default: 'Vega a rencontré une erreur en utilisant vos données et paramétrage.',
|
|
@@ -1313,7 +1315,7 @@ const DashboardActions = {
|
|
|
1313
1315
|
resetWmsFeatures: createAction('[Widget map] Reset Wms layer features'),
|
|
1314
1316
|
getWmsFeatures: createAction('[Widget map] Get Wms layer features', props()),
|
|
1315
1317
|
addWmsFeatures: createAction('[Widget map] Set Wms layer features', props()),
|
|
1316
|
-
updateDisplayOptions: createAction('[Dashboard/Display] Update displayed dashboard management features', props()),
|
|
1318
|
+
updateDisplayOptions: createAction('[Dashboard/Display] (bus) Update displayed dashboard management features', props()),
|
|
1317
1319
|
getCapability: createAction('[Widget map] Get Wms capability', props()),
|
|
1318
1320
|
updateCapability: createAction('[Widget map] Store Wms capability', props()),
|
|
1319
1321
|
addManifestMetadata: createAction('[Dashboard] Add manifest metadata', props()),
|
|
@@ -2223,7 +2225,7 @@ const frTranslations = {
|
|
|
2223
2225
|
WARNING: 'Warning'
|
|
2224
2226
|
},
|
|
2225
2227
|
code: {
|
|
2226
|
-
UNRECOGNIZED: 'Attribut {{name}} non reconnu',
|
|
2228
|
+
UNRECOGNIZED: 'Attribut{{plural}} {{name}} non reconnu{{plural}}',
|
|
2227
2229
|
FORMAT: "Format d'attribut {{name}} incorrect",
|
|
2228
2230
|
ELASTIC_SEARCH: "Erreur d'insertion pour l'élément {{recordId}}",
|
|
2229
2231
|
NO_VALUES: 'Pas de valeur pour la ligne {{recordId}}',
|
|
@@ -2510,9 +2512,13 @@ class PryModalStatusComponent {
|
|
|
2510
2512
|
this._version = version;
|
|
2511
2513
|
if (!!version) {
|
|
2512
2514
|
this.store.dispatch(DataSourceActions.dataset.previews.getById({ id: version.id }));
|
|
2513
|
-
this.datasetPreviews$ = this.store
|
|
2514
|
-
.
|
|
2515
|
-
.
|
|
2515
|
+
this.datasetPreviews$ = this.store.select(DataSourceSelectors.datasetPreviews).pipe(map((previews) => previews
|
|
2516
|
+
.map((preview) => preview.messages)
|
|
2517
|
+
.flat()
|
|
2518
|
+
.map((preview) => ({
|
|
2519
|
+
...preview,
|
|
2520
|
+
name: preview.name.split(',').join(', ')
|
|
2521
|
+
}))));
|
|
2516
2522
|
this.messageCount$ = this.store.select(DataSourceSelectors.datasetPreviews).pipe(map((previews) => {
|
|
2517
2523
|
return previews.map((preview) => preview.count).reduce((p, c) => p + c, 0);
|
|
2518
2524
|
}));
|
|
@@ -2526,11 +2532,11 @@ class PryModalStatusComponent {
|
|
|
2526
2532
|
this.gotoConsult.emit(this.version);
|
|
2527
2533
|
}
|
|
2528
2534
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryModalStatusComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2529
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryModalStatusComponent, selector: "pry-modal-status", inputs: { version: "version" }, outputs: { gotoConsult: "gotoConsult" }, ngImport: i0, template: "<div class=\"o-modal-wrapper -extra-large\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{\n '@pry.dataset.error.modalTitle.' +\n (_version?.state !== 'ERROR' && _version?.hasWarnings ? 'WARNING' : 'ERROR') | i18n\n }}\n ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractMessageCode\n | i18n : { name: preview.name, recordId: preview.recordId }\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.SlicePipe, name: "slice" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
2535
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryModalStatusComponent, selector: "pry-modal-status", inputs: { version: "version" }, outputs: { gotoConsult: "gotoConsult" }, ngImport: i0, template: "<div class=\"o-modal-wrapper -extra-large\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{\n '@pry.dataset.error.modalTitle.' +\n (_version?.state !== 'ERROR' && _version?.hasWarnings ? 'WARNING' : 'ERROR') | i18n\n }}\n ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractMessageCode\n | i18n : { plural: preview.name.includes(',') ? 's' : '', name: preview.name, recordId: preview.recordId }\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.SlicePipe, name: "slice" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
2530
2536
|
}
|
|
2531
2537
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryModalStatusComponent, decorators: [{
|
|
2532
2538
|
type: Component,
|
|
2533
|
-
args: [{ selector: 'pry-modal-status', template: "<div class=\"o-modal-wrapper -extra-large\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{\n '@pry.dataset.error.modalTitle.' +\n (_version?.state !== 'ERROR' && _version?.hasWarnings ? 'WARNING' : 'ERROR') | i18n\n }}\n ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractMessageCode\n | i18n : { name: preview.name, recordId: preview.recordId }\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
|
|
2539
|
+
args: [{ selector: 'pry-modal-status', template: "<div class=\"o-modal-wrapper -extra-large\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{\n '@pry.dataset.error.modalTitle.' +\n (_version?.state !== 'ERROR' && _version?.hasWarnings ? 'WARNING' : 'ERROR') | i18n\n }}\n ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractMessageCode\n | i18n : { plural: preview.name.includes(',') ? 's' : '', name: preview.name, recordId: preview.recordId }\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
|
|
2534
2540
|
}], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { gotoConsult: [{
|
|
2535
2541
|
type: Output
|
|
2536
2542
|
}], version: [{
|
|
@@ -3869,7 +3875,7 @@ const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.w
|
|
|
3869
3875
|
.reduce((p, c) => [...p, ...c], [])
|
|
3870
3876
|
.reduce((p, c) => ({ ...p, [c.rsName ?? '']: [...(p[c.rsName ?? ''] || []), { ...c }] }), {}));
|
|
3871
3877
|
const presentation = createSelector(feature$4, (state) => state?.presentation);
|
|
3872
|
-
const savePresentationActive = createSelector(presentation, globalManifest, (state, global) => !!state.current && state.current.owner &&
|
|
3878
|
+
const savePresentationActive = createSelector(presentation, globalManifest, (state, global) => !!state.current && state.current.owner && !equal(global, state.initial));
|
|
3873
3879
|
const filters = createSelector(feature$4, (state) => state?.manifests.manifest.filters ?? {});
|
|
3874
3880
|
const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.manifest.filters
|
|
3875
3881
|
? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
|
|
@@ -3913,8 +3919,8 @@ const DashboardSelectors = {
|
|
|
3913
3919
|
loading,
|
|
3914
3920
|
quickOrder,
|
|
3915
3921
|
presentation,
|
|
3916
|
-
savePresentationActive,
|
|
3917
3922
|
filters,
|
|
3923
|
+
savePresentationActive,
|
|
3918
3924
|
datasourceFilters,
|
|
3919
3925
|
wmsFeatures,
|
|
3920
3926
|
displayOptions,
|
|
@@ -9981,7 +9987,7 @@ class DashboardEffects {
|
|
|
9981
9987
|
this.searchService = searchService;
|
|
9982
9988
|
this.pryDialog = pryDialog;
|
|
9983
9989
|
this.wmsService = wmsService;
|
|
9984
|
-
this.join$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.join), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.selectedItemIds), this.store.select(DashboardSelectors.presentation)), filter$1(([action, rank, tenants, manifest, resultSets]) => rank === 0), map$1(([action, rank, tenants, manifest, resultSets, selectedIds, presentation]) => DashboardActions.updateManifestAfterTenantJoin({
|
|
9990
|
+
this.join$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.join), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.selectedItemIds), this.store.select(DashboardSelectors.presentation), this.store.select(DashboardSelectors.displayOptions)), filter$1(([action, rank, tenants, manifest, resultSets, display]) => rank === 0), map$1(([action, rank, tenants, manifest, resultSets, selectedIds, presentation, display]) => DashboardActions.updateManifestAfterTenantJoin({
|
|
9985
9991
|
tenants,
|
|
9986
9992
|
manifest: {
|
|
9987
9993
|
...manifest,
|
|
@@ -9990,7 +9996,8 @@ class DashboardEffects {
|
|
|
9990
9996
|
resultSets,
|
|
9991
9997
|
selectedIds,
|
|
9992
9998
|
joining: true,
|
|
9993
|
-
presentation
|
|
9999
|
+
presentation,
|
|
10000
|
+
display
|
|
9994
10001
|
}))));
|
|
9995
10002
|
this.leave$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.leave), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank, tenants, manifest]) => rank === 0 || (tenants[0] === action.sender && rank === 1)), map$1(([action, rank, tenants, manifest, selectedIds]) => {
|
|
9996
10003
|
const leaverRank = tenants.indexOf(action.sender);
|
|
@@ -10378,7 +10385,9 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
10378
10385
|
resultSets: !!action.resultSets
|
|
10379
10386
|
? { ...state.results.resultSets, ...action.resultSets }
|
|
10380
10387
|
: state.results.resultSets
|
|
10381
|
-
}
|
|
10388
|
+
},
|
|
10389
|
+
// @ts-ignore
|
|
10390
|
+
display: action.display ?? state.display
|
|
10382
10391
|
};
|
|
10383
10392
|
}), on(DashboardActions.updateRouteManifest, (state, action) => {
|
|
10384
10393
|
const senderRank = state.manifests.tenants.indexOf(action.sender ?? state.manifests.sender);
|