@provoly/dashboard 0.24.9 → 0.24.10
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/bin_normal.svg +6 -0
- package/esm2022/lib/core/components/edit-input/edit-input.component.mjs +18 -5
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +5 -3
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/dashboard/components/widgets/settings/settings.component.mjs +3 -3
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +8 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +19 -1
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +66 -1
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +6 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +1 -1
- package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +1 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +183 -43
- package/esm2022/widgets/widget-map/i18n/en.translations.mjs +22 -2
- package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +23 -2
- package/esm2022/widgets/widget-map/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/widget-map.module.mjs +12 -5
- 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-widgets-widget-chart.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +237 -49
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +119 -12
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/edit-input/edit-input.component.d.ts +6 -2
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +2 -0
- package/lib/core/model/manifest.interface.d.ts +2 -1
- package/lib/core/model/widget-map-manifest.interface.d.ts +6 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +37 -0
- package/lib/dashboard/store/dashboard.effects.d.ts +4 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +9 -0
- package/package.json +1 -1
- package/styles/base/_utils.scss +4 -0
- package/styles/components/_a-range-slider.scss +5 -21
- package/styles/components/_m-form-label-field.scss +1 -0
- package/styles/components/_o-layer-settings.scss +139 -0
- package/styles/components/_o-pry-edit.scss +30 -2
- package/styles/components/_o-settings.scss +6 -2
- package/styles/main.scss +1 -0
- package/styles-theme/components-theme/_m-layer-legend.theme.scss +24 -0
- package/styles-theme/components-theme/_o-layer-settings.theme.scss +32 -0
- package/styles-theme/components-theme/_o-settings.theme.scss +6 -0
- package/styles-theme/main-theme.scss +2 -0
- package/widgets/widget-map/component/widget-map.component.d.ts +22 -8
- package/widgets/widget-map/i18n/en.translations.d.ts +20 -0
- package/widgets/widget-map/i18n/fr.translations.d.ts +21 -0
- package/widgets/widget-map/style/_m-layer-legend.scss +30 -5
- package/widgets/widget-map/style/_o-widget-map.scss +4 -0
- package/widgets/widget-map/widget-map.module.d.ts +2 -1
|
@@ -434,7 +434,8 @@ const enTranslations$1 = {
|
|
|
434
434
|
},
|
|
435
435
|
theme: {
|
|
436
436
|
editInput: {
|
|
437
|
-
toggle: 'Edit'
|
|
437
|
+
toggle: 'Edit',
|
|
438
|
+
confirm: 'Confirm'
|
|
438
439
|
},
|
|
439
440
|
previousMonth: 'Previous month',
|
|
440
441
|
nextMonth: 'Next month',
|
|
@@ -600,7 +601,7 @@ const frTranslations$1 = {
|
|
|
600
601
|
updatedInView: 'La restitution a été mise à jour sur la page n°{{index}}',
|
|
601
602
|
settings: {
|
|
602
603
|
title: 'Paramétrage',
|
|
603
|
-
changeTitle: 'Titre
|
|
604
|
+
changeTitle: 'Titre de la restitution',
|
|
604
605
|
validateUpdating: 'Valider la modification'
|
|
605
606
|
},
|
|
606
607
|
defineCatalog: 'Définissez votre entrée de catalogue',
|
|
@@ -800,6 +801,7 @@ const frTranslations$1 = {
|
|
|
800
801
|
delete: 'Supprimer',
|
|
801
802
|
edit: 'Editer',
|
|
802
803
|
editProfil: 'Editer le profil',
|
|
804
|
+
editTitle: 'Editer le titre',
|
|
803
805
|
choice: 'Choisir un ....',
|
|
804
806
|
choiceInList: 'Choisir un élément dans la liste',
|
|
805
807
|
text: 'Remplir le champ',
|
|
@@ -831,7 +833,8 @@ const frTranslations$1 = {
|
|
|
831
833
|
},
|
|
832
834
|
theme: {
|
|
833
835
|
editInput: {
|
|
834
|
-
toggle: 'Editer'
|
|
836
|
+
toggle: 'Editer',
|
|
837
|
+
confirm: 'Confirmer'
|
|
835
838
|
},
|
|
836
839
|
previousMonth: 'Mois précédent',
|
|
837
840
|
nextMonth: 'Mois suivant',
|
|
@@ -3885,7 +3888,13 @@ const DashboardActions = {
|
|
|
3885
3888
|
addManifestMetadata: createAction('[Dashboard] Add manifest metadata', props()),
|
|
3886
3889
|
deleteManifestMetadata: createAction('[Dashboard] Delete manifest metadata', props()),
|
|
3887
3890
|
triggerAggregate: createAction('[Dashboard] (bus) Triggering aggregates for datasource', props()),
|
|
3888
|
-
loadPresentation: createAction('[Dashboard] load presentation', props())
|
|
3891
|
+
loadPresentation: createAction('[Dashboard] load presentation', props()),
|
|
3892
|
+
initDefaultLayerGroup: createAction('[Dashboard] init default layer group', props()),
|
|
3893
|
+
addLayerGroup: createAction('[Dashboard] add map layer group', props()),
|
|
3894
|
+
updateLayerGroup: createAction('[Dashboard] update map layer group', props()),
|
|
3895
|
+
confirmLayerGroupDeletion: createAction('[Dashboard] confirm deleting map layer group', props()),
|
|
3896
|
+
deleteLayerGroup: createAction('[Dashboard] delete map layer group', props()),
|
|
3897
|
+
updateAllLayerGroups: createAction('[Dashboard] remove map layer group', props())
|
|
3889
3898
|
};
|
|
3890
3899
|
|
|
3891
3900
|
var DashboardGridLayout;
|
|
@@ -3991,10 +4000,10 @@ const rank = createSelector(manifests, (manifests) => manifests?.tenants.indexOf
|
|
|
3991
4000
|
const currentManifestId = createSelector(manifests, (manifests) => manifests.currentId);
|
|
3992
4001
|
const globalManifest = createSelector(manifests,
|
|
3993
4002
|
// @ts-ignore
|
|
3994
|
-
(manifests) => ({ windows: [], ...manifests?.manifest } ?? { windows: [] })
|
|
4003
|
+
(manifests) => ({ windows: [], ...manifests?.manifest }) ?? { windows: [] });
|
|
3995
4004
|
const staticManifest = createSelector(manifests,
|
|
3996
4005
|
// @ts-ignore
|
|
3997
|
-
(manifests) => ({ windows: [], ...manifests?.staticManifest } ?? { windows: [] })
|
|
4006
|
+
(manifests) => ({ windows: [], ...manifests?.staticManifest }) ?? { windows: [] });
|
|
3998
4007
|
const loading = createSelector(manifests, (manifests) => !!manifests?.loading);
|
|
3999
4008
|
const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
|
|
4000
4009
|
const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
|
|
@@ -4065,6 +4074,7 @@ const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.
|
|
|
4065
4074
|
const wmsFeatures = createSelector(feature$4, (state) => state?.wmsFeatures);
|
|
4066
4075
|
const displayOptions = createSelector(feature$4, (state) => state?.display ?? BASE_DISPLAY_OPTIONS);
|
|
4067
4076
|
const capabilities = createSelector(feature$4, (state) => state?.capabilities);
|
|
4077
|
+
const layerGroups = createSelector(feature$4, (state) => state?.manifests.manifest.layerGroups ?? []);
|
|
4068
4078
|
const DashboardSelectors = {
|
|
4069
4079
|
feature: feature$4,
|
|
4070
4080
|
rank,
|
|
@@ -4101,7 +4111,8 @@ const DashboardSelectors = {
|
|
|
4101
4111
|
datasourceFilters,
|
|
4102
4112
|
wmsFeatures,
|
|
4103
4113
|
displayOptions,
|
|
4104
|
-
capabilities
|
|
4114
|
+
capabilities,
|
|
4115
|
+
layerGroups
|
|
4105
4116
|
};
|
|
4106
4117
|
|
|
4107
4118
|
const SearchActions = {
|
|
@@ -6324,7 +6335,11 @@ class PryEditInputComponent {
|
|
|
6324
6335
|
this._onChange = (_) => { };
|
|
6325
6336
|
this._onTouched = () => { };
|
|
6326
6337
|
this.editMode = false;
|
|
6338
|
+
this.showButton = false;
|
|
6327
6339
|
this.label = '';
|
|
6340
|
+
this.editButtonTooltip = '@pry.theme.editInput.toggle';
|
|
6341
|
+
this.confirmButtonTooltip = '@pry.theme.editInput.confirm';
|
|
6342
|
+
this.validated = new EventEmitter();
|
|
6328
6343
|
}
|
|
6329
6344
|
registerOnChange(fn) {
|
|
6330
6345
|
this._onChange = fn;
|
|
@@ -6345,15 +6360,18 @@ class PryEditInputComponent {
|
|
|
6345
6360
|
}
|
|
6346
6361
|
toggle(force) {
|
|
6347
6362
|
this.editMode = force !== undefined ? force : !this.editMode;
|
|
6363
|
+
if (this.editMode === false) {
|
|
6364
|
+
this.validated.emit(this.value);
|
|
6365
|
+
}
|
|
6348
6366
|
}
|
|
6349
6367
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryEditInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6350
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryEditInputComponent, selector: "pry-edit-input", inputs: { label: "label" }, providers: [
|
|
6368
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryEditInputComponent, selector: "pry-edit-input", inputs: { label: "label", editButtonTooltip: "editButtonTooltip", confirmButtonTooltip: "confirmButtonTooltip" }, outputs: { validated: "validated" }, providers: [
|
|
6351
6369
|
{
|
|
6352
6370
|
provide: NG_VALUE_ACCESSOR,
|
|
6353
6371
|
useExisting: forwardRef(() => PryEditInputComponent),
|
|
6354
6372
|
multi: true
|
|
6355
6373
|
}
|
|
6356
|
-
], ngImport: i0, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <
|
|
6374
|
+
], ngImport: i0, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"editMode ? confirmButtonTooltip : (editButtonTooltip | i18n)\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6357
6375
|
}
|
|
6358
6376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryEditInputComponent, decorators: [{
|
|
6359
6377
|
type: Component,
|
|
@@ -6363,9 +6381,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
6363
6381
|
useExisting: forwardRef(() => PryEditInputComponent),
|
|
6364
6382
|
multi: true
|
|
6365
6383
|
}
|
|
6366
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <
|
|
6384
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"o-pry-edit\" [class.-edit]=\"editMode\">\n <label id=\"edit-input-label-{{ id }}\" for=\"edit-input-{{ id }}\" class=\"a-label\">\n {{ label | i18n }}\n <span class=\"u-visually-hidden\">({{ label | i18n }})</span>\n </label>\n <div class=\"m-form-label-field__edit-inline\" (mouseenter)=\"showButton = true\" (mouseleave)=\"showButton = false\">\n <p class=\"m-form-label-field__edit-inline__txtvalue\" *ngIf=\"!editMode\">\n {{ value }}\n </p>\n <input\n *ngIf=\"editMode\"\n id=\"edit-input-{{ id }}\"\n type=\"text\"\n class=\"a-form-field\"\n [ngModel]=\"value\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <button\n [class.-button-visible]=\"showButton || editMode\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only -size-xs a-tooltip\"\n (click)=\"toggle()\"\n [attr.data-tooltip]=\"editMode ? confirmButtonTooltip : (editButtonTooltip | i18n)\"\n data-tooltip-position=\"left\"\n >\n <pry-icon [width]=\"16\" [height]=\"16\" [iconSvg]=\"editMode ? 'check' : 'edit'\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.theme.editInput.toggle' | i18n }}</span>\n </button>\n </div>\n</div>\n" }]
|
|
6367
6385
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
|
|
6368
6386
|
type: Input
|
|
6387
|
+
}], editButtonTooltip: [{
|
|
6388
|
+
type: Input
|
|
6389
|
+
}], confirmButtonTooltip: [{
|
|
6390
|
+
type: Input
|
|
6391
|
+
}], validated: [{
|
|
6392
|
+
type: Output
|
|
6369
6393
|
}] } });
|
|
6370
6394
|
|
|
6371
6395
|
const PRY_CARD_COMPONENTS = [PryEditInputComponent];
|
|
@@ -10375,11 +10399,11 @@ class SettingsComponent extends SubscriptionnerDirective {
|
|
|
10375
10399
|
this.subscriptions.unsubscribe();
|
|
10376
10400
|
}
|
|
10377
10401
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SettingsComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: SettingsComponent, selector: "pry-settings", inputs: { widgetIndex: "widgetIndex", isDisable: "isDisable", headerPresent: "headerPresent", open$: "open$", header: "header" }, outputs: { triggerClick: "triggerClick", saveTriggered: "saveTriggered", changeTitle: "changeTitle" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<button type=\"button\" (click)=\"toggle()\" class=\"a-btn a-btn--icon-text -settings\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n</button>\n\n<ng-template #template>\n <div class=\"o-settings__popup\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog_setting\">\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.widget.settings.title' | i18n }}</h2>\n <button\n type=\"button\"\n #cross\n (keydown.shift.tab)=\"focusElement(this.validate)\"\n (click)=\"toggle()\"\n class=\"a-btn a-btn--icon-only -close\"\n >\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"o-settings__popup__content\" (click)=\"this.triggerClick.next()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"widget_title\">{{ '@pry.widget.settings.changeTitle' | i18n }}
|
|
10402
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: SettingsComponent, selector: "pry-settings", inputs: { widgetIndex: "widgetIndex", isDisable: "isDisable", headerPresent: "headerPresent", open$: "open$", header: "header" }, outputs: { triggerClick: "triggerClick", saveTriggered: "saveTriggered", changeTitle: "changeTitle" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<button type=\"button\" (click)=\"toggle()\" class=\"a-btn a-btn--icon-text -settings\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n</button>\n\n<ng-template #template>\n <div class=\"o-settings__popup\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog_setting\">\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.widget.settings.title' | i18n }}</h2>\n <button\n type=\"button\"\n #cross\n (keydown.shift.tab)=\"focusElement(this.validate)\"\n (click)=\"toggle()\"\n class=\"a-btn a-btn--icon-only -close\"\n >\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"o-settings__popup__content\" (click)=\"this.triggerClick.next()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"widget_title\">{{ '@pry.widget.settings.changeTitle' | i18n }} :</label>\n <input\n class=\"a-form-field\"\n id=\"widget_title\"\n type=\"text\"\n [value]=\"manifest?.title ?? ''\"\n (input)=\"emitTitle($event)\"\n />\n </div>\n <ng-content></ng-content>\n </div>\n\n <div class=\"o-settings__popup__footer\">\n <button\n (click)=\"saveAndClose()\"\n [class.btn-primary__disable]=\"isDisable\"\n [disabled]=\"isDisable\"\n (keydown.tab)=\"focusElement(this.cross)\"\n class=\"a-btn a-btn--primary\"\n #validate\n >\n {{ '@pry.widget.settings.validateUpdating' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
10379
10403
|
}
|
|
10380
10404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SettingsComponent, decorators: [{
|
|
10381
10405
|
type: Component,
|
|
10382
|
-
args: [{ selector: 'pry-settings', template: "<button type=\"button\" (click)=\"toggle()\" class=\"a-btn a-btn--icon-text -settings\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n</button>\n\n<ng-template #template>\n <div class=\"o-settings__popup\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog_setting\">\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.widget.settings.title' | i18n }}</h2>\n <button\n type=\"button\"\n #cross\n (keydown.shift.tab)=\"focusElement(this.validate)\"\n (click)=\"toggle()\"\n class=\"a-btn a-btn--icon-only -close\"\n >\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"o-settings__popup__content\" (click)=\"this.triggerClick.next()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"widget_title\">{{ '@pry.widget.settings.changeTitle' | i18n }}
|
|
10406
|
+
args: [{ selector: 'pry-settings', template: "<button type=\"button\" (click)=\"toggle()\" class=\"a-btn a-btn--icon-text -settings\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n</button>\n\n<ng-template #template>\n <div class=\"o-settings__popup\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog_setting\">\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.widget.settings.title' | i18n }}</h2>\n <button\n type=\"button\"\n #cross\n (keydown.shift.tab)=\"focusElement(this.validate)\"\n (click)=\"toggle()\"\n class=\"a-btn a-btn--icon-only -close\"\n >\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"o-settings__popup__content\" (click)=\"this.triggerClick.next()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"widget_title\">{{ '@pry.widget.settings.changeTitle' | i18n }} :</label>\n <input\n class=\"a-form-field\"\n id=\"widget_title\"\n type=\"text\"\n [value]=\"manifest?.title ?? ''\"\n (input)=\"emitTitle($event)\"\n />\n </div>\n <ng-content></ng-content>\n </div>\n\n <div class=\"o-settings__popup__footer\">\n <button\n (click)=\"saveAndClose()\"\n [class.btn-primary__disable]=\"isDisable\"\n [disabled]=\"isDisable\"\n (keydown.tab)=\"focusElement(this.cross)\"\n class=\"a-btn a-btn--primary\"\n #validate\n >\n {{ '@pry.widget.settings.validateUpdating' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
10383
10407
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { triggerClick: [{
|
|
10384
10408
|
type: Output
|
|
10385
10409
|
}], widgetIndex: [{
|
|
@@ -11290,6 +11314,24 @@ class DashboardEffects {
|
|
|
11290
11314
|
}),
|
|
11291
11315
|
DashboardActions.followManifestRoute()
|
|
11292
11316
|
])))));
|
|
11317
|
+
this.confirmLayerGroupDeletion$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.confirmLayerGroupDeletion), tap((action) => {
|
|
11318
|
+
const data = {
|
|
11319
|
+
title: '@pry.widget.map.layerSettings.confirmDelete',
|
|
11320
|
+
actions: [
|
|
11321
|
+
{
|
|
11322
|
+
id: 0,
|
|
11323
|
+
label: '@pry.toolbox.manifest.validate',
|
|
11324
|
+
actions: [DashboardActions.deleteLayerGroup({ name: action.name })]
|
|
11325
|
+
},
|
|
11326
|
+
{
|
|
11327
|
+
id: 1,
|
|
11328
|
+
label: '@pry.toolbox.manifest.close',
|
|
11329
|
+
color: 'secondary'
|
|
11330
|
+
}
|
|
11331
|
+
]
|
|
11332
|
+
};
|
|
11333
|
+
this.pryDialog.open(PryDialogConfirmComponent, { data });
|
|
11334
|
+
})), { dispatch: false });
|
|
11293
11335
|
dashboardInitService.init();
|
|
11294
11336
|
refreshService.start();
|
|
11295
11337
|
}
|
|
@@ -11947,6 +11989,71 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
11947
11989
|
...state.manifests,
|
|
11948
11990
|
loading: true
|
|
11949
11991
|
}
|
|
11992
|
+
})), on(DashboardActions.initDefaultLayerGroup, (state, action) => ({
|
|
11993
|
+
...state,
|
|
11994
|
+
manifests: {
|
|
11995
|
+
...state.manifests,
|
|
11996
|
+
manifest: {
|
|
11997
|
+
...state.manifests.manifest,
|
|
11998
|
+
layerGroups: state.manifests.manifest.layerGroups?.some((group) => group.name === 'DEFAULT')
|
|
11999
|
+
? state.manifests.manifest.layerGroups.map((group) => action.layers ? { ...group, visibleLayers: action.layers } : group)
|
|
12000
|
+
: [
|
|
12001
|
+
...(state.manifests.manifest.layerGroups ?? []),
|
|
12002
|
+
{
|
|
12003
|
+
name: 'DEFAULT',
|
|
12004
|
+
singleLayer: false,
|
|
12005
|
+
visibleLayers: action.layers ? action.layers : []
|
|
12006
|
+
}
|
|
12007
|
+
]
|
|
12008
|
+
}
|
|
12009
|
+
}
|
|
12010
|
+
})), on(DashboardActions.addLayerGroup, (state, action) => ({
|
|
12011
|
+
...state,
|
|
12012
|
+
manifests: {
|
|
12013
|
+
...state.manifests,
|
|
12014
|
+
manifest: {
|
|
12015
|
+
...state.manifests.manifest,
|
|
12016
|
+
layerGroups: [
|
|
12017
|
+
{
|
|
12018
|
+
name: action.defaultTitle + ' ' + ((state.manifests.manifest.layerGroups?.length ?? 0) + 1).toString(),
|
|
12019
|
+
singleLayer: false,
|
|
12020
|
+
visibleLayers: []
|
|
12021
|
+
},
|
|
12022
|
+
...(state.manifests.manifest.layerGroups ?? [])
|
|
12023
|
+
]
|
|
12024
|
+
}
|
|
12025
|
+
}
|
|
12026
|
+
})), on(DashboardActions.updateLayerGroup, (state, action) => ({
|
|
12027
|
+
...state,
|
|
12028
|
+
manifests: {
|
|
12029
|
+
...state.manifests,
|
|
12030
|
+
manifest: {
|
|
12031
|
+
...state.manifests.manifest,
|
|
12032
|
+
layerGroups: [
|
|
12033
|
+
...(state.manifests.manifest.layerGroups ?? []).map((group) => group.name === action.name
|
|
12034
|
+
? {
|
|
12035
|
+
...group,
|
|
12036
|
+
name: action.newName ?? group.name,
|
|
12037
|
+
singleLayer: action.singleLayer ?? group.singleLayer,
|
|
12038
|
+
visibleLayers: action.visibleLayers
|
|
12039
|
+
? typeof action.visibleLayers === 'string'
|
|
12040
|
+
? [...group.visibleLayers, action.visibleLayers]
|
|
12041
|
+
: action.visibleLayers
|
|
12042
|
+
: group.visibleLayers
|
|
12043
|
+
}
|
|
12044
|
+
: group)
|
|
12045
|
+
]
|
|
12046
|
+
}
|
|
12047
|
+
}
|
|
12048
|
+
})), on(DashboardActions.deleteLayerGroup, (state, action) => ({
|
|
12049
|
+
...state,
|
|
12050
|
+
manifests: {
|
|
12051
|
+
...state.manifests,
|
|
12052
|
+
manifest: {
|
|
12053
|
+
...state.manifests.manifest,
|
|
12054
|
+
layerGroups: state.manifests.manifest.layerGroups.filter((group) => group.name !== action.name)
|
|
12055
|
+
}
|
|
12056
|
+
}
|
|
11950
12057
|
})));
|
|
11951
12058
|
function dashboardReducer(state, action) {
|
|
11952
12059
|
return internalReducer(state, action);
|