@provoly/dashboard 0.23.0 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/admin.module.d.ts +1 -1
- package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +12 -2
- package/admin/i18n/en.translations.d.ts +5 -0
- package/admin/i18n/fr.translations.d.ts +6 -0
- package/admin/store/admin.effects.d.ts +7 -1
- package/esm2022/admin/admin.module.mjs +8 -5
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +67 -36
- package/esm2022/admin/i18n/en.translations.mjs +7 -2
- package/esm2022/admin/i18n/fr.translations.mjs +9 -3
- package/esm2022/admin/store/admin.effects.mjs +17 -5
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -3
- package/esm2022/lib/core/components/chips-selector/chips-selector.component.mjs +6 -3
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +5 -4
- package/esm2022/lib/core/components/share/share.model.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.actions.mjs +2 -1
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +2 -8
- package/esm2022/lib/core/store/data-source/data-source.model.mjs +1 -1
- package/esm2022/lib/core/store/data-source/data-source.reducer.mjs +4 -1
- package/esm2022/lib/core/store/data-source/data-source.selectors.mjs +3 -1
- package/esm2022/lib/core/store/data-source/data-source.service.mjs +1 -1
- package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +97 -42
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +2 -2
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +18 -14
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/chips-selector/chips-selector.component.d.ts +2 -1
- package/lib/core/components/share/group-share/group-share.component.d.ts +4 -0
- package/lib/core/components/share/share.model.d.ts +6 -0
- package/lib/core/store/data-source/data-source.actions.d.ts +8 -3
- package/lib/core/store/data-source/data-source.effects.d.ts +3 -8
- package/lib/core/store/data-source/data-source.model.d.ts +2 -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 -1
- package/package.json +37 -37
- package/styles/components/_o-chips-selector.scss +12 -1
- package/styles/components/_o-modal.scss +1 -1
- package/styles/components/_o-pry-admin-dataset-select.scss +13 -0
- package/styles/components/_o-tabs.scss +0 -1
- package/styles/components/_o-widget.scss +1 -0
- package/styles/main.scss +1 -0
- package/styles-theme/components-theme/_a-btn.theme.scss +1 -1
- package/styles-theme/components-theme/_a-checkbox.theme.scss +5 -0
- package/styles-theme/components-theme/_a-chip.theme.scss +1 -1
- package/styles-theme/components-theme/_a-form-field.theme.scss +5 -0
- package/styles-theme/components-theme/_o-chips-selector.theme.scss +9 -0
- package/styles-theme/main-theme.scss +1 -0
|
@@ -13,14 +13,14 @@ import { concatLatestFrom, createEffect, ofType, EffectsModule } from '@ngrx/eff
|
|
|
13
13
|
import * as i1 from '@ngrx/store';
|
|
14
14
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
15
15
|
import * as i4 from '@provoly/dashboard';
|
|
16
|
-
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils, FIELD_OPTIONS, CategoryActions, CategorySelectors, DEFAULT_CATEGORY_UUID, DataSourceActions, DataSourceSelectors, PryDatasetType, ENV_OPTIONS, GeometricFieldTypes, META_OPTIONS, RelationTypesSelectors, RelationTypesActions, BaseMenuComponent, BaseLayoutComponent, PRY_ACCESS_GUARD, PryDialogConfirmComponent, PrySortModule, PryIconModule, PryModalModule, PryI18nModule, PryCoreModule, PrySelectModule, PryToggleModule, PryOverlayModule } from '@provoly/dashboard';
|
|
16
|
+
import { ClassSelectors, FieldSelectors, FieldType, ClassActions, FieldActions, SubscriptionnerDirective, ConfigSelectors, ConfigActions, DEFAULT_ICON_URL, IconPosition, compareOperationFunctions, ItemUtils, FIELD_OPTIONS, CategoryActions, CategorySelectors, DEFAULT_CATEGORY_UUID, DataSourceActions, DataSourceSelectors, PryDatasetType, ENV_OPTIONS, GeometricFieldTypes, DashboardSelectors, META_OPTIONS, RelationTypesSelectors, RelationTypesActions, BaseMenuComponent, BaseLayoutComponent, PRY_ACCESS_GUARD, PryDialogConfirmComponent, PrySortModule, PryIconModule, PryModalModule, PryI18nModule, PryCoreModule, PrySelectModule, PryToggleModule, PryOverlayModule, PryShareModule } from '@provoly/dashboard';
|
|
17
17
|
import * as i5$1 from '@provoly/dashboard/components/checkbox';
|
|
18
18
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i6 from '@provoly/dashboard/components/metadata-editor';
|
|
20
20
|
import { MetadataSelectors, MetadataActions, PryExpandPanelModule } from '@provoly/dashboard/components/metadata-editor';
|
|
21
21
|
import * as i2 from '@angular/router';
|
|
22
22
|
import { RouterModule } from '@angular/router';
|
|
23
|
-
import { switchMap, mergeMap, combineLatest, of, map, filter, BehaviorSubject, combineLatestWith, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounceTime, startWith, Subject, zip, takeUntil, catchError,
|
|
23
|
+
import { switchMap, mergeMap, combineLatest, of, map, filter, BehaviorSubject, combineLatestWith, Subscription, distinctUntilChanged as distinctUntilChanged$1, debounceTime, startWith, Subject, zip, withLatestFrom, takeUntil, catchError, tap } from 'rxjs';
|
|
24
24
|
import { v4 } from 'uuid';
|
|
25
25
|
import equal from 'fast-deep-equal/es6';
|
|
26
26
|
import { distinctUntilChanged, map as map$1, filter as filter$1, mergeMap as mergeMap$1, catchError as catchError$1 } from 'rxjs/operators';
|
|
@@ -2766,49 +2766,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
2766
2766
|
|
|
2767
2767
|
class AdminSelectDatasetComponent extends SubscriptionnerDirective {
|
|
2768
2768
|
static { this.id = 'AdminSelectDatasetComponent'; }
|
|
2769
|
-
constructor(store, router, route) {
|
|
2769
|
+
constructor(store, router, route, i18n) {
|
|
2770
2770
|
super();
|
|
2771
2771
|
this.store = store;
|
|
2772
2772
|
this.router = router;
|
|
2773
2773
|
this.route = route;
|
|
2774
|
+
this.i18n = i18n;
|
|
2774
2775
|
this.sub = new Subscription();
|
|
2775
2776
|
this.currentTypeTranslation = '';
|
|
2777
|
+
this.accessGroups = [];
|
|
2776
2778
|
this.store.dispatch(MetadataActions.loadMetadata());
|
|
2777
2779
|
this.selectedDataset$ = this.store.select(DataSourceSelectors.selectedDataset);
|
|
2778
2780
|
this.datasetMetadata$ = this.store.select(DataSourceSelectors.selectedDatasetMetadata);
|
|
2779
2781
|
this.associations$ = this.store.select(AdminSelectors.selectedAssociation);
|
|
2780
2782
|
this.editable$ = this.store.select(MetadataSelectors.editable);
|
|
2783
|
+
this.conflictGroups$ = this.store.select(DataSourceSelectors.selectedDatasetConflictGroups).pipe(withLatestFrom(this.store.select(DashboardSelectors.manifestsList)), map(([conflict, manifests]) => {
|
|
2784
|
+
const result = {};
|
|
2785
|
+
Object.keys(conflict ?? {}).forEach((entityId) => {
|
|
2786
|
+
result[entityId] = {
|
|
2787
|
+
groups: conflict?.[entityId] ?? [],
|
|
2788
|
+
entityName: manifests.find((m) => m.id === entityId)?.name ?? entityId
|
|
2789
|
+
};
|
|
2790
|
+
});
|
|
2791
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
2792
|
+
}));
|
|
2781
2793
|
}
|
|
2782
2794
|
ngOnInit() {
|
|
2783
2795
|
this.subscriptions.add(this.selectedDataset$.subscribe((dataset) => {
|
|
2784
2796
|
if (dataset) {
|
|
2797
|
+
this.accessGroups = dataset?.groups ?? [];
|
|
2785
2798
|
const editPath = this.router.createUrlTree(['.', 'dataset', 'edit', dataset.id], {
|
|
2786
2799
|
relativeTo: this.route
|
|
2787
2800
|
});
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2801
|
+
if (dataset.owner) {
|
|
2802
|
+
this.store.dispatch(AdminActions.mainActions({
|
|
2803
|
+
actions: [
|
|
2804
|
+
{
|
|
2805
|
+
action: AdminActions.routeTo({ path: editPath.toString() }),
|
|
2806
|
+
label: 'edit',
|
|
2807
|
+
icon: 'edit',
|
|
2808
|
+
moduleAccess: 'admin',
|
|
2809
|
+
pageAccess: 'dataset',
|
|
2810
|
+
actionAccess: 'write'
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
action: DataSourceActions.dataset.confirmDataSourceDeletion({
|
|
2814
|
+
name: dataset.id,
|
|
2815
|
+
route: this.router.createUrlTree(['.', 'dataset'], { relativeTo: this.route }).toString(),
|
|
2816
|
+
addRoute: this.router
|
|
2817
|
+
.createUrlTree(['.', 'dataset', 'new'], { relativeTo: this.route })
|
|
2818
|
+
.toString()
|
|
2819
|
+
}),
|
|
2820
|
+
label: 'delete',
|
|
2821
|
+
icon: 'delete',
|
|
2822
|
+
moduleAccess: 'admin',
|
|
2823
|
+
pageAccess: 'dataset',
|
|
2824
|
+
actionAccess: 'write'
|
|
2825
|
+
}
|
|
2826
|
+
]
|
|
2827
|
+
}));
|
|
2828
|
+
}
|
|
2829
|
+
else {
|
|
2830
|
+
this.store.dispatch(AdminActions.mainActions({
|
|
2831
|
+
actions: []
|
|
2832
|
+
}));
|
|
2833
|
+
}
|
|
2812
2834
|
}
|
|
2813
2835
|
}));
|
|
2814
2836
|
}
|
|
@@ -2839,13 +2861,21 @@ class AdminSelectDatasetComponent extends SubscriptionnerDirective {
|
|
|
2839
2861
|
value: metadata.value
|
|
2840
2862
|
}));
|
|
2841
2863
|
}
|
|
2842
|
-
|
|
2843
|
-
|
|
2864
|
+
share(dataset) {
|
|
2865
|
+
this.store.dispatch(DataSourceActions.dataset.update({ dataset: { ...dataset, groups: this.accessGroups }, route: '' }));
|
|
2866
|
+
}
|
|
2867
|
+
getGroupLabel(groupName) {
|
|
2868
|
+
const i18nBase = '@pry.components.chipsSelector.share.groups.';
|
|
2869
|
+
const label = this.i18n.instant(i18nBase + groupName);
|
|
2870
|
+
return label.startsWith(i18nBase) ? groupName : label;
|
|
2871
|
+
}
|
|
2872
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminSelectDatasetComponent, deps: [{ token: i1.Store }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i4.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2873
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: AdminSelectDatasetComponent, selector: "pry-admin-select-dataset", usesInheritance: true, ngImport: i0, template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.details' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"datasetMetadata\" name=\"metadata.title\"></pry-tab>\n <pry-tab [templateRef]=\"datasetAssociations\" name=\"classes.associations\"></pry-tab>\n <pry-tab *ngIf=\"dataset.owner\" [templateRef]=\"shareDataset\" name=\"share\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #datasetMetadata>\n <pry-metadata-editor\n [targetId]=\"(selectedDataset$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(datasetMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addDatasetMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #datasetAssociations>\n <div *ngIf=\"associations$ | async as associations\" class=\"o-tabs__panels__item__content\">\n <h4 class=\"a-h4\">{{ '@pry.admin.classes.associations' | i18n }}</h4>\n <pry-association [associations]=\"associations\"></pry-association>\n </div>\n </ng-template>\n\n <ng-template #shareDataset>\n <div class=\"o-pry-admin-dataset-select__share\">\n <pry-group-share [ngModel]=\"dataset.groups\" (ngModelChange)=\"accessGroups = $event\"></pry-group-share>\n <button type=\"submit\" class=\"a-btn a-btn--primary u-self-end\" #submit (click)=\"share(dataset)\">\n {{ '@pry.admin.validate' | i18n }}\n </button>\n @if(conflictGroups$ | async; as conflictGroups) {\n <div class=\"u-display-flex -column\">\n <span>{{ '@pry.admin.dataset.conflict' | i18n }}</span>\n @for(conflict of conflictGroups | keyvalue; track conflict.key) {\n <div>\n {{ '@pry.admin.dataset.entities.dashboard' | i18n }} <strong>{{ conflict.value.entityName }}</strong>\n <div class=\"u-display-flex\">\n @for(group of conflict.value.groups; track group) {\n <span class=\"a-chip\">{{ getGroupLabel(group) }}</span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"] }, { kind: "component", type: i4.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.PryMetadataEditorComponent, selector: "pry-metadata-editor", inputs: ["isModification", "targetId", "type", "metadata"], outputs: ["addMeta", "removeMeta"] }, { kind: "component", type: i4.PryGroupShareComponent, selector: "pry-group-share" }, { kind: "component", type: PryAssociationComponent, selector: "pry-association", inputs: ["associations"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
2844
2874
|
}
|
|
2845
2875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminSelectDatasetComponent, decorators: [{
|
|
2846
2876
|
type: Component,
|
|
2847
|
-
args: [{ selector: 'pry-admin-select-dataset', template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.
|
|
2848
|
-
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }] });
|
|
2877
|
+
args: [{ selector: 'pry-admin-select-dataset', template: "<div\n *ngIf=\"selectedDataset$ | async as dataset\"\n [id]=\"'panel-dataset-' + dataset.id\"\n [attr.aria-labelledby]=\"'button-dataset-' + dataset.id\"\n class=\"o-panel o-pry-admin-dataset-select\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 class=\"a-h3\">\n {{ '@pry.admin.dataset.details' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"datasetMetadata\" name=\"metadata.title\"></pry-tab>\n <pry-tab [templateRef]=\"datasetAssociations\" name=\"classes.associations\"></pry-tab>\n <pry-tab *ngIf=\"dataset.owner\" [templateRef]=\"shareDataset\" name=\"share\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #datasetMetadata>\n <pry-metadata-editor\n [targetId]=\"(selectedDataset$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(datasetMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addDatasetMetadata($event)\"\n [type]=\"'meta'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #datasetAssociations>\n <div *ngIf=\"associations$ | async as associations\" class=\"o-tabs__panels__item__content\">\n <h4 class=\"a-h4\">{{ '@pry.admin.classes.associations' | i18n }}</h4>\n <pry-association [associations]=\"associations\"></pry-association>\n </div>\n </ng-template>\n\n <ng-template #shareDataset>\n <div class=\"o-pry-admin-dataset-select__share\">\n <pry-group-share [ngModel]=\"dataset.groups\" (ngModelChange)=\"accessGroups = $event\"></pry-group-share>\n <button type=\"submit\" class=\"a-btn a-btn--primary u-self-end\" #submit (click)=\"share(dataset)\">\n {{ '@pry.admin.validate' | i18n }}\n </button>\n @if(conflictGroups$ | async; as conflictGroups) {\n <div class=\"u-display-flex -column\">\n <span>{{ '@pry.admin.dataset.conflict' | i18n }}</span>\n @for(conflict of conflictGroups | keyvalue; track conflict.key) {\n <div>\n {{ '@pry.admin.dataset.entities.dashboard' | i18n }} <strong>{{ conflict.value.entityName }}</strong>\n <div class=\"u-display-flex\">\n @for(group of conflict.value.groups; track group) {\n <span class=\"a-chip\">{{ getGroupLabel(group) }}</span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n" }]
|
|
2878
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i4.PryI18nService }] });
|
|
2849
2879
|
|
|
2850
2880
|
class AdminEnvironmentSelectComponent {
|
|
2851
2881
|
static { this.id = 'AdminEnvironmentSelectComponent'; }
|
|
@@ -3516,7 +3546,7 @@ class AdminUserSelectComponent {
|
|
|
3516
3546
|
this.tab = number;
|
|
3517
3547
|
}
|
|
3518
3548
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminUserSelectComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3519
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: AdminUserSelectComponent, selector: "pry-admin-user-select", inputs: { profil: "profil" }, ngImport: i0, template: "<div\n *ngIf=\"selectedUser$ | async as user\"\n [id]=\"'panel-user-' + user.id\"\n [attr.aria-labelledby]=\"'button-user-' + user.id\"\n class=\"o-panel\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 [id]=\"'tab-title-' + compId\" class=\"a-h3\">\n {{ '@pry.admin.userInfo.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"userProfile\" name=\"userInfo.profile\"></pry-tab>\n <pry-tab [templateRef]=\"userDetails\" name=\"details\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #userProfile>\n <pry-metadata-editor\n [targetId]=\"(selectedUser$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(userMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadataUser($event)\"\n [type]=\"'user'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #userDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.name' | i18n }} :\n <strong>{{ user?.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.familyName' | i18n }} :\n <strong>{{ user.familyName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.email' | i18n }} :\n <strong>{{ user.email }}</strong>\n </p>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"] }, { kind: "component", type: i4.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type:
|
|
3549
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: AdminUserSelectComponent, selector: "pry-admin-user-select", inputs: { profil: "profil" }, ngImport: i0, template: "<div\n *ngIf=\"selectedUser$ | async as user\"\n [id]=\"'panel-user-' + user.id\"\n [attr.aria-labelledby]=\"'button-user-' + user.id\"\n class=\"o-panel\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n\n <h3 [id]=\"'tab-title-' + compId\" class=\"a-h3\">\n {{ '@pry.admin.userInfo.info' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.admin.\">\n <pry-tab [templateRef]=\"userProfile\" name=\"userInfo.profile\"></pry-tab>\n <pry-tab [templateRef]=\"userDetails\" name=\"details\"></pry-tab>\n </pry-tab-group>\n\n <ng-template #userProfile>\n <pry-metadata-editor\n [targetId]=\"(selectedUser$ | async)?.id ?? ''\"\n [isModification]=\"(editable$ | async) ?? false\"\n [metadata]=\"(userMetadata$ | async) ?? []\"\n (removeMeta)=\"removeMetadata($event)\"\n (addMeta)=\"addMetadataUser($event)\"\n [type]=\"'user'\"\n ></pry-metadata-editor>\n </ng-template>\n\n <ng-template #userDetails>\n <h4 class=\"a-h4\">{{ '@pry.admin.properties' | i18n }}</h4>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.name' | i18n }} :\n <strong>{{ user?.name }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.familyName' | i18n }} :\n <strong>{{ user.familyName }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.admin.userInfo.email' | i18n }} :\n <strong>{{ user.email }}</strong>\n </p>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"] }, { kind: "component", type: i4.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryMetadataEditorComponent, selector: "pry-metadata-editor", inputs: ["isModification", "targetId", "type", "metadata"], outputs: ["addMeta", "removeMeta"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
3520
3550
|
}
|
|
3521
3551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminUserSelectComponent, decorators: [{
|
|
3522
3552
|
type: Component,
|
|
@@ -5932,6 +5962,7 @@ const enTranslations = {
|
|
|
5932
5962
|
dataset: {
|
|
5933
5963
|
delete: 'All versions and associated data will be deleted. Restitutions and presentations using this dataset will no longer display the corresponding data. Do you confirm the deletion?',
|
|
5934
5964
|
title: 'Dataset',
|
|
5965
|
+
details: 'Dataset details',
|
|
5935
5966
|
id: 'Id',
|
|
5936
5967
|
name: 'Name',
|
|
5937
5968
|
oClass: 'Business model',
|
|
@@ -5945,7 +5976,11 @@ const enTranslations = {
|
|
|
5945
5976
|
},
|
|
5946
5977
|
OPEN: 'Open',
|
|
5947
5978
|
CLOSED: 'Closed',
|
|
5948
|
-
MODIFIABLE: 'Modifiable'
|
|
5979
|
+
MODIFIABLE: 'Modifiable',
|
|
5980
|
+
conflict: 'Careful, the following dashboards are shared to groups which can no longer access this datasource:',
|
|
5981
|
+
entities: {
|
|
5982
|
+
dashboard: 'Dashboard'
|
|
5983
|
+
}
|
|
5949
5984
|
},
|
|
5950
5985
|
'abac-rules': {
|
|
5951
5986
|
delete: 'Delete',
|
|
@@ -6180,6 +6215,7 @@ const frTranslations = {
|
|
|
6180
6215
|
addAttribute: 'Ajouter un attribut',
|
|
6181
6216
|
create: 'Créer',
|
|
6182
6217
|
upload: 'Ajouter une image',
|
|
6218
|
+
share: 'Partager',
|
|
6183
6219
|
cancel: 'Annuler',
|
|
6184
6220
|
back: 'Retour',
|
|
6185
6221
|
next: 'Suivant',
|
|
@@ -6300,6 +6336,7 @@ const frTranslations = {
|
|
|
6300
6336
|
dataset: {
|
|
6301
6337
|
delete: "L'ensemble des versions et des données associées seront supprimées. Les restitutions et présentations utilisant ce jeu de données n'afficheront plus les données correspondantes. Confirmez-vous la suppression ?",
|
|
6302
6338
|
title: 'Jeux de données',
|
|
6339
|
+
details: 'Détails du jeu de données',
|
|
6303
6340
|
id: 'Identifiant',
|
|
6304
6341
|
name: 'Nom',
|
|
6305
6342
|
oClass: 'Modèle métier',
|
|
@@ -6313,7 +6350,11 @@ const frTranslations = {
|
|
|
6313
6350
|
},
|
|
6314
6351
|
OPEN: 'Ouvert',
|
|
6315
6352
|
CLOSED: 'Fermé',
|
|
6316
|
-
MODIFIABLE: 'Modifiable'
|
|
6353
|
+
MODIFIABLE: 'Modifiable',
|
|
6354
|
+
conflict: "Attention les tableaux de bord suivant sont partagés à des groupes qui n'auront plus accès aux données :",
|
|
6355
|
+
entities: {
|
|
6356
|
+
dashboard: 'Tableaux de bord'
|
|
6357
|
+
}
|
|
6317
6358
|
},
|
|
6318
6359
|
'abac-rules': {
|
|
6319
6360
|
delete: 'Supprimer',
|
|
@@ -6516,7 +6557,7 @@ const frTranslations = {
|
|
|
6516
6557
|
label: 'Base de stockage',
|
|
6517
6558
|
description: {
|
|
6518
6559
|
POSTGIS: "Ce stockage est conseillé en cas de stockage de données géographique complexes ou dans des systèmes de coordonnées différents de WGS 84. Il est recommandé de ne stocker dans cette base que des modèles métier dont la volumétrie de données estimée (en terme de nombre d'items) n'est pas trop élevée.",
|
|
6519
|
-
ELASTIC:
|
|
6560
|
+
ELASTIC: "Ce stockage est conseillé en cas de forte volumétrie de données prévue pour ce modèle métier (grand nombre d'items). Si vous souhaitez stocker des données géographiques dans ce modèle, des formes simples sont conseillées et le système de coordonnées de référence utilisé doit être WGS 84. Ce système de stockage offre une scalabilité horizontale"
|
|
6520
6561
|
},
|
|
6521
6562
|
options: {
|
|
6522
6563
|
POSTGIS: 'PostGIS',
|
|
@@ -6535,10 +6576,11 @@ const frTranslations = {
|
|
|
6535
6576
|
};
|
|
6536
6577
|
|
|
6537
6578
|
class AdminEffects {
|
|
6538
|
-
constructor(actions$, service, router) {
|
|
6579
|
+
constructor(actions$, service, router, dsService) {
|
|
6539
6580
|
this.actions$ = actions$;
|
|
6540
6581
|
this.service = service;
|
|
6541
6582
|
this.router = router;
|
|
6583
|
+
this.dsService = dsService;
|
|
6542
6584
|
this.routeTo$ = createEffect(() => this.actions$.pipe(ofType(AdminActions.routeTo, DataSourceActions.dataset.created, DataSourceActions.dataset.updated), mergeMap((action) => {
|
|
6543
6585
|
this.router.navigate([action.path], { queryParams: action.params });
|
|
6544
6586
|
return action.path === this.router.url ? [] : [AdminActions.resetActions()];
|
|
@@ -6590,13 +6632,23 @@ class AdminEffects {
|
|
|
6590
6632
|
this.fetchFieldAssociations$ = createEffect(() => this.actions$.pipe(ofType(AdminActions.fetchFieldAssociations), mergeMap((action) => this.service.getFieldAssociations(action.id).pipe(map((association) => AdminActions.fetchAssociationsSuccess({ association })), catchError((error) => [AdminActions.fetchAssociationsFailure({ error: error })])))));
|
|
6591
6633
|
this.fetchDatasetAssociations$ = createEffect(() => this.actions$.pipe(ofType(AdminActions.fetchDatasetAssociations), mergeMap((action) => this.service.getDatasetAssociations(action.id).pipe(map((association) => AdminActions.fetchAssociationsSuccess({ association })), catchError((error) => [AdminActions.fetchAssociationsFailure({ error: error })])))));
|
|
6592
6634
|
this.fetchAttributeAssociations$ = createEffect(() => this.actions$.pipe(ofType(AdminActions.fetchAttributeAssociations), mergeMap((action) => this.service.getAttributeAssociations(action.id).pipe(map((association) => AdminActions.fetchAssociationsSuccess({ association })), catchError((error) => [AdminActions.fetchAssociationsFailure({ error: error })])))));
|
|
6635
|
+
// TODO move this effect into an admin-datasource store (provoly-dashboard#586)
|
|
6636
|
+
this.updateDataset$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.update), switchMap((action) => this.dsService.updateDataset(action.dataset).pipe(mergeMap((conflict) => {
|
|
6637
|
+
let actions = [
|
|
6638
|
+
DataSourceActions.dataset.setConflictGroups({ conflictGroups: conflict?.conflictGroupsByEntity }),
|
|
6639
|
+
DataSourceActions.dataset.loadDataset()
|
|
6640
|
+
];
|
|
6641
|
+
if (action.route)
|
|
6642
|
+
actions.push(DataSourceActions.dataset.unselectDataset(), AdminActions.routeTo({ path: action.route }));
|
|
6643
|
+
return actions;
|
|
6644
|
+
}))), catchError((error) => [DataSourceActions.dataset.failure({ error })])));
|
|
6593
6645
|
}
|
|
6594
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminEffects, deps: [{ token: i1$2.Actions }, { token: AdminService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6646
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminEffects, deps: [{ token: i1$2.Actions }, { token: AdminService }, { token: i2.Router }, { token: i4.DataSourceService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6595
6647
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminEffects }); }
|
|
6596
6648
|
}
|
|
6597
6649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: AdminEffects, decorators: [{
|
|
6598
6650
|
type: Injectable
|
|
6599
|
-
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: AdminService }, { type: i2.Router }] });
|
|
6651
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: AdminService }, { type: i2.Router }, { type: i4.DataSourceService }] });
|
|
6600
6652
|
|
|
6601
6653
|
class PryAdminModule {
|
|
6602
6654
|
constructor(pryTranslateService) {
|
|
@@ -6694,7 +6746,8 @@ class PryAdminModule {
|
|
|
6694
6746
|
PryI18nModule,
|
|
6695
6747
|
PryExpandPanelModule,
|
|
6696
6748
|
PrySinceDateModule,
|
|
6697
|
-
PryDatasetModule
|
|
6749
|
+
PryDatasetModule,
|
|
6750
|
+
PryShareModule] }); }
|
|
6698
6751
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryAdminModule, providers: [DatePipe], imports: [CommonModule,
|
|
6699
6752
|
PryCoreModule,
|
|
6700
6753
|
AdminRoutingModule,
|
|
@@ -6733,7 +6786,8 @@ class PryAdminModule {
|
|
|
6733
6786
|
PryI18nModule,
|
|
6734
6787
|
PryExpandPanelModule,
|
|
6735
6788
|
PrySinceDateModule,
|
|
6736
|
-
PryDatasetModule
|
|
6789
|
+
PryDatasetModule,
|
|
6790
|
+
PryShareModule] }); }
|
|
6737
6791
|
}
|
|
6738
6792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryAdminModule, decorators: [{
|
|
6739
6793
|
type: NgModule,
|
|
@@ -6853,7 +6907,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
6853
6907
|
PryI18nModule,
|
|
6854
6908
|
PryExpandPanelModule,
|
|
6855
6909
|
PrySinceDateModule,
|
|
6856
|
-
PryDatasetModule
|
|
6910
|
+
PryDatasetModule,
|
|
6911
|
+
PryShareModule
|
|
6857
6912
|
]
|
|
6858
6913
|
}]
|
|
6859
6914
|
}], ctorParameters: () => [{ type: i4.PryI18nService }] });
|