@provoly/dashboard 0.13.1 → 0.13.2

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 (60) hide show
  1. package/admin/admin.module.d.ts +12 -11
  2. package/admin/components/association/association.component.d.ts +9 -0
  3. package/admin/i18n/en.translations.d.ts +10 -0
  4. package/admin/i18n/fr.translations.d.ts +10 -0
  5. package/dataset/components/dataset-detail/dataset-detail.component.d.ts +1 -0
  6. package/dataset/i18n/en.translations.d.ts +19 -1
  7. package/dataset/i18n/fr.translations.d.ts +19 -2
  8. package/dataset/style/_o-pry-dataset-detail.scss +20 -20
  9. package/dataset/style/_o-pry-dataset.scss +8 -1
  10. package/esm2022/admin/admin.module.mjs +6 -3
  11. package/esm2022/admin/components/admin-classes/admin-classes-select/admin-classes-select.component.mjs +4 -3
  12. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.mjs +4 -3
  13. package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +5 -4
  14. package/esm2022/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.mjs +4 -3
  15. package/esm2022/admin/components/association/association.component.mjs +18 -0
  16. package/esm2022/admin/i18n/en.translations.mjs +11 -1
  17. package/esm2022/admin/i18n/fr.translations.mjs +11 -1
  18. package/esm2022/admin/store/admin.service.mjs +5 -5
  19. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +10 -5
  20. package/esm2022/dataset/components/dataset.component.mjs +6 -4
  21. package/esm2022/dataset/i18n/en.translations.mjs +21 -3
  22. package/esm2022/dataset/i18n/fr.translations.mjs +21 -4
  23. package/esm2022/dataset/style/css.component.mjs +2 -2
  24. package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +16 -6
  25. package/esm2022/lib/core/model/dataset.interface.mjs +1 -1
  26. package/esm2022/lib/core/store/data-source/data-source.model.mjs +1 -1
  27. package/esm2022/lib/core/store/field/field.interface.mjs +3 -1
  28. package/esm2022/presentation/components/presentation.component.mjs +3 -3
  29. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +6 -5
  30. package/esm2022/widgets/widget-map/i18n/en.translations.mjs +2 -2
  31. package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +2 -2
  32. package/fesm2022/provoly-dashboard-admin.mjs +51 -15
  33. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  34. package/fesm2022/provoly-dashboard-dataset.mjs +56 -14
  35. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  36. package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
  37. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  38. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +7 -6
  39. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  40. package/fesm2022/provoly-dashboard.mjs +57 -10
  41. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  42. package/lib/core/components/modal-status/modal-status.component.d.ts +10 -1
  43. package/lib/core/model/dataset.interface.d.ts +2 -1
  44. package/lib/core/store/data-source/data-source.model.d.ts +1 -0
  45. package/lib/core/store/field/field.interface.d.ts +3 -1
  46. package/package.json +35 -31
  47. package/schematics/migration.json +10 -0
  48. package/schematics/ng-add/index.spec.js +24 -1
  49. package/schematics/ng-add/index.spec.js.map +1 -1
  50. package/schematics/ng-update/utils/complete.function.d.ts +2 -0
  51. package/schematics/ng-update/utils/complete.function.js +10 -0
  52. package/schematics/ng-update/utils/complete.function.js.map +1 -0
  53. package/schematics/ng-update/version-0-13/index.d.ts +2 -0
  54. package/schematics/ng-update/version-0-13/index.js +30 -0
  55. package/schematics/ng-update/version-0-13/index.js.map +1 -0
  56. package/schematics/ng-update/version-0-13/index.spec.d.ts +1 -0
  57. package/schematics/ng-update/version-0-13/index.spec.js +167 -0
  58. package/schematics/ng-update/version-0-13/index.spec.js.map +1 -0
  59. package/styles/components/_o-panel.scss +46 -0
  60. package/widgets/widget-map/component/widget-map.component.d.ts +1 -1
@@ -2114,12 +2114,30 @@ const enTranslations = {
2114
2114
  ACTIVE: 'Invalidate',
2115
2115
  INACTIVE: 'Validate',
2116
2116
  ERROR: 'Consult errors',
2117
+ WARNING: 'Consult warnings',
2117
2118
  LOADING: '',
2118
2119
  INDEXING: ''
2119
2120
  },
2120
2121
  error: {
2121
- title: 'List of errors',
2122
- close: 'Close'
2122
+ type: 'Type',
2123
+ elements: 'Elements',
2124
+ message: 'Message',
2125
+ close: 'Fermer',
2126
+ modalTitle: {
2127
+ ERROR: 'List of errors',
2128
+ WARNING: 'List of warnings'
2129
+ },
2130
+ level: {
2131
+ ERROR: 'Error',
2132
+ WARNING: 'Warning'
2133
+ },
2134
+ code: {
2135
+ UNRECOGNIZED: 'Unrecognized attribute {{name}}',
2136
+ FORMAT: 'Wrong format for attribute {{name}}',
2137
+ ELASTIC_SEARCH: 'Insertion error for element {{recordId}}',
2138
+ NO_VALUES: 'No value for {{recordId}} line',
2139
+ FORMAT_FILE_ERROR: 'Unsupported file format'
2140
+ }
2123
2141
  }
2124
2142
  }
2125
2143
  }
@@ -2152,15 +2170,32 @@ const frTranslations = {
2152
2170
  ACTIVE: 'Invalider',
2153
2171
  INACTIVE: 'Valider',
2154
2172
  ERROR: 'Consulter erreurs',
2173
+ WARNING: 'Consulter warnings',
2155
2174
  LOADING: '',
2156
2175
  INDEXING: ''
2157
2176
  },
2158
2177
  error: {
2159
- title: 'Liste des erreurs',
2160
- code: 'Code',
2178
+ ERROR: 'Erreur',
2179
+ WARNING: 'Warning',
2180
+ type: 'Type',
2161
2181
  elements: 'Elements',
2162
2182
  message: 'Message',
2163
- close: 'Fermer'
2183
+ close: 'Fermer',
2184
+ modalTitle: {
2185
+ ERROR: 'Liste des erreurs',
2186
+ WARNING: 'Liste des warnings'
2187
+ },
2188
+ level: {
2189
+ ERROR: 'Erreur',
2190
+ WARNING: 'Warning'
2191
+ },
2192
+ code: {
2193
+ UNRECOGNIZED: 'Attribut {{name}} non reconnu',
2194
+ FORMAT: "Format d'attribut {{name}} incorrect",
2195
+ ELASTIC_SEARCH: "Erreur d'insertion pour l'élément {{recordId}}",
2196
+ NO_VALUES: 'Pas de valeur pour la ligne {{recordId}}',
2197
+ FORMAT_FILE_ERROR: "Le format du fichier transmis n'est pas géré"
2198
+ }
2164
2199
  }
2165
2200
  }
2166
2201
  }
@@ -2434,9 +2469,10 @@ class PryModalStatusComponent {
2434
2469
  this.store.dispatch(DataSourceActions.dataset.previews.getById({ id: version.id }));
2435
2470
  this.datasetPreviews$ = this.store
2436
2471
  .select(DataSourceSelectors.datasetPreviews)
2437
- .pipe(map((previews) => previews
2438
- .map((preview) => preview.messages.map((message) => ({ ...message, level: preview.level, count: preview.count })))
2439
- .flat()));
2472
+ .pipe(map((previews) => previews.map((preview) => preview.messages.map((message) => ({ ...message, count: preview.count }))).flat()));
2473
+ this.messageCount$ = this.datasetPreviews$.pipe(map((previews) => {
2474
+ return previews.map((preview) => preview.count).reduce((p, c) => p + c, 0);
2475
+ }));
2440
2476
  }
2441
2477
  }
2442
2478
  constructor(store) {
@@ -2446,12 +2482,21 @@ class PryModalStatusComponent {
2446
2482
  goBack() {
2447
2483
  this.gotoConsult.emit(this.version);
2448
2484
  }
2485
+ getModalTitle() {
2486
+ if (this._version?.state !== 'ERROR' && this._version?.hasWarnings) {
2487
+ return 'WARNING';
2488
+ }
2489
+ return 'ERROR';
2490
+ }
2491
+ getErrorCodeParam(code, name, recordId) {
2492
+ return code === 'UNRECOGNIZED' || code === 'CAST' ? { name } : { recordId };
2493
+ }
2449
2494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryModalStatusComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
2450
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryModalStatusComponent, selector: "pry-modal-status", inputs: { version: "version" }, outputs: { gotoConsult: "gotoConsult" }, ngImport: i0, template: "<div class=\"o-modal-wrapper\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">{{ '@pry.dataset.error.title' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\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 <table class=\"a-table\">\n <thead>\n <tr>\n <th>Type</th>\n <th>{{ '@pry.dataset.error.code' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ preview.level }}\n </td>\n <td>\n {{ preview.extractErrorCode }}\n </td>\n <td>\n {{ preview.count }}\n </td>\n <td>\n {{ preview.name }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.SlicePipe, name: "slice" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
2495
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryModalStatusComponent, selector: "pry-modal-status", inputs: { version: "version" }, outputs: { gotoConsult: "gotoConsult" }, ngImport: i0, template: "<div class=\"o-modal-wrapper\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.dataset.error.modalTitle.' + getModalTitle() | i18n }} ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\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 <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractErrorCode\n | i18n : getErrorCodeParam(preview.extractErrorCode, preview.name, preview.recordId)\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.SlicePipe, name: "slice" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
2451
2496
  }
2452
2497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryModalStatusComponent, decorators: [{
2453
2498
  type: Component,
2454
- args: [{ selector: 'pry-modal-status', template: "<div class=\"o-modal-wrapper\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">{{ '@pry.dataset.error.title' | i18n }}</h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\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 <table class=\"a-table\">\n <thead>\n <tr>\n <th>Type</th>\n <th>{{ '@pry.dataset.error.code' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ preview.level }}\n </td>\n <td>\n {{ preview.extractErrorCode }}\n </td>\n <td>\n {{ preview.count }}\n </td>\n <td>\n {{ preview.name }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
2499
+ args: [{ selector: 'pry-modal-status', template: "<div class=\"o-modal-wrapper\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.dataset.error.modalTitle.' + getModalTitle() | i18n }} ({{ messageCount$ | async }})\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"goBack()\">\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 <table class=\"a-table\">\n <thead>\n <tr>\n <th>{{ '@pry.dataset.error.type' | i18n }}</th>\n <th>{{ '@pry.dataset.error.elements' | i18n }}</th>\n <th>{{ '@pry.dataset.error.message' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let preview of datasetPreviews$ | async | slice : 0 : 5\">\n <td>\n {{ '@pry.dataset.error.level.' + preview.level | i18n }}\n </td>\n <td>\n {{ preview.recordId }}\n </td>\n <td>\n {{\n '@pry.dataset.error.code.' + preview.extractErrorCode\n | i18n : getErrorCodeParam(preview.extractErrorCode, preview.name, preview.recordId)\n }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
2455
2500
  }], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { gotoConsult: [{
2456
2501
  type: Output
2457
2502
  }], version: [{
@@ -4351,6 +4396,8 @@ var FieldType;
4351
4396
  FieldType["POLYGON"] = "Polygon";
4352
4397
  FieldType["MULTIPOLYGON"] = "MultiPolygon";
4353
4398
  FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
4399
+ FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
4400
+ FieldType["DATASET"] = "test";
4354
4401
  })(FieldType || (FieldType = {}));
4355
4402
 
4356
4403
  const hiddenFieldText = '*********';