@provoly/dashboard 1.3.8 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.d.ts +5 -2
- package/admin/components/admin-fields/admin-fields-form/admin-fields-form.component.d.ts +47 -18
- package/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.d.ts +6 -2
- package/admin/components/admin-fields/admin-fields.component.d.ts +4 -1
- package/admin/components/admin-fields/store/admin-fields.model.d.ts +1 -1
- package/admin/components/admin-fields/store/fields.actions.d.ts +19 -12
- package/admin/components/admin-fields/store/fields.effects.d.ts +16 -3
- package/admin/i18n/en.translations.d.ts +33 -14
- package/admin/i18n/fr.translations.d.ts +33 -14
- package/components/checkbox/checkbox.component.d.ts +4 -2
- package/components/data-format/data-format.pipe.d.ts +11 -1
- package/components/paginator/index.d.ts +5 -0
- package/components/paginator/paginator.component.d.ts +19 -0
- package/components/paginator/paginator.module.d.ts +10 -0
- package/components/paginator/public-api.d.ts +3 -0
- package/components/paginator/style/_o-pry-paginator.scss +11 -0
- package/components/paginator/style/css.component.d.ts +5 -0
- package/dataset/components/dataset-detail/dataset-detail.component.d.ts +5 -8
- package/dataset/dataset.module.d.ts +1 -1
- package/dataset/i18n/en.translations.d.ts +0 -12
- package/dataset/i18n/fr.translations.d.ts +0 -12
- package/esm2022/admin/components/admin-abac-rules/components/attribute-condition/attribute-condition.component.mjs +4 -6
- package/esm2022/admin/components/admin-classes/admin-classes-customize/symbol/admin-classes-customize-symbol.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +10 -12
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +6 -5
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +2 -2
- package/esm2022/admin/components/admin-fields/admin-fields-form/admin-fields-form.component.mjs +142 -63
- package/esm2022/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.mjs +7 -8
- package/esm2022/admin/components/admin-fields/admin-fields.component.mjs +15 -11
- package/esm2022/admin/components/admin-fields/store/admin-fields.model.mjs +1 -1
- package/esm2022/admin/components/admin-fields/store/fields.actions.mjs +6 -5
- package/esm2022/admin/components/admin-fields/store/fields.effects.mjs +12 -6
- package/esm2022/admin/i18n/en.translations.mjs +34 -15
- package/esm2022/admin/i18n/fr.translations.mjs +34 -15
- package/esm2022/components/checkbox/checkbox.component.mjs +15 -7
- package/esm2022/components/data-format/data-format.pipe.mjs +88 -7
- package/esm2022/components/paginator/paginator.component.mjs +51 -0
- package/esm2022/components/paginator/paginator.module.mjs +20 -0
- package/esm2022/components/paginator/provoly-dashboard-components-paginator.mjs +5 -0
- package/esm2022/components/paginator/public-api.mjs +4 -0
- package/esm2022/components/paginator/style/css.component.mjs +11 -0
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +16 -26
- package/esm2022/dataset/dataset.module.mjs +2 -5
- package/esm2022/dataset/i18n/en.translations.mjs +1 -13
- package/esm2022/dataset/i18n/fr.translations.mjs +2 -14
- package/esm2022/import/components/form/import-form.component.mjs +174 -0
- package/esm2022/import/components/list/import-list.component.mjs +81 -0
- package/esm2022/import/components/version-modal/version-modal.component.mjs +26 -0
- package/esm2022/import/i18n/en.translations.mjs +16 -2
- package/esm2022/import/i18n/fr.translations.mjs +16 -2
- package/esm2022/import/import-routing.module.mjs +3 -3
- package/esm2022/import/import.module.mjs +25 -10
- package/esm2022/import/public-api.mjs +4 -2
- package/esm2022/import/style/css.component.mjs +2 -2
- package/esm2022/lib/core/components/select/select.component.mjs +3 -3
- package/esm2022/lib/core/components/share/legacy-share/share.component.mjs +8 -8
- package/esm2022/lib/core/components/status-modal/status-modal.component.mjs +48 -0
- package/esm2022/lib/core/components/{modal-status/modal-status.module.mjs → status-modal/status-modal.module.mjs} +9 -9
- package/esm2022/lib/core/core.module.mjs +5 -5
- package/esm2022/lib/core/i18n/en.translations.mjs +35 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +37 -2
- package/esm2022/lib/core/model/admin-api.model.mjs +5 -69
- package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget-table-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +3 -3
- package/esm2022/lib/core/store/class/class.interface.mjs +1 -1
- package/esm2022/lib/core/store/class/class.selectors.mjs +2 -2
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +3 -3
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +7 -4
- package/esm2022/lib/core/store/data-source/data-source.model.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.reducer.mjs +5 -3
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +3 -11
- package/esm2022/lib/core/store/data-source/data-source.service.mjs +23 -5
- package/esm2022/lib/core/store/field/field.interface.mjs +1 -3
- package/esm2022/lib/core/store/field/field.service.mjs +7 -2
- package/esm2022/lib/dashboard/components/context-menu/object-edition/object-edition.component.mjs +3 -3
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-card/datasource-card.component.mjs +3 -11
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-list/datasource-list.component.mjs +2 -2
- package/esm2022/lib/dashboard/item-utils.mjs +5 -5
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -4
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +1 -19
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +1 -26
- package/esm2022/lib/dashboard/tooltip/components/default/default.tooltip.component.mjs +3 -3
- package/esm2022/lib/dashboard/tooltip/tooltip-factory.service.mjs +3 -2
- package/esm2022/search/search-mono-class/components/search-condition/search-condition.component.mjs +4 -4
- package/esm2022/search/search-mono-class/components/search-order/search-order.component.mjs +3 -3
- package/esm2022/search/search-mono-class/components/search-select-attribute/search-select-attribute.component.mjs +4 -5
- package/esm2022/search/search-mono-class/store/search-mono-class.effects.mjs +2 -2
- package/esm2022/search/search-mono-class/store/search-mono-class.service.mjs +5 -6
- package/esm2022/search/search-multi-class/store/search-multi-class.service.mjs +4 -4
- package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +3 -3
- package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +17 -19
- package/esm2022/tooltips/attribute/attribute-tooltip.module.mjs +5 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +59 -38
- package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +4 -16
- package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +9 -9
- package/esm2022/widgets/widget-detail/component/widget-detail.component.mjs +5 -5
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +30 -32
- package/esm2022/widgets/widget-map/pipe/widget-map-geometry-fields-for.pipe.mjs +2 -5
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +2 -2
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +6 -10
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +18 -14
- package/esm2022/widgets/widget-table/expand-value/expand-value.component.mjs +9 -5
- package/esm2022/widgets/widget-table/get-value/get-value.pipe.mjs +2 -2
- package/esm2022/widgets/widget-table/public-api.mjs +1 -2
- package/esm2022/widgets/widget-table/widget-table.module.mjs +12 -7
- package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +10 -15
- package/esm2022/widgets/widget-tile/widget-tile.module.mjs +8 -4
- package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +249 -126
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-checkbox.mjs +14 -6
- package/fesm2022/provoly-dashboard-components-checkbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-data-format.mjs +88 -7
- package/fesm2022/provoly-dashboard-components-data-format.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-paginator.mjs +82 -0
- package/fesm2022/provoly-dashboard-components-paginator.mjs.map +1 -0
- package/fesm2022/provoly-dashboard-dataset.mjs +21 -58
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +257 -116
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-search.mjs +15 -16
- package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +2 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +20 -21
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +58 -37
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +3 -15
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +9 -9
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +36 -45
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +32 -38
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +16 -17
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +278 -330
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/components/{import.component.d.ts → form/import-form.component.d.ts} +8 -4
- package/import/components/list/import-list.component.d.ts +44 -0
- package/import/components/version-modal/version-modal.component.d.ts +13 -0
- package/import/i18n/en.translations.d.ts +14 -0
- package/import/i18n/fr.translations.d.ts +14 -0
- package/import/import.module.d.ts +13 -10
- package/import/public-api.d.ts +3 -1
- package/import/style/_o-import.scss +56 -6
- package/lib/core/components/share/legacy-share/share.component.d.ts +1 -1
- package/lib/core/components/{modal-status/modal-status.component.d.ts → status-modal/status-modal.component.d.ts} +10 -6
- package/lib/core/components/{modal-status/modal-status.module.d.ts → status-modal/status-modal.module.d.ts} +5 -5
- package/lib/core/core.module.d.ts +2 -2
- package/lib/core/i18n/en.translations.d.ts +33 -0
- package/lib/core/i18n/fr.translations.d.ts +35 -0
- package/lib/core/model/admin-api.model.d.ts +6 -8
- package/lib/core/model/widget-analytic-manifest.interface.d.ts +0 -3
- package/lib/core/model/widget-table-manifest.interface.d.ts +2 -0
- package/lib/core/public-api.d.ts +2 -2
- package/lib/core/store/class/class.interface.d.ts +2 -1
- package/lib/core/store/class/class.selectors.d.ts +10 -10
- package/lib/core/store/data-source/data-source.actions.d.ts +21 -1
- package/lib/core/store/data-source/data-source.effects.d.ts +11 -1
- package/lib/core/store/data-source/data-source.model.d.ts +3 -2
- package/lib/core/store/data-source/data-source.reducer.d.ts +1 -0
- package/lib/core/store/data-source/data-source.selectors.d.ts +3 -3
- package/lib/core/store/data-source/data-source.service.d.ts +11 -2
- package/lib/core/store/field/field.interface.d.ts +8 -4
- package/lib/core/store/field/field.service.d.ts +1 -0
- package/lib/dashboard/components/context-menu/object-edition/object-edition.component.d.ts +1 -1
- package/lib/dashboard/components/widgets/datasource-selector/datasource-card/datasource-card.component.d.ts +3 -7
- package/lib/dashboard/item-utils.d.ts +1 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +0 -11
- package/lib/dashboard/store/dashboard.effects.d.ts +0 -3
- package/lib/dashboard/tooltip/tooltip-factory.service.d.ts +2 -1
- package/package.json +61 -55
- package/styles/base/_utils.scss +9 -1
- package/styles/components/_a-btn.scss +7 -0
- package/styles/components/_a-table.scss +2 -16
- package/styles/layout/_o-workspace.scss +1 -0
- package/tooltips/attribute/attribute-tooltip.component.d.ts +6 -6
- package/tooltips/attribute/attribute-tooltip.module.d.ts +2 -1
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +16 -3
- package/widgets/widget-analytic/component/widget-analytic.component.d.ts +2 -3
- package/widgets/widget-detail/component/widget-detail.component.d.ts +1 -4
- package/widgets/widget-table/component/widget-table.component.d.ts +1 -0
- package/widgets/widget-table/expand-value/expand-value.component.d.ts +4 -2
- package/widgets/widget-table/public-api.d.ts +0 -1
- package/widgets/widget-table/widget-table.module.d.ts +9 -8
- package/widgets/widget-tile/component/widget-tile.component.d.ts +1 -0
- package/widgets/widget-tile/widget-tile.module.d.ts +2 -1
- package/esm2022/import/components/import.component.mjs +0 -167
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +0 -45
- package/esm2022/widgets/widget-table/expand-value/format-number.pipe.mjs +0 -24
- package/widgets/widget-table/expand-value/format-number.pipe.d.ts +0 -10
|
@@ -1,25 +1,131 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i6 from '@angular/common';
|
|
2
2
|
import { CommonModule, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ViewEncapsulation, ViewChild, NgModule, Injectable } from '@angular/core';
|
|
4
|
+
import { Component, ViewEncapsulation, EventEmitter, ViewChild, Output, NgModule, Injectable, Inject, signal, input } from '@angular/core';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
6
6
|
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as i1$
|
|
7
|
+
import * as i1$3 from '@ngrx/effects';
|
|
8
8
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i1 from '@ngrx/store';
|
|
10
10
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
11
|
-
import * as i2
|
|
12
|
-
import { SubscriptionnerDirective, DateUtils, PryDatasetType, DataSourceActions, DataSourceSelectors, PRY_ACCESS_GUARD, ConfigSelectors, PryCoreModule, PrySelectModule, PryI18nModule, PryIconModule } from '@provoly/dashboard';
|
|
11
|
+
import * as i2 from '@provoly/dashboard';
|
|
12
|
+
import { SubscriptionnerDirective, DateUtils, PryDatasetType, DataSourceActions, DataSourceSelectors, PRY_ACCESS_GUARD, ConfigSelectors, PRY_DIALOG_DATA, PryStatusModalComponent, PryCoreModule, PrySelectModule, PryI18nModule, PryIconModule, PryDatePickerModule, PrySinceDateModule, PrySortModule } from '@provoly/dashboard';
|
|
13
|
+
import * as i1$1 from '@angular/router';
|
|
14
|
+
import { RouterModule } from '@angular/router';
|
|
13
15
|
import { map, take, mergeMap } from 'rxjs';
|
|
14
|
-
import { withLatestFrom, mergeMap as mergeMap$1, map as map$1, catchError } from 'rxjs/operators';
|
|
15
16
|
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
16
17
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
17
18
|
import * as i5 from '@provoly/dashboard/components/text-editor';
|
|
18
19
|
import { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import * as i1$1 from '@angular/common/http';
|
|
20
|
+
import { mergeMap as mergeMap$1, map as map$1, catchError } from 'rxjs/operators';
|
|
21
|
+
import * as i1$2 from '@angular/common/http';
|
|
22
22
|
import { HttpHeaders } from '@angular/common/http';
|
|
23
|
+
import { GlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
24
|
+
import * as i4$1 from '@provoly/dashboard/components/paginator';
|
|
25
|
+
import { PryPaginatorModule } from '@provoly/dashboard/components/paginator';
|
|
26
|
+
|
|
27
|
+
const enTranslations = {
|
|
28
|
+
'@pry': {
|
|
29
|
+
importList: {
|
|
30
|
+
title: 'List of imported data',
|
|
31
|
+
filter: {
|
|
32
|
+
dsName: 'Name',
|
|
33
|
+
status: 'Import status',
|
|
34
|
+
date: 'Import date'
|
|
35
|
+
},
|
|
36
|
+
dsName: 'Name',
|
|
37
|
+
date: 'Date of creation',
|
|
38
|
+
number: 'Version number',
|
|
39
|
+
status: 'Version status',
|
|
40
|
+
actions: 'Actions'
|
|
41
|
+
},
|
|
42
|
+
import: {
|
|
43
|
+
title: 'Import data',
|
|
44
|
+
datasetImport: 'Import in :',
|
|
45
|
+
import: 'Import',
|
|
46
|
+
errorTitle: 'Import failed',
|
|
47
|
+
successTitle: 'Import successful',
|
|
48
|
+
uploadTitlezip: 'Choose a .zip file',
|
|
49
|
+
uploadTitlecsv: 'Choose a .csv file',
|
|
50
|
+
warning: 'File must be under 2GB, or must be imported via directly via APIs.',
|
|
51
|
+
tooLarge: 'File is too large ({{current}} > 2GB), please use APIs to import this file.',
|
|
52
|
+
selectFile: 'Select file',
|
|
53
|
+
importedLines: 'imported lines',
|
|
54
|
+
consultDataset1: 'The import is in progress, see the ',
|
|
55
|
+
consultDataset2: ' dataset page to check its condition',
|
|
56
|
+
errors: 'errors',
|
|
57
|
+
error: 'Error on import: {{msg}}',
|
|
58
|
+
errorCode: {
|
|
59
|
+
409: 'Import already in progress, please try again later.'
|
|
60
|
+
},
|
|
61
|
+
line: 'Line {{line}}: ',
|
|
62
|
+
withoutLine: 'Global errors: ',
|
|
63
|
+
dataset: 'Dataset',
|
|
64
|
+
fileType: 'Select file type',
|
|
65
|
+
code: {
|
|
66
|
+
UNRECOGNIZED: 'Provided file contains a column "{{name}}", which is not present in the chosen dataset',
|
|
67
|
+
FILE_MANDATORY: 'No file was provided',
|
|
68
|
+
NO_ATTRIBUTES: 'No corresponding attribute found in uploaded file',
|
|
69
|
+
FORMAT: '"{{name}}": "{{receivedValue}}" could not be converted to type "{{type}}"',
|
|
70
|
+
STORAGE: 'Storage stack trace error: {{elasticError}}'
|
|
71
|
+
},
|
|
72
|
+
normalize: 'Standardize geographic shapes',
|
|
73
|
+
multiple: 'Upload multiple files'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const frTranslations = {
|
|
79
|
+
'@pry': {
|
|
80
|
+
importList: {
|
|
81
|
+
title: 'Liste des données intégrées',
|
|
82
|
+
filter: {
|
|
83
|
+
dsName: 'Nom',
|
|
84
|
+
status: 'Status import',
|
|
85
|
+
date: 'Date import'
|
|
86
|
+
},
|
|
87
|
+
dsName: 'Nom',
|
|
88
|
+
date: 'Date de création de la version',
|
|
89
|
+
number: 'N° Version',
|
|
90
|
+
status: 'Status de version',
|
|
91
|
+
actions: 'Actions'
|
|
92
|
+
},
|
|
93
|
+
import: {
|
|
94
|
+
title: 'Import de données',
|
|
95
|
+
datasetImport: 'Importer dans un jeu de données:',
|
|
96
|
+
import: 'Importer',
|
|
97
|
+
errorTitle: "L'import a échoué",
|
|
98
|
+
successTitle: 'Import de données réussi',
|
|
99
|
+
uploadTitlezip: 'Choisir un fichier .zip',
|
|
100
|
+
uploadTitlecsv: 'Choisir un fichier .csv',
|
|
101
|
+
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',
|
|
102
|
+
tooLarge: 'Fichier trop volumineux ({{current}} > 2GB), veuillez utiliser les API pour importer ces données',
|
|
103
|
+
selectFile: 'Sélectionner un fichier',
|
|
104
|
+
importedLines: 'lignes importée(s)',
|
|
105
|
+
consultDataset1: "L'import est en cours, consultez la page du jeu de données ",
|
|
106
|
+
consultDataset2: ' pour vérifier son état',
|
|
107
|
+
shapefileState: ' pour vérifier son état',
|
|
108
|
+
error: "Erreur lors de l'import: {{msg}}",
|
|
109
|
+
errors: 'erreur(s)',
|
|
110
|
+
errorCode: {
|
|
111
|
+
409: 'Import déjà en cours, veuillez réessayer plus tard.'
|
|
112
|
+
},
|
|
113
|
+
line: 'Ligne {{line}}: ',
|
|
114
|
+
withoutLine: 'Erreurs globales: ',
|
|
115
|
+
dataset: 'Jeu de données',
|
|
116
|
+
fileType: 'Sélectionner un type de fichier',
|
|
117
|
+
code: {
|
|
118
|
+
UNRECOGNIZED: "Le fichier fourni contient une colonne «\u00A0{{name}}\u00A0», qui n'est pas présente dans le jeu de données choisi",
|
|
119
|
+
FILE_MANDATORY: 'Aucun fichier fourni',
|
|
120
|
+
NO_ATTRIBUTES: "Aucun attribut correspondant n'a été trouvé dans le fichier fourni",
|
|
121
|
+
FORMAT: "«\u00A0{{name}}\u00A0»: «\u00A0{{receivedValue}}\u00A0» n'a pas pu être convertie en type «\u00A0{{type}}\u00A0»",
|
|
122
|
+
STORAGE: 'Storage stack trace error: {{elasticError}}'
|
|
123
|
+
},
|
|
124
|
+
normalize: 'Normaliser les formes géographiques',
|
|
125
|
+
multiple: 'Import multiple'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
23
129
|
|
|
24
130
|
const ImportActions = {
|
|
25
131
|
upload: createAction('[Import] import data', props()),
|
|
@@ -50,14 +156,14 @@ const ImportSelectors = {
|
|
|
50
156
|
|
|
51
157
|
class PryImportCssComponent {
|
|
52
158
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryImportCssComponent, selector: "pry-import-css", ngImport: i0, template: '', isInline: true, styles: [".
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryImportCssComponent, selector: "pry-import-css", ngImport: i0, template: '', isInline: true, styles: [".m-version-modal__list{margin:0;padding:0}.m-version-modal__list li{list-style:none}.o-import{overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-import__header,.o-import__form-container{width:50%}.o-import .u-display-flex{gap:4.6875rem}.o-import .o-file-input{min-height:4.6875rem}.o-import__file{text-align:center}.o-import__actions{margin-top:3.125rem}.o-import__message{padding:.9375rem;background-color:#ecedf4;border-radius:.625rem;overflow-y:auto;height:fit-content}.o-import .a-pry-select__content{flex:1}.o-import-list{height:100%}.o-import-list .a-h1{padding:0}.o-import-list .warning{color:#fc5640}.o-import-list .m-filter__input-wrapper{height:2.5rem}.o-import-list .m-filter__date-input-separator{line-height:0}.o-import-list .a-table tbody td.-cell-with-icon{margin:0;padding:1.25rem;height:100%}.o-import-list__content{overflow:auto}.o-import-list__state-filter pry-select{min-width:9.375rem}.m-version-modal{background-color:#fff;max-width:23.75rem;max-height:37.5rem;padding:0 1.25rem 1.25rem .625rem;box-shadow:0 4px 4px #00000040}.m-version-modal__list{overflow:auto}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
54
160
|
}
|
|
55
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportCssComponent, decorators: [{
|
|
56
162
|
type: Component,
|
|
57
|
-
args: [{ selector: 'pry-import-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".
|
|
163
|
+
args: [{ selector: 'pry-import-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".m-version-modal__list{margin:0;padding:0}.m-version-modal__list li{list-style:none}.o-import{overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-import__header,.o-import__form-container{width:50%}.o-import .u-display-flex{gap:4.6875rem}.o-import .o-file-input{min-height:4.6875rem}.o-import__file{text-align:center}.o-import__actions{margin-top:3.125rem}.o-import__message{padding:.9375rem;background-color:#ecedf4;border-radius:.625rem;overflow-y:auto;height:fit-content}.o-import .a-pry-select__content{flex:1}.o-import-list{height:100%}.o-import-list .a-h1{padding:0}.o-import-list .warning{color:#fc5640}.o-import-list .m-filter__input-wrapper{height:2.5rem}.o-import-list .m-filter__date-input-separator{line-height:0}.o-import-list .a-table tbody td.-cell-with-icon{margin:0;padding:1.25rem;height:100%}.o-import-list__content{overflow:auto}.o-import-list__state-filter pry-select{min-width:9.375rem}.m-version-modal{background-color:#fff;max-width:23.75rem;max-height:37.5rem;padding:0 1.25rem 1.25rem .625rem;box-shadow:0 4px 4px #00000040}.m-version-modal__list{overflow:auto}\n"] }]
|
|
58
164
|
}] });
|
|
59
165
|
|
|
60
|
-
class
|
|
166
|
+
class PryImportFormComponent extends SubscriptionnerDirective {
|
|
61
167
|
constructor(store, dsService, snackbar, i18nService) {
|
|
62
168
|
super();
|
|
63
169
|
this.store = store;
|
|
@@ -96,23 +202,22 @@ class PryImportComponent extends SubscriptionnerDirective {
|
|
|
96
202
|
extension: '.zip'
|
|
97
203
|
}
|
|
98
204
|
};
|
|
205
|
+
this.multipleImports = false;
|
|
206
|
+
this.multipleImportsValue = new EventEmitter();
|
|
207
|
+
this.formSubmitted = new EventEmitter();
|
|
99
208
|
this.Object = Object;
|
|
100
209
|
this.PryDatasetType = PryDatasetType;
|
|
101
210
|
store.dispatch(DataSourceActions.dataset.loadDataset());
|
|
102
|
-
this.store.dispatch(DataSourceActions.dataset.listVersions());
|
|
211
|
+
this.store.dispatch(DataSourceActions.dataset.listVersions({}));
|
|
103
212
|
this.datasets$ = store
|
|
104
213
|
.select(DataSourceSelectors.datasets)
|
|
105
214
|
.pipe(map((datasets) => datasets
|
|
106
215
|
.filter((dataset) => dataset.type === PryDatasetType.CLOSED)
|
|
107
216
|
.sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1))));
|
|
108
217
|
this.loading$ = store.select(ImportSelectors.loading);
|
|
109
|
-
this.subscriptions.add(this.form
|
|
110
|
-
.get('dataset')
|
|
111
|
-
?.valueChanges.pipe(withLatestFrom(this.store.select(DataSourceSelectors.datasetVersions)))
|
|
112
|
-
.subscribe(([dataset, versions]) => {
|
|
218
|
+
this.subscriptions.add(this.form.get('dataset')?.valueChanges.subscribe((dataset) => {
|
|
113
219
|
this.clearMessage();
|
|
114
|
-
if (dataset &&
|
|
115
|
-
versions.some((version) => version.dataset === dataset.id && (version.state === 'ACTIVE' || version.state === 'INDEXING'))) {
|
|
220
|
+
if (dataset && dataset.activeVersion) {
|
|
116
221
|
this.getLastActiveVersion(dataset);
|
|
117
222
|
}
|
|
118
223
|
else {
|
|
@@ -171,6 +276,7 @@ class PryImportComponent extends SubscriptionnerDirective {
|
|
|
171
276
|
this.showMessage = true;
|
|
172
277
|
setTimeout(() => this.message.nativeElement.scrollIntoView({ behavior: 'smooth' }));
|
|
173
278
|
this.form.patchValue({ file: null });
|
|
279
|
+
this.formSubmitted.emit();
|
|
174
280
|
}
|
|
175
281
|
}
|
|
176
282
|
getFileSize(size) {
|
|
@@ -198,96 +304,29 @@ class PryImportComponent extends SubscriptionnerDirective {
|
|
|
198
304
|
if (this.showMessage)
|
|
199
305
|
this.showMessage = false;
|
|
200
306
|
}
|
|
201
|
-
|
|
202
|
-
|
|
307
|
+
multipleImportChange() {
|
|
308
|
+
this.multipleImports = !this.multipleImports;
|
|
309
|
+
this.multipleImportsValue.emit(this.multipleImports);
|
|
310
|
+
}
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportFormComponent, deps: [{ token: i1.Store }, { token: i2.DataSourceService }, { token: i2.PrySnackbarService }, { token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryImportFormComponent, selector: "pry-import-form", outputs: { multipleImportsValue: "multipleImportsValue", formSubmitted: "formSubmitted" }, viewQueries: [{ propertyName: "message", first: true, predicate: ["message"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-import-css></pry-import-css>\n<div class=\"o-import u-display-flex -column\">\n <div class=\"o-import__header u-display-flex -justify-space-between\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <pry-checkbox [ngModel]=\"multipleImports\" (click)=\"multipleImportChange()\">\n {{ '@pry.import.multiple' | i18n }}\n </pry-checkbox>\n </div>\n <div class=\"o-import__form-container u-display-flex\">\n <form class=\"o-import__form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n formControlName=\"fileType\"\n id=\"fileType\"\n [items]=\"Object.values(fileTypes)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + fileType.value | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n @if (file.value?.size) {\n <div class=\"o-import__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.value?.name }}</h3>\n <span>{{ getFileSize(file.value?.size ?? 0) }}</span>\n </div>\n }\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileTypes[fileType.value].extension\"\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 formControlName=\"dataset\"\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n [autocomplete]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox formControlName=\"normalizeGeo\" inputId=\"normalizeGeo\">{{\n '@pry.import.normalize' | i18n\n }}</pry-checkbox>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n formControlName=\"productionDate\"\n id=\"productionDate\"\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [attr.aria-invalid]=\"productionDate.invalid\"\n />\n @if (productionDate.invalid) {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n @if (productionDate.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n } @else if (productionDate.errors?.['dateValidator']) {\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"producer\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input formControlName=\"producer\" id=\"producer\" class=\"a-form-field\" type=\"text\" maxlength=\"100\" />\n @if (producer.touched && producer.invalid) {\n <label id=\"producer-error\" for=\"producer\" class=\"a-label a-label--help -error\">\n @if (producer.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"additionalInformation\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"additionalInformation\" id=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__actions u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"form.invalid\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </form>\n <div class=\"o-import__message\" [class.u-visually-hidden]=\"!showMessage\" #message>\n <span>\n {{ '@pry.import.consultDataset1' | i18n }}\n <strong>{{ dataset.value?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }}</strong>\n {{ '@pry.import.consultDataset2' | i18n }}\n </span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.PryUploadComponent, selector: "pry-upload", inputs: ["mode", "accept", "labelTranslate"], outputs: ["uploaded", "uploadedFile"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle", "name", "inputId", "inhibit"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.PryTextEditorComponent, selector: "pry-text-editor", inputs: ["tabView"] }, { kind: "component", type: PryImportCssComponent, selector: "pry-import-css" }, { kind: "pipe", type: i2.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }] }); }
|
|
203
313
|
}
|
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type:
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportFormComponent, decorators: [{
|
|
205
315
|
type: Component,
|
|
206
|
-
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=\"u-display-flex\">\n <form class=\"o-import__form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n formControlName=\"fileType\"\n id=\"fileType\"\n [items]=\"Object.values(fileTypes)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + fileType.value | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n @if (file.value?.size) {\n <div class=\"o-import__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.value?.name }}</h3>\n <span>{{ getFileSize(file.value?.size ?? 0) }}</span>\n </div>\n }\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileTypes[fileType.value].extension\"\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 formControlName=\"dataset\"\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n [autocomplete]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox formControlName=\"normalizeGeo\">{{
|
|
207
|
-
}], ctorParameters: () => [{ type:
|
|
316
|
+
args: [{ selector: 'pry-import-form', template: "<pry-import-css></pry-import-css>\n<div class=\"o-import u-display-flex -column\">\n <div class=\"o-import__header u-display-flex -justify-space-between\">\n <h1 class=\"a-h1\">{{ '@pry.import.title' | i18n }}</h1>\n <pry-checkbox [ngModel]=\"multipleImports\" (click)=\"multipleImportChange()\">\n {{ '@pry.import.multiple' | i18n }}\n </pry-checkbox>\n </div>\n <div class=\"o-import__form-container u-display-flex\">\n <form class=\"o-import__form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"datasets\">{{ '@pry.import.fileType' | i18n }}</label>\n <pry-select\n formControlName=\"fileType\"\n id=\"fileType\"\n [items]=\"Object.values(fileTypes)\"\n bindValue=\"value\"\n bindLabel=\"label\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"upload_input\">\n {{ '@pry.import.uploadTitle' + fileType.value | i18n }}\n </label>\n <p>{{ '@pry.import.warning' | i18n }}</p>\n <div class=\"o-file-input\">\n @if (file.value?.size) {\n <div class=\"o-import__file\">\n <pry-icon iconSvg=\"download\"></pry-icon>\n <h3>{{ file.value?.name }}</h3>\n <span>{{ getFileSize(file.value?.size ?? 0) }}</span>\n </div>\n }\n <pry-upload\n id=\"upload_input\"\n [accept]=\"fileTypes[fileType.value].extension\"\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 formControlName=\"dataset\"\n id=\"datasets\"\n [items]=\"datasets$ | async\"\n [placeholder]=\"'@pry.import.dataset' | i18n\"\n bindLabel=\"name\"\n [autocomplete]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox formControlName=\"normalizeGeo\" inputId=\"normalizeGeo\">{{\n '@pry.import.normalize' | i18n\n }}</pry-checkbox>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"productionDate\">{{ '@pry.dataset.version.productionDate' | i18n }}</label>\n <input\n formControlName=\"productionDate\"\n id=\"productionDate\"\n class=\"a-form-field\"\n type=\"datetime-local\"\n [max]=\"maxDate\"\n [attr.aria-invalid]=\"productionDate.invalid\"\n />\n @if (productionDate.invalid) {\n <label id=\"productionDate-error\" for=\"productionDate\" class=\"a-label a-label--help -error\">\n @if (productionDate.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n } @else if (productionDate.errors?.['dateValidator']) {\n <span>{{ '@pry.dataset.form.date' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"producer\">{{ '@pry.dataset.version.producer' | i18n }}</label>\n <input formControlName=\"producer\" id=\"producer\" class=\"a-form-field\" type=\"text\" maxlength=\"100\" />\n @if (producer.touched && producer.invalid) {\n <label id=\"producer-error\" for=\"producer\" class=\"a-label a-label--help -error\">\n @if (producer.errors?.['required']) {\n <span>{{ '@pry.dataset.form.obligatory' | i18n }}</span>\n }\n </label>\n }\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\" for=\"additionalInformation\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"additionalInformation\" id=\"additionalInformation\"></pry-text-editor>\n </div>\n <div class=\"o-import__actions u-display-flex -justify-center\">\n <button class=\"a-btn a-btn--primary\" [disabled]=\"form.invalid\">\n {{ '@pry.import.import' | i18n }}\n </button>\n </div>\n </form>\n <div class=\"o-import__message\" [class.u-visually-hidden]=\"!showMessage\" #message>\n <span>\n {{ '@pry.import.consultDataset1' | i18n }}\n <strong>{{ dataset.value?.id ?? '' | translateId: { type: 'datasource', output: 'name' } | async }}</strong>\n {{ '@pry.import.consultDataset2' | i18n }}\n </span>\n </div>\n </div>\n</div>\n" }]
|
|
317
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.DataSourceService }, { type: i2.PrySnackbarService }, { type: i2.PryI18nService }], propDecorators: { message: [{
|
|
208
318
|
type: ViewChild,
|
|
209
319
|
args: ['message']
|
|
320
|
+
}], multipleImportsValue: [{
|
|
321
|
+
type: Output
|
|
322
|
+
}], formSubmitted: [{
|
|
323
|
+
type: Output
|
|
210
324
|
}] } });
|
|
211
325
|
|
|
212
|
-
const enTranslations = {
|
|
213
|
-
'@pry': {
|
|
214
|
-
import: {
|
|
215
|
-
title: 'Import data',
|
|
216
|
-
datasetImport: 'Import in :',
|
|
217
|
-
import: 'Import',
|
|
218
|
-
errorTitle: 'Import failed',
|
|
219
|
-
successTitle: 'Import successful',
|
|
220
|
-
uploadTitlezip: 'Choose a .zip file',
|
|
221
|
-
uploadTitlecsv: 'Choose a .csv file',
|
|
222
|
-
warning: 'File must be under 2GB, or must be imported via directly via APIs.',
|
|
223
|
-
tooLarge: 'File is too large ({{current}} > 2GB), please use APIs to import this file.',
|
|
224
|
-
selectFile: 'Select file',
|
|
225
|
-
importedLines: 'imported lines',
|
|
226
|
-
consultDataset1: 'The import is in progress, see the ',
|
|
227
|
-
consultDataset2: ' dataset page to check its condition',
|
|
228
|
-
errors: 'errors',
|
|
229
|
-
error: 'Error on import: {{msg}}',
|
|
230
|
-
errorCode: {
|
|
231
|
-
409: 'Import already in progress, please try again later.'
|
|
232
|
-
},
|
|
233
|
-
line: 'Line {{line}}: ',
|
|
234
|
-
withoutLine: 'Global errors: ',
|
|
235
|
-
dataset: 'Dataset',
|
|
236
|
-
fileType: 'Select file type',
|
|
237
|
-
code: {
|
|
238
|
-
UNRECOGNIZED: 'Provided file contains a column "{{name}}", which is not present in the chosen dataset',
|
|
239
|
-
FILE_MANDATORY: 'No file was provided',
|
|
240
|
-
NO_ATTRIBUTES: 'No corresponding attribute found in uploaded file',
|
|
241
|
-
FORMAT: '"{{name}}": "{{receivedValue}}" could not be converted to type "{{type}}"',
|
|
242
|
-
STORAGE: 'Storage stack trace error: {{elasticError}}'
|
|
243
|
-
},
|
|
244
|
-
normalize: 'Standardize geographic shapes'
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
const frTranslations = {
|
|
250
|
-
'@pry': {
|
|
251
|
-
import: {
|
|
252
|
-
title: 'Import de données',
|
|
253
|
-
datasetImport: 'Importer dans un jeu de données:',
|
|
254
|
-
import: 'Importer',
|
|
255
|
-
errorTitle: "L'import a échoué",
|
|
256
|
-
successTitle: 'Import de données réussi',
|
|
257
|
-
uploadTitlezip: 'Choisir un fichier .zip',
|
|
258
|
-
uploadTitlecsv: 'Choisir un fichier .csv',
|
|
259
|
-
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',
|
|
260
|
-
tooLarge: 'Fichier trop volumineux ({{current}} > 2GB), veuillez utiliser les API pour importer ces données',
|
|
261
|
-
selectFile: 'Sélectionner un fichier',
|
|
262
|
-
importedLines: 'lignes importée(s)',
|
|
263
|
-
consultDataset1: "L'import est en cours, consultez la page du jeu de données ",
|
|
264
|
-
consultDataset2: ' pour vérifier son état',
|
|
265
|
-
shapefileState: ' pour vérifier son état',
|
|
266
|
-
error: "Erreur lors de l'import: {{msg}}",
|
|
267
|
-
errors: 'erreur(s)',
|
|
268
|
-
errorCode: {
|
|
269
|
-
409: 'Import déjà en cours, veuillez réessayer plus tard.'
|
|
270
|
-
},
|
|
271
|
-
line: 'Ligne {{line}}: ',
|
|
272
|
-
withoutLine: 'Erreurs globales: ',
|
|
273
|
-
dataset: 'Jeu de données',
|
|
274
|
-
fileType: 'Sélectionner un type de fichier',
|
|
275
|
-
code: {
|
|
276
|
-
UNRECOGNIZED: "Le fichier fourni contient une colonne «\u00A0{{name}}\u00A0», qui n'est pas présente dans le jeu de données choisi",
|
|
277
|
-
FILE_MANDATORY: 'Aucun fichier fourni',
|
|
278
|
-
NO_ATTRIBUTES: "Aucun attribut correspondant n'a été trouvé dans le fichier fourni",
|
|
279
|
-
FORMAT: "«\u00A0{{name}}\u00A0»: «\u00A0{{receivedValue}}\u00A0» n'a pas pu être convertie en type «\u00A0{{type}}\u00A0»",
|
|
280
|
-
STORAGE: 'Storage stack trace error: {{elasticError}}'
|
|
281
|
-
},
|
|
282
|
-
normalize: 'Normaliser les formes géographiques'
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
|
|
287
326
|
const routes = [
|
|
288
327
|
{
|
|
289
328
|
path: '',
|
|
290
|
-
component:
|
|
329
|
+
component: PryImportFormComponent,
|
|
291
330
|
data: {
|
|
292
331
|
access: {
|
|
293
332
|
module: 'dashboard',
|
|
@@ -299,7 +338,7 @@ const routes = [
|
|
|
299
338
|
];
|
|
300
339
|
class PryImportRoutingModule {
|
|
301
340
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
302
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryImportRoutingModule, imports: [i1.RouterModule], exports: [RouterModule] }); }
|
|
341
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryImportRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
303
342
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
304
343
|
}
|
|
305
344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportRoutingModule, decorators: [{
|
|
@@ -331,7 +370,7 @@ class ImportService {
|
|
|
331
370
|
headers: new HttpHeaders({ 'File-Content-Type': mimeType })
|
|
332
371
|
})));
|
|
333
372
|
}
|
|
334
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportService, deps: [{ token: i1$
|
|
373
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportService, deps: [{ token: i1$2.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
335
374
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportService, providedIn: 'root' }); }
|
|
336
375
|
}
|
|
337
376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportService, decorators: [{
|
|
@@ -339,7 +378,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
339
378
|
args: [{
|
|
340
379
|
providedIn: 'root'
|
|
341
380
|
}]
|
|
342
|
-
}], ctorParameters: () => [{ type: i1$
|
|
381
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1.Store }] });
|
|
343
382
|
|
|
344
383
|
class ImportEffects {
|
|
345
384
|
constructor(actions$, service, snackbar, translateService) {
|
|
@@ -369,12 +408,102 @@ class ImportEffects {
|
|
|
369
408
|
throw error;
|
|
370
409
|
})))));
|
|
371
410
|
}
|
|
372
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportEffects, deps: [{ token: i1$
|
|
411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportEffects, deps: [{ token: i1$3.Actions }, { token: ImportService }, { token: i2.PrySnackbarService }, { token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
373
412
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportEffects }); }
|
|
374
413
|
}
|
|
375
414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ImportEffects, decorators: [{
|
|
376
415
|
type: Injectable
|
|
377
|
-
}], ctorParameters: () => [{ type: i1$
|
|
416
|
+
}], ctorParameters: () => [{ type: i1$3.Actions }, { type: ImportService }, { type: i2.PrySnackbarService }, { type: i2.PryI18nService }] });
|
|
417
|
+
|
|
418
|
+
class PryVersionModalComponent {
|
|
419
|
+
constructor(dialogRef, data) {
|
|
420
|
+
this.dialogRef = dialogRef;
|
|
421
|
+
this.data = data;
|
|
422
|
+
this.version = this.data.version;
|
|
423
|
+
}
|
|
424
|
+
close() {
|
|
425
|
+
this.dialogRef.close();
|
|
426
|
+
}
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryVersionModalComponent, deps: [{ token: i2.PryDialogRef }, { token: PRY_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
428
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryVersionModalComponent, selector: "pry-version-modal", ngImport: i0, template: "<pry-import-css></pry-import-css>\n<div class=\"m-version-modal o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.toolbox.about' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"close()\">\n <pry-icon iconSvg=\"close\" [height]=\"20\" [width]=\"20\"></pry-icon>\n <h4 class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</h4>\n </button>\n </div>\n </div>\n @if (version) {\n <ul class=\"m-version-modal__list u-display-flex -column -gap-20\">\n <li>\n <h4 class=\"bold\">{{ '@pry.dataset.version.name' | i18n }}</h4>\n <span>{{ version.dataset.name }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.number' | i18n }}</h4>\n <span>{{ version.version }}</span>\n </li>\n <li>\n <h4 class=\"a-h4\">{{ '@pry.dataset.version.importDate' | i18n }}</h4>\n <span>{{ version.productionDate }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.stateTitle' | i18n }}</h4>\n <span>{{\n version.id === version.dataset.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : ('@pry.dataset.version.state.' + version.state | i18n)\n }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.fileName' | i18n }}</h4>\n <span>{{ version.fileName }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.producer' | i18n }}</h4>\n <span>{{ version.producer }}</span>\n </li>\n @if (version.additionalInformation) {\n <li>\n <h4>{{ '@pry.dataset.version.additionalInformation' | i18n }}</h4>\n <span>{{ version.additionalInformation | mdToHtml }}</span>\n </li>\n }\n </ul>\n }\n</div>\n", dependencies: [{ kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: PryImportCssComponent, selector: "pry-import-css" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i5.MdToHtmlPipe, name: "mdToHtml" }] }); }
|
|
429
|
+
}
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryVersionModalComponent, decorators: [{
|
|
431
|
+
type: Component,
|
|
432
|
+
args: [{ selector: 'pry-version-modal', template: "<pry-import-css></pry-import-css>\n<div class=\"m-version-modal o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.toolbox.about' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"close()\">\n <pry-icon iconSvg=\"close\" [height]=\"20\" [width]=\"20\"></pry-icon>\n <h4 class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</h4>\n </button>\n </div>\n </div>\n @if (version) {\n <ul class=\"m-version-modal__list u-display-flex -column -gap-20\">\n <li>\n <h4 class=\"bold\">{{ '@pry.dataset.version.name' | i18n }}</h4>\n <span>{{ version.dataset.name }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.number' | i18n }}</h4>\n <span>{{ version.version }}</span>\n </li>\n <li>\n <h4 class=\"a-h4\">{{ '@pry.dataset.version.importDate' | i18n }}</h4>\n <span>{{ version.productionDate }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.stateTitle' | i18n }}</h4>\n <span>{{\n version.id === version.dataset.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : ('@pry.dataset.version.state.' + version.state | i18n)\n }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.fileName' | i18n }}</h4>\n <span>{{ version.fileName }}</span>\n </li>\n <li>\n <h4>{{ '@pry.dataset.version.producer' | i18n }}</h4>\n <span>{{ version.producer }}</span>\n </li>\n @if (version.additionalInformation) {\n <li>\n <h4>{{ '@pry.dataset.version.additionalInformation' | i18n }}</h4>\n <span>{{ version.additionalInformation | mdToHtml }}</span>\n </li>\n }\n </ul>\n }\n</div>\n" }]
|
|
433
|
+
}], ctorParameters: () => [{ type: i2.PryDialogRef }, { type: undefined, decorators: [{
|
|
434
|
+
type: Inject,
|
|
435
|
+
args: [PRY_DIALOG_DATA]
|
|
436
|
+
}] }] });
|
|
437
|
+
|
|
438
|
+
class PryImportListComponent extends SubscriptionnerDirective {
|
|
439
|
+
constructor(store, dialog) {
|
|
440
|
+
super();
|
|
441
|
+
this.store = store;
|
|
442
|
+
this.dialog = dialog;
|
|
443
|
+
this.loadDataAction = signal(DataSourceActions.dataset.listVersions({}));
|
|
444
|
+
this.refreshClick = input();
|
|
445
|
+
this.possibleStatus = ['LOADING', 'INDEXING', 'INACTIVE', 'ERROR', 'ACTIVE', 'DELETING', 'DELETE_ERROR'];
|
|
446
|
+
this.filters = {
|
|
447
|
+
dataset: undefined,
|
|
448
|
+
status: undefined,
|
|
449
|
+
dateMin: undefined,
|
|
450
|
+
dateMax: undefined
|
|
451
|
+
};
|
|
452
|
+
this.sort = {};
|
|
453
|
+
this.store.dispatch(DataSourceActions.dataset.loadDataset());
|
|
454
|
+
this.datasets$ = this.store.select(DataSourceSelectors.datasets);
|
|
455
|
+
this.datasetVersions$ = this.store.select(DataSourceSelectors.datasetVersions);
|
|
456
|
+
this.totalVersionCount$ = this.store.select(DataSourceSelectors.totalVersionCount);
|
|
457
|
+
}
|
|
458
|
+
ngOnInit() {
|
|
459
|
+
this.subscriptions.add(this.refreshClick()?.subscribe(() => this.loadData()));
|
|
460
|
+
}
|
|
461
|
+
clearFilters() {
|
|
462
|
+
this.filters = { dataset: undefined, status: undefined, dateMin: undefined, dateMax: undefined };
|
|
463
|
+
this.store.dispatch({
|
|
464
|
+
...this.loadDataAction(),
|
|
465
|
+
limit: 10,
|
|
466
|
+
...this.sort
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
loadData() {
|
|
470
|
+
this.store.dispatch({
|
|
471
|
+
...this.loadDataAction(),
|
|
472
|
+
limit: 10,
|
|
473
|
+
...this.filters,
|
|
474
|
+
...this.sort
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
openInfoModal(version) {
|
|
478
|
+
this.dialog.open(PryVersionModalComponent, {
|
|
479
|
+
data: { version },
|
|
480
|
+
overlayConfig: {
|
|
481
|
+
positionStrategy: new GlobalPositionStrategy().centerVertically().right('20px'),
|
|
482
|
+
hasBackdrop: true,
|
|
483
|
+
backdropClass: 'cdk-overlay-transparent-backdrop'
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
openErrorModal(version) {
|
|
488
|
+
this.dialog.open(PryStatusModalComponent, {
|
|
489
|
+
data: { version }
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
sortChange($event) {
|
|
493
|
+
this.sort.sortBy = $event.direction;
|
|
494
|
+
this.sort.orderBy = $event.active;
|
|
495
|
+
this.loadData();
|
|
496
|
+
}
|
|
497
|
+
updateFilters() {
|
|
498
|
+
this.loadDataAction.update((loadDataAction) => ({ ...loadDataAction, ...this.filters }));
|
|
499
|
+
}
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportListComponent, deps: [{ token: i1.Store }, { token: i2.PryDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
501
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryImportListComponent, selector: "pry-import-list", inputs: { refreshClick: { classPropertyName: "refreshClick", publicName: "refreshClick", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<pry-import-css></pry-import-css>\n<div class=\"o-import-list u-display-flex -column -gap-20\">\n <h1 class=\"a-h1\">{{ '@pry.importList.title' | i18n }}</h1>\n <div class=\"o-import-list__filters u-display-flex -gap-20\">\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__dataset-filter\" #dsRef>\n <label class=\"a-label m-filter__label\" for=\"dataset_name_filter\">\n {{ '@pry.importList.filter.dsName' | i18n }} : \n </label>\n <pry-select\n id=\"dataset_name_filter\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"filters.dataset\"\n (ngModelChange)=\"updateFilters()\"\n [clearable]=\"true\"\n [autocomplete]=\"true\"\n aria-labelledby=\"item-label\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [elementRef]=\"dsRef\"\n ></pry-select>\n </div>\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__state-filter\" #statusRef>\n <label class=\"a-label m-filter__label\" for=\"import_status\">\n {{ '@pry.importList.filter.status' | i18n }} : \n </label>\n <pry-select\n id=\"import_status\"\n [items]=\"possibleStatus\"\n [(ngModel)]=\"filters.status\"\n (ngModelChange)=\"updateFilters()\"\n [clearable]=\"true\"\n aria-labelledby=\"item-label\"\n [elementRef]=\"statusRef\"\n i18nPrefix=\"@pry.dataset.version.stateFilter.\"\n ></pry-select>\n </div>\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__date-filter\">\n <fieldset class=\"u-display-flex -align-center\">\n <legend class=\"a-label m-filter__label\">{{ '@pry.importList.filter.date' | i18n }} : </legend>\n <input class=\"m-filter__input\" type=\"date\" [(ngModel)]=\"filters.dateMin\" (ngModelChange)=\"updateFilters()\" />\n <span class=\"m-filter__date-input-separator\"> - </span>\n <input class=\"m-filter__input\" type=\"date\" [(ngModel)]=\"filters.dateMax\" (ngModelChange)=\"updateFilters()\" />\n </fieldset>\n </div>\n <button type=\"button\" class=\"a-btn a-btn--icon-only u-self-center\" (click)=\"clearFilters()\">\n <pry-icon iconSvg=\"clear_filter\" [width]=\"30\" [height]=\"30\"></pry-icon>\n </button>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"loadData()\">\n {{ '@pry.toolbox.apply' | i18n }}\n <pry-icon iconSvg=\"refresh_filter\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n </div>\n <div class=\"o-import-list__content\">\n <table class=\"a-table\" prySortTable (prySortChange)=\"sortChange($event)\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th id=\"import_list_header_dataset\" prySortHeader=\"DATASET_NAME\">\n {{ '@pry.importList.dsName' | i18n }}\n </th>\n <th>{{ '@pry.importList.number' | i18n }}</th>\n <th id=\"import_list_header_date\" prySortHeader=\"DATE\" (sortChange)=\"sortChange($event)\">\n {{ '@pry.importList.date' | i18n }}\n </th>\n <th>{{ '@pry.importList.status' | i18n }}</th>\n <th>{{ '@pry.importList.actions' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (version of datasetVersions$ | async; track version.id) {\n <tr>\n <td>{{ version.dataset.name }}</td>\n <td>\n {{ version.version }}\n </td>\n <td>\n {{ version.productionDate | date: 'dd/MM/yyyy HH:mm' }}\n </td>\n <td class=\"u-display-flex -align-center -cell-with-icon\">\n @if (version.state === 'ACTIVE') {\n <pry-icon iconSvg=\"check\" class=\"check\" [height]=\"20\" [width]=\"20\"></pry-icon>\n } @else if (version.state === 'WARNING' || version.state === 'ERROR') {\n <pry-icon iconSvg=\"warning-triangle\" class=\"warning\" [height]=\"20\" [width]=\"20\"></pry-icon>\n }\n {{\n version.id === version.dataset.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : ('@pry.dataset.version.state.' + version.state | i18n)\n }}\n </td>\n @if (version.state === 'ACTIVE' || version.state === 'INACTIVE') {\n <td>\n <button class=\"a-btn a-btn--secondary\" (click)=\"openInfoModal(version)\">Consulter</button>\n </td>\n } @else if (version.state === 'ERROR' || version.state === 'WARNING') {\n <td>\n <button class=\"a-btn a-btn--secondary\" (click)=\"openErrorModal(version)\">\n {{ version.state === 'ERROR' ? 'Consulter erreurs' : 'Consulter warnings' }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <pry-paginator\n [action]=\"loadDataAction()\"\n [nbPerPage]=\"10\"\n [totalItemNb]=\"(totalVersionCount$ | async)!\"\n class=\"u-self-center\"\n ></pry-paginator>\n</div>\n", dependencies: [{ kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.PryPaginatorComponent, selector: "pry-paginator", inputs: ["action", "nbPerPage", "totalItemNb", "mode"], outputs: ["pageChange"] }, { kind: "component", type: i2.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i2.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i2.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "component", type: PryImportCssComponent, selector: "pry-import-css" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.DatePipe, name: "date" }] }); }
|
|
502
|
+
}
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportListComponent, decorators: [{
|
|
504
|
+
type: Component,
|
|
505
|
+
args: [{ selector: 'pry-import-list', template: "<pry-import-css></pry-import-css>\n<div class=\"o-import-list u-display-flex -column -gap-20\">\n <h1 class=\"a-h1\">{{ '@pry.importList.title' | i18n }}</h1>\n <div class=\"o-import-list__filters u-display-flex -gap-20\">\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__dataset-filter\" #dsRef>\n <label class=\"a-label m-filter__label\" for=\"dataset_name_filter\">\n {{ '@pry.importList.filter.dsName' | i18n }} : \n </label>\n <pry-select\n id=\"dataset_name_filter\"\n [items]=\"datasets$ | async\"\n [(ngModel)]=\"filters.dataset\"\n (ngModelChange)=\"updateFilters()\"\n [clearable]=\"true\"\n [autocomplete]=\"true\"\n aria-labelledby=\"item-label\"\n bindLabel=\"name\"\n bindValue=\"id\"\n [elementRef]=\"dsRef\"\n ></pry-select>\n </div>\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__state-filter\" #statusRef>\n <label class=\"a-label m-filter__label\" for=\"import_status\">\n {{ '@pry.importList.filter.status' | i18n }} : \n </label>\n <pry-select\n id=\"import_status\"\n [items]=\"possibleStatus\"\n [(ngModel)]=\"filters.status\"\n (ngModelChange)=\"updateFilters()\"\n [clearable]=\"true\"\n aria-labelledby=\"item-label\"\n [elementRef]=\"statusRef\"\n i18nPrefix=\"@pry.dataset.version.stateFilter.\"\n ></pry-select>\n </div>\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown o-import-list__date-filter\">\n <fieldset class=\"u-display-flex -align-center\">\n <legend class=\"a-label m-filter__label\">{{ '@pry.importList.filter.date' | i18n }} : </legend>\n <input class=\"m-filter__input\" type=\"date\" [(ngModel)]=\"filters.dateMin\" (ngModelChange)=\"updateFilters()\" />\n <span class=\"m-filter__date-input-separator\"> - </span>\n <input class=\"m-filter__input\" type=\"date\" [(ngModel)]=\"filters.dateMax\" (ngModelChange)=\"updateFilters()\" />\n </fieldset>\n </div>\n <button type=\"button\" class=\"a-btn a-btn--icon-only u-self-center\" (click)=\"clearFilters()\">\n <pry-icon iconSvg=\"clear_filter\" [width]=\"30\" [height]=\"30\"></pry-icon>\n </button>\n <button type=\"button\" class=\"a-btn a-btn--primary\" (click)=\"loadData()\">\n {{ '@pry.toolbox.apply' | i18n }}\n <pry-icon iconSvg=\"refresh_filter\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n </div>\n <div class=\"o-import-list__content\">\n <table class=\"a-table\" prySortTable (prySortChange)=\"sortChange($event)\">\n <caption>\n {{\n '@pry.admin.dataset.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th id=\"import_list_header_dataset\" prySortHeader=\"DATASET_NAME\">\n {{ '@pry.importList.dsName' | i18n }}\n </th>\n <th>{{ '@pry.importList.number' | i18n }}</th>\n <th id=\"import_list_header_date\" prySortHeader=\"DATE\" (sortChange)=\"sortChange($event)\">\n {{ '@pry.importList.date' | i18n }}\n </th>\n <th>{{ '@pry.importList.status' | i18n }}</th>\n <th>{{ '@pry.importList.actions' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (version of datasetVersions$ | async; track version.id) {\n <tr>\n <td>{{ version.dataset.name }}</td>\n <td>\n {{ version.version }}\n </td>\n <td>\n {{ version.productionDate | date: 'dd/MM/yyyy HH:mm' }}\n </td>\n <td class=\"u-display-flex -align-center -cell-with-icon\">\n @if (version.state === 'ACTIVE') {\n <pry-icon iconSvg=\"check\" class=\"check\" [height]=\"20\" [width]=\"20\"></pry-icon>\n } @else if (version.state === 'WARNING' || version.state === 'ERROR') {\n <pry-icon iconSvg=\"warning-triangle\" class=\"warning\" [height]=\"20\" [width]=\"20\"></pry-icon>\n }\n {{\n version.id === version.dataset.activeVersion?.id\n ? '@pry.dataset.version.state.currentlyActive'\n : ('@pry.dataset.version.state.' + version.state | i18n)\n }}\n </td>\n @if (version.state === 'ACTIVE' || version.state === 'INACTIVE') {\n <td>\n <button class=\"a-btn a-btn--secondary\" (click)=\"openInfoModal(version)\">Consulter</button>\n </td>\n } @else if (version.state === 'ERROR' || version.state === 'WARNING') {\n <td>\n <button class=\"a-btn a-btn--secondary\" (click)=\"openErrorModal(version)\">\n {{ version.state === 'ERROR' ? 'Consulter erreurs' : 'Consulter warnings' }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n <pry-paginator\n [action]=\"loadDataAction()\"\n [nbPerPage]=\"10\"\n [totalItemNb]=\"(totalVersionCount$ | async)!\"\n class=\"u-self-center\"\n ></pry-paginator>\n</div>\n" }]
|
|
506
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.PryDialogService }] });
|
|
378
507
|
|
|
379
508
|
class PryImportModule {
|
|
380
509
|
constructor(pryTranslateService) {
|
|
@@ -382,16 +511,20 @@ class PryImportModule {
|
|
|
382
511
|
this.pryTranslateService.addLangObject('fr', 'import', frTranslations);
|
|
383
512
|
this.pryTranslateService.addLangObject('en', 'import', enTranslations);
|
|
384
513
|
}
|
|
385
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, deps: [{ token: i2
|
|
386
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, declarations: [
|
|
514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, deps: [{ token: i2.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
515
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, declarations: [PryImportFormComponent, PryImportCssComponent, PryImportListComponent, PryVersionModalComponent], imports: [PryCoreModule,
|
|
387
516
|
PrySelectModule,
|
|
388
517
|
PryI18nModule,
|
|
389
518
|
CommonModule,
|
|
390
519
|
PryIconModule,
|
|
391
520
|
FormsModule,
|
|
392
|
-
PryImportRoutingModule,
|
|
521
|
+
PryImportRoutingModule, i1.StoreFeatureModule, i1$3.EffectsFeatureModule, PryCheckboxModule,
|
|
393
522
|
ReactiveFormsModule,
|
|
394
|
-
PryTextEditorModule
|
|
523
|
+
PryTextEditorModule,
|
|
524
|
+
PryDatePickerModule,
|
|
525
|
+
PrySinceDateModule,
|
|
526
|
+
PryPaginatorModule,
|
|
527
|
+
PrySortModule], exports: [PryImportFormComponent, PryImportListComponent, PryVersionModalComponent] }); }
|
|
395
528
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, providers: [DatePipe], imports: [PryCoreModule,
|
|
396
529
|
PrySelectModule,
|
|
397
530
|
PryI18nModule,
|
|
@@ -403,13 +536,17 @@ class PryImportModule {
|
|
|
403
536
|
EffectsModule.forFeature([ImportEffects]),
|
|
404
537
|
PryCheckboxModule,
|
|
405
538
|
ReactiveFormsModule,
|
|
406
|
-
PryTextEditorModule
|
|
539
|
+
PryTextEditorModule,
|
|
540
|
+
PryDatePickerModule,
|
|
541
|
+
PrySinceDateModule,
|
|
542
|
+
PryPaginatorModule,
|
|
543
|
+
PrySortModule] }); }
|
|
407
544
|
}
|
|
408
545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportModule, decorators: [{
|
|
409
546
|
type: NgModule,
|
|
410
547
|
args: [{
|
|
411
548
|
providers: [DatePipe],
|
|
412
|
-
declarations: [
|
|
549
|
+
declarations: [PryImportFormComponent, PryImportCssComponent, PryImportListComponent, PryVersionModalComponent],
|
|
413
550
|
imports: [
|
|
414
551
|
PryCoreModule,
|
|
415
552
|
PrySelectModule,
|
|
@@ -422,15 +559,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
422
559
|
EffectsModule.forFeature([ImportEffects]),
|
|
423
560
|
PryCheckboxModule,
|
|
424
561
|
ReactiveFormsModule,
|
|
425
|
-
PryTextEditorModule
|
|
562
|
+
PryTextEditorModule,
|
|
563
|
+
PryDatePickerModule,
|
|
564
|
+
PrySinceDateModule,
|
|
565
|
+
PryPaginatorModule,
|
|
566
|
+
PrySortModule
|
|
426
567
|
],
|
|
427
|
-
exports: [
|
|
568
|
+
exports: [PryImportFormComponent, PryImportListComponent, PryVersionModalComponent]
|
|
428
569
|
}]
|
|
429
|
-
}], ctorParameters: () => [{ type: i2
|
|
570
|
+
}], ctorParameters: () => [{ type: i2.PryI18nService }] });
|
|
430
571
|
|
|
431
572
|
/**
|
|
432
573
|
* Generated bundle index. Do not edit.
|
|
433
574
|
*/
|
|
434
575
|
|
|
435
|
-
export {
|
|
576
|
+
export { PryImportFormComponent, PryImportListComponent, PryImportModule, PryVersionModalComponent };
|
|
436
577
|
//# sourceMappingURL=provoly-dashboard-import.mjs.map
|