@provoly/dashboard 1.1.9 → 1.1.11
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/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +5 -3
- package/dataset/components/dataset-detail/dataset-detail.component.d.ts +5 -3
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +24 -12
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +18 -9
- package/esm2022/dataset/components/dataset.component.mjs +3 -2
- package/esm2022/import/components/import.component.mjs +6 -4
- package/esm2022/lib/core/access/access.service.mjs +4 -1
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +3 -3
- package/esm2022/lib/core/components/share/access-rights-share/access-rights-share.component.mjs +3 -3
- package/esm2022/lib/core/components/share/access-rights-share-modal/access-rights-share-modal.component.mjs +3 -1
- package/esm2022/lib/core/components/translate-item-to-symbol/translate-item-to-symbol.pipe.mjs +8 -12
- package/esm2022/lib/core/i18n/en.translations.mjs +4 -1
- package/esm2022/lib/core/i18n/fr.translations.mjs +4 -1
- package/esm2022/lib/core/store/config/config.selectors.mjs +2 -2
- package/esm2022/lib/core/store/relation-types/relation-types.selectors.mjs +2 -2
- package/esm2022/lib/core/symbol/symbol.service.mjs +4 -4
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +2 -2
- package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +2 -2
- package/esm2022/toolbox/components/delete/delete.component.mjs +3 -3
- package/esm2022/toolbox/components/edit-mode-action/edit-mode-action.component.mjs +3 -3
- package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +3 -4
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +3 -3
- package/esm2022/toolbox/components/share/share.component.mjs +3 -3
- package/esm2022/toolbox/components/switch-to-edit-content/switch-to-edit-content.component.mjs +3 -3
- package/esm2022/toolbox/components/toolbox-action/toolbox-action.component.mjs +5 -5
- package/esm2022/toolbox/components/toolbox.component.mjs +15 -12
- package/esm2022/toolbox/toolbox.model.mjs +4 -4
- package/esm2022/widgets/widget-aggregated-chart/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-iframe/component/widget-iframe.component.mjs +3 -3
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +1 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +11 -7
- package/esm2022/widgets/widget-map/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-vega/style/css.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +22 -10
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +19 -9
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +5 -3
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +33 -31
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +12 -8
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +26 -17
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/access/access.service.d.ts +3 -0
- package/lib/core/components/translate-item-to-symbol/translate-item-to-symbol.pipe.d.ts +1 -7
- package/lib/core/i18n/en.translations.d.ts +3 -0
- package/lib/core/i18n/fr.translations.d.ts +3 -0
- package/package.json +25 -25
- package/styles/abstracts/_mixins.scss +1 -1
- package/styles-theme/abstracts-theme/variables/_variables-typo.scss +5 -5
- package/toolbox/components/toolbox-action/toolbox-action.component.d.ts +1 -1
- package/toolbox/components/toolbox.component.d.ts +3 -2
- package/widgets/widget-aggregated-chart/style/_o-widget-chart.scss +1 -1
- package/widgets/widget-map/style/_m-layer-legend.scss +7 -0
- package/widgets/widget-vega/style/_o-widget-vega.scss +9 -0
|
@@ -14,7 +14,7 @@ import * as i5 from '@provoly/dashboard/components/checkbox';
|
|
|
14
14
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
15
15
|
import * as i6$1 from '@provoly/dashboard/components/stepper';
|
|
16
16
|
import { PryStepperModule } from '@provoly/dashboard/components/stepper';
|
|
17
|
-
import { map, of, BehaviorSubject, combineLatest, take
|
|
17
|
+
import { map, switchMap, of, BehaviorSubject, combineLatest, take } from 'rxjs';
|
|
18
18
|
import * as i1 from '@ngrx/store';
|
|
19
19
|
import * as i3$2 from '@angular/cdk/bidi';
|
|
20
20
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
@@ -35,6 +35,9 @@ class ToolboxActionComponent extends SubscriptionnerDirective {
|
|
|
35
35
|
this.currentManifest$ = this.store
|
|
36
36
|
.select(DashboardSelectors.presentation)
|
|
37
37
|
.pipe(map((manifest) => manifest?.current));
|
|
38
|
+
this.canModify$ = this.currentManifest$.pipe(switchMap((manifest) => {
|
|
39
|
+
return manifest ? this.access?.canModifyPresentation(manifest) : of(false);
|
|
40
|
+
}));
|
|
38
41
|
this.subscriptions.add(this.currentManifest$.subscribe((manifest) => {
|
|
39
42
|
this.currentManifest = manifest;
|
|
40
43
|
}));
|
|
@@ -42,9 +45,6 @@ class ToolboxActionComponent extends SubscriptionnerDirective {
|
|
|
42
45
|
close() {
|
|
43
46
|
this.closeOptions.emit();
|
|
44
47
|
}
|
|
45
|
-
canModify$() {
|
|
46
|
-
return this.access && this.currentManifest ? this.access.canModifyPresentation(this.currentManifest) : of(false);
|
|
47
|
-
}
|
|
48
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ToolboxActionComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
49
49
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: ToolboxActionComponent, selector: "pry-toolbox-action", inputs: { displayLabels: "displayLabels" }, outputs: { closeOptions: "closeOptions" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
50
50
|
}
|
|
@@ -315,7 +315,6 @@ class PryFilterSettingsComponent extends ToolboxActionComponent {
|
|
|
315
315
|
this.filter.operator = 'I_CONTAINS';
|
|
316
316
|
break;
|
|
317
317
|
default:
|
|
318
|
-
this.filter.operator = this.filter.operator;
|
|
319
318
|
break;
|
|
320
319
|
}
|
|
321
320
|
if (this.filter.type !== '' && this.container) {
|
|
@@ -390,11 +389,11 @@ class PryFilterSettingsComponent extends ToolboxActionComponent {
|
|
|
390
389
|
return `${attributeId}@${datasetId}`;
|
|
391
390
|
}
|
|
392
391
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryFilterSettingsComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i3.FilterFactoryService }, { token: i0.Injector }, { token: i3.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryFilterSettingsComponent, selector: "pry-filter-settings", inputs: { label: "label" }, viewQueries: [{ propertyName: "templateSettings", first: true, predicate: ["settings"], descendants: true, read: TemplateRef }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<pry-toolbox-css></pry-toolbox-css>\n<div class=\"save-manifest-container\">\n <div style=\"display: none\">\n <ng-template #container></ng-template>\n </div>\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n [disabled]=\"(attributes$ | async)?.length === 0\"\n (click)=\"toggleSettings()\"\n aria-haspopup=\"dialog\"\n >\n @if (label) {\n {{ '@pry.filters.label' | i18n }}\n }\n </button>\n</div>\n\n<ng-template #settings>\n <div class=\"o-filters\">\n <div class=\"o-filters__header\">\n @if (currentStep === FilterSteps.LIST) {\n <h2>{{ '@pry.filters.label' | i18n }}</h2>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"u-display-flex -row -align-center\">\n <button (click)=\"goBack()\" type=\"button\" class=\"back-button\">\n <pry-icon iconSvg=\"chevron_right\"></pry-icon>\n </button>\n <h2>\n {{\n (currentStep === FilterSteps.CREATION ? '@pry.filters.creation.create' : '@pry.filters.creation.update')\n | i18n\n }}\n </h2>\n </div>\n }\n <button (click)=\"toggleSettings()\" type=\"button\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n @if (currentStep === FilterSteps.LIST) {\n <div class=\"o-filters__content\">\n @if ((attributes$ | async)?.length === 0) {\n <div class=\"a-table-wrapper\"></div>\n } @else {\n @if (filters.length > 0) {\n <table class=\"a-table\">\n <tbody cdkDropList [cdkDropListData]=\"filters\" (cdkDropListDropped)=\"drop($event)\">\n @for (filter of filters; track filter.id) {\n <tr class=\"o-filters__filter\" cdkDrag>\n <td>\n <span>{{ filter.name }}</span>\n </td>\n <td>\n <span>{{ getFilterAttributes(filter, 3) }}</span>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"deleteFilter(filter.id)\">\n {{ '@pry.action.delete' | i18n }}\n </button>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"goToEdition(filter)\">\n {{ '@pry.filters.list.modify' | i18n }}\n </button>\n </td>\n <td cdkDragHandle>\n <pry-icon iconSvg=\"drag_indicator\"></pry-icon>\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <span class=\"o-filters__no-filters\">{{ '@pry.filters.noFilters' | i18n }}</span>\n }\n <button (click)=\"goToCreation()\" class=\"a-btn a-btn--primary\">{{ '@pry.filters.list.add' | i18n }}</button>\n }\n </div>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"o-filters__content\">\n <div class=\"m-form-label-field\">\n <label for=\"filterName\" class=\"a-label\">{{ '@pry.filters.creation.name' | i18n }}</label>\n <input id=\"filterName\" class=\"a-form-field\" type=\"text\" [(ngModel)]=\"filter.name\" />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"filterType\" class=\"a-label\">{{ '@pry.filters.creation.type' | i18n }}</label>\n <pry-select\n id=\"filterType\"\n [placeholder]=\"'@pry.filters.creation.type' | i18n\"\n [items]=\"types$ | async\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [(ngModel)]=\"filter.type\"\n (ngModelChange)=\"updateFilterType($event)\"\n >\n </pry-select>\n </div>\n @if ((currentFilterComponentType$ | async) === 'date') {\n <div class=\"m-form-label-field u-display-flex -row\">\n <label for=\"date-range\" class=\"a-label\">{{ '@pry.filters.creation.dateRange' | i18n }}</label>\n <pry-checkbox\n id=\"date-range\"\n [(ngModel)]=\"filter.hasDateRange\"\n (ngModelChange)=\"this.currentOperators$.next(getOperators())\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'list') {\n <div class=\"m-form-label-field\">\n <label for=\"possibleValues\" class=\"a-label\">{{ '@pry.filters.creation.values' | i18n }}</label>\n <input\n id=\"possibleValues\"\n class=\"a-form-field\"\n type=\"text\"\n [(ngModel)]=\"filter.possibleValues\"\n placeholder=\"valeur1, valeur2, valeur3\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'autocomplete') {\n <div class=\"m-form-label-field\">\n <label for=\"limit\" class=\"a-label\">{{ '@pry.filters.creation.limit' | i18n }}</label>\n <input id=\"limit\" class=\"a-form-field\" type=\"number\" min=\"0\" max=\"50\" [(ngModel)]=\"filter.limit\" />\n </div>\n }\n <div class=\"m-form-label-field\">\n <label for=\"attributes\" class=\"a-label\">{{ '@pry.filters.creation.attributes' | i18n }}</label>\n <pry-select\n id=\"attributes\"\n [multiple]=\"true\"\n [clearable]=\"true\"\n [closeOnSelect]=\"false\"\n [items]=\"attributes$ | async\"\n [ngModel]=\"filter.attributes\"\n (ngModelChange)=\"selectAttribute($event)\"\n [placeholder]=\"'@pry.filters.creation.attributes' | i18n\"\n bindLabel=\"label\"\n bindValue=\"customId\"\n bindClasses=\"classes\"\n >\n </pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"operations\" class=\"a-label\">{{ '@pry.filters.attributes.operator' | i18n }}</label>\n <pry-select\n id=\"operations\"\n [items]=\"currentOperators$ | async\"\n [(ngModel)]=\"filter.operator\"\n [placeholder]=\"'@pry.filters.attributes.operator' | i18n\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"\n (currentFilterComponentType$ | async) === 'list' ||\n (currentFilterComponentType$ | async) === 'autocomplete'\n \"\n >\n </pry-select>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"submitFilter()\"\n [disabled]=\"!(filter.name && filter.type && filter.attributes.length !== 0 && filter.operator)\"\n type=\"submit\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: PrySelectGridLayoutCssComponent, selector: "pry-toolbox-css" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
392
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryFilterSettingsComponent, selector: "pry-filter-settings", inputs: { label: "label" }, viewQueries: [{ propertyName: "templateSettings", first: true, predicate: ["settings"], descendants: true, read: TemplateRef }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<pry-toolbox-css></pry-toolbox-css>\n<div class=\"save-manifest-container\">\n <div style=\"display: none\">\n <ng-template #container></ng-template>\n </div>\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n [disabled]=\"(attributes$ | async)?.length === 0\"\n (click)=\"toggleSettings()\"\n aria-haspopup=\"dialog\"\n >\n @if (label) {\n {{ '@pry.filters.label' | i18n }}\n }\n </button>\n</div>\n\n<ng-template #settings>\n <div class=\"o-filters\">\n <div class=\"o-filters__header\">\n @if (currentStep === FilterSteps.LIST) {\n <h2>{{ '@pry.filters.label' | i18n }}</h2>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"u-display-flex -row -align-center\">\n <button (click)=\"goBack()\" type=\"button\" class=\"back-button\">\n <pry-icon iconSvg=\"chevron_right\"></pry-icon>\n </button>\n <h2>\n {{\n (currentStep === FilterSteps.CREATION ? '@pry.filters.creation.create' : '@pry.filters.creation.update')\n | i18n\n }}\n </h2>\n </div>\n }\n <button (click)=\"toggleSettings()\" type=\"button\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n @if (currentStep === FilterSteps.LIST) {\n <div class=\"o-filters__content\">\n @if ((attributes$ | async)?.length === 0) {\n <div class=\"a-table-wrapper\"></div>\n } @else {\n @if (filters.length > 0) {\n <table class=\"a-table\" role=\"presentation\">\n <tbody cdkDropList [cdkDropListData]=\"filters\" (cdkDropListDropped)=\"drop($event)\">\n @for (filter of filters; track filter.id) {\n <tr class=\"o-filters__filter\" cdkDrag>\n <td>\n <span>{{ filter.name }}</span>\n </td>\n <td>\n <span>{{ getFilterAttributes(filter, 3) }}</span>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"deleteFilter(filter.id)\">\n {{ '@pry.action.delete' | i18n }}\n </button>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"goToEdition(filter)\">\n {{ '@pry.filters.list.modify' | i18n }}\n </button>\n </td>\n <td cdkDragHandle>\n <pry-icon iconSvg=\"drag_indicator\"></pry-icon>\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <span class=\"o-filters__no-filters\">{{ '@pry.filters.noFilters' | i18n }}</span>\n }\n <button (click)=\"goToCreation()\" class=\"a-btn a-btn--primary\">{{ '@pry.filters.list.add' | i18n }}</button>\n }\n </div>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"o-filters__content\">\n <div class=\"m-form-label-field\">\n <label for=\"filterName\" class=\"a-label\">{{ '@pry.filters.creation.name' | i18n }}</label>\n <input id=\"filterName\" class=\"a-form-field\" type=\"text\" [(ngModel)]=\"filter.name\" />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"filterType\" class=\"a-label\">{{ '@pry.filters.creation.type' | i18n }}</label>\n <pry-select\n id=\"filterType\"\n [placeholder]=\"'@pry.filters.creation.type' | i18n\"\n [items]=\"types$ | async\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [(ngModel)]=\"filter.type\"\n (ngModelChange)=\"updateFilterType($event)\"\n >\n </pry-select>\n </div>\n @if ((currentFilterComponentType$ | async) === 'date') {\n <div class=\"m-form-label-field u-display-flex -row\">\n <label for=\"date-range\" class=\"a-label\">{{ '@pry.filters.creation.dateRange' | i18n }}</label>\n <pry-checkbox\n id=\"date-range\"\n [(ngModel)]=\"filter.hasDateRange\"\n (ngModelChange)=\"this.currentOperators$.next(getOperators())\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'list') {\n <div class=\"m-form-label-field\">\n <label for=\"possibleValues\" class=\"a-label\">{{ '@pry.filters.creation.values' | i18n }}</label>\n <input\n id=\"possibleValues\"\n class=\"a-form-field\"\n type=\"text\"\n [(ngModel)]=\"filter.possibleValues\"\n placeholder=\"valeur1, valeur2, valeur3\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'autocomplete') {\n <div class=\"m-form-label-field\">\n <label for=\"limit\" class=\"a-label\">{{ '@pry.filters.creation.limit' | i18n }}</label>\n <input id=\"limit\" class=\"a-form-field\" type=\"number\" min=\"0\" max=\"50\" [(ngModel)]=\"filter.limit\" />\n </div>\n }\n <div class=\"m-form-label-field\">\n <label for=\"attributes\" class=\"a-label\">{{ '@pry.filters.creation.attributes' | i18n }}</label>\n <pry-select\n id=\"attributes\"\n [multiple]=\"true\"\n [clearable]=\"true\"\n [closeOnSelect]=\"false\"\n [items]=\"attributes$ | async\"\n [ngModel]=\"filter.attributes\"\n (ngModelChange)=\"selectAttribute($event)\"\n [placeholder]=\"'@pry.filters.creation.attributes' | i18n\"\n bindLabel=\"label\"\n bindValue=\"customId\"\n bindClasses=\"classes\"\n >\n </pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"operations\" class=\"a-label\">{{ '@pry.filters.attributes.operator' | i18n }}</label>\n <pry-select\n id=\"operations\"\n [items]=\"currentOperators$ | async\"\n [(ngModel)]=\"filter.operator\"\n [placeholder]=\"'@pry.filters.attributes.operator' | i18n\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"\n (currentFilterComponentType$ | async) === 'list' ||\n (currentFilterComponentType$ | async) === 'autocomplete'\n \"\n >\n </pry-select>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"submitFilter()\"\n [disabled]=\"!(filter.name && filter.type && filter.attributes.length !== 0 && filter.operator)\"\n type=\"submit\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: PrySelectGridLayoutCssComponent, selector: "pry-toolbox-css" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
394
393
|
}
|
|
395
394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryFilterSettingsComponent, decorators: [{
|
|
396
395
|
type: Component,
|
|
397
|
-
args: [{ selector: 'pry-filter-settings', template: "<pry-toolbox-css></pry-toolbox-css>\n<div class=\"save-manifest-container\">\n <div style=\"display: none\">\n <ng-template #container></ng-template>\n </div>\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n [disabled]=\"(attributes$ | async)?.length === 0\"\n (click)=\"toggleSettings()\"\n aria-haspopup=\"dialog\"\n >\n @if (label) {\n {{ '@pry.filters.label' | i18n }}\n }\n </button>\n</div>\n\n<ng-template #settings>\n <div class=\"o-filters\">\n <div class=\"o-filters__header\">\n @if (currentStep === FilterSteps.LIST) {\n <h2>{{ '@pry.filters.label' | i18n }}</h2>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"u-display-flex -row -align-center\">\n <button (click)=\"goBack()\" type=\"button\" class=\"back-button\">\n <pry-icon iconSvg=\"chevron_right\"></pry-icon>\n </button>\n <h2>\n {{\n (currentStep === FilterSteps.CREATION ? '@pry.filters.creation.create' : '@pry.filters.creation.update')\n | i18n\n }}\n </h2>\n </div>\n }\n <button (click)=\"toggleSettings()\" type=\"button\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n @if (currentStep === FilterSteps.LIST) {\n <div class=\"o-filters__content\">\n @if ((attributes$ | async)?.length === 0) {\n <div class=\"a-table-wrapper\"></div>\n } @else {\n @if (filters.length > 0) {\n <table class=\"a-table\">\n <tbody cdkDropList [cdkDropListData]=\"filters\" (cdkDropListDropped)=\"drop($event)\">\n @for (filter of filters; track filter.id) {\n <tr class=\"o-filters__filter\" cdkDrag>\n <td>\n <span>{{ filter.name }}</span>\n </td>\n <td>\n <span>{{ getFilterAttributes(filter, 3) }}</span>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"deleteFilter(filter.id)\">\n {{ '@pry.action.delete' | i18n }}\n </button>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"goToEdition(filter)\">\n {{ '@pry.filters.list.modify' | i18n }}\n </button>\n </td>\n <td cdkDragHandle>\n <pry-icon iconSvg=\"drag_indicator\"></pry-icon>\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <span class=\"o-filters__no-filters\">{{ '@pry.filters.noFilters' | i18n }}</span>\n }\n <button (click)=\"goToCreation()\" class=\"a-btn a-btn--primary\">{{ '@pry.filters.list.add' | i18n }}</button>\n }\n </div>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"o-filters__content\">\n <div class=\"m-form-label-field\">\n <label for=\"filterName\" class=\"a-label\">{{ '@pry.filters.creation.name' | i18n }}</label>\n <input id=\"filterName\" class=\"a-form-field\" type=\"text\" [(ngModel)]=\"filter.name\" />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"filterType\" class=\"a-label\">{{ '@pry.filters.creation.type' | i18n }}</label>\n <pry-select\n id=\"filterType\"\n [placeholder]=\"'@pry.filters.creation.type' | i18n\"\n [items]=\"types$ | async\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [(ngModel)]=\"filter.type\"\n (ngModelChange)=\"updateFilterType($event)\"\n >\n </pry-select>\n </div>\n @if ((currentFilterComponentType$ | async) === 'date') {\n <div class=\"m-form-label-field u-display-flex -row\">\n <label for=\"date-range\" class=\"a-label\">{{ '@pry.filters.creation.dateRange' | i18n }}</label>\n <pry-checkbox\n id=\"date-range\"\n [(ngModel)]=\"filter.hasDateRange\"\n (ngModelChange)=\"this.currentOperators$.next(getOperators())\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'list') {\n <div class=\"m-form-label-field\">\n <label for=\"possibleValues\" class=\"a-label\">{{ '@pry.filters.creation.values' | i18n }}</label>\n <input\n id=\"possibleValues\"\n class=\"a-form-field\"\n type=\"text\"\n [(ngModel)]=\"filter.possibleValues\"\n placeholder=\"valeur1, valeur2, valeur3\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'autocomplete') {\n <div class=\"m-form-label-field\">\n <label for=\"limit\" class=\"a-label\">{{ '@pry.filters.creation.limit' | i18n }}</label>\n <input id=\"limit\" class=\"a-form-field\" type=\"number\" min=\"0\" max=\"50\" [(ngModel)]=\"filter.limit\" />\n </div>\n }\n <div class=\"m-form-label-field\">\n <label for=\"attributes\" class=\"a-label\">{{ '@pry.filters.creation.attributes' | i18n }}</label>\n <pry-select\n id=\"attributes\"\n [multiple]=\"true\"\n [clearable]=\"true\"\n [closeOnSelect]=\"false\"\n [items]=\"attributes$ | async\"\n [ngModel]=\"filter.attributes\"\n (ngModelChange)=\"selectAttribute($event)\"\n [placeholder]=\"'@pry.filters.creation.attributes' | i18n\"\n bindLabel=\"label\"\n bindValue=\"customId\"\n bindClasses=\"classes\"\n >\n </pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"operations\" class=\"a-label\">{{ '@pry.filters.attributes.operator' | i18n }}</label>\n <pry-select\n id=\"operations\"\n [items]=\"currentOperators$ | async\"\n [(ngModel)]=\"filter.operator\"\n [placeholder]=\"'@pry.filters.attributes.operator' | i18n\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"\n (currentFilterComponentType$ | async) === 'list' ||\n (currentFilterComponentType$ | async) === 'autocomplete'\n \"\n >\n </pry-select>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"submitFilter()\"\n [disabled]=\"!(filter.name && filter.type && filter.attributes.length !== 0 && filter.operator)\"\n type=\"submit\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n" }]
|
|
396
|
+
args: [{ selector: 'pry-filter-settings', template: "<pry-toolbox-css></pry-toolbox-css>\n<div class=\"save-manifest-container\">\n <div style=\"display: none\">\n <ng-template #container></ng-template>\n </div>\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n [disabled]=\"(attributes$ | async)?.length === 0\"\n (click)=\"toggleSettings()\"\n aria-haspopup=\"dialog\"\n >\n @if (label) {\n {{ '@pry.filters.label' | i18n }}\n }\n </button>\n</div>\n\n<ng-template #settings>\n <div class=\"o-filters\">\n <div class=\"o-filters__header\">\n @if (currentStep === FilterSteps.LIST) {\n <h2>{{ '@pry.filters.label' | i18n }}</h2>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"u-display-flex -row -align-center\">\n <button (click)=\"goBack()\" type=\"button\" class=\"back-button\">\n <pry-icon iconSvg=\"chevron_right\"></pry-icon>\n </button>\n <h2>\n {{\n (currentStep === FilterSteps.CREATION ? '@pry.filters.creation.create' : '@pry.filters.creation.update')\n | i18n\n }}\n </h2>\n </div>\n }\n <button (click)=\"toggleSettings()\" type=\"button\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n </div>\n @if (currentStep === FilterSteps.LIST) {\n <div class=\"o-filters__content\">\n @if ((attributes$ | async)?.length === 0) {\n <div class=\"a-table-wrapper\"></div>\n } @else {\n @if (filters.length > 0) {\n <table class=\"a-table\" role=\"presentation\">\n <tbody cdkDropList [cdkDropListData]=\"filters\" (cdkDropListDropped)=\"drop($event)\">\n @for (filter of filters; track filter.id) {\n <tr class=\"o-filters__filter\" cdkDrag>\n <td>\n <span>{{ filter.name }}</span>\n </td>\n <td>\n <span>{{ getFilterAttributes(filter, 3) }}</span>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"deleteFilter(filter.id)\">\n {{ '@pry.action.delete' | i18n }}\n </button>\n </td>\n <td>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"goToEdition(filter)\">\n {{ '@pry.filters.list.modify' | i18n }}\n </button>\n </td>\n <td cdkDragHandle>\n <pry-icon iconSvg=\"drag_indicator\"></pry-icon>\n </td>\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <span class=\"o-filters__no-filters\">{{ '@pry.filters.noFilters' | i18n }}</span>\n }\n <button (click)=\"goToCreation()\" class=\"a-btn a-btn--primary\">{{ '@pry.filters.list.add' | i18n }}</button>\n }\n </div>\n }\n @if (currentStep === FilterSteps.CREATION || currentStep === FilterSteps.EDITION) {\n <div class=\"o-filters__content\">\n <div class=\"m-form-label-field\">\n <label for=\"filterName\" class=\"a-label\">{{ '@pry.filters.creation.name' | i18n }}</label>\n <input id=\"filterName\" class=\"a-form-field\" type=\"text\" [(ngModel)]=\"filter.name\" />\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"filterType\" class=\"a-label\">{{ '@pry.filters.creation.type' | i18n }}</label>\n <pry-select\n id=\"filterType\"\n [placeholder]=\"'@pry.filters.creation.type' | i18n\"\n [items]=\"types$ | async\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [(ngModel)]=\"filter.type\"\n (ngModelChange)=\"updateFilterType($event)\"\n >\n </pry-select>\n </div>\n @if ((currentFilterComponentType$ | async) === 'date') {\n <div class=\"m-form-label-field u-display-flex -row\">\n <label for=\"date-range\" class=\"a-label\">{{ '@pry.filters.creation.dateRange' | i18n }}</label>\n <pry-checkbox\n id=\"date-range\"\n [(ngModel)]=\"filter.hasDateRange\"\n (ngModelChange)=\"this.currentOperators$.next(getOperators())\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'list') {\n <div class=\"m-form-label-field\">\n <label for=\"possibleValues\" class=\"a-label\">{{ '@pry.filters.creation.values' | i18n }}</label>\n <input\n id=\"possibleValues\"\n class=\"a-form-field\"\n type=\"text\"\n [(ngModel)]=\"filter.possibleValues\"\n placeholder=\"valeur1, valeur2, valeur3\"\n />\n </div>\n }\n @if ((currentFilterComponentType$ | async) === 'autocomplete') {\n <div class=\"m-form-label-field\">\n <label for=\"limit\" class=\"a-label\">{{ '@pry.filters.creation.limit' | i18n }}</label>\n <input id=\"limit\" class=\"a-form-field\" type=\"number\" min=\"0\" max=\"50\" [(ngModel)]=\"filter.limit\" />\n </div>\n }\n <div class=\"m-form-label-field\">\n <label for=\"attributes\" class=\"a-label\">{{ '@pry.filters.creation.attributes' | i18n }}</label>\n <pry-select\n id=\"attributes\"\n [multiple]=\"true\"\n [clearable]=\"true\"\n [closeOnSelect]=\"false\"\n [items]=\"attributes$ | async\"\n [ngModel]=\"filter.attributes\"\n (ngModelChange)=\"selectAttribute($event)\"\n [placeholder]=\"'@pry.filters.creation.attributes' | i18n\"\n bindLabel=\"label\"\n bindValue=\"customId\"\n bindClasses=\"classes\"\n >\n </pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label for=\"operations\" class=\"a-label\">{{ '@pry.filters.attributes.operator' | i18n }}</label>\n <pry-select\n id=\"operations\"\n [items]=\"currentOperators$ | async\"\n [(ngModel)]=\"filter.operator\"\n [placeholder]=\"'@pry.filters.attributes.operator' | i18n\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [disabled]=\"\n (currentFilterComponentType$ | async) === 'list' ||\n (currentFilterComponentType$ | async) === 'autocomplete'\n \"\n >\n </pry-select>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"submitFilter()\"\n [disabled]=\"!(filter.name && filter.type && filter.attributes.length !== 0 && filter.operator)\"\n type=\"submit\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n" }]
|
|
398
397
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
399
398
|
type: Optional
|
|
400
399
|
}, {
|
|
@@ -619,11 +618,11 @@ class SaveViewComponent extends ToolboxActionComponent {
|
|
|
619
618
|
}
|
|
620
619
|
}
|
|
621
620
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SaveViewComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
622
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: SaveViewComponent, selector: "pry-save-view", inputs: { mode: "mode" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "saveAs", first: true, predicate: ["saveAs"], descendants: true }, { propertyName: "directiveSave", first: true, predicate: ["directiveSave"], descendants: true }, { propertyName: "firstFocusdirective", first: true, predicate: ["firstFocusdirective"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "confirm", first: true, predicate: ["confirm"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "templateSaveAs", first: true, predicate: ["templateSaveAs"], descendants: true, read: TemplateRef }, { propertyName: "templateDirectSaveType", first: true, predicate: ["templateDirectSaveType"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div [attr.aria-expanded]=\"saveTypeOpened\" aria-controls=\"directiveSave\" aria-describedby=\"infoTooltip_directSave\">\n @if (canModify$() | async) {\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary\"\n (click)=\"directSave()\"\n [disabled]=\"!(isCurrentPresentationModified$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n }\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button type=\"button\" #saveAs class=\"a-btn a-btn--secondary\" (click)=\"toggleSaveAs()\" aria-haspopup=\"dialog\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.rename' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n</ng-container>\n<ng-template #templateSaveAs>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"saveModal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_saveModal\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.rename' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (keydown.shift.tab)=\"focusValidation()\" (click)=\"toggleSaveAs()\">\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-stepper #stepper>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.presentation.add.info' | i18n }}</h4>\n <form>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-name\" for=\"input-name\">{{ '@pry.toolbox.manifest.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"input-name\"\n name=\"input-name\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.name' | i18n }}\"\n [ngModel]=\"currentManifest!.name\"\n (ngModelChange)=\"changeValue($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"50\"\n #input\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-descr\" for=\"input-descr\">{{\n '@pry.toolbox.manifest.description' | i18n\n }}</label>\n <input\n type=\"text\"\n id=\"input-descr\"\n name=\"input-descr\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.description' | i18n }}\"\n [ngModel]=\"currentManifest!.description\"\n (ngModelChange)=\"changeDescr($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"200\"\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"presentation_image\">{{ '@pry.presentation.form.image' | i18n }}</label>\n <div class=\"o-file-input\">\n <pry-select-image\n id=\"presentation_image\"\n (changed)=\"currentManifest!.image = $event\"\n [iconUrl]=\"currentManifest!.image\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n </div>\n\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n #cancel\n (click)=\"toggleSaveAs()\"\n (keydown.tab)=\"disableNextStep()\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n (click)=\"stepper.next()\"\n [disabled]=\"!isValid()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.action.next' | i18n }}\n </button>\n </div>\n </form>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.share' | i18n }}</h4>\n <pry-access-rights-share\n [(ngModel)]=\"accessRightsByGroup\"\n (ngModelChange)=\"changeAccessRights($event)\"\n [manifestDescription]=\"currentManifest\"\n ></pry-access-rights-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"stepper.prev()\">\n {{ '@pry.action.back' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #confirm\n (click)=\"save()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.restitution.share' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #templateDirectSaveType>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"directiveSave\"\n role=\"dialog\"\n aria-labelledby=\"dialog_title\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title_\">{{ '@pry.toolbox.save' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #firstFocusdirective (click)=\"toggleDirectSaveType()\">\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>\n <h3>{{ '@pry.snack.pagesChanged' | i18n }}</h3>\n </div>\n <div class=\"m-btn-group\">\n <button class=\"a-btn a-btn--primary\" (click)=\"save()\">\n {{ '@pry.toolbox.save' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"rename()\">\n {{ '@pry.toolbox.rename' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"restore()\" (keydown.tab)=\"closeModals()\">\n {{ '@pry.toolbox.restore' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6$1.PryStepperComponent, selector: "pry-stepper", inputs: ["isConsultMode"], outputs: ["lastStepCompleted", "activeIndexChange"] }, { kind: "component", type: i6$1.PryStepComponent, selector: "pry-step", inputs: ["setActiveState"] }, { kind: "directive", type: i6$1.PryStepTitleDirective, selector: "[stepTitle]" }, { kind: "component", type: i3.PryAccessRightsShareComponent, selector: "pry-access-rights-share", inputs: ["manifestDescription", "allowedGroups"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
621
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: SaveViewComponent, selector: "pry-save-view", inputs: { mode: "mode" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "saveAs", first: true, predicate: ["saveAs"], descendants: true }, { propertyName: "directiveSave", first: true, predicate: ["directiveSave"], descendants: true }, { propertyName: "firstFocusdirective", first: true, predicate: ["firstFocusdirective"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "confirm", first: true, predicate: ["confirm"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "templateSaveAs", first: true, predicate: ["templateSaveAs"], descendants: true, read: TemplateRef }, { propertyName: "templateDirectSaveType", first: true, predicate: ["templateDirectSaveType"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div [attr.aria-expanded]=\"saveTypeOpened\" aria-controls=\"directiveSave\" aria-describedby=\"infoTooltip_directSave\">\n @if (canModify$ | async) {\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary\"\n (click)=\"directSave()\"\n [disabled]=\"!(isCurrentPresentationModified$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n }\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button type=\"button\" #saveAs class=\"a-btn a-btn--secondary\" (click)=\"toggleSaveAs()\" aria-haspopup=\"dialog\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.rename' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n</ng-container>\n<ng-template #templateSaveAs>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"saveModal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_saveModal\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.rename' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (keydown.shift.tab)=\"focusValidation()\" (click)=\"toggleSaveAs()\">\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-stepper #stepper>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.presentation.add.info' | i18n }}</h4>\n <form>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-name\" for=\"input-name\">{{ '@pry.toolbox.manifest.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"input-name\"\n name=\"input-name\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.name' | i18n }}\"\n [ngModel]=\"currentManifest!.name\"\n (ngModelChange)=\"changeValue($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"50\"\n #input\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-descr\" for=\"input-descr\">{{\n '@pry.toolbox.manifest.description' | i18n\n }}</label>\n <input\n type=\"text\"\n id=\"input-descr\"\n name=\"input-descr\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.description' | i18n }}\"\n [ngModel]=\"currentManifest!.description\"\n (ngModelChange)=\"changeDescr($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"200\"\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"presentation_image\">{{ '@pry.presentation.form.image' | i18n }}</label>\n <div class=\"o-file-input\">\n <pry-select-image\n id=\"presentation_image\"\n (changed)=\"currentManifest!.image = $event\"\n [iconUrl]=\"currentManifest!.image\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n </div>\n\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n #cancel\n (click)=\"toggleSaveAs()\"\n (keydown.tab)=\"disableNextStep()\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n (click)=\"stepper.next()\"\n [disabled]=\"!isValid()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.action.next' | i18n }}\n </button>\n </div>\n </form>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.share' | i18n }}</h4>\n <pry-access-rights-share\n [(ngModel)]=\"accessRightsByGroup\"\n (ngModelChange)=\"changeAccessRights($event)\"\n [manifestDescription]=\"currentManifest\"\n ></pry-access-rights-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"stepper.prev()\">\n {{ '@pry.action.back' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #confirm\n (click)=\"save()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.restitution.share' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #templateDirectSaveType>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"directiveSave\"\n role=\"dialog\"\n aria-labelledby=\"dialog_title\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title_\">{{ '@pry.toolbox.save' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #firstFocusdirective (click)=\"toggleDirectSaveType()\">\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>\n <h3>{{ '@pry.snack.pagesChanged' | i18n }}</h3>\n </div>\n <div class=\"m-btn-group\">\n <button class=\"a-btn a-btn--primary\" (click)=\"save()\">\n {{ '@pry.toolbox.save' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"rename()\">\n {{ '@pry.toolbox.rename' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"restore()\" (keydown.tab)=\"closeModals()\">\n {{ '@pry.toolbox.restore' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6$1.PryStepperComponent, selector: "pry-stepper", inputs: ["isConsultMode"], outputs: ["lastStepCompleted", "activeIndexChange"] }, { kind: "component", type: i6$1.PryStepComponent, selector: "pry-step", inputs: ["setActiveState"] }, { kind: "directive", type: i6$1.PryStepTitleDirective, selector: "[stepTitle]" }, { kind: "component", type: i3.PryAccessRightsShareComponent, selector: "pry-access-rights-share", inputs: ["manifestDescription", "allowedGroups"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
623
622
|
}
|
|
624
623
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SaveViewComponent, decorators: [{
|
|
625
624
|
type: Component,
|
|
626
|
-
args: [{ selector: 'pry-save-view', template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div [attr.aria-expanded]=\"saveTypeOpened\" aria-controls=\"directiveSave\" aria-describedby=\"infoTooltip_directSave\">\n @if (canModify$
|
|
625
|
+
args: [{ selector: 'pry-save-view', template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div [attr.aria-expanded]=\"saveTypeOpened\" aria-controls=\"directiveSave\" aria-describedby=\"infoTooltip_directSave\">\n @if (canModify$ | async) {\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary\"\n (click)=\"directSave()\"\n [disabled]=\"!(isCurrentPresentationModified$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n }\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button type=\"button\" #saveAs class=\"a-btn a-btn--secondary\" (click)=\"toggleSaveAs()\" aria-haspopup=\"dialog\">\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.rename' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n</ng-container>\n<ng-template #templateSaveAs>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"saveModal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_saveModal\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.toolbox.rename' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (keydown.shift.tab)=\"focusValidation()\" (click)=\"toggleSaveAs()\">\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-stepper #stepper>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.presentation.add.info' | i18n }}</h4>\n <form>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-name\" for=\"input-name\">{{ '@pry.toolbox.manifest.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"input-name\"\n name=\"input-name\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.name' | i18n }}\"\n [ngModel]=\"currentManifest!.name\"\n (ngModelChange)=\"changeValue($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"50\"\n #input\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" id=\"label-descr\" for=\"input-descr\">{{\n '@pry.toolbox.manifest.description' | i18n\n }}</label>\n <input\n type=\"text\"\n id=\"input-descr\"\n name=\"input-descr\"\n class=\"a-form-field\"\n placeholder=\"{{ '@pry.toolbox.manifest.description' | i18n }}\"\n [ngModel]=\"currentManifest!.description\"\n (ngModelChange)=\"changeDescr($event)\"\n aria-labelledby=\"label-name\"\n maxlength=\"200\"\n />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"presentation_image\">{{ '@pry.presentation.form.image' | i18n }}</label>\n <div class=\"o-file-input\">\n <pry-select-image\n id=\"presentation_image\"\n (changed)=\"currentManifest!.image = $event\"\n [iconUrl]=\"currentManifest!.image\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n </div>\n\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--secondary\"\n #cancel\n (click)=\"toggleSaveAs()\"\n (keydown.tab)=\"disableNextStep()\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n (click)=\"stepper.next()\"\n [disabled]=\"!isValid()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.action.next' | i18n }}\n </button>\n </div>\n </form>\n </pry-step>\n <pry-step>\n <h4 class=\"m-stepper-item__title\" *stepTitle>{{ '@pry.restitution.share' | i18n }}</h4>\n <pry-access-rights-share\n [(ngModel)]=\"accessRightsByGroup\"\n (ngModelChange)=\"changeAccessRights($event)\"\n [manifestDescription]=\"currentManifest\"\n ></pry-access-rights-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"stepper.prev()\">\n {{ '@pry.action.back' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #confirm\n (click)=\"save()\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.restitution.share' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #templateDirectSaveType>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n id=\"directiveSave\"\n role=\"dialog\"\n aria-labelledby=\"dialog_title\"\n (keydown.escape)=\"closeModals()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title_\">{{ '@pry.toolbox.save' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #firstFocusdirective (click)=\"toggleDirectSaveType()\">\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>\n <h3>{{ '@pry.snack.pagesChanged' | i18n }}</h3>\n </div>\n <div class=\"m-btn-group\">\n <button class=\"a-btn a-btn--primary\" (click)=\"save()\">\n {{ '@pry.toolbox.save' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"rename()\">\n {{ '@pry.toolbox.rename' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" (click)=\"restore()\" (keydown.tab)=\"closeModals()\">\n {{ '@pry.toolbox.restore' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
627
626
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
628
627
|
type: Optional
|
|
629
628
|
}, {
|
|
@@ -893,11 +892,11 @@ class SwitchToEditContentComponent extends ToolboxActionComponent {
|
|
|
893
892
|
this.close();
|
|
894
893
|
}
|
|
895
894
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SwitchToEditContentComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
896
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: SwitchToEditContentComponent, selector: "pry-switch-to-edit", usesInheritance: true, ngImport: i0, template: "@if (canModify$
|
|
895
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: SwitchToEditContentComponent, selector: "pry-switch-to-edit", usesInheritance: true, ngImport: i0, template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.switchEditContent' | i18n }}\n }\n </button>\n}\n", dependencies: [{ kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
897
896
|
}
|
|
898
897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SwitchToEditContentComponent, decorators: [{
|
|
899
898
|
type: Component,
|
|
900
|
-
args: [{ selector: 'pry-switch-to-edit', template: "@if (canModify$
|
|
899
|
+
args: [{ selector: 'pry-switch-to-edit', template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.switchEditContent' | i18n }}\n }\n </button>\n}\n" }]
|
|
901
900
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
902
901
|
type: Optional
|
|
903
902
|
}, {
|
|
@@ -919,11 +918,11 @@ class ShareComponent extends ToolboxActionComponent {
|
|
|
919
918
|
});
|
|
920
919
|
}
|
|
921
920
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ShareComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }, { token: i3.PryDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
922
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ShareComponent, selector: "pry-share-pres", usesInheritance: true, ngImport: i0, template: "@if (canModify$
|
|
921
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ShareComponent, selector: "pry-share-pres", usesInheritance: true, ngImport: i0, template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.share' | i18n }}\n }\n </button>\n}\n", dependencies: [{ kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
923
922
|
}
|
|
924
923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ShareComponent, decorators: [{
|
|
925
924
|
type: Component,
|
|
926
|
-
args: [{ selector: 'pry-share-pres', template: "@if (canModify$
|
|
925
|
+
args: [{ selector: 'pry-share-pres', template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.share' | i18n }}\n }\n </button>\n}\n" }]
|
|
927
926
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
928
927
|
type: Optional
|
|
929
928
|
}, {
|
|
@@ -940,11 +939,11 @@ class DeleteComponent extends ToolboxActionComponent {
|
|
|
940
939
|
this.close();
|
|
941
940
|
}
|
|
942
941
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DeleteComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
943
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: DeleteComponent, selector: "pry-delete-pres", usesInheritance: true, ngImport: i0, template: "@if (canModify$
|
|
942
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: DeleteComponent, selector: "pry-delete-pres", usesInheritance: true, ngImport: i0, template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.delete' | i18n }}\n }\n </button>\n}\n", dependencies: [{ kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
944
943
|
}
|
|
945
944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DeleteComponent, decorators: [{
|
|
946
945
|
type: Component,
|
|
947
|
-
args: [{ selector: 'pry-delete-pres', template: "@if (canModify$
|
|
946
|
+
args: [{ selector: 'pry-delete-pres', template: "@if (canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"trigger()\">\n @if (displayLabels) {\n {{ '@pry.toolbox.delete' | i18n }}\n }\n </button>\n}\n" }]
|
|
948
947
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
949
948
|
type: Optional
|
|
950
949
|
}, {
|
|
@@ -1004,11 +1003,11 @@ class EditModeActionComponent extends ToolboxActionComponent {
|
|
|
1004
1003
|
this.store.dispatch(DashboardActions.toggleEditionMode({}));
|
|
1005
1004
|
}
|
|
1006
1005
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EditModeActionComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1007
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EditModeActionComponent, selector: "pry-edit-mode-action", usesInheritance: true, ngImport: i0, template: "@if (this.canModify$
|
|
1006
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EditModeActionComponent, selector: "pry-edit-mode-action", usesInheritance: true, ngImport: i0, template: "@if (this.canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleEditionMode()\">\n @if (displayLabels) {\n {{ ((modeEdition$ | async) ? '@pry.toolbox.editOff' : '@pry.toolbox.edit') | i18n }}\n }\n </button>\n}\n", dependencies: [{ kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1008
1007
|
}
|
|
1009
1008
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EditModeActionComponent, decorators: [{
|
|
1010
1009
|
type: Component,
|
|
1011
|
-
args: [{ selector: 'pry-edit-mode-action', template: "@if (this.canModify$
|
|
1010
|
+
args: [{ selector: 'pry-edit-mode-action', template: "@if (this.canModify$ | async) {\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleEditionMode()\">\n @if (displayLabels) {\n {{ ((modeEdition$ | async) ? '@pry.toolbox.editOff' : '@pry.toolbox.edit') | i18n }}\n }\n </button>\n}\n" }]
|
|
1012
1011
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
1013
1012
|
type: Optional
|
|
1014
1013
|
}, {
|
|
@@ -1085,21 +1084,21 @@ const ACTIONS = [
|
|
|
1085
1084
|
component: SwitchToEditContentComponent,
|
|
1086
1085
|
visible: true,
|
|
1087
1086
|
access: { module: 'dashboard', page: 'toolbox', action: 'edit_presentation_content' },
|
|
1088
|
-
needsOwner:
|
|
1087
|
+
needsOwner: true
|
|
1089
1088
|
},
|
|
1090
1089
|
{
|
|
1091
1090
|
name: 'share',
|
|
1092
1091
|
component: ShareComponent,
|
|
1093
1092
|
visible: true,
|
|
1094
1093
|
access: { module: 'dashboard', page: 'toolbox', action: 'share' },
|
|
1095
|
-
needsOwner:
|
|
1094
|
+
needsOwner: true
|
|
1096
1095
|
},
|
|
1097
1096
|
{
|
|
1098
1097
|
name: 'delete',
|
|
1099
1098
|
component: DeleteComponent,
|
|
1100
1099
|
visible: true,
|
|
1101
1100
|
access: { module: 'dashboard', page: 'toolbox', action: 'delete' },
|
|
1102
|
-
needsOwner:
|
|
1101
|
+
needsOwner: true
|
|
1103
1102
|
},
|
|
1104
1103
|
{
|
|
1105
1104
|
name: 'dashboard_details',
|
|
@@ -1171,8 +1170,8 @@ class ToolboxComponent {
|
|
|
1171
1170
|
set dropdownActions(dropdownActions) {
|
|
1172
1171
|
this._dropdownActions$.next(dropdownActions);
|
|
1173
1172
|
}
|
|
1174
|
-
constructor(store,
|
|
1175
|
-
this.
|
|
1173
|
+
constructor(store, access) {
|
|
1174
|
+
this.access = access;
|
|
1176
1175
|
this.actions$ = new BehaviorSubject(ACTIONS);
|
|
1177
1176
|
this._dropdownActions$ = new BehaviorSubject([]);
|
|
1178
1177
|
this.displayLabels = true;
|
|
@@ -1194,24 +1193,27 @@ class ToolboxComponent {
|
|
|
1194
1193
|
: gridLayout) === DashboardGridLayout.MANUAL));
|
|
1195
1194
|
this.actionsAvailable$ = store.select(DashboardSelectors.displayOptions);
|
|
1196
1195
|
this.showEditToggle$ = this.actionsAvailable$.pipe(map((actions) => !!actions?.edit_toggle));
|
|
1196
|
+
this.canModify$ = this.presentation$.pipe(switchMap((presentation) => {
|
|
1197
|
+
return presentation?.current ? this.access?.canModifyPresentation(presentation.current) : of(false);
|
|
1198
|
+
}));
|
|
1197
1199
|
}
|
|
1198
1200
|
ngOnInit() {
|
|
1199
1201
|
this.allActions$ = combineLatest([
|
|
1200
1202
|
this.actions$,
|
|
1201
1203
|
this.actionsAvailable$,
|
|
1202
|
-
this.
|
|
1203
|
-
]).pipe(switchMap(([actions, displayOptions,
|
|
1204
|
+
this.canModify$
|
|
1205
|
+
]).pipe(switchMap(([actions, displayOptions, _canModify]) => combineLatest(actions.map((action) => {
|
|
1204
1206
|
// @ts-ignore
|
|
1205
1207
|
const actionAvailable = action.visible && displayOptions.toolbox[action.name];
|
|
1206
|
-
const
|
|
1207
|
-
return this.
|
|
1208
|
-
? this.
|
|
1208
|
+
const canModify = !action.needsOwner || _canModify;
|
|
1209
|
+
return this.access
|
|
1210
|
+
? this.access.hasRole(null, action.access.module, action.access.page, action.access.action).pipe(map((hasRole) => ({
|
|
1209
1211
|
...action,
|
|
1210
|
-
visible: actionAvailable && (!this.
|
|
1212
|
+
visible: actionAvailable && (!this.access || hasRole) && canModify
|
|
1211
1213
|
})))
|
|
1212
1214
|
: of({
|
|
1213
1215
|
...action,
|
|
1214
|
-
visible: actionAvailable &&
|
|
1216
|
+
visible: actionAvailable && canModify
|
|
1215
1217
|
});
|
|
1216
1218
|
}))));
|
|
1217
1219
|
this.mainActions$ = combineLatest([this._dropdownActions$, this.allActions$]).pipe(map(([dropdownActions, actions]) => actions.filter((action) => !dropdownActions.find((dropdownAction) => action.name === dropdownAction.name))));
|
|
@@ -1231,11 +1233,11 @@ class ToolboxComponent {
|
|
|
1231
1233
|
return this._dropdownActions$.getValue().find((action) => actionName === action.name)?.order;
|
|
1232
1234
|
}
|
|
1233
1235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ToolboxComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ToolboxComponent, selector: "pry-toolbox", inputs: { displayLabels: "displayLabels", dropdownPosition: "dropdownPosition", actions: "actions", dropdownActions: "dropdownActions" }, ngImport: i0, template: "<ul class=\"m-actions-list\" #input>\n @for (action of mainActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"m-actions-list__item -{{action.name}}\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n @if (showDropdownButton$ | async) {\n <li class=\"m-actions-list__item\">\n
|
|
1236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ToolboxComponent, selector: "pry-toolbox", inputs: { displayLabels: "displayLabels", dropdownPosition: "dropdownPosition", actions: "actions", dropdownActions: "dropdownActions" }, ngImport: i0, template: "<ul class=\"m-actions-list\" #input>\n @for (action of mainActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"m-actions-list__item -{{ action.name }}\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n @if (showDropdownButton$ | async) {\n @if (((dropdownActions$ | async)?.length ?? 0) > 0) {\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary\"\n cdkOverlayOrigin\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n #trigger=\"cdkOverlayOrigin\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"10\" [height]=\"13\" iconSvg=\"chevron_bottom\"></pry-icon>\n @if (displayLabels) {\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n }\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayPositions]=\"dropdownPosition\"\n [cdkConnectedOverlayOffsetY]=\"5\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu -dropdown\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n @for (action of dropdownActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"o-draggable-menu__list__item\" [style.order]=\"getOrder(action.name)\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n </ul>\n </div>\n </ng-template>\n }\n }\n\n @if (showEditToggle$ | async) {\n @if (isManualMode$ | async) {\n <li class=\"m-actions-list__item\">\n <pry-edit-mode-toggle\n *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'edit_dashboard' }\"\n [displayLabels]=\"displayLabels\"\n ></pry-edit-mode-toggle>\n </li>\n }\n }\n</ul>\n", dependencies: [{ kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: ToolboxActionInstanciatorComponent, selector: "pry-toolbox-action-instanciator", inputs: ["displayLabels", "action"], outputs: ["closeOptions"] }, { kind: "component", type: EditModeToggleComponent, selector: "pry-edit-mode-toggle" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1235
1237
|
}
|
|
1236
1238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ToolboxComponent, decorators: [{
|
|
1237
1239
|
type: Component,
|
|
1238
|
-
args: [{ selector: 'pry-toolbox', template: "<ul class=\"m-actions-list\" #input>\n @for (action of mainActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"m-actions-list__item -{{action.name}}\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n @if (showDropdownButton$ | async) {\n <li class=\"m-actions-list__item\">\n
|
|
1240
|
+
args: [{ selector: 'pry-toolbox', template: "<ul class=\"m-actions-list\" #input>\n @for (action of mainActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"m-actions-list__item -{{ action.name }}\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n @if (showDropdownButton$ | async) {\n @if (((dropdownActions$ | async)?.length ?? 0) > 0) {\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary\"\n cdkOverlayOrigin\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n #trigger=\"cdkOverlayOrigin\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"10\" [height]=\"13\" iconSvg=\"chevron_bottom\"></pry-icon>\n @if (displayLabels) {\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n }\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayPositions]=\"dropdownPosition\"\n [cdkConnectedOverlayOffsetY]=\"5\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu -dropdown\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n @for (action of dropdownActions$ | async; track action.name) {\n @if (action.visible) {\n <li class=\"o-draggable-menu__list__item\" [style.order]=\"getOrder(action.name)\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </li>\n }\n }\n </ul>\n </div>\n </ng-template>\n }\n }\n\n @if (showEditToggle$ | async) {\n @if (isManualMode$ | async) {\n <li class=\"m-actions-list__item\">\n <pry-edit-mode-toggle\n *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'edit_dashboard' }\"\n [displayLabels]=\"displayLabels\"\n ></pry-edit-mode-toggle>\n </li>\n }\n }\n</ul>\n" }]
|
|
1239
1241
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i3.PryBaseAccess, decorators: [{
|
|
1240
1242
|
type: Optional
|
|
1241
1243
|
}, {
|