@provoly/dashboard 1.2.10 → 1.3.0

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 (55) hide show
  1. package/esm2022/lib/core/components/select/select-a11y.service.mjs +5 -4
  2. package/esm2022/lib/core/components/select/select.component.mjs +8 -5
  3. package/esm2022/lib/core/components/share/share.utils.mjs +4 -4
  4. package/esm2022/lib/core/i18n/en.translations.mjs +3 -3
  5. package/esm2022/lib/core/i18n/fr.translations.mjs +4 -4
  6. package/esm2022/lib/core/model/widget-table-manifest.interface.mjs +9 -2
  7. package/esm2022/lib/core/pipes/translate-item-to-symbol/translate-item-to-symbol.pipe.mjs +2 -4
  8. package/esm2022/lib/dashboard/components/dashboard.component.mjs +2 -2
  9. package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +2 -2
  10. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +76 -5
  11. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -46
  12. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +2 -2
  13. package/esm2022/lib/dashboard/store/manifest-utils.class.mjs +23 -2
  14. package/esm2022/mock/provoly-dashboard-mock.mjs +5 -0
  15. package/esm2022/mock/public-api.mjs +3 -0
  16. package/esm2022/mock/service/mock-i18n.service.mjs +13 -0
  17. package/esm2022/mock/service/mock-overlay.service.mjs +44 -0
  18. package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
  19. package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +2 -2
  20. package/esm2022/toolbox/components/save-view/save-view.component.mjs +2 -8
  21. package/esm2022/toolbox/shared/presentation-form/presentation-form.component.mjs +10 -4
  22. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +2 -2
  23. package/esm2022/widgets/widget-table/component/widget-table.component.mjs +19 -4
  24. package/esm2022/widgets/widget-table/expand-value/expand-value.component.mjs +3 -3
  25. package/fesm2022/provoly-dashboard-mock.mjs +63 -0
  26. package/fesm2022/provoly-dashboard-mock.mjs.map +1 -0
  27. package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
  28. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  29. package/fesm2022/provoly-dashboard-toolbox.mjs +10 -10
  30. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  31. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -1
  32. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  33. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +26 -11
  34. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
  35. package/fesm2022/provoly-dashboard.mjs +130 -72
  36. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  37. package/lib/core/components/select/select-a11y.service.d.ts +1 -1
  38. package/lib/core/components/select/select.component.d.ts +2 -1
  39. package/lib/core/i18n/en.translations.d.ts +2 -2
  40. package/lib/core/i18n/fr.translations.d.ts +2 -2
  41. package/lib/core/model/widget-table-manifest.interface.d.ts +14 -0
  42. package/lib/dashboard/store/dashboard.effects.d.ts +15 -0
  43. package/lib/dashboard/store/manifest-utils.class.d.ts +2 -0
  44. package/mock/index.d.ts +5 -0
  45. package/mock/public-api.d.ts +2 -0
  46. package/mock/service/mock-i18n.service.d.ts +9 -0
  47. package/mock/service/mock-overlay.service.d.ts +30 -0
  48. package/package.json +12 -6
  49. package/styles/base/_utils.scss +4 -0
  50. package/styles/components/_a-expandable-value.scss +0 -5
  51. package/styles/components/_a-table.scss +10 -3
  52. package/styles-theme/components-theme/_a-table.theme.scss +6 -0
  53. package/toolbox/components/save-view/save-view.component.d.ts +0 -1
  54. package/toolbox/shared/presentation-form/presentation-form.component.d.ts +2 -1
  55. package/widgets/widget-table/component/widget-table.component.d.ts +3 -1
@@ -490,11 +490,11 @@ const enTranslations$1 = {
490
490
  share: {
491
491
  private: 'Private',
492
492
  public: 'Public',
493
- restricted: 'Restricted',
493
+ groups: 'Restricted',
494
494
  type: 'Visibility',
495
495
  users: 'Authorized users',
496
496
  noGroups: 'No group available',
497
- groups: {
497
+ groupLabels: {
498
498
  ALL: 'Public',
499
499
  AUTHENTICATED: 'Connected users'
500
500
  },
@@ -907,10 +907,10 @@ const frTranslations$1 = {
907
907
  share: {
908
908
  private: 'Privé',
909
909
  public: 'Public',
910
- restricted: 'Restreint',
910
+ groups: 'Restreint',
911
911
  type: 'Visibilité',
912
912
  users: 'Utilisateurs autorisés',
913
- groups: {
913
+ groupLabels: {
914
914
  ALL: 'Tout le monde',
915
915
  AUTHENTICATED: 'Les utilisateurs connectés'
916
916
  },
@@ -954,7 +954,7 @@ const frTranslations$1 = {
954
954
  selectItem: 'Sélectionner la source de données',
955
955
  unselectItem: 'Désélectionner la source de données',
956
956
  noItemSelected: 'Aucune source de données sélectionnée'
957
- },
957
+ }
958
958
  },
959
959
  errors: {
960
960
  default: 'Une erreur est survenue. Veuillez vérifiez les informations ou contacter votre administrateur si le problème persiste',
@@ -3977,7 +3977,7 @@ const dashboardCellParams = createSelector(dashboard, (dashboard) => dashboard.p
3977
3977
  const dashboardEditionMode = createSelector(dashboard, (dashboard) => dashboard.editionMode ?? false);
3978
3978
  const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.windows
3979
3979
  .map((window, idx) => ({ windowIndex: idx, widgets: window.widgets }))
3980
- .map(({ windowIndex, widgets }) => widgets.map((widget) => (Array.isArray(widget.datasource) ? widget.datasource : [widget.datasource])
3980
+ .map(({ windowIndex, widgets }) => (widgets ?? []).map((widget) => (Array.isArray(widget.datasource) ? widget.datasource : [widget.datasource])
3981
3981
  .filter((rsName) => rsName !== undefined)
3982
3982
  .map((rsName) => ({
3983
3983
  rsName,
@@ -5209,9 +5209,7 @@ class TranslateItemToSymbolPipe {
5209
5209
  this.symbolService = symbolService;
5210
5210
  }
5211
5211
  transform(value, ...args) {
5212
- return from$1(new Promise((resolve) => this.symbolService
5213
- .getSymbol(value)
5214
- .then((canvas) => resolve(canvas.toDataURL('image/png')))));
5212
+ return from$1(new Promise((resolve) => this.symbolService.getSymbol(value).then((canvas) => resolve(canvas.toDataURL('image/png')))));
5215
5213
  }
5216
5214
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: TranslateItemToSymbolPipe, deps: [{ token: SymbolService }], target: i0.ɵɵFactoryTarget.Pipe }); }
5217
5215
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: TranslateItemToSymbolPipe, name: "translateItemToSymbol" }); }
@@ -6855,7 +6853,7 @@ class SelectA11yService {
6855
6853
  setToggle(toggleCallback) {
6856
6854
  this.toggle = toggleCallback;
6857
6855
  }
6858
- onFocusChange(origin, autocomplete, toggleFocus, focusSelect) {
6856
+ onFocusChange(origin, autocomplete, toggleFocus, focusInput) {
6859
6857
  toggleFocus();
6860
6858
  switch (origin) {
6861
6859
  case 'mouse':
@@ -6865,7 +6863,7 @@ class SelectA11yService {
6865
6863
  break;
6866
6864
  case 'keyboard':
6867
6865
  if (autocomplete) {
6868
- focusSelect();
6866
+ focusInput();
6869
6867
  }
6870
6868
  break;
6871
6869
  }
@@ -6916,11 +6914,12 @@ class SelectA11yService {
6916
6914
  optionDivRef.nextElementSibling.focus();
6917
6915
  }
6918
6916
  if (last && autocomplete) {
6919
- // with autocomplete=true, focus is not trapped, so prevent tabbing out of list
6917
+ // with autocomplete=true, focus is not trapped, so prevent navigating out of list
6920
6918
  event.preventDefault();
6921
6919
  }
6922
6920
  break;
6923
6921
  case 'Tab':
6922
+ // with autocomplete=true, focus is not trapped, so prevent tabbing out of list
6924
6923
  if (last && autocomplete) {
6925
6924
  event.preventDefault();
6926
6925
  }
@@ -6997,7 +6996,7 @@ class PrySelectComponent extends SubscriptionnerDirective {
6997
6996
  this.modalWidth = 200;
6998
6997
  this.onFocusChange = (origin) => {
6999
6998
  if (!this.inhibate) {
7000
- this.a11yService.onFocusChange(origin, this.autocomplete, () => this.toggleFocus(), () => this.focusSelect());
6999
+ this.a11yService.onFocusChange(origin, this.autocomplete, () => this.toggleFocus(), () => this.focusInput());
7001
7000
  this.inhibition();
7002
7001
  }
7003
7002
  };
@@ -7147,7 +7146,7 @@ class PrySelectComponent extends SubscriptionnerDirective {
7147
7146
  else {
7148
7147
  this.overlayRef?.dispose();
7149
7148
  this.overlayRef = undefined;
7150
- this.focusSelect();
7149
+ this.returnFocus();
7151
7150
  }
7152
7151
  }
7153
7152
  }
@@ -7167,8 +7166,11 @@ class PrySelectComponent extends SubscriptionnerDirective {
7167
7166
  toggleFocus() {
7168
7167
  this.focused = !this.focused;
7169
7168
  }
7170
- focusSelect() {
7171
- return this.autocomplete ? this.input?.nativeElement.focus() : this.selectElement?.nativeElement.focus();
7169
+ returnFocus() {
7170
+ return this.autocomplete ? this.focusInput() : this.selectElement?.nativeElement.focus();
7171
+ }
7172
+ focusInput() {
7173
+ this.input?.nativeElement.focus();
7172
7174
  }
7173
7175
  getOverlayConfig() {
7174
7176
  const positionStrategy = this.overlay
@@ -7416,12 +7418,12 @@ const READ_ACCESS = 'READ';
7416
7418
  const WRITE_ACCESS = 'WRITE';
7417
7419
  // GROUP UTIL METHODS
7418
7420
  const getGroupLabel = (group, i18n) => {
7419
- return group.system ? i18n.instant('@pry.share.groups.' + group.name) : group.name;
7421
+ return group.system ? i18n.instant('@pry.share.groupLabels.' + group.name) : group.name;
7420
7422
  };
7421
7423
  const getGroupLabelByName = (groupName, i18n) => {
7422
- return i18n.instant('@pry.share.groups.' + groupName).startsWith('@')
7424
+ return i18n.instant('@pry.share.groupLabels.' + groupName).startsWith('@')
7423
7425
  ? groupName
7424
- : i18n.instant('@pry.share.groups.' + groupName);
7426
+ : i18n.instant('@pry.share.groupLabels.' + groupName);
7425
7427
  };
7426
7428
  // DASHBOARD GROUP RIGHTS METHODS
7427
7429
  const canManifestBeMadePublic = (manifest, datasets) => {
@@ -8622,7 +8624,7 @@ class WidgetFactoryService {
8622
8624
  const datasources = [];
8623
8625
  const aggregates = [];
8624
8626
  manifest.windows.forEach((windowManifest) => {
8625
- windowManifest.widgets.forEach((widgetManifest) => {
8627
+ (windowManifest.widgets ?? []).forEach((widgetManifest) => {
8626
8628
  this.datasourcesToAutoLoad(widgetManifest).forEach((res) => {
8627
8629
  if (res.datasetId) {
8628
8630
  datasources.push(res);
@@ -9192,7 +9194,7 @@ class DashboardComponent extends SubscriptionnerDirective {
9192
9194
  }
9193
9195
  return wManifest;
9194
9196
  }), distinctUntilChanged((p, c) => equal(p, c)));
9195
- this.nonFillerWidgets$ = this.windowManifest$.pipe(map$1((wManifest) => wManifest.widgets.filter((w) => w.type !== 'filler').length));
9197
+ this.nonFillerWidgets$ = this.windowManifest$.pipe(map$1((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
9196
9198
  this.subscriptions.add(this.staticDashboard$.subscribe((manifest) => {
9197
9199
  if (!!manifest) {
9198
9200
  const getDataActions = [
@@ -10158,6 +10160,15 @@ const OPERATOR_OPTIONS = [
10158
10160
  { type: 'date', operator: 'OUTSIDE', translation: '@pry.search.operator.outerBoundsDate', twoValues: true }
10159
10161
  ];
10160
10162
 
10163
+ const DEFAULT_TABLE_WIDGET_STYLE = {
10164
+ value: {
10165
+ headerTextAlign: 'center',
10166
+ cellTextAlign: 'center',
10167
+ showVerticalSeparator: false
10168
+ }
10169
+ };
10170
+ const ALIGNMENT_OPTIONS = ['center', 'left', 'right'];
10171
+
10161
10172
  const notificationFeatureKey = '@pry/notification';
10162
10173
 
10163
10174
  /**
@@ -11588,7 +11599,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
11588
11599
  class ManifestUtils {
11589
11600
  static getDatasourcesUsedByManifest(manifest) {
11590
11601
  const mapOfDatasources = manifest.windows
11591
- .map((window) => window.widgets.map((widget) => ({ datasetId: widget.datasource, excludeGeo: widget.type !== 'map' })))
11602
+ .map((window) => (window.widgets ?? []).map((widget) => ({ datasetId: widget.datasource, excludeGeo: widget.type !== 'map' })))
11592
11603
  .flat(3)
11593
11604
  .filter((dataset) => !!dataset.datasetId)
11594
11605
  .map((res) => Array.isArray(res.datasetId)
@@ -11597,6 +11608,25 @@ class ManifestUtils {
11597
11608
  .flat().reduce((p, c) => ({ ...p, [c.datasetId]: { ...p[c.datasetId], ...c } }), {});
11598
11609
  return Object.values(mapOfDatasources);
11599
11610
  }
11611
+ static cleanupManifest(manifest) {
11612
+ return {
11613
+ ...manifest,
11614
+ windows: manifest.windows.map((window) => ManifestUtils.cleanupDashboardManifest(window))
11615
+ };
11616
+ }
11617
+ static cleanupDashboardManifest(window) {
11618
+ return {
11619
+ ...window,
11620
+ grid: {
11621
+ columns: DEFAULT_COLUMNS_NUMBER,
11622
+ rows: DEFAULT_ROWS_NUMBER,
11623
+ layout: DashboardGridLayout.MANUAL,
11624
+ gap: DEFAULT_GAP_PX,
11625
+ ...window.grid
11626
+ },
11627
+ widgets: window.widgets ?? []
11628
+ };
11629
+ }
11600
11630
  }
11601
11631
 
11602
11632
  class ManifestService {
@@ -11970,7 +12000,7 @@ class DashboardEffects {
11970
12000
  }
11971
12001
  })));
11972
12002
  this.sendAggregatesEvent$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.triggerAggregate), filter$1((action) => action.id !== DEFAULT_NAMED_QUERY_ID && action.id !== EXPLORE_NAMED_QUERY_ID), tap((action) => window.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: action.id })))), { dispatch: false });
11973
- this.startMissingViewAfterViewUpdate$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateManifest, DashboardActions.updateManifestAfterFetch, DashboardActions.updateManifestAfterTenantLeave, DashboardActions.updateManifestAfterTenantJoin, DashboardActions.explore, DashboardActions.detail, DashboardActions.restoreInitialManifest, DashboardActions.createTab), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0), mergeMap$1((action) => [
12003
+ this.startMissingViewAfterViewUpdate$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateManifest, DashboardActions.updateManifestAfterFetch, DashboardActions.updateManifestAfterTenantLeave, DashboardActions.updateManifestAfterTenantJoin, DashboardActions.explore, DashboardActions.detail, DashboardActions.restoreInitialManifest, DashboardActions.createTab, DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0), mergeMap$1((action) => [
11974
12004
  DashboardActions.startingMissingViews(),
11975
12005
  DashboardActions.assertResultSets({}),
11976
12006
  DashboardActions.solveCollisions()
@@ -12020,9 +12050,10 @@ class DashboardEffects {
12020
12050
  type: 'error'
12021
12051
  });
12022
12052
  return throwError(() => error);
12023
- }))), mergeMap$1((manifest) => [
12053
+ }))), withLatestFrom(this.store.select(DashboardSelectors.selectedItemIds)), mergeMap$1(([manifest, selectedIds]) => [
12024
12054
  DashboardActions.fetchManifestsList(),
12025
- DashboardActions.setInitialPresentation({ initial: manifest })
12055
+ DashboardActions.setInitialPresentation({ initial: manifest }),
12056
+ DashboardActions.updateManifest({ manifest, selectedIds })
12026
12057
  ])));
12027
12058
  this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0 || rank === -1), debounceTime$1(100), mergeMap$1(([action, rank]) => this.manifestService.list().pipe(map$1((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
12028
12059
  this.confirmManifestDeletion$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.confirmManifestDeletion), tap((action) => {
@@ -12143,7 +12174,10 @@ class DashboardEffects {
12143
12174
  const currentWindowLayout = manifestGlobal.windows[rank].grid?.layout ?? DashboardGridLayout.FULL;
12144
12175
  // si non trouvé : nouvelle page, première position suggérée
12145
12176
  const firstProposedLayout = WidgetPlacementUtils.placementOptions(newWidgetManifest, currentWindowLayout)[0];
12146
- manifestGlobal.windows.push({ widgets: [firstProposedLayout], grid: { layout: currentWindowLayout } });
12177
+ manifestGlobal.windows.push({
12178
+ widgets: [firstProposedLayout ?? { x: 1, y: 1, height: 1, width: 1 }],
12179
+ grid: { layout: currentWindowLayout }
12180
+ });
12147
12181
  }
12148
12182
  if (action.alert === undefined || action.alert === true) {
12149
12183
  const messageAction = DashboardActions.multiSnackBar({
@@ -12163,6 +12197,73 @@ class DashboardEffects {
12163
12197
  }
12164
12198
  return DashboardActions.updateManifest({ manifest: manifestGlobal, selectedIds });
12165
12199
  })));
12200
+ this.moveWidget$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.gridLayout), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.dashboardCellParams), this.store.select(DashboardSelectors.selectedItemIds)), map$1(([action, layout, _globalManifest, rank, params, selectedIds]) => {
12201
+ const manifestGlobal = JSON.parse(JSON.stringify(_globalManifest));
12202
+ const newWindows = [...manifestGlobal.windows];
12203
+ // Creating new current window manifest, without moved widget
12204
+ const myNewWindow = {
12205
+ ...newWindows[rank],
12206
+ widgets: [...newWindows[rank].widgets]
12207
+ };
12208
+ const widget = myNewWindow.widgets.splice(action.widgetIndex, 1)[0];
12209
+ newWindows[rank] = myNewWindow;
12210
+ // Creating either a new window manifest or update the target one
12211
+ const targetRank = action.targetIndex;
12212
+ if (targetRank !== -1) {
12213
+ if (!newWindows[targetRank]) {
12214
+ newWindows[targetRank] = {
12215
+ ...newWindows[rank],
12216
+ widgets: [widget]
12217
+ };
12218
+ }
12219
+ else {
12220
+ let found = null;
12221
+ // Try to find a spot in windows (starting by current rank, then in others)
12222
+ const sequence = WidgetPlacementUtils.swapArrayElements(new Array(manifestGlobal.windows.length).fill(0).map((_, idx, array) => idx), 0, rank);
12223
+ // Trying all placement options in target window
12224
+ const windowLayout = manifestGlobal.windows[targetRank].grid?.layout ?? DashboardGridLayout.MANUAL;
12225
+ if (windowLayout !== DashboardGridLayout.MANUAL) {
12226
+ const options = WidgetPlacementUtils.placementOptions(widget, windowLayout);
12227
+ if (!found) {
12228
+ for (const option of options) {
12229
+ if (!found) {
12230
+ // Are we disjoint from all other widgets ?
12231
+ const isDisjointFromAll = (manifestGlobal.windows[targetRank].widgets ?? [])
12232
+ .map((widget) => WidgetPlacementUtils.areDisjoint(widget, option))
12233
+ .reduce((p, c) => p && c, true);
12234
+ if (isDisjointFromAll) {
12235
+ // Found a disjoint placement !
12236
+ found = { actualRank: targetRank, widget: option };
12237
+ }
12238
+ }
12239
+ }
12240
+ }
12241
+ }
12242
+ else {
12243
+ // In manual mode, we should resolveCollisions but for now it's not (cause we only have inverted collisions right now)
12244
+ found = { actualRank: targetRank, widget };
12245
+ }
12246
+ if (!!found) {
12247
+ const placeWeFound = found;
12248
+ newWindows[placeWeFound.actualRank].widgets.push(placeWeFound.widget);
12249
+ }
12250
+ else {
12251
+ const currentWindowLayout = manifestGlobal.windows[rank].grid?.layout ?? DashboardGridLayout.FULL;
12252
+ // si non trouvé : nouvelle page, première position suggérée
12253
+ const firstProposedLayout = WidgetPlacementUtils.placementOptions(widget, currentWindowLayout)[0];
12254
+ newWindows.push({ widgets: [firstProposedLayout ?? widget], grid: { layout: currentWindowLayout } });
12255
+ }
12256
+ }
12257
+ }
12258
+ else {
12259
+ // create new window to welcome this widget
12260
+ newWindows.push({
12261
+ ...newWindows[rank],
12262
+ widgets: [widget]
12263
+ });
12264
+ }
12265
+ return DashboardActions.updateManifest({ manifest: { ...manifestGlobal, windows: newWindows }, selectedIds });
12266
+ })));
12166
12267
  this.multiSnackBar$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.multiSnackBar), tap((action) => this.snackBar.open(action.message))), { dispatch: false });
12167
12268
  this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map$1((action) => SearchActions.getDatasourceItems({
12168
12269
  id: action.datasourceId,
@@ -12355,7 +12456,7 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
12355
12456
  manifests: {
12356
12457
  ...state.manifests,
12357
12458
  tenants: action.tenants ?? state.manifests.tenants,
12358
- manifest: action.manifest,
12459
+ manifest: ManifestUtils.cleanupManifest(action.manifest),
12359
12460
  currentId: action.manifestId ?? state.manifests.currentId
12360
12461
  },
12361
12462
  // @ts-ignore
@@ -12425,50 +12526,7 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
12425
12526
  [action.id]: action.params
12426
12527
  }
12427
12528
  }
12428
- })), on(DashboardActions.moveWidget, (state, action) => {
12429
- const myRank = state.manifests.tenants.indexOf(state.manifests.sender);
12430
- const newWindows = [...state.manifests.manifest.windows];
12431
- // Creating new current window manifest, without moved widget
12432
- const myNewWindow = {
12433
- ...newWindows[myRank],
12434
- widgets: [...newWindows[myRank].widgets]
12435
- };
12436
- const widget = myNewWindow.widgets.splice(action.widgetIndex, 1)[0];
12437
- newWindows[myRank] = myNewWindow;
12438
- // Creating either a new window manifest or update the target one
12439
- const targetRank = action.targetIndex;
12440
- if (targetRank !== -1) {
12441
- if (!newWindows[targetRank]) {
12442
- newWindows[targetRank] = {
12443
- ...newWindows[myRank],
12444
- widgets: [widget]
12445
- };
12446
- }
12447
- else {
12448
- newWindows[targetRank] = {
12449
- ...newWindows[targetRank],
12450
- widgets: [...(newWindows[targetRank].widgets ?? []), widget]
12451
- };
12452
- }
12453
- }
12454
- else {
12455
- // create new window to welcome this widget
12456
- newWindows.push({
12457
- ...newWindows[myRank],
12458
- widgets: [widget]
12459
- });
12460
- }
12461
- return {
12462
- ...state,
12463
- manifests: {
12464
- ...state.manifests,
12465
- manifest: {
12466
- ...state.manifests.manifest,
12467
- windows: newWindows
12468
- }
12469
- }
12470
- };
12471
- }), on(DashboardActions.maximizeWidget, (state, action) => {
12529
+ })), on(DashboardActions.maximizeWidget, (state, action) => {
12472
12530
  const myRank = state.manifests.tenants.indexOf(state.manifests.sender);
12473
12531
  const newWindows = JSON.parse(JSON.stringify(state.manifests.manifest.windows));
12474
12532
  newWindows[myRank].widgets[action.widgetIndex].layout = {
@@ -13347,5 +13405,5 @@ function filterLoader(module, prop) {
13347
13405
  * Generated bundle index. Do not edit.
13348
13406
  */
13349
13407
 
13350
- export { 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, 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 };
13408
+ 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 };
13351
13409
  //# sourceMappingURL=provoly-dashboard.mjs.map