@provoly/dashboard 1.3.6 → 1.3.7

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.
Files changed (43) hide show
  1. package/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.d.ts +3 -2
  2. package/admin/components/admin-dataset/admin-dataset.component.d.ts +2 -0
  3. package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +4 -3
  4. package/admin/i18n/en.translations.d.ts +7 -0
  5. package/admin/i18n/fr.translations.d.ts +5 -0
  6. package/assets/svgs/groups.svg +16 -0
  7. package/assets/svgs/public.svg +1 -16
  8. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +2 -2
  9. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +12 -9
  10. package/esm2022/admin/components/admin-dataset/admin-dataset.component.mjs +6 -4
  11. package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +7 -5
  12. package/esm2022/admin/i18n/en.translations.mjs +10 -3
  13. package/esm2022/admin/i18n/fr.translations.mjs +6 -1
  14. package/esm2022/lib/core/components/chips-selector/chips-selector.component.mjs +4 -4
  15. package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +28 -40
  16. package/esm2022/lib/core/components/share/share.utils.mjs +13 -1
  17. package/esm2022/lib/core/i18n/en.translations.mjs +11 -4
  18. package/esm2022/lib/core/i18n/fr.translations.mjs +11 -4
  19. package/esm2022/lib/core/store/class/class.reducer.mjs +8 -2
  20. package/esm2022/lib/core/store/class/class.selectors.mjs +4 -2
  21. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +4 -3
  22. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +12 -5
  23. package/esm2022/restitution/components/restitution/restitution.component.mjs +4 -4
  24. package/esm2022/restitution/i18n/fr.translations.mjs +2 -2
  25. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +70 -61
  26. package/fesm2022/provoly-dashboard-admin.mjs +34 -15
  27. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  28. package/fesm2022/provoly-dashboard-restitution.mjs +4 -4
  29. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  30. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +69 -60
  31. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  32. package/fesm2022/provoly-dashboard.mjs +226 -196
  33. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  34. package/lib/core/components/share/group-share/group-share.component.d.ts +4 -7
  35. package/lib/core/components/share/share.utils.d.ts +2 -0
  36. package/lib/core/i18n/en.translations.d.ts +10 -3
  37. package/lib/core/i18n/fr.translations.d.ts +10 -3
  38. package/lib/core/store/class/class.selectors.d.ts +1 -0
  39. package/lib/dashboard/store/dashboard.actions.d.ts +7 -6
  40. package/package.json +12 -12
  41. package/styles/components/_a-page-loader.scss +6 -0
  42. package/styles/components/_o-layer-settings.scss +2 -2
  43. package/widgets/widget-map/component/widget-map.component.d.ts +4 -2
@@ -491,9 +491,16 @@ const enTranslations$1 = {
491
491
  }
492
492
  },
493
493
  share: {
494
- private: 'Private',
495
- public: 'Public',
496
- groups: 'Restricted',
494
+ iconLabel: {
495
+ PRIVATE: 'Private',
496
+ GROUPS: 'Shared to some user groups',
497
+ PUBLIC: 'Public',
498
+ },
499
+ radioLabel: {
500
+ PRIVATE: 'Private',
501
+ GROUPS: 'Share to selected user groups',
502
+ PUBLIC: 'Public',
503
+ },
497
504
  type: 'Visibility',
498
505
  users: 'Authorized users',
499
506
  noGroups: 'No group available',
@@ -908,9 +915,16 @@ const frTranslations$1 = {
908
915
  }
909
916
  },
910
917
  share: {
911
- private: 'Privé',
912
- public: 'Public',
913
- groups: 'Restreint',
918
+ iconLabel: {
919
+ PRIVATE: 'Privé',
920
+ GROUPS: "Partagé aux groupes d'utilisateurs",
921
+ PUBLIC: 'Public',
922
+ },
923
+ radioLabel: {
924
+ PRIVATE: 'Privé',
925
+ GROUPS: 'Restreint',
926
+ PUBLIC: 'Public',
927
+ },
914
928
  type: 'Visibilité',
915
929
  users: 'Utilisateurs autorisés',
916
930
  groupLabels: {
@@ -2968,7 +2982,13 @@ const initialClassState = adapter$2.getInitialState({
2968
2982
  classDatas: [],
2969
2983
  datasetCounts: []
2970
2984
  });
2971
- const internalReducer$3 = createReducer(initialClassState, on(ClassActions.loadSuccess, (state, action) => adapter$2.setAll(action.classes, state)), on(ClassActions.loadDatasetCount, (state, action) => ({
2985
+ const internalReducer$3 = createReducer(initialClassState, on(ClassActions.load, (state, action) => ({
2986
+ ...state,
2987
+ loading: true
2988
+ })), on(ClassActions.loadSuccess, (state, action) => ({
2989
+ ...adapter$2.setAll(action.classes, state),
2990
+ loading: false
2991
+ })), on(ClassActions.loadDatasetCount, (state, action) => ({
2972
2992
  ...state,
2973
2993
  loading: true
2974
2994
  })), on(ClassActions.loadDatasetCountSuccess, (state, action) => ({
@@ -3003,6 +3023,7 @@ const attributesByFieldId = (field) => createSelector(classes, (classes) => clas
3003
3023
  const allAttributes = createSelector(classes, (state) => state?.flatMap((c) => c.attributes));
3004
3024
  const datasetCounts = createSelector(feature$6, (state) => state?.datasetCounts);
3005
3025
  const getAttributeById = (id) => createSelector(allAttributes, (attributes) => attributes.filter((attribute) => attribute.id === id));
3026
+ const loading$1 = createSelector(feature$6, (state) => state?.loading);
3006
3027
  const ClassSelectors = {
3007
3028
  feature: feature$6,
3008
3029
  entities: entities$2,
@@ -3012,7 +3033,8 @@ const ClassSelectors = {
3012
3033
  attributesByFieldId,
3013
3034
  allAttributes,
3014
3035
  datasetCounts,
3015
- getAttributeById
3036
+ getAttributeById,
3037
+ loading: loading$1
3016
3038
  };
3017
3039
 
3018
3040
  const defaultImage = new Image();
@@ -3821,9 +3843,10 @@ const DashboardActions = {
3821
3843
  loadPresentation: createAction('[Dashboard] load presentation', props()),
3822
3844
  initDefaultLayerGroup: createAction('[Dashboard] init default layer group', props()),
3823
3845
  addLayerGroup: createAction('[Dashboard] add map layer group', props()),
3824
- updateLayerGroup: createAction('[Dashboard] update map layer group', props()),
3846
+ updateLayerVisibility: createAction('[Dashboard] update visible layers on the layer group', props()),
3825
3847
  confirmLayerGroupDeletion: createAction('[Dashboard] confirm deleting map layer group', props()),
3826
- deleteLayerGroup: createAction('[Dashboard] delete map layer group', props())
3848
+ deleteLayerGroup: createAction('[Dashboard] delete map layer group', props()),
3849
+ updateLayerGroups: createAction('[Dashboard] update all layer groups', props())
3827
3850
  };
3828
3851
 
3829
3852
  var DashboardGridLayout;
@@ -7414,146 +7437,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
7414
7437
  }]
7415
7438
  }] });
7416
7439
 
7417
- const PUBLIC_GROUP = 'ALL';
7418
- const AUTHENTICATED_USERS_GROUP = 'AUTHENTICATED';
7419
- const SYSTEM_GROUPS = [PUBLIC_GROUP, AUTHENTICATED_USERS_GROUP];
7420
- const READ_ACCESS = 'READ';
7421
- const WRITE_ACCESS = 'WRITE';
7422
- // GROUP UTIL METHODS
7423
- const getGroupLabel = (group, i18n) => {
7424
- return group.system ? i18n.instant('@pry.share.groupLabels.' + group.name) : group.name;
7425
- };
7426
- const getGroupLabelByName = (groupName, i18n) => {
7427
- return i18n.instant('@pry.share.groupLabels.' + groupName).startsWith('@')
7428
- ? groupName
7429
- : i18n.instant('@pry.share.groupLabels.' + groupName);
7430
- };
7431
- // DASHBOARD GROUP RIGHTS METHODS
7432
- const canManifestBeMadePublic = (manifest, datasets) => {
7433
- return manifest.datasource.every((dsId) => {
7434
- const datasource = datasets.find((d) => d.id === dsId);
7435
- return datasource?.groups?.includes(PUBLIC_GROUP) ?? false;
7436
- });
7437
- };
7438
- const getCommonDatasourceGroupsForManifest = (manifest, datasets, allGroups) => {
7439
- let result = [];
7440
- const allDsGroups = manifest.datasource.map((dsId) => datasets.find((d) => d.id === dsId)?.groups ?? []);
7441
- if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP))) {
7442
- result = allGroups.map((group) => group.name);
7443
- }
7444
- else if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP) || dsGroups.includes(AUTHENTICATED_USERS_GROUP))) {
7445
- result = allGroups.filter((group) => group.name !== PUBLIC_GROUP).map((group) => group.name);
7446
- }
7447
- else {
7448
- const allDsGroupsFiltered = allDsGroups.filter((dsGroups) => !dsGroups.includes(AUTHENTICATED_USERS_GROUP) && !dsGroups.includes(PUBLIC_GROUP));
7449
- const baseArray = allDsGroupsFiltered[0];
7450
- for (let i = 0; i < baseArray.length; i++) {
7451
- const group = baseArray[i];
7452
- if (allDsGroupsFiltered.every((dsGroups) => dsGroups.includes(group))) {
7453
- result.push(group);
7454
- }
7455
- }
7456
- }
7457
- return result;
7458
- };
7459
- // ACCESS RIGHTS METHODS
7460
- const getAccessRightsArrayByGroup = (accessByGroup) => {
7461
- let result = {};
7462
- Object.keys(accessByGroup).forEach((key) => {
7463
- result[key] = getAccessArray(accessByGroup[key]);
7464
- });
7465
- return result;
7466
- };
7467
- const getAccessArray = (access) => {
7468
- switch (access) {
7469
- case READ_ACCESS:
7470
- return [READ_ACCESS];
7471
- case WRITE_ACCESS:
7472
- return [READ_ACCESS, WRITE_ACCESS];
7473
- default:
7474
- return [];
7475
- }
7476
- };
7477
- const getAccessRightsStringByGroup = (accessByGroup) => {
7478
- let result = {};
7479
- Object.keys(accessByGroup).forEach((key) => {
7480
- result[key] = getAccessString(accessByGroup[key]);
7481
- });
7482
- return result;
7483
- };
7484
- const getAccessString = (accessArray) => {
7485
- if (accessArray.includes(WRITE_ACCESS)) {
7486
- return WRITE_ACCESS;
7487
- }
7488
- else {
7489
- return READ_ACCESS;
7490
- }
7491
- };
7492
-
7493
- class PryShareComponent {
7494
- constructor(_cd) {
7495
- this._cd = _cd;
7496
- this._onChange = (_) => { };
7497
- this._onTouched = () => { };
7498
- this._disabled = false;
7499
- this.value = [];
7500
- this.stringValue = 'private';
7501
- this.labelProperty = 'label';
7502
- this.valueProperty = 'value';
7503
- this.visibilityTypes = [
7504
- { name: 'public', icon: 'public' },
7505
- { name: 'private', icon: 'private' }
7506
- ];
7507
- }
7508
- registerOnChange(fn) {
7509
- this._onChange = fn;
7510
- }
7511
- registerOnTouched(fn) {
7512
- this._onTouched = fn;
7513
- }
7514
- setDisabledState(isDisabled) {
7515
- this._disabled = isDisabled;
7516
- this._cd.markForCheck();
7517
- }
7518
- writeValue(value) {
7519
- if (value) {
7520
- this.value = value;
7521
- this.stringValue = value.length > 0 ? 'public' : 'private';
7522
- this._onChange(this.value);
7523
- this._onTouched();
7524
- this._cd.markForCheck();
7525
- }
7526
- }
7527
- onChange($event) {
7528
- this.value = $event === 'public' ? [PUBLIC_GROUP] : [];
7529
- this.writeValue(this.value);
7530
- this._onTouched();
7531
- this._cd.markForCheck();
7532
- }
7533
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
7534
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryShareComponent, selector: "pry-share", inputs: { labelProperty: "labelProperty", valueProperty: "valueProperty" }, providers: [
7535
- {
7536
- provide: NG_VALUE_ACCESSOR,
7537
- useExisting: forwardRef(() => PryShareComponent),
7538
- multi: true
7539
- }
7540
- ], ngImport: i0, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"onChange($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"stringValue\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"name\"\n bindLabel=\"name\"\n bindIcon=\"icon\"\n id=\"share_type\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n", dependencies: [{ kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7541
- }
7542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, decorators: [{
7543
- type: Component,
7544
- args: [{ selector: 'pry-share', providers: [
7545
- {
7546
- provide: NG_VALUE_ACCESSOR,
7547
- useExisting: forwardRef(() => PryShareComponent),
7548
- multi: true
7549
- }
7550
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"onChange($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"stringValue\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"name\"\n bindLabel=\"name\"\n bindIcon=\"icon\"\n id=\"share_type\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n" }]
7551
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { labelProperty: [{
7552
- type: Input
7553
- }], valueProperty: [{
7554
- type: Input
7555
- }] } });
7556
-
7557
7440
  class ChipsSelectorComponent extends SubscriptionnerDirective {
7558
7441
  set items(items) {
7559
7442
  this.items$.next(items);
@@ -7580,7 +7463,6 @@ class ChipsSelectorComponent extends SubscriptionnerDirective {
7580
7463
  return (items?.filter((item) => !this.isItemUsed(item, usedItems) && this.getItemLabel(item).toLowerCase().includes(search.toLowerCase())) ?? []);
7581
7464
  }));
7582
7465
  this.subscriptions.add(this.items$.subscribe((items) => items?.forEach((item) => (this.idToLabel[this.getItemValue(item)] = this.getItemLabel(item)))));
7583
- this.subscriptions.add(this.usedItems$.subscribe((usedItems) => this.itemsChanged.emit(usedItems ?? [])));
7584
7466
  }
7585
7467
  toggleItemSelection(item) {
7586
7468
  if (!this.isItemUsed(item)) {
@@ -7590,6 +7472,7 @@ class ChipsSelectorComponent extends SubscriptionnerDirective {
7590
7472
  this.usedItems$.next(this.usedItems$.getValue().filter((usedItem) => !this.areItemsEqual(usedItem, item)));
7591
7473
  }
7592
7474
  this.cdr.detectChanges();
7475
+ this.itemsChanged.emit(this.usedItems$.getValue());
7593
7476
  }
7594
7477
  search($event) {
7595
7478
  this.search$.next($event);
@@ -7601,7 +7484,7 @@ class ChipsSelectorComponent extends SubscriptionnerDirective {
7601
7484
  getItemLabel(item) {
7602
7485
  const label = this.bindLabel ? item[this.bindLabel] : item;
7603
7486
  const labelTranslated = this.itemTranslationStringBase
7604
- ? this.i18n.instant(this.itemTranslationStringBase + label)
7487
+ ? this.i18n.instant(this.itemTranslationStringBase + label, undefined, false)
7605
7488
  : label;
7606
7489
  return typeof labelTranslated === 'string'
7607
7490
  ? labelTranslated.startsWith(this.itemTranslationStringBase)
@@ -7615,7 +7498,7 @@ class ChipsSelectorComponent extends SubscriptionnerDirective {
7615
7498
  isItemUsed(item, usedItems) {
7616
7499
  return usedItems
7617
7500
  ? usedItems.find((usedItem) => this.areItemsEqual(usedItem, item))
7618
- : this.usedItems$.getValue().find((usedItem) => this.areItemsEqual(usedItem, item));
7501
+ : (this.usedItems$.getValue() ?? []).find((usedItem) => this.areItemsEqual(usedItem, item));
7619
7502
  }
7620
7503
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ChipsSelectorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
7621
7504
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ChipsSelectorComponent, selector: "pry-chips-selector", inputs: { bindValue: "bindValue", bindLabel: "bindLabel", translationStringBase: "translationStringBase", itemTranslationStringBase: "itemTranslationStringBase", showActionButtons: "showActionButtons", showSearchbar: "showSearchbar", items: "items", usedItems: "usedItems" }, outputs: { itemsChanged: "itemsChanged" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-chips-selector\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"dialog_namedqueries\">\n @if (showSearchbar) {\n <div class=\"o-widget__search\">\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.components.searchData' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"search($event)\"\n />\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n }\n\n <div class=\"o-chips-selector__items\">\n @if (((usedItems$ | async) ?? []).length > 0) {\n <div class=\"o-chips-selector__used-items\">\n <h4 class=\"a-h4\">{{ translationStringBase + 'selection' | i18n }}</h4>\n <ul class=\"o-chips-selector__list\">\n @for (item of usedItems$ | async; track item) {\n <li class=\"o-chips-selector__item\">\n <button class=\"a-chip -md o-chips-selector__chip\" (click)=\"toggleItemSelection(item)\" type=\"button\">\n <p>{{ getItemLabel(item) }}</p>\n <pry-icon [iconSvg]=\"'close'\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </button>\n </li>\n }\n </ul>\n </div>\n } @else {\n <span class=\"-no-items\">{{ translationStringBase + 'noItemSelected' | i18n }}</span>\n }\n\n <div class=\"o-chips-selector__unused-items\">\n <h4 class=\"a-h4\">{{ translationStringBase + 'select' | i18n }}</h4>\n <ul class=\"o-chips-selector__list\">\n @for (item of unusedItems$ | async; track item) {\n <li class=\"o-chips-selector__item\">\n <button class=\"a-chip a-chip--light -md o-chips-selector__chip\" (click)=\"toggleItemSelection(item)\">\n <span class=\"u-visually-hidden\">{{ translationStringBase + 'selectItem' | i18n }}</span>\n <p class=\"a-p\">{{ getItemLabel(item) }}</p>\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3$3.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: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
@@ -7664,11 +7547,10 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
7664
7547
  this._cd = _cd;
7665
7548
  this._onChange = (groups) => groups;
7666
7549
  this._onTouched = () => { };
7667
- // for tracking input
7668
7550
  this.assignedGroupNames$ = new BehaviorSubject([]);
7669
7551
  this.radioValue = PryShareMode.PRIVATE;
7670
7552
  this.PryShareMode = PryShareMode;
7671
- this.shareModes = [];
7553
+ this.shareModes = Object.values(PryShareMode);
7672
7554
  this._disableRadios$ = new BehaviorSubject({
7673
7555
  [PryShareMode.PRIVATE]: false,
7674
7556
  [PryShareMode.PUBLIC]: false,
@@ -7687,21 +7569,17 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
7687
7569
  this.assignedGroups$ = combineLatest([this.groups$, this.assignedGroupNames$]).pipe(map(([groups, groupNames]) => groups.filter((group) => {
7688
7570
  return groupNames.includes(group.name);
7689
7571
  }) ?? []));
7690
- this.shareModes = Object.keys(PryShareMode).map((label) => ({
7691
- label: label.toLowerCase(),
7692
- value: PryShareMode[label]
7693
- }));
7694
7572
  this.templateData$ = combineLatest([this.groups$, this.assignedGroups$, this._disableRadios$]).pipe(map(([groups, assignedGroups, disableRadios]) => ({ groups, assignedGroups, disableRadios })));
7695
7573
  }
7696
- writeValue(value) {
7574
+ writeValue(value, from = 'ngModel') {
7697
7575
  value = value ?? [];
7698
- if (!equal(this.assignedGroupNames$.getValue(), value)) {
7699
- this._onChange(value);
7700
- this.assignedGroupNames$.next(value);
7576
+ this._onChange(value);
7577
+ this.assignedGroupNames$.next(value);
7578
+ if (from === 'ngModel') {
7701
7579
  this.updateRadioValue(value);
7702
- this._onTouched();
7703
- this._cd.markForCheck();
7704
7580
  }
7581
+ this._onTouched();
7582
+ this._cd.markForCheck();
7705
7583
  }
7706
7584
  registerOnChange(fn) {
7707
7585
  this._onChange = fn;
@@ -7709,6 +7587,24 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
7709
7587
  registerOnTouched(fn) {
7710
7588
  this._onTouched = fn;
7711
7589
  }
7590
+ onRadioValueChange(radioValue) {
7591
+ this.radioValue = radioValue;
7592
+ this.radioValueChange.emit(radioValue);
7593
+ switch (radioValue) {
7594
+ case PryShareMode.PRIVATE:
7595
+ this.changeGroups([], 'radioChange');
7596
+ break;
7597
+ case PryShareMode.GROUPS:
7598
+ this.changeGroups(this.assignedGroupNames$.getValue().filter((g) => g !== PUBLIC_GROUP) ?? [], 'radioChange');
7599
+ break;
7600
+ case PryShareMode.PUBLIC:
7601
+ this.changeGroups([PUBLIC_GROUP], 'radioChange');
7602
+ break;
7603
+ }
7604
+ }
7605
+ changeGroups(groups, from) {
7606
+ this.writeValue(groups.map((group) => (typeof group === 'string' ? group : group.name)), from);
7607
+ }
7712
7608
  updateRadioValue(groups) {
7713
7609
  if (groups.length === 0) {
7714
7610
  this.radioValue = PryShareMode.PRIVATE;
@@ -7720,30 +7616,6 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
7720
7616
  this.radioValue = PryShareMode.GROUPS;
7721
7617
  }
7722
7618
  }
7723
- changeGroupsBasedOnRadioValue(type) {
7724
- if (this.radioValue !== type) {
7725
- this.radioValue = type;
7726
- this.radioValueChange.emit(type);
7727
- switch (type) {
7728
- case PryShareMode.PRIVATE:
7729
- this.changeGroups([]);
7730
- break;
7731
- case PryShareMode.GROUPS:
7732
- this.changeGroups(this.assignedGroupNames$.getValue() ?? []);
7733
- break;
7734
- case PryShareMode.PUBLIC:
7735
- this.changeGroups(['ALL']);
7736
- break;
7737
- }
7738
- }
7739
- }
7740
- changeGroups(groups) {
7741
- if (groups) {
7742
- this._onChange(groups.map((group) => (typeof group === 'string' ? group : group.name)));
7743
- this._onTouched();
7744
- this._cd.markForCheck();
7745
- }
7746
- }
7747
7619
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryGroupShareComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
7748
7620
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryGroupShareComponent, selector: "pry-group-share", inputs: { disableRadios: "disableRadios", allowedGroups: "allowedGroups" }, outputs: { radioValueChange: "radioValueChange" }, providers: [
7749
7621
  {
@@ -7751,7 +7623,7 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
7751
7623
  useExisting: forwardRef(() => PryGroupShareComponent),
7752
7624
  multi: true
7753
7625
  }
7754
- ], usesInheritance: true, ngImport: i0, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of shareModes\" 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 === PryShareMode.GROUPS) {\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 [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: i3$3.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: i3$3.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.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: ["itemsChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7626
+ ], usesInheritance: true, ngImport: i0, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let shareMode of shareModes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"'radio_share_' + shareMode\"\n [value]=\"shareMode\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"onRadioValueChange($event)\"\n [disabled]=\"data.disableRadios[shareMode]\"\n />\n <label [for]=\"'radio_share_' + shareMode\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[shareMode]\">\n {{ '@pry.share.radioLabel.' + shareMode | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryShareMode.GROUPS) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event, 'groupSelectionChange')\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n }\n}\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$3.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: i3$3.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.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: ["itemsChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7755
7627
  }
7756
7628
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryGroupShareComponent, decorators: [{
7757
7629
  type: Component,
@@ -7761,7 +7633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
7761
7633
  useExisting: forwardRef(() => PryGroupShareComponent),
7762
7634
  multi: true
7763
7635
  }
7764
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of shareModes\" 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 === PryShareMode.GROUPS) {\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 [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" }]
7636
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let shareMode of shareModes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"'radio_share_' + shareMode\"\n [value]=\"shareMode\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"onRadioValueChange($event)\"\n [disabled]=\"data.disableRadios[shareMode]\"\n />\n <label [for]=\"'radio_share_' + shareMode\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[shareMode]\">\n {{ '@pry.share.radioLabel.' + shareMode | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryShareMode.GROUPS) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event, 'groupSelectionChange')\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n }\n}\n" }]
7765
7637
  }], ctorParameters: () => [{ type: i1.Store }, { type: i0.ChangeDetectorRef }], propDecorators: { disableRadios: [{
7766
7638
  type: Input
7767
7639
  }], allowedGroups: [{
@@ -7770,6 +7642,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
7770
7642
  type: Output
7771
7643
  }] } });
7772
7644
 
7645
+ const PUBLIC_GROUP = 'ALL';
7646
+ const AUTHENTICATED_USERS_GROUP = 'AUTHENTICATED';
7647
+ const SYSTEM_GROUPS = [PUBLIC_GROUP, AUTHENTICATED_USERS_GROUP];
7648
+ const READ_ACCESS = 'READ';
7649
+ const WRITE_ACCESS = 'WRITE';
7650
+ // GROUP UTIL METHODS
7651
+ const getGroupLabel = (group, i18n) => {
7652
+ return group.system ? i18n.instant('@pry.share.groupLabels.' + group.name) : group.name;
7653
+ };
7654
+ const getGroupLabelByName = (groupName, i18n) => {
7655
+ return i18n.instant('@pry.share.groupLabels.' + groupName).startsWith('@')
7656
+ ? groupName
7657
+ : i18n.instant('@pry.share.groupLabels.' + groupName);
7658
+ };
7659
+ const getShareLevel = (groups) => {
7660
+ if (groups.length === 0) {
7661
+ return PryShareMode.PRIVATE;
7662
+ }
7663
+ else if (groups.length === 1 && groups[0] === PUBLIC_GROUP) {
7664
+ return PryShareMode.PUBLIC;
7665
+ }
7666
+ else {
7667
+ return PryShareMode.GROUPS;
7668
+ }
7669
+ };
7670
+ // DASHBOARD GROUP RIGHTS METHODS
7671
+ const canManifestBeMadePublic = (manifest, datasets) => {
7672
+ return manifest.datasource.every((dsId) => {
7673
+ const datasource = datasets.find((d) => d.id === dsId);
7674
+ return datasource?.groups?.includes(PUBLIC_GROUP) ?? false;
7675
+ });
7676
+ };
7677
+ const getCommonDatasourceGroupsForManifest = (manifest, datasets, allGroups) => {
7678
+ let result = [];
7679
+ const allDsGroups = manifest.datasource.map((dsId) => datasets.find((d) => d.id === dsId)?.groups ?? []);
7680
+ if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP))) {
7681
+ result = allGroups.map((group) => group.name);
7682
+ }
7683
+ else if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP) || dsGroups.includes(AUTHENTICATED_USERS_GROUP))) {
7684
+ result = allGroups.filter((group) => group.name !== PUBLIC_GROUP).map((group) => group.name);
7685
+ }
7686
+ else {
7687
+ const allDsGroupsFiltered = allDsGroups.filter((dsGroups) => !dsGroups.includes(AUTHENTICATED_USERS_GROUP) && !dsGroups.includes(PUBLIC_GROUP));
7688
+ const baseArray = allDsGroupsFiltered[0];
7689
+ for (let i = 0; i < baseArray.length; i++) {
7690
+ const group = baseArray[i];
7691
+ if (allDsGroupsFiltered.every((dsGroups) => dsGroups.includes(group))) {
7692
+ result.push(group);
7693
+ }
7694
+ }
7695
+ }
7696
+ return result;
7697
+ };
7698
+ // ACCESS RIGHTS METHODS
7699
+ const getAccessRightsArrayByGroup = (accessByGroup) => {
7700
+ let result = {};
7701
+ Object.keys(accessByGroup).forEach((key) => {
7702
+ result[key] = getAccessArray(accessByGroup[key]);
7703
+ });
7704
+ return result;
7705
+ };
7706
+ const getAccessArray = (access) => {
7707
+ switch (access) {
7708
+ case READ_ACCESS:
7709
+ return [READ_ACCESS];
7710
+ case WRITE_ACCESS:
7711
+ return [READ_ACCESS, WRITE_ACCESS];
7712
+ default:
7713
+ return [];
7714
+ }
7715
+ };
7716
+ const getAccessRightsStringByGroup = (accessByGroup) => {
7717
+ let result = {};
7718
+ Object.keys(accessByGroup).forEach((key) => {
7719
+ result[key] = getAccessString(accessByGroup[key]);
7720
+ });
7721
+ return result;
7722
+ };
7723
+ const getAccessString = (accessArray) => {
7724
+ if (accessArray.includes(WRITE_ACCESS)) {
7725
+ return WRITE_ACCESS;
7726
+ }
7727
+ else {
7728
+ return READ_ACCESS;
7729
+ }
7730
+ };
7731
+
7732
+ class PryShareComponent {
7733
+ constructor(_cd) {
7734
+ this._cd = _cd;
7735
+ this._onChange = (_) => { };
7736
+ this._onTouched = () => { };
7737
+ this._disabled = false;
7738
+ this.value = [];
7739
+ this.stringValue = 'private';
7740
+ this.labelProperty = 'label';
7741
+ this.valueProperty = 'value';
7742
+ this.visibilityTypes = [
7743
+ { name: 'public', icon: 'public' },
7744
+ { name: 'private', icon: 'private' }
7745
+ ];
7746
+ }
7747
+ registerOnChange(fn) {
7748
+ this._onChange = fn;
7749
+ }
7750
+ registerOnTouched(fn) {
7751
+ this._onTouched = fn;
7752
+ }
7753
+ setDisabledState(isDisabled) {
7754
+ this._disabled = isDisabled;
7755
+ this._cd.markForCheck();
7756
+ }
7757
+ writeValue(value) {
7758
+ if (value) {
7759
+ this.value = value;
7760
+ this.stringValue = value.length > 0 ? 'public' : 'private';
7761
+ this._onChange(this.value);
7762
+ this._onTouched();
7763
+ this._cd.markForCheck();
7764
+ }
7765
+ }
7766
+ onChange($event) {
7767
+ this.value = $event === 'public' ? [PUBLIC_GROUP] : [];
7768
+ this.writeValue(this.value);
7769
+ this._onTouched();
7770
+ this._cd.markForCheck();
7771
+ }
7772
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
7773
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryShareComponent, selector: "pry-share", inputs: { labelProperty: "labelProperty", valueProperty: "valueProperty" }, providers: [
7774
+ {
7775
+ provide: NG_VALUE_ACCESSOR,
7776
+ useExisting: forwardRef(() => PryShareComponent),
7777
+ multi: true
7778
+ }
7779
+ ], ngImport: i0, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"onChange($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"stringValue\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"name\"\n bindLabel=\"name\"\n bindIcon=\"icon\"\n id=\"share_type\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n", dependencies: [{ kind: "directive", type: i3$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7780
+ }
7781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryShareComponent, decorators: [{
7782
+ type: Component,
7783
+ args: [{ selector: 'pry-share', providers: [
7784
+ {
7785
+ provide: NG_VALUE_ACCESSOR,
7786
+ useExisting: forwardRef(() => PryShareComponent),
7787
+ multi: true
7788
+ }
7789
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"share_type\">{{ '@pry.share.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"onChange($event)\"\n [items]=\"visibilityTypes\"\n [ngModel]=\"stringValue\"\n [disabled]=\"_disabled\"\n i18nPrefix=\"@pry.share.\"\n bindValue=\"name\"\n bindLabel=\"name\"\n bindIcon=\"icon\"\n id=\"share_type\"\n [iconSize]=\"[21, 18]\"\n ></pry-select>\n</div>\n" }]
7790
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { labelProperty: [{
7791
+ type: Input
7792
+ }], valueProperty: [{
7793
+ type: Input
7794
+ }] } });
7795
+
7773
7796
  class PryAccessRightsShareComponent extends SubscriptionnerDirective {
7774
7797
  set allowedGroups(value) {
7775
7798
  if (value)
@@ -13052,7 +13075,7 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
13052
13075
  ]
13053
13076
  }
13054
13077
  }
13055
- })), on(DashboardActions.updateLayerGroup, (state, action) => ({
13078
+ })), on(DashboardActions.updateLayerVisibility, (state, action) => ({
13056
13079
  ...state,
13057
13080
  manifests: {
13058
13081
  ...state.manifests,
@@ -13066,9 +13089,7 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
13066
13089
  ? typeof action.visibleLayers === 'string'
13067
13090
  ? [...group.visibleLayers, action.visibleLayers]
13068
13091
  : action.visibleLayers
13069
- : group.visibleLayers,
13070
- name: action.newName ?? group.name,
13071
- singleLayer: action.singleLayer ?? group.singleLayer
13092
+ : group.visibleLayers
13072
13093
  }
13073
13094
  : group)
13074
13095
  ]
@@ -13083,6 +13104,15 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
13083
13104
  layerGroups: state.manifests.manifest.layerGroups.filter((group) => group.name !== action.name)
13084
13105
  }
13085
13106
  }
13107
+ })), on(DashboardActions.updateLayerGroups, (state, { layerGroups }) => ({
13108
+ ...state,
13109
+ manifests: {
13110
+ ...state.manifests,
13111
+ manifest: {
13112
+ ...state.manifests.manifest,
13113
+ layerGroups
13114
+ }
13115
+ }
13086
13116
  })));
13087
13117
  function dashboardReducer(state, action) {
13088
13118
  return internalReducer(state, action);
@@ -13431,5 +13461,5 @@ function filterLoader(module, prop) {
13431
13461
  * Generated bundle index. Do not edit.
13432
13462
  */
13433
13463
 
13434
- export { ALIGNMENT_OPTIONS, AUTHENTICATED_USERS_GROUP, AccordionComponent, AccordionItemComponent, Aggregation, BASE_DISPLAY_OPTIONS, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ChipsSelectorComponent, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_DASHBOARD_ICON_URL, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_PROJECTION, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DEFAULT_SEARCH_LIMIT_NUMBER, DEFAULT_TABLE_WIDGET_STYLE, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, EllipsisDirective, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterGroupComponent, FilterInstanciatorComponent, FilterParamEncoder, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, NumericFieldTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PRY_GEOAUTH_TOKEN, PUBLIC_GROUP, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessRightsShareComponent, PryAccessRightsShareModalComponent, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryChipsSelectorModule, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatasourceCardComponent, PryDatasourceListComponent, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDefaultGeoAuthService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFilterGroupCssComponent, PryFrontendAggregationService, PryGeoAuthService, PryGroupShareComponent, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareMode, PryShareModule, PrySinceDateModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, READ_ACCESS, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SYSTEM_GROUPS, SearchActions, SearchSelectors, SearchService, SettingsComponent, SinceDatePipe, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, TextFieldTypes, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WRITE_ACCESS, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, canManifestBeMadePublic, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getAccessArray, getAccessRightsArrayByGroup, getAccessRightsStringByGroup, getAccessString, getCommonDatasourceGroupsForManifest, getDisplayOptions, getGroupLabel, getGroupLabelByName, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
13464
+ export { ALIGNMENT_OPTIONS, AUTHENTICATED_USERS_GROUP, AccordionComponent, AccordionItemComponent, Aggregation, BASE_DISPLAY_OPTIONS, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ChipsSelectorComponent, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_DASHBOARD_ICON_URL, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_PROJECTION, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DEFAULT_SEARCH_LIMIT_NUMBER, DEFAULT_TABLE_WIDGET_STYLE, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, EllipsisDirective, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterGroupComponent, FilterInstanciatorComponent, FilterParamEncoder, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, NumericFieldTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PRY_GEOAUTH_TOKEN, PUBLIC_GROUP, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessRightsShareComponent, PryAccessRightsShareModalComponent, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryChipsSelectorModule, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatasourceCardComponent, PryDatasourceListComponent, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDefaultGeoAuthService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFilterGroupCssComponent, PryFrontendAggregationService, PryGeoAuthService, PryGroupShareComponent, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareMode, PryShareModule, PrySinceDateModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, READ_ACCESS, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SYSTEM_GROUPS, SearchActions, SearchSelectors, SearchService, SettingsComponent, SinceDatePipe, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, TextFieldTypes, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WRITE_ACCESS, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, canManifestBeMadePublic, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getAccessArray, getAccessRightsArrayByGroup, getAccessRightsStringByGroup, getAccessString, getCommonDatasourceGroupsForManifest, getDisplayOptions, getGroupLabel, getGroupLabelByName, getShareLevel, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
13435
13465
  //# sourceMappingURL=provoly-dashboard.mjs.map