@provoly/dashboard 0.19.4 → 0.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -6
  2. package/esm2022/filters/autocomplete/autocomplete.component.mjs +2 -2
  3. package/esm2022/lib/core/i18n/en.translations.mjs +5 -2
  4. package/esm2022/lib/core/i18n/fr.translations.mjs +5 -2
  5. package/esm2022/lib/core/model/display-options.interface.mjs +29 -36
  6. package/esm2022/lib/core/model/filter.interface.mjs +1 -1
  7. package/esm2022/lib/core/store/config/config.effects.mjs +2 -2
  8. package/esm2022/lib/core/store/search/search.service.mjs +8 -5
  9. package/esm2022/lib/dashboard/components/dashboard.component.mjs +3 -4
  10. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +3 -1
  11. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +7 -4
  12. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -2
  13. package/esm2022/lib/dashboard/store/manifest.service.mjs +2 -2
  14. package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +41 -8
  15. package/esm2022/presentation/components/presentation.component.mjs +17 -10
  16. package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +4 -3
  17. package/esm2022/toolbox/components/toolbox.component.mjs +15 -12
  18. package/fesm2022/provoly-dashboard-dataset.mjs +2 -5
  19. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  20. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +1 -1
  21. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
  22. package/fesm2022/provoly-dashboard-presentation.mjs +56 -16
  23. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  24. package/fesm2022/provoly-dashboard-toolbox.mjs +17 -13
  25. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  26. package/fesm2022/provoly-dashboard.mjs +76 -70
  27. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  28. package/lib/core/i18n/en.translations.d.ts +3 -0
  29. package/lib/core/i18n/fr.translations.d.ts +3 -0
  30. package/lib/core/model/display-options.interface.d.ts +3 -8
  31. package/lib/core/model/filter.interface.d.ts +1 -0
  32. package/lib/core/store/search/search.service.d.ts +1 -1
  33. package/lib/dashboard/store/dashboard.actions.d.ts +8 -6
  34. package/lib/dashboard/store/dashboard.effects.d.ts +9 -5
  35. package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
  36. package/package.json +31 -31
  37. package/presentation/components/add-edit-presentation/add-edit-presentation.component.d.ts +10 -2
  38. package/presentation/components/presentation.component.d.ts +5 -3
  39. package/styles/components/_a-btn.scss +11 -17
  40. package/styles-theme/base-theme/_typography.theme.scss +2 -1
  41. package/styles-theme/components-theme/_a-btn.theme.scss +4 -3
  42. package/styles-theme/components-theme/_a-form-field.theme.scss +1 -1
  43. package/styles-theme/components-theme/_a-label.theme.scss +1 -1
  44. package/styles-theme/components-theme/_a-pry-select.theme.scss +1 -1
  45. package/styles-theme/components-theme/_a-table.theme.scss +2 -2
  46. package/styles-theme/components-theme/_m-context-menu.theme.scss +1 -1
  47. package/styles-theme/components-theme/_m-filter.theme.scss +1 -1
  48. package/styles-theme/components-theme/_m-time-picker.theme.scss +1 -1
  49. package/styles-theme/components-theme/_o-date-picker.theme.scss +1 -1
  50. package/styles-theme/components-theme/_o-pry-card-menu.theme.scss +1 -1
  51. package/styles-theme/components-theme/_o-pry-presentation.theme.scss +0 -2
  52. package/styles-theme/components-theme/_o-search-fulltext.theme.scss +7 -7
  53. package/styles-theme/components-theme/_o-settings.theme.scss +1 -1
  54. package/styles-theme/components-theme/_o-widget.theme.scss +1 -3
  55. package/styles-theme/components-theme/_overlay.theme.scss +4 -4
  56. package/styles-theme/layout-theme/_o-manifest-layout.theme.scss +1 -1
  57. package/styles-theme/layout-theme/_o-workspace.theme.scss +1 -1
  58. package/toolbox/components/toolbox.component.d.ts +2 -1
@@ -5,7 +5,7 @@ import { EventEmitter, Component, Optional, Input, Output, ViewEncapsulation, Te
5
5
  import * as i4$1 from '@angular/forms';
6
6
  import { FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
7
7
  import * as i4 from '@provoly/dashboard';
8
- import { SubscriptionnerDirective, DEFAULT_RESTITUTION_ICON_URL, LibraryTypes, DashboardGridLayout, DashboardSelectors, DashboardActions, ViewMode, PryVisibilityType, DisplayMode, PryIconModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryShareModule, PryOverlayModule, PryI18nModule } from '@provoly/dashboard';
8
+ import { SubscriptionnerDirective, DEFAULT_RESTITUTION_ICON_URL, LibraryTypes, DashboardGridLayout, DashboardSelectors, DashboardActions, ViewMode, PryVisibilityType, PryIconModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryShareModule, PryOverlayModule, PryI18nModule } from '@provoly/dashboard';
9
9
  import * as i6 from '@provoly/dashboard/components/checkbox';
10
10
  import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
11
11
  import * as i9 from '@provoly/dashboard/components/sinceDate';
@@ -14,7 +14,7 @@ import * as i5 from '@provoly/dashboard/toolbox';
14
14
  import { PryToolboxModule } from '@provoly/dashboard/toolbox';
15
15
  import { BehaviorSubject, combineLatest, take, map } from 'rxjs';
16
16
  import * as i8 from '@provoly/dashboard/components/metadata-editor';
17
- import { MetadataActions, PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';
17
+ import { MetadataActions, MetadataSelectors, PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';
18
18
  import { v4 } from 'uuid';
19
19
  import * as i1 from '@ngrx/store';
20
20
  import * as i3 from '@angular/router';
@@ -38,6 +38,9 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
38
38
  this.goBack = new EventEmitter();
39
39
  this.type = LibraryTypes.ILLUSTRATION;
40
40
  this.chosenLayout = DashboardGridLayout.FULL;
41
+ this.possibleThemes = [];
42
+ this.metadataThemeId = '';
43
+ this.mode = 'meta';
41
44
  this.store.dispatch(MetadataActions.loadMetadata());
42
45
  this.staticManifest$ = this.store.select(DashboardSelectors.staticManifest);
43
46
  combineLatest([this.staticManifest$, this.store.select(DashboardSelectors.gridLayout)]).subscribe(([staticManifest, gridLayout]) => {
@@ -46,14 +49,28 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
46
49
  ? staticManifest.windows[0]?.grid?.layout
47
50
  : gridLayout;
48
51
  });
52
+ this.subscriptions.add(this.store.select(MetadataSelectors.metadata).subscribe((metadata) => {
53
+ this.metadataDefs = metadata;
54
+ const metadataTheme = metadata?.find((meta) => meta.name === '_theme');
55
+ if (metadataTheme) {
56
+ this.metadataThemeId = metadataTheme?.id ?? '';
57
+ this.possibleThemes = metadataTheme?.allowedValues ?? [];
58
+ }
59
+ }));
49
60
  }
50
61
  ngOnInit() {
51
62
  this.form = new FormGroup({
52
63
  name: new FormControl(null, [Validators.required, Validators.maxLength(50)]),
53
64
  description: new FormControl(null, [Validators.maxLength(200)]),
54
- cover: new FormControl(false)
65
+ cover: new FormControl(false),
66
+ theme: new FormControl('')
55
67
  });
56
68
  this.image = this.selectedPresentation$.value?.image ?? DEFAULT_RESTITUTION_ICON_URL;
69
+ this.subscriptions.add(this.selectedPresentation$.subscribe((presentation) => {
70
+ const theme = presentation?.metadata?.find((metadata) => metadata.metadataDef.name === '_theme')?.value;
71
+ if (!!theme)
72
+ this.form.patchValue({ theme });
73
+ }));
57
74
  }
58
75
  ngAfterViewInit() {
59
76
  setTimeout(() => {
@@ -78,7 +95,8 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
78
95
  name: this.form.value.name ?? '',
79
96
  description: this.form.value.description ?? '',
80
97
  cover: this.form.value.cover ?? false,
81
- image: this.image ?? DEFAULT_RESTITUTION_ICON_URL
98
+ image: this.image ?? DEFAULT_RESTITUTION_ICON_URL,
99
+ metadata: this.metadata()
82
100
  };
83
101
  this.subscriptions.add(this.staticManifest$.pipe(take(1)).subscribe((staticManifest) => {
84
102
  this.store.dispatch(DashboardActions.saveManifest({
@@ -101,7 +119,8 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
101
119
  name: this.form.value.name ?? '',
102
120
  description: this.form.value.description ?? '',
103
121
  image: this.image ?? DEFAULT_RESTITUTION_ICON_URL,
104
- cover: this.form.value.cover ?? false
122
+ cover: this.form.value.cover ?? false,
123
+ metadata: this.metadata()
105
124
  };
106
125
  if (!this.edition) {
107
126
  this.store.dispatch(DashboardActions.updateManifest({
@@ -116,7 +135,6 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
116
135
  presentation,
117
136
  viewMode: this.edition ? ViewMode.CREATION : ViewMode.EDITION
118
137
  }));
119
- this.router?.navigateByUrl(this.editionStartUrl);
120
138
  }
121
139
  else {
122
140
  this.store.dispatch(DashboardActions.loadPresentation({
@@ -124,6 +142,7 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
124
142
  viewMode: this.edition ? ViewMode.CREATION : ViewMode.EDITION
125
143
  }));
126
144
  }
145
+ this.router?.navigateByUrl(this.editionStartUrl);
127
146
  }
128
147
  addMetadata(metadata) {
129
148
  this.store.dispatch(DashboardActions.addManifestMetadata({
@@ -141,12 +160,24 @@ class PryAddEditPresentationComponent extends SubscriptionnerDirective {
141
160
  close() {
142
161
  this.goBack.emit();
143
162
  }
163
+ metadata() {
164
+ return this.mode === 'theme'
165
+ ? !this.form.value.theme || this.form.value.theme === ''
166
+ ? []
167
+ : [
168
+ {
169
+ metadataDef: this.metadataDefs.find((metadata) => metadata.id === this.metadataThemeId),
170
+ value: this.form.value.theme ?? ''
171
+ }
172
+ ]
173
+ : this.selectedPresentation$.value?.metadata ?? [];
174
+ }
144
175
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryAddEditPresentationComponent, deps: [{ token: i1.Store }, { token: i3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
145
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryAddEditPresentationComponent, selector: "pry-add-edit-presentation", inputs: { edition: "edition", editionStartUrl: "editionStartUrl", selectedPresentation: "selectedPresentation" }, outputs: { goBack: "goBack" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h1>\n <div class=\"o-presentation-form-wrapper\">\n <form [formGroup]=\"form\" class=\"o-presentation-form\">\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_name\">{{ '@pry.presentation.form.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"presentation_name\"\n formControlName=\"name\"\n placeholder=\"{{ '@pry.presentation.form.name' | i18n }}\"\n class=\"a-form-field\"\n maxlength=\"50\"\n required\n />\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.touched && form.get('name')?.hasError('required')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.required' | i18n }}\n </label>\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '50' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_description\">{{\n '@pry.presentation.form.description' | i18n\n }}</label>\n <textarea\n formControlName=\"description\"\n id=\"presentation_description\"\n name=\"description\"\n cols=\"30\"\n rows=\"5\"\n maxlength=\"200\"\n placeholder=\"{{ '@pry.presentation.form.description' | i18n }}\"\n class=\"a-form-field\"\n ></textarea>\n <label\n for=\"presentation_description\"\n *ngIf=\"form.get('description')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '200' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\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)=\"image = $event\"\n [iconUrl]=\"image\"\n [mode]=\"type\"\n ></pry-select-image>\n <pry-checkbox formControlName=\"cover\" name=\"cover\" ngDefaultControl>\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n <pry-select-grid-layout *ngIf=\"!edition\"></pry-select-grid-layout>\n </div>\n </form>\n <div class=\"o-presentation__metadata-editor\" *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"form.invalid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i4.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.SelectGridLayoutComponent, selector: "pry-select-grid-layout" }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.PryMetadataEditorComponent, selector: "pry-metadata-editor", inputs: ["isModification", "targetId", "type", "metadata"], outputs: ["addMeta", "removeMeta"] }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }] }); }
176
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryAddEditPresentationComponent, selector: "pry-add-edit-presentation", inputs: { edition: "edition", editionStartUrl: "editionStartUrl", selectedPresentation: "selectedPresentation", mode: "mode" }, outputs: { goBack: "goBack" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h1>\n <div class=\"o-presentation-form-wrapper\">\n <form [formGroup]=\"form\" class=\"o-presentation-form\">\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_name\">{{ '@pry.presentation.form.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"presentation_name\"\n formControlName=\"name\"\n placeholder=\"{{ '@pry.presentation.form.name' | i18n }}\"\n class=\"a-form-field\"\n maxlength=\"50\"\n required\n />\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.touched && form.get('name')?.hasError('required')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.required' | i18n }}\n </label>\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '50' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_description\">{{\n '@pry.presentation.form.description' | i18n\n }}</label>\n <textarea\n formControlName=\"description\"\n id=\"presentation_description\"\n name=\"description\"\n cols=\"30\"\n rows=\"5\"\n maxlength=\"200\"\n placeholder=\"{{ '@pry.presentation.form.description' | i18n }}\"\n class=\"a-form-field\"\n ></textarea>\n <label\n for=\"presentation_description\"\n *ngIf=\"form.get('description')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '200' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\" *ngIf=\"mode === 'theme'\">\n <label class=\"a-label\" for=\"presentation_theme\">{{ '@pry.presentation.form.theme' | i18n }}</label>\n <pry-select\n id=\"presentation_theme\"\n class=\"a-pry-select\"\n [items]=\"possibleThemes\"\n [itemsAsOption]=\"true\"\n [bindData]=\"true\"\n formControlName=\"theme\"\n [clearable]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field -width-full\">\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)=\"image = $event\"\n [iconUrl]=\"image\"\n [mode]=\"type\"\n ></pry-select-image>\n <pry-checkbox formControlName=\"cover\" name=\"cover\" ngDefaultControl>\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n <pry-select-grid-layout *ngIf=\"!edition\"></pry-select-grid-layout>\n </div>\n </form>\n <ng-container *ngIf=\"mode === 'meta'\">\n <div class=\"o-presentation__metadata-editor\" *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n </ng-container>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"form.invalid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i4.PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.PrySelectComponent, selector: "pry-select", inputs: ["labelTranslate", "baseTranslate", "translationFn", "translationFnArgs", "clearable", "multiple", "multipleClearRight", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "items", "itemsAsOption", "bindData", "bindValue", "bindLabel", "bindIcon", "iconSize", "templateLabel", "templateOption", "autocomplete"] }, { kind: "component", type: i5.SelectGridLayoutComponent, selector: "pry-select-grid-layout" }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.PryMetadataEditorComponent, selector: "pry-metadata-editor", inputs: ["isModification", "targetId", "type", "metadata"], outputs: ["addMeta", "removeMeta"] }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }] }); }
146
177
  }
147
178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryAddEditPresentationComponent, decorators: [{
148
179
  type: Component,
149
- args: [{ selector: 'pry-add-edit-presentation', template: "<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h1>\n <div class=\"o-presentation-form-wrapper\">\n <form [formGroup]=\"form\" class=\"o-presentation-form\">\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_name\">{{ '@pry.presentation.form.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"presentation_name\"\n formControlName=\"name\"\n placeholder=\"{{ '@pry.presentation.form.name' | i18n }}\"\n class=\"a-form-field\"\n maxlength=\"50\"\n required\n />\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.touched && form.get('name')?.hasError('required')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.required' | i18n }}\n </label>\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '50' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_description\">{{\n '@pry.presentation.form.description' | i18n\n }}</label>\n <textarea\n formControlName=\"description\"\n id=\"presentation_description\"\n name=\"description\"\n cols=\"30\"\n rows=\"5\"\n maxlength=\"200\"\n placeholder=\"{{ '@pry.presentation.form.description' | i18n }}\"\n class=\"a-form-field\"\n ></textarea>\n <label\n for=\"presentation_description\"\n *ngIf=\"form.get('description')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '200' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\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)=\"image = $event\"\n [iconUrl]=\"image\"\n [mode]=\"type\"\n ></pry-select-image>\n <pry-checkbox formControlName=\"cover\" name=\"cover\" ngDefaultControl>\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n <pry-select-grid-layout *ngIf=\"!edition\"></pry-select-grid-layout>\n </div>\n </form>\n <div class=\"o-presentation__metadata-editor\" *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"form.invalid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n" }]
180
+ args: [{ selector: 'pry-add-edit-presentation', template: "<div class=\"o-manifest-layout\">\n <div class=\"o-manifest-layout__toolbox\">\n <button class=\"a-btn a-btn--secondary\" type=\"button\" (click)=\"close()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button class=\"a-btn a-btn--primary\" type=\"button\" (click)=\"save()\" [disabled]=\"form.invalid\">\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n <div class=\"o-manifest-layout__content--presentation\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.add' + '.pageTitle' | i18n }}</h1>\n <div class=\"o-presentation-form-wrapper\">\n <form [formGroup]=\"form\" class=\"o-presentation-form\">\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_name\">{{ '@pry.presentation.form.name' | i18n }}</label>\n <input\n type=\"text\"\n id=\"presentation_name\"\n formControlName=\"name\"\n placeholder=\"{{ '@pry.presentation.form.name' | i18n }}\"\n class=\"a-form-field\"\n maxlength=\"50\"\n required\n />\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.touched && form.get('name')?.hasError('required')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.required' | i18n }}\n </label>\n <label\n for=\"presentation_name\"\n *ngIf=\"form.get('name')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '50' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\">\n <label class=\"a-label\" for=\"presentation_description\">{{\n '@pry.presentation.form.description' | i18n\n }}</label>\n <textarea\n formControlName=\"description\"\n id=\"presentation_description\"\n name=\"description\"\n cols=\"30\"\n rows=\"5\"\n maxlength=\"200\"\n placeholder=\"{{ '@pry.presentation.form.description' | i18n }}\"\n class=\"a-form-field\"\n ></textarea>\n <label\n for=\"presentation_description\"\n *ngIf=\"form.get('description')?.hasError('maxlength')\"\n class=\"a-label a-label--help -error\"\n >\n {{ '@pry.presentation.maxLength' | i18n : { len: '200' } }}\n </label>\n </div>\n <div class=\"m-form-label-field -width-full\" *ngIf=\"mode === 'theme'\">\n <label class=\"a-label\" for=\"presentation_theme\">{{ '@pry.presentation.form.theme' | i18n }}</label>\n <pry-select\n id=\"presentation_theme\"\n class=\"a-pry-select\"\n [items]=\"possibleThemes\"\n [itemsAsOption]=\"true\"\n [bindData]=\"true\"\n formControlName=\"theme\"\n [clearable]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field -width-full\">\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)=\"image = $event\"\n [iconUrl]=\"image\"\n [mode]=\"type\"\n ></pry-select-image>\n <pry-checkbox formControlName=\"cover\" name=\"cover\" ngDefaultControl>\n {{ '@pry.presentation.form.cover' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n <div class=\"m-form-label-field -width-full m-form-label-field--inline\">\n <label class=\"a-label\">{{ '@pry.presentation.form.grid' | i18n }}</label>\n <span class=\"a-label\">{{ '@pry.toolbox.layout.' + this.chosenLayout | i18n }}</span>\n <pry-select-grid-layout *ngIf=\"!edition\"></pry-select-grid-layout>\n </div>\n </form>\n <ng-container *ngIf=\"mode === 'meta'\">\n <div class=\"o-presentation__metadata-editor\" *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <pry-metadata-editor\n [targetId]=\"selectedPresentation.id\"\n [isModification]=\"true\"\n [metadata]=\"selectedPresentation.metadata\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </div>\n </ng-container>\n </div>\n <button\n class=\"a-btn a-btn--primary\"\n (click)=\"configureDashboard(selectedPresentation$.value!)\"\n [disabled]=\"form.invalid\"\n >\n {{ '@pry.presentation.configuration' | i18n }}\n </button>\n </div>\n</div>\n" }]
150
181
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: i3.Router, decorators: [{
151
182
  type: Optional
152
183
  }] }]; }, propDecorators: { edition: [{
@@ -157,6 +188,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
157
188
  type: Output
158
189
  }], selectedPresentation: [{
159
190
  type: Input
191
+ }], mode: [{
192
+ type: Input
160
193
  }] } });
161
194
 
162
195
  class PryTitlePresentationComponent {
@@ -197,7 +230,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
197
230
  set listOfManifests(manifests) {
198
231
  this.listOfManifests$.next(Array.isArray(manifests) ? manifests : null);
199
232
  }
200
- constructor(store, overlay, viewContainerRef, router, titleService, activatedRoute) {
233
+ constructor(store, overlay, viewContainerRef, router, titleService, activatedRoute, ngZone) {
201
234
  super();
202
235
  this.store = store;
203
236
  this.overlay = overlay;
@@ -205,6 +238,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
205
238
  this.router = router;
206
239
  this.titleService = titleService;
207
240
  this.activatedRoute = activatedRoute;
241
+ this.ngZone = ngZone;
208
242
  this.selectedPresentation$ = new BehaviorSubject(null);
209
243
  this.selectedMode = ViewMode.CATALOG;
210
244
  this.modalOpened = false;
@@ -215,6 +249,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
215
249
  this.ViewMode = ViewMode;
216
250
  this.search$ = new BehaviorSubject('');
217
251
  this.listOfManifests$ = new BehaviorSubject(null);
252
+ this.mode = 'meta';
218
253
  this.subscriptions.add(this.activatedRoute.queryParams.subscribe((params) => {
219
254
  if (params['create']) {
220
255
  this.creation();
@@ -247,7 +282,10 @@ class PryPresentationComponent extends SubscriptionnerDirective {
247
282
  this.store.dispatch(DashboardActions.selectPresentation({ presentation: undefined, viewMode: ViewMode.CATALOG }));
248
283
  }
249
284
  fetch(presentation) {
250
- this.store.dispatch(DashboardActions.loadPresentation({ presentation, viewMode: ViewMode.CATALOG }));
285
+ this.store.dispatch(DashboardActions.loadPresentation({ presentation, viewMode: ViewMode.CONSULT }));
286
+ this.ngZone.run(() => {
287
+ this.router?.navigateByUrl(this.consultStartUrl);
288
+ });
251
289
  }
252
290
  creation() {
253
291
  this.selectedMode = ViewMode.CREATION;
@@ -264,7 +302,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
264
302
  };
265
303
  this.store.dispatch(DashboardActions.selectPresentation(newPresentation));
266
304
  this.store.dispatch(DashboardActions.setGridLayout({ layout: DashboardGridLayout.FULL }));
267
- this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: DisplayMode.CREATE }));
305
+ this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CREATION }));
268
306
  }
269
307
  edit(presentation) {
270
308
  this.selectedMode = ViewMode.EDITION;
@@ -272,7 +310,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
272
310
  this.titleService.changeTitle(presentation.name);
273
311
  this.store.dispatch(DashboardActions.selectPresentation({ presentation, viewMode: ViewMode.EDITION }));
274
312
  this.store.dispatch(DashboardActions.fetchStaticManifest({ id: presentation.id }));
275
- this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: DisplayMode.EDIT }));
313
+ this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.EDITION }));
276
314
  this.overlayRef?.dispose();
277
315
  this.overlayRef = undefined;
278
316
  }
@@ -348,13 +386,13 @@ class PryPresentationComponent extends SubscriptionnerDirective {
348
386
  }
349
387
  this.submit.nativeElement.focus();
350
388
  }
351
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryPresentationComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i3.Router }, { token: i4.PryTitleService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
352
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryPresentationComponent, selector: "pry-presentation", inputs: { editionStartUrl: "editionStartUrl", consultStartUrl: "consultStartUrl", meAsOwner: "meAsOwner", listOfManifests: "listOfManifests" }, viewQueries: [{ propertyName: "templateModalActions", first: true, predicate: ["modalActions"], descendants: true, read: TemplateRef }, { propertyName: "template", first: true, predicate: ["modal"], descendants: true, read: TemplateRef }, { propertyName: "openModal", first: true, predicate: ["openModal"], descendants: true }, { propertyName: "confirm", first: true, predicate: ["confirm"], descendants: true }, { propertyName: "submit", first: true, predicate: ["submit"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "crossVisibility", first: true, predicate: ["crossVisibility"], descendants: true }, { propertyName: "visibilityModal", first: true, predicate: ["visibilityModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n class=\"a-btn a-btn--primary a-btn--icon-text a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.create' | i18n\"\n data-tooltip-position=\"bottom\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"a-presentation__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let presentation of filteredPresentations$ | async\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <pry-icon\n [iconSvg]=\"presentation.visibility.type.toLowerCase()\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div class=\"a-tooltip\">\n <div class=\"o-presentation__item__image\">\n <img\n alt=\"\"\n [height]=\"presentation.cover ? 600 : 128\"\n [width]=\"presentation.cover ? 600 : 128\"\n [class.is-full-width]=\"presentation.cover\"\n [src]=\"presentation.image | getSecuredImage | async\"\n />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <div class=\"more-actions\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(presentation)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div class=\"o-presentation__item__txt\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n <div class=\"a-p\">\n <div class=\"description-container\">\n <span class=\"description\">\n {{ presentation.description }}\n </span>\n <div class=\"description-tooltip\">{{ presentation.description }}</div>\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div class=\"o-presentation__item__footer\">\n <button class=\"a-btn a-tooltip\" [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\" (click)=\"fetch(presentation)\">\n {{'@pry.presentation.consult' | i18n}}</button>\n </div>\n </li>\n </ul>\n\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CREATION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n ></pry-add-edit-presentation>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.EDITION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n ></pry-add-edit-presentation>\n </ng-container>\n</div>\n\n<ng-template #modal>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\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\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModal()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-share [ngModel]=\"selectedPresentation.visibility\" (ngModelChange)=\"visibility = $event\"></pry-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #submit\n (keydown.tab)=\"focusCrossElement()\"\n (click)=\"changeVisibility(selectedPresentation)\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n<div class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presenation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.presentation.options' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModalActions()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ul class=\"actions-list\">\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.change' | i18n\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n <pry-icon iconSvg=\"edit\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.edition' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.share' | i18n\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n <pry-icon iconSvg=\"share\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.share' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.erase' | i18n\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n <pry-icon iconSvg=\"delete\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n</div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i4$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4.PryShareComponent, selector: "pry-share", inputs: ["value", "labelProperty", "valueProperty", "users$"] }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: PryAddEditPresentationComponent, selector: "pry-add-edit-presentation", inputs: ["edition", "editionStartUrl", "selectedPresentation"], outputs: ["goBack"] }, { kind: "component", type: PryPresentationCssComponent, selector: "pry-presentation-css" }, { kind: "pipe", type: i4.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i9.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }] }); }
389
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryPresentationComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i3.Router }, { token: i4.PryTitleService }, { token: i3.ActivatedRoute }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
390
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryPresentationComponent, selector: "pry-presentation", inputs: { editionStartUrl: "editionStartUrl", consultStartUrl: "consultStartUrl", meAsOwner: "meAsOwner", mode: "mode", listOfManifests: "listOfManifests" }, viewQueries: [{ propertyName: "templateModalActions", first: true, predicate: ["modalActions"], descendants: true, read: TemplateRef }, { propertyName: "template", first: true, predicate: ["modal"], descendants: true, read: TemplateRef }, { propertyName: "openModal", first: true, predicate: ["openModal"], descendants: true }, { propertyName: "confirm", first: true, predicate: ["confirm"], descendants: true }, { propertyName: "submit", first: true, predicate: ["submit"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "crossVisibility", first: true, predicate: ["crossVisibility"], descendants: true }, { propertyName: "visibilityModal", first: true, predicate: ["visibilityModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchDefault>\n <div class=\"o-manifest-layout__toolbox\">\n <button\n class=\"a-btn a-btn--primary a-btn--icon-text a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.create' | i18n\"\n data-tooltip-position=\"bottom\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"a-presentation__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let presentation of filteredPresentations$ | async\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <pry-icon\n [iconSvg]=\"presentation.visibility.type.toLowerCase()\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div class=\"a-tooltip\">\n <div class=\"o-presentation__item__image\">\n <img\n alt=\"\"\n [height]=\"presentation.cover ? 600 : 128\"\n [width]=\"presentation.cover ? 600 : 128\"\n [class.is-full-width]=\"presentation.cover\"\n [src]=\"presentation.image | getSecuredImage | async\"\n />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <div class=\"more-actions\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(presentation)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div class=\"o-presentation__item__txt\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n <div class=\"a-p\">\n <div class=\"description-container\">\n <span class=\"description\">\n {{ presentation.description }}\n </span>\n <div class=\"description-tooltip\">{{ presentation.description }}</div>\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div class=\"o-presentation__item__footer\">\n <button\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n (click)=\"fetch(presentation)\"\n >\n {{ '@pry.presentation.consult' | i18n }}\n </button>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CREATION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n [mode]=\"mode\"\n ></pry-add-edit-presentation>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.EDITION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n [mode]=\"mode\"\n ></pry-add-edit-presentation>\n </ng-container>\n</div>\n\n<ng-template #modal>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\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\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModal()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-share [ngModel]=\"selectedPresentation.visibility\" (ngModelChange)=\"visibility = $event\"></pry-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #submit\n (keydown.tab)=\"focusCrossElement()\"\n (click)=\"changeVisibility(selectedPresentation)\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presenation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.presentation.options' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModalActions()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ul class=\"actions-list\">\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.change' | i18n\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n <pry-icon iconSvg=\"edit\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.edition' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.share' | i18n\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n <pry-icon iconSvg=\"share\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.share' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.erase' | i18n\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n <pry-icon iconSvg=\"delete\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i4.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i4$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4.PryShareComponent, selector: "pry-share", inputs: ["value", "labelProperty", "valueProperty", "users$"] }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: PryAddEditPresentationComponent, selector: "pry-add-edit-presentation", inputs: ["edition", "editionStartUrl", "selectedPresentation", "mode"], outputs: ["goBack"] }, { kind: "component", type: PryPresentationCssComponent, selector: "pry-presentation-css" }, { kind: "pipe", type: i4.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i9.PrySinceDatePipe, name: "sinceDate" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6$1.AsyncPipe, name: "async" }] }); }
353
391
  }
354
392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryPresentationComponent, decorators: [{
355
393
  type: Component,
356
- args: [{ selector: 'pry-presentation', template: "<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchCase=\"ViewMode.CATALOG\">\n <div class=\"o-manifest-layout__toolbox\">\n <button\n class=\"a-btn a-btn--primary a-btn--icon-text a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.create' | i18n\"\n data-tooltip-position=\"bottom\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"a-presentation__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let presentation of filteredPresentations$ | async\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <pry-icon\n [iconSvg]=\"presentation.visibility.type.toLowerCase()\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div class=\"a-tooltip\">\n <div class=\"o-presentation__item__image\">\n <img\n alt=\"\"\n [height]=\"presentation.cover ? 600 : 128\"\n [width]=\"presentation.cover ? 600 : 128\"\n [class.is-full-width]=\"presentation.cover\"\n [src]=\"presentation.image | getSecuredImage | async\"\n />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <div class=\"more-actions\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(presentation)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div class=\"o-presentation__item__txt\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n <div class=\"a-p\">\n <div class=\"description-container\">\n <span class=\"description\">\n {{ presentation.description }}\n </span>\n <div class=\"description-tooltip\">{{ presentation.description }}</div>\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div class=\"o-presentation__item__footer\">\n <button class=\"a-btn a-tooltip\" [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\" (click)=\"fetch(presentation)\">\n {{'@pry.presentation.consult' | i18n}}</button>\n </div>\n </li>\n </ul>\n\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CREATION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n ></pry-add-edit-presentation>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.EDITION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n ></pry-add-edit-presentation>\n </ng-container>\n</div>\n\n<ng-template #modal>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\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\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModal()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-share [ngModel]=\"selectedPresentation.visibility\" (ngModelChange)=\"visibility = $event\"></pry-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #submit\n (keydown.tab)=\"focusCrossElement()\"\n (click)=\"changeVisibility(selectedPresentation)\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n<div class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presenation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.presentation.options' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModalActions()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ul class=\"actions-list\">\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.change' | i18n\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n <pry-icon iconSvg=\"edit\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.edition' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.share' | i18n\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n <pry-icon iconSvg=\"share\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.share' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.erase' | i18n\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n <pry-icon iconSvg=\"delete\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n</div>\n</ng-template>\n" }]
357
- }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i3.Router }, { type: i4.PryTitleService }, { type: i3.ActivatedRoute }]; }, propDecorators: { templateModalActions: [{
394
+ args: [{ selector: 'pry-presentation', template: "<pry-presentation-css></pry-presentation-css>\n<div class=\"o-manifest-layout\" [ngSwitch]=\"selectedMode\">\n <ng-container *ngSwitchDefault>\n <div class=\"o-manifest-layout__toolbox\">\n <button\n class=\"a-btn a-btn--primary a-btn--icon-text a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.create' | i18n\"\n data-tooltip-position=\"bottom\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"a-presentation__search\">\n <label id=\"catalog-search-label\" for=\"catalog-search\" class=\"u-visually-hidden\">\n <span>{{ '@pry.toolbox.catalog.filter.name' | i18n }}</span>\n </label>\n <input\n id=\"catalog-search\"\n type=\"text\"\n class=\"a-form-field\"\n [placeholder]=\"'@pry.presentation.search' | i18n\"\n [ngModel]=\"search$ | async\"\n (ngModelChange)=\"this.search$.next($event)\"\n />\n <pry-icon iconSvg=\"search\" [width]=\"17\" [height]=\"17\"></pry-icon>\n </div>\n </div>\n </div>\n <div class=\"o-manifest-layout__content\">\n <h1 class=\"a-h1\">{{ '@pry.presentation.title' | i18n }}</h1>\n <div class=\"o-presentation-wrapper\">\n <ul class=\"o-presentation\">\n <li class=\"o-presentation__item\" *ngFor=\"let presentation of filteredPresentations$ | async\">\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <pry-icon\n [iconSvg]=\"presentation.visibility.type.toLowerCase()\"\n class=\"is-private a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div class=\"a-tooltip\">\n <div class=\"o-presentation__item__image\">\n <img\n alt=\"\"\n [height]=\"presentation.cover ? 600 : 128\"\n [width]=\"presentation.cover ? 600 : 128\"\n [class.is-full-width]=\"presentation.cover\"\n [src]=\"presentation.image | getSecuredImage | async\"\n />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.visibility.type === PryVisibilityType.PRIVATE\">\n <div class=\"more-actions\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"toggleModalActions(presentation)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n </button>\n </div>\n </ng-container>\n </div>\n <div class=\"o-presentation__item__txt\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n <div class=\"a-p\">\n <div class=\"description-container\">\n <span class=\"description\">\n {{ presentation.description }}\n </span>\n <div class=\"description-tooltip\">{{ presentation.description }}</div>\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div class=\"o-presentation__item__footer\">\n <button\n class=\"a-btn a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n (click)=\"fetch(presentation)\"\n >\n {{ '@pry.presentation.consult' | i18n }}\n </button>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.CREATION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"false\"\n [mode]=\"mode\"\n ></pry-add-edit-presentation>\n </ng-container>\n <ng-container *ngSwitchCase=\"ViewMode.EDITION\">\n <pry-add-edit-presentation\n [selectedPresentation]=\"selectedPresentation$ | async\"\n (goBack)=\"closeRestitution()\"\n [editionStartUrl]=\"editionStartUrl\"\n [edition]=\"true\"\n [mode]=\"mode\"\n ></pry-add-edit-presentation>\n </ng-container>\n</div>\n\n<ng-template #modal>\n <div\n class=\"o-modal\"\n (click)=\"$event.stopPropagation()\"\n #visibilityModal\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog change visibility\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\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\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModal()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-share [ngModel]=\"selectedPresentation.visibility\" (ngModelChange)=\"visibility = $event\"></pry-share>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"toggleModal()\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n class=\"a-btn a-btn--primary\"\n #submit\n (keydown.tab)=\"focusCrossElement()\"\n (click)=\"changeVisibility(selectedPresentation)\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presenation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">{{ '@pry.presentation.options' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n #crossVisibility\n (keydown.shift.tab)=\"focusValidation()\"\n (click)=\"toggleModalActions()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ul class=\"actions-list\">\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.change' | i18n\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n <pry-icon iconSvg=\"edit\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.edition' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.share' | i18n\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n <pry-icon iconSvg=\"share\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.share' | i18n }}</span>\n </button>\n </li>\n <li>\n <button\n class=\"a-btn a-btn--icon-only a-tooltip\"\n [attr.data-tooltip]=\"'@pry.presentation.erase' | i18n\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n <pry-icon iconSvg=\"delete\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.presentation.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n" }]
395
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i3.Router }, { type: i4.PryTitleService }, { type: i3.ActivatedRoute }, { type: i0.NgZone }]; }, propDecorators: { templateModalActions: [{
358
396
  type: ViewChild,
359
397
  args: ['modalActions', { read: TemplateRef }]
360
398
  }], template: [{
@@ -384,6 +422,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
384
422
  type: Input
385
423
  }], meAsOwner: [{
386
424
  type: Input
425
+ }], mode: [{
426
+ type: Input
387
427
  }], listOfManifests: [{
388
428
  type: Input
389
429
  }] } });