@provoly/dashboard 1.3.29 → 1.3.31

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.
@@ -4136,7 +4136,9 @@ const operators = [
4136
4136
  'END_WITH',
4137
4137
  'LOWER_THAN',
4138
4138
  'INSIDE',
4139
- 'OUTSIDE'
4139
+ 'OUTSIDE',
4140
+ 'IN',
4141
+ 'NOT_IN'
4140
4142
  ];
4141
4143
  class FilterParamEncoder extends HttpUrlEncodingCodec {
4142
4144
  constructor() {
@@ -4145,9 +4147,7 @@ class FilterParamEncoder extends HttpUrlEncodingCodec {
4145
4147
  encodeValue(v) {
4146
4148
  const hasOperator = operators.includes(v.split(',')?.[1]);
4147
4149
  if (hasOperator) {
4148
- const fragments = v.split(',');
4149
- fragments[2] = encodeURIComponent(fragments.splice(2).join('\\,'));
4150
- return fragments.slice(0, 3).join(',');
4150
+ return v;
4151
4151
  }
4152
4152
  return encodeURIComponent(v);
4153
4153
  }
@@ -4184,7 +4184,10 @@ class SearchService {
4184
4184
  this.filters[id]
4185
4185
  .filter((filter) => filter.value !== null && filter.value !== undefined)
4186
4186
  .forEach((filter) => {
4187
- params = params.append('filter', `${filter.attribute},${filter.operator},${filter.value.toString()}`);
4187
+ const value = Array.isArray(filter.value)
4188
+ ? filter.value.map((v) => encodeURIComponent(v.toString().split(',').join('\\,'))).join(',')
4189
+ : encodeURIComponent(filter.value.toString().replace(/,/g, '\\,'));
4190
+ params = params.append('filter', `${filter.attribute},${filter.operator},${value}`);
4188
4191
  });
4189
4192
  }
4190
4193
  if (includeLimit) {
@@ -9229,11 +9232,12 @@ class DashboardComponent extends SubscriptionnerDirective {
9229
9232
  set forceModeEdition(mode) {
9230
9233
  this.forceModeEdition$.next(mode);
9231
9234
  }
9232
- constructor(store, overlay, viewContainerRef) {
9235
+ constructor(store, overlay, viewContainerRef, widgetFactoryService) {
9233
9236
  super();
9234
9237
  this.store = store;
9235
9238
  this.overlay = overlay;
9236
9239
  this.viewContainerRef = viewContainerRef;
9240
+ this.widgetFactoryService = widgetFactoryService;
9237
9241
  this.manifest = null;
9238
9242
  this.modeEdition = false;
9239
9243
  this.staticDashboard$ = new BehaviorSubject(null);
@@ -9309,12 +9313,9 @@ class DashboardComponent extends SubscriptionnerDirective {
9309
9313
  this.nonFillerWidgets$ = this.windowManifest$.pipe(map$1((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
9310
9314
  this.subscriptions.add(this.staticDashboard$.subscribe((manifest) => {
9311
9315
  if (!!manifest) {
9312
- const getDataActions = [
9313
- ...new Set((manifest.widgets ?? [])
9314
- .reduce((p, c) => [...p, c], [])
9315
- .map((widManifest) => widManifest.datasource))
9316
- ].reduce((p, c) => [...p, ...(Array.isArray(c) ? c : [c])], []).map((resultSet) => DashboardActions.assertResultSets({ id: resultSet }));
9317
- getDataActions.forEach((action) => this.store.dispatch(action));
9316
+ this.store.dispatch(DashboardActions.assertResultSets({
9317
+ staticManifest: manifest
9318
+ }));
9318
9319
  }
9319
9320
  }));
9320
9321
  this.subscriptions.add(combineLatest([this.windowManifest$, this.store.select(DataSourceSelectors.getDataSources)]).subscribe(([manifest, datasets]) => {
@@ -9761,13 +9762,13 @@ class DashboardComponent extends SubscriptionnerDirective {
9761
9762
  }
9762
9763
  }));
9763
9764
  }
9764
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
9765
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
9765
9766
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div\n *ngIf=\"data.globalLoading; else notLoading\"\n class=\"no-widget\"\n [style.grid-area]=\"backgroundArea$ | async\"\n >\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i8.PryPageLoaderComponent, selector: "pry-page-loader", inputs: ["image", "imageAltText"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
9766
9767
  }
9767
9768
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DashboardComponent, decorators: [{
9768
9769
  type: Component,
9769
9770
  args: [{ selector: 'pry-dashboard', template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div\n *ngIf=\"data.globalLoading; else notLoading\"\n class=\"no-widget\"\n [style.grid-area]=\"backgroundArea$ | async\"\n >\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
9770
- }], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { templateModal: [{
9771
+ }], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: WidgetFactoryService }], propDecorators: { templateModal: [{
9771
9772
  type: ViewChild,
9772
9773
  args: ['templateModal', { read: TemplateRef }]
9773
9774
  }], instanciators: [{
@@ -12022,56 +12023,41 @@ class DashboardEffects {
12022
12023
  this.endLoadingAfterFollowingManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.followManifestRoute), map$1((action) => DashboardActions.endLoading())));
12023
12024
  this.requestManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.requestAllRoutes), map$1(() => DashboardActions.updateRouteManifest({ route: this.router.url }))));
12024
12025
  this.assertResultSets$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.assertResultSets, DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), mergeMap$1(([action, manifest, resultSets, resultSetsParams, quickOrder]) => {
12025
- // @ts-ignore
12026
- if (!action.id) {
12027
- // First send aggregate updates
12028
- const toAggregateActions = [
12029
- ...new Set(manifest.windows
12030
- .map((winManifest) => (winManifest ?? {}).widgets ?? [])
12031
- .reduce((p, c) => [...p, ...c], [])
12032
- .map((widManifest) => this.widgetFactoryService.aggregatesToAutoLoad(widManifest))
12033
- .reduce((p, c) => [...p, ...c], []))
12034
- ].map((ds) => DashboardActions.triggerAggregate({ id: ds }));
12035
- const toItemsActions = Object.values(manifest.windows
12026
+ const manifestToCheck = action.type === DashboardActions.assertResultSets.type && action.staticManifest
12027
+ ? { windows: [action.staticManifest] }
12028
+ : manifest;
12029
+ // First send aggregate updates
12030
+ const toAggregateActions = [
12031
+ ...new Set(manifestToCheck.windows
12036
12032
  .map((winManifest) => (winManifest ?? {}).widgets ?? [])
12037
12033
  .reduce((p, c) => [...p, ...c], [])
12038
- .map((widManifest) => this.widgetFactoryService.datasourcesToAutoLoad(widManifest))
12039
- .flat()
12040
- .reduce((p, c) => ({
12041
- ...p,
12042
- [c.datasetId]: {
12043
- ...p[c.datasetId],
12044
- ...c,
12045
- excludeGeo: p[c.datasetId]?.excludeGeo === false ? p[c.datasetId].excludeGeo : c.excludeGeo
12046
- }
12047
- }), {}))
12048
- .filter((resultSet) => !!resultSet.datasetId &&
12049
- resultSet.datasetId !== '' &&
12050
- (!resultSets[resultSet.datasetId] ||
12051
- resultSetsParams[resultSet.datasetId] !==
12052
- this.searchService.getItemsSerializedParams(resultSet.datasetId, quickOrder)))
12053
- .map((resultSet) => SearchActions.getDatasourceItems({
12054
- id: resultSet.datasetId,
12055
- excludeGeo: resultSet.excludeGeo,
12056
- from: 'DashboardEffects.assertResultSets$-1'
12057
- }));
12058
- return [...toItemsActions, ...toAggregateActions];
12059
- }
12060
- else {
12061
- // @ts-ignore
12062
- if (!resultSets[action.id]) {
12063
- return [
12064
- SearchActions.getDatasourceItems({
12065
- // @ts-ignore
12066
- id: action.id,
12067
- // @ts-ignore
12068
- excludeGeo: action.excludeGeo != undefined ? action.excludeGeo : true,
12069
- from: 'DashboardEffects.assertResultSets$-2'
12070
- })
12071
- ];
12034
+ .map((widManifest) => this.widgetFactoryService.aggregatesToAutoLoad(widManifest))
12035
+ .reduce((p, c) => [...p, ...c], []))
12036
+ ].map((ds) => DashboardActions.triggerAggregate({ id: ds }));
12037
+ const toItemsActions = Object.values(manifestToCheck.windows
12038
+ .map((winManifest) => (winManifest ?? {}).widgets ?? [])
12039
+ .reduce((p, c) => [...p, ...c], [])
12040
+ .map((widManifest) => this.widgetFactoryService.datasourcesToAutoLoad(widManifest))
12041
+ .flat()
12042
+ .reduce((p, c) => ({
12043
+ ...p,
12044
+ [c.datasetId]: {
12045
+ ...p[c.datasetId],
12046
+ ...c,
12047
+ excludeGeo: p[c.datasetId]?.excludeGeo === false ? p[c.datasetId].excludeGeo : c.excludeGeo
12072
12048
  }
12073
- return [];
12074
- }
12049
+ }), {}))
12050
+ .filter((resultSet) => !!resultSet.datasetId &&
12051
+ resultSet.datasetId !== '' &&
12052
+ (!resultSets[resultSet.datasetId] ||
12053
+ resultSetsParams[resultSet.datasetId] !==
12054
+ this.searchService.getItemsSerializedParams(resultSet.datasetId, quickOrder)))
12055
+ .map((resultSet) => SearchActions.getDatasourceItems({
12056
+ id: resultSet.datasetId,
12057
+ excludeGeo: resultSet.excludeGeo,
12058
+ from: 'DashboardEffects.assertResultSets$-1'
12059
+ }));
12060
+ return [...toItemsActions, ...toAggregateActions];
12075
12061
  })));
12076
12062
  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 });
12077
12063
  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) => [