@provoly/dashboard 0.24.14 → 0.25.1
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/esm2022/filters/autocomplete/autocomplete.component.mjs +2 -2
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +3 -3
- package/esm2022/lib/core/i18n/en.translations.mjs +2 -1
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
- package/esm2022/lib/core/store/search/filter-param-encoder.mjs +27 -0
- package/esm2022/lib/core/store/search/search.selectors.mjs +2 -2
- package/esm2022/lib/core/store/search/search.service.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -3
- package/esm2022/toolbox/components/share/share.component.mjs +47 -18
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +1 -1
- package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +45 -17
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +35 -8
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/core/store/search/filter-param-encoder.d.ts +5 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +0 -6
- package/package.json +31 -31
- package/toolbox/components/share/share.component.d.ts +13 -7
|
@@ -3,7 +3,7 @@ import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, AsyncPipe, DOCUMENT } from '@angular/common';
|
|
5
5
|
import * as i1$2 from '@angular/common/http';
|
|
6
|
-
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
6
|
+
import { HttpHeaders, HttpUrlEncodingCodec, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { InjectionToken, Injectable, Directive, Optional, Inject, Input, Component, Pipe, ChangeDetectionStrategy, HostBinding, SecurityContext, NgModule, EventEmitter, Output, TemplateRef, ViewChild, Injector, ContentChildren, forwardRef, HostListener, ViewContainerRef, ViewChildren, ViewEncapsulation, createNgModule } from '@angular/core';
|
|
9
9
|
import * as i3 from '@angular/router';
|
|
@@ -478,6 +478,7 @@ const enTranslations$1 = {
|
|
|
478
478
|
restricted: 'Restricted',
|
|
479
479
|
type: 'Visibility',
|
|
480
480
|
users: 'Authorized users',
|
|
481
|
+
noGroups: 'No group available',
|
|
481
482
|
conflict: {
|
|
482
483
|
title: 'Warning',
|
|
483
484
|
main: 'The following data sources are not accessible to the selected user groups:',
|
|
@@ -877,6 +878,7 @@ const frTranslations$1 = {
|
|
|
877
878
|
restricted: 'Restreint',
|
|
878
879
|
type: 'Visibilité',
|
|
879
880
|
users: 'Utilisateurs autorisés',
|
|
881
|
+
noGroups: 'Aucun groupe disponible',
|
|
880
882
|
conflict: {
|
|
881
883
|
title: 'Warning',
|
|
882
884
|
main: 'Attention, les sources de données suivantes ne seront pas visible de toutes les personnes accédant à la présentation : ',
|
|
@@ -3893,8 +3895,7 @@ const DashboardActions = {
|
|
|
3893
3895
|
addLayerGroup: createAction('[Dashboard] add map layer group', props()),
|
|
3894
3896
|
updateLayerGroup: createAction('[Dashboard] update map layer group', props()),
|
|
3895
3897
|
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())
|
|
3898
|
+
deleteLayerGroup: createAction('[Dashboard] delete map layer group', props())
|
|
3898
3899
|
};
|
|
3899
3900
|
|
|
3900
3901
|
var DashboardGridLayout;
|
|
@@ -4126,6 +4127,32 @@ const SearchActions = {
|
|
|
4126
4127
|
setPossibleFilterValues: createAction('[Dashboard] (bus) set possible filter values', props())
|
|
4127
4128
|
};
|
|
4128
4129
|
|
|
4130
|
+
const operators = [
|
|
4131
|
+
'EQUALS',
|
|
4132
|
+
'CONTAINS',
|
|
4133
|
+
'I_CONTAINS',
|
|
4134
|
+
'GREATER_THAN',
|
|
4135
|
+
'START_WITH',
|
|
4136
|
+
'END_WITH',
|
|
4137
|
+
'LOWER_THAN',
|
|
4138
|
+
'INSIDE',
|
|
4139
|
+
'OUTSIDE'
|
|
4140
|
+
];
|
|
4141
|
+
class FilterParamEncoder extends HttpUrlEncodingCodec {
|
|
4142
|
+
constructor() {
|
|
4143
|
+
super();
|
|
4144
|
+
}
|
|
4145
|
+
encodeValue(v) {
|
|
4146
|
+
const hasOperator = operators.includes(v.split(',')?.[1]);
|
|
4147
|
+
if (hasOperator) {
|
|
4148
|
+
const fragments = v.split(',');
|
|
4149
|
+
fragments[2] = encodeURIComponent(fragments.splice(2).join('\\,'));
|
|
4150
|
+
return fragments.slice(0, 3).join(',');
|
|
4151
|
+
}
|
|
4152
|
+
return encodeURIComponent(v);
|
|
4153
|
+
}
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4129
4156
|
class SearchService {
|
|
4130
4157
|
constructor(httpClient, store) {
|
|
4131
4158
|
this.httpClient = httpClient;
|
|
@@ -4152,7 +4179,7 @@ class SearchService {
|
|
|
4152
4179
|
return '|' + this.getItemsFilter(id, this.getOrder(quickOrder[id])).toString() + '|';
|
|
4153
4180
|
}
|
|
4154
4181
|
getItemsFilter(id, cumulative, includeLimit = true) {
|
|
4155
|
-
let params = cumulative ?? new HttpParams();
|
|
4182
|
+
let params = cumulative ?? new HttpParams({ encoder: new FilterParamEncoder() });
|
|
4156
4183
|
if (this.filters[id]) {
|
|
4157
4184
|
this.filters[id]
|
|
4158
4185
|
.filter((filter) => filter.value !== null && filter.value !== undefined)
|
|
@@ -4167,7 +4194,7 @@ class SearchService {
|
|
|
4167
4194
|
return params;
|
|
4168
4195
|
}
|
|
4169
4196
|
getOrder(quickOrder, cumulative) {
|
|
4170
|
-
let params = cumulative ?? new HttpParams();
|
|
4197
|
+
let params = cumulative ?? new HttpParams({ encoder: new FilterParamEncoder() });
|
|
4171
4198
|
if (quickOrder) {
|
|
4172
4199
|
params = params.append('order', `${quickOrder.attribute},${quickOrder.asc ?? ''}`);
|
|
4173
4200
|
}
|
|
@@ -5381,7 +5408,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
5381
5408
|
|
|
5382
5409
|
const feature$2 = createFeatureSelector(searchFeatureKey);
|
|
5383
5410
|
const searchLoading = createSelector(feature$2, (state) => state.searchLoading);
|
|
5384
|
-
const possibleFilterValues = (filterId) => createSelector(feature$2, (state) =>
|
|
5411
|
+
const possibleFilterValues = (filterId) => createSelector(feature$2, (state) => filterId && state.possibleFilterValues[filterId] ? state.possibleFilterValues[filterId] : []);
|
|
5385
5412
|
const SearchSelectors = {
|
|
5386
5413
|
feature: feature$2,
|
|
5387
5414
|
searchLoading,
|
|
@@ -7516,7 +7543,7 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
|
|
|
7516
7543
|
useExisting: forwardRef(() => PryGroupShareComponent),
|
|
7517
7544
|
multi: true
|
|
7518
7545
|
}
|
|
7519
|
-
], usesInheritance: true, ngImport: i0, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n <pry-chips-selector\n
|
|
7546
|
+
], usesInheritance: true, ngImport: i0, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n @if (data.groups.length > 0) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [showActionButtons]=\"false\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event)\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n } @else {\n <p class=\"m-text--center\">\n {{ '@pry.share.noGroups' | i18n }}\n </p>\n }\n }\n}\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: "component", type: ChipsSelectorComponent, selector: "pry-chips-selector", inputs: ["bindValue", "bindLabel", "translationStringBase", "itemTranslationStringBase", "showActionButtons", "showSearchbar", "items", "usedItems"], outputs: ["cancel", "validated", "previousTab", "nextTab", "itemsChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7520
7547
|
}
|
|
7521
7548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryGroupShareComponent, decorators: [{
|
|
7522
7549
|
type: Component,
|
|
@@ -7526,7 +7553,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
7526
7553
|
useExisting: forwardRef(() => PryGroupShareComponent),
|
|
7527
7554
|
multi: true
|
|
7528
7555
|
}
|
|
7529
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n <pry-chips-selector\n
|
|
7556
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n @if (data.groups.length > 0) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [showActionButtons]=\"false\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event)\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n } @else {\n <p class=\"m-text--center\">\n {{ '@pry.share.noGroups' | i18n }}\n </p>\n }\n }\n}\n" }]
|
|
7530
7557
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ChangeDetectorRef }], propDecorators: { disableRadios: [{
|
|
7531
7558
|
type: Input
|
|
7532
7559
|
}], allowedGroups: [{
|