@provoly/dashboard 0.13.9 → 0.13.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/admin.module.d.ts +2 -1
- package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +5 -13
- package/admin/components/admin-metadata-rules/admin-edit-metadata-rules/admin-edit-metadata-rules.component.d.ts +1 -1
- package/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.d.ts +1 -1
- package/admin/components/admin-user/admin-user-select/admin-user-select.component.d.ts +4 -9
- package/admin/components/association/association.component.d.ts +1 -3
- package/admin/store/admin.effects.d.ts +19 -15
- package/admin/store/admin.service.d.ts +0 -3
- package/components/metadata-editor/index.d.ts +5 -0
- package/components/metadata-editor/metadata-editor.component.d.ts +36 -0
- package/components/metadata-editor/metadata-editor.module.d.ts +12 -0
- package/components/metadata-editor/public-api.d.ts +7 -0
- package/components/metadata-editor/store/metadata.action.d.ts +112 -0
- package/components/metadata-editor/store/metadata.effects.d.ts +48 -0
- package/{admin/components/admin-metadata → components/metadata-editor}/store/metadata.reducer.d.ts +2 -1
- package/{admin/components/admin-metadata → components/metadata-editor}/store/metadata.selector.d.ts +1 -0
- package/components/metadata-editor/store/metadata.service.d.ts +15 -0
- package/dataset/i18n/en.translations.d.ts +1 -0
- package/dataset/i18n/fr.translations.d.ts +1 -0
- package/dataset/style/_o-pry-dataset-card.scss +7 -0
- package/esm2022/admin/admin.module.mjs +9 -17
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-edit/admin-abac-rules-edit.component.mjs +2 -2
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-new/admin-abac-rules-new.component.mjs +2 -2
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-view/admin-abac-rules-view.component.mjs +2 -2
- package/esm2022/admin/components/admin-abac-rules/components/metadata-condition/metadata-condition.component.mjs +2 -2
- package/esm2022/admin/components/admin-abac-rules/components/select-metadata/select-metadata.component.mjs +2 -2
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +21 -77
- package/esm2022/admin/components/admin-metadata/admin-edit-metadata/admin-edit-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata/admin-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata/admin-new-metadata/admin-new-metadata.component.mjs +2 -2
- package/esm2022/admin/components/admin-metadata/admin-select-metadata/admin-select-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata/shared/form-metadata/form-metadata.component.mjs +2 -2
- package/esm2022/admin/components/admin-metadata-rules/admin-edit-metadata-rules/admin-edit-metadata-rules.component.mjs +1 -1
- package/esm2022/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.mjs +2 -3
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +17 -65
- package/esm2022/admin/components/association/association.component.mjs +1 -4
- package/esm2022/admin/store/admin.effects.mjs +6 -2
- package/esm2022/admin/store/admin.service.mjs +1 -16
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +111 -0
- package/esm2022/components/metadata-editor/metadata-editor.module.mjs +47 -0
- package/esm2022/components/metadata-editor/provoly-dashboard-components-metadata-editor.mjs +5 -0
- package/esm2022/components/metadata-editor/public-api.mjs +8 -0
- package/esm2022/components/metadata-editor/store/metadata.action.mjs +27 -0
- package/esm2022/components/metadata-editor/store/metadata.effects.mjs +44 -0
- package/esm2022/components/metadata-editor/store/metadata.reducer.mjs +39 -0
- package/esm2022/components/metadata-editor/store/metadata.selector.mjs +19 -0
- package/esm2022/components/metadata-editor/store/metadata.service.mjs +36 -0
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +3 -3
- package/esm2022/dataset/i18n/en.translations.mjs +3 -2
- package/esm2022/dataset/i18n/fr.translations.mjs +3 -2
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/import/components/import.component.mjs +8 -4
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +3 -12
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -1
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +2 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +2 -2
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +3 -3
- package/esm2022/toolbox/components/toolbox-action-instanciator/toolbox-action-instanciator.component.mjs +31 -17
- package/esm2022/toolbox/components/toolbox.component.mjs +20 -14
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +55 -14
- package/esm2022/widgets/widget-map/i18n/en.translations.mjs +3 -1
- package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +3 -1
- package/esm2022/widgets/widget-map/pipe/widget-map-legend-url.pipe.mjs +2 -2
- package/esm2022/widgets/widget-map/public-api.mjs +3 -1
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +56 -0
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +32 -0
- package/fesm2022/provoly-dashboard-admin.mjs +107 -370
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +302 -0
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -0
- package/fesm2022/provoly-dashboard-dataset.mjs +8 -6
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +7 -3
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +49 -29
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +114 -14
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +8 -14
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/components/import.component.d.ts +5 -3
- package/lib/core/components/modal-status/modal-status.component.d.ts +0 -8
- package/lib/core/model/widget-map-manifest.interface.d.ts +2 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +1 -0
- package/package.json +36 -30
- package/schematics/ng-update/version-0-13/index.js +5 -0
- package/schematics/ng-update/version-0-13/index.js.map +1 -1
- package/toolbox/components/toolbox-action-instanciator/toolbox-action-instanciator.component.d.ts +7 -5
- package/toolbox/components/toolbox.component.d.ts +10 -5
- package/widgets/widget-map/component/widget-map.component.d.ts +7 -3
- package/widgets/widget-map/i18n/en.translations.d.ts +2 -0
- package/widgets/widget-map/i18n/fr.translations.d.ts +2 -0
- package/widgets/widget-map/public-api.d.ts +2 -0
- package/widgets/widget-map/utils/cql-utils.class.d.ts +6 -0
- package/admin/components/admin-dataset/store/admin-dataset.actions.d.ts +0 -59
- package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +0 -30
- package/admin/components/admin-dataset/store/admin-dataset.reducer.d.ts +0 -6
- package/admin/components/admin-dataset/store/admin-dataset.selector.d.ts +0 -5
- package/admin/components/admin-metadata/store/metadata.action.d.ts +0 -56
- package/admin/components/admin-metadata/store/metadata.effects.d.ts +0 -36
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.actions.mjs +0 -14
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.effects.mjs +0 -36
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.reducer.mjs +0 -11
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.selector.mjs +0 -9
- package/esm2022/admin/components/admin-metadata/store/metadata.action.mjs +0 -19
- package/esm2022/admin/components/admin-metadata/store/metadata.effects.mjs +0 -33
- package/esm2022/admin/components/admin-metadata/store/metadata.reducer.mjs +0 -35
- package/esm2022/admin/components/admin-metadata/store/metadata.selector.mjs +0 -17
- package/esm2022/widgets/widget-map/pipe/xml-utils.class.mjs +0 -32
- /package/widgets/widget-map/{pipe → utils}/xml-utils.class.d.ts +0 -0
|
@@ -543,11 +543,11 @@ class SaveViewComponent extends ToolboxActionComponent {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: SaveViewComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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\n [pryTooltip]=\"infoTooltipDirectSave\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveTypeOpened\"\n aria-controls=\"directiveSave\"\n aria-describedby=\"infoTooltip_directSave\"\n >\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary -size-md\"\n (click)=\"directSave()\"\n [disabled]=\"!(savePresentationActive$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [pryTooltip]=\"infoTooltipSaveAs\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button\n type=\"button\"\n #saveAs\n class=\"a-btn a-btn--secondary -size-md\"\n (click)=\"toggleSaveAs()\"\n aria-haspopup=\"dialog\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.saveView' | 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 <pry-checkbox [(ngModel)]=\"currentManifest!.cover\" name=\"cover\">\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\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.broadcast' | i18n }}</h4>\n <pry-share [(ngModel)]=\"visibility\" (ngModelChange)=\"changeVisibility($event)\"></pry-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.broadcast' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #infoTooltipSaveAs>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_saveAs\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.rename' | i18n }}</span>\n </div>\n</ng-template>\n<ng-template #infoTooltipDirectSave>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_directSave\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.save' | i18n }}</span>\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.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$1.PryTooltipDirective, selector: "[pryTooltip]", inputs: ["pryTooltip", "styleReversed", "pryTooltipContext", "pryTooltipPosition", "pryTooltipShowDelay"] }, { kind: "directive", type: i3$1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3$1.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i7$1.PryStepperComponent, selector: "pry-stepper", inputs: ["isConsultMode"], outputs: ["lastStepCompleted"] }, { kind: "component", type: i7$1.PryStepComponent, selector: "pry-step", inputs: ["setActiveState"] }, { kind: "directive", type: i7$1.PryStepTitleDirective, selector: "[stepTitle]" }, { kind: "component", type: i3$1.PryShareComponent, selector: "pry-share", inputs: ["value", "labelProperty", "valueProperty", "users$"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
546
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", 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\n [pryTooltip]=\"infoTooltipDirectSave\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveTypeOpened\"\n aria-controls=\"directiveSave\"\n aria-describedby=\"infoTooltip_directSave\"\n >\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary -size-md\"\n (click)=\"directSave()\"\n [hidden]=\"!(savePresentationActive$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [pryTooltip]=\"infoTooltipSaveAs\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button\n type=\"button\"\n #saveAs\n class=\"a-btn a-btn--secondary -size-md\"\n (click)=\"toggleSaveAs()\"\n aria-haspopup=\"dialog\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.saveView' | 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 <pry-checkbox [(ngModel)]=\"currentManifest!.cover\" name=\"cover\">\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\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.broadcast' | i18n }}</h4>\n <pry-share [(ngModel)]=\"visibility\" (ngModelChange)=\"changeVisibility($event)\"></pry-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.broadcast' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #infoTooltipSaveAs>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_saveAs\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.rename' | i18n }}</span>\n </div>\n</ng-template>\n<ng-template #infoTooltipDirectSave>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_directSave\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.save' | i18n }}</span>\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.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$1.PryTooltipDirective, selector: "[pryTooltip]", inputs: ["pryTooltip", "styleReversed", "pryTooltipContext", "pryTooltipPosition", "pryTooltipShowDelay"] }, { kind: "directive", type: i3$1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3$1.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i7$1.PryStepperComponent, selector: "pry-stepper", inputs: ["isConsultMode"], outputs: ["lastStepCompleted"] }, { kind: "component", type: i7$1.PryStepComponent, selector: "pry-step", inputs: ["setActiveState"] }, { kind: "directive", type: i7$1.PryStepTitleDirective, selector: "[stepTitle]" }, { kind: "component", type: i3$1.PryShareComponent, selector: "pry-share", inputs: ["value", "labelProperty", "valueProperty", "users$"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
547
547
|
}
|
|
548
548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: SaveViewComponent, decorators: [{
|
|
549
549
|
type: Component,
|
|
550
|
-
args: [{ selector: 'pry-save-view', template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div\n [pryTooltip]=\"infoTooltipDirectSave\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveTypeOpened\"\n aria-controls=\"directiveSave\"\n aria-describedby=\"infoTooltip_directSave\"\n >\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary -size-md\"\n (click)=\"directSave()\"\n [
|
|
550
|
+
args: [{ selector: 'pry-save-view', template: "<ng-container *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'save' }\">\n <ng-container *ngIf=\"mode === 'directSave'\">\n <div\n [pryTooltip]=\"infoTooltipDirectSave\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveTypeOpened\"\n aria-controls=\"directiveSave\"\n aria-describedby=\"infoTooltip_directSave\"\n >\n <button\n type=\"button\"\n #directiveSave\n class=\"a-btn a-btn--primary -size-md\"\n (click)=\"directSave()\"\n [hidden]=\"!(savePresentationActive$ | async)\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.save' | i18n }} ({{ nbPages }})</ng-container>\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"mode === 'saveAs'\">\n <div\n class=\"save-manifest-container\"\n [pryTooltip]=\"infoTooltipSaveAs\"\n pryTooltipPosition=\"bottom\"\n [attr.aria-expanded]=\"saveAsOpened\"\n aria-controls=\"saveModal\"\n aria-describedby=\"infoTooltip_saveAs\"\n >\n <button\n type=\"button\"\n #saveAs\n class=\"a-btn a-btn--secondary -size-md\"\n (click)=\"toggleSaveAs()\"\n aria-haspopup=\"dialog\"\n >\n <ng-container *ngIf=\"displayLabels\">{{ '@pry.toolbox.saveView' | 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 <pry-checkbox [(ngModel)]=\"currentManifest!.cover\" name=\"cover\">\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\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.broadcast' | i18n }}</h4>\n <pry-share [(ngModel)]=\"visibility\" (ngModelChange)=\"changeVisibility($event)\"></pry-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.broadcast' | i18n }}\n </button>\n </div>\n </pry-step>\n </pry-stepper>\n </div>\n</ng-template>\n\n<ng-template #infoTooltipSaveAs>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_saveAs\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.rename' | i18n }}</span>\n </div>\n</ng-template>\n<ng-template #infoTooltipDirectSave>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_directSave\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.save' | i18n }}</span>\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" }]
|
|
551
551
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { mode: [{
|
|
552
552
|
type: Input
|
|
553
553
|
}], input: [{
|
|
@@ -845,42 +845,62 @@ class ToolboxActionInstanciatorComponent extends SubscriptionnerDirective {
|
|
|
845
845
|
this.displayLabels = true;
|
|
846
846
|
this.closeOptions = new EventEmitter();
|
|
847
847
|
}
|
|
848
|
+
set action(action) {
|
|
849
|
+
this._action = action;
|
|
850
|
+
this.ngAfterViewInit();
|
|
851
|
+
}
|
|
848
852
|
ngAfterViewInit() {
|
|
849
|
-
if (this.
|
|
850
|
-
|
|
851
|
-
this.
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
componentRef.location.nativeElement.
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
853
|
+
if (this.actionContainerRef) {
|
|
854
|
+
this.actionContainerRef.clear();
|
|
855
|
+
if (this._action.visible) {
|
|
856
|
+
const componentRef = this.actionContainerRef.createComponent(this._action.component);
|
|
857
|
+
this.subscriptions.add(componentRef.instance.closeOptions.subscribe((_) => this.closeOptions.emit()));
|
|
858
|
+
componentRef.instance.displayLabels = this.displayLabels;
|
|
859
|
+
componentRef.location.nativeElement.style.zIndex = 2;
|
|
860
|
+
if (this._action.name === 'default_size') {
|
|
861
|
+
componentRef.location.nativeElement.classList.add('is-screen-size-select');
|
|
862
|
+
}
|
|
863
|
+
if (this._action.name === 'save_view') {
|
|
864
|
+
componentRef.instance.mode = 'directSave';
|
|
865
|
+
}
|
|
866
|
+
this._cd.detectChanges();
|
|
859
867
|
}
|
|
860
|
-
this._cd.detectChanges();
|
|
861
868
|
}
|
|
869
|
+
else {
|
|
870
|
+
setTimeout(() => this.ngAfterViewInit(), 100);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
ngOnDestroy() {
|
|
874
|
+
super.ngOnDestroy();
|
|
875
|
+
this.actionContainerRef?.clear();
|
|
862
876
|
}
|
|
863
877
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxActionInstanciatorComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
864
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxActionInstanciatorComponent, selector: "pry-toolbox-action-instanciator", inputs: {
|
|
878
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxActionInstanciatorComponent, selector: "pry-toolbox-action-instanciator", inputs: { displayLabels: "displayLabels", action: "action" }, outputs: { closeOptions: "closeOptions" }, viewQueries: [{ propertyName: "actionContainerRef", first: true, predicate: ["actionContainerRef"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #actionContainerRef></ng-template>\n" }); }
|
|
865
879
|
}
|
|
866
880
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxActionInstanciatorComponent, decorators: [{
|
|
867
881
|
type: Component,
|
|
868
882
|
args: [{ selector: 'pry-toolbox-action-instanciator', template: "<ng-template #actionContainerRef></ng-template>\n" }]
|
|
869
|
-
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
870
|
-
type: Input
|
|
871
|
-
}], displayLabels: [{
|
|
883
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { displayLabels: [{
|
|
872
884
|
type: Input
|
|
873
885
|
}], closeOptions: [{
|
|
874
886
|
type: Output
|
|
875
887
|
}], actionContainerRef: [{
|
|
876
888
|
type: ViewChild,
|
|
877
889
|
args: ['actionContainerRef', { read: ViewContainerRef }]
|
|
890
|
+
}], action: [{
|
|
891
|
+
type: Input
|
|
878
892
|
}] } });
|
|
879
893
|
|
|
880
894
|
class ToolboxComponent {
|
|
895
|
+
set actions(actions) {
|
|
896
|
+
this.actions$.next(actions);
|
|
897
|
+
}
|
|
898
|
+
set dropdownActions(dropdownActions) {
|
|
899
|
+
this._dropdownActions$.next(dropdownActions);
|
|
900
|
+
}
|
|
881
901
|
constructor(store) {
|
|
882
|
-
this.actions = ACTIONS;
|
|
883
|
-
this.
|
|
902
|
+
this.actions$ = new BehaviorSubject(ACTIONS);
|
|
903
|
+
this._dropdownActions$ = new BehaviorSubject([]);
|
|
884
904
|
this.displayLabels = true;
|
|
885
905
|
this.isDropdownOpen = false;
|
|
886
906
|
this.hasInitialPresentation$ = store.select(DashboardSelectors.presentation).pipe(map((pres) => !!pres.initial));
|
|
@@ -889,16 +909,16 @@ class ToolboxComponent {
|
|
|
889
909
|
.pipe(map((pres) => (pres.grid?.layout ?? DashboardGridLayout.MANUAL) === DashboardGridLayout.MANUAL));
|
|
890
910
|
}
|
|
891
911
|
ngOnInit() {
|
|
892
|
-
this.allActions$ = this.hasInitialPresentation
|
|
893
|
-
return
|
|
912
|
+
this.allActions$ = combineLatest([this.actions$, this.hasInitialPresentation$]).pipe(map(([actions, hasInitialPresentation]) => {
|
|
913
|
+
return actions.map((action) => {
|
|
894
914
|
if (action.name === 'save_view') {
|
|
895
|
-
action = { ...action, visible: hasInitialPresentation };
|
|
915
|
+
action = { ...action, visible: action.visible && hasInitialPresentation };
|
|
896
916
|
}
|
|
897
917
|
return action;
|
|
898
918
|
});
|
|
899
919
|
}));
|
|
900
|
-
this.mainActions$ = this.allActions
|
|
901
|
-
this.dropdownActions$ = this.allActions
|
|
920
|
+
this.mainActions$ = combineLatest([this._dropdownActions$, this.allActions$]).pipe(map(([dropdownActions, actions]) => actions.filter((action) => !dropdownActions.find((dropdownAction) => action.name === dropdownAction.name))));
|
|
921
|
+
this.dropdownActions$ = combineLatest([this._dropdownActions$, this.allActions$]).pipe(map(([dropdownActions, actions]) => actions.filter((action) => !!dropdownActions.find((dropdownAction) => action.name === dropdownAction.name))));
|
|
902
922
|
this.showDropdownButton$ = this.dropdownActions$.pipe(map((actions) => actions.length > 0 && actions.filter((action) => action.visible).length > 0));
|
|
903
923
|
}
|
|
904
924
|
openDropdown($event) {
|
|
@@ -911,19 +931,19 @@ class ToolboxComponent {
|
|
|
911
931
|
$event.stopPropagation();
|
|
912
932
|
}
|
|
913
933
|
getOrder(actionName) {
|
|
914
|
-
return this.
|
|
934
|
+
return this._dropdownActions$.getValue().find((action) => actionName === action.name)?.order;
|
|
915
935
|
}
|
|
916
936
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
917
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxComponent, selector: "pry-toolbox", inputs: {
|
|
937
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxComponent, selector: "pry-toolbox", inputs: { displayLabels: "displayLabels", actions: "actions", dropdownActions: "dropdownActions" }, ngImport: i0, template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\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 (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <li\n *ngFor=\"let action of dropdownActions$ | async\"\n class=\"o-draggable-menu__list__item\"\n [style.order]=\"getOrder(action.name)\"\n >\n <ng-container *ngIf=\"action.visible\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-template>\n </ng-container>\n <li class=\"m-actions-list__item\" *ngIf=\"isManualMode$ | async\">\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</ul>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"], 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$1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3$1.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.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
918
938
|
}
|
|
919
939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxComponent, decorators: [{
|
|
920
940
|
type: Component,
|
|
921
941
|
args: [{ selector: 'pry-toolbox', template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\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 (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <li\n *ngFor=\"let action of dropdownActions$ | async\"\n class=\"o-draggable-menu__list__item\"\n [style.order]=\"getOrder(action.name)\"\n >\n <ng-container *ngIf=\"action.visible\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-template>\n </ng-container>\n <li class=\"m-actions-list__item\" *ngIf=\"isManualMode$ | async\">\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</ul>\n" }]
|
|
922
|
-
}], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: {
|
|
942
|
+
}], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { displayLabels: [{
|
|
923
943
|
type: Input
|
|
924
|
-
}],
|
|
944
|
+
}], actions: [{
|
|
925
945
|
type: Input
|
|
926
|
-
}],
|
|
946
|
+
}], dropdownActions: [{
|
|
927
947
|
type: Input
|
|
928
948
|
}] } });
|
|
929
949
|
|