@provoly/dashboard 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/admin.module.d.ts +1 -1
- package/admin/components/admin-dataset/admin-edit-dataset/admin-edit-dataset.component.d.ts +3 -2
- package/admin/components/admin-dataset/store/admin-dataset.actions.d.ts +76 -0
- package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +71 -0
- package/admin/components/admin-dataset/store/admin-dataset.reducer.d.ts +10 -0
- package/admin/components/admin-dataset/store/admin-dataset.selectors.d.ts +10 -0
- package/admin/components/admin-dataset/store/admin-dataset.service.d.ts +20 -0
- package/admin/store/admin.effects.d.ts +1 -14
- package/components/metadata-editor/store/metadata.effects.d.ts +1 -23
- package/components/stepper/stepper.component.d.ts +2 -1
- package/esm2022/admin/admin.module.mjs +8 -2
- package/esm2022/admin/components/admin-dataset/admin-dataset.component.mjs +8 -6
- package/esm2022/admin/components/admin-dataset/admin-edit-dataset/admin-edit-dataset.component.mjs +5 -4
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +11 -9
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +4 -3
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.actions.mjs +17 -0
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.effects.mjs +104 -0
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.reducer.mjs +29 -0
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.selectors.mjs +19 -0
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.service.mjs +56 -0
- package/esm2022/admin/store/admin.effects.mjs +9 -36
- package/esm2022/components/metadata-editor/store/metadata.effects.mjs +4 -23
- package/esm2022/components/stepper/stepper.component.mjs +11 -8
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +1 -1
- package/esm2022/import/components/import.component.mjs +101 -61
- package/esm2022/import/i18n/en.translations.mjs +3 -2
- package/esm2022/import/i18n/fr.translations.mjs +3 -2
- package/esm2022/import/style/css.component.mjs +2 -2
- package/esm2022/lib/core/access/access.service.mjs +4 -1
- package/esm2022/lib/core/components/share/access-rights-share/access-rights-share.component.mjs +23 -10
- package/esm2022/lib/core/components/share/access-rights-share-modal/access-rights-share-modal.component.mjs +92 -0
- package/esm2022/lib/core/components/share/share.module.mjs +39 -6
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -2
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +2 -1
- package/esm2022/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.mjs +52 -47
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +1 -15
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +1 -39
- package/esm2022/lib/core/store/data-source/data-source.reducer.mjs +8 -29
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +1 -9
- package/esm2022/lib/core/store/data-source/data-source.service.mjs +1 -36
- package/esm2022/presentation/components/presentation.component.mjs +14 -92
- package/esm2022/restitution/components/restitution/restitution.component.mjs +4 -3
- package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +10 -23
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +4 -16
- package/esm2022/restitution/i18n/en.translations.mjs +2 -1
- package/esm2022/restitution/i18n/fr.translations.mjs +2 -1
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/edit-mode-action/edit-mode-action.component.mjs +1 -1
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +1 -1
- package/esm2022/toolbox/components/share/share.component.mjs +18 -75
- package/esm2022/toolbox/components/toolbox-action/toolbox-action.component.mjs +7 -4
- package/esm2022/toolbox/toolbox.model.mjs +2 -2
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +216 -37
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +4 -21
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-stepper.mjs +10 -7
- package/fesm2022/provoly-dashboard-components-stepper.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +106 -65
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +13 -91
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +13 -34
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +33 -82
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +206 -194
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/components/import.component.d.ts +31 -18
- package/import/i18n/en.translations.d.ts +2 -1
- package/import/i18n/fr.translations.d.ts +2 -1
- package/import/style/_o-import.scss +16 -29
- package/lib/core/access/access.service.d.ts +2 -0
- package/lib/core/components/share/access-rights-share/access-rights-share.component.d.ts +5 -2
- package/lib/core/components/share/access-rights-share-modal/access-rights-share-modal.component.d.ts +34 -0
- package/lib/core/components/share/share.module.d.ts +9 -8
- package/lib/core/model/filter.interface.d.ts +1 -1
- package/lib/core/public-api.d.ts +1 -0
- package/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.d.ts +1 -1
- package/lib/core/store/data-source/data-source.actions.d.ts +1 -91
- package/lib/core/store/data-source/data-source.effects.d.ts +2 -30
- package/lib/core/store/data-source/data-source.reducer.d.ts +0 -3
- package/lib/core/store/data-source/data-source.selectors.d.ts +0 -4
- package/lib/core/store/data-source/data-source.service.d.ts +0 -9
- package/package.json +19 -19
- package/presentation/components/presentation.component.d.ts +4 -18
- package/restitution/components/restitution/restitution.component.d.ts +1 -0
- package/restitution/components/restitution-list/restitution-list.component.d.ts +3 -9
- package/restitution/components/restitution-list-item/restitution-list-item.component.d.ts +1 -4
- package/restitution/i18n/en.translations.d.ts +1 -0
- package/restitution/i18n/fr.translations.d.ts +1 -0
- package/restitution/style/_o-restitution-list.scss +0 -11
- package/styles/components/_o-modal.scss +1 -1
- package/styles-theme/components-theme/_o-restitution-list.theme.scss +0 -9
- package/toolbox/components/share/share.component.d.ts +4 -22
- package/toolbox/components/toolbox-action/toolbox-action.component.d.ts +3 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i7 from '@angular/common';
|
|
2
2
|
import { CommonModule, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ViewEncapsulation, NgModule, Injectable } from '@angular/core';
|
|
5
|
-
import * as
|
|
6
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { Component, ViewEncapsulation, ViewChild, NgModule, Injectable } from '@angular/core';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1$2 from '@ngrx/effects';
|
|
8
8
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
9
9
|
import * as i2 from '@ngrx/store';
|
|
10
10
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
11
11
|
import * as i2$1 from '@provoly/dashboard';
|
|
12
|
-
import { SubscriptionnerDirective, DateUtils, DataSourceActions, DataSourceSelectors,
|
|
12
|
+
import { SubscriptionnerDirective, DateUtils, PryDatasetType, DataSourceActions, DataSourceSelectors, PRY_ACCESS_GUARD, ConfigSelectors, PryCoreModule, PrySelectModule, PryI18nModule, PryIconModule } from '@provoly/dashboard';
|
|
13
13
|
import { map, take, mergeMap } from 'rxjs';
|
|
14
|
-
import {
|
|
15
|
-
import * as
|
|
14
|
+
import { withLatestFrom, mergeMap as mergeMap$1, map as map$1, catchError } from 'rxjs/operators';
|
|
15
|
+
import * as i4 from '@provoly/dashboard/components/checkbox';
|
|
16
16
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i5 from '@provoly/dashboard/components/text-editor';
|
|
18
18
|
import { PryTextEditorModule } from '@provoly/dashboard/components/text-editor';
|
|
19
19
|
import * as i1 from '@angular/router';
|
|
20
20
|
import { RouterModule } from '@angular/router';
|
|
@@ -50,11 +50,11 @@ const ImportSelectors = {
|
|
|
50
50
|
|
|
51
51
|
class PryImportCssComponent {
|
|
52
52
|
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: [".o-import{display:flex;flex-direction:column;overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-
|
|
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: [".o-import{display:flex;flex-direction:column;overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-import .u-display-flex{gap:4.6875rem}.o-import__form{max-width:50%}.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}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
54
54
|
}
|
|
55
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportCssComponent, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
|
-
args: [{ selector: 'pry-import-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-import{display:flex;flex-direction:column;overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-
|
|
57
|
+
args: [{ selector: 'pry-import-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-import{display:flex;flex-direction:column;overflow:scroll;height:100%;padding:.9375rem 1.5625rem}.o-import .u-display-flex{gap:4.6875rem}.o-import__form{max-width:50%}.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}\n"] }]
|
|
58
58
|
}] });
|
|
59
59
|
|
|
60
60
|
class PryImportComponent extends SubscriptionnerDirective {
|
|
@@ -64,72 +64,113 @@ class PryImportComponent extends SubscriptionnerDirective {
|
|
|
64
64
|
this.dsService = dsService;
|
|
65
65
|
this.snackbar = snackbar;
|
|
66
66
|
this.i18nService = i18nService;
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
{
|
|
67
|
+
this.showMessage = false;
|
|
68
|
+
this.maxDate = DateUtils.formatDate(new Date());
|
|
69
|
+
this.form = new FormGroup({
|
|
70
|
+
fileType: new FormControl('csv', {
|
|
71
|
+
validators: [Validators.required],
|
|
72
|
+
nonNullable: true
|
|
73
|
+
}),
|
|
74
|
+
file: new FormControl(null, Validators.required),
|
|
75
|
+
dataset: new FormControl(null, Validators.required),
|
|
76
|
+
normalizeGeo: new FormControl(false, { nonNullable: true }),
|
|
77
|
+
productionDate: new FormControl(this.maxDate, {
|
|
78
|
+
validators: [Validators.required, DateUtils.onlyPastDateValidator],
|
|
79
|
+
nonNullable: true
|
|
80
|
+
}),
|
|
81
|
+
producer: new FormControl('', {
|
|
82
|
+
validators: [Validators.required],
|
|
83
|
+
nonNullable: true
|
|
84
|
+
}),
|
|
85
|
+
additionalInformation: new FormControl(null)
|
|
86
|
+
});
|
|
87
|
+
this.fileTypes = {
|
|
88
|
+
csv: {
|
|
71
89
|
label: 'Csv',
|
|
72
|
-
value: 'csv'
|
|
90
|
+
value: 'csv',
|
|
91
|
+
extension: '.csv'
|
|
73
92
|
},
|
|
74
|
-
{
|
|
93
|
+
zip: {
|
|
75
94
|
label: 'Shapefile',
|
|
76
|
-
value: 'zip'
|
|
95
|
+
value: 'zip',
|
|
96
|
+
extension: '.zip'
|
|
77
97
|
}
|
|
78
|
-
];
|
|
79
|
-
this.fileExtension = {
|
|
80
|
-
csv: '.csv',
|
|
81
|
-
zip: '.zip'
|
|
82
98
|
};
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
this.productionDate = this.maxDate;
|
|
86
|
-
this.producer = '';
|
|
87
|
-
this.additionalInformation = '';
|
|
99
|
+
this.Object = Object;
|
|
100
|
+
this.PryDatasetType = PryDatasetType;
|
|
88
101
|
store.dispatch(DataSourceActions.dataset.loadDataset());
|
|
102
|
+
this.store.dispatch(DataSourceActions.dataset.listVersions());
|
|
89
103
|
this.datasets$ = store
|
|
90
104
|
.select(DataSourceSelectors.datasets)
|
|
91
105
|
.pipe(map((datasets) => datasets
|
|
92
106
|
.filter((dataset) => dataset.type === PryDatasetType.CLOSED)
|
|
93
107
|
.sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1))));
|
|
94
108
|
this.loading$ = store.select(ImportSelectors.loading);
|
|
109
|
+
this.subscriptions.add(this.form.get('dataset')?.valueChanges
|
|
110
|
+
.pipe(withLatestFrom(this.store.select(DataSourceSelectors.datasetVersions)))
|
|
111
|
+
.subscribe(([dataset, versions]) => {
|
|
112
|
+
this.clearMessage();
|
|
113
|
+
if (dataset && versions.some((version) => version.dataset === dataset.id && version.state === 'ACTIVE')) {
|
|
114
|
+
this.getLastActiveVersion(dataset);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.form.patchValue({ producer: '', productionDate: DateUtils.formatDate(new Date()) });
|
|
118
|
+
this.producer.markAsPristine();
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
95
121
|
}
|
|
96
122
|
ngOnDestroy() {
|
|
97
123
|
super.ngOnDestroy();
|
|
98
|
-
this.
|
|
124
|
+
this.clearMessage();
|
|
125
|
+
}
|
|
126
|
+
get fileType() {
|
|
127
|
+
return this.form.controls['fileType'];
|
|
128
|
+
}
|
|
129
|
+
get file() {
|
|
130
|
+
return this.form.controls['file'];
|
|
131
|
+
}
|
|
132
|
+
get dataset() {
|
|
133
|
+
return this.form.controls['dataset'];
|
|
134
|
+
}
|
|
135
|
+
get normalizeGeo() {
|
|
136
|
+
return this.form.controls['normalizeGeo'];
|
|
137
|
+
}
|
|
138
|
+
get productionDate() {
|
|
139
|
+
return this.form.controls['productionDate'];
|
|
140
|
+
}
|
|
141
|
+
get producer() {
|
|
142
|
+
return this.form.controls['producer'];
|
|
99
143
|
}
|
|
100
144
|
uploadedChange($event) {
|
|
101
|
-
this.file = $event;
|
|
102
145
|
if ($event.size > 1024 * 1024 * 1024 * 2) {
|
|
103
146
|
this.snackbar.open({
|
|
104
147
|
type: 'error',
|
|
105
148
|
message: this.i18nService.instant('@pry.import.tooLarge', { current: this.getFileSize($event.size) })
|
|
106
149
|
});
|
|
107
|
-
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.form.patchValue({ file: $event });
|
|
108
153
|
}
|
|
109
154
|
}
|
|
110
155
|
submit() {
|
|
111
|
-
|
|
156
|
+
const { file, dataset, fileType, normalizeGeo, producer, productionDate, additionalInformation } = this.form.value;
|
|
157
|
+
if (file && dataset && fileType) {
|
|
112
158
|
this.store.dispatch(ImportActions.upload({
|
|
113
|
-
file
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
159
|
+
file,
|
|
160
|
+
fileType,
|
|
161
|
+
normalizeGeo,
|
|
162
|
+
dataset: dataset.id,
|
|
117
163
|
datasetVersionInformation: {
|
|
118
|
-
productionDate: new Date(
|
|
119
|
-
producer
|
|
120
|
-
additionalInformation:
|
|
164
|
+
productionDate: productionDate ? new Date(productionDate).toISOString() : undefined,
|
|
165
|
+
producer,
|
|
166
|
+
additionalInformation: !!additionalInformation ? additionalInformation : undefined
|
|
121
167
|
}
|
|
122
168
|
}));
|
|
123
169
|
this.showMessage = true;
|
|
124
|
-
this.
|
|
170
|
+
setTimeout(() => this.message.nativeElement.scrollIntoView({ behavior: 'smooth' }));
|
|
171
|
+
this.form.patchValue({ file: null });
|
|
125
172
|
}
|
|
126
173
|
}
|
|
127
|
-
isSubmitDisabled() {
|
|
128
|
-
return (this.file === undefined ||
|
|
129
|
-
this.selectedDataset === undefined ||
|
|
130
|
-
(this.selectedDataset?.type === PryDatasetType.CLOSED && (this.productionDate === '' || this.producer === '')) ||
|
|
131
|
-
new Date(this.productionDate) > new Date(this.maxDate));
|
|
132
|
-
}
|
|
133
174
|
getFileSize(size) {
|
|
134
175
|
if (size >= 1024 && size < 1024 * 1024) {
|
|
135
176
|
return `${(size / 1024).toFixed(1)} KB`;
|
|
@@ -142,31 +183,29 @@ class PryImportComponent extends SubscriptionnerDirective {
|
|
|
142
183
|
}
|
|
143
184
|
return `${size} bytes`;
|
|
144
185
|
}
|
|
145
|
-
|
|
146
|
-
this.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.
|
|
152
|
-
|
|
153
|
-
.subscribe((version) => {
|
|
154
|
-
if (version && version.producer) {
|
|
155
|
-
this.producer = version.producer || '';
|
|
156
|
-
}
|
|
157
|
-
}));
|
|
158
|
-
}
|
|
186
|
+
getLastActiveVersion(dataset) {
|
|
187
|
+
this.subscriptions.add(this.dsService
|
|
188
|
+
.getLastActiveDatasetVersion(dataset.id)
|
|
189
|
+
.pipe(take(1))
|
|
190
|
+
.subscribe((version) => {
|
|
191
|
+
if (version && version.producer)
|
|
192
|
+
this.form.patchValue({ producer: version.producer });
|
|
193
|
+
}));
|
|
159
194
|
}
|
|
160
|
-
|
|
161
|
-
|
|
195
|
+
clearMessage() {
|
|
196
|
+
if (this.showMessage)
|
|
197
|
+
this.showMessage = false;
|
|
162
198
|
}
|
|
163
199
|
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=\"
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryImportComponent, selector: "pry-import", 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\">\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\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@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\">{{ '@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\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"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$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: "component", type: i2$1.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: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { 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$1.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i2$1.I18nPipe, name: "i18n" }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }] }); }
|
|
165
201
|
}
|
|
166
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryImportComponent, decorators: [{
|
|
167
203
|
type: Component,
|
|
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=\"
|
|
169
|
-
}], ctorParameters: () => [{ type: i2.Store }, { type: i2$1.DataSourceService }, { type: i2$1.PrySnackbarService }, { type: i2$1.PryI18nService }]
|
|
204
|
+
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\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@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\">{{ '@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\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"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" }]
|
|
205
|
+
}], ctorParameters: () => [{ type: i2.Store }, { type: i2$1.DataSourceService }, { type: i2$1.PrySnackbarService }, { type: i2$1.PryI18nService }], propDecorators: { message: [{
|
|
206
|
+
type: ViewChild,
|
|
207
|
+
args: ['message']
|
|
208
|
+
}] } });
|
|
170
209
|
|
|
171
210
|
const enTranslations = {
|
|
172
211
|
'@pry': {
|
|
@@ -182,7 +221,8 @@ const enTranslations = {
|
|
|
182
221
|
tooLarge: 'File is too large ({{current}} > 2GB), please use APIs to import this file.',
|
|
183
222
|
selectFile: 'Select file',
|
|
184
223
|
importedLines: 'imported lines',
|
|
185
|
-
|
|
224
|
+
consultDataset1: 'The import is in progress, see the ',
|
|
225
|
+
consultDataset2: ' dataset page to check its condition',
|
|
186
226
|
errors: 'errors',
|
|
187
227
|
error: 'Error on import: {{msg}}',
|
|
188
228
|
errorCode: {
|
|
@@ -218,7 +258,8 @@ const frTranslations = {
|
|
|
218
258
|
tooLarge: 'Fichier trop volumineux ({{current}} > 2GB), veuillez utiliser les API pour importer ces données',
|
|
219
259
|
selectFile: 'Sélectionner un fichier',
|
|
220
260
|
importedLines: 'lignes importée(s)',
|
|
221
|
-
|
|
261
|
+
consultDataset1: "L'import est en cours, consultez la page du jeu de données ",
|
|
262
|
+
consultDataset2: ' pour vérifier son état',
|
|
222
263
|
shapefileState: ' pour vérifier son état',
|
|
223
264
|
error: "Erreur lors de l'import: {{msg}}",
|
|
224
265
|
errors: 'erreur(s)',
|
|
@@ -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 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;AAC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rB,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;AACzD,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,eAAe;wBACf,aAAa;wBACb,YAAY;wBACZ,aAAa;wBACb,WAAW;wBACX,sBAAsB;AACtB,wBAAA,WAAW,CAAC,UAAU,CAAC,gBAAgB,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
|
+
{"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, ElementRef, OnDestroy, ViewChild } 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 { withLatestFrom } from 'rxjs/operators';\nimport { AbstractControl, FormControl, FormGroup, Validators } from '@angular/forms';\n\ntype FileExtension = 'csv' | 'zip';\n\ninterface ImportForm {\n fileType: FormControl<FileExtension>;\n file: FormControl<File | null>;\n dataset: FormControl<Dataset | null>;\n normalizeGeo: FormControl<boolean>;\n productionDate: FormControl<string>;\n producer: FormControl<string>;\n additionalInformation: FormControl<string | null>;\n}\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 loading$: Observable<boolean>;\n\n @ViewChild('message') message!: ElementRef<HTMLDivElement>;\n showMessage: boolean = false;\n\n maxDate = DateUtils.formatDate(new Date());\n\n form = new FormGroup<ImportForm>({\n fileType: new FormControl('csv', {\n validators: [Validators.required],\n nonNullable: true\n }),\n file: new FormControl(null, Validators.required),\n dataset: new FormControl(null, Validators.required),\n normalizeGeo: new FormControl(false, { nonNullable: true }),\n productionDate: new FormControl(this.maxDate, {\n validators: [Validators.required, DateUtils.onlyPastDateValidator],\n nonNullable: true\n }),\n producer: new FormControl('', {\n validators: [Validators.required],\n nonNullable: true\n }),\n additionalInformation: new FormControl(null)\n });\n\n fileTypes: { [key in FileExtension]: { label: string; value: FileExtension; extension: string } } = {\n csv: {\n label: 'Csv',\n value: 'csv',\n extension: '.csv'\n },\n zip: {\n label: 'Shapefile',\n value: 'zip',\n extension: '.zip'\n }\n };\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.store.dispatch(DataSourceActions.dataset.listVersions());\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 this.subscriptions.add(\n this.form.get('dataset')?.valueChanges\n .pipe(withLatestFrom(this.store.select(DataSourceSelectors.datasetVersions)))\n .subscribe(([dataset, versions]) => {\n this.clearMessage();\n if (dataset && versions.some((version) => version.dataset === dataset.id && version.state === 'ACTIVE')) {\n this.getLastActiveVersion(dataset);\n } else {\n this.form.patchValue({ producer: '', productionDate: DateUtils.formatDate(new Date()) });\n this.producer.markAsPristine();\n }\n })\n );\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.clearMessage();\n }\n\n get fileType(): AbstractControl<FileExtension> {\n return this.form.controls['fileType'];\n }\n\n get file(): AbstractControl<File | null> {\n return this.form.controls['file'];\n }\n\n get dataset(): AbstractControl<Dataset | null> {\n return this.form.controls['dataset'];\n }\n\n get normalizeGeo(): AbstractControl<boolean> {\n return this.form.controls['normalizeGeo'];\n }\n\n get productionDate(): AbstractControl<string> {\n return this.form.controls['productionDate'];\n }\n\n get producer(): AbstractControl<string> {\n return this.form.controls['producer'];\n }\n\n uploadedChange($event: File): void {\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 } else {\n this.form.patchValue({ file: $event });\n }\n }\n\n submit(): void {\n const { file, dataset, fileType, normalizeGeo, producer, productionDate, additionalInformation } = this.form.value;\n if (file && dataset && fileType) {\n this.store.dispatch(\n ImportActions.upload({\n file,\n fileType,\n normalizeGeo,\n dataset: dataset.id,\n datasetVersionInformation: {\n productionDate: productionDate ? new Date(productionDate).toISOString() : undefined,\n producer,\n additionalInformation: !!additionalInformation ? additionalInformation : undefined\n }\n })\n );\n this.showMessage = true;\n setTimeout(() => this.message.nativeElement.scrollIntoView({ behavior: 'smooth' }));\n this.form.patchValue({ file: null });\n }\n }\n\n getFileSize(size: number): string {\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 getLastActiveVersion(dataset: Dataset): void {\n this.subscriptions.add(\n this.dsService\n .getLastActiveDatasetVersion(dataset.id)\n .pipe(take(1))\n .subscribe((version) => {\n if (version && version.producer) this.form.patchValue({ producer: version.producer });\n })\n );\n }\n\n clearMessage(): void {\n if (this.showMessage) this.showMessage = false;\n }\n\n protected readonly Object = Object;\n protected readonly PryDatasetType = PryDatasetType;\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=\"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\">{{ '@pry.import.normalize' | i18n }}</pry-checkbox>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-h3\">{{ '@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\">{{ '@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\">{{ '@pry.dataset.version.additionalInformation' | i18n }}</label>\n <pry-text-editor formControlName=\"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","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 consultDataset1: 'The import is in progress, see the ',\n consultDataset2: ' 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 consultDataset1: \"L'import est en cours, consultez la page du jeu de données \",\n consultDataset2: ' 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","i6.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,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