@provoly/dashboard 1.0.0 → 1.1.1

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 (73) hide show
  1. package/assets/svgs/analytic.svg +1 -0
  2. package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +5 -4
  3. package/esm2022/import/components/import.component.mjs +22 -10
  4. package/esm2022/import/i18n/en.translations.mjs +3 -1
  5. package/esm2022/import/i18n/fr.translations.mjs +3 -1
  6. package/esm2022/lib/core/access/access.service.mjs +4 -1
  7. package/esm2022/lib/core/i18n/en.translations.mjs +2 -1
  8. package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
  9. package/esm2022/lib/core/model/public-api.mjs +2 -1
  10. package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +2 -0
  11. package/esm2022/lib/core/store/data-source/data-source.effects.mjs +5 -2
  12. package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +12 -1
  13. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +4 -3
  14. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
  15. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +6 -4
  16. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +17 -9
  17. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +8 -2
  18. package/esm2022/presentation/components/presentation.component.mjs +18 -9
  19. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +108 -0
  20. package/esm2022/widgets/widget-analytic/i18n/en.translations.mjs +13 -0
  21. package/esm2022/widgets/widget-analytic/i18n/fr.translations.mjs +13 -0
  22. package/esm2022/widgets/widget-analytic/provoly-dashboard-widgets-widget-analytic.mjs +5 -0
  23. package/esm2022/widgets/widget-analytic/public-api.mjs +3 -0
  24. package/esm2022/widgets/widget-analytic/style/css.component.mjs +11 -0
  25. package/esm2022/widgets/widget-analytic/widget-analytic.module.mjs +70 -0
  26. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +14 -137
  27. package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +2 -34
  28. package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +191 -0
  29. package/esm2022/widgets/widget-map/public-api.mjs +2 -1
  30. package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +24 -5
  31. package/fesm2022/provoly-dashboard-admin.mjs +3 -2
  32. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  33. package/fesm2022/provoly-dashboard-import.mjs +25 -9
  34. package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
  35. package/fesm2022/provoly-dashboard-presentation.mjs +17 -8
  36. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  37. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +211 -0
  38. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -0
  39. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +201 -169
  40. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  41. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +23 -4
  42. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
  43. package/fesm2022/provoly-dashboard.mjs +52 -16
  44. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  45. package/import/components/import.component.d.ts +4 -2
  46. package/import/i18n/en.translations.d.ts +2 -0
  47. package/import/i18n/fr.translations.d.ts +2 -0
  48. package/lib/core/access/access.service.d.ts +3 -0
  49. package/lib/core/i18n/en.translations.d.ts +1 -0
  50. package/lib/core/i18n/fr.translations.d.ts +1 -0
  51. package/lib/core/model/public-api.d.ts +1 -0
  52. package/lib/core/model/widget-analytic-manifest.interface.d.ts +6 -0
  53. package/lib/core/store/data-source/data-source.effects.d.ts +4 -2
  54. package/lib/dashboard/store/dashboard.actions.d.ts +11 -1
  55. package/lib/dashboard/store/dashboard.effects.d.ts +2 -0
  56. package/lib/dashboard/store/dashboard.reducers.d.ts +3 -1
  57. package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
  58. package/package.json +54 -48
  59. package/presentation/components/presentation.component.d.ts +5 -3
  60. package/styles/components/_o-pry-admin-classes-customize.scss +1 -0
  61. package/widgets/widget-analytic/component/widget-analytic.component.d.ts +47 -0
  62. package/widgets/widget-analytic/i18n/en.translations.d.ts +12 -0
  63. package/widgets/widget-analytic/i18n/fr.translations.d.ts +12 -0
  64. package/widgets/widget-analytic/index.d.ts +5 -0
  65. package/widgets/widget-analytic/public-api.d.ts +2 -0
  66. package/widgets/widget-analytic/style/_o-widget-analytic.scss +43 -0
  67. package/widgets/widget-analytic/style/css.component.d.ts +5 -0
  68. package/widgets/widget-analytic/widget-analytic.module.d.ts +19 -0
  69. package/widgets/widget-map/component/widget-map.component.d.ts +9 -22
  70. package/widgets/widget-map/interaction/interaction-manager.class.d.ts +0 -5
  71. package/widgets/widget-map/interaction/tooltip-manager.class.d.ts +43 -0
  72. package/widgets/widget-map/public-api.d.ts +1 -0
  73. package/widgets/widget-tile/component/widget-tile.component.d.ts +4 -1
@@ -58,10 +58,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
58
58
  }] });
59
59
 
60
60
  class PryImportComponent extends SubscriptionnerDirective {
61
- constructor(store, dsService) {
61
+ constructor(store, dsService, snackbar, i18nService) {
62
62
  super();
63
63
  this.store = store;
64
64
  this.dsService = dsService;
65
+ this.snackbar = snackbar;
66
+ this.i18nService = i18nService;
65
67
  this.selectedFileType = 'csv';
66
68
  this.normalizeGeoShape = false;
67
69
  this.fileTypes = [
@@ -97,6 +99,13 @@ class PryImportComponent extends SubscriptionnerDirective {
97
99
  }
98
100
  uploadedChange($event) {
99
101
  this.file = $event;
102
+ if ($event.size > 1024 * 1024 * 1024 * 2) {
103
+ this.snackbar.open({
104
+ type: 'error',
105
+ message: this.i18nService.instant('@pry.import.tooLarge', { current: this.getFileSize($event.size) })
106
+ });
107
+ this.file = undefined;
108
+ }
100
109
  }
101
110
  submit() {
102
111
  if (this.file && this.selectedDataset && this.selectedFileType) {
@@ -122,11 +131,14 @@ class PryImportComponent extends SubscriptionnerDirective {
122
131
  new Date(this.productionDate) > new Date(this.maxDate));
123
132
  }
124
133
  getFileSize(size) {
125
- if (size >= 1000 && size < 1000000) {
126
- return `${(size / 1000).toFixed(1)} KB`;
134
+ if (size >= 1024 && size < 1024 * 1024) {
135
+ return `${(size / 1024).toFixed(1)} KB`;
136
+ }
137
+ else if (size >= 1024 * 1024 && size < 1024 * 1024 * 1024) {
138
+ return `${(size / (1024 * 1024)).toFixed(1)} MB`;
127
139
  }
128
- else if (size >= 1000000) {
129
- return `${(size / 1000000).toFixed(1)} MB`;
140
+ else if (size >= 1024 * 1024 * 1024) {
141
+ return `${(size / (1024 * 1024 * 1024)).toFixed(1)} GB`;
130
142
  }
131
143
  return `${size} bytes`;
132
144
  }
@@ -148,13 +160,13 @@ class PryImportComponent extends SubscriptionnerDirective {
148
160
  productionDateIsInTheFuture() {
149
161
  return DateUtils.isInTheFuture(new Date(this.productionDate));
150
162
  }
151
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportComponent, deps: [{ token: i2.Store }, { token: i2$1.DataSourceService }], target: i0.ɵɵFactoryTarget.Component }); }
152
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryImportComponent, selector: "pry-import", usesInheritance: true, ngImport: i0, template: "<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2$1.PryUploadComponent, selector: "pry-upload", inputs: ["mode", "accept", "labelTranslate"], outputs: ["uploaded", "uploadedFile"] }, { kind: "component", type: i2$1.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { 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.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: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i6.PryTextEditorComponent, selector: "pry-text-editor", inputs: ["tabView"] }, { kind: "component", type: PryImportCssComponent, selector: "pry-import-css" }, { kind: "pipe", type: i2$1.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportComponent, deps: [{ token: i2.Store }, { token: i2$1.DataSourceService }, { token: i2$1.PrySnackbarService }, { token: i2$1.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
164
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryImportComponent, selector: "pry-import", usesInheritance: true, ngImport: i0, template: "<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2$1.PryUploadComponent, selector: "pry-upload", inputs: ["mode", "accept", "labelTranslate"], outputs: ["uploaded", "uploadedFile"] }, { kind: "component", type: i2$1.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { 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.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: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i6.PryTextEditorComponent, selector: "pry-text-editor", inputs: ["tabView"] }, { kind: "component", type: PryImportCssComponent, selector: "pry-import-css" }, { kind: "pipe", type: i2$1.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
153
165
  }
154
166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportComponent, decorators: [{
155
167
  type: Component,
156
- args: [{ selector: 'pry-import', template: "<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n" }]
157
- }], ctorParameters: () => [{ type: i2.Store }, { type: i2$1.DataSourceService }] });
168
+ args: [{ selector: 'pry-import', template: "<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n" }]
169
+ }], ctorParameters: () => [{ type: i2.Store }, { type: i2$1.DataSourceService }, { type: i2$1.PrySnackbarService }, { type: i2$1.PryI18nService }] });
158
170
 
159
171
  const enTranslations = {
160
172
  '@pry': {
@@ -166,6 +178,8 @@ const enTranslations = {
166
178
  successTitle: 'Import successful',
167
179
  uploadTitlezip: 'Choose a .zip file',
168
180
  uploadTitlecsv: 'Choose a .csv file',
181
+ warning: 'File must be under 2GB, or must be imported via directly via APIs.',
182
+ tooLarge: 'File is too large ({{current}} > 2GB), please use APIs to import this file.',
169
183
  selectFile: 'Select file',
170
184
  importedLines: 'imported lines',
171
185
  consultDataset: 'The import is in progress, see the {{ parameter }} dataset page to check its condition',
@@ -200,6 +214,8 @@ const frTranslations = {
200
214
  successTitle: 'Import de données réussi',
201
215
  uploadTitlezip: 'Choisir un fichier .zip',
202
216
  uploadTitlecsv: 'Choisir un fichier .csv',
217
+ warning: 'Attention, le fichier ne doit pas dépasser 2GB pour être intégrer via cet écran. Le cas échéant, votre fichier devra être importé via les API',
218
+ tooLarge: 'Fichier trop volumineux ({{current}} > 2GB), veuillez utiliser les API pour importer ces données',
203
219
  selectFile: 'Sélectionner un fichier',
204
220
  importedLines: 'lignes importée(s)',
205
221
  consultDataset: "L'import est en cours, consultez la page du jeu de données {{parameter}} pour vérifier son état",
@@ -1 +1 @@
1
- {"version":3,"file":"provoly-dashboard-import.mjs","sources":["../../../../projects/provoly/dashboard/import/store/import.actions.ts","../../../../projects/provoly/dashboard/import/store/import.reducer.ts","../../../../projects/provoly/dashboard/import/store/import.selectors.ts","../../../../projects/provoly/dashboard/import/style/css.component.ts","../../../../projects/provoly/dashboard/import/components/import.component.ts","../../../../projects/provoly/dashboard/import/components/import.component.html","../../../../projects/provoly/dashboard/import/i18n/en.translations.ts","../../../../projects/provoly/dashboard/import/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/import/import-routing.module.ts","../../../../projects/provoly/dashboard/import/store/import.service.ts","../../../../projects/provoly/dashboard/import/store/import.effects.ts","../../../../projects/provoly/dashboard/import/import.module.ts","../../../../projects/provoly/dashboard/import/provoly-dashboard-import.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport { DatasetVersion } from '@provoly/dashboard';\n\nexport const ImportActions = {\n upload: createAction(\n '[Import] import data',\n props<{\n file: File;\n dataset: string;\n fileType: string;\n normalizeGeo?: boolean;\n datasetVersionInformation: Partial<DatasetVersion>;\n }>()\n ),\n uploadSuccess: createAction('[Import] import data successful', props<{ uploadedDataset: Partial<DatasetVersion> }>()),\n uploadFailure: createAction('[Import] import data failure', props<{ errors: any }>())\n};\n","import { createReducer, on } from '@ngrx/store';\nimport { ImportActions } from './import.actions';\nimport { DatasetVersion } from '@provoly/dashboard';\n\nexport const importFeatureKey = '@pry/import';\n\nexport interface ImportState {\n loading: boolean;\n uploadedDataset?: Partial<DatasetVersion>;\n}\n\nexport const initialImportState: ImportState = {\n loading: false\n};\n\nexport const importReducer = createReducer(\n initialImportState,\n on(ImportActions.upload, (state) => ({\n ...state,\n loading: true\n })),\n on(ImportActions.uploadSuccess, (state, action) => ({\n ...state,\n loading: false,\n uploadedDataset: action.uploadedDataset\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport * as fromPipeline from './import.reducer';\n\nconst feature = createFeatureSelector<fromPipeline.ImportState>(fromPipeline.importFeatureKey);\n\nconst loading = createSelector(feature, (state) => state.loading);\nconst uploadedDataset = createSelector(feature, (state) => state?.uploadedDataset);\n\nexport const ImportSelectors = {\n loading,\n uploadedDataset\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-import-css',\n template: '',\n styleUrls: ['./_o-import.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryImportCssComponent {}\n","import { Component, OnDestroy } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport {\n Dataset,\n DataSourceActions,\n DataSourceSelectors,\n DataSourceService,\n DateUtils,\n PryDatasetType,\n SubscriptionnerDirective\n} from '@provoly/dashboard';\nimport { map, Observable, take } from 'rxjs';\nimport { ImportActions } from '../store/import.actions';\nimport { ImportSelectors } from '../store/import.selectors';\nimport { catchError } from 'rxjs/operators';\n\ntype FileExtension = 'csv' | 'zip';\n\n@Component({\n selector: 'pry-import',\n templateUrl: './import.component.html'\n})\nexport class PryImportComponent extends SubscriptionnerDirective implements OnDestroy {\n datasets$: Observable<Dataset[]>;\n file?: File;\n selectedDataset?: Dataset;\n selectedFileType: FileExtension = 'csv';\n loading$: Observable<boolean>;\n normalizeGeoShape = false;\n fileTypes: { label: string; value: FileExtension }[] = [\n {\n label: 'Csv',\n value: 'csv'\n },\n {\n label: 'Shapefile',\n value: 'zip'\n }\n ];\n\n fileExtension: Record<FileExtension, string> = {\n csv: '.csv',\n zip: '.zip'\n };\n showMessage: boolean = false;\n maxDate = DateUtils.formatDate(new Date());\n productionDate: string = this.maxDate;\n producer: string = '';\n additionalInformation: string = '';\n\n constructor(\n private store: Store,\n private dsService: DataSourceService\n ) {\n super();\n store.dispatch(DataSourceActions.dataset.loadDataset());\n this.datasets$ = store\n .select(DataSourceSelectors.datasets)\n .pipe(\n map((datasets) =>\n datasets\n .filter((dataset) => dataset.type === PryDatasetType.CLOSED)\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1))\n )\n );\n this.loading$ = store.select(ImportSelectors.loading);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.showMessage = false;\n }\n\n uploadedChange($event: File) {\n this.file = $event;\n }\n\n submit() {\n if (this.file && this.selectedDataset && this.selectedFileType) {\n this.store.dispatch(\n ImportActions.upload({\n file: this.file,\n dataset: this.selectedDataset.id,\n fileType: this.selectedFileType,\n normalizeGeo: this.normalizeGeoShape,\n datasetVersionInformation: {\n productionDate: new Date(this.productionDate).toISOString(),\n producer: this.producer,\n additionalInformation: this.additionalInformation.length > 0 ? this.additionalInformation : undefined\n }\n })\n );\n this.showMessage = true;\n this.file = undefined;\n }\n }\n\n isSubmitDisabled() {\n return (\n this.file === undefined ||\n this.selectedDataset === undefined ||\n (this.selectedDataset?.type === PryDatasetType.CLOSED && (this.productionDate === '' || this.producer === '')) ||\n new Date(this.productionDate) > new Date(this.maxDate)\n );\n }\n\n getFileSize(size: number) {\n if (size >= 1000 && size < 1000000) {\n return `${(size / 1000).toFixed(1)} KB`;\n } else if (size >= 1000000) {\n return `${(size / 1000000).toFixed(1)} MB`;\n }\n return `${size} bytes`;\n }\n\n onFileTypeChange(fileType: FileExtension) {\n this.selectedFileType = fileType;\n }\n\n getLastActiveVersion($event?: Dataset) {\n if ($event) {\n this.subscriptions.add(\n this.dsService\n .getLastActiveDatasetVersion($event.id)\n .pipe(\n take(1),\n catchError(() => [])\n )\n .subscribe((version) => {\n if (version && version.producer) {\n this.producer = version.producer || '';\n }\n })\n );\n }\n }\n\n productionDateIsInTheFuture() {\n return DateUtils.isInTheFuture(new Date(this.productionDate));\n }\n}\n","<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n","export const enTranslations = {\n '@pry': {\n import: {\n title: 'Import data',\n datasetImport: 'Import in :',\n import: 'Import',\n errorTitle: 'Import failed',\n successTitle: 'Import successful',\n uploadTitlezip: 'Choose a .zip file',\n uploadTitlecsv: 'Choose a .csv file',\n selectFile: 'Select file',\n importedLines: 'imported lines',\n consultDataset: 'The import is in progress, see the {{ parameter }} dataset page to check its condition',\n errors: 'errors',\n error: 'Error on import: {{msg}}',\n errorCode: {\n 409: 'Import already in progress, please try again later.'\n },\n line: 'Line {{line}}: ',\n withoutLine: 'Global errors: ',\n dataset: 'Dataset',\n fileType: 'Select file type',\n code: {\n UNRECOGNIZED: 'Provided file contains a column \"{{name}}\", which is not present in the chosen dataset',\n FILE_MANDATORY: 'No file was provided',\n NB_ATTRIBUTES:\n 'The number of columns in the file does not match the number of attributes in the chosen dataset',\n CAST: 'Value {{name}} could not be casted to type \"{{type}}\"',\n ELASTIC_SEARCH: 'Elastic Search error: {{elasticError}}'\n },\n normalize: 'Standardize geographic shapes'\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n import: {\n title: 'Import de données',\n datasetImport: 'Importer dans un jeu de données:',\n import: 'Importer',\n errorTitle: \"L'import a échoué\",\n successTitle: 'Import de données réussi',\n uploadTitlezip: 'Choisir un fichier .zip',\n uploadTitlecsv: 'Choisir un fichier .csv',\n selectFile: 'Sélectionner un fichier',\n importedLines: 'lignes importée(s)',\n consultDataset: \"L'import est en cours, consultez la page du jeu de données {{parameter}} pour vérifier son état\",\n shapefileState: ' pour vérifier son état',\n error: \"Erreur lors de l'import: {{msg}}\",\n errors: 'erreur(s)',\n errorCode: {\n 409: 'Import déjà en cours, veuillez réessayer plus tard.'\n },\n line: 'Ligne {{line}}: ',\n withoutLine: 'Erreurs globales: ',\n dataset: 'Jeu de données',\n fileType: 'Sélectionner un type de fichier',\n code: {\n UNRECOGNIZED:\n \"Le fichier fourni contient une colonne «\\u00A0{{name}}\\u00A0», qui n'est pas présente dans le jeu de données choisi\",\n FILE_MANDATORY: 'Aucun fichier fourni',\n NB_ATTRIBUTES:\n \"Le nombre des colonnes dans le fichier fourni ne correspond pas au nombre d'attributs dans le jeu de données choisi\",\n CAST: \"La valeur «\\u00A0{{name}}\\u00A0», n'a pas pu être convertie en type «\\u00A0{{type}}\\u00A0»,\",\n ELASTIC_SEARCH: 'Elastic Search stack trace error: {{elasticError}}'\n },\n normalize: 'Normaliser les formes géographiques'\n }\n }\n};\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { PRY_ACCESS_GUARD } from '@provoly/dashboard';\nimport { PryImportComponent } from './components/import.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: PryImportComponent,\n data: {\n access: {\n module: 'dashboard',\n page: 'import'\n }\n },\n canActivate: [PRY_ACCESS_GUARD]\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class PryImportRoutingModule {}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { ConfigSelectors, DatasetVersion } from '@provoly/dashboard';\nimport { mergeMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ImportService {\n constructor(\n private httpClient: HttpClient,\n private store: Store<any>\n ) {}\n\n upload(\n file: File,\n datasetId: string,\n fileType: string,\n normalizeGeo: boolean = false,\n datasetVersionInformation: Partial<DatasetVersion>\n ) {\n const formData = new FormData();\n let mimeType = '';\n\n if (fileType === 'csv') {\n mimeType = 'text/csv';\n } else if (fileType === 'zip') {\n mimeType = 'application/shp';\n }\n formData.append('file', new Blob([file], { type: mimeType }), file.name);\n formData.append('normalizeGeo', normalizeGeo.toString());\n formData.append('datasetVersionInformation', JSON.stringify(datasetVersionInformation));\n\n return this.store.select(ConfigSelectors.dataUrl).pipe(\n mergeMap((url) =>\n this.httpClient.post<Partial<DatasetVersion>>(`${url}/imports/dataset/id/${datasetId}`, formData, {\n headers: new HttpHeaders({ 'File-Content-Type': mimeType })\n })\n )\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { PryI18nService, PrySnackbarService } from '@provoly/dashboard';\nimport { catchError, map, mergeMap } from 'rxjs/operators';\nimport { ImportActions } from './import.actions';\nimport { ImportService } from './import.service';\n\n@Injectable()\nexport class ImportEffects {\n upload$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ImportActions.upload),\n mergeMap((action) =>\n this.service\n .upload(action.file, action.dataset, action.fileType, action.normalizeGeo, action.datasetVersionInformation)\n .pipe(\n map((uploadedDataset) => {\n return ImportActions.uploadSuccess({ uploadedDataset: uploadedDataset });\n }),\n catchError((error: HttpErrorResponse) => {\n if (error.status === 400 || error.status === 500) {\n return [ImportActions.uploadFailure({ errors: error.error.itemErrors })];\n } else if (error.status === 409) {\n this.snackbar.open({\n type: 'error',\n message: this.translateService.instant('@pry.import.errorCode.' + error.status)\n });\n return [ImportActions.uploadFailure({ errors: error.error.itemErrors })];\n }\n this.snackbar.open({\n type: 'error',\n message: this.translateService.instant('@pry.import.error', { msg: error.error.message })\n });\n throw error;\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private service: ImportService,\n private snackbar: PrySnackbarService,\n private translateService: PryI18nService\n ) {}\n}\n","import { CommonModule, DatePipe } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { PryCoreModule, PryI18nModule, PryI18nService, PryIconModule, PrySelectModule } from '@provoly/dashboard';\nimport { PryImportComponent } from './components/import.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryImportRoutingModule } from './import-routing.module';\nimport { ImportEffects } from './store/import.effects';\nimport { importFeatureKey, importReducer } from './store/import.reducer';\nimport { PryImportCssComponent } from './style/css.component';\nimport {PryCheckboxModule} from \"@provoly/dashboard/components/checkbox\";\nimport { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';\n\n@NgModule({\n providers: [DatePipe],\n declarations: [PryImportComponent, PryImportCssComponent],\n imports: [\n PryCoreModule,\n PrySelectModule,\n PryI18nModule,\n CommonModule,\n PryIconModule,\n FormsModule,\n PryImportRoutingModule,\n StoreModule.forFeature(importFeatureKey, importReducer),\n EffectsModule.forFeature([ImportEffects]),\n PryCheckboxModule,\n ReactiveFormsModule,\n PryTextEditorModule\n ],\n exports: [PryImportComponent]\n})\nexport class PryImportModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'import', frTranslations);\n this.pryTranslateService.addLangObject('en', 'import', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["fromPipeline.importFeatureKey","i1","i2","i7.PryImportCssComponent","mergeMap","map","i2.ImportService","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,aAAa,GAAG;AAC3B,IAAA,MAAM,EAAE,YAAY,CAClB,sBAAsB,EACtB,KAAK,EAMD,CACL;AACD,IAAA,aAAa,EAAE,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAAgD,CAAC;AACrH,IAAA,aAAa,EAAE,YAAY,CAAC,8BAA8B,EAAE,KAAK,EAAmB,CAAC;CACtF;;ACZM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAOvC,MAAM,kBAAkB,GAAgB;AAC7C,IAAA,OAAO,EAAE,KAAK;CACf,CAAC;AAEK,MAAM,aAAa,GAAG,aAAa,CACxC,kBAAkB,EAClB,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM;AACnC,IAAA,GAAG,KAAK;AACR,IAAA,OAAO,EAAE,IAAI;AACd,CAAA,CAAC,CAAC,EACH,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,MAAM;AAClD,IAAA,GAAG,KAAK;AACR,IAAA,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,MAAM,CAAC,eAAe;CACxC,CAAC,CAAC,CACJ;;ACvBD,MAAM,OAAO,GAAG,qBAAqB,CAA2BA,gBAA6B,CAAC,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vD,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC;wBACzC,iBAAiB;wBACjB,mBAAmB;wBACnB,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA,CAAA;;;AClCD;;AAEG;;;;"}
1
+ {"version":3,"file":"provoly-dashboard-import.mjs","sources":["../../../../projects/provoly/dashboard/import/store/import.actions.ts","../../../../projects/provoly/dashboard/import/store/import.reducer.ts","../../../../projects/provoly/dashboard/import/store/import.selectors.ts","../../../../projects/provoly/dashboard/import/style/css.component.ts","../../../../projects/provoly/dashboard/import/components/import.component.ts","../../../../projects/provoly/dashboard/import/components/import.component.html","../../../../projects/provoly/dashboard/import/i18n/en.translations.ts","../../../../projects/provoly/dashboard/import/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/import/import-routing.module.ts","../../../../projects/provoly/dashboard/import/store/import.service.ts","../../../../projects/provoly/dashboard/import/store/import.effects.ts","../../../../projects/provoly/dashboard/import/import.module.ts","../../../../projects/provoly/dashboard/import/provoly-dashboard-import.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport { DatasetVersion } from '@provoly/dashboard';\n\nexport const ImportActions = {\n upload: createAction(\n '[Import] import data',\n props<{\n file: File;\n dataset: string;\n fileType: string;\n normalizeGeo?: boolean;\n datasetVersionInformation: Partial<DatasetVersion>;\n }>()\n ),\n uploadSuccess: createAction('[Import] import data successful', props<{ uploadedDataset: Partial<DatasetVersion> }>()),\n uploadFailure: createAction('[Import] import data failure', props<{ errors: any }>())\n};\n","import { createReducer, on } from '@ngrx/store';\nimport { ImportActions } from './import.actions';\nimport { DatasetVersion } from '@provoly/dashboard';\n\nexport const importFeatureKey = '@pry/import';\n\nexport interface ImportState {\n loading: boolean;\n uploadedDataset?: Partial<DatasetVersion>;\n}\n\nexport const initialImportState: ImportState = {\n loading: false\n};\n\nexport const importReducer = createReducer(\n initialImportState,\n on(ImportActions.upload, (state) => ({\n ...state,\n loading: true\n })),\n on(ImportActions.uploadSuccess, (state, action) => ({\n ...state,\n loading: false,\n uploadedDataset: action.uploadedDataset\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport * as fromPipeline from './import.reducer';\n\nconst feature = createFeatureSelector<fromPipeline.ImportState>(fromPipeline.importFeatureKey);\n\nconst loading = createSelector(feature, (state) => state.loading);\nconst uploadedDataset = createSelector(feature, (state) => state?.uploadedDataset);\n\nexport const ImportSelectors = {\n loading,\n uploadedDataset\n};\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-import-css',\n template: '',\n styleUrls: ['./_o-import.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryImportCssComponent {}\n","import { Component, OnDestroy } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport {\n Dataset,\n DataSourceActions,\n DataSourceSelectors,\n DataSourceService,\n DateUtils,\n PryDatasetType,\n PryI18nService,\n PrySnackbarService,\n SubscriptionnerDirective\n} from '@provoly/dashboard';\nimport { map, Observable, take } from 'rxjs';\nimport { ImportActions } from '../store/import.actions';\nimport { ImportSelectors } from '../store/import.selectors';\nimport { catchError } from 'rxjs/operators';\n\ntype FileExtension = 'csv' | 'zip';\n\n@Component({\n selector: 'pry-import',\n templateUrl: './import.component.html'\n})\nexport class PryImportComponent extends SubscriptionnerDirective implements OnDestroy {\n datasets$: Observable<Dataset[]>;\n file?: File;\n selectedDataset?: Dataset;\n selectedFileType: FileExtension = 'csv';\n loading$: Observable<boolean>;\n normalizeGeoShape = false;\n fileTypes: { label: string; value: FileExtension }[] = [\n {\n label: 'Csv',\n value: 'csv'\n },\n {\n label: 'Shapefile',\n value: 'zip'\n }\n ];\n\n fileExtension: Record<FileExtension, string> = {\n csv: '.csv',\n zip: '.zip'\n };\n showMessage: boolean = false;\n maxDate = DateUtils.formatDate(new Date());\n productionDate: string = this.maxDate;\n producer: string = '';\n additionalInformation: string = '';\n\n constructor(\n private store: Store,\n private dsService: DataSourceService,\n private snackbar: PrySnackbarService,\n private i18nService: PryI18nService\n ) {\n super();\n store.dispatch(DataSourceActions.dataset.loadDataset());\n this.datasets$ = store\n .select(DataSourceSelectors.datasets)\n .pipe(\n map((datasets) =>\n datasets\n .filter((dataset) => dataset.type === PryDatasetType.CLOSED)\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1))\n )\n );\n this.loading$ = store.select(ImportSelectors.loading);\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.showMessage = false;\n }\n\n uploadedChange($event: File) {\n this.file = $event;\n if ($event.size > 1024 * 1024 * 1024 * 2) {\n this.snackbar.open({\n type: 'error',\n message: this.i18nService.instant('@pry.import.tooLarge', { current: this.getFileSize($event.size) })\n });\n this.file = undefined;\n }\n }\n\n submit() {\n if (this.file && this.selectedDataset && this.selectedFileType) {\n this.store.dispatch(\n ImportActions.upload({\n file: this.file,\n dataset: this.selectedDataset.id,\n fileType: this.selectedFileType,\n normalizeGeo: this.normalizeGeoShape,\n datasetVersionInformation: {\n productionDate: new Date(this.productionDate).toISOString(),\n producer: this.producer,\n additionalInformation: this.additionalInformation.length > 0 ? this.additionalInformation : undefined\n }\n })\n );\n this.showMessage = true;\n this.file = undefined;\n }\n }\n\n isSubmitDisabled() {\n return (\n this.file === undefined ||\n this.selectedDataset === undefined ||\n (this.selectedDataset?.type === PryDatasetType.CLOSED && (this.productionDate === '' || this.producer === '')) ||\n new Date(this.productionDate) > new Date(this.maxDate)\n );\n }\n\n getFileSize(size: number) {\n if (size >= 1024 && size < 1024 * 1024) {\n return `${(size / 1024).toFixed(1)} KB`;\n } else if (size >= 1024 * 1024 && size < 1024 * 1024 * 1024) {\n return `${(size / (1024 * 1024)).toFixed(1)} MB`;\n } else if (size >= 1024 * 1024 * 1024) {\n return `${(size / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n }\n return `${size} bytes`;\n }\n\n onFileTypeChange(fileType: FileExtension) {\n this.selectedFileType = fileType;\n }\n\n getLastActiveVersion($event?: Dataset) {\n if ($event) {\n this.subscriptions.add(\n this.dsService\n .getLastActiveDatasetVersion($event.id)\n .pipe(\n take(1),\n catchError(() => [])\n )\n .subscribe((version) => {\n if (version && version.producer) {\n this.producer = version.producer || '';\n }\n })\n );\n }\n }\n\n productionDateIsInTheFuture() {\n return DateUtils.isInTheFuture(new Date(this.productionDate));\n }\n}\n","<pry-import-css></pry-import-css>\n<div class=\"o-import\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <div class=\"o-import__container\">\n <div class=\"o-import__container__input\">\n <div class=\"m-form-label-field\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n id=\"fileType\"\n [items]=\"fileTypes\"\n [ngModel]=\"fileTypes[0].value\"\n [disabled]=\"false\"\n (ngModelChange)=\"onFileTypeChange($event)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + selectedFileType | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n <div *ngIf=\"file\" class=\"o-import__container__input__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.name }}</h3>\n <span>{{ getFileSize(file.size) }}</span>\n </div>\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileExtension[selectedFileType]\"\n mode=\"files\"\n (uploadedFile)=\"uploadedChange($event)\"\n labelTranslate=\"@pry.import.selectFile\"\n ></pry-upload>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.datasetImport' | i18n }}</label>\n <pry-select\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"selectedDataset\"\n (ngModelChange)=\"getLastActiveVersion($event)\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n ></pry-select>\n </div>\n <pry-checkbox [(ngModel)]=\"normalizeGeoShape\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [(ngModel)]=\"productionDate\"\n id=\"productionDate\"\n />\n @if (productionDateIsInTheFuture()) {\n <label id=\"productionDate-error-required\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n </label>\n } @else if (productionDate === '') {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input class=\"a-form-field\" type=\"text\" maxlength=\"100\" [(ngModel)]=\"producer\" #producerInput />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor [(ngModel)]=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__container__input__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"submit()\" [disabled]=\"isSubmitDisabled()\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"showMessage\">\n <div class=\"o-import__result\">\n <h1>\n {{\n '@pry.import.consultDataset'\n | i18n\n : { parameter: selectedDataset?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }\n }}\n </h1>\n </div>\n </ng-container>\n </div>\n</div>\n","export const enTranslations = {\n '@pry': {\n import: {\n title: 'Import data',\n datasetImport: 'Import in :',\n import: 'Import',\n errorTitle: 'Import failed',\n successTitle: 'Import successful',\n uploadTitlezip: 'Choose a .zip file',\n uploadTitlecsv: 'Choose a .csv file',\n warning: 'File must be under 2GB, or must be imported via directly via APIs.',\n tooLarge: 'File is too large ({{current}} > 2GB), please use APIs to import this file.',\n selectFile: 'Select file',\n importedLines: 'imported lines',\n consultDataset: 'The import is in progress, see the {{ parameter }} dataset page to check its condition',\n errors: 'errors',\n error: 'Error on import: {{msg}}',\n errorCode: {\n 409: 'Import already in progress, please try again later.'\n },\n line: 'Line {{line}}: ',\n withoutLine: 'Global errors: ',\n dataset: 'Dataset',\n fileType: 'Select file type',\n code: {\n UNRECOGNIZED: 'Provided file contains a column \"{{name}}\", which is not present in the chosen dataset',\n FILE_MANDATORY: 'No file was provided',\n NB_ATTRIBUTES:\n 'The number of columns in the file does not match the number of attributes in the chosen dataset',\n CAST: 'Value {{name}} could not be casted to type \"{{type}}\"',\n ELASTIC_SEARCH: 'Elastic Search error: {{elasticError}}'\n },\n normalize: 'Standardize geographic shapes'\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n import: {\n title: 'Import de données',\n datasetImport: 'Importer dans un jeu de données:',\n import: 'Importer',\n errorTitle: \"L'import a échoué\",\n successTitle: 'Import de données réussi',\n uploadTitlezip: 'Choisir un fichier .zip',\n uploadTitlecsv: 'Choisir un fichier .csv',\n warning:\n 'Attention, le fichier ne doit pas dépasser 2GB pour être intégrer via cet écran. Le cas échéant, votre fichier devra être importé via les API',\n tooLarge: 'Fichier trop volumineux ({{current}} > 2GB), veuillez utiliser les API pour importer ces données',\n selectFile: 'Sélectionner un fichier',\n importedLines: 'lignes importée(s)',\n consultDataset: \"L'import est en cours, consultez la page du jeu de données {{parameter}} pour vérifier son état\",\n shapefileState: ' pour vérifier son état',\n error: \"Erreur lors de l'import: {{msg}}\",\n errors: 'erreur(s)',\n errorCode: {\n 409: 'Import déjà en cours, veuillez réessayer plus tard.'\n },\n line: 'Ligne {{line}}: ',\n withoutLine: 'Erreurs globales: ',\n dataset: 'Jeu de données',\n fileType: 'Sélectionner un type de fichier',\n code: {\n UNRECOGNIZED:\n \"Le fichier fourni contient une colonne «\\u00A0{{name}}\\u00A0», qui n'est pas présente dans le jeu de données choisi\",\n FILE_MANDATORY: 'Aucun fichier fourni',\n NB_ATTRIBUTES:\n \"Le nombre des colonnes dans le fichier fourni ne correspond pas au nombre d'attributs dans le jeu de données choisi\",\n CAST: \"La valeur «\\u00A0{{name}}\\u00A0», n'a pas pu être convertie en type «\\u00A0{{type}}\\u00A0»,\",\n ELASTIC_SEARCH: 'Elastic Search stack trace error: {{elasticError}}'\n },\n normalize: 'Normaliser les formes géographiques'\n }\n }\n};\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { PRY_ACCESS_GUARD } from '@provoly/dashboard';\nimport { PryImportComponent } from './components/import.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: PryImportComponent,\n data: {\n access: {\n module: 'dashboard',\n page: 'import'\n }\n },\n canActivate: [PRY_ACCESS_GUARD]\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class PryImportRoutingModule {}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { ConfigSelectors, DatasetVersion } from '@provoly/dashboard';\nimport { mergeMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ImportService {\n constructor(\n private httpClient: HttpClient,\n private store: Store<any>\n ) {}\n\n upload(\n file: File,\n datasetId: string,\n fileType: string,\n normalizeGeo: boolean = false,\n datasetVersionInformation: Partial<DatasetVersion>\n ) {\n const formData = new FormData();\n let mimeType = '';\n\n if (fileType === 'csv') {\n mimeType = 'text/csv';\n } else if (fileType === 'zip') {\n mimeType = 'application/shp';\n }\n formData.append('file', new Blob([file], { type: mimeType }), file.name);\n formData.append('normalizeGeo', normalizeGeo.toString());\n formData.append('datasetVersionInformation', JSON.stringify(datasetVersionInformation));\n\n return this.store.select(ConfigSelectors.dataUrl).pipe(\n mergeMap((url) =>\n this.httpClient.post<Partial<DatasetVersion>>(`${url}/imports/dataset/id/${datasetId}`, formData, {\n headers: new HttpHeaders({ 'File-Content-Type': mimeType })\n })\n )\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { PryI18nService, PrySnackbarService } from '@provoly/dashboard';\nimport { catchError, map, mergeMap } from 'rxjs/operators';\nimport { ImportActions } from './import.actions';\nimport { ImportService } from './import.service';\n\n@Injectable()\nexport class ImportEffects {\n upload$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ImportActions.upload),\n mergeMap((action) =>\n this.service\n .upload(action.file, action.dataset, action.fileType, action.normalizeGeo, action.datasetVersionInformation)\n .pipe(\n map((uploadedDataset) => {\n return ImportActions.uploadSuccess({ uploadedDataset: uploadedDataset });\n }),\n catchError((error: HttpErrorResponse) => {\n if (error.status === 400 || error.status === 500) {\n return [ImportActions.uploadFailure({ errors: error.error.itemErrors })];\n } else if (error.status === 409) {\n this.snackbar.open({\n type: 'error',\n message: this.translateService.instant('@pry.import.errorCode.' + error.status)\n });\n return [ImportActions.uploadFailure({ errors: error.error.itemErrors })];\n }\n this.snackbar.open({\n type: 'error',\n message: this.translateService.instant('@pry.import.error', { msg: error.error.message })\n });\n throw error;\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private service: ImportService,\n private snackbar: PrySnackbarService,\n private translateService: PryI18nService\n ) {}\n}\n","import { CommonModule, DatePipe } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport { PryCoreModule, PryI18nModule, PryI18nService, PryIconModule, PrySelectModule } from '@provoly/dashboard';\nimport { PryImportComponent } from './components/import.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryImportRoutingModule } from './import-routing.module';\nimport { ImportEffects } from './store/import.effects';\nimport { importFeatureKey, importReducer } from './store/import.reducer';\nimport { PryImportCssComponent } from './style/css.component';\nimport {PryCheckboxModule} from \"@provoly/dashboard/components/checkbox\";\nimport { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';\n\n@NgModule({\n providers: [DatePipe],\n declarations: [PryImportComponent, PryImportCssComponent],\n imports: [\n PryCoreModule,\n PrySelectModule,\n PryI18nModule,\n CommonModule,\n PryIconModule,\n FormsModule,\n PryImportRoutingModule,\n StoreModule.forFeature(importFeatureKey, importReducer),\n EffectsModule.forFeature([ImportEffects]),\n PryCheckboxModule,\n ReactiveFormsModule,\n PryTextEditorModule\n ],\n exports: [PryImportComponent]\n})\nexport class PryImportModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'import', frTranslations);\n this.pryTranslateService.addLangObject('en', 'import', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["fromPipeline.importFeatureKey","i1","i2","i7.PryImportCssComponent","mergeMap","map","i2.ImportService","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,aAAa,GAAG;AAC3B,IAAA,MAAM,EAAE,YAAY,CAClB,sBAAsB,EACtB,KAAK,EAMD,CACL;AACD,IAAA,aAAa,EAAE,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAAgD,CAAC;AACrH,IAAA,aAAa,EAAE,YAAY,CAAC,8BAA8B,EAAE,KAAK,EAAmB,CAAC;CACtF;;ACZM,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAOvC,MAAM,kBAAkB,GAAgB;AAC7C,IAAA,OAAO,EAAE,KAAK;CACf,CAAC;AAEK,MAAM,aAAa,GAAG,aAAa,CACxC,kBAAkB,EAClB,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM;AACnC,IAAA,GAAG,KAAK;AACR,IAAA,OAAO,EAAE,IAAI;AACd,CAAA,CAAC,CAA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EAAE,aAAa,CAAC;AACvD,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC;wBACzC,iBAAiB;wBACjB,mBAAmB;wBACnB,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA,CAAA;;;AClCD;;AAEG;;;;"}
@@ -1,17 +1,17 @@
1
1
  import * as i6 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Component, Optional, Input, Output, ViewEncapsulation, TemplateRef, ViewChild, NgModule } from '@angular/core';
4
+ import { EventEmitter, Component, Optional, Input, Output, ViewEncapsulation, TemplateRef, Inject, ViewChild, NgModule } from '@angular/core';
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_DASHBOARD_ICON_URL, LibraryTypes, DashboardGridLayout, DashboardSelectors, DashboardActions, ViewMode, WidgetPlacementUtils, DataSourceSelectors, PryVisibilityType, canManifestBeMadePublic, getCommonDatasourceGroupsForManifest, PryIconModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryShareModule, PryOverlayModule, PryI18nModule } from '@provoly/dashboard';
8
+ import { SubscriptionnerDirective, DEFAULT_DASHBOARD_ICON_URL, LibraryTypes, DashboardGridLayout, DashboardSelectors, DashboardActions, ViewMode, WidgetPlacementUtils, DataSourceSelectors, PryVisibilityType, canManifestBeMadePublic, getCommonDatasourceGroupsForManifest, PRY_ACCESS_TOKEN, PryIconModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryShareModule, PryOverlayModule, PryI18nModule } from '@provoly/dashboard';
9
9
  import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
10
10
  import * as i9 from '@provoly/dashboard/components/sinceDate';
11
11
  import { PrySinceDateModule } from '@provoly/dashboard/components/sinceDate';
12
12
  import * as i5 from '@provoly/dashboard/toolbox';
13
13
  import { PryToolboxModule } from '@provoly/dashboard/toolbox';
14
- import { BehaviorSubject, combineLatest, take, map, startWith } from 'rxjs';
14
+ import { BehaviorSubject, combineLatest, take, map, startWith, of } from 'rxjs';
15
15
  import * as i7 from '@provoly/dashboard/components/metadata-editor';
16
16
  import { MetadataActions, MetadataSelectors, PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';
17
17
  import { v4 } from 'uuid';
@@ -234,7 +234,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
234
234
  set search(query) {
235
235
  this.inputSearch$.next(query);
236
236
  }
237
- constructor(store, overlay, viewContainerRef, router, titleService, activatedRoute, ngZone) {
237
+ constructor(store, overlay, viewContainerRef, router, titleService, activatedRoute, ngZone, access) {
238
238
  super();
239
239
  this.store = store;
240
240
  this.overlay = overlay;
@@ -243,6 +243,7 @@ class PryPresentationComponent extends SubscriptionnerDirective {
243
243
  this.titleService = titleService;
244
244
  this.activatedRoute = activatedRoute;
245
245
  this.ngZone = ngZone;
246
+ this.access = access;
246
247
  this.selectedPresentation$ = new BehaviorSubject(null);
247
248
  this.selectedMode = ViewMode.CATALOG;
248
249
  this.modalOpened = false;
@@ -450,13 +451,21 @@ class PryPresentationComponent extends SubscriptionnerDirective {
450
451
  }
451
452
  }
452
453
  }
453
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", 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 }); }
454
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryPresentationComponent, selector: "pry-presentation", inputs: { editionStartUrl: "editionStartUrl", consultStartUrl: "consultStartUrl", meAsOwner: "meAsOwner", mode: "mode", listOfManifests: "listOfManifests", hideToolbox: "hideToolbox", search: "search" }, 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\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__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 class=\"search-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\n class=\"o-presentation__item\"\n *ngFor=\"let presentation of filteredPresentations$ | async; let index = index\"\n >\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.groups.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.owner\">\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\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\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\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 #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.share' | 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-group-share\n [ngModel]=\"selectedPresentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-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 [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presentation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\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.EllipsisDirective, selector: "[ellipsis]", inputs: ["textElementSelector"] }, { 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.PryGroupShareComponent, selector: "pry-group-share", inputs: ["disableRadios", "allowedGroups"], outputs: ["radioValueChange"] }, { 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.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.AsyncPipe, name: "async" }] }); }
454
+ canModify$(presentation) {
455
+ return !this.access ? of(false) : this.access.canModifyPresentation(presentation);
456
+ }
457
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", 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 }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
458
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryPresentationComponent, selector: "pry-presentation", inputs: { editionStartUrl: "editionStartUrl", consultStartUrl: "consultStartUrl", meAsOwner: "meAsOwner", mode: "mode", listOfManifests: "listOfManifests", hideToolbox: "hideToolbox", search: "search" }, 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\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__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 class=\"search-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\n class=\"o-presentation__item\"\n *ngFor=\"let presentation of filteredPresentations$ | async; let index = index\"\n >\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.groups.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"this.canModify$(presentation) | async\">\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\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\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\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 #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.share' | 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-group-share\n [ngModel]=\"selectedPresentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-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 [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presentation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\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.EllipsisDirective, selector: "[ellipsis]", inputs: ["textElementSelector"] }, { 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.PryGroupShareComponent, selector: "pry-group-share", inputs: ["disableRadios", "allowedGroups"], outputs: ["radioValueChange"] }, { 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.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.AsyncPipe, name: "async" }] }); }
455
459
  }
456
460
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryPresentationComponent, decorators: [{
457
461
  type: Component,
458
- 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\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__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 class=\"search-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\n class=\"o-presentation__item\"\n *ngFor=\"let presentation of filteredPresentations$ | async; let index = index\"\n >\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.groups.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"presentation.owner\">\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\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\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\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 #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.share' | 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-group-share\n [ngModel]=\"selectedPresentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-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 [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presentation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!selectedPresentation.owner\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n" }]
459
- }], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i3.Router }, { type: i4.PryTitleService }, { type: i3.ActivatedRoute }, { type: i0.NgZone }], propDecorators: { templateModalActions: [{
462
+ 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\" [class.-u-hidden]=\"hideToolbox\">\n <button\n class=\"a-btn a-btn--primary\"\n type=\"button\"\n (click)=\"creation()\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'create' }\"\n >\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@pry.presentation.create' | i18n }}\n </button>\n <div>\n <div class=\"o-manifest-layout__toolbox__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 class=\"search-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\n class=\"o-presentation__item\"\n *ngFor=\"let presentation of filteredPresentations$ | async; let index = index\"\n >\n <div class=\"o-presentation__item__header\">\n <ng-container *ngIf=\"presentation.groups.length === 0\">\n <pry-icon\n iconSvg=\"private\"\n class=\"is-private a-tooltip -tooltip-no-wrap\"\n [attr.data-tooltip]=\"'@pry.presentation.private' | i18n\"\n [height]=\"17\"\n [width]=\"17\"\n ></pry-icon>\n </ng-container>\n <div\n class=\"a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <div class=\"o-presentation__item__image\">\n <img alt=\"\" class=\"is-full-width\" [src]=\"presentation.image | getSecuredImage | async\" />\n </div>\n </div>\n <ng-container *ngIf=\"this.canModify$(presentation) | async\">\n <div class=\"more-button\" *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--more a-tooltip -tooltip-no-wrap\"\n [id]=\"'more-button-' + index\"\n [attr.data-tooltip]=\"'@pry.restitution.more' | i18n\"\n (click)=\"$event.stopPropagation(); toggleModalActions(presentation, button)\"\n #button\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\" (click)=\"fetch(presentation)\">\n <div class=\"o-presentation__item__title-container\" ellipsis textElementSelector=\".a-h3\">\n <h3 class=\"a-h3\">{{ presentation.name }}</h3>\n </div>\n <div class=\"o-presentation__item__description-container\" ellipsis textElementSelector=\".a-p\">\n <div class=\"o-presentation__item__description a-p\">\n {{ presentation.description }}\n </div>\n </div>\n <p class=\"a-p -date\">{{ presentation.modificationDate | sinceDate }}</p>\n </div>\n <div\n class=\"o-presentation__item__footer a-tooltip -tooltip-no-wrap\"\n (click)=\"fetch(presentation)\"\n [attr.data-tooltip]=\"'@pry.presentation.view' | i18n\"\n >\n <button class=\"a-btn\">\n {{ '@pry.presentation.consult' | i18n }}\n <pry-icon [width]=\"20\" [height]=\"20\" iconSvg=\"arrow_right\"></pry-icon>\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 #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.share' | 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-group-share\n [ngModel]=\"selectedPresentation.groups\"\n [disableRadios]=\"disableShareRadios$ | async\"\n [allowedGroups]=\"allowedShareGroups$ | async\"\n (ngModelChange)=\"updateAccessGroups($event)\"\n (radioValueChange)=\"updateVisibility($event)\"\n ></pry-group-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 [disabled]=\"disableShareButton$ | async\"\n >\n {{ '@pry.toolbox.manifest.check' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n<ng-template #modalActions>\n <div class=\"m-context-menu\">\n <ul\n class=\"m-context-menu__list\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog presentation options\"\n *ngIf=\"selectedPresentation$ | async as selectedPresentation\"\n >\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"edit(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.edition' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n (click)=\"editContent(selectedPresentation)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'edit' }\"\n >\n {{ '@pry.presentation.editionContent' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n (click)=\"toggleModal(selectedPresentation)\"\n class=\"a-btn -link-like\"\n aria-haspopup=\"dialog\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'share' }\"\n >\n {{ '@pry.presentation.share' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button\n class=\"a-btn -link-like\"\n #openModal\n (click)=\"delete(selectedPresentation.id)\"\n [disabled]=\"!(this.canModify$(selectedPresentation) | async)\"\n *pryAccess=\"{ module: 'dashboard', page: 'manifest', action: 'delete' }\"\n >\n {{ '@pry.presentation.delete' | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n" }]
463
+ }], ctorParameters: () => [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i3.Router }, { type: i4.PryTitleService }, { type: i3.ActivatedRoute }, { type: i0.NgZone }, { type: i4.PryBaseAccess, decorators: [{
464
+ type: Optional
465
+ }, {
466
+ type: Inject,
467
+ args: [PRY_ACCESS_TOKEN]
468
+ }] }], propDecorators: { templateModalActions: [{
460
469
  type: ViewChild,
461
470
  args: ['modalActions', { read: TemplateRef }]
462
471
  }], template: [{