@provoly/dashboard 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/svgs/datasource.svg +4 -0
- package/assets/svgs/datasources.svg +4 -0
- package/assets/svgs/loader.svg +13 -0
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +3 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +19 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +4 -2
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-toolbox.mjs +2 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +32 -8
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/dashboard/components/dashboard.component.d.ts +1 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +3 -2
- package/lib/dashboard/store/dashboard.effects.d.ts +1 -0
- package/lib/dashboard/store/dashboard.reducers.d.ts +1 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +16 -0
- package/package.json +31 -31
- package/schematics/ng-add/index.js +58 -19
- package/schematics/ng-add/index.js.map +1 -1
- package/styles-theme/components-theme/_o-dashboard.theme.scss +12 -0
- package/styles-theme/main-theme.scss +1 -0
|
@@ -209,7 +209,8 @@ const enTranslations$1 = {
|
|
|
209
209
|
delete: 'Delete',
|
|
210
210
|
maximize: 'Maximize',
|
|
211
211
|
none_auto: 'Insert restitutions here',
|
|
212
|
-
none_manual: 'Drag n drop'
|
|
212
|
+
none_manual: 'Drag n drop',
|
|
213
|
+
loading: 'Loading'
|
|
213
214
|
},
|
|
214
215
|
namedQuery: {
|
|
215
216
|
defaultRs: 'Current search',
|
|
@@ -535,7 +536,8 @@ const frTranslations$1 = {
|
|
|
535
536
|
delete: 'Supprimer',
|
|
536
537
|
maximize: 'Maximiser',
|
|
537
538
|
none_auto: 'Insérez ici vos restitutions',
|
|
538
|
-
none_manual: 'Glisser - Déposer'
|
|
539
|
+
none_manual: 'Glisser - Déposer',
|
|
540
|
+
loading: 'Chargement'
|
|
539
541
|
},
|
|
540
542
|
namedQuery: {
|
|
541
543
|
defaultRs: 'Recherche courante',
|
|
@@ -1253,7 +1255,8 @@ const DashboardActions = {
|
|
|
1253
1255
|
fetchManifestsList: createAction('[Dashboard] (bus) fetching available manifests'),
|
|
1254
1256
|
setRefreshRate: createAction('[Dashboard] (bus) setting refreshRate', props()),
|
|
1255
1257
|
updateManifestsList: createAction('[Dashboard] (bus) received manifests list', props()),
|
|
1256
|
-
fetchStaticManifest: createAction('[Dashboard] fetching staticManifest', props()),
|
|
1258
|
+
fetchStaticManifest: createAction('[Dashboard] (bus) fetching staticManifest', props()),
|
|
1259
|
+
endLoading: createAction('[Dashboard] end loading'),
|
|
1257
1260
|
updateStaticManifest: createAction('[Dashboard] (bus) received staticManifest', props()),
|
|
1258
1261
|
loadManifest: createAction('[Dashboard] (bus) load manifest', props()),
|
|
1259
1262
|
loadAndActivateManifest: createAction('[Dashboard] (bus) load and activate manifest', props()),
|
|
@@ -3725,6 +3728,7 @@ const manifestDatasources = createSelector(globalManifest, (manifest) => Manifes
|
|
|
3725
3728
|
const staticManifest = createSelector(manifests,
|
|
3726
3729
|
// @ts-ignore
|
|
3727
3730
|
(manifests) => ({ windows: [], ...manifests?.staticManifest } ?? { windows: [] }));
|
|
3731
|
+
const loading = createSelector(manifests, (manifests) => !!manifests?.loading);
|
|
3728
3732
|
const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
|
|
3729
3733
|
const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
|
|
3730
3734
|
const gridLayout = createSelector(windowManifest, (manifest) => (manifest.grid ?? {}).layout ?? DashboardGridLayout.MANUAL);
|
|
@@ -3781,7 +3785,7 @@ const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.w
|
|
|
3781
3785
|
.reduce((p, c) => [...p, ...c], [])
|
|
3782
3786
|
.reduce((p, c) => ({ ...p, [c.rsName ?? '']: [...(p[c.rsName ?? ''] || []), { ...c }] }), {}));
|
|
3783
3787
|
const presentation = createSelector(feature$4, (state) => state?.presentation);
|
|
3784
|
-
const savePresentationActive = createSelector(presentation, globalManifest, (state, global) => !!state.current && (state.viewMode === ViewMode.CREATION || !equal(global, state.initial)));
|
|
3788
|
+
const savePresentationActive = createSelector(presentation, globalManifest, (state, global) => !!state.current && state.current.owner && (state.viewMode === ViewMode.CREATION || !equal(global, state.initial)));
|
|
3785
3789
|
const filters = createSelector(feature$4, (state) => state?.manifests.manifest.filters ?? {});
|
|
3786
3790
|
const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.manifest.filters
|
|
3787
3791
|
? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
|
|
@@ -3821,6 +3825,7 @@ const DashboardSelectors = {
|
|
|
3821
3825
|
dashboardCellParams,
|
|
3822
3826
|
dashboardEditionMode,
|
|
3823
3827
|
staticManifest,
|
|
3828
|
+
loading,
|
|
3824
3829
|
quickOrder,
|
|
3825
3830
|
presentation,
|
|
3826
3831
|
savePresentationActive,
|
|
@@ -7159,6 +7164,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
7159
7164
|
};
|
|
7160
7165
|
this.DashboardGridLayout = DashboardGridLayout;
|
|
7161
7166
|
this.layout = DashboardGridLayout.MANUAL;
|
|
7167
|
+
this.loading$ = this.store.select(DashboardSelectors.loading);
|
|
7162
7168
|
this.modeEdition$ = this.store.select(DashboardSelectors.dashboardEditionMode);
|
|
7163
7169
|
this.subscriptions.add(this.modeEdition$.subscribe((mode) => {
|
|
7164
7170
|
this.modeEdition = mode;
|
|
@@ -7622,11 +7628,11 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
7622
7628
|
this.widgetsInstances[widgetIndex] = $event;
|
|
7623
7629
|
}
|
|
7624
7630
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7625
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", CloseOnDragOut: "CloseOnDragOut" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<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 (widgetInstance)=\"updateInstance(widgetIndex, $event)\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"(nonFillerWidgets$ | async) === 0\">\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n
|
|
7631
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", CloseOnDragOut: "CloseOnDragOut" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<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 (widgetInstance)=\"updateInstance(widgetIndex, $event)\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"(nonFillerWidgets$ | async) === 0\">\n <ng-container *ngIf=\"loading$ | async; else notLoading\">\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n </ng-container>\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 ? '@pry.widget.target.none_manual' : '@pry.widget.target.none_auto')\n | i18n\n }} {{ backgroundArea$ | async }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL ? '@pry.widget.target.none_manual' : '@pry.widget.target.none_auto')\n | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\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: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified", "widgetInstance"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
7626
7632
|
}
|
|
7627
7633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
7628
7634
|
type: Component,
|
|
7629
|
-
args: [{ selector: 'pry-dashboard', template: "<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 (widgetInstance)=\"updateInstance(widgetIndex, $event)\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"(nonFillerWidgets$ | async) === 0\">\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n
|
|
7635
|
+
args: [{ selector: 'pry-dashboard', template: "<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 (widgetInstance)=\"updateInstance(widgetIndex, $event)\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"(nonFillerWidgets$ | async) === 0\">\n <ng-container *ngIf=\"loading$ | async; else notLoading\">\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n </ng-container>\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 ? '@pry.widget.target.none_manual' : '@pry.widget.target.none_auto')\n | i18n\n }} {{ backgroundArea$ | async }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL ? '@pry.widget.target.none_manual' : '@pry.widget.target.none_auto')\n | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\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" }]
|
|
7630
7636
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { templateModal: [{
|
|
7631
7637
|
type: ViewChild,
|
|
7632
7638
|
args: ['templateModal', { read: TemplateRef }]
|
|
@@ -9487,9 +9493,10 @@ class DashboardEffects {
|
|
|
9487
9493
|
selectedIds
|
|
9488
9494
|
});
|
|
9489
9495
|
})));
|
|
9490
|
-
this.fetchStaticManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchStaticManifest), mergeMap$1((action) => this.manifestService
|
|
9496
|
+
this.fetchStaticManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchStaticManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank]) => rank === 0), mergeMap$1(([action, rank]) => this.manifestService
|
|
9491
9497
|
.get(action.id)
|
|
9492
9498
|
.pipe(map$1((staticManifest) => DashboardActions.updateStaticManifest({ staticManifest }))))));
|
|
9499
|
+
this.fetchStaticManifestLoading$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchStaticManifest), delay(5000), map$1((action) => DashboardActions.endLoading())));
|
|
9493
9500
|
this.loadAndActivateManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.loadAndActivateManifest, DashboardActions.loadManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank]) => rank === 0), mergeMap$1(([action, rank, selectedIds]) => this.manifestService.get(action.id).pipe(mergeMap$1((manifest) => {
|
|
9494
9501
|
return action.type === DashboardActions.loadAndActivateManifest.type
|
|
9495
9502
|
? [
|
|
@@ -9762,7 +9769,8 @@ const dashboardInitialState = {
|
|
|
9762
9769
|
windows: [{ widgets: [] }]
|
|
9763
9770
|
},
|
|
9764
9771
|
list: [],
|
|
9765
|
-
currentId: ''
|
|
9772
|
+
currentId: '',
|
|
9773
|
+
loading: false
|
|
9766
9774
|
},
|
|
9767
9775
|
presentation: {
|
|
9768
9776
|
current: undefined,
|
|
@@ -10338,6 +10346,22 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
10338
10346
|
...state,
|
|
10339
10347
|
wmsFeatures: deDupedIds.map((id) => allFeatures.find((feat) => feat.id === id))
|
|
10340
10348
|
};
|
|
10349
|
+
}), on(DashboardActions.fetchStaticManifest, (state, action) => {
|
|
10350
|
+
return {
|
|
10351
|
+
...state,
|
|
10352
|
+
manifests: {
|
|
10353
|
+
...state.manifests,
|
|
10354
|
+
loading: true
|
|
10355
|
+
}
|
|
10356
|
+
};
|
|
10357
|
+
}), on(DashboardActions.endLoading, (state, action) => {
|
|
10358
|
+
return {
|
|
10359
|
+
...state,
|
|
10360
|
+
manifests: {
|
|
10361
|
+
...state.manifests,
|
|
10362
|
+
loading: false
|
|
10363
|
+
}
|
|
10364
|
+
};
|
|
10341
10365
|
}));
|
|
10342
10366
|
function dashboardReducer(state, action) {
|
|
10343
10367
|
return internalReducer(state, action);
|