@provoly/dashboard 0.23.4 → 0.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +7 -3
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +22 -5
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -3
- package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +12 -6
- package/esm2022/lib/core/components/share/share.utils.mjs +14 -8
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget.interface.mjs +1 -1
- package/esm2022/lib/core/store/config/config.service.mjs +2 -1
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +1 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +3 -3
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +5 -9
- package/esm2022/presentation/components/presentation.component.mjs +23 -4
- package/esm2022/presentation/i18n/fr.translations.mjs +1 -2
- package/esm2022/restitution/components/restitution/restitution.component.mjs +5 -11
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +3 -3
- package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +14 -5
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +5 -7
- package/esm2022/toolbox/components/share/share.component.mjs +2 -3
- package/fesm2022/provoly-dashboard-admin.mjs +20 -3
- 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-presentation.mjs +27 -13
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +7 -13
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +18 -11
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +27 -15
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/share/group-share/group-share.component.d.ts +3 -2
- package/lib/core/model/filter.interface.d.ts +1 -0
- package/lib/core/model/manifest.interface.d.ts +0 -2
- package/lib/core/model/widget.interface.d.ts +0 -1
- package/lib/dashboard/components/widgets/widget-placement/widget-placement.utils.d.ts +0 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +0 -2
- package/lib/dashboard/store/manifest.service.d.ts +1 -1
- package/package.json +43 -43
- package/presentation/components/presentation.component.d.ts +5 -0
- package/presentation/i18n/fr.translations.d.ts +0 -1
- package/styles/components/_a-label.scss +4 -0
- package/toolbox/components/filter-settings/filter-settings.component.d.ts +4 -14
|
@@ -3516,6 +3516,7 @@ class ConfigService {
|
|
|
3516
3516
|
saveWidget(widget) {
|
|
3517
3517
|
const params = {
|
|
3518
3518
|
...widget,
|
|
3519
|
+
cover: true,
|
|
3519
3520
|
datasource: widget.datasource.filter((ds) => ![DEFAULT_NAMED_QUERY_ID, EXPLORE_NAMED_QUERY_ID].includes(ds))
|
|
3520
3521
|
};
|
|
3521
3522
|
return this.store
|
|
@@ -7372,10 +7373,13 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
|
|
|
7372
7373
|
[PryVisibilityType.PUBLIC]: false
|
|
7373
7374
|
});
|
|
7374
7375
|
this._allowedGroups$ = new BehaviorSubject(undefined);
|
|
7376
|
+
this.radioValueChange = new EventEmitter();
|
|
7375
7377
|
this.store.dispatch(ConfigActions.loadAccessGroups());
|
|
7376
7378
|
this.groups$ = combineLatest([this.store.select(ConfigSelectors.accessGroups), this._allowedGroups$]).pipe(map(([groups, allowedGroups]) => groups
|
|
7377
7379
|
.filter((group) => group.name !== 'ALL')
|
|
7378
|
-
.filter((group) => allowedGroups?.includes('ALL') ||
|
|
7380
|
+
.filter((group) => allowedGroups?.includes('ALL') || allowedGroups?.includes('AUTHENTICATED') || !allowedGroups
|
|
7381
|
+
? true
|
|
7382
|
+
: allowedGroups.includes(group.name))));
|
|
7379
7383
|
this.assignedGroups$ = combineLatest([this.groups$, this.assignedGroupNames$]).pipe(map(([groups, groupNames]) => groups.filter((group) => {
|
|
7380
7384
|
return groupNames.includes(group.name);
|
|
7381
7385
|
}) ?? []));
|
|
@@ -7415,6 +7419,7 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
|
|
|
7415
7419
|
changeGroupsBasedOnRadioValue(type) {
|
|
7416
7420
|
if (this.radioValue !== type) {
|
|
7417
7421
|
this.radioValue = type;
|
|
7422
|
+
this.radioValueChange.emit(type);
|
|
7418
7423
|
switch (type) {
|
|
7419
7424
|
case PryVisibilityType.PRIVATE:
|
|
7420
7425
|
this.changeGroups([]);
|
|
@@ -7436,13 +7441,13 @@ class PryGroupShareComponent extends SubscriptionnerDirective {
|
|
|
7436
7441
|
}
|
|
7437
7442
|
}
|
|
7438
7443
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryGroupShareComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7439
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryGroupShareComponent, selector: "pry-group-share", inputs: { disableRadios: "disableRadios", allowedGroups: "allowedGroups" }, providers: [
|
|
7444
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: PryGroupShareComponent, selector: "pry-group-share", inputs: { disableRadios: "disableRadios", allowedGroups: "allowedGroups" }, outputs: { radioValueChange: "radioValueChange" }, providers: [
|
|
7440
7445
|
{
|
|
7441
7446
|
provide: NG_VALUE_ACCESSOR,
|
|
7442
7447
|
useExisting: forwardRef(() => PryGroupShareComponent),
|
|
7443
7448
|
multi: true
|
|
7444
7449
|
}
|
|
7445
|
-
], usesInheritance: true, ngImport: i0, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\"
|
|
7450
|
+
], usesInheritance: true, ngImport: i0, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [showActionButtons]=\"false\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event)\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n }\n}\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.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: i4.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ChipsSelectorComponent, selector: "pry-chips-selector", inputs: ["bindValue", "bindLabel", "translationStringBase", "itemTranslationStringBase", "showActionButtons", "showSearchbar", "items", "usedItems"], outputs: ["cancel", "validated", "previousTab", "nextTab", "itemsChanged"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7446
7451
|
}
|
|
7447
7452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryGroupShareComponent, decorators: [{
|
|
7448
7453
|
type: Component,
|
|
@@ -7452,11 +7457,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
7452
7457
|
useExisting: forwardRef(() => PryGroupShareComponent),
|
|
7453
7458
|
multi: true
|
|
7454
7459
|
}
|
|
7455
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\"
|
|
7460
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(templateData$ | async; as data) {\n <div class=\"m-form-radio-group\">\n <div *ngFor=\"let type of visibilityTypes\" class=\"m-form-radio-group__item\">\n <input\n type=\"radio\"\n name=\"visibility\"\n [id]=\"type.label\"\n [value]=\"type.value\"\n [ngModel]=\"radioValue\"\n (ngModelChange)=\"changeGroupsBasedOnRadioValue($event)\"\n [disabled]=\"data.disableRadios[type.value]\"\n />\n <label [for]=\"type.label\" class=\"a-label\" [class.a-label--disabled]=\"data.disableRadios[type.value]\">\n {{ '@pry.share.' + type.label | i18n }}\n </label>\n </div>\n </div>\n @if (radioValue === PryVisibilityType.RESTRICTED) {\n <pry-chips-selector\n bindLabel=\"name\"\n bindValue=\"name\"\n translationStringBase=\"@pry.components.chipsSelector.share.\"\n itemTranslationStringBase=\"@pry.components.chipsSelector.share.groups.\"\n [showActionButtons]=\"false\"\n [items]=\"data.groups\"\n (itemsChanged)=\"changeGroups($event)\"\n [usedItems]=\"data.assignedGroups\"\n [showSearchbar]=\"data.groups.length > 6\"\n ></pry-chips-selector>\n }\n}\n" }]
|
|
7456
7461
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ChangeDetectorRef }], propDecorators: { disableRadios: [{
|
|
7457
7462
|
type: Input
|
|
7458
7463
|
}], allowedGroups: [{
|
|
7459
7464
|
type: Input
|
|
7465
|
+
}], radioValueChange: [{
|
|
7466
|
+
type: Output
|
|
7460
7467
|
}] } });
|
|
7461
7468
|
|
|
7462
7469
|
const canManifestBeMadePublic = (manifest, datasets) => {
|
|
@@ -7466,13 +7473,19 @@ const canManifestBeMadePublic = (manifest, datasets) => {
|
|
|
7466
7473
|
});
|
|
7467
7474
|
};
|
|
7468
7475
|
const getCommonDatasourceGroupsForManifest = (manifest, datasets) => {
|
|
7469
|
-
|
|
7470
|
-
const
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
+
let result = [];
|
|
7477
|
+
const allDsGroups = manifest.datasource.map((dsId) => datasets.find((d) => d.id === dsId)?.groups ?? []);
|
|
7478
|
+
if (allDsGroups.every((dsGroups) => dsGroups.includes('AUTHENTICATED'))) {
|
|
7479
|
+
result = [...new Set(allDsGroups.flat())];
|
|
7480
|
+
}
|
|
7481
|
+
else {
|
|
7482
|
+
const allDsGroupsFiltered = allDsGroups.filter((dsGroups) => !dsGroups.includes('AUTHENTICATED') && !dsGroups.includes('ALL'));
|
|
7483
|
+
const baseArray = allDsGroupsFiltered[0];
|
|
7484
|
+
for (let i = 0; i < baseArray.length; i++) {
|
|
7485
|
+
const group = baseArray[i];
|
|
7486
|
+
if (allDsGroupsFiltered.every((dsGroups) => dsGroups.includes(group))) {
|
|
7487
|
+
result.push(group);
|
|
7488
|
+
}
|
|
7476
7489
|
}
|
|
7477
7490
|
}
|
|
7478
7491
|
return result;
|
|
@@ -9733,7 +9746,6 @@ class ToolboxMenuService {
|
|
|
9733
9746
|
description: widget.description,
|
|
9734
9747
|
isCustom: true,
|
|
9735
9748
|
visibility: widget.visibility,
|
|
9736
|
-
cover: widget.cover
|
|
9737
9749
|
}))
|
|
9738
9750
|
]
|
|
9739
9751
|
})));
|
|
@@ -10623,7 +10635,7 @@ class ManifestService {
|
|
|
10623
10635
|
.select(ConfigSelectors.refUrl)
|
|
10624
10636
|
.pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/users/me/dashboards/id/${id}/manifest`))));
|
|
10625
10637
|
}
|
|
10626
|
-
save(name, manifest, id, description, image,
|
|
10638
|
+
save(name, manifest, id, description, image, metadata, groups) {
|
|
10627
10639
|
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => {
|
|
10628
10640
|
return this.httpClient.post(encodeURI(`${url}/users/me/dashboards`), {
|
|
10629
10641
|
id,
|
|
@@ -10631,7 +10643,7 @@ class ManifestService {
|
|
|
10631
10643
|
description,
|
|
10632
10644
|
manifest,
|
|
10633
10645
|
image,
|
|
10634
|
-
cover,
|
|
10646
|
+
cover: true,
|
|
10635
10647
|
metadata,
|
|
10636
10648
|
datasource: ManifestUtils.getDatasourcesUsedByManifest(manifest).map((ds) => ds.datasetId),
|
|
10637
10649
|
groups
|
|
@@ -10943,7 +10955,7 @@ class DashboardEffects {
|
|
|
10943
10955
|
});
|
|
10944
10956
|
})), { dispatch: false });
|
|
10945
10957
|
this.saveManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.saveManifest), withLatestFrom(this.store.select(DashboardSelectors.globalManifest)), withLatestFrom(this.store.select(DataSourceSelectors.datasets)), mergeMap$1(([[action, currentManifest], datasets]) => this.manifestService
|
|
10946
|
-
.save(action.name, action.manifest ?? currentManifest, action.id, action.description, action.image, action.
|
|
10958
|
+
.save(action.name, action.manifest ?? currentManifest, action.id, action.description, action.image, action.metadata, action.groups)
|
|
10947
10959
|
.pipe(tap((response) => {
|
|
10948
10960
|
this.snackBar.open({
|
|
10949
10961
|
message: this.translateService.instant('@pry.toolbox.manifest.saved', { viewId: action.name }),
|