@provoly/dashboard 0.23.4 → 0.23.5
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/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 +14 -8
- 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 +7 -7
- 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) => {
|
|
@@ -9733,7 +9740,6 @@ class ToolboxMenuService {
|
|
|
9733
9740
|
description: widget.description,
|
|
9734
9741
|
isCustom: true,
|
|
9735
9742
|
visibility: widget.visibility,
|
|
9736
|
-
cover: widget.cover
|
|
9737
9743
|
}))
|
|
9738
9744
|
]
|
|
9739
9745
|
})));
|
|
@@ -10623,7 +10629,7 @@ class ManifestService {
|
|
|
10623
10629
|
.select(ConfigSelectors.refUrl)
|
|
10624
10630
|
.pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/users/me/dashboards/id/${id}/manifest`))));
|
|
10625
10631
|
}
|
|
10626
|
-
save(name, manifest, id, description, image,
|
|
10632
|
+
save(name, manifest, id, description, image, metadata, groups) {
|
|
10627
10633
|
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => {
|
|
10628
10634
|
return this.httpClient.post(encodeURI(`${url}/users/me/dashboards`), {
|
|
10629
10635
|
id,
|
|
@@ -10631,7 +10637,7 @@ class ManifestService {
|
|
|
10631
10637
|
description,
|
|
10632
10638
|
manifest,
|
|
10633
10639
|
image,
|
|
10634
|
-
cover,
|
|
10640
|
+
cover: true,
|
|
10635
10641
|
metadata,
|
|
10636
10642
|
datasource: ManifestUtils.getDatasourcesUsedByManifest(manifest).map((ds) => ds.datasetId),
|
|
10637
10643
|
groups
|
|
@@ -10943,7 +10949,7 @@ class DashboardEffects {
|
|
|
10943
10949
|
});
|
|
10944
10950
|
})), { dispatch: false });
|
|
10945
10951
|
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.
|
|
10952
|
+
.save(action.name, action.manifest ?? currentManifest, action.id, action.description, action.image, action.metadata, action.groups)
|
|
10947
10953
|
.pipe(tap((response) => {
|
|
10948
10954
|
this.snackBar.open({
|
|
10949
10955
|
message: this.translateService.instant('@pry.toolbox.manifest.saved', { viewId: action.name }),
|