@provoly/dashboard 0.22.1 → 0.22.3
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/assets/svgs/contract-left.svg +1 -0
- package/assets/svgs/expand-right.svg +1 -0
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +1 -1
- package/esm2022/filters/autocomplete/autocomplete.component.mjs +6 -4
- package/esm2022/lib/core/components/select/select-a11y.service.mjs +16 -7
- package/esm2022/lib/core/components/select/select.component.mjs +7 -7
- package/esm2022/lib/core/model/widget-aggregated-chart-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +5 -2
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +32 -6
- package/esm2022/lib/dashboard/components/solve-collisions.function.mjs +14 -23
- package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +36 -28
- package/esm2022/lib/dashboard/components/widgets/widget-filler/widget-filler.component.mjs +28 -3
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
- package/esm2022/lib/dashboard/store/title.service.mjs +2 -2
- package/esm2022/toolbox/components/select-grid-layout/select-grid-layout.component.mjs +3 -3
- package/esm2022/toolbox/components/share/share.component.mjs +2 -2
- package/esm2022/toolbox/components/toolbox.component.mjs +10 -5
- package/esm2022/toolbox/toolbox.model.mjs +23 -12
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +17 -7
- package/esm2022/widgets/widget-aggregated-chart/i18n/en.translations.mjs +2 -1
- package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +2 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +2 -2
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +5 -3
- package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +34 -18
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +18 -6
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +126 -66
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/filters/autocomplete/autocomplete.component.d.ts +2 -1
- package/lib/core/components/select/select-a11y.service.d.ts +1 -1
- package/lib/core/components/select/select.component.d.ts +1 -1
- package/lib/core/model/widget-aggregated-chart-manifest.interface.d.ts +1 -0
- package/lib/dashboard/components/dashboard.component.d.ts +4 -1
- package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +2 -2
- package/lib/dashboard/components/widgets/widget-filler/widget-filler.component.d.ts +1 -0
- package/package.json +1 -1
- package/styles/components/_o-dashboard.scss +25 -0
- package/styles/components/_o-modal.scss +6 -0
- package/toolbox/components/toolbox.component.d.ts +1 -1
- package/toolbox/toolbox.model.d.ts +1 -0
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +2 -0
- package/widgets/widget-aggregated-chart/i18n/en.translations.d.ts +1 -0
- package/widgets/widget-aggregated-chart/i18n/fr.translations.d.ts +1 -0
|
@@ -5512,7 +5512,10 @@ class PryBackendAggregationService extends PryAggregationService {
|
|
|
5512
5512
|
params = params.set('groupBy', options.groupBy.attribute);
|
|
5513
5513
|
}
|
|
5514
5514
|
if (options.graph && options.graph.sort) {
|
|
5515
|
-
params = params.set('
|
|
5515
|
+
params = params.set('order', `${options.graph.sort.direction},${(options.graph.sort.value ?? '').toUpperCase()}`);
|
|
5516
|
+
}
|
|
5517
|
+
if (!!options.graph?.limitItems) {
|
|
5518
|
+
params = params.set('limit', `${options.graph.limitItems}`);
|
|
5516
5519
|
}
|
|
5517
5520
|
params = this.searchService.getItemsFilter(targetDatasource, params, false);
|
|
5518
5521
|
const key = `${this.dataUrl}_${params.toString()}`;
|
|
@@ -6735,7 +6738,9 @@ class SelectA11yService {
|
|
|
6735
6738
|
toggleFocus();
|
|
6736
6739
|
switch (origin) {
|
|
6737
6740
|
case 'mouse':
|
|
6738
|
-
|
|
6741
|
+
if (!autocomplete) {
|
|
6742
|
+
this.toggle(true);
|
|
6743
|
+
}
|
|
6739
6744
|
break;
|
|
6740
6745
|
case 'keyboard':
|
|
6741
6746
|
if (autocomplete) {
|
|
@@ -6753,9 +6758,14 @@ class SelectA11yService {
|
|
|
6753
6758
|
}
|
|
6754
6759
|
onKeydownAutocompleteInput(event, open, searchValue, optionsModalRef) {
|
|
6755
6760
|
if (event.key === 'Tab') {
|
|
6761
|
+
if (open)
|
|
6762
|
+
this.toggle();
|
|
6756
6763
|
return;
|
|
6757
6764
|
}
|
|
6758
|
-
if (!open && searchValue?.length > 2 &&
|
|
6765
|
+
if (!open && searchValue?.length > 2 && event.key.length === 1) {
|
|
6766
|
+
this.toggle();
|
|
6767
|
+
}
|
|
6768
|
+
else if (open && event.key === 'Enter') {
|
|
6759
6769
|
this.toggle();
|
|
6760
6770
|
}
|
|
6761
6771
|
else if (open && event.key === 'ArrowDown') {
|
|
@@ -6801,10 +6811,12 @@ class SelectA11yService {
|
|
|
6801
6811
|
break;
|
|
6802
6812
|
}
|
|
6803
6813
|
}
|
|
6804
|
-
focusInitialSelection(optionsModalRef) {
|
|
6805
|
-
|
|
6806
|
-
optionsModalRef?.rootNodes[0].querySelector('[aria-selected="
|
|
6807
|
-
|
|
6814
|
+
focusInitialSelection(autocomplete, optionsModalRef) {
|
|
6815
|
+
if (!autocomplete) {
|
|
6816
|
+
let selectedOption = optionsModalRef?.rootNodes[0].querySelector('[aria-selected="true"]') ??
|
|
6817
|
+
optionsModalRef?.rootNodes[0].querySelector('[aria-selected="false"]');
|
|
6818
|
+
selectedOption?.setAttribute('cdkFocusInitial', '');
|
|
6819
|
+
}
|
|
6808
6820
|
}
|
|
6809
6821
|
}
|
|
6810
6822
|
|
|
@@ -6861,8 +6873,8 @@ class PrySelectComponent extends SubscriptionnerDirective {
|
|
|
6861
6873
|
this.onFocusChange = (origin) => this.a11yService.onFocusChange(origin, this.autocomplete, () => this.toggleFocus(), () => this.focusSelect());
|
|
6862
6874
|
this.onKeydownSelect = (event) => this.a11yService.onKeydownSelect(event, this.autocomplete);
|
|
6863
6875
|
this.onKeydownAutocompleteInput = (event) => this.a11yService.onKeydownAutocompleteInput(event, this.open, this.search$.getValue(), this.optionsModalRef);
|
|
6864
|
-
this.onKeydownOption = (event, item, index, optionDivRef, first, last) => this.a11yService.onKeydownOption(event, optionDivRef, first, last, this.autocomplete, this.selectElement.nativeElement, () => this.select(event, item, index
|
|
6865
|
-
this.focusInitialSelection = () => this.a11yService.focusInitialSelection(this.optionsModalRef);
|
|
6876
|
+
this.onKeydownOption = (event, item, index, optionDivRef, first, last) => this.a11yService.onKeydownOption(event, optionDivRef, first, last, this.autocomplete, this.selectElement.nativeElement, () => this.select(event, item, index));
|
|
6877
|
+
this.focusInitialSelection = () => this.a11yService.focusInitialSelection(this.autocomplete, this.optionsModalRef);
|
|
6866
6878
|
this.matchingItems$ = combineLatest([this._items$, this.search$, this.searchSelected$]).pipe(map(([items, term, alreadySelected]) => this.autocomplete && term && term.length > 0 && !alreadySelected
|
|
6867
6879
|
? items.filter((i) => {
|
|
6868
6880
|
const itemValue = this.bindLabel ? i?.[this.bindLabel] : i;
|
|
@@ -6934,7 +6946,7 @@ class PrySelectComponent extends SubscriptionnerDirective {
|
|
|
6934
6946
|
this.searched.next($event);
|
|
6935
6947
|
this.searchSelected$.next(false);
|
|
6936
6948
|
}
|
|
6937
|
-
select($event, item, index
|
|
6949
|
+
select($event, item, index) {
|
|
6938
6950
|
const itemValue = this.bindValue ? item?.[this.bindValue] : item;
|
|
6939
6951
|
const keyProp = this.bindValue ?? this.bindLabel ?? 'id';
|
|
6940
6952
|
if (this.multiple) {
|
|
@@ -6958,7 +6970,7 @@ class PrySelectComponent extends SubscriptionnerDirective {
|
|
|
6958
6970
|
else {
|
|
6959
6971
|
this.writeValue(itemValue);
|
|
6960
6972
|
}
|
|
6961
|
-
if (this.closeOnSelect
|
|
6973
|
+
if (this.closeOnSelect) {
|
|
6962
6974
|
this.toggle(false);
|
|
6963
6975
|
}
|
|
6964
6976
|
this.activeDescendant = index;
|
|
@@ -7039,7 +7051,7 @@ class PrySelectComponent extends SubscriptionnerDirective {
|
|
|
7039
7051
|
multi: true
|
|
7040
7052
|
},
|
|
7041
7053
|
SelectA11yService
|
|
7042
|
-
], viewQueries: [{ propertyName: "optionsModal", first: true, predicate: ["optionsModal"], descendants: true, read: TemplateRef }, { propertyName: "selectElement", first: true, predicate: ["selectElement"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"a-pry-select\"\n [attr.aria-disabled]=\"disabled\"\n #selectElement\n [class.-focused]=\"focused\"\n (click)=\"handleClick()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-owns]=\"open ? modalId : null\"\n aria-haspopup=\"listbox\"\n tabindex=\"0\"\n cdkMonitorElementFocus\n (cdkFocusChange)=\"onFocusChange($event)\"\n (keydown)=\"onKeydownSelect($event)\"\n>\n <div class=\"a-pry-select__content\">\n <ng-container *ngIf=\"autocomplete; else noAutocomplete\">\n <input\n type=\"text\"\n class=\"a-pry-select__search\"\n [ngModel]=\"search$.getValue()\"\n (ngModelChange)=\"search($event)\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"open ? modalId : null\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (keydown)=\"onKeydownAutocompleteInput($event)\"\n #input\n />\n </ng-container>\n <ng-template #noAutocomplete>\n <ng-container *ngIf=\"(valueItems$ | async).length === 0; else selectedValues\">\n <span class=\"a-pry-select__placeholder\">{{ placeholder }}</span>\n </ng-container>\n <ng-template #selectedValues>\n <ng-container *ngFor=\"let item of valueItems$ | async\">\n <div class=\"a-pry-select__value\" [class.pry-select-form]=\"isForm\" [class.-multiple]=\"multiple\">\n <ng-container *ngIf=\"template; else noTemplateLabel\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplateLabel>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ?? '') + value | i18n : { warn: false } }}\n <span\n *ngIf=\"multiple && clearable\"\n class=\"a-pry-select__clear\"\n (click)=\"clear($event, item)\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-template>\n <div class=\"a-pry-select__filler\"></div>\n </ng-template>\n </div>\n <div class=\"a-pry-select__actions\">\n <span *ngIf=\"clearable\" class=\"a-pry-select__clear\" (click)=\"clearAll($event)\" aria-hidden=\"true\">\u00D7</span>\n <pry-icon\n class=\"a-pry-select__toggle\"\n [iconSvg]=\"open ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n </div>\n</div>\n<ng-template #optionsModal>\n <div\n role=\"listbox\"\n [attr.aria-label]=\"'@pry.select.label' | i18n\"\n [id]=\"modalId\"\n [attr.aria-activedescendant]=\"'select-option-' + activeDescendant\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.required]=\"required\"\n [attr.aria-readonly]=\"readonly\"\n cdkTrapFocus=\"!autocomplete\"\n [cdkTrapFocusAutoCapture]=\"
|
|
7054
|
+
], viewQueries: [{ propertyName: "optionsModal", first: true, predicate: ["optionsModal"], descendants: true, read: TemplateRef }, { propertyName: "selectElement", first: true, predicate: ["selectElement"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"a-pry-select\"\n [attr.aria-disabled]=\"disabled\"\n #selectElement\n [class.-focused]=\"focused\"\n (click)=\"handleClick()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-owns]=\"open ? modalId : null\"\n aria-haspopup=\"listbox\"\n tabindex=\"0\"\n cdkMonitorElementFocus\n (cdkFocusChange)=\"onFocusChange($event)\"\n (keydown)=\"onKeydownSelect($event)\"\n>\n <div class=\"a-pry-select__content\">\n <ng-container *ngIf=\"autocomplete; else noAutocomplete\">\n <input\n type=\"text\"\n class=\"a-pry-select__search\"\n [ngModel]=\"search$.getValue()\"\n (ngModelChange)=\"search($event)\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"open ? modalId : null\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (keydown)=\"onKeydownAutocompleteInput($event)\"\n #input\n />\n </ng-container>\n <ng-template #noAutocomplete>\n <ng-container *ngIf=\"(valueItems$ | async).length === 0; else selectedValues\">\n <span class=\"a-pry-select__placeholder\">{{ placeholder }}</span>\n </ng-container>\n <ng-template #selectedValues>\n <ng-container *ngFor=\"let item of valueItems$ | async\">\n <div class=\"a-pry-select__value\" [class.pry-select-form]=\"isForm\" [class.-multiple]=\"multiple\">\n <ng-container *ngIf=\"template; else noTemplateLabel\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplateLabel>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ?? '') + value | i18n : { warn: false } }}\n <span\n *ngIf=\"multiple && clearable\"\n class=\"a-pry-select__clear\"\n (click)=\"clear($event, item)\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-template>\n <div class=\"a-pry-select__filler\"></div>\n </ng-template>\n </div>\n <div class=\"a-pry-select__actions\">\n <span *ngIf=\"clearable\" class=\"a-pry-select__clear\" (click)=\"clearAll($event)\" aria-hidden=\"true\">\u00D7</span>\n <pry-icon\n class=\"a-pry-select__toggle\"\n [iconSvg]=\"open ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n </div>\n</div>\n<ng-template #optionsModal>\n <div\n role=\"listbox\"\n [attr.aria-label]=\"'@pry.select.label' | i18n\"\n [id]=\"modalId\"\n [attr.aria-activedescendant]=\"'select-option-' + activeDescendant\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.required]=\"required\"\n [attr.aria-readonly]=\"readonly\"\n cdkTrapFocus=\"!autocomplete\"\n [cdkTrapFocusAutoCapture]=\"!autocomplete\"\n >\n <div class=\"a-pry-select__options__option -hint\" *ngIf=\"loading\" [style.width.px]=\"modalWidth\">\n <div class=\"no-widget no-widget__loader\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"30\"\n [height]=\"30\"\n *ngIf=\"loading\"\n />\n </div>\n <p>{{ '@pry.select.loading' | i18n }}...</p>\n </div>\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngFor=\"let item of matchingItems$ | async; let index = index; let first = first; let last = last\">\n <div\n class=\"a-pry-select__options__option\"\n [attr.aria-selected]=\"(valueItems$ | async).includes(item)\"\n [attr.aria-checked]=\"(valueItems$ | async).includes(item)\"\n [attr.aria-disabled]=\"disabled\"\n (click)=\"select($event, item, index)\"\n (keydown)=\"onKeydownOption($event, item, index, optionDivRef, first, last)\"\n [style.width.px]=\"modalWidth\"\n role=\"option\"\n [id]=\"'select-option-' + index\"\n tabindex=\"0\"\n #optionDivRef\n >\n <ng-container *ngIf=\"template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ? i18nPrefix : '') + value | i18n : { warn: false } }}\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i3$2.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.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: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
7043
7055
|
}
|
|
7044
7056
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySelectComponent, decorators: [{
|
|
7045
7057
|
type: Component,
|
|
@@ -7050,7 +7062,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7050
7062
|
multi: true
|
|
7051
7063
|
},
|
|
7052
7064
|
SelectA11yService
|
|
7053
|
-
], template: "<div\n class=\"a-pry-select\"\n [attr.aria-disabled]=\"disabled\"\n #selectElement\n [class.-focused]=\"focused\"\n (click)=\"handleClick()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-owns]=\"open ? modalId : null\"\n aria-haspopup=\"listbox\"\n tabindex=\"0\"\n cdkMonitorElementFocus\n (cdkFocusChange)=\"onFocusChange($event)\"\n (keydown)=\"onKeydownSelect($event)\"\n>\n <div class=\"a-pry-select__content\">\n <ng-container *ngIf=\"autocomplete; else noAutocomplete\">\n <input\n type=\"text\"\n class=\"a-pry-select__search\"\n [ngModel]=\"search$.getValue()\"\n (ngModelChange)=\"search($event)\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"open ? modalId : null\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (keydown)=\"onKeydownAutocompleteInput($event)\"\n #input\n />\n </ng-container>\n <ng-template #noAutocomplete>\n <ng-container *ngIf=\"(valueItems$ | async).length === 0; else selectedValues\">\n <span class=\"a-pry-select__placeholder\">{{ placeholder }}</span>\n </ng-container>\n <ng-template #selectedValues>\n <ng-container *ngFor=\"let item of valueItems$ | async\">\n <div class=\"a-pry-select__value\" [class.pry-select-form]=\"isForm\" [class.-multiple]=\"multiple\">\n <ng-container *ngIf=\"template; else noTemplateLabel\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplateLabel>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ?? '') + value | i18n : { warn: false } }}\n <span\n *ngIf=\"multiple && clearable\"\n class=\"a-pry-select__clear\"\n (click)=\"clear($event, item)\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-template>\n <div class=\"a-pry-select__filler\"></div>\n </ng-template>\n </div>\n <div class=\"a-pry-select__actions\">\n <span *ngIf=\"clearable\" class=\"a-pry-select__clear\" (click)=\"clearAll($event)\" aria-hidden=\"true\">\u00D7</span>\n <pry-icon\n class=\"a-pry-select__toggle\"\n [iconSvg]=\"open ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n </div>\n</div>\n<ng-template #optionsModal>\n <div\n role=\"listbox\"\n [attr.aria-label]=\"'@pry.select.label' | i18n\"\n [id]=\"modalId\"\n [attr.aria-activedescendant]=\"'select-option-' + activeDescendant\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.required]=\"required\"\n [attr.aria-readonly]=\"readonly\"\n cdkTrapFocus=\"!autocomplete\"\n [cdkTrapFocusAutoCapture]=\"
|
|
7065
|
+
], template: "<div\n class=\"a-pry-select\"\n [attr.aria-disabled]=\"disabled\"\n #selectElement\n [class.-focused]=\"focused\"\n (click)=\"handleClick()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-owns]=\"open ? modalId : null\"\n aria-haspopup=\"listbox\"\n tabindex=\"0\"\n cdkMonitorElementFocus\n (cdkFocusChange)=\"onFocusChange($event)\"\n (keydown)=\"onKeydownSelect($event)\"\n>\n <div class=\"a-pry-select__content\">\n <ng-container *ngIf=\"autocomplete; else noAutocomplete\">\n <input\n type=\"text\"\n class=\"a-pry-select__search\"\n [ngModel]=\"search$.getValue()\"\n (ngModelChange)=\"search($event)\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"open ? modalId : null\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (keydown)=\"onKeydownAutocompleteInput($event)\"\n #input\n />\n </ng-container>\n <ng-template #noAutocomplete>\n <ng-container *ngIf=\"(valueItems$ | async).length === 0; else selectedValues\">\n <span class=\"a-pry-select__placeholder\">{{ placeholder }}</span>\n </ng-container>\n <ng-template #selectedValues>\n <ng-container *ngFor=\"let item of valueItems$ | async\">\n <div class=\"a-pry-select__value\" [class.pry-select-form]=\"isForm\" [class.-multiple]=\"multiple\">\n <ng-container *ngIf=\"template; else noTemplateLabel\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplateLabel>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ?? '') + value | i18n : { warn: false } }}\n <span\n *ngIf=\"multiple && clearable\"\n class=\"a-pry-select__clear\"\n (click)=\"clear($event, item)\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-template>\n <div class=\"a-pry-select__filler\"></div>\n </ng-template>\n </div>\n <div class=\"a-pry-select__actions\">\n <span *ngIf=\"clearable\" class=\"a-pry-select__clear\" (click)=\"clearAll($event)\" aria-hidden=\"true\">\u00D7</span>\n <pry-icon\n class=\"a-pry-select__toggle\"\n [iconSvg]=\"open ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n </div>\n</div>\n<ng-template #optionsModal>\n <div\n role=\"listbox\"\n [attr.aria-label]=\"'@pry.select.label' | i18n\"\n [id]=\"modalId\"\n [attr.aria-activedescendant]=\"'select-option-' + activeDescendant\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.required]=\"required\"\n [attr.aria-readonly]=\"readonly\"\n cdkTrapFocus=\"!autocomplete\"\n [cdkTrapFocusAutoCapture]=\"!autocomplete\"\n >\n <div class=\"a-pry-select__options__option -hint\" *ngIf=\"loading\" [style.width.px]=\"modalWidth\">\n <div class=\"no-widget no-widget__loader\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"30\"\n [height]=\"30\"\n *ngIf=\"loading\"\n />\n </div>\n <p>{{ '@pry.select.loading' | i18n }}...</p>\n </div>\n <ng-container *ngIf=\"!loading\">\n <ng-container *ngFor=\"let item of matchingItems$ | async; let index = index; let first = first; let last = last\">\n <div\n class=\"a-pry-select__options__option\"\n [attr.aria-selected]=\"(valueItems$ | async).includes(item)\"\n [attr.aria-checked]=\"(valueItems$ | async).includes(item)\"\n [attr.aria-disabled]=\"disabled\"\n (click)=\"select($event, item, index)\"\n (keydown)=\"onKeydownOption($event, item, index, optionDivRef, first, last)\"\n [style.width.px]=\"modalWidth\"\n role=\"option\"\n [id]=\"'select-option-' + index\"\n tabindex=\"0\"\n #optionDivRef\n >\n <ng-container *ngIf=\"template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item, clear }\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <pry-icon\n *ngIf=\"bindIcon\"\n [iconSvg]=\"item[bindIcon]\"\n [width]=\"iconSize[0]\"\n [height]=\"iconSize[1]\"\n ></pry-icon>\n <ng-container *ngIf=\"bindLabel ? item?.[bindLabel] : item as value\">\n {{ (i18nPrefix ? i18nPrefix : '') + value | i18n : { warn: false } }}\n </ng-container>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
7054
7066
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: SelectA11yService }]; }, propDecorators: { items: [{
|
|
7055
7067
|
type: Input
|
|
7056
7068
|
}], clearable: [{
|
|
@@ -7567,43 +7579,33 @@ const solvingCollisionOptions = {
|
|
|
7567
7579
|
minRows: 0
|
|
7568
7580
|
};
|
|
7569
7581
|
function solveCollisions(candidateWidget, initialWidgetManifestList, dashboardManifest) {
|
|
7570
|
-
let rows = dashboardManifest.grid?.rows ?? DEFAULT_ROWS_NUMBER;
|
|
7571
7582
|
const nextWidgetList = candidateWidget
|
|
7572
7583
|
? JSON.parse(JSON.stringify([
|
|
7573
7584
|
{
|
|
7574
7585
|
...candidateWidget,
|
|
7575
|
-
layout: { ...(candidateWidget?.layout ?? { x: 1, y: 1, width: 1, height: 1 })
|
|
7586
|
+
layout: { ...(candidateWidget?.layout ?? { x: 1, y: 1, width: 1, height: 1 }) }
|
|
7576
7587
|
},
|
|
7577
7588
|
...initialWidgetManifestList
|
|
7578
7589
|
]))
|
|
7579
7590
|
: [];
|
|
7580
|
-
let nonBlocking = 10000;
|
|
7581
7591
|
// Force all layout values to be positive and cannot be outside the grid
|
|
7582
|
-
const
|
|
7592
|
+
const columns = dashboardManifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER;
|
|
7583
7593
|
nextWidgetList.forEach((w) => {
|
|
7584
7594
|
w.layout.height = w.layout.height <= 0 ? 1 : w.layout.height;
|
|
7585
7595
|
w.layout.width = w.layout.width <= 0 ? 1 : w.layout.width;
|
|
7586
7596
|
w.layout.x =
|
|
7587
|
-
w.layout.x <= 0 ? 1 : w.layout.x + w.layout.width >
|
|
7597
|
+
w.layout.x <= 0 ? 1 : w.layout.x + w.layout.width > columns ? columns - w.layout.width + 1 : w.layout.x;
|
|
7588
7598
|
w.layout.y = w.layout.y <= 0 ? 1 : w.layout.y;
|
|
7589
7599
|
});
|
|
7590
|
-
let
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
const [stayingWidget, ...movingWidgets] = [...widgets].sort(orderWidgetsAccordingToPlacement);
|
|
7595
|
-
stayingWidget.layout.y = Math.min(...widgets.map((w) => w.layout.y));
|
|
7596
|
-
movingWidgets.forEach((movingWidget) => (movingWidget.layout.y = stayingWidget.layout.y + stayingWidget.layout.height));
|
|
7597
|
-
});
|
|
7598
|
-
overlappingWidgets = WidgetPlacementUtils.getOverlaps(nextWidgetList);
|
|
7599
|
-
nonBlocking--;
|
|
7600
|
+
let rows = dashboardManifest.grid?.rows ?? DEFAULT_ROWS_NUMBER;
|
|
7601
|
+
let overlappingWidgets = WidgetPlacementUtils.getOverlaps(initialWidgetManifestList);
|
|
7602
|
+
if (overlappingWidgets.length > 0) {
|
|
7603
|
+
console.warn('Widgets are already overlapping. We cannot have a correct solution for this.');
|
|
7600
7604
|
}
|
|
7601
|
-
// Adding rows if needed
|
|
7602
|
-
rows = Math.max(rows, ...nextWidgetList.map((widget) => widget.layout.y + widget.layout.height - 1));
|
|
7603
|
-
nextWidgetList.forEach((widget) => delete widget.layout.weight);
|
|
7604
7605
|
const layout = dashboardManifest.grid?.layout ?? DashboardGridLayout.MANUAL;
|
|
7606
|
+
let result = undefined;
|
|
7605
7607
|
if (!solvingCollisionOptions.invertedGravity || layout !== DashboardGridLayout.MANUAL) {
|
|
7606
|
-
|
|
7608
|
+
result = {
|
|
7607
7609
|
...dashboardManifest,
|
|
7608
7610
|
grid: { ...dashboardManifest.grid, rows },
|
|
7609
7611
|
widgets: nextWidgetList
|
|
@@ -7628,15 +7630,16 @@ function solveCollisions(candidateWidget, initialWidgetManifestList, dashboardMa
|
|
|
7628
7630
|
}
|
|
7629
7631
|
});
|
|
7630
7632
|
}
|
|
7631
|
-
|
|
7633
|
+
result = {
|
|
7632
7634
|
...dashboardManifest,
|
|
7633
7635
|
grid: {
|
|
7634
|
-
...dashboardManifest.grid
|
|
7635
|
-
rows: Math.max(solvingCollisionOptions.minRows, ...nextWidgetList.map((w) => w.layout.y + w.layout.height - 1))
|
|
7636
|
+
...dashboardManifest.grid
|
|
7636
7637
|
},
|
|
7637
7638
|
widgets: nextWidgetList
|
|
7638
7639
|
};
|
|
7639
7640
|
}
|
|
7641
|
+
const newOverlaps = WidgetPlacementUtils.getOverlaps(result.widgets);
|
|
7642
|
+
return newOverlaps.length > 0 ? dashboardManifest : result;
|
|
7640
7643
|
}
|
|
7641
7644
|
|
|
7642
7645
|
class BaseWidgetComponent extends SubscriptionnerDirective {
|
|
@@ -7719,12 +7722,36 @@ class WidgetFillerComponent extends BaseWidgetComponent {
|
|
|
7719
7722
|
// @ts-ignore
|
|
7720
7723
|
return this.manifest.options?.index ?? 0;
|
|
7721
7724
|
}
|
|
7725
|
+
moveToPlace() {
|
|
7726
|
+
// @ts-ignore
|
|
7727
|
+
const startLayout = this.manifest.options?.sourcePlace;
|
|
7728
|
+
// @ts-ignore
|
|
7729
|
+
const targetLayout = this.manifest.options?.targetPlace;
|
|
7730
|
+
// @ts-ignore
|
|
7731
|
+
if (startLayout && targetLayout && this.manifest.options?.windowManifest && this.index !== '-') {
|
|
7732
|
+
// @ts-ignore
|
|
7733
|
+
const newWindowManifest = JSON.parse(JSON.stringify(this.manifest.options?.windowManifest));
|
|
7734
|
+
const targetWidgetIndex = newWindowManifest.widgets.findIndex((w) => w.layout.x === targetLayout.x &&
|
|
7735
|
+
w.layout.y === targetLayout.y &&
|
|
7736
|
+
w.layout.width === targetLayout.width &&
|
|
7737
|
+
w.layout.height === targetLayout.height);
|
|
7738
|
+
const startWidgetIndex = newWindowManifest.widgets.findIndex((w) => w.layout.x === startLayout.x &&
|
|
7739
|
+
w.layout.y === startLayout.y &&
|
|
7740
|
+
w.layout.width === startLayout.width &&
|
|
7741
|
+
w.layout.height === startLayout.height);
|
|
7742
|
+
if (targetWidgetIndex !== -1) {
|
|
7743
|
+
newWindowManifest.widgets[targetWidgetIndex].layout = startLayout;
|
|
7744
|
+
}
|
|
7745
|
+
newWindowManifest.widgets[startWidgetIndex].layout = targetLayout;
|
|
7746
|
+
this.store.dispatch(DashboardActions.updateDashboardManifest({ manifest: newWindowManifest }));
|
|
7747
|
+
}
|
|
7748
|
+
}
|
|
7722
7749
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetFillerComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7723
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetFillerComponent, selector: "pry-widget-filler", usesInheritance: true, ngImport: i0, template: "<div class=\"a-indicator-block\">\n
|
|
7750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetFillerComponent, selector: "pry-widget-filler", usesInheritance: true, ngImport: i0, template: "<div class=\"filler-backdrop\" (click)=\"moveToPlace()\">\n <div class=\"a-indicator-block\">\n <p>{{ index === -1 ? '-' : index + 1 }}</p>\n </div>\n</div>\n" }); }
|
|
7724
7751
|
}
|
|
7725
7752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetFillerComponent, decorators: [{
|
|
7726
7753
|
type: Component,
|
|
7727
|
-
args: [{ selector: 'pry-widget-filler', template: "<div class=\"a-indicator-block\">\n
|
|
7754
|
+
args: [{ selector: 'pry-widget-filler', template: "<div class=\"filler-backdrop\" (click)=\"moveToPlace()\">\n <div class=\"a-indicator-block\">\n <p>{{ index === -1 ? '-' : index + 1 }}</p>\n </div>\n</div>\n" }]
|
|
7728
7755
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i0.ElementRef }]; } });
|
|
7729
7756
|
|
|
7730
7757
|
const WIDGET_DEFINITION = new InjectionToken('Widgets definition');
|
|
@@ -8261,6 +8288,9 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
8261
8288
|
set staticDashboard(window) {
|
|
8262
8289
|
this.staticDashboard$.next(window);
|
|
8263
8290
|
}
|
|
8291
|
+
set forceModeEdition(mode) {
|
|
8292
|
+
this.forceModeEdition$.next(mode);
|
|
8293
|
+
}
|
|
8264
8294
|
constructor(store, overlay, viewContainerRef) {
|
|
8265
8295
|
super();
|
|
8266
8296
|
this.store = store;
|
|
@@ -8272,6 +8302,7 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
8272
8302
|
this.stacked$ = new BehaviorSubject(false);
|
|
8273
8303
|
this.indexForRemoval = -1;
|
|
8274
8304
|
this.params = {};
|
|
8305
|
+
this.forceModeEdition$ = new BehaviorSubject(undefined);
|
|
8275
8306
|
this.CloseOnDragOut = true;
|
|
8276
8307
|
this.noBackground = false;
|
|
8277
8308
|
this.canCalculateView = false;
|
|
@@ -8302,7 +8333,10 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
8302
8333
|
this.layout = DashboardGridLayout.MANUAL;
|
|
8303
8334
|
this.loading$ = this.store.select(DashboardSelectors.loading);
|
|
8304
8335
|
this.dataFetching$ = this.store.select(SearchSelectors.searchLoading).pipe(delay$1(10));
|
|
8305
|
-
this.modeEdition$ =
|
|
8336
|
+
this.modeEdition$ = combineLatest([
|
|
8337
|
+
this.store.select(DashboardSelectors.dashboardEditionMode),
|
|
8338
|
+
this.forceModeEdition$
|
|
8339
|
+
]).pipe(map$1(([storeMode, forceMode]) => (forceMode === undefined ? storeMode : forceMode)));
|
|
8306
8340
|
this.subscriptions.add(this.modeEdition$.subscribe((mode) => {
|
|
8307
8341
|
this.modeEdition = mode;
|
|
8308
8342
|
if (!mode) {
|
|
@@ -8385,8 +8419,8 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
8385
8419
|
: manifest.grid?.rows ?? DEFAULT_ROWS_NUMBER)));
|
|
8386
8420
|
this.gridTemplateColumns$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map$1(([manifest, stacked]) => this.generateColumns(stacked ? 1 : manifest.grid?.columns || DEFAULT_COLUMNS_NUMBER)));
|
|
8387
8421
|
this.backgroundArea$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map$1(([manifest, stacked]) => !stacked
|
|
8388
|
-
? `
|
|
8389
|
-
: `
|
|
8422
|
+
? `1/1/${(manifest.grid?.rows ?? DEFAULT_ROWS_NUMBER) + 1}/${(manifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER) + 1}`
|
|
8423
|
+
: `1/1/${(manifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER) + 1}/1`));
|
|
8390
8424
|
this.separators$ = this.store
|
|
8391
8425
|
.select(DashboardSelectors.gridLayout)
|
|
8392
8426
|
.pipe(map$1((layout) => layout === DashboardGridLayout.MANUAL ? [] : WidgetPlacementUtils.getLayout(layout)?.places ?? []));
|
|
@@ -8770,12 +8804,29 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
8770
8804
|
trackWidgets(index, widgetManifest) {
|
|
8771
8805
|
return index + '-' + widgetManifest.type + '-' + JSON.stringify(widgetManifest.layout);
|
|
8772
8806
|
}
|
|
8807
|
+
changeSize(direction, offset) {
|
|
8808
|
+
const minRows = (this.manifest?.widgets.map((w) => w.layout.height + w.layout.y).reduce((a, b) => (a > b ? a : b), 2) ?? 2) - 1;
|
|
8809
|
+
const minColumns = (this.manifest?.widgets.map((w) => w.layout.width + w.layout.x).reduce((a, b) => (a > b ? a : b), 2) ?? 2) - 1;
|
|
8810
|
+
const futureSize = {
|
|
8811
|
+
rows: Math.max(minRows, (this.manifest.grid?.rows ?? DEFAULT_ROWS_NUMBER) + (direction === 'rows' ? offset : 0)),
|
|
8812
|
+
columns: Math.max(minColumns, (this.manifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER) + (direction === 'columns' ? offset : 0))
|
|
8813
|
+
};
|
|
8814
|
+
this.store.dispatch(DashboardActions.updateDashboardManifest({
|
|
8815
|
+
manifest: {
|
|
8816
|
+
...this.manifest,
|
|
8817
|
+
grid: {
|
|
8818
|
+
...(this.manifest?.grid ?? {}),
|
|
8819
|
+
...futureSize
|
|
8820
|
+
}
|
|
8821
|
+
}
|
|
8822
|
+
}));
|
|
8823
|
+
}
|
|
8773
8824
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8774
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n [style.padding]=\"'0 ' + dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n>\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div *ngIf=\"data.globalLoading; else notLoading\" class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}
|
|
8825
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n [style.padding]=\"'0 ' + dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n>\n <ng-container *ngIf=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\" [style.height.px]=\"this.params.gridHeight\">\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"contract-left\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"expand-right\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n </div>\n <div class=\"o-dashboard-add -cols\" [style.width.px]=\"this.params.gridWidth\">\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"contract-left\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"expand-right\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n </div>\n </ng-container>\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div *ngIf=\"data.globalLoading; else notLoading\" class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"200\"\n [height]=\"200\"\n />\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n </ng-container>\n </ng-container>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
8775
8826
|
}
|
|
8776
8827
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
8777
8828
|
type: Component,
|
|
8778
|
-
args: [{ selector: 'pry-dashboard', template: "<div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n [style.padding]=\"'0 ' + dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n>\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div *ngIf=\"data.globalLoading; else notLoading\" class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}
|
|
8829
|
+
args: [{ selector: 'pry-dashboard', template: "<div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n [style.padding]=\"'0 ' + dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n>\n <ng-container *ngIf=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\" [style.height.px]=\"this.params.gridHeight\">\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"contract-left\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"expand-right\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n </div>\n <div class=\"o-dashboard-add -cols\" [style.width.px]=\"this.params.gridWidth\">\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"contract-left\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"expand-right\" [width]=\"16\" [height]=\"16\"></pry-icon>\n </button>\n </div>\n </ng-container>\n <ng-container\n *ngFor=\"\n let widgetManifest of (windowManifest$ | async)?.widgets || [];\n let widgetIndex = index;\n trackBy: trackWidgets\n \"\n >\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n <ng-container *ngIf=\"modeEdition\">\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!modeEdition\">\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!noBackground\">\n <ng-container\n *ngIf=\"{\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n } as data\"\n >\n <ng-container *ngIf=\"data.noWidgets\">\n <div *ngIf=\"data.globalLoading; else notLoading\" class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"100\"\n [height]=\"100\"\n />\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n <ng-template #notLoading>\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n </ng-template>\n </ng-container>\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-icon\n iconSvg=\"loader\"\n class=\"no-widget__loading\"\n [alt]=\"'@pry.widget.target.loading' | i18n\"\n [width]=\"200\"\n [height]=\"200\"\n />\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n </ng-container>\n </ng-container>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
|
|
8779
8830
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }]; }, propDecorators: { templateModal: [{
|
|
8780
8831
|
type: ViewChild,
|
|
8781
8832
|
args: ['templateModal', { read: TemplateRef }]
|
|
@@ -8784,6 +8835,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8784
8835
|
args: [WidgetInstanciatorComponent]
|
|
8785
8836
|
}], staticDashboard: [{
|
|
8786
8837
|
type: Input
|
|
8838
|
+
}], forceModeEdition: [{
|
|
8839
|
+
type: Input
|
|
8787
8840
|
}], CloseOnDragOut: [{
|
|
8788
8841
|
type: Input
|
|
8789
8842
|
}], displayOptions: [{
|
|
@@ -9740,7 +9793,6 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
9740
9793
|
this.windowManifest = null;
|
|
9741
9794
|
this.menu = false;
|
|
9742
9795
|
this.type = LibraryTypes.ILLUSTRATION;
|
|
9743
|
-
this.DEFAULT_ICON_URL = DEFAULT_ICON_URL;
|
|
9744
9796
|
this.windowManifest$ = this.store
|
|
9745
9797
|
.select(DashboardSelectors.windowManifest)
|
|
9746
9798
|
.pipe(distinctUntilChanged$1((p, c) => equal(p, c)));
|
|
@@ -9980,6 +10032,7 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
9980
10032
|
toggleChangeSpot() {
|
|
9981
10033
|
if (!this.spotRef) {
|
|
9982
10034
|
this.places = WidgetPlacementUtils.placementOptions({ type: 'icon' }, this.currentLayout);
|
|
10035
|
+
this.placesManifest();
|
|
9983
10036
|
this.spotRef = this.overlay.create(new OverlayConfig({
|
|
9984
10037
|
hasBackdrop: true,
|
|
9985
10038
|
panelClass: ['o-modal-wrapper'],
|
|
@@ -9996,25 +10049,6 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
9996
10049
|
this.menuOpen();
|
|
9997
10050
|
}
|
|
9998
10051
|
}
|
|
9999
|
-
moveToPlace(place) {
|
|
10000
|
-
const startLayout = this.manifest$.getValue().layout;
|
|
10001
|
-
const targetLayout = place.layout;
|
|
10002
|
-
const newWindowManifest = JSON.parse(JSON.stringify(this.windowManifest));
|
|
10003
|
-
const targetWidgetIndex = newWindowManifest.widgets.findIndex((w) => w.layout.x === targetLayout.x &&
|
|
10004
|
-
w.layout.y === targetLayout.y &&
|
|
10005
|
-
w.layout.width === targetLayout.width &&
|
|
10006
|
-
w.layout.height === targetLayout.height);
|
|
10007
|
-
const startWidgetIndex = newWindowManifest.widgets.findIndex((w) => w.layout.x === startLayout.x &&
|
|
10008
|
-
w.layout.y === startLayout.y &&
|
|
10009
|
-
w.layout.width === startLayout.width &&
|
|
10010
|
-
w.layout.height === startLayout.height);
|
|
10011
|
-
if (targetWidgetIndex !== -1) {
|
|
10012
|
-
newWindowManifest.widgets[targetWidgetIndex].layout = startLayout;
|
|
10013
|
-
}
|
|
10014
|
-
newWindowManifest.widgets[startWidgetIndex].layout = targetLayout;
|
|
10015
|
-
this.store.dispatch(DashboardActions.updateDashboardManifest({ manifest: newWindowManifest }));
|
|
10016
|
-
this.toggleChangeSpot();
|
|
10017
|
-
}
|
|
10018
10052
|
focusCrossElement() {
|
|
10019
10053
|
this.cross?.nativeElement?.focus();
|
|
10020
10054
|
this.crossCatalog?.nativeElement?.focus();
|
|
@@ -10043,17 +10077,43 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
|
|
|
10043
10077
|
isGeo(ds) {
|
|
10044
10078
|
return ds.metadata?.find((m) => m.metadataDef.name === GeoMetadata.NAMESPACE) !== undefined;
|
|
10045
10079
|
}
|
|
10080
|
+
placesManifest() {
|
|
10081
|
+
const currentLayout = this.manifest$.getValue()?.layout;
|
|
10082
|
+
this.targetManifest = {
|
|
10083
|
+
widgets: this.places.map((place, idx) => ({
|
|
10084
|
+
...place,
|
|
10085
|
+
type: 'filler',
|
|
10086
|
+
options: {
|
|
10087
|
+
index: equal(currentLayout, place.layout)
|
|
10088
|
+
? -1
|
|
10089
|
+
: this.places.findIndex((pl) => place.layout.x === pl.layout.x &&
|
|
10090
|
+
place.layout.y === pl.layout.y &&
|
|
10091
|
+
place.layout.width === pl.layout.width &&
|
|
10092
|
+
place.layout.height === pl.layout.height),
|
|
10093
|
+
sourcePlace: currentLayout,
|
|
10094
|
+
targetPlace: place.layout,
|
|
10095
|
+
windowManifest: this.windowManifest
|
|
10096
|
+
}
|
|
10097
|
+
})),
|
|
10098
|
+
grid: {
|
|
10099
|
+
layout: this.currentLayout,
|
|
10100
|
+
rows: this.windowManifest?.grid?.rows ?? DEFAULT_ROWS_NUMBER,
|
|
10101
|
+
columns: this.windowManifest?.grid?.columns ?? DEFAULT_COLUMNS_NUMBER,
|
|
10102
|
+
gap: 3
|
|
10103
|
+
}
|
|
10104
|
+
};
|
|
10105
|
+
}
|
|
10046
10106
|
ngOnDestroy() {
|
|
10047
10107
|
super.ngOnDestroy();
|
|
10048
10108
|
this.subscription?.unsubscribe();
|
|
10049
10109
|
this.openSub?.unsubscribe();
|
|
10050
10110
|
}
|
|
10051
10111
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryWidgetHeaderComponent, deps: [{ token: i1.Store }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: ToolboxMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10052
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"displayContextMenu$ | async as options\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n</div>\n\n<ng-template #overlayMenu>\n <div class=\"m-context-menu\" *ngIf=\"displayContextMenu$ | async as options\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && (options === true || options['datasourceSelection'] === true)\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['parameters'] === true\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"options === true || options!['window'] === true\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n : { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n </ng-container>\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"hasGrid && (options === true || options!['changeSpot'] === true)\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['maximize'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['addToCatalog'] === true\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['delete'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["usedItems", "manifest"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
10112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: { manifest: "manifest", openData$: "openData$", additionalOptions: "additionalOptions", headerOptions: "headerOptions", displayCount: "displayCount", datasourceIds: "datasourceIds", widgetIndex: "widgetIndex" }, outputs: { manifestModified: "manifestModified" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "toggle", first: true, predicate: ["toggle"], descendants: true, read: TemplateRef }, { propertyName: "overlayMenu", first: true, predicate: ["overlayMenu"], descendants: true, read: TemplateRef }, { propertyName: "overlayCatalog", first: true, predicate: ["overlayCatalog"], descendants: true, read: TemplateRef }, { propertyName: "overlaySpot", first: true, predicate: ["overlaySpot"], descendants: true, read: TemplateRef }, { propertyName: "togglePanel", first: true, predicate: ["togglePanel"], descendants: true }, { propertyName: "cross", first: true, predicate: ["cross"], descendants: true }, { propertyName: "validate", first: true, predicate: ["validate"], descendants: true }, { propertyName: "validateCatalog", first: true, predicate: ["validateCatalog"], descendants: true }, { propertyName: "cancel", first: true, predicate: ["cancel"], descendants: true }, { propertyName: "crossCatalog", first: true, predicate: ["crossCatalog"], descendants: true }, { propertyName: "inputCatalog", first: true, predicate: ["inputCatalog"], descendants: true }, { propertyName: "menuList", first: true, predicate: ["menuList"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"displayContextMenu$ | async as options\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n</div>\n\n<ng-template #overlayMenu>\n <div class=\"m-context-menu\" *ngIf=\"displayContextMenu$ | async as options\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && (options === true || options['datasourceSelection'] === true)\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['parameters'] === true\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"options === true || options!['window'] === true\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n : { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n </ng-container>\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"hasGrid && (options === true || options!['changeSpot'] === true)\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['maximize'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['addToCatalog'] === true\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['delete'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: PrySelectImageComponent, selector: "pry-select-image", inputs: ["iconUrl", "size", "mode"], outputs: ["toggled", "changed"] }, { kind: "component", type: DashboardComponent, selector: "pry-dashboard", inputs: ["staticDashboard", "forceModeEdition", "CloseOnDragOut", "displayOptions", "noBackground", "breakpoint"], outputs: ["rowHeight", "rows"] }, { kind: "component", type: DatasourceSelectorComponent, selector: "pry-datasource-selector", inputs: ["usedItems", "manifest"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: I18nPipe, name: "i18n" }, { kind: "pipe", type: ResultSetSizePipe, name: "resultSetSize" }] }); }
|
|
10053
10113
|
}
|
|
10054
10114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryWidgetHeaderComponent, decorators: [{
|
|
10055
10115
|
type: Component,
|
|
10056
|
-
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"displayContextMenu$ | async as options\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n</div>\n\n<ng-template #overlayMenu>\n <div class=\"m-context-menu\" *ngIf=\"displayContextMenu$ | async as options\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && (options === true || options['datasourceSelection'] === true)\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['parameters'] === true\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"options === true || options!['window'] === true\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n : { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n </ng-container>\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"hasGrid && (options === true || options!['changeSpot'] === true)\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['maximize'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['addToCatalog'] === true\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['delete'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <ng-container *ngFor=\"let place of places; let i = index\">\n <ng-container *ngIf=\"currentPlacementIndex !== i\">\n <button type=\"button\" class=\"a-btn\" (click)=\"moveToPlace(place)\">\n <span>{{ '@pry.widget.tooltip.spotName' | i18n : { place: i + 1 } }}</span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
10116
|
+
args: [{ selector: 'pry-widget-header', template: "<div class=\"o-widget__header\">\n <div class=\"o-widget__header__content\">\n <h2 class=\"o-widget__header__content__title\" *ngIf=\"(manifest$ | async)?.title; else querySelector\">\n {{ (manifest$ | async)?.title }}\n </h2>\n <ng-template #querySelector>\n <div *ngFor=\"let ds of usedDatasources$ | async\" class=\"o-widget__header__content__query\">\n <ng-container\n *ngIf=\"ds.id | translateId : { type: 'datasource', output: 'icon', noDefault: true } | async as url\"\n >\n <img [height]=\"20\" [src]=\"url\" [width]=\"20\" alt=\"\" class=\"o-widget__header__content__query__icon\" />\n </ng-container>\n <h3 class=\"o-widget__header__content__query__name\">{{ ds.name }}</h3>\n <h3 class=\"o-widget__header__content__query__name\" *ngIf=\"displayCount && !isGeo(ds)\">\n ({{ [ds.id] | resultSetSize | async }})\n </h3>\n </div>\n <div *ngIf=\"((usedDatasources$ | async) ?? []).length === 0\" class=\"o-widget__header__content__no-data\">\n <h2 class=\"o-widget__header__content__title\">{{ '@pry.widget.noData' | i18n }}</h2>\n </div>\n </ng-template>\n </div>\n <div class=\"m-btn-group\" *ngIf=\"displayContextMenu$ | async as options\">\n <button\n type=\"button\"\n id=\"dialog_Menu\"\n aria-controls=\"menu\"\n [attr.aria-expanded]=\"this.menu\"\n #togglePanel\n class=\"a-btn a-btn--more\"\n (click)=\"menuOpen($event)\"\n >\n <pry-icon [height]=\"25\" [width]=\"25\" iconSvg=\"more_horiz\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.openMenuWidget' | i18n }}</span>\n </button>\n </div>\n</div>\n\n<ng-template #overlayMenu>\n <div class=\"m-context-menu\" *ngIf=\"displayContextMenu$ | async as options\">\n <ul\n class=\"m-context-menu__list\"\n #menuList\n id=\"menu\"\n role=\"menu\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Menu\"\n (keydown.arrowDown)=\"onArrowDown()\"\n (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.escape)=\"menuOpen()\"\n >\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"(manifest$ | async)?.datasource && (options === true || options['datasourceSelection'] === true)\"\n >\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n id=\"toggleActions\"\n (click)=\"toggleDatasourceSelection()\"\n *pryAccess=\"{ module: 'dashboard', page: 'widget', action: 'select_named_query' }\"\n class=\"a-btn\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"stack-fill\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['parameters'] === true\">\n <ng-content></ng-content>\n </li>\n <ng-container *ngIf=\"options === true || options!['window'] === true\">\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let targetIndex of targetIndexes$ | async\">\n <button\n type=\"button\"\n (click)=\"moveInNewWindow(_widgetIndex, targetIndex)\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"launch\"></pry-icon>\n {{\n (targetIndex !== -1 ? '@pry.widget.target.existing' : '@pry.widget.target.new')\n | i18n : { targetIndex: this.targetIndex + 1 }\n }}\n </button>\n </li>\n </ng-container>\n <li\n class=\"m-context-menu__list__item\"\n role=\"none\"\n *ngIf=\"hasGrid && (options === true || options!['changeSpot'] === true)\"\n >\n <button type=\"button\" role=\"menuitem\" (click)=\"toggleChangeSpot()\" class=\"a-btn\" tabindex=\"-1\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"move\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.changeSpot' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['maximize'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"maximize(_widgetIndex)\"\n class=\"a-btn\"\n (keydown.escape)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"fullscreen\"></pry-icon>\n {{ '@pry.widget.target.maximize' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['addToCatalog'] === true\">\n <button type=\"button\" role=\"menuitem\" tabindex=\"-1\" (click)=\"toggleCatalog()\" class=\"a-btn\">\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"library_add\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.catalogWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngIf=\"options === true || options!['delete'] === true\">\n <button\n type=\"button\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"toggleRemoveConfirm($event)\"\n class=\"a-btn\"\n (keydown.tab)=\"menuOpen()\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" iconSvg=\"delete\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.deleteWidget' | i18n }}</span>\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" role=\"none\" *ngFor=\"let option of additionalOptions\">\n <button\n type=\"button\"\n class=\"a-btn\"\n role=\"menuitem\"\n tabindex=\"-1\"\n (click)=\"executeAction(option)\"\n [disabled]=\"isActionDisabled(option)\"\n >\n <pry-icon [height]=\"17\" [width]=\"17\" [iconSvg]=\"option.icon\"></pry-icon>\n {{ option.label | i18n }}\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #templateModal>\n <div\n class=\"o-modal\"\n (keydown.escape)=\"cancelRemoveConfirm()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog confirm delete presentation\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" #cross (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\" (keydown.tab)=\"focusCrossElement()\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #template>\n <pry-datasource-selector\n bindLabel=\"name\"\n bindValue=\"id\"\n translationStringBase=\"@pry.components.chipsSelector.datasource.\"\n (cancel)=\"toggleDatasourceSelection()\"\n (validated)=\"emitManifest()\"\n (nextTab)=\"focusInputCatalog()\"\n (previousTab)=\"focusValidation()\"\n (itemsChanged)=\"datasourcesChanged($event)\"\n [usedItems]=\"(usedDatasources$ | async) ?? []\"\n ></pry-datasource-selector>\n</ng-template>\n\n<ng-template #overlayCatalog>\n <div\n class=\"o-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog_Catalog\"\n (keydown.escape)=\"toggleCatalog()\"\n >\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.defineCatalog' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button\n class=\"a-btn a-btn--icon-only\"\n (keydown.shift.tab)=\"focusValidation()\"\n #crossCatalog\n (click)=\"toggleCatalog()\"\n >\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"name\">{{ '@pry.toolbox.catalog.label' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.name\" id=\"name\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"description\">{{ '@pry.toolbox.catalog.description' | i18n }}</label>\n <input [(ngModel)]=\"catalogInfo.description\" id=\"description\" type=\"text\" class=\"a-form-field\" required />\n </div>\n <div class=\"m-form-label-field\">\n <pry-select-image\n [iconUrl]=\"catalogInfo.image\"\n (changed)=\"catalogInfo.image = $event\"\n [mode]=\"type\"\n ></pry-select-image>\n </div>\n <div class=\"m-btn-group\">\n <button\n type=\"button\"\n (click)=\"toggleCatalog()\"\n #cancel\n (keydown.tab)=\"disableValidation()\"\n class=\"a-btn a-btn--secondary\"\n >\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button\n type=\"submit\"\n #validateCatalog\n (click)=\"confirmCatalog()\"\n [disabled]=\"!toolboxMenuService.isValidForCatalog(catalogInfo.name)\"\n class=\"a-btn a-btn--primary\"\n (keydown.tab)=\"focusCrossElement()\"\n >\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #overlaySpot>\n <div class=\"o-modal -place\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\">\n {{ '@pry.widget.tooltip.changeSpot' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"toggleChangeSpot()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <pry-dashboard\n [staticDashboard]=\"targetManifest!\"\n [breakpoint]=\"10\"\n [noBackground]=\"true\"\n [forceModeEdition]=\"false\"\n ></pry-dashboard>\n </div>\n</ng-template>\n" }]
|
|
10057
10117
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: ToolboxMenuService }]; }, propDecorators: { template: [{
|
|
10058
10118
|
type: ViewChild,
|
|
10059
10119
|
args: ['template', { read: TemplateRef }]
|
|
@@ -10546,7 +10606,7 @@ class PryTitleService {
|
|
|
10546
10606
|
this.displayPageNumber = display;
|
|
10547
10607
|
}
|
|
10548
10608
|
changeTitle(key) {
|
|
10549
|
-
const nextTitle = !!key ? this.translateService.instant(key) : this.title.getTitle().split('[')[0];
|
|
10609
|
+
const nextTitle = !!key ? this.translateService.instant(key, {}, false) : this.title.getTitle().split('[')[0];
|
|
10550
10610
|
const pageNumber = this.displayPageNumber && this.pageCount > 1
|
|
10551
10611
|
? `[${this.translateService.instant('@pry.view.name', {
|
|
10552
10612
|
rank: this.rank + 1
|
|
@@ -10807,7 +10867,7 @@ class DashboardEffects {
|
|
|
10807
10867
|
DashboardActions.fetchManifestsList(),
|
|
10808
10868
|
DashboardActions.setInitialPresentation({ initial: manifest })
|
|
10809
10869
|
])));
|
|
10810
|
-
this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0 || rank === -1), mergeMap$1(([action, rank]) => this.manifestService.list().pipe(map$1((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
|
|
10870
|
+
this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0 || rank === -1), debounceTime$1(100), mergeMap$1(([action, rank]) => this.manifestService.list().pipe(map$1((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
|
|
10811
10871
|
this.confirmManifestDeletion$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.confirmManifestDeletion), tap((action) => {
|
|
10812
10872
|
const data = {
|
|
10813
10873
|
title: '@pry.widget.modalTitle',
|