@provoly/dashboard 0.22.5 → 0.22.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/README.md +0 -2
- package/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.d.ts +8 -4
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +7 -6
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +44 -30
- package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/about/about.component.mjs +3 -3
- package/esm2022/lib/core/components/base-menu/base-menu.component.mjs +3 -3
- package/esm2022/lib/core/components/select/select.component.mjs +5 -4
- package/esm2022/lib/core/components/select/select.module.mjs +5 -4
- package/esm2022/lib/core/components/select-image/select-image.component.mjs +2 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +16 -1
- package/esm2022/lib/dashboard/item-utils.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +1 -4
- package/esm2022/lib/dashboard/store/refresh.service.mjs +14 -9
- package/esm2022/presentation/components/presentation.component.mjs +3 -3
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/automate-refresh/automate-refresh.component.mjs +12 -9
- package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +19 -17
- package/esm2022/toolbox/components/toolbox.component.mjs +7 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +3 -3
- package/esm2022/widgets/widget-aggregated-chart/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +4 -5
- package/esm2022/widgets/widget-graph/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +3 -3
- package/fesm2022/provoly-dashboard-admin.mjs +49 -34
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +4 -4
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +4 -4
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +29 -21
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +4 -4
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +5 -6
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +2 -2
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +56 -39
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/select/select.module.d.ts +2 -1
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +1 -1
- package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +8 -1
- package/lib/dashboard/store/dashboard.selectors.d.ts +0 -13
- package/lib/dashboard/store/refresh.service.d.ts +3 -1
- package/package.json +7 -7
- package/presentation/style/_o-pry-presentation.scss +0 -3
- package/styles/components/_a-chip.scss +6 -0
- package/styles/components/_a-pry-select.scss +13 -0
- package/styles/components/_a-range-slider.scss +4 -5
- package/styles/components/_m-nav-links.scss +2 -7
- package/styles/components/_o-widget.scss +6 -0
- package/styles-theme/abstracts-theme/variables/_variables-colors.scss +4 -3
- package/styles-theme/base-theme/_typography.theme.scss +5 -2
- package/styles-theme/components-theme/_a-btn.theme.scss +3 -7
- package/styles-theme/components-theme/_a-label.theme.scss +1 -0
- package/styles-theme/components-theme/_a-pry-select.theme.scss +4 -6
- package/styles-theme/components-theme/_a-range-slider.theme.scss +16 -16
- package/styles-theme/components-theme/_a-table.theme.scss +2 -2
- package/styles-theme/components-theme/_m-btn-sorttable.theme.scss +3 -3
- package/styles-theme/components-theme/_m-nav-links.theme.scss +18 -0
- package/styles-theme/components-theme/_o-pry-presentation.theme.scss +9 -0
- package/styles-theme/components-theme/_o-tabs.theme.scss +1 -1
- package/styles-theme/layout-theme/_o-base-layout.theme.scss +1 -0
- package/styles-theme/main-theme.scss +1 -0
- package/toolbox/components/automate-refresh/automate-refresh.component.d.ts +3 -1
- package/toolbox/components/refresh-datasets/refresh-datasets.component.d.ts +3 -2
- package/widgets/widget-aggregated-chart/style/_o-widget-chart.scss +3 -0
- package/widgets/widget-graph/component/widget-graph.component.d.ts +0 -1
- package/widgets/widget-graph/style/_o-widget-graph.scss +14 -0
|
@@ -9,7 +9,7 @@ import { EventEmitter, Component, Input, Output, ViewEncapsulation, TemplateRef,
|
|
|
9
9
|
import * as i4 from '@angular/forms';
|
|
10
10
|
import { FormsModule } from '@angular/forms';
|
|
11
11
|
import * as i3$1 from '@provoly/dashboard';
|
|
12
|
-
import { SubscriptionnerDirective, DashboardActions, ConfigActions, DashboardSelectors, DataSourceSelectors, ClassSelectors, FieldSelectors, FieldType, NamedQueryTypes, DataSourceActions, MIME_TYPE_RESULTSET, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils,
|
|
12
|
+
import { SubscriptionnerDirective, DashboardActions, ConfigActions, DashboardSelectors, DataSourceSelectors, ClassSelectors, FieldSelectors, FieldType, NamedQueryTypes, DataSourceActions, MIME_TYPE_RESULTSET, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils, SearchActions, PRY_ACCESS_TOKEN, PryOverlayModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryShareModule, PryI18nModule } from '@provoly/dashboard';
|
|
13
13
|
import * as i6 from '@provoly/dashboard/components/checkbox';
|
|
14
14
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
15
15
|
import * as i7$1 from '@provoly/dashboard/components/stepper';
|
|
@@ -668,15 +668,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
668
668
|
}] } });
|
|
669
669
|
|
|
670
670
|
class AutomateRefreshComponent extends ToolboxActionComponent {
|
|
671
|
-
constructor(store, overlay, viewContainerRef) {
|
|
671
|
+
constructor(store, overlay, viewContainerRef, widgetFactoryService) {
|
|
672
672
|
super(store);
|
|
673
673
|
this.overlay = overlay;
|
|
674
674
|
this.viewContainerRef = viewContainerRef;
|
|
675
|
+
this.widgetFactoryService = widgetFactoryService;
|
|
675
676
|
this.refreshRates = [0, 10, 30, 60];
|
|
676
677
|
this.selectedDatasourceId = '';
|
|
677
678
|
this.datasources$ = this.store
|
|
678
|
-
.select(DashboardSelectors.
|
|
679
|
-
.pipe(map((
|
|
679
|
+
.select(DashboardSelectors.globalManifest)
|
|
680
|
+
.pipe(map((manifest) => [
|
|
681
|
+
...new Set(this.widgetFactoryService.getObjectsToAutoLoad(manifest).datasources.map((ds) => ds.datasetId))
|
|
682
|
+
]));
|
|
680
683
|
}
|
|
681
684
|
ngOnInit() {
|
|
682
685
|
this.refreshRates$ = this.store.select(DashboardSelectors.refreshRates);
|
|
@@ -746,13 +749,13 @@ class AutomateRefreshComponent extends ToolboxActionComponent {
|
|
|
746
749
|
this.close();
|
|
747
750
|
}, 100);
|
|
748
751
|
}
|
|
749
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutomateRefreshComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
752
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutomateRefreshComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i3$1.WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
750
753
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutomateRefreshComponent, selector: "pry-automate-refresh", viewQueries: [{ propertyName: "datasourceList", first: true, predicate: ["datasourceList"], descendants: true, read: TemplateRef }, { propertyName: "refreshRateList", first: true, predicate: ["refreshRateList"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<pry-toolbox-css></pry-toolbox-css>\n<button\n type=\"button\"\n class=\"a-btn a-btn--secondary automate-btn\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDatasourceList()\"\n [disabled]=\"((datasources$ | async)?.length ?? 0) < 1\"\n>\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.automateRefresh' | i18n }}\n </ng-container>\n</button>\n\n<ng-template #datasourceList>\n <div *ngIf=\"datasources$ | async as dataSources\">\n <button\n *ngIf=\"dataSources.length > 0\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm ds-0\"\n (click)=\"toggleRefreshRateList('all', 0)\"\n [class.-selected]=\"selectedDatasourceId === 'all'\"\n >\n Tous\n </button>\n <button\n *ngFor=\"let datasourceId of dataSources; let i = index\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm ds-{{ i + 1 }}\"\n (click)=\"toggleRefreshRateList(datasourceId, i + 1)\"\n [class.-selected]=\"selectedDatasourceId === datasourceId\"\n >\n {{ datasourceId | translateId : { type: 'datasource', output: 'name' } | async }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #refreshRateList>\n <div>\n <button\n *ngFor=\"let rate of refreshRates\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm\"\n (click)=\"toggleRefreshRate(rate)\"\n >\n <pry-icon\n [width]=\"20\"\n [height]=\"20\"\n iconSvg=\"check\"\n *ngIf=\"\n (selectedDatasourceId === 'all'\n ? (allRefreshRate$ | async)\n : ((refreshRates$ | async) ?? {})[selectedDatasourceId] ?? 0) === rate\n \"\n ></pry-icon>\n {{ '@pry.search.namedQuery.refresh.' + rate | i18n }}\n </button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: PrySelectGridLayoutCssComponent, selector: "pry-toolbox-css" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
751
754
|
}
|
|
752
755
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutomateRefreshComponent, decorators: [{
|
|
753
756
|
type: Component,
|
|
754
757
|
args: [{ selector: 'pry-automate-refresh', template: "<pry-toolbox-css></pry-toolbox-css>\n<button\n type=\"button\"\n class=\"a-btn a-btn--secondary automate-btn\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"toggleDatasourceList()\"\n [disabled]=\"((datasources$ | async)?.length ?? 0) < 1\"\n>\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.automateRefresh' | i18n }}\n </ng-container>\n</button>\n\n<ng-template #datasourceList>\n <div *ngIf=\"datasources$ | async as dataSources\">\n <button\n *ngIf=\"dataSources.length > 0\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm ds-0\"\n (click)=\"toggleRefreshRateList('all', 0)\"\n [class.-selected]=\"selectedDatasourceId === 'all'\"\n >\n Tous\n </button>\n <button\n *ngFor=\"let datasourceId of dataSources; let i = index\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm ds-{{ i + 1 }}\"\n (click)=\"toggleRefreshRateList(datasourceId, i + 1)\"\n [class.-selected]=\"selectedDatasourceId === datasourceId\"\n >\n {{ datasourceId | translateId : { type: 'datasource', output: 'name' } | async }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #refreshRateList>\n <div>\n <button\n *ngFor=\"let rate of refreshRates\"\n class=\"refresh-line a-btn a-btn--icon-text -size-sm\"\n (click)=\"toggleRefreshRate(rate)\"\n >\n <pry-icon\n [width]=\"20\"\n [height]=\"20\"\n iconSvg=\"check\"\n *ngIf=\"\n (selectedDatasourceId === 'all'\n ? (allRefreshRate$ | async)\n : ((refreshRates$ | async) ?? {})[selectedDatasourceId] ?? 0) === rate\n \"\n ></pry-icon>\n {{ '@pry.search.namedQuery.refresh.' + rate | i18n }}\n </button>\n </div>\n</ng-template>\n" }]
|
|
755
|
-
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { datasourceList: [{
|
|
758
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i3$1.WidgetFactoryService }]; }, propDecorators: { datasourceList: [{
|
|
756
759
|
type: ViewChild,
|
|
757
760
|
args: ['datasourceList', { read: TemplateRef }]
|
|
758
761
|
}], refreshRateList: [{
|
|
@@ -761,8 +764,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
761
764
|
}] } });
|
|
762
765
|
|
|
763
766
|
class RefreshDatasetsComponent extends ToolboxActionComponent {
|
|
764
|
-
constructor(store) {
|
|
767
|
+
constructor(store, widgetFactoryService) {
|
|
765
768
|
super(store);
|
|
769
|
+
this.widgetFactoryService = widgetFactoryService;
|
|
766
770
|
this.datasetCount = 0;
|
|
767
771
|
this.manifest$ = this.store.select(DashboardSelectors.globalManifest);
|
|
768
772
|
this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.manifest = manifest)));
|
|
@@ -776,25 +780,26 @@ class RefreshDatasetsComponent extends ToolboxActionComponent {
|
|
|
776
780
|
}
|
|
777
781
|
refresh() {
|
|
778
782
|
if (this.manifest) {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
|
|
783
|
+
const dsAgg = this.widgetFactoryService.getObjectsToAutoLoad(this.manifest);
|
|
784
|
+
const actions = [
|
|
785
|
+
...dsAgg.datasources.map((ds) => SearchActions.getDatasourceItems({
|
|
786
|
+
id: ds.datasetId,
|
|
787
|
+
excludeGeo: ds.excludeGeo,
|
|
788
|
+
from: 'RefreshDatasetsComponent.refresh()'
|
|
789
|
+
})),
|
|
790
|
+
...dsAgg.aggregates.map((agg) => DashboardActions.triggerAggregate({ id: agg }))
|
|
791
|
+
];
|
|
792
|
+
actions.forEach((action) => this.store.dispatch(action));
|
|
788
793
|
}
|
|
789
794
|
this.close();
|
|
790
795
|
}
|
|
791
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RefreshDatasetsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RefreshDatasetsComponent, deps: [{ token: i1.Store }, { token: i3$1.WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
792
797
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RefreshDatasetsComponent, selector: "pry-refresh-datasets", usesInheritance: true, ngImport: i0, template: "<button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"refresh_data\"></pry-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
793
798
|
}
|
|
794
799
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RefreshDatasetsComponent, decorators: [{
|
|
795
800
|
type: Component,
|
|
796
801
|
args: [{ selector: 'pry-refresh-datasets', template: "<button type=\"button\" class=\"a-btn a-btn--secondary\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"refresh_data\"></pry-icon>\n</button>\n" }]
|
|
797
|
-
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
802
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i3$1.WidgetFactoryService }]; } });
|
|
798
803
|
|
|
799
804
|
class SwitchToEditContentComponent extends ToolboxActionComponent {
|
|
800
805
|
constructor(store) {
|
|
@@ -1051,9 +1056,12 @@ class ToolboxComponent {
|
|
|
1051
1056
|
];
|
|
1052
1057
|
this.isDropdownOpen = false;
|
|
1053
1058
|
this.presentation$ = store.select(DashboardSelectors.presentation);
|
|
1054
|
-
this.isManualMode$ =
|
|
1055
|
-
.select(DashboardSelectors.
|
|
1056
|
-
.
|
|
1059
|
+
this.isManualMode$ = combineLatest([
|
|
1060
|
+
store.select(DashboardSelectors.staticManifest),
|
|
1061
|
+
store.select(DashboardSelectors.gridLayout)
|
|
1062
|
+
]).pipe(map(([staticManifest, gridLayout]) => (staticManifest.windows[0]?.grid?.layout !== undefined
|
|
1063
|
+
? staticManifest.windows[0]?.grid?.layout
|
|
1064
|
+
: gridLayout) === DashboardGridLayout.MANUAL));
|
|
1057
1065
|
this.actionsAvailable$ = store.select(DashboardSelectors.displayOptions);
|
|
1058
1066
|
this.showEditToggle$ = this.actionsAvailable$.pipe(map((actions) => !!actions?.edit_toggle));
|
|
1059
1067
|
}
|