@provoly/dashboard 0.13.11 → 0.13.13
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-classes/admin-classes-customize/admin-classes-customize.component.d.ts +0 -2
- package/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.d.ts +0 -1
- package/admin/components/admin-classes/admin-classes-select/admin-classes-select.component.d.ts +0 -3
- package/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.d.ts +0 -2
- package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +0 -3
- package/admin/components/admin-environment/admin-environment-select/admin-environment-select.component.d.ts +0 -3
- package/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.d.ts +0 -3
- package/admin/components/admin-metadata/admin-select-metadata/admin-select-metadata.component.d.ts +0 -2
- package/admin/components/admin-metadata-rules/admin-select-metadata-rules/admin-select-metadata-rules.component.d.ts +0 -2
- package/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.d.ts +0 -2
- package/admin/components/admin-predicates/admin-predicates-select/admin-predicates-select.component.d.ts +0 -2
- package/admin/components/admin-relation-types/admin-relation-types-select/admin-relation-types-select.component.d.ts +0 -2
- package/admin/components/association/association.component.d.ts +1 -1
- package/dataset/style/_o-pry-dataset-detail.scss +17 -7
- package/dataset/style/_o-pry-dataset.scss +9 -6
- package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +7 -9
- package/esm2022/admin/components/admin-classes/admin-classes-customize/symbol/admin-classes-customize-symbol.component.mjs +3 -3
- package/esm2022/admin/components/admin-classes/admin-classes-customize/tooltip/admin-classes-customize-tooltip.component.mjs +3 -4
- package/esm2022/admin/components/admin-classes/admin-classes-select/admin-classes-select.component.mjs +3 -9
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-select/admin-attributes-select.component.mjs +4 -9
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -9
- package/esm2022/admin/components/admin-environment/admin-environment-select/admin-environment-select.component.mjs +3 -9
- package/esm2022/admin/components/admin-fields/admin-fields-select/admin-fields-select.component.mjs +3 -9
- package/esm2022/admin/components/admin-metadata/admin-select-metadata/admin-select-metadata.component.mjs +3 -6
- package/esm2022/admin/components/admin-metadata-rules/admin-select-metadata-rules/admin-select-metadata-rules.component.mjs +3 -6
- package/esm2022/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.mjs +3 -6
- package/esm2022/admin/components/admin-predicates/admin-predicates-select/admin-predicates-select.component.mjs +3 -6
- package/esm2022/admin/components/admin-relation-types/admin-relation-types-select/admin-relation-types-select.component.mjs +3 -6
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +3 -3
- package/esm2022/admin/components/association/association.component.mjs +1 -1
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +4 -4
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +6 -5
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/lib/core/components/base-toolbox/base-toolbox.component.mjs +3 -3
- package/esm2022/lib/core/components/tabs/tab-group.component.mjs +36 -0
- package/esm2022/lib/core/components/tabs/tab.component.mjs +23 -0
- package/esm2022/lib/core/core.module.mjs +27 -33
- package/esm2022/lib/core/public-api.mjs +7 -5
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -1
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +10 -1
- package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.mjs +3 -6
- package/esm2022/toolbox/components/toolbox.component.mjs +27 -18
- package/esm2022/toolbox/toolbox.model.mjs +6 -6
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +8 -72
- package/esm2022/widgets/widget-map/i18n/en.translations.mjs +1 -6
- package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +1 -6
- package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +1 -9
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +1 -47
- package/fesm2022/provoly-dashboard-admin.mjs +30 -77
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +3 -3
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +7 -6
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-supervision.mjs +2 -5
- package/fesm2022/provoly-dashboard-supervision.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +60 -51
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +11 -310
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +89 -35
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/tabs/tab-group.component.d.ts +16 -0
- package/lib/core/components/tabs/tab.component.d.ts +10 -0
- package/lib/core/core.module.d.ts +22 -20
- package/lib/core/public-api.d.ts +6 -4
- package/lib/dashboard/store/dashboard.actions.d.ts +1 -0
- package/package.json +87 -44
- package/schematics/ng-add/index.js +0 -4
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-update/version-0-13/index.js +6 -2
- package/schematics/ng-update/version-0-13/index.js.map +1 -1
- package/styles/components/_o-panel.scss +1 -13
- package/styles/components/_o-tabs.scss +40 -56
- package/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.d.ts +0 -2
- package/toolbox/components/toolbox.component.d.ts +4 -2
- package/toolbox/toolbox.model.d.ts +1 -1
- package/widgets/widget-map/component/widget-map.component.d.ts +1 -4
- package/widgets/widget-map/i18n/en.translations.d.ts +0 -5
- package/widgets/widget-map/i18n/fr.translations.d.ts +0 -5
- package/widgets/widget-map/interaction/interaction-manager.class.d.ts +0 -2
- package/widgets/widget-map/utils/widget-map.utils.d.ts +0 -2
- package/esm2022/widgets/widget-map/reader/kmz-zip-reader.class.mjs +0 -57
- package/esm2022/widgets/widget-map/reader/map-formats-reader.class.mjs +0 -37
- package/esm2022/widgets/widget-map/reader/random-color-style.function.mjs +0 -32
- package/esm2022/widgets/widget-map/reader/read-as-text.class.mjs +0 -30
- package/esm2022/widgets/widget-map/reader/shp-zip-reader.class.mjs +0 -35
- package/widgets/widget-map/reader/kmz-zip-reader.class.d.ts +0 -12
- package/widgets/widget-map/reader/map-formats-reader.class.d.ts +0 -15
- package/widgets/widget-map/reader/random-color-style.function.d.ts +0 -6
- package/widgets/widget-map/reader/read-as-text.class.d.ts +0 -10
- package/widgets/widget-map/reader/shp-zip-reader.class.d.ts +0 -10
|
@@ -5,11 +5,11 @@ import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
|
5
5
|
import * as i3 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { EventEmitter, Component, Input, Output, ViewEncapsulation, TemplateRef, ViewContainerRef, ViewChild, NgModule } from '@angular/core';
|
|
8
|
+
import { EventEmitter, Component, Input, Output, ViewEncapsulation, TemplateRef, ViewContainerRef, ViewChild, Optional, Inject, NgModule } from '@angular/core';
|
|
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, PryVisibilityType, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils, ManifestUtils, SearchActions, PryOverlayModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryShareModule, PryI18nModule } from '@provoly/dashboard';
|
|
12
|
+
import { SubscriptionnerDirective, DashboardActions, ConfigActions, DashboardSelectors, DataSourceSelectors, ClassSelectors, FieldSelectors, FieldType, NamedQueryTypes, DataSourceActions, MIME_TYPE_RESULTSET, PryVisibilityType, LibraryTypes, ViewMode, DashboardGridLayout, WidgetPlacementUtils, ManifestUtils, 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';
|
|
@@ -17,7 +17,7 @@ import { PryStepperModule } from '@provoly/dashboard/components/stepper';
|
|
|
17
17
|
import * as i1 from '@ngrx/store';
|
|
18
18
|
import * as i3$2 from '@angular/cdk/bidi';
|
|
19
19
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
20
|
-
import { BehaviorSubject, combineLatest, map, take } from 'rxjs';
|
|
20
|
+
import { BehaviorSubject, combineLatest, map, take, switchMap, of } from 'rxjs';
|
|
21
21
|
import { withLatestFrom, map as map$1 } from 'rxjs/operators';
|
|
22
22
|
import { v4 } from 'uuid';
|
|
23
23
|
import * as i5 from '@angular/cdk/a11y';
|
|
@@ -662,38 +662,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
662
662
|
args: ['openModal']
|
|
663
663
|
}] } });
|
|
664
664
|
|
|
665
|
-
class RefreshDatasetsComponent extends ToolboxActionComponent {
|
|
666
|
-
constructor(store) {
|
|
667
|
-
super(store);
|
|
668
|
-
this.datasetCount = 0;
|
|
669
|
-
this.manifest$ = this.store.select(DashboardSelectors.globalManifest);
|
|
670
|
-
this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.manifest = manifest)));
|
|
671
|
-
this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.datasetCount =
|
|
672
|
-
[
|
|
673
|
-
...new Set(manifest?.windows
|
|
674
|
-
.map((window) => window.widgets.map((widget) => widget.datasource))
|
|
675
|
-
.flat(3)
|
|
676
|
-
.filter((dataset) => !!dataset))
|
|
677
|
-
].length ?? 0)));
|
|
678
|
-
}
|
|
679
|
-
refresh() {
|
|
680
|
-
if (this.manifest) {
|
|
681
|
-
ManifestUtils.getDatasourcesUsedByManifest(this.manifest).forEach((datasetId) => {
|
|
682
|
-
if (datasetId) {
|
|
683
|
-
this.store.dispatch(SearchActions.getDatasourceItems({ id: datasetId }));
|
|
684
|
-
}
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
this.close();
|
|
688
|
-
}
|
|
689
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: RefreshDatasetsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: RefreshDatasetsComponent, selector: "pry-refresh-datasets", usesInheritance: true, ngImport: i0, template: "<div [pryTooltip]=\"infoTooltip\" pryTooltipPosition=\"bottom\" aria-describedby=\"infoTooltip_launchTab\">\n <button type=\"button\" class=\"a-btn a-btn--secondary -size-md\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<ng-template #infoTooltip>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_launchTab\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.refresh' | i18n }}</span>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.PryTooltipDirective, selector: "[pryTooltip]", inputs: ["pryTooltip", "styleReversed", "pryTooltipContext", "pryTooltipPosition", "pryTooltipShowDelay"] }, { 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" }] }); }
|
|
691
|
-
}
|
|
692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: RefreshDatasetsComponent, decorators: [{
|
|
693
|
-
type: Component,
|
|
694
|
-
args: [{ selector: 'pry-refresh-datasets', template: "<div [pryTooltip]=\"infoTooltip\" pryTooltipPosition=\"bottom\" aria-describedby=\"infoTooltip_launchTab\">\n <button type=\"button\" class=\"a-btn a-btn--secondary -size-md\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<ng-template #infoTooltip>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_launchTab\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.refresh' | i18n }}</span>\n </div>\n</ng-template>\n" }]
|
|
695
|
-
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
696
|
-
|
|
697
665
|
class AutomateRefreshComponent extends ToolboxActionComponent {
|
|
698
666
|
constructor(store, overlay, viewContainerRef) {
|
|
699
667
|
super(store);
|
|
@@ -785,6 +753,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
785
753
|
args: ['refreshRateList', { read: TemplateRef }]
|
|
786
754
|
}] } });
|
|
787
755
|
|
|
756
|
+
class RefreshDatasetsComponent extends ToolboxActionComponent {
|
|
757
|
+
constructor(store) {
|
|
758
|
+
super(store);
|
|
759
|
+
this.datasetCount = 0;
|
|
760
|
+
this.manifest$ = this.store.select(DashboardSelectors.globalManifest);
|
|
761
|
+
this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.manifest = manifest)));
|
|
762
|
+
this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.datasetCount =
|
|
763
|
+
[
|
|
764
|
+
...new Set(manifest?.windows
|
|
765
|
+
.map((window) => window.widgets.map((widget) => widget.datasource))
|
|
766
|
+
.flat(3)
|
|
767
|
+
.filter((dataset) => !!dataset))
|
|
768
|
+
].length ?? 0)));
|
|
769
|
+
}
|
|
770
|
+
refresh() {
|
|
771
|
+
if (this.manifest) {
|
|
772
|
+
ManifestUtils.getDatasourcesUsedByManifest(this.manifest).forEach((datasetId) => {
|
|
773
|
+
if (datasetId) {
|
|
774
|
+
this.store.dispatch(SearchActions.getDatasourceItems({ id: datasetId }));
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
this.close();
|
|
779
|
+
}
|
|
780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: RefreshDatasetsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
781
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: RefreshDatasetsComponent, selector: "pry-refresh-datasets", usesInheritance: true, ngImport: i0, template: "<div [pryTooltip]=\"infoTooltip\" pryTooltipPosition=\"bottom\" aria-describedby=\"infoTooltip_launchTab\">\n <button type=\"button\" class=\"a-btn a-btn--secondary -size-md\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<ng-template #infoTooltip>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_launchTab\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.refresh' | i18n }}</span>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.PryTooltipDirective, selector: "[pryTooltip]", inputs: ["pryTooltip", "styleReversed", "pryTooltipContext", "pryTooltipPosition", "pryTooltipShowDelay"] }, { 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" }] }); }
|
|
782
|
+
}
|
|
783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: RefreshDatasetsComponent, decorators: [{
|
|
784
|
+
type: Component,
|
|
785
|
+
args: [{ selector: 'pry-refresh-datasets', template: "<div [pryTooltip]=\"infoTooltip\" pryTooltipPosition=\"bottom\" aria-describedby=\"infoTooltip_launchTab\">\n <button type=\"button\" class=\"a-btn a-btn--secondary -size-md\" (click)=\"refresh()\" [disabled]=\"datasetCount < 1\">\n <ng-container *ngIf=\"displayLabels\">\n {{ '@pry.toolbox.refresh' | i18n }}\n </ng-container>\n <pry-icon iconSvg=\"synchro\"></pry-icon>\n </button>\n</div>\n\n<ng-template #infoTooltip>\n <div class=\"m-tooltip\" role=\"tooltip\" id=\"infoTooltip_launchTab\">\n <span class=\"m-tooltip__text\">{{ '@pry.toolbox.refresh' | i18n }}</span>\n </div>\n</ng-template>\n" }]
|
|
786
|
+
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
787
|
+
|
|
788
788
|
const ACTIONS = [
|
|
789
789
|
{
|
|
790
790
|
name: 'filter_settings',
|
|
@@ -796,13 +796,13 @@ const ACTIONS = [
|
|
|
796
796
|
name: 'save_view',
|
|
797
797
|
component: SaveViewComponent,
|
|
798
798
|
visible: true,
|
|
799
|
-
access: { module: 'dashboard', page: 'toolbox', action: '
|
|
799
|
+
access: { module: 'dashboard', page: 'toolbox', action: 'save' }
|
|
800
800
|
},
|
|
801
801
|
{
|
|
802
802
|
name: 'save_view_as',
|
|
803
803
|
component: SaveViewComponent,
|
|
804
804
|
visible: true,
|
|
805
|
-
access: { module: 'dashboard', page: 'toolbox', action: '
|
|
805
|
+
access: { module: 'dashboard', page: 'toolbox', action: 'save' }
|
|
806
806
|
},
|
|
807
807
|
{
|
|
808
808
|
name: 'new_tab',
|
|
@@ -898,7 +898,8 @@ class ToolboxComponent {
|
|
|
898
898
|
set dropdownActions(dropdownActions) {
|
|
899
899
|
this._dropdownActions$.next(dropdownActions);
|
|
900
900
|
}
|
|
901
|
-
constructor(store) {
|
|
901
|
+
constructor(store, role) {
|
|
902
|
+
this.role = role;
|
|
902
903
|
this.actions$ = new BehaviorSubject(ACTIONS);
|
|
903
904
|
this._dropdownActions$ = new BehaviorSubject([]);
|
|
904
905
|
this.displayLabels = true;
|
|
@@ -909,17 +910,20 @@ class ToolboxComponent {
|
|
|
909
910
|
.pipe(map((pres) => (pres.grid?.layout ?? DashboardGridLayout.MANUAL) === DashboardGridLayout.MANUAL));
|
|
910
911
|
}
|
|
911
912
|
ngOnInit() {
|
|
912
|
-
this.allActions$ = combineLatest([this.actions$, this.hasInitialPresentation$]).pipe(
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
})
|
|
919
|
-
|
|
913
|
+
this.allActions$ = combineLatest([this.actions$, this.hasInitialPresentation$]).pipe(switchMap(([actions, hasInitialPresentation]) => combineLatest(actions.map((action) => this.role
|
|
914
|
+
? this.role.hasRole(null, action.access.module, action.access.page, action.access.action).pipe(map((hasRole) => ({
|
|
915
|
+
...action,
|
|
916
|
+
visible: action.visible &&
|
|
917
|
+
(action.name !== 'save_view' || hasInitialPresentation) &&
|
|
918
|
+
(!this.role || hasRole)
|
|
919
|
+
})))
|
|
920
|
+
: of({
|
|
921
|
+
...action,
|
|
922
|
+
visible: action.visible && (action.name !== 'save_view' || hasInitialPresentation)
|
|
923
|
+
})))));
|
|
920
924
|
this.mainActions$ = combineLatest([this._dropdownActions$, this.allActions$]).pipe(map(([dropdownActions, actions]) => actions.filter((action) => !dropdownActions.find((dropdownAction) => action.name === dropdownAction.name))));
|
|
921
925
|
this.dropdownActions$ = combineLatest([this._dropdownActions$, this.allActions$]).pipe(map(([dropdownActions, actions]) => actions.filter((action) => !!dropdownActions.find((dropdownAction) => action.name === dropdownAction.name))));
|
|
922
|
-
this.showDropdownButton$ = this.dropdownActions$.pipe(map((actions) => actions.
|
|
926
|
+
this.showDropdownButton$ = this.dropdownActions$.pipe(map((actions) => actions.filter((action) => action.visible).length > 0));
|
|
923
927
|
}
|
|
924
928
|
openDropdown($event) {
|
|
925
929
|
this.isDropdownOpen = true;
|
|
@@ -933,13 +937,18 @@ class ToolboxComponent {
|
|
|
933
937
|
getOrder(actionName) {
|
|
934
938
|
return this._dropdownActions$.getValue().find((action) => actionName === action.name)?.order;
|
|
935
939
|
}
|
|
936
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
937
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxComponent, selector: "pry-toolbox", inputs: { displayLabels: "displayLabels", actions: "actions", dropdownActions: "dropdownActions" }, ngImport: i0, template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <
|
|
940
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxComponent, deps: [{ token: i1.Store }, { token: PRY_ACCESS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
941
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ToolboxComponent, selector: "pry-toolbox", inputs: { displayLabels: "displayLabels", actions: "actions", dropdownActions: "dropdownActions" }, ngImport: i0, template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <ng-container *ngFor=\"let action of dropdownActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"o-draggable-menu__list__item\" [style.order]=\"getOrder(action.name)\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </ng-template>\n </ng-container>\n <li class=\"m-actions-list__item\" *ngIf=\"isManualMode$ | async\">\n <pry-edit-mode-toggle\n *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'edit_dashboard' }\"\n [displayLabels]=\"displayLabels\"\n ></pry-edit-mode-toggle>\n </li>\n</ul>\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.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i3$1.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3$1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: ToolboxActionInstanciatorComponent, selector: "pry-toolbox-action-instanciator", inputs: ["displayLabels", "action"], outputs: ["closeOptions"] }, { kind: "component", type: EditModeToggleComponent, selector: "pry-edit-mode-toggle" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.I18nPipe, name: "i18n" }] }); }
|
|
938
942
|
}
|
|
939
943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ToolboxComponent, decorators: [{
|
|
940
944
|
type: Component,
|
|
941
|
-
args: [{ selector: 'pry-toolbox', template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <
|
|
942
|
-
}], ctorParameters: function () { return [{ type: i1.Store }
|
|
945
|
+
args: [{ selector: 'pry-toolbox', template: "<ul class=\"m-actions-list\" #input>\n <ng-container *ngFor=\"let action of mainActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"m-actions-list__item\" *pryAccess=\"action.access\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"showDropdownButton$ | async\">\n <li class=\"m-actions-list__item\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--primary -size-md\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n id=\"options\"\n aria-controls=\"IDpanel\"\n aria-expanded=\"false\"\n (click)=\"openDropdown($event)\"\n >\n <ng-container *ngIf=\"displayLabels\"\n ><span class=\"u-visually-hidden\">{{ '@pry.toolbox.options' | i18n }}</span>\n <span>{{ '@pry.toolbox.options' | i18n }}</span>\n <pry-icon [width]=\"14\" [height]=\"14\" iconSvg=\"chevron_bottom\"></pry-icon>\n </ng-container>\n </button>\n </li>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"isDropdownOpen = false\"\n >\n <div class=\"o-draggable-menu\" aria-labelledby=\"\">\n <ul class=\"o-draggable-menu__list\">\n <ng-container *ngFor=\"let action of dropdownActions$ | async\">\n <ng-container *ngIf=\"action.visible\">\n <li class=\"o-draggable-menu__list__item\" [style.order]=\"getOrder(action.name)\">\n <pry-toolbox-action-instanciator\n [action]=\"action\"\n [displayLabels]=\"displayLabels\"\n (closeOptions)=\"closeDropdown($event)\"\n ></pry-toolbox-action-instanciator>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </ng-template>\n </ng-container>\n <li class=\"m-actions-list__item\" *ngIf=\"isManualMode$ | async\">\n <pry-edit-mode-toggle\n *pryAccess=\"{ module: 'dashboard', page: 'toolbox', action: 'edit_dashboard' }\"\n [displayLabels]=\"displayLabels\"\n ></pry-edit-mode-toggle>\n </li>\n</ul>\n" }]
|
|
946
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i3$1.PryBaseAccess, decorators: [{
|
|
947
|
+
type: Optional
|
|
948
|
+
}, {
|
|
949
|
+
type: Inject,
|
|
950
|
+
args: [PRY_ACCESS_TOKEN]
|
|
951
|
+
}] }]; }, propDecorators: { displayLabels: [{
|
|
943
952
|
type: Input
|
|
944
953
|
}], actions: [{
|
|
945
954
|
type: Input
|