@provoly/dashboard 1.4.21 → 1.4.22
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.
|
@@ -5,7 +5,7 @@ import { CommonModule, AsyncPipe, DOCUMENT } from '@angular/common';
|
|
|
5
5
|
import * as i1$1 from '@angular/common/http';
|
|
6
6
|
import { HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpClientModule } from '@angular/common/http';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { InjectionToken, Injectable, Directive, Optional, Inject, Input, Component, Pipe, ChangeDetectionStrategy, HostBinding, NgModule, Injector, EventEmitter, Output, TemplateRef, ViewChild, SecurityContext, ContentChildren, forwardRef, HostListener, ViewContainerRef,
|
|
8
|
+
import { InjectionToken, Injectable, Directive, Optional, Inject, Input, Component, Pipe, ChangeDetectionStrategy, HostBinding, NgModule, Injector, EventEmitter, Output, TemplateRef, ViewChild, SecurityContext, ContentChildren, forwardRef, HostListener, ViewContainerRef, ViewChildren, ViewEncapsulation, createNgModule } from '@angular/core';
|
|
9
9
|
import * as i2 from '@angular/router';
|
|
10
10
|
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
11
11
|
import * as i1$2 from '@ngrx/effects';
|
|
@@ -9365,8 +9365,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9365
9365
|
this.indexForRemoval = -1;
|
|
9366
9366
|
this.params = {};
|
|
9367
9367
|
this.forceModeEdition$ = new BehaviorSubject(undefined);
|
|
9368
|
-
this.
|
|
9369
|
-
this.height = signal(10);
|
|
9368
|
+
this._dashboardSize$ = new BehaviorSubject({ width: 300, height: 300 });
|
|
9370
9369
|
this.CloseOnDragOut = true;
|
|
9371
9370
|
this.noBackground = false;
|
|
9372
9371
|
this.canCalculateView = false;
|
|
@@ -9487,19 +9486,24 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9487
9486
|
this.separators$ = this.store
|
|
9488
9487
|
.select(DashboardSelectors.gridLayout)
|
|
9489
9488
|
.pipe(map((layout) => layout === DashboardGridLayout.MANUAL ? [] : WidgetPlacementUtils.getLayout(layout)?.places ?? []));
|
|
9489
|
+
this.dashboardSize$ = this._dashboardSize$.pipe(startWith({
|
|
9490
|
+
width: 300,
|
|
9491
|
+
height: 300
|
|
9492
|
+
}), distinctUntilChanged((p, c) => p.width === c.width && p.height === c.height), debounceTime(100), distinctUntilChanged((p, c) => p.width === c.width && p.height === c.height));
|
|
9493
|
+
}
|
|
9494
|
+
ngAfterViewChecked() {
|
|
9495
|
+
this.updateSelfSize();
|
|
9490
9496
|
}
|
|
9491
9497
|
ngOnInit() {
|
|
9492
9498
|
if (this.displayOptions)
|
|
9493
9499
|
this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CUSTOM, customDisplay: this.displayOptions }));
|
|
9494
|
-
this.updateSelfSize();
|
|
9495
9500
|
}
|
|
9496
9501
|
ngAfterViewInit() {
|
|
9497
9502
|
this.canCalculateView = true;
|
|
9498
|
-
this.updateSelfSize();
|
|
9499
9503
|
}
|
|
9500
9504
|
updateSelfSize() {
|
|
9501
|
-
this.
|
|
9502
|
-
this.
|
|
9505
|
+
const boundingRect = this.el.nativeElement.getBoundingClientRect();
|
|
9506
|
+
this._dashboardSize$.next({ width: boundingRect.width, height: boundingRect.height });
|
|
9503
9507
|
}
|
|
9504
9508
|
/***
|
|
9505
9509
|
* Manage display
|
|
@@ -9891,11 +9895,11 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9891
9895
|
}));
|
|
9892
9896
|
}
|
|
9893
9897
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9894
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", 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 @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\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 @if (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 }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\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 }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"
|
|
9898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", 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 @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\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 @if (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 }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\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 }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"(dashboardSize$ | async)?.width\"\n [style.height.px]=\"(dashboardSize$ | async)?.height\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\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: "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: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
9895
9899
|
}
|
|
9896
9900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
9897
9901
|
type: Component,
|
|
9898
|
-
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 @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\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 @if (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 }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\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 }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"
|
|
9902
|
+
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 @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\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 @if (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 }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\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 }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"(dashboardSize$ | async)?.width\"\n [style.height.px]=\"(dashboardSize$ | async)?.height\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\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" }]
|
|
9899
9903
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }], propDecorators: { templateModal: [{
|
|
9900
9904
|
type: ViewChild,
|
|
9901
9905
|
args: ['templateModal', { read: TemplateRef }]
|