@provoly/dashboard 1.2.7 → 1.2.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 +16 -15
- package/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.d.ts +5 -16
- package/admin/components/admin-dataset/{shared/admin-form-dataset → admin-form-dataset}/admin-form-dataset.component.d.ts +8 -7
- package/admin/components/admin-dataset/store/admin-dataset.actions.d.ts +23 -18
- package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +9 -6
- package/admin/components/admin-dataset/store/admin-dataset.service.d.ts +2 -1
- package/admin/components/shared/add-category-modal/add-category-modal.component.d.ts +39 -0
- package/admin/i18n/en.translations.d.ts +23 -8
- package/admin/i18n/fr.translations.d.ts +23 -8
- package/dataset/components/dataset.component.d.ts +6 -2
- package/dataset/dataset.module.d.ts +1 -1
- package/dataset/i18n/en.translations.d.ts +8 -0
- package/dataset/i18n/fr.translations.d.ts +8 -0
- package/dataset/style/_o-pry-dataset-card.scss +19 -11
- package/dataset/style/_o-pry-dataset.scss +43 -11
- package/esm2022/admin/admin.module.mjs +7 -4
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +22 -53
- package/esm2022/admin/components/admin-dataset/admin-edit-dataset/admin-edit-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-dataset/admin-form-dataset/admin-form-dataset.component.mjs +115 -0
- package/esm2022/admin/components/admin-dataset/admin-new-dataset/admin-new-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -3
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.actions.mjs +11 -10
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.effects.mjs +2 -1
- package/esm2022/admin/components/admin-dataset/store/admin-dataset.service.mjs +10 -4
- package/esm2022/admin/components/shared/add-category-modal/add-category-modal.component.mjs +73 -0
- package/esm2022/admin/i18n/en.translations.mjs +25 -10
- package/esm2022/admin/i18n/fr.translations.mjs +26 -11
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +6 -6
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -3
- package/esm2022/dataset/components/dataset.component.mjs +16 -6
- package/esm2022/dataset/dataset.module.mjs +8 -5
- package/esm2022/dataset/i18n/en.translations.mjs +9 -1
- package/esm2022/dataset/i18n/fr.translations.mjs +10 -2
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/lib/core/components/share/access-rights-share/access-rights-share.component.mjs +1 -3
- package/esm2022/lib/core/components/share/access-rights-share-modal/access-rights-share-modal.component.mjs +11 -9
- package/esm2022/lib/core/components/share/share.utils.mjs +7 -4
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +4 -2
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +4 -1
- package/esm2022/lib/core/store/data-source/data-source.model.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.reducer.mjs +6 -2
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +4 -2
- package/esm2022/lib/core/store/data-source/data-source.service.mjs +6 -1
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +7 -1
- package/esm2022/toolbox/shared/presentation-form/presentation-form.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +194 -105
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +45 -16
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +8 -2
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +50 -16
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/share/share.utils.d.ts +1 -1
- package/lib/core/store/data-source/data-source.actions.d.ts +7 -0
- package/lib/core/store/data-source/data-source.effects.d.ts +3 -0
- package/lib/core/store/data-source/data-source.model.d.ts +3 -0
- package/lib/core/store/data-source/data-source.reducer.d.ts +2 -0
- package/lib/core/store/data-source/data-source.selectors.d.ts +1 -0
- package/lib/core/store/data-source/data-source.service.d.ts +2 -0
- package/package.json +48 -48
- package/styles/base/_typography.scss +4 -0
- package/styles/base/_utils.scss +27 -1
- package/styles/components/_a-btn.scss +4 -0
- package/styles/components/_a-chip.scss +1 -0
- package/styles/components/_o-modal.scss +0 -42
- package/styles/layout/_o-base-layout.scss +1 -7
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +0 -99
|
@@ -2223,7 +2223,15 @@ const enTranslations = {
|
|
|
2223
2223
|
consult: 'View',
|
|
2224
2224
|
title: 'Dataset catalog',
|
|
2225
2225
|
search: 'Search',
|
|
2226
|
+
searchPlaceholder: 'Enter your search',
|
|
2227
|
+
filter: 'Filter by category',
|
|
2228
|
+
filterPlaceholder: 'Enter categories',
|
|
2229
|
+
name: 'Name',
|
|
2226
2230
|
description: 'Description',
|
|
2231
|
+
noDescription: 'No description',
|
|
2232
|
+
tags: 'Tags',
|
|
2233
|
+
noTags: 'No associated tags',
|
|
2234
|
+
class: 'Class',
|
|
2227
2235
|
date: 'Date',
|
|
2228
2236
|
status: 'Status',
|
|
2229
2237
|
versionHistory: 'Version history',
|
|
@@ -2310,8 +2318,16 @@ const frTranslations = {
|
|
|
2310
2318
|
dataset: {
|
|
2311
2319
|
consult: 'Consulter',
|
|
2312
2320
|
title: 'Catalogue de données',
|
|
2313
|
-
search: 'Rechercher',
|
|
2321
|
+
search: 'Rechercher une donnée :',
|
|
2322
|
+
searchPlaceholder: 'Saisir votre recherche',
|
|
2323
|
+
filter: 'Filtrer par catégories :',
|
|
2324
|
+
filterPlaceholder: 'Saisir les catégories',
|
|
2325
|
+
name: 'Nom',
|
|
2314
2326
|
description: 'Description',
|
|
2327
|
+
noDescription: 'Pas de description',
|
|
2328
|
+
tags: 'Tags',
|
|
2329
|
+
noTags: 'Pas de tags associés',
|
|
2330
|
+
class: 'Modèle de données',
|
|
2315
2331
|
date: 'Date',
|
|
2316
2332
|
status: 'Statut',
|
|
2317
2333
|
versionHistory: 'Historique de versions',
|
|
@@ -2450,7 +2466,9 @@ const DataSourceActions = {
|
|
|
2450
2466
|
updateDatasetVersionInfoSuccess: createAction('[Dataset] Update Dataset version info success', props()),
|
|
2451
2467
|
confirmDeleteVersion: createAction('[Dataset] confirm Delete datasetVersion', props()),
|
|
2452
2468
|
deleteVersion: createAction('[Dataset] Delete datasetVersion', props()),
|
|
2453
|
-
deleteVersionFailure: createAction('[Dataset] Delete datasetVersion failure', props())
|
|
2469
|
+
deleteVersionFailure: createAction('[Dataset] Delete datasetVersion failure', props()),
|
|
2470
|
+
getCategories: createAction('[Dataset] Get Categories'),
|
|
2471
|
+
getCategoriesSuccess: createAction('[Dataset] Get Categories Success', props()),
|
|
2454
2472
|
}
|
|
2455
2473
|
};
|
|
2456
2474
|
|
|
@@ -2465,7 +2483,8 @@ const initialDataSourceState = {
|
|
|
2465
2483
|
datasets: [],
|
|
2466
2484
|
datasetVersions: [],
|
|
2467
2485
|
selectedDatasetVersion: null,
|
|
2468
|
-
previews: []
|
|
2486
|
+
previews: [],
|
|
2487
|
+
categories: []
|
|
2469
2488
|
};
|
|
2470
2489
|
const dataSourceReducer = createReducer(initialDataSourceState, on(DataSourceActions.namedQuery.load, (state) => ({ ...state, error: undefined, isLoading: true })), on(DataSourceActions.namedQuery.loaded, (state, action) => ({ ...state, list: action.list, isLoading: false })), on(DataSourceActions.namedQuery.delete, (state) => ({ ...state, error: undefined, isLoading: false })), on(DataSourceActions.namedQuery.failure, (state, action) => ({ ...state, error: action.error, isLoading: false })), on(DataSourceActions.namedQuery.openEdit, (state, action) => ({
|
|
2471
2490
|
...state,
|
|
@@ -2550,6 +2569,9 @@ const dataSourceReducer = createReducer(initialDataSourceState, on(DataSourceAct
|
|
|
2550
2569
|
})), on(DataSourceActions.dataset.updateDatasetVersionInfoSuccess, (state, action) => ({
|
|
2551
2570
|
...state,
|
|
2552
2571
|
datasetVersions: state.datasetVersions.map((version) => version.id === action.version.id ? { ...version, ...action.version } : version)
|
|
2572
|
+
})), on(DataSourceActions.dataset.getCategoriesSuccess, (state, { categories }) => ({
|
|
2573
|
+
...state,
|
|
2574
|
+
categories
|
|
2553
2575
|
})));
|
|
2554
2576
|
|
|
2555
2577
|
var NamedQueryTypes;
|
|
@@ -2626,6 +2648,7 @@ const matchingDatasetVersions = (datasetId) => {
|
|
|
2626
2648
|
return memoizeDatasetVersions[datasetId];
|
|
2627
2649
|
};
|
|
2628
2650
|
const datasetPreviews = createSelector(selectFeature, (state) => state?.previews ?? []);
|
|
2651
|
+
const categories$1 = createSelector(selectFeature, (state) => state.categories);
|
|
2629
2652
|
const DataSourceSelectors = {
|
|
2630
2653
|
selectFeature,
|
|
2631
2654
|
getNamedQuery,
|
|
@@ -2643,7 +2666,8 @@ const DataSourceSelectors = {
|
|
|
2643
2666
|
getDataSourcesSorted,
|
|
2644
2667
|
datasetVersions,
|
|
2645
2668
|
matchingDatasetVersions,
|
|
2646
|
-
datasetPreviews
|
|
2669
|
+
datasetPreviews,
|
|
2670
|
+
categories: categories$1
|
|
2647
2671
|
};
|
|
2648
2672
|
|
|
2649
2673
|
class PryModalStatusComponent {
|
|
@@ -4393,6 +4417,11 @@ class DataSourceService {
|
|
|
4393
4417
|
.select(ConfigSelectors.refUrl)
|
|
4394
4418
|
.pipe(switchMap((url) => this.httpClient.delete(encodeURI(`${url}/dataset-versions/id/${version.id}`))));
|
|
4395
4419
|
}
|
|
4420
|
+
getCategories() {
|
|
4421
|
+
return this.store
|
|
4422
|
+
.select(ConfigSelectors.refUrl)
|
|
4423
|
+
.pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/datasets/categories`))));
|
|
4424
|
+
}
|
|
4396
4425
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DataSourceService, deps: [{ token: i1.Store }, { token: i1$2.HttpClient }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4397
4426
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DataSourceService, providedIn: 'root' }); }
|
|
4398
4427
|
}
|
|
@@ -4511,6 +4540,9 @@ class DataSourceEffects {
|
|
|
4511
4540
|
this.pryDialog.open(PryDialogConfirmComponent, { data });
|
|
4512
4541
|
})), { dispatch: false });
|
|
4513
4542
|
this.deleteDatasetVersion$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.deleteVersion), switchMap((action) => this.dataSourceService.deleteDatasetVersion(action.version).pipe(mergeMap(() => [DataSourceActions.dataset.listVersionsByDatasetId({ id: action.version.dataset })]), catchError((err) => [DataSourceActions.dataset.deleteVersionFailure({ err })])))));
|
|
4543
|
+
this.getCategories$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.getCategories), mergeMap((action) => this.dataSourceService
|
|
4544
|
+
.getCategories()
|
|
4545
|
+
.pipe(map((categories) => DataSourceActions.dataset.getCategoriesSuccess({ categories }))))));
|
|
4514
4546
|
}
|
|
4515
4547
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DataSourceEffects, deps: [{ token: i1$3.Actions }, { token: SearchService }, { token: DataSourceService }, { token: PrySnackbarService }, { token: PryI18nService }, { token: i1.Store }, { token: PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4516
4548
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DataSourceEffects }); }
|
|
@@ -7429,11 +7461,14 @@ const canManifestBeMadePublic = (manifest, datasets) => {
|
|
|
7429
7461
|
return datasource?.groups?.includes(PUBLIC_GROUP) ?? false;
|
|
7430
7462
|
});
|
|
7431
7463
|
};
|
|
7432
|
-
const getCommonDatasourceGroupsForManifest = (manifest, datasets) => {
|
|
7464
|
+
const getCommonDatasourceGroupsForManifest = (manifest, datasets, allGroups) => {
|
|
7433
7465
|
let result = [];
|
|
7434
7466
|
const allDsGroups = manifest.datasource.map((dsId) => datasets.find((d) => d.id === dsId)?.groups ?? []);
|
|
7435
|
-
if (allDsGroups.every((dsGroups) => dsGroups.includes(
|
|
7436
|
-
result =
|
|
7467
|
+
if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP))) {
|
|
7468
|
+
result = allGroups.map((group) => group.name);
|
|
7469
|
+
}
|
|
7470
|
+
else if (allDsGroups.every((dsGroups) => dsGroups.includes(PUBLIC_GROUP) || dsGroups.includes(AUTHENTICATED_USERS_GROUP))) {
|
|
7471
|
+
result = allGroups.filter((group) => group.name !== PUBLIC_GROUP).map((group) => group.name);
|
|
7437
7472
|
}
|
|
7438
7473
|
else {
|
|
7439
7474
|
const allDsGroupsFiltered = allDsGroups.filter((dsGroups) => !dsGroups.includes(AUTHENTICATED_USERS_GROUP) && !dsGroups.includes(PUBLIC_GROUP));
|
|
@@ -7694,7 +7729,6 @@ class PryAccessRightsShareComponent extends SubscriptionnerDirective {
|
|
|
7694
7729
|
this.getGroupLabelByName = getGroupLabelByName;
|
|
7695
7730
|
this.PUBLIC_GROUP = PUBLIC_GROUP;
|
|
7696
7731
|
this.AUTHENTICATED_USERS_GROUP = AUTHENTICATED_USERS_GROUP;
|
|
7697
|
-
this.store.dispatch(ConfigActions.loadAccessGroups());
|
|
7698
7732
|
this.groups$ = combineLatest([
|
|
7699
7733
|
this.store.select(ConfigSelectors.accessGroups),
|
|
7700
7734
|
this._allowedGroups$,
|
|
@@ -7814,14 +7848,16 @@ class PryAccessRightsShareModalComponent {
|
|
|
7814
7848
|
this.accessRightsByGroup = {};
|
|
7815
7849
|
this.disableShareButton$ = new BehaviorSubject(false);
|
|
7816
7850
|
this.store.dispatch(DataSourceActions.dataset.loadDataset());
|
|
7851
|
+
this.store.dispatch(ConfigActions.loadAccessGroups());
|
|
7817
7852
|
this.manifest = this.data.manifest;
|
|
7818
7853
|
this.accessRightsByGroup = { ...this.manifest.accessRightsByGroup };
|
|
7819
7854
|
this.allowedShareGroups$ = combineLatest([
|
|
7820
7855
|
this.store.select(DataSourceSelectors.datasets),
|
|
7821
|
-
this.store.select(DashboardSelectors.currentManifest)
|
|
7822
|
-
|
|
7856
|
+
this.store.select(DashboardSelectors.currentManifest),
|
|
7857
|
+
this.store.select(ConfigSelectors.accessGroups)
|
|
7858
|
+
]).pipe(map(([datasets, current, groups]) => {
|
|
7823
7859
|
return current && current.datasource.length > 0
|
|
7824
|
-
? getCommonDatasourceGroupsForManifest(current, datasets)
|
|
7860
|
+
? getCommonDatasourceGroupsForManifest(current, datasets, groups)
|
|
7825
7861
|
: null;
|
|
7826
7862
|
}));
|
|
7827
7863
|
}
|
|
@@ -7841,11 +7877,9 @@ class PryAccessRightsShareModalComponent {
|
|
|
7841
7877
|
}
|
|
7842
7878
|
validate() {
|
|
7843
7879
|
this.store.dispatch(DashboardActions.saveManifest({
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
image: this.manifest.image ?? '',
|
|
7848
|
-
accessRightsByGroup: this.accessRightsByGroup
|
|
7880
|
+
...this.manifest,
|
|
7881
|
+
accessRightsByGroup: this.accessRightsByGroup,
|
|
7882
|
+
metadata: undefined
|
|
7849
7883
|
}));
|
|
7850
7884
|
this.toggleModal();
|
|
7851
7885
|
}
|