@provoly/dashboard 0.24.8 → 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/display-options.interface.mjs +3 -1
- 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/toolbox/toolbox.model.mjs +9 -1
- 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-toolbox.mjs +26 -19
- 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-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 +121 -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/display-options.interface.d.ts +1 -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;
|
|
@@ -3905,6 +3914,7 @@ const BASE_DISPLAY_OPTIONS = {
|
|
|
3905
3914
|
catalog: false,
|
|
3906
3915
|
useFilters: false,
|
|
3907
3916
|
toolbox: {
|
|
3917
|
+
edit_action: false,
|
|
3908
3918
|
save_view: false,
|
|
3909
3919
|
save_view_as: false,
|
|
3910
3920
|
filter_settings: false,
|
|
@@ -3961,6 +3971,7 @@ function getDisplayOptions(mode) {
|
|
|
3961
3971
|
catalog: true,
|
|
3962
3972
|
useFilters: true,
|
|
3963
3973
|
toolbox: {
|
|
3974
|
+
edit_action: false,
|
|
3964
3975
|
save_view: true,
|
|
3965
3976
|
save_view_as: true,
|
|
3966
3977
|
filter_settings: true,
|
|
@@ -3989,10 +4000,10 @@ const rank = createSelector(manifests, (manifests) => manifests?.tenants.indexOf
|
|
|
3989
4000
|
const currentManifestId = createSelector(manifests, (manifests) => manifests.currentId);
|
|
3990
4001
|
const globalManifest = createSelector(manifests,
|
|
3991
4002
|
// @ts-ignore
|
|
3992
|
-
(manifests) => ({ windows: [], ...manifests?.manifest } ?? { windows: [] })
|
|
4003
|
+
(manifests) => ({ windows: [], ...manifests?.manifest }) ?? { windows: [] });
|
|
3993
4004
|
const staticManifest = createSelector(manifests,
|
|
3994
4005
|
// @ts-ignore
|
|
3995
|
-
(manifests) => ({ windows: [], ...manifests?.staticManifest } ?? { windows: [] })
|
|
4006
|
+
(manifests) => ({ windows: [], ...manifests?.staticManifest }) ?? { windows: [] });
|
|
3996
4007
|
const loading = createSelector(manifests, (manifests) => !!manifests?.loading);
|
|
3997
4008
|
const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
|
|
3998
4009
|
const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
|
|
@@ -4063,6 +4074,7 @@ const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.
|
|
|
4063
4074
|
const wmsFeatures = createSelector(feature$4, (state) => state?.wmsFeatures);
|
|
4064
4075
|
const displayOptions = createSelector(feature$4, (state) => state?.display ?? BASE_DISPLAY_OPTIONS);
|
|
4065
4076
|
const capabilities = createSelector(feature$4, (state) => state?.capabilities);
|
|
4077
|
+
const layerGroups = createSelector(feature$4, (state) => state?.manifests.manifest.layerGroups ?? []);
|
|
4066
4078
|
const DashboardSelectors = {
|
|
4067
4079
|
feature: feature$4,
|
|
4068
4080
|
rank,
|
|
@@ -4099,7 +4111,8 @@ const DashboardSelectors = {
|
|
|
4099
4111
|
datasourceFilters,
|
|
4100
4112
|
wmsFeatures,
|
|
4101
4113
|
displayOptions,
|
|
4102
|
-
capabilities
|
|
4114
|
+
capabilities,
|
|
4115
|
+
layerGroups
|
|
4103
4116
|
};
|
|
4104
4117
|
|
|
4105
4118
|
const SearchActions = {
|
|
@@ -6322,7 +6335,11 @@ class PryEditInputComponent {
|
|
|
6322
6335
|
this._onChange = (_) => { };
|
|
6323
6336
|
this._onTouched = () => { };
|
|
6324
6337
|
this.editMode = false;
|
|
6338
|
+
this.showButton = false;
|
|
6325
6339
|
this.label = '';
|
|
6340
|
+
this.editButtonTooltip = '@pry.theme.editInput.toggle';
|
|
6341
|
+
this.confirmButtonTooltip = '@pry.theme.editInput.confirm';
|
|
6342
|
+
this.validated = new EventEmitter();
|
|
6326
6343
|
}
|
|
6327
6344
|
registerOnChange(fn) {
|
|
6328
6345
|
this._onChange = fn;
|
|
@@ -6343,15 +6360,18 @@ class PryEditInputComponent {
|
|
|
6343
6360
|
}
|
|
6344
6361
|
toggle(force) {
|
|
6345
6362
|
this.editMode = force !== undefined ? force : !this.editMode;
|
|
6363
|
+
if (this.editMode === false) {
|
|
6364
|
+
this.validated.emit(this.value);
|
|
6365
|
+
}
|
|
6346
6366
|
}
|
|
6347
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 }); }
|
|
6348
|
-
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: [
|
|
6349
6369
|
{
|
|
6350
6370
|
provide: NG_VALUE_ACCESSOR,
|
|
6351
6371
|
useExisting: forwardRef(() => PryEditInputComponent),
|
|
6352
6372
|
multi: true
|
|
6353
6373
|
}
|
|
6354
|
-
], 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 }); }
|
|
6355
6375
|
}
|
|
6356
6376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryEditInputComponent, decorators: [{
|
|
6357
6377
|
type: Component,
|
|
@@ -6361,9 +6381,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
6361
6381
|
useExisting: forwardRef(() => PryEditInputComponent),
|
|
6362
6382
|
multi: true
|
|
6363
6383
|
}
|
|
6364
|
-
], 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" }]
|
|
6365
6385
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
|
|
6366
6386
|
type: Input
|
|
6387
|
+
}], editButtonTooltip: [{
|
|
6388
|
+
type: Input
|
|
6389
|
+
}], confirmButtonTooltip: [{
|
|
6390
|
+
type: Input
|
|
6391
|
+
}], validated: [{
|
|
6392
|
+
type: Output
|
|
6367
6393
|
}] } });
|
|
6368
6394
|
|
|
6369
6395
|
const PRY_CARD_COMPONENTS = [PryEditInputComponent];
|
|
@@ -10373,11 +10399,11 @@ class SettingsComponent extends SubscriptionnerDirective {
|
|
|
10373
10399
|
this.subscriptions.unsubscribe();
|
|
10374
10400
|
}
|
|
10375
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 }); }
|
|
10376
|
-
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" }] }); }
|
|
10377
10403
|
}
|
|
10378
10404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SettingsComponent, decorators: [{
|
|
10379
10405
|
type: Component,
|
|
10380
|
-
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" }]
|
|
10381
10407
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { triggerClick: [{
|
|
10382
10408
|
type: Output
|
|
10383
10409
|
}], widgetIndex: [{
|
|
@@ -11288,6 +11314,24 @@ class DashboardEffects {
|
|
|
11288
11314
|
}),
|
|
11289
11315
|
DashboardActions.followManifestRoute()
|
|
11290
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 });
|
|
11291
11335
|
dashboardInitService.init();
|
|
11292
11336
|
refreshService.start();
|
|
11293
11337
|
}
|
|
@@ -11945,6 +11989,71 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
11945
11989
|
...state.manifests,
|
|
11946
11990
|
loading: true
|
|
11947
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
|
+
}
|
|
11948
12057
|
})));
|
|
11949
12058
|
function dashboardReducer(state, action) {
|
|
11950
12059
|
return internalReducer(state, action);
|