@provoly/dashboard 1.4.60 → 1.4.63
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/esm2022/lib/core/i18n/fr.translations.mjs +3 -1
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +64 -54
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +3 -2
- package/fesm2022/provoly-dashboard.mjs +56 -44
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/fr.translations.d.ts +2 -0
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +5 -1
- package/package.json +43 -43
- package/styles/components/_o-widget.scss +10 -0
|
@@ -701,6 +701,8 @@ const frTranslations$1 = {
|
|
|
701
701
|
resultsNonAccurate: '{{displayed}} sur environ {{total}}'
|
|
702
702
|
},
|
|
703
703
|
modalTitle: 'Voulez-vous confirmer ?',
|
|
704
|
+
deleteDashBoard: 'Supprimer le tableau de bord',
|
|
705
|
+
deleteDashBoardAsk: 'Êtes-vous sûr de vouloir le supprimer ?',
|
|
704
706
|
itemId: 'Id',
|
|
705
707
|
class: 'Classe',
|
|
706
708
|
colorScheme: 'Schéma de couleur',
|
|
@@ -11299,13 +11301,14 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
11299
11301
|
this._widgetIndex$.next(widgetIndex);
|
|
11300
11302
|
this._widgetIndex = widgetIndex;
|
|
11301
11303
|
}
|
|
11302
|
-
constructor(store, overlay, viewContainerRef, toolboxMenuService, manifestService) {
|
|
11304
|
+
constructor(store, overlay, viewContainerRef, toolboxMenuService, manifestService, route) {
|
|
11303
11305
|
super();
|
|
11304
11306
|
this.store = store;
|
|
11305
11307
|
this.overlay = overlay;
|
|
11306
11308
|
this.viewContainerRef = viewContainerRef;
|
|
11307
11309
|
this.toolboxMenuService = toolboxMenuService;
|
|
11308
11310
|
this.manifestService = manifestService;
|
|
11311
|
+
this.route = route;
|
|
11309
11312
|
this.manifest$ = new BehaviorSubject(null);
|
|
11310
11313
|
this.places = [];
|
|
11311
11314
|
this.zoomLevel = 0;
|
|
@@ -11338,6 +11341,7 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
11338
11341
|
this.menu = false;
|
|
11339
11342
|
this.type = LibraryTypes.ILLUSTRATION;
|
|
11340
11343
|
this.widgetsZoomed = [];
|
|
11344
|
+
this.isWall$ = this.route.queryParams.pipe(map((qP) => !!qP['wall']));
|
|
11341
11345
|
this.store.select(DashboardSelectors.dashboardCellParams).subscribe((params) => {
|
|
11342
11346
|
this.maxWidth = params.columns;
|
|
11343
11347
|
this.maxHeight = params.rows;
|
|
@@ -11471,49 +11475,56 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
11471
11475
|
this.store.dispatch(DashboardActions.toggleEditionMode({ force: false }));
|
|
11472
11476
|
this.menuOpen();
|
|
11473
11477
|
}
|
|
11478
|
+
isWidgetZoomed(index) {
|
|
11479
|
+
return this.manifestService.widgetZoomed()[index]?.zoom;
|
|
11480
|
+
}
|
|
11474
11481
|
maximize(widgetIndex) {
|
|
11475
|
-
this.
|
|
11476
|
-
|
|
11477
|
-
this.
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
widget
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11482
|
+
if (this.isWidgetZoomed(widgetIndex)) {
|
|
11483
|
+
this.clickMax.set(true);
|
|
11484
|
+
if (this.zoomWidth !== this.maxWidth) {
|
|
11485
|
+
this.zoomLevel++;
|
|
11486
|
+
this.zoomWidth = this.zoomWidth < this.maxWidth ? this.zoomWidth + 1 : this.maxWidth;
|
|
11487
|
+
this.zoomHeight = this.zoomWidth < this.maxWidth ? this.zoomHeight + 1 : this.zoomHeight;
|
|
11488
|
+
this.widgetsZoomed.forEach((widget, index) => {
|
|
11489
|
+
widget.zoom = index === widgetIndex;
|
|
11490
|
+
});
|
|
11491
|
+
this.manifestService.widgetZoomed.set(this.widgetsZoomed);
|
|
11492
|
+
this.manifestService.widgetZoomIn.next({
|
|
11493
|
+
index: widgetIndex,
|
|
11494
|
+
zoom: true,
|
|
11495
|
+
layout: {
|
|
11496
|
+
x: this.widgetX,
|
|
11497
|
+
y: this.widgetY,
|
|
11498
|
+
width: this.zoomWidth,
|
|
11499
|
+
height: this.zoomHeight
|
|
11500
|
+
}
|
|
11501
|
+
});
|
|
11502
|
+
}
|
|
11494
11503
|
}
|
|
11495
11504
|
}
|
|
11496
11505
|
minimize(widgetIndex) {
|
|
11497
|
-
this.
|
|
11498
|
-
|
|
11499
|
-
this.zoomLevel
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
if (this.zoomLevel === 0) {
|
|
11513
|
-
this.widgetsZoomed.forEach((widget) => {
|
|
11514
|
-
widget.zoom = true;
|
|
11506
|
+
if (this.isWidgetZoomed(widgetIndex)) {
|
|
11507
|
+
this.clickMax.set(false);
|
|
11508
|
+
if (this.zoomLevel > 0) {
|
|
11509
|
+
this.zoomLevel--;
|
|
11510
|
+
this.zoomWidth = this.zoomWidth > this.widgetWidth ? this.zoomWidth - 1 : this.widgetWidth;
|
|
11511
|
+
this.zoomHeight = this.zoomHeight > this.widgetHeight ? this.zoomHeight - 1 : this.widgetHeight;
|
|
11512
|
+
this.manifestService.widgetZoomIn.next({
|
|
11513
|
+
index: widgetIndex,
|
|
11514
|
+
zoom: true,
|
|
11515
|
+
layout: {
|
|
11516
|
+
x: this.widgetX,
|
|
11517
|
+
y: this.widgetY,
|
|
11518
|
+
width: this.zoomWidth,
|
|
11519
|
+
height: this.zoomHeight
|
|
11520
|
+
}
|
|
11515
11521
|
});
|
|
11516
|
-
|
|
11522
|
+
if (this.zoomLevel === 0) {
|
|
11523
|
+
this.widgetsZoomed.forEach((widget) => {
|
|
11524
|
+
widget.zoom = true;
|
|
11525
|
+
});
|
|
11526
|
+
this.manifestService.widgetZoomed.set(this.widgetsZoomed);
|
|
11527
|
+
}
|
|
11517
11528
|
}
|
|
11518
11529
|
}
|
|
11519
11530
|
}
|
|
@@ -11704,13 +11715,13 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
11704
11715
|
this.subscription?.unsubscribe();
|
|
11705
11716
|
this.openSub?.unsubscribe();
|
|
11706
11717
|
}
|
|
11707
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryWidgetHeaderComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: ToolboxMenuService }, { token: ManifestService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11708
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if ((manifest$ | async)?.type === 'vega' && manifestService.widgetZoomed()[_widgetIndex]?.zoom) {\n <div class=\"vega-zoom-container\">\n <div (click)=\"minimize(_widgetIndex)\" [class.zoom-clicked]=\"!clickMax() && zoomLevel !== 0\">\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"remove\"></pry-icon>\n </div>\n <div (click)=\"maximize(_widgetIndex)\" [class.zoom-clicked]=\"clickMax() && zoomLevel !== 0\">\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"add\"></pry-icon>\n </div>\n </div>\n }\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\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\" #cross (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\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\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-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["showButtons", "showTitle", "manifest"], outputs: ["previousTab", "nextTab", "cancel", "validated", "itemsChanged"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
11718
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryWidgetHeaderComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: ToolboxMenuService }, { token: ManifestService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11719
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">({{ [ds.id] | resultSetSize | async }})</h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if ((manifest$ | async)?.type === 'vega' && !(isWall$ | async)) {\n <div class=\"vega-zoom-container\">\n <div\n (click)=\"minimize(_widgetIndex)\"\n [class.zoom-clicked]=\"!clickMax() && zoomLevel !== 0\"\n [class.zoom-disabled]=\"zoomLevel === 0 || !isWidgetZoomed(_widgetIndex)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"remove\"></pry-icon>\n </div>\n <div\n (click)=\"maximize(_widgetIndex)\"\n [class.zoom-clicked]=\"clickMax() && zoomLevel !== 0 && this.zoomWidth !== this.maxWidth\"\n [class.zoom-disabled]=\"this.zoomWidth === this.maxWidth || !isWidgetZoomed(_widgetIndex)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"add\"></pry-icon>\n </div>\n </div>\n }\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\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\" #cross (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\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\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-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["showButtons", "showTitle", "manifest"], outputs: ["previousTab", "nextTab", "cancel", "validated", "itemsChanged"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
11709
11720
|
}
|
|
11710
11721
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryWidgetHeaderComponent, decorators: [{
|
|
11711
11722
|
type: Component,
|
|
11712
|
-
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if ((manifest$ | async)?.type === 'vega' && manifestService.widgetZoomed()[_widgetIndex]?.zoom) {\n <div class=\"vega-zoom-container\">\n <div (click)=\"minimize(_widgetIndex)\" [class.zoom-clicked]=\"!clickMax() && zoomLevel !== 0\">\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"remove\"></pry-icon>\n </div>\n <div (click)=\"maximize(_widgetIndex)\" [class.zoom-clicked]=\"clickMax() && zoomLevel !== 0\">\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"add\"></pry-icon>\n </div>\n </div>\n }\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\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\" #cross (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\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\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-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n" }]
|
|
11713
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: ToolboxMenuService }, { type: ManifestService }], propDecorators: { template: [{
|
|
11723
|
+
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n @if ((manifest$ | async)?.title) {\n <h2 class=\"o-widget__header__content__title\">\n {{ (manifest$ | async)?.title }}\n </h2>\n } @else {\n @for (ds of usedDatasources$ | async; track ds) {\n <div class=\"o-widget__header__content__query\">\n @if (ds.id | translateId: { type: 'datasource', output: 'icon', noDefault: true } | async; as url) {\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n }\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n @if (displayCount && !isGeo(ds)) {\n <h3 class=\"o-widget__header__content__query__name\">({{ [ds.id] | resultSetSize | async }})</h3>\n }\n </div>\n }\n @if (((usedDatasources$ | async) ?? []).length === 0) {\n <div class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n }\n }\n </div>\n @if ((manifest$ | async)?.type === 'vega' && !(isWall$ | async)) {\n <div class=\"vega-zoom-container\">\n <div\n (click)=\"minimize(_widgetIndex)\"\n [class.zoom-clicked]=\"!clickMax() && zoomLevel !== 0\"\n [class.zoom-disabled]=\"zoomLevel === 0 || !isWidgetZoomed(_widgetIndex)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"remove\"></pry-icon>\n </div>\n <div\n (click)=\"maximize(_widgetIndex)\"\n [class.zoom-clicked]=\"clickMax() && zoomLevel !== 0 && this.zoomWidth !== this.maxWidth\"\n [class.zoom-disabled]=\"this.zoomWidth === this.maxWidth || !isWidgetZoomed(_widgetIndex)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"add\"></pry-icon>\n </div>\n </div>\n }\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n }\n</div>\n\n<ng-template #overlayMenu>\n @if (displayContextMenu$ | async; as options) {\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n @if (options === true || options['datasourceSelection'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['parameters'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <ng-content></ng-content>\n </li>\n }\n @if (options === true || options!['window'] === true) {\n @for (targetIndex of targetIndexes$ | async; track targetIndex) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n: { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n }\n }\n @if (hasGrid && (options === true || options!['changeSpot'] === true)) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['maximize'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n }\n @if (options === true || options!['addToCatalog'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n }\n @if (options === true || options!['delete'] === true) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n }\n @for (option of additionalOptions; track option) {\n <li class=\"m-context-menu__list__item\" role=\"none\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n }\n </ul>\n </div>\n }\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\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\" #cross (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\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n [manifest]=\"manifest$ | async\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\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-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\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 <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n" }]
|
|
11724
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: ToolboxMenuService }, { type: ManifestService }, { type: i2.ActivatedRoute }], propDecorators: { template: [{
|
|
11714
11725
|
type: ViewChild,
|
|
11715
11726
|
args: ['template', { read: TemplateRef }]
|
|
11716
11727
|
}], templateModal: [{
|
|
@@ -12463,7 +12474,8 @@ class DashboardEffects {
|
|
|
12463
12474
|
this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter(([action, rank]) => rank === 0 || rank === -1), debounceTime(100), mergeMap(([action, rank]) => this.manifestService.list().pipe(map((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
|
|
12464
12475
|
this.confirmManifestDeletion$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.confirmManifestDeletion), tap((action) => {
|
|
12465
12476
|
const data = {
|
|
12466
|
-
title: '@pry.widget.
|
|
12477
|
+
title: '@pry.widget.deleteDashBoard',
|
|
12478
|
+
message: '@pry.widget.deleteDashBoardAsk',
|
|
12467
12479
|
actions: [
|
|
12468
12480
|
{
|
|
12469
12481
|
id: 0,
|