@arsedizioni/ars-utils 21.2.296 → 21.2.298
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/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +8 -3
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +277 -244
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-ui.application.d.ts +114 -64
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, Renderer2, ElementRef, afterNextRender, Directive, output, ChangeDetectorRef, signal, ChangeDetectionStrategy, Component, Injectable, DestroyRef, viewChild, NgModule,
|
|
2
|
+
import { input, inject, Renderer2, ElementRef, afterNextRender, Directive, output, ChangeDetectorRef, signal, ChangeDetectionStrategy, Component, Injectable, DestroyRef, viewChild, NgModule, effect, Input, Optional, Self, computed, booleanAttribute, model } from '@angular/core';
|
|
3
3
|
import * as i14 from '@angular/material/paginator';
|
|
4
4
|
import { MatPaginatorModule, MatPaginatorIntl } from '@angular/material/paginator';
|
|
5
5
|
import { DialogService, OtpInputComponent, PaginatorIntl, UIService } from '@arsedizioni/ars-utils/ui';
|
|
@@ -1665,6 +1665,7 @@ class ButtonSelectorComponent {
|
|
|
1665
1665
|
this.changed.emit(this._value);
|
|
1666
1666
|
this.current.set(this._value);
|
|
1667
1667
|
}
|
|
1668
|
+
/** The current value as the selected item. */
|
|
1668
1669
|
get value() {
|
|
1669
1670
|
return this._value;
|
|
1670
1671
|
}
|
|
@@ -1715,14 +1716,15 @@ class ButtonSelectorComponent {
|
|
|
1715
1716
|
if (this.ngControl != null) {
|
|
1716
1717
|
this.ngControl.valueAccessor = this;
|
|
1717
1718
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1719
|
+
// Pre-select the first option whenever options change and autoSelect is enabled
|
|
1720
|
+
effect(() => {
|
|
1721
|
+
if (this.autoSelect()) {
|
|
1722
|
+
const options = this.options();
|
|
1723
|
+
if (options.length > 0 && options[0].value) {
|
|
1724
|
+
this.current.set(options[0]);
|
|
1725
|
+
}
|
|
1724
1726
|
}
|
|
1725
|
-
}
|
|
1727
|
+
});
|
|
1726
1728
|
}
|
|
1727
1729
|
ngOnDestroy() {
|
|
1728
1730
|
this.stateChanges.complete();
|
|
@@ -1748,10 +1750,23 @@ class ButtonSelectorComponent {
|
|
|
1748
1750
|
registerOnTouched(fn) {
|
|
1749
1751
|
this.propagateTouched = fn;
|
|
1750
1752
|
}
|
|
1753
|
+
/**
|
|
1754
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
1755
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
1756
|
+
*/
|
|
1751
1757
|
setDescribedByIds(ids) {
|
|
1752
1758
|
this.describedBy = ids.join(' ');
|
|
1753
1759
|
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
1762
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
1763
|
+
*/
|
|
1754
1764
|
setDisabledState(isDisabled) {
|
|
1765
|
+
this._disabled = isDisabled;
|
|
1766
|
+
if (isDisabled && this.focused) {
|
|
1767
|
+
this.focused = false;
|
|
1768
|
+
this.stateChanges.next();
|
|
1769
|
+
}
|
|
1755
1770
|
if (!SystemUtils.isBrowser())
|
|
1756
1771
|
return;
|
|
1757
1772
|
const elem = document.getElementById(this.id);
|
|
@@ -1759,6 +1774,9 @@ class ButtonSelectorComponent {
|
|
|
1759
1774
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
1760
1775
|
}
|
|
1761
1776
|
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
1779
|
+
*/
|
|
1762
1780
|
onContainerClick() {
|
|
1763
1781
|
if (!this.focused) {
|
|
1764
1782
|
if (!SystemUtils.isBrowser())
|
|
@@ -1786,31 +1804,27 @@ class ButtonSelectorComponent {
|
|
|
1786
1804
|
this.writeValue(undefined);
|
|
1787
1805
|
}
|
|
1788
1806
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ButtonSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelSelected: { classPropertyName: "labelSelected", publicName: "labelSelected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", selected: "selected" }, host: { properties: { "id": "
|
|
1807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelSelected: { classPropertyName: "labelSelected", publicName: "labelSelected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", selected: "selected" }, host: { properties: { "id": "id", "attr.aria-describedBy": "describedBy" } }, ngImport: i0, template: "<button mat-stroked-button class=\"menu-selector-button\" [style.border]=\"border() >= 0 ? border() : 'auto'\"\r\n [style.border-radius]=\"borderRadius()\" [style.height]=\"border() <= 0 ? '40px' : 'auto'\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\" [attr.aria-label]=\"label()\"\r\n [matMenuTriggerFor]=\"optionsMenu\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"100\" fxFlexAlign=\"center\">\r\n @if(current()) {\r\n <div style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n @if(labelSelected() || label()) {\r\n <div class=\"x-small \">{{labelSelected() ?? label()}}</div>\r\n <div fxHide.xs class=\"small truncated-1\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated-1\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n } @else {\r\n <div fxHide.xs class=\"small truncated\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else if(labelSelected() || label()) {\r\n <div class=\"truncated\" style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n {{labelSelected() ?? label()}}</div>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </div>\r\n </div>\r\n</button>\r\n<mat-menu #optionsMenu=\"matMenu\">\r\n @for (o of options(); track o) {\r\n <button mat-menu-item (click)=\"select(o)\" [disabled]=\"o.disabled\">\r\n {{o.name}}\r\n @if(o.bag) {\r\n ({{o.bag}})\r\n }\r\n </button>\r\n }\r\n</mat-menu>", styles: [".menu-selector-button{padding:0 10px 0 20px!important;border-radius:9999px!important}.menu-selector-button .in-search-bar{height:56px!important;padding:0 20px!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}::ng-deep .menu-selector-button>.mdc-button__label{width:100%!important}.truncated-1{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 1){.truncated-1{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1790
1808
|
}
|
|
1791
1809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ButtonSelectorComponent, decorators: [{
|
|
1792
1810
|
type: Component,
|
|
1793
1811
|
args: [{ selector: 'button-selector', standalone: true, imports: [FlexLayoutModule, MatIconModule, MatButtonModule,
|
|
1794
|
-
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1812
|
+
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1813
|
+
'[id]': 'id',
|
|
1814
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
1815
|
+
}, template: "<button mat-stroked-button class=\"menu-selector-button\" [style.border]=\"border() >= 0 ? border() : 'auto'\"\r\n [style.border-radius]=\"borderRadius()\" [style.height]=\"border() <= 0 ? '40px' : 'auto'\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\" [attr.aria-label]=\"label()\"\r\n [matMenuTriggerFor]=\"optionsMenu\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"100\" fxFlexAlign=\"center\">\r\n @if(current()) {\r\n <div style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n @if(labelSelected() || label()) {\r\n <div class=\"x-small \">{{labelSelected() ?? label()}}</div>\r\n <div fxHide.xs class=\"small truncated-1\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated-1\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n } @else {\r\n <div fxHide.xs class=\"small truncated\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else if(labelSelected() || label()) {\r\n <div class=\"truncated\" style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n {{labelSelected() ?? label()}}</div>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </div>\r\n </div>\r\n</button>\r\n<mat-menu #optionsMenu=\"matMenu\">\r\n @for (o of options(); track o) {\r\n <button mat-menu-item (click)=\"select(o)\" [disabled]=\"o.disabled\">\r\n {{o.name}}\r\n @if(o.bag) {\r\n ({{o.bag}})\r\n }\r\n </button>\r\n }\r\n</mat-menu>", styles: [".menu-selector-button{padding:0 10px 0 20px!important;border-radius:9999px!important}.menu-selector-button .in-search-bar{height:56px!important;padding:0 20px!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}::ng-deep .menu-selector-button>.mdc-button__label{width:100%!important}.truncated-1{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 1){.truncated-1{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}}\n"] }]
|
|
1795
1816
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1796
1817
|
type: Optional
|
|
1797
1818
|
}, {
|
|
1798
1819
|
type: Self
|
|
1799
1820
|
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], selected: [{ type: i0.Output, args: ["selected"] }], disabled: [{
|
|
1800
1821
|
type: Input
|
|
1801
|
-
}], id: [{
|
|
1802
|
-
type: HostBinding
|
|
1803
|
-
}], describedBy: [{
|
|
1804
|
-
type: HostBinding,
|
|
1805
|
-
args: ['attr.aria-describedBy']
|
|
1806
1822
|
}], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSelected", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }] } });
|
|
1807
1823
|
|
|
1808
1824
|
class ButtonToggleComponent {
|
|
1809
1825
|
constructor() {
|
|
1810
1826
|
/** Emitted each time the button is clicked. Carries the current `value` and the new `toggled` state. */
|
|
1811
1827
|
this.changed = output();
|
|
1812
|
-
/** Tracks whether the button has been toggled (opposite of the current `value` input). */
|
|
1813
|
-
this.toggled = signal(false, ...(ngDevMode ? [{ debugName: "toggled" }] : /* istanbul ignore next */ []));
|
|
1814
1828
|
/** Current value bound from the parent. Drives label and icon selection. */
|
|
1815
1829
|
this.value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1816
1830
|
/** Width of the button in pixels. Use `-1` for automatic sizing. */
|
|
@@ -1839,8 +1853,8 @@ class ButtonToggleComponent {
|
|
|
1839
1853
|
* The emitted `toggled` value is the logical inverse of the current `value`.
|
|
1840
1854
|
*/
|
|
1841
1855
|
toggle() {
|
|
1842
|
-
|
|
1843
|
-
this.changed.emit({ value: this.value(), toggled
|
|
1856
|
+
const toggled = !this.value();
|
|
1857
|
+
this.changed.emit({ value: this.value(), toggled });
|
|
1844
1858
|
}
|
|
1845
1859
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1846
1860
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ButtonToggleComponent, isStandalone: true, selector: "button-toggle", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, labelOn: { classPropertyName: "labelOn", publicName: "labelOn", isSignal: true, isRequired: false, transformFunction: null }, labelOff: { classPropertyName: "labelOff", publicName: "labelOff", isSignal: true, isRequired: false, transformFunction: null }, iconOn: { classPropertyName: "iconOn", publicName: "iconOn", isSignal: true, isRequired: false, transformFunction: null }, iconOff: { classPropertyName: "iconOff", publicName: "iconOff", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "cssClass", isSignal: true, isRequired: false, transformFunction: null }, cssClassSmall: { classPropertyName: "cssClassSmall", publicName: "cssClassSmall", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, ngImport: i0, template: "<button mat-stroked-button [style.border]=\"border() >= 0 ? border() : 'auto'\"\r\n [style.height]=\"border() <= 0 ? '40px' : 'auto'\" [style.minWidth.px]=\"width() > 0 ? width() : 'auto'\"\r\n [style.mxn-width.px]=\"width() > 0 ? width() : 'auto'\" [class]=\"cssClass()\" [attr.aria-label]=\"label()\"\r\n (click)=\"toggle()\" [class.button-on]=\"value() === true\" [ngClass.xs]=\"cssClassSmall()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"center center\" fxFill>\r\n @if(icon()) {\r\n <div fxFlex=\"24px\"><mat-icon style=\"display: block;\">{{icon()}}</mat-icon></div>\r\n }\r\n <div [innerHtml]=\"label() | safeHtml\"></div>\r\n </div>\r\n</button>", styles: [".button-on{background-color:var(--mat-switch-selected-focus-handle-color)!important;border-color:var(--mat-switch-selected-focus-handle-color)!important;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -1878,6 +1892,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1878
1892
|
}], ctorParameters: () => [] });
|
|
1879
1893
|
|
|
1880
1894
|
class ChipsSelectorComponent {
|
|
1895
|
+
get disabled() {
|
|
1896
|
+
if (this.ngControl && this.ngControl.disabled != null) {
|
|
1897
|
+
return this.ngControl.disabled;
|
|
1898
|
+
}
|
|
1899
|
+
return this._disabled;
|
|
1900
|
+
}
|
|
1901
|
+
set disabled(value) {
|
|
1902
|
+
this._disabled = coerceBooleanProperty(value);
|
|
1903
|
+
if (this.focused) {
|
|
1904
|
+
this.focused = false;
|
|
1905
|
+
this.stateChanges.next();
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
/** True when the label should float above the field (focused or has a value). */
|
|
1909
|
+
get shouldLabelFloat() {
|
|
1910
|
+
return this.focused || !this.empty;
|
|
1911
|
+
}
|
|
1881
1912
|
set value(value) {
|
|
1882
1913
|
this._value = value;
|
|
1883
1914
|
this.selection = [];
|
|
@@ -1898,44 +1929,17 @@ class ChipsSelectorComponent {
|
|
|
1898
1929
|
this.changed.emit(this._value);
|
|
1899
1930
|
}
|
|
1900
1931
|
}
|
|
1932
|
+
/** The current value as an array of selected items. */
|
|
1901
1933
|
get value() {
|
|
1902
1934
|
return this._value;
|
|
1903
1935
|
}
|
|
1936
|
+
/** True when no item is selected. */
|
|
1904
1937
|
get empty() {
|
|
1905
|
-
return !this._value || this._value
|
|
1938
|
+
return !this._value || this._value.length === 0;
|
|
1906
1939
|
}
|
|
1940
|
+
/** True when the control has validation errors and has been touched. */
|
|
1907
1941
|
get errorState() {
|
|
1908
|
-
return this.ngControl
|
|
1909
|
-
}
|
|
1910
|
-
get required() {
|
|
1911
|
-
return this._required;
|
|
1912
|
-
}
|
|
1913
|
-
set required(value) {
|
|
1914
|
-
this._required = coerceBooleanProperty(value);
|
|
1915
|
-
this.stateChanges.next();
|
|
1916
|
-
}
|
|
1917
|
-
get disabled() {
|
|
1918
|
-
if (this.ngControl && this.ngControl.disabled != null) {
|
|
1919
|
-
return this.ngControl.disabled;
|
|
1920
|
-
}
|
|
1921
|
-
return this._disabled;
|
|
1922
|
-
}
|
|
1923
|
-
set disabled(value) {
|
|
1924
|
-
this._disabled = coerceBooleanProperty(value);
|
|
1925
|
-
if (this.focused) {
|
|
1926
|
-
this.focused = false;
|
|
1927
|
-
this.stateChanges.next();
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
get placeholder() {
|
|
1931
|
-
return this._placeholder;
|
|
1932
|
-
}
|
|
1933
|
-
set placeholder(value) {
|
|
1934
|
-
this._placeholder = value;
|
|
1935
|
-
this.stateChanges.next();
|
|
1936
|
-
}
|
|
1937
|
-
get shouldLabelFloat() {
|
|
1938
|
-
return this.focused || !this.empty;
|
|
1942
|
+
return this.ngControl?.errors != null && (this.ngControl?.touched ?? false);
|
|
1939
1943
|
}
|
|
1940
1944
|
constructor(ngControl) {
|
|
1941
1945
|
this.ngControl = ngControl;
|
|
@@ -1974,41 +1978,46 @@ class ChipsSelectorComponent {
|
|
|
1974
1978
|
this.stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
|
|
1975
1979
|
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
1976
1980
|
this.padAt = input(0, ...(ngDevMode ? [{ debugName: "padAt" }] : /* istanbul ignore next */ []));
|
|
1977
|
-
|
|
1978
|
-
this.
|
|
1981
|
+
/** When `true`, the control is required. */
|
|
1982
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1983
|
+
/** Placeholder text shown when no value is selected. */
|
|
1984
|
+
this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1979
1985
|
this._disabled = false;
|
|
1980
|
-
this._placeholder = '';
|
|
1981
|
-
this.propagateChange = () => { };
|
|
1982
|
-
this.propagateTouched = () => { };
|
|
1983
1986
|
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
1984
1987
|
this.describedBy = '';
|
|
1988
|
+
this._value = [];
|
|
1989
|
+
this.propagateChange = () => { };
|
|
1990
|
+
this.propagateTouched = () => { };
|
|
1985
1991
|
this.renderer = inject(Renderer2);
|
|
1986
1992
|
/** Currently selected items (may contain multiple entries when `multiple` is `true`). */
|
|
1987
1993
|
this.selection = [];
|
|
1988
1994
|
if (this.ngControl != null) {
|
|
1989
1995
|
this.ngControl.valueAccessor = this;
|
|
1990
1996
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1997
|
+
// Notify state changes whenever required or placeholder inputs change
|
|
1998
|
+
effect(() => {
|
|
1999
|
+
this.required();
|
|
2000
|
+
this.placeholder();
|
|
2001
|
+
this.stateChanges.next();
|
|
2002
|
+
});
|
|
2003
|
+
afterNextRender(() => {
|
|
2004
|
+
// React to window resize to keep the collapsed state up to date
|
|
2005
|
+
fromEvent(window, 'resize')
|
|
2006
|
+
.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250))
|
|
2007
|
+
.subscribe(() => {
|
|
2008
|
+
if (this.collapseAt() > 0) {
|
|
2009
|
+
this.updateContainerWidth();
|
|
2010
|
+
}
|
|
2011
|
+
});
|
|
2012
|
+
setTimeout(() => {
|
|
1999
2013
|
this.updateContainerWidth();
|
|
2000
|
-
|
|
2014
|
+
this.changesEnabled = true;
|
|
2015
|
+
}, 250);
|
|
2001
2016
|
});
|
|
2002
2017
|
}
|
|
2003
2018
|
ngOnDestroy() {
|
|
2004
2019
|
this.stateChanges.complete();
|
|
2005
2020
|
}
|
|
2006
|
-
ngAfterContentInit() {
|
|
2007
|
-
setTimeout(() => {
|
|
2008
|
-
this.updateContainerWidth();
|
|
2009
|
-
this.changesEnabled = true;
|
|
2010
|
-
}, 250);
|
|
2011
|
-
}
|
|
2012
2021
|
/**
|
|
2013
2022
|
* Measures the container (or window) width and updates the `containerWidth` signal,
|
|
2014
2023
|
* retrying after 100 ms if the element is not yet laid out.
|
|
@@ -2017,8 +2026,8 @@ class ChipsSelectorComponent {
|
|
|
2017
2026
|
const elem = document.getElementById(this.containerId);
|
|
2018
2027
|
if (elem && elem.clientWidth > 0) {
|
|
2019
2028
|
this.containerWidth.set(this.collapseAtContainer()
|
|
2020
|
-
?
|
|
2021
|
-
:
|
|
2029
|
+
? elem.clientWidth
|
|
2030
|
+
: window.innerWidth);
|
|
2022
2031
|
}
|
|
2023
2032
|
else {
|
|
2024
2033
|
setTimeout(() => this.updateContainerWidth(), 100);
|
|
@@ -2032,7 +2041,7 @@ class ChipsSelectorComponent {
|
|
|
2032
2041
|
getSelection() {
|
|
2033
2042
|
const value = !this.multiple() && this.collapsed() && this.collapsedDisplayMode() === 'button'
|
|
2034
2043
|
? this.singleSelection
|
|
2035
|
-
: this.selection
|
|
2044
|
+
: this.selection;
|
|
2036
2045
|
if (Array.isArray(value)) {
|
|
2037
2046
|
return value;
|
|
2038
2047
|
}
|
|
@@ -2050,6 +2059,7 @@ class ChipsSelectorComponent {
|
|
|
2050
2059
|
* Returns `true` when the given item can be selected in the current mode.
|
|
2051
2060
|
* In single-select mode an already-selected item is not re-selectable.
|
|
2052
2061
|
* @param item - The item to check.
|
|
2062
|
+
* @returns True when the item is selectable.
|
|
2053
2063
|
*/
|
|
2054
2064
|
isSelectable(item) {
|
|
2055
2065
|
return this.multiple() || this.getSelection().findIndex(x => x.value === item.value) === -1;
|
|
@@ -2078,10 +2088,23 @@ class ChipsSelectorComponent {
|
|
|
2078
2088
|
registerOnTouched(fn) {
|
|
2079
2089
|
this.propagateTouched = fn;
|
|
2080
2090
|
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
2093
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
2094
|
+
*/
|
|
2081
2095
|
setDescribedByIds(ids) {
|
|
2082
2096
|
this.describedBy = ids.join(' ');
|
|
2083
2097
|
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
2100
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
2101
|
+
*/
|
|
2084
2102
|
setDisabledState(isDisabled) {
|
|
2103
|
+
this._disabled = isDisabled;
|
|
2104
|
+
if (isDisabled && this.focused) {
|
|
2105
|
+
this.focused = false;
|
|
2106
|
+
this.stateChanges.next();
|
|
2107
|
+
}
|
|
2085
2108
|
if (!SystemUtils.isBrowser())
|
|
2086
2109
|
return;
|
|
2087
2110
|
const elem = document.getElementById(this.id);
|
|
@@ -2089,6 +2112,9 @@ class ChipsSelectorComponent {
|
|
|
2089
2112
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
2090
2113
|
}
|
|
2091
2114
|
}
|
|
2115
|
+
/**
|
|
2116
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
2117
|
+
*/
|
|
2092
2118
|
onContainerClick() {
|
|
2093
2119
|
if (!this.focused) {
|
|
2094
2120
|
if (!SystemUtils.isBrowser())
|
|
@@ -2118,36 +2144,27 @@ class ChipsSelectorComponent {
|
|
|
2118
2144
|
}
|
|
2119
2145
|
}
|
|
2120
2146
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ChipsSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2121
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ChipsSelectorComponent, isStandalone: true, selector: "chips-selector", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, collapsedWidth: { classPropertyName: "collapsedWidth", publicName: "collapsedWidth", isSignal: true, isRequired: false, transformFunction: null }, collapsedDisplayMode: { classPropertyName: "collapsedDisplayMode", publicName: "collapsedDisplayMode", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null }, collapseAtContainer: { classPropertyName: "collapseAtContainer", publicName: "collapseAtContainer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, mustSelect: { classPropertyName: "mustSelect", publicName: "mustSelect", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, padAt: { classPropertyName: "padAt", publicName: "padAt", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal:
|
|
2147
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ChipsSelectorComponent, isStandalone: true, selector: "chips-selector", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, collapsedWidth: { classPropertyName: "collapsedWidth", publicName: "collapsedWidth", isSignal: true, isRequired: false, transformFunction: null }, collapsedDisplayMode: { classPropertyName: "collapsedDisplayMode", publicName: "collapsedDisplayMode", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null }, collapseAtContainer: { classPropertyName: "collapseAtContainer", publicName: "collapseAtContainer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, mustSelect: { classPropertyName: "mustSelect", publicName: "mustSelect", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, padAt: { classPropertyName: "padAt", publicName: "padAt", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { properties: { "id": "id", "class.floating": "shouldLabelFloat", "attr.aria-describedBy": "describedBy" } }, ngImport: i0, template: "<div [id]=\"containerId\" class=\"chips-selector\">\r\n @if(containerWidth() > 0) {\r\n @if(collapsed()) {\r\n @if(collapsedDisplayMode() === 'dropdown') {\r\n <mat-form-field [style.min-width]=\"collapsedWidth() > 0 ? collapsedWidth()+'px' : '100%'\" subscriptSizing=\"dynamic\">\r\n @if(label()) {\r\n <mat-label>{{label()}}</mat-label>\r\n }\r\n <mat-select [(ngModel)]=\"selection\" [multiple]=\"multiple()\" (selectionChange)=\"updateValue()\">\r\n <mat-select-trigger>\r\n @if (value && (value.length || 0) > 0) {\r\n {{value[0].shortName ?? value[0].name}}\r\n }\r\n @if (value && (value.length || 0) > 1) {\r\n <span class=\"collapsed-additional-selection\">\r\n (+{{(value.length || 0) - 1}} {{value.length === 2 ? 'altro' : 'altri'}})\r\n </span>\r\n }\r\n </mat-select-trigger>\r\n @for (o of options(); track o) {\r\n <mat-option [value]=\"o\" [disabled]=\"o.disabled\">\r\n {{o.name}}\r\n @if(o.bag) {\r\n ({{o.bag}})\r\n }\r\n </mat-option>\r\n }\r\n </mat-select>\r\n @if (value && (value.length || 0) > 0) {\r\n <button matSuffix tabindex=\"-1\" mat-icon-button aria-label=\"Pulisci\" (click)=\"clear($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <button-selector [label]=\"label()\" [options]=\"options()\" [width]=\"collapsedWidth()\" [(ngModel)]=\"singleSelection\"\r\n name=\"value\" (selected)=\"updateValue()\"></button-selector>\r\n\r\n }\r\n } @else {\r\n <mat-chip-listbox [class]=\"stacked() ? 'mat-mdc-chip-set-stacked' : ''\" [multiple]=\"multiple()\"\r\n [(ngModel)]=\"selection\" (change)=\"updateValue()\">\r\n @for (o of options(); track o; let i = $index) {\r\n <mat-chip-option [matBadge]=\"o.bag\" [matTooltip]=\"o.disabled === true ? 'Non disponibile' : (o.bagInfo ?? '')\" [selectable]=\"isSelectable(o)\" [value]=\"o\"\r\n [disabled]=\"o.disabled\" [class.chip-padded]=\"i < padAt()\">{{o.shortName ??\r\n o.name}}</mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n }\r\n }\r\n</div>", styles: [".chips-selector{width:100%}.chips-selector .collapsed-additional-selection{opacity:.75;font-size:.75em}.chip-padded{margin-right:10px!important}.mdc-evolution-chip--disabled{pointer-events:auto!important}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i8$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i8$2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i8$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i7$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ButtonSelectorComponent, selector: "button-selector", inputs: ["disabled", "width", "border", "borderRadius", "label", "labelSelected", "options", "autoSelect"], outputs: ["changed", "selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2122
2148
|
}
|
|
2123
2149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ChipsSelectorComponent, decorators: [{
|
|
2124
2150
|
type: Component,
|
|
2125
2151
|
args: [{ selector: 'chips-selector', standalone: true, imports: [FlexLayoutModule, FormsModule, MatFormFieldModule, MatSelectModule,
|
|
2126
2152
|
MatChipsModule, MatIconModule, MatButtonModule, MatBadgeModule, MatTooltipModule,
|
|
2127
2153
|
ButtonSelectorComponent
|
|
2128
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2154
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2155
|
+
'[id]': 'id',
|
|
2156
|
+
'[class.floating]': 'shouldLabelFloat',
|
|
2157
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
2158
|
+
}, template: "<div [id]=\"containerId\" class=\"chips-selector\">\r\n @if(containerWidth() > 0) {\r\n @if(collapsed()) {\r\n @if(collapsedDisplayMode() === 'dropdown') {\r\n <mat-form-field [style.min-width]=\"collapsedWidth() > 0 ? collapsedWidth()+'px' : '100%'\" subscriptSizing=\"dynamic\">\r\n @if(label()) {\r\n <mat-label>{{label()}}</mat-label>\r\n }\r\n <mat-select [(ngModel)]=\"selection\" [multiple]=\"multiple()\" (selectionChange)=\"updateValue()\">\r\n <mat-select-trigger>\r\n @if (value && (value.length || 0) > 0) {\r\n {{value[0].shortName ?? value[0].name}}\r\n }\r\n @if (value && (value.length || 0) > 1) {\r\n <span class=\"collapsed-additional-selection\">\r\n (+{{(value.length || 0) - 1}} {{value.length === 2 ? 'altro' : 'altri'}})\r\n </span>\r\n }\r\n </mat-select-trigger>\r\n @for (o of options(); track o) {\r\n <mat-option [value]=\"o\" [disabled]=\"o.disabled\">\r\n {{o.name}}\r\n @if(o.bag) {\r\n ({{o.bag}})\r\n }\r\n </mat-option>\r\n }\r\n </mat-select>\r\n @if (value && (value.length || 0) > 0) {\r\n <button matSuffix tabindex=\"-1\" mat-icon-button aria-label=\"Pulisci\" (click)=\"clear($event)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <button-selector [label]=\"label()\" [options]=\"options()\" [width]=\"collapsedWidth()\" [(ngModel)]=\"singleSelection\"\r\n name=\"value\" (selected)=\"updateValue()\"></button-selector>\r\n\r\n }\r\n } @else {\r\n <mat-chip-listbox [class]=\"stacked() ? 'mat-mdc-chip-set-stacked' : ''\" [multiple]=\"multiple()\"\r\n [(ngModel)]=\"selection\" (change)=\"updateValue()\">\r\n @for (o of options(); track o; let i = $index) {\r\n <mat-chip-option [matBadge]=\"o.bag\" [matTooltip]=\"o.disabled === true ? 'Non disponibile' : (o.bagInfo ?? '')\" [selectable]=\"isSelectable(o)\" [value]=\"o\"\r\n [disabled]=\"o.disabled\" [class.chip-padded]=\"i < padAt()\">{{o.shortName ??\r\n o.name}}</mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n }\r\n }\r\n</div>", styles: [".chips-selector{width:100%}.chips-selector .collapsed-additional-selection{opacity:.75;font-size:.75em}.chip-padded{margin-right:10px!important}.mdc-evolution-chip--disabled{pointer-events:auto!important}\n"] }]
|
|
2129
2159
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2130
2160
|
type: Optional
|
|
2131
2161
|
}, {
|
|
2132
2162
|
type: Self
|
|
2133
|
-
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], collapsedWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedWidth", required: false }] }], collapsedDisplayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedDisplayMode", required: false }] }], collapseAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAt", required: false }] }], collapseAtContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAtContainer", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], mustSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "mustSelect", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], stacked: [{ type: i0.Input, args: [{ isSignal: true, alias: "stacked", required: false }] }], padAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "padAt", required: false }] }], required: [{
|
|
2134
|
-
type: Input
|
|
2135
|
-
}], disabled: [{
|
|
2163
|
+
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], collapsedWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedWidth", required: false }] }], collapsedDisplayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedDisplayMode", required: false }] }], collapseAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAt", required: false }] }], collapseAtContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAtContainer", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], mustSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "mustSelect", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], stacked: [{ type: i0.Input, args: [{ isSignal: true, alias: "stacked", required: false }] }], padAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "padAt", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{
|
|
2136
2164
|
type: Input
|
|
2137
|
-
}], placeholder: [{
|
|
2138
|
-
type: Input
|
|
2139
|
-
}], id: [{
|
|
2140
|
-
type: HostBinding
|
|
2141
|
-
}], shouldLabelFloat: [{
|
|
2142
|
-
type: HostBinding,
|
|
2143
|
-
args: ['class.floating']
|
|
2144
|
-
}], describedBy: [{
|
|
2145
|
-
type: HostBinding,
|
|
2146
|
-
args: ['attr.aria-describedBy']
|
|
2147
2165
|
}] } });
|
|
2148
2166
|
|
|
2149
2167
|
class FileInputComponent {
|
|
2150
|
-
// Initialize
|
|
2151
2168
|
static { this.nextId = 0; }
|
|
2152
2169
|
set value(value) {
|
|
2153
2170
|
this._value = value;
|
|
@@ -2155,18 +2172,21 @@ class FileInputComponent {
|
|
|
2155
2172
|
this.stateChanges.next();
|
|
2156
2173
|
this.changed.emit(this._value);
|
|
2157
2174
|
}
|
|
2175
|
+
/** The current FileInfo value. */
|
|
2158
2176
|
get value() {
|
|
2159
2177
|
return this._value;
|
|
2160
2178
|
}
|
|
2179
|
+
/** Size of the current file in bytes. */
|
|
2161
2180
|
get size() {
|
|
2162
2181
|
return this._value?.file?.size;
|
|
2163
2182
|
}
|
|
2183
|
+
/** True when the control is required (implements `MatFormFieldControl.required`). */
|
|
2164
2184
|
get required() {
|
|
2165
|
-
return this.
|
|
2185
|
+
return this._requiredInput();
|
|
2166
2186
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
this.
|
|
2187
|
+
/** The effective placeholder label shown in the form field (implements `MatFormFieldControl.placeholder`). */
|
|
2188
|
+
get placeholder() {
|
|
2189
|
+
return this._placeholder();
|
|
2170
2190
|
}
|
|
2171
2191
|
get disabled() {
|
|
2172
2192
|
if (this.ngControl && this.ngControl.disabled != null) {
|
|
@@ -2181,24 +2201,22 @@ class FileInputComponent {
|
|
|
2181
2201
|
this.stateChanges.next();
|
|
2182
2202
|
}
|
|
2183
2203
|
}
|
|
2184
|
-
|
|
2185
|
-
return this._placeholder();
|
|
2186
|
-
}
|
|
2187
|
-
set placeholder(value) {
|
|
2188
|
-
this._placeholder.set(value);
|
|
2189
|
-
this.stateChanges.next();
|
|
2190
|
-
}
|
|
2204
|
+
/** True when no file is selected. */
|
|
2191
2205
|
get empty() {
|
|
2192
2206
|
return !this._value || !this._value.file;
|
|
2193
2207
|
}
|
|
2208
|
+
/** True when the control has validation errors and has been touched. */
|
|
2194
2209
|
get errorState() {
|
|
2195
|
-
return this.ngControl
|
|
2210
|
+
return (this.ngControl?.errors != null) && (this.ngControl?.touched ?? false);
|
|
2196
2211
|
}
|
|
2212
|
+
/** True when the label should float above the field. */
|
|
2197
2213
|
get shouldLabelFloat() {
|
|
2198
2214
|
return this.focused || !this.empty;
|
|
2199
2215
|
}
|
|
2200
2216
|
constructor(ngControl) {
|
|
2201
2217
|
this.ngControl = ngControl;
|
|
2218
|
+
/** Reference to the hidden native file input element. */
|
|
2219
|
+
this.__file = viewChild.required('__file');
|
|
2202
2220
|
this.renderer = inject(Renderer2);
|
|
2203
2221
|
this.uiService = inject(UIService);
|
|
2204
2222
|
this.stateChanges = new Subject();
|
|
@@ -2208,16 +2226,22 @@ class FileInputComponent {
|
|
|
2208
2226
|
this.canCapture = signal(false, ...(ngDevMode ? [{ debugName: "canCapture" }] : /* istanbul ignore next */ []));
|
|
2209
2227
|
/** Size in MB of the currently selected file. */
|
|
2210
2228
|
this.fileSize = signal(0, ...(ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []));
|
|
2229
|
+
/** Internal placeholder text, derived from the input and camera availability. */
|
|
2211
2230
|
this._placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
|
|
2212
2231
|
this._value = new FileInfo();
|
|
2213
|
-
|
|
2214
|
-
this.
|
|
2232
|
+
/** The currently displayed file name. Can be bound from outside or updated by file selection. */
|
|
2233
|
+
this.fileName = model(undefined, ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
|
|
2215
2234
|
this.maxSizeMb = input(5, ...(ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []));
|
|
2216
2235
|
this.minSizeMb = input(0, ...(ngDevMode ? [{ debugName: "minSizeMb" }] : /* istanbul ignore next */ []));
|
|
2217
2236
|
this.isNew = input(false, ...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
|
|
2218
2237
|
this.canPreview = input(false, ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
|
|
2219
2238
|
this.appearance = input(this.uiService.appearance(), ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2220
2239
|
this.accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
2240
|
+
/** @internal Input signal for the required state (bound via the `[required]` attribute). */
|
|
2241
|
+
this._requiredInput = input(false, { ...(ngDevMode ? { debugName: "_requiredInput" } : /* istanbul ignore next */ {}), alias: 'required', transform: booleanAttribute });
|
|
2242
|
+
/** @internal Input signal for the placeholder text (bound via the `[placeholder]` attribute). */
|
|
2243
|
+
this._placeholderInput = input('', { ...(ngDevMode ? { debugName: "_placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
|
|
2244
|
+
this._disabled = false;
|
|
2221
2245
|
this.id = `${this.controlType}-${FileInputComponent.nextId++}`;
|
|
2222
2246
|
this.describedBy = '';
|
|
2223
2247
|
this.changed = output();
|
|
@@ -2228,12 +2252,31 @@ class FileInputComponent {
|
|
|
2228
2252
|
if (this.ngControl != null) {
|
|
2229
2253
|
this.ngControl.valueAccessor = this;
|
|
2230
2254
|
}
|
|
2255
|
+
// Notify state changes when required changes
|
|
2256
|
+
effect(() => {
|
|
2257
|
+
this._requiredInput();
|
|
2258
|
+
this.stateChanges.next();
|
|
2259
|
+
});
|
|
2260
|
+
// Sync placeholder input into internal signal; setupDevices may override it when empty
|
|
2261
|
+
effect(() => {
|
|
2262
|
+
const p = this._placeholderInput();
|
|
2263
|
+
if (p) {
|
|
2264
|
+
this._placeholder.set(p);
|
|
2265
|
+
}
|
|
2266
|
+
});
|
|
2267
|
+
// Detect camera availability and set the default placeholder after the first render
|
|
2268
|
+
afterNextRender(() => {
|
|
2269
|
+
this.setupDevices();
|
|
2270
|
+
});
|
|
2231
2271
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2272
|
+
ngOnDestroy() {
|
|
2273
|
+
this.stateChanges.complete();
|
|
2274
|
+
}
|
|
2275
|
+
ngDoCheck() {
|
|
2276
|
+
this.updateInputDirtyCheck();
|
|
2234
2277
|
}
|
|
2235
2278
|
/**
|
|
2236
|
-
* Detects camera availability and
|
|
2279
|
+
* Detects camera availability and sets the default placeholder when none is explicitly provided.
|
|
2237
2280
|
*/
|
|
2238
2281
|
async setupDevices() {
|
|
2239
2282
|
this.canCapture.set(false);
|
|
@@ -2246,18 +2289,13 @@ class FileInputComponent {
|
|
|
2246
2289
|
}
|
|
2247
2290
|
catch { }
|
|
2248
2291
|
}
|
|
2249
|
-
|
|
2292
|
+
const current = this._placeholderInput();
|
|
2293
|
+
if (!current || current === 'Seleziona file') {
|
|
2250
2294
|
this._placeholder.set(this.canCapture()
|
|
2251
2295
|
? 'Seleziona file o acquisisci con fotocamera'
|
|
2252
2296
|
: 'Seleziona file');
|
|
2253
2297
|
}
|
|
2254
2298
|
}
|
|
2255
|
-
ngOnDestroy() {
|
|
2256
|
-
this.stateChanges.complete();
|
|
2257
|
-
}
|
|
2258
|
-
ngDoCheck() {
|
|
2259
|
-
this.updateInputDirtyCheck();
|
|
2260
|
-
}
|
|
2261
2299
|
/**
|
|
2262
2300
|
* Writes a new value to the component (called by the form layer).
|
|
2263
2301
|
* @param value - The new file info to display.
|
|
@@ -2287,10 +2325,15 @@ class FileInputComponent {
|
|
|
2287
2325
|
this.describedBy = ids.join(' ');
|
|
2288
2326
|
}
|
|
2289
2327
|
/**
|
|
2290
|
-
* Updates the disabled state
|
|
2328
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
2291
2329
|
* @param isDisabled - Whether the control should be disabled.
|
|
2292
2330
|
*/
|
|
2293
2331
|
setDisabledState(isDisabled) {
|
|
2332
|
+
this._disabled = isDisabled;
|
|
2333
|
+
if (isDisabled && this.focused) {
|
|
2334
|
+
this.focused = false;
|
|
2335
|
+
this.stateChanges.next();
|
|
2336
|
+
}
|
|
2294
2337
|
if (!SystemUtils.isBrowser())
|
|
2295
2338
|
return;
|
|
2296
2339
|
const elem = document.getElementById(this.id);
|
|
@@ -2335,7 +2378,7 @@ class FileInputComponent {
|
|
|
2335
2378
|
(!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&
|
|
2336
2379
|
(!this.minSizeMb() || fileSizeMb >= this.minSizeMb());
|
|
2337
2380
|
this.writeValue(fileInfo);
|
|
2338
|
-
this.fileName
|
|
2381
|
+
this.fileName.set(f.name);
|
|
2339
2382
|
this.fileSize.set(Math.round(fileSizeMb));
|
|
2340
2383
|
}
|
|
2341
2384
|
}
|
|
@@ -2351,13 +2394,13 @@ class FileInputComponent {
|
|
|
2351
2394
|
*/
|
|
2352
2395
|
clearFile() {
|
|
2353
2396
|
if (this.hasFile()) {
|
|
2354
|
-
this.fileName
|
|
2397
|
+
this.fileName.set(undefined);
|
|
2355
2398
|
this.fileSize.set(0);
|
|
2356
2399
|
const fi = new FileInfo();
|
|
2357
2400
|
fi.file = undefined;
|
|
2358
2401
|
fi.valid = !this.required;
|
|
2359
2402
|
this.writeValue(fi);
|
|
2360
|
-
this.__file.nativeElement.value = '';
|
|
2403
|
+
this.__file().nativeElement.value = '';
|
|
2361
2404
|
}
|
|
2362
2405
|
}
|
|
2363
2406
|
/**
|
|
@@ -2375,35 +2418,22 @@ class FileInputComponent {
|
|
|
2375
2418
|
this.preview.emit();
|
|
2376
2419
|
}
|
|
2377
2420
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FileInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FileInputComponent, isStandalone: true, selector: "file-input", inputs: {
|
|
2421
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FileInputComponent, isStandalone: true, selector: "file-input", inputs: { fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, maxSizeMb: { classPropertyName: "maxSizeMb", publicName: "maxSizeMb", isSignal: true, isRequired: false, transformFunction: null }, minSizeMb: { classPropertyName: "minSizeMb", publicName: "minSizeMb", isSignal: true, isRequired: false, transformFunction: null }, isNew: { classPropertyName: "isNew", publicName: "isNew", isSignal: true, isRequired: false, transformFunction: null }, canPreview: { classPropertyName: "canPreview", publicName: "canPreview", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, _requiredInput: { classPropertyName: "_requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, _placeholderInput: { classPropertyName: "_placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { fileName: "fileNameChange", changed: "changed", download: "download", preview: "preview" }, host: { properties: { "id": "id", "class.floating": "shouldLabelFloat", "attr.aria-describedBy": "describedBy" } }, providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }], viewQueries: [{ propertyName: "__file", first: true, predicate: ["__file"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\r\n <mat-label>{{_placeholder()}}</mat-label>\r\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\r\n <input name=\"_fileName\" #_fileName=\"ngModel\" [ngModel]=\"fileName()\" (ngModelChange)=\"fileName.set($event)\"\r\n [id]=\"id\" matInput readonly [required]=\"required\"\r\n fileSize [size]=\"fileSize()\" [maxSizeMb]=\"maxSizeMb()\" [minSizeMb]=\"minSizeMb()\" [disabled]=\"disabled\" />\r\n @if (hasFile()) {\r\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (!disabled) {\r\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\r\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n @if (!isNew() && canPreview()) {\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n }\r\n @if (!isNew()) {\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\r\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\r\n <mat-icon>save_alt</mat-icon>\r\n </button>\r\n }\r\n @if (hasFile() && fileSize() > 0) {\r\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\r\n }\r\n @if (hasFile() && fileSize() == 0) {\r\n <mat-hint align=\"start\">\r\n > 1 MB</mat-hint>\r\n } @if (maxSizeMb()) {\r\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\r\n </mat-hint>\r\n }\r\n @if (_fileName.invalid && !hasFile()) {\r\n <mat-error>Obbligatorio.</mat-error>\r\n }\r\n @if (_fileName.invalid && hasFile()) {\r\n <mat-error>Dimensione non consentita.</mat-error>\r\n }\r\n</mat-form-field>", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: FileSizeValidatorDirective, selector: "[fileSize]", inputs: ["maxSizeMb", "minSizeMb", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2379
2422
|
}
|
|
2380
2423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
2381
2424
|
type: Component,
|
|
2382
2425
|
args: [{ selector: 'file-input', providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormFieldModule, MatInputModule, FormsModule, FileSizeValidatorDirective, MatButtonModule,
|
|
2383
|
-
MatIconModule, MatTooltipModule],
|
|
2426
|
+
MatIconModule, MatTooltipModule], host: {
|
|
2427
|
+
'[id]': 'id',
|
|
2428
|
+
'[class.floating]': 'shouldLabelFloat',
|
|
2429
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
2430
|
+
}, template: "<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\r\n <mat-label>{{_placeholder()}}</mat-label>\r\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\r\n <input name=\"_fileName\" #_fileName=\"ngModel\" [ngModel]=\"fileName()\" (ngModelChange)=\"fileName.set($event)\"\r\n [id]=\"id\" matInput readonly [required]=\"required\"\r\n fileSize [size]=\"fileSize()\" [maxSizeMb]=\"maxSizeMb()\" [minSizeMb]=\"minSizeMb()\" [disabled]=\"disabled\" />\r\n @if (hasFile()) {\r\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (!disabled) {\r\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\r\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n @if (!isNew() && canPreview()) {\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n }\r\n @if (!isNew()) {\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\r\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\r\n <mat-icon>save_alt</mat-icon>\r\n </button>\r\n }\r\n @if (hasFile() && fileSize() > 0) {\r\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\r\n }\r\n @if (hasFile() && fileSize() == 0) {\r\n <mat-hint align=\"start\">\r\n > 1 MB</mat-hint>\r\n } @if (maxSizeMb()) {\r\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\r\n </mat-hint>\r\n }\r\n @if (_fileName.invalid && !hasFile()) {\r\n <mat-error>Obbligatorio.</mat-error>\r\n }\r\n @if (_fileName.invalid && hasFile()) {\r\n <mat-error>Dimensione non consentita.</mat-error>\r\n }\r\n</mat-form-field>" }]
|
|
2384
2431
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2385
2432
|
type: Optional
|
|
2386
2433
|
}, {
|
|
2387
2434
|
type: Self
|
|
2388
|
-
}] }], propDecorators: { __file: [{
|
|
2389
|
-
type: ViewChild,
|
|
2390
|
-
args: ['__file']
|
|
2391
|
-
}], required: [{
|
|
2435
|
+
}] }], propDecorators: { __file: [{ type: i0.ViewChild, args: ['__file', { isSignal: true }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }, { type: i0.Output, args: ["fileNameChange"] }], maxSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSizeMb", required: false }] }], minSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSizeMb", required: false }] }], isNew: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNew", required: false }] }], canPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "canPreview", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], _requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], _placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{
|
|
2392
2436
|
type: Input
|
|
2393
|
-
}], disabled: [{
|
|
2394
|
-
type: Input
|
|
2395
|
-
}], placeholder: [{
|
|
2396
|
-
type: Input
|
|
2397
|
-
}], fileName: [{
|
|
2398
|
-
type: Input
|
|
2399
|
-
}], maxSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSizeMb", required: false }] }], minSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSizeMb", required: false }] }], isNew: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNew", required: false }] }], canPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "canPreview", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], id: [{
|
|
2400
|
-
type: HostBinding
|
|
2401
|
-
}], shouldLabelFloat: [{
|
|
2402
|
-
type: HostBinding,
|
|
2403
|
-
args: ['class.floating']
|
|
2404
|
-
}], describedBy: [{
|
|
2405
|
-
type: HostBinding,
|
|
2406
|
-
args: ['attr.aria-describedBy']
|
|
2407
2437
|
}], changed: [{ type: i0.Output, args: ["changed"] }], download: [{ type: i0.Output, args: ["download"] }], preview: [{ type: i0.Output, args: ["preview"] }] } });
|
|
2408
2438
|
|
|
2409
2439
|
class FilePreviewComponent {
|
|
@@ -2506,19 +2536,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2506
2536
|
|
|
2507
2537
|
class FilterBarComponent {
|
|
2508
2538
|
constructor() {
|
|
2539
|
+
/** Emitted whenever any filter value changes. */
|
|
2509
2540
|
this.changed = output();
|
|
2541
|
+
/** The list of filter groups to display. */
|
|
2510
2542
|
this.filters = input(...(ngDevMode ? [undefined, { debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
2511
|
-
this.canFilterByFlt1 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt1" }] : /* istanbul ignore next */ []));
|
|
2512
|
-
this.canFilterByFlt2 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt2" }] : /* istanbul ignore next */ []));
|
|
2513
|
-
this.canFilterByFlt3 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt3" }] : /* istanbul ignore next */ []));
|
|
2514
|
-
this.canFilterByFlt4 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt4" }] : /* istanbul ignore next */ []));
|
|
2515
|
-
this.canFilterByFlt5 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt5" }] : /* istanbul ignore next */ []));
|
|
2516
2543
|
this.canFilterByText = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText" }] : /* istanbul ignore next */ []));
|
|
2517
2544
|
this.canFilterByText2 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText2" }] : /* istanbul ignore next */ []));
|
|
2518
2545
|
this.canFilterByText3 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText3" }] : /* istanbul ignore next */ []));
|
|
2519
|
-
|
|
2520
|
-
this.
|
|
2521
|
-
this.
|
|
2546
|
+
/** Initial text values for the search inputs — synced into the model signals on change. */
|
|
2547
|
+
this.initialText = input(undefined, ...(ngDevMode ? [{ debugName: "initialText" }] : /* istanbul ignore next */ []));
|
|
2548
|
+
this.initialText2 = input(undefined, ...(ngDevMode ? [{ debugName: "initialText2" }] : /* istanbul ignore next */ []));
|
|
2549
|
+
this.initialText3 = input(undefined, ...(ngDevMode ? [{ debugName: "initialText3" }] : /* istanbul ignore next */ []));
|
|
2522
2550
|
this.textName = input("testo", ...(ngDevMode ? [{ debugName: "textName" }] : /* istanbul ignore next */ []));
|
|
2523
2551
|
this.text2Name = input("...", ...(ngDevMode ? [{ debugName: "text2Name" }] : /* istanbul ignore next */ []));
|
|
2524
2552
|
this.text3Name = input("...", ...(ngDevMode ? [{ debugName: "text3Name" }] : /* istanbul ignore next */ []));
|
|
@@ -2527,45 +2555,58 @@ class FilterBarComponent {
|
|
|
2527
2555
|
this.text3Length = input(...(ngDevMode ? [undefined, { debugName: "text3Length" }] : /* istanbul ignore next */ []));
|
|
2528
2556
|
this.showTextSearchButton = input(false, ...(ngDevMode ? [{ debugName: "showTextSearchButton" }] : /* istanbul ignore next */ []));
|
|
2529
2557
|
this.appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2558
|
+
/** Two-way bindable text filter values. */
|
|
2559
|
+
this.text = model(undefined, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
2560
|
+
this.text2 = model(undefined, ...(ngDevMode ? [{ debugName: "text2" }] : /* istanbul ignore next */ []));
|
|
2561
|
+
this.text3 = model(undefined, ...(ngDevMode ? [{ debugName: "text3" }] : /* istanbul ignore next */ []));
|
|
2562
|
+
/** Filter group for slot 1, derived reactively from the `filters` input. */
|
|
2563
|
+
this.flt1 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_1), ...(ngDevMode ? [{ debugName: "flt1" }] : /* istanbul ignore next */ []));
|
|
2564
|
+
/** Filter group for slot 2, derived reactively from the `filters` input. */
|
|
2565
|
+
this.flt2 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_2), ...(ngDevMode ? [{ debugName: "flt2" }] : /* istanbul ignore next */ []));
|
|
2566
|
+
/** Filter group for slot 3, derived reactively from the `filters` input. */
|
|
2567
|
+
this.flt3 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_3), ...(ngDevMode ? [{ debugName: "flt3" }] : /* istanbul ignore next */ []));
|
|
2568
|
+
/** Filter group for slot 4, derived reactively from the `filters` input. */
|
|
2569
|
+
this.flt4 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_4), ...(ngDevMode ? [{ debugName: "flt4" }] : /* istanbul ignore next */ []));
|
|
2570
|
+
/** Filter group for slot 5, derived reactively from the `filters` input. */
|
|
2571
|
+
this.flt5 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_5), ...(ngDevMode ? [{ debugName: "flt5" }] : /* istanbul ignore next */ []));
|
|
2572
|
+
/** True when filter slot 1 has an action or item list. */
|
|
2573
|
+
this.canFilterByFlt1 = computed(() => {
|
|
2574
|
+
const g = this.flt1();
|
|
2575
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2576
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt1" }] : /* istanbul ignore next */ []));
|
|
2577
|
+
/** True when filter slot 2 has an action or item list. */
|
|
2578
|
+
this.canFilterByFlt2 = computed(() => {
|
|
2579
|
+
const g = this.flt2();
|
|
2580
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2581
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt2" }] : /* istanbul ignore next */ []));
|
|
2582
|
+
/** True when filter slot 3 has an action or item list. */
|
|
2583
|
+
this.canFilterByFlt3 = computed(() => {
|
|
2584
|
+
const g = this.flt3();
|
|
2585
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2586
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt3" }] : /* istanbul ignore next */ []));
|
|
2587
|
+
/** True when filter slot 4 has an action or item list. */
|
|
2588
|
+
this.canFilterByFlt4 = computed(() => {
|
|
2589
|
+
const g = this.flt4();
|
|
2590
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2591
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt4" }] : /* istanbul ignore next */ []));
|
|
2592
|
+
/** True when filter slot 5 has an action or item list. */
|
|
2593
|
+
this.canFilterByFlt5 = computed(() => {
|
|
2594
|
+
const g = this.flt5();
|
|
2595
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2596
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt5" }] : /* istanbul ignore next */ []));
|
|
2530
2597
|
this.currentFilter = new CurrentFilter();
|
|
2598
|
+
// Sync the initialText inputs into the model signals whenever they change
|
|
2531
2599
|
effect(() => {
|
|
2532
|
-
this.text
|
|
2533
|
-
this.text2
|
|
2534
|
-
this.text3
|
|
2535
|
-
});
|
|
2536
|
-
effect(() => {
|
|
2537
|
-
this.initializeFilters();
|
|
2538
|
-
});
|
|
2539
|
-
}
|
|
2540
|
-
/** Reads the `filters` input and populates the filter group fields and capability signals. */
|
|
2541
|
-
initializeFilters() {
|
|
2542
|
-
if (!this.filters())
|
|
2543
|
-
return;
|
|
2544
|
-
this.filters()?.forEach((n) => {
|
|
2545
|
-
switch (n.group) {
|
|
2546
|
-
case Filters.FLT_1:
|
|
2547
|
-
this.flt1 = n;
|
|
2548
|
-
this.canFilterByFlt1.set(n.action || (n.items && n.items.length > 0));
|
|
2549
|
-
break;
|
|
2550
|
-
case Filters.FLT_2:
|
|
2551
|
-
this.flt2 = n;
|
|
2552
|
-
this.canFilterByFlt2.set(n.action || (n.items && n.items.length > 0));
|
|
2553
|
-
break;
|
|
2554
|
-
case Filters.FLT_3:
|
|
2555
|
-
this.flt3 = n;
|
|
2556
|
-
this.canFilterByFlt3.set(n.action || (n.items && n.items.length > 0));
|
|
2557
|
-
break;
|
|
2558
|
-
case Filters.FLT_4:
|
|
2559
|
-
this.flt4 = n;
|
|
2560
|
-
this.canFilterByFlt4.set(n.action || (n.items && n.items.length > 0));
|
|
2561
|
-
break;
|
|
2562
|
-
case Filters.FLT_5:
|
|
2563
|
-
this.flt5 = n;
|
|
2564
|
-
this.canFilterByFlt5.set(n.action || (n.items && n.items.length > 0));
|
|
2565
|
-
break;
|
|
2566
|
-
}
|
|
2600
|
+
this.text.set(this.initialText());
|
|
2601
|
+
this.text2.set(this.initialText2());
|
|
2602
|
+
this.text3.set(this.initialText3());
|
|
2567
2603
|
});
|
|
2568
2604
|
}
|
|
2605
|
+
/**
|
|
2606
|
+
* No-op kept for API compatibility.
|
|
2607
|
+
* Filter groups are now computed reactively from the `filters()` input.
|
|
2608
|
+
*/
|
|
2609
|
+
initializeFilters() { }
|
|
2569
2610
|
/**
|
|
2570
2611
|
* Applies the selected filter item to the current filter state and emits the change.
|
|
2571
2612
|
* @param filter - The filter item to apply.
|
|
@@ -2631,9 +2672,9 @@ class FilterBarComponent {
|
|
|
2631
2672
|
}
|
|
2632
2673
|
/** Commits the current text inputs to the filter state and emits the change. */
|
|
2633
2674
|
applyTextFilter() {
|
|
2634
|
-
this.currentFilter.text = this.text;
|
|
2635
|
-
this.currentFilter.text2 = this.text2;
|
|
2636
|
-
this.currentFilter.text3 = this.text3;
|
|
2675
|
+
this.currentFilter.text = this.text();
|
|
2676
|
+
this.currentFilter.text2 = this.text2();
|
|
2677
|
+
this.currentFilter.text3 = this.text3();
|
|
2637
2678
|
this.changed.emit({
|
|
2638
2679
|
filter: this.currentFilter,
|
|
2639
2680
|
group: Filters.FLT_TEXT
|
|
@@ -2701,13 +2742,14 @@ class FilterBarComponent {
|
|
|
2701
2742
|
this.currentFilter.text = undefined;
|
|
2702
2743
|
this.currentFilter.text2 = undefined;
|
|
2703
2744
|
this.currentFilter.text3 = undefined;
|
|
2704
|
-
this.text
|
|
2705
|
-
this.text2
|
|
2706
|
-
this.text3
|
|
2745
|
+
this.text.set(undefined);
|
|
2746
|
+
this.text2.set(undefined);
|
|
2747
|
+
this.text3.set(undefined);
|
|
2707
2748
|
this.changed.emit({ filter: this.currentFilter, group: -1 });
|
|
2708
2749
|
}
|
|
2709
2750
|
/**
|
|
2710
2751
|
* Returns `true` when more than one filter type is active, showing the "clear all" button.
|
|
2752
|
+
* @returns True when the clear-all button should be visible.
|
|
2711
2753
|
*/
|
|
2712
2754
|
canClearAllFilters() {
|
|
2713
2755
|
let count = 0;
|
|
@@ -2732,89 +2774,80 @@ class FilterBarComponent {
|
|
|
2732
2774
|
/**
|
|
2733
2775
|
* Returns the filter group matching the given id, or `undefined` if not found.
|
|
2734
2776
|
* @param id - The group id to look up.
|
|
2777
|
+
* @returns The matching `FilterGroup`, or `undefined`.
|
|
2735
2778
|
*/
|
|
2736
2779
|
getFilterGroup(id) {
|
|
2737
|
-
return this.filters()?.find(
|
|
2780
|
+
return this.filters()?.find(n => n.group === id);
|
|
2738
2781
|
}
|
|
2739
2782
|
/** Synchronises the filter bar display with the values currently stored in `currentFilter`. */
|
|
2740
2783
|
syncFilter() {
|
|
2741
2784
|
let g = this.getFilterGroup(Filters.FLT_1);
|
|
2742
|
-
if (g) {
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
this.currentFilter.flt1 = undefined;
|
|
2751
|
-
}
|
|
2785
|
+
if (g?.items) {
|
|
2786
|
+
this.currentFilter.flt1Name = undefined;
|
|
2787
|
+
if (this.currentFilter.flt1) {
|
|
2788
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt1);
|
|
2789
|
+
if (gi)
|
|
2790
|
+
this.currentFilter.flt1Name = gi.titleSelected;
|
|
2791
|
+
else
|
|
2792
|
+
this.currentFilter.flt1 = undefined;
|
|
2752
2793
|
}
|
|
2753
2794
|
}
|
|
2754
2795
|
g = this.getFilterGroup(Filters.FLT_2);
|
|
2755
|
-
if (g) {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
this.currentFilter.flt2 = undefined;
|
|
2764
|
-
}
|
|
2796
|
+
if (g?.items) {
|
|
2797
|
+
this.currentFilter.flt2Name = undefined;
|
|
2798
|
+
if (this.currentFilter.flt2) {
|
|
2799
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt2);
|
|
2800
|
+
if (gi)
|
|
2801
|
+
this.currentFilter.flt2Name = gi.titleSelected;
|
|
2802
|
+
else
|
|
2803
|
+
this.currentFilter.flt2 = undefined;
|
|
2765
2804
|
}
|
|
2766
2805
|
}
|
|
2767
2806
|
g = this.getFilterGroup(Filters.FLT_3);
|
|
2768
|
-
if (g) {
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
this.currentFilter.flt3 = undefined;
|
|
2777
|
-
}
|
|
2807
|
+
if (g?.items) {
|
|
2808
|
+
this.currentFilter.flt3Name = undefined;
|
|
2809
|
+
if (this.currentFilter.flt3) {
|
|
2810
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt3);
|
|
2811
|
+
if (gi)
|
|
2812
|
+
this.currentFilter.flt3Name = gi.titleSelected;
|
|
2813
|
+
else
|
|
2814
|
+
this.currentFilter.flt3 = undefined;
|
|
2778
2815
|
}
|
|
2779
2816
|
}
|
|
2780
2817
|
g = this.getFilterGroup(Filters.FLT_4);
|
|
2781
|
-
if (g) {
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
this.currentFilter.flt4 = undefined;
|
|
2790
|
-
}
|
|
2818
|
+
if (g?.items) {
|
|
2819
|
+
this.currentFilter.flt4Name = undefined;
|
|
2820
|
+
if (this.currentFilter.flt4) {
|
|
2821
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt4);
|
|
2822
|
+
if (gi)
|
|
2823
|
+
this.currentFilter.flt4Name = gi.titleSelected;
|
|
2824
|
+
else
|
|
2825
|
+
this.currentFilter.flt4 = undefined;
|
|
2791
2826
|
}
|
|
2792
2827
|
}
|
|
2793
2828
|
g = this.getFilterGroup(Filters.FLT_5);
|
|
2794
|
-
if (g) {
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
this.currentFilter.flt5 = undefined;
|
|
2803
|
-
}
|
|
2829
|
+
if (g?.items) {
|
|
2830
|
+
this.currentFilter.flt5Name = undefined;
|
|
2831
|
+
if (this.currentFilter.flt5) {
|
|
2832
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt5);
|
|
2833
|
+
if (gi)
|
|
2834
|
+
this.currentFilter.flt5Name = gi.titleSelected;
|
|
2835
|
+
else
|
|
2836
|
+
this.currentFilter.flt5 = undefined;
|
|
2804
2837
|
}
|
|
2805
2838
|
}
|
|
2806
|
-
this.text
|
|
2807
|
-
this.text2
|
|
2808
|
-
this.text3
|
|
2839
|
+
this.text.set(this.currentFilter.text);
|
|
2840
|
+
this.text2.set(this.currentFilter.text2);
|
|
2841
|
+
this.text3.set(this.currentFilter.text3);
|
|
2809
2842
|
}
|
|
2810
2843
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2811
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FilterBarComponent, isStandalone: true, selector: "filter-bar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText: { classPropertyName: "canFilterByText", publicName: "canFilterByText", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText2: { classPropertyName: "canFilterByText2", publicName: "canFilterByText2", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText3: { classPropertyName: "canFilterByText3", publicName: "canFilterByText3", isSignal: true, isRequired: false, transformFunction: null }, initialText: { classPropertyName: "initialText", publicName: "initialText", isSignal: true, isRequired: false, transformFunction: null }, initialText2: { classPropertyName: "initialText2", publicName: "initialText2", isSignal: true, isRequired: false, transformFunction: null }, initialText3: { classPropertyName: "initialText3", publicName: "initialText3", isSignal: true, isRequired: false, transformFunction: null }, textName: { classPropertyName: "textName", publicName: "textName", isSignal: true, isRequired: false, transformFunction: null }, text2Name: { classPropertyName: "text2Name", publicName: "text2Name", isSignal: true, isRequired: false, transformFunction: null }, text3Name: { classPropertyName: "text3Name", publicName: "text3Name", isSignal: true, isRequired: false, transformFunction: null }, textLength: { classPropertyName: "textLength", publicName: "textLength", isSignal: true, isRequired: false, transformFunction: null }, text2Length: { classPropertyName: "text2Length", publicName: "text2Length", isSignal: true, isRequired: false, transformFunction: null }, text3Length: { classPropertyName: "text3Length", publicName: "text3Length", isSignal: true, isRequired: false, transformFunction: null }, showTextSearchButton: { classPropertyName: "showTextSearchButton", publicName: "showTextSearchButton", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"filterbox\"\r\n [class.filterbox-filtered]=\"currentFilter.filtered()\">\r\n <div fxFlex=\"*\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\r\n @if (canFilterByText() || canFilterByText2() || canFilterByText3()) {\r\n <div fxFlex.lt-sm=\"100\" fxFlexAlign=\"center\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill style=\"padding:4px;\">\r\n @if (canFilterByText()) {\r\n <mat-form-field [style.width]=\"textLength() ?? '100%'\" [appearance]=\"appearance()\" subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{textName()}}...</mat-label>\r\n <input matInput name=\"_text\" [(ngModel)]=\"text\" maxlength=\"100\" #_text=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (showTextSearchButton()) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Trova\" (click)=\"applyTextFilter();\"\r\n matTooltip=\"Trova\">\r\n <mat-icon>search</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText2()) {\r\n <mat-form-field \r\n [style.width]=\"text2Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text2Name()}}...</mat-label>\r\n <input matInput name=\"_text2\" [(ngModel)]=\"text2\" maxlength=\"100\" #_text2=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text2) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text2 = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText3()) {\r\n <mat-form-field [style.width]=\"text3Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text3Name()}}...</mat-label>\r\n <input matInput name=\"_text3\" [(ngModel)]=\"text3\" maxlength=\"100\" #_text3=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text3) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text3 = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n </div>\r\n }\r\n <div fxFlex.lt-sm=\"100\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n @if (canFilterByFlt1() && flt1 && flt1.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1.tooltip || 'Filtra per ' + flt1.title\"\r\n [attr.aria-label]=\"flt1.tooltip || 'Filtra per ' + flt1.title\" \r\n (click)=\"applyFilterAction(1, false)\">\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt1) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(1, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt1() && flt1 && flt1.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1.tooltip || 'Filtra per ' + flt1.title\"\r\n [attr.aria-label]=\"flt1.tooltip || 'Filtra per ' + flt1.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt1\"\r\n >\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt1=\"matMenu\">\r\n @for (f of flt1.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt1.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt2() && flt2 && flt2.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2.tooltip || 'Filtra per ' + flt2.title\"\r\n [attr.aria-label]=\"flt2.tooltip || 'Filtra per ' + flt2.title\" \r\n (click)=\"applyFilterAction(2, false)\">\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt2) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(2, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt2() && flt2 && flt2.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2.tooltip || 'Filtra per ' + flt2.title\"\r\n [attr.aria-label]=\"flt2.tooltip || 'Filtra per ' + flt2.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt2\"\r\n >\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt2=\"matMenu\">\r\n @for (f of flt2.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt2.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt3() && flt3 && flt3.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3.tooltip || 'Filtra per ' + flt3.title\"\r\n [attr.aria-label]=\"flt3.tooltip || 'Filtra per ' + flt3.title\" \r\n (click)=\"applyFilterAction(3, false)\">\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt3) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(3, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt3() && flt3 && flt3.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3.tooltip || 'Filtra per ' + flt3.title\"\r\n [attr.aria-label]=\"flt3.tooltip || 'Filtra per ' + flt3.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt3\"\r\n >\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt3=\"matMenu\">\r\n @for (f of flt3.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt3.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt4() && flt4 && flt4.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt4.tooltip || 'Filtra per ' + flt4.title\"\r\n [attr.aria-label]=\"flt4.tooltip || 'Filtra per ' + flt4.title\" \r\n (click)=\"applyFilterAction(4, false)\">\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt4) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(4, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt4() && flt4 && flt4.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt4.tooltip || 'Filtra per ' + flt4.title\"\r\n [attr.aria-label]=\"flt4.tooltip || 'Filtra per ' + flt4.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt4\"\r\n >\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt4=\"matMenu\">\r\n @for (f of flt4.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt4.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt5() && flt5 && flt5.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt5.tooltip || 'Filtra per ' + flt5.title\"\r\n [attr.aria-label]=\"flt5.tooltip || 'Filtra per ' + flt5.title\" \r\n (click)=\"applyFilterAction(5, false)\">\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt5) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(5, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt5() && flt5 && flt5.items) {\r\n <button fxFlexAlign=\"center\"class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt5.tooltip || 'Filtra per ' + flt5.title\"\r\n [attr.aria-label]=\"flt5.tooltip || 'Filtra per ' + flt5.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt5\"\r\n >\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt5=\"matMenu\">\r\n @for (f of flt5.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt5.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n @if (currentFilter.filtered() && canClearAllFilters()) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera tutti i filtri\" aria-label=\"Azzera tutti i filtri\"\r\n (click)=\"clearAllFilters()\">\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.filterbox{border-radius:auto;background-color:transparent;padding:4px}.filterbox-button{max-width:200px;white-space:normal;text-align:center;display:-webkit-box;display:inline-block;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis}.filterbox-selected{font-weight:800!important}.filterbox-filtered{border-radius:12px;background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}@media(prefers-color-scheme:dark){.filterbox-filtered{background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i11.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2844
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: FilterBarComponent, isStandalone: true, selector: "filter-bar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText: { classPropertyName: "canFilterByText", publicName: "canFilterByText", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText2: { classPropertyName: "canFilterByText2", publicName: "canFilterByText2", isSignal: true, isRequired: false, transformFunction: null }, canFilterByText3: { classPropertyName: "canFilterByText3", publicName: "canFilterByText3", isSignal: true, isRequired: false, transformFunction: null }, initialText: { classPropertyName: "initialText", publicName: "initialText", isSignal: true, isRequired: false, transformFunction: null }, initialText2: { classPropertyName: "initialText2", publicName: "initialText2", isSignal: true, isRequired: false, transformFunction: null }, initialText3: { classPropertyName: "initialText3", publicName: "initialText3", isSignal: true, isRequired: false, transformFunction: null }, textName: { classPropertyName: "textName", publicName: "textName", isSignal: true, isRequired: false, transformFunction: null }, text2Name: { classPropertyName: "text2Name", publicName: "text2Name", isSignal: true, isRequired: false, transformFunction: null }, text3Name: { classPropertyName: "text3Name", publicName: "text3Name", isSignal: true, isRequired: false, transformFunction: null }, textLength: { classPropertyName: "textLength", publicName: "textLength", isSignal: true, isRequired: false, transformFunction: null }, text2Length: { classPropertyName: "text2Length", publicName: "text2Length", isSignal: true, isRequired: false, transformFunction: null }, text3Length: { classPropertyName: "text3Length", publicName: "text3Length", isSignal: true, isRequired: false, transformFunction: null }, showTextSearchButton: { classPropertyName: "showTextSearchButton", publicName: "showTextSearchButton", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, text2: { classPropertyName: "text2", publicName: "text2", isSignal: true, isRequired: false, transformFunction: null }, text3: { classPropertyName: "text3", publicName: "text3", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", text: "textChange", text2: "text2Change", text3: "text3Change" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"filterbox\"\r\n [class.filterbox-filtered]=\"currentFilter.filtered()\">\r\n <div fxFlex=\"*\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\r\n @if (canFilterByText() || canFilterByText2() || canFilterByText3()) {\r\n <div fxFlex.lt-sm=\"100\" fxFlexAlign=\"center\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill style=\"padding:4px;\">\r\n @if (canFilterByText()) {\r\n <mat-form-field [style.width]=\"textLength() ?? '100%'\" [appearance]=\"appearance()\" subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{textName()}}...</mat-label>\r\n <input matInput name=\"_text\" [ngModel]=\"text()\" (ngModelChange)=\"text.set($event)\" maxlength=\"100\" #_text=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (showTextSearchButton()) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Trova\" (click)=\"applyTextFilter();\"\r\n matTooltip=\"Trova\">\r\n <mat-icon>search</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText2()) {\r\n <mat-form-field \r\n [style.width]=\"text2Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text2Name()}}...</mat-label>\r\n <input matInput name=\"_text2\" [ngModel]=\"text2()\" (ngModelChange)=\"text2.set($event)\" maxlength=\"100\" #_text2=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text2()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text2.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText3()) {\r\n <mat-form-field [style.width]=\"text3Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text3Name()}}...</mat-label>\r\n <input matInput name=\"_text3\" [ngModel]=\"text3()\" (ngModelChange)=\"text3.set($event)\" maxlength=\"100\" #_text3=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text3()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text3.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n </div>\r\n }\r\n <div fxFlex.lt-sm=\"100\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n @if (canFilterByFlt1() && flt1()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\"\r\n [attr.aria-label]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\" \r\n (click)=\"applyFilterAction(1, false)\">\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt1) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(1, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt1() && flt1()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\"\r\n [attr.aria-label]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt1\"\r\n >\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt1=\"matMenu\">\r\n @for (f of flt1()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt1()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt2() && flt2()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\"\r\n [attr.aria-label]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\" \r\n (click)=\"applyFilterAction(2, false)\">\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt2) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(2, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt2() && flt2()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\"\r\n [attr.aria-label]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt2\"\r\n >\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt2=\"matMenu\">\r\n @for (f of flt2()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt2()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt3() && flt3()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\"\r\n [attr.aria-label]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\" \r\n (click)=\"applyFilterAction(3, false)\">\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt3) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(3, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt3() && flt3()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\"\r\n [attr.aria-label]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt3\"\r\n >\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt3=\"matMenu\">\r\n @for (f of flt3()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt3()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt4() && flt4()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\"\r\n [attr.aria-label]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\" \r\n (click)=\"applyFilterAction(4, false)\">\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt4) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(4, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt4() && flt4()?.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\"\r\n [attr.aria-label]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt4\"\r\n >\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt4=\"matMenu\">\r\n @for (f of flt4()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt4()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt5() && flt5()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\"\r\n [attr.aria-label]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\" \r\n (click)=\"applyFilterAction(5, false)\">\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt5) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(5, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt5() && flt5()?.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\"\r\n [attr.aria-label]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt5\"\r\n >\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt5=\"matMenu\">\r\n @for (f of flt5()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt5()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n @if (currentFilter.filtered() && canClearAllFilters()) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera tutti i filtri\" aria-label=\"Azzera tutti i filtri\"\r\n (click)=\"clearAllFilters()\">\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.filterbox{border-radius:auto;background-color:transparent;padding:4px}.filterbox-button{max-width:200px;white-space:normal;text-align:center;display:-webkit-box;display:inline-block;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis}.filterbox-selected{font-weight:800!important}.filterbox-filtered{border-radius:12px;background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}@media(prefers-color-scheme:dark){.filterbox-filtered{background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i11.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2812
2845
|
}
|
|
2813
2846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterBarComponent, decorators: [{
|
|
2814
2847
|
type: Component,
|
|
2815
2848
|
args: [{ selector: "filter-bar", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexLayoutModule, MatFormFieldModule, MatInputModule, FormsModule,
|
|
2816
|
-
MatTooltipModule, MatButtonModule, MatIconModule, MatMenuModule, MatDividerModule, SafeHtmlPipe], template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"filterbox\"\r\n [class.filterbox-filtered]=\"currentFilter.filtered()\">\r\n <div fxFlex=\"*\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\r\n @if (canFilterByText() || canFilterByText2() || canFilterByText3()) {\r\n <div fxFlex.lt-sm=\"100\" fxFlexAlign=\"center\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill style=\"padding:4px;\">\r\n @if (canFilterByText()) {\r\n <mat-form-field [style.width]=\"textLength() ?? '100%'\" [appearance]=\"appearance()\" subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{textName()}}...</mat-label>\r\n <input matInput name=\"_text\" [(ngModel)]=\"text\" maxlength=\"100\" #_text=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (showTextSearchButton()) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Trova\" (click)=\"applyTextFilter();\"\r\n matTooltip=\"Trova\">\r\n <mat-icon>search</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText2()) {\r\n <mat-form-field \r\n [style.width]=\"text2Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text2Name()}}...</mat-label>\r\n <input matInput name=\"_text2\" [(ngModel)]=\"text2\" maxlength=\"100\" #_text2=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text2) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text2 = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText3()) {\r\n <mat-form-field [style.width]=\"text3Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text3Name()}}...</mat-label>\r\n <input matInput name=\"_text3\" [(ngModel)]=\"text3\" maxlength=\"100\" #_text3=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text3) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text3 = undefined; applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n </div>\r\n }\r\n <div fxFlex.lt-sm=\"100\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n @if (canFilterByFlt1() && flt1 && flt1.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1.tooltip || 'Filtra per ' + flt1.title\"\r\n [attr.aria-label]=\"flt1.tooltip || 'Filtra per ' + flt1.title\" \r\n (click)=\"applyFilterAction(1, false)\">\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt1) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(1, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt1() && flt1 && flt1.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1.tooltip || 'Filtra per ' + flt1.title\"\r\n [attr.aria-label]=\"flt1.tooltip || 'Filtra per ' + flt1.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt1\"\r\n >\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt1=\"matMenu\">\r\n @for (f of flt1.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt1.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt2() && flt2 && flt2.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2.tooltip || 'Filtra per ' + flt2.title\"\r\n [attr.aria-label]=\"flt2.tooltip || 'Filtra per ' + flt2.title\" \r\n (click)=\"applyFilterAction(2, false)\">\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt2) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(2, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt2() && flt2 && flt2.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2.tooltip || 'Filtra per ' + flt2.title\"\r\n [attr.aria-label]=\"flt2.tooltip || 'Filtra per ' + flt2.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt2\"\r\n >\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt2=\"matMenu\">\r\n @for (f of flt2.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt2.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt3() && flt3 && flt3.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3.tooltip || 'Filtra per ' + flt3.title\"\r\n [attr.aria-label]=\"flt3.tooltip || 'Filtra per ' + flt3.title\" \r\n (click)=\"applyFilterAction(3, false)\">\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt3) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(3, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt3() && flt3 && flt3.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3.tooltip || 'Filtra per ' + flt3.title\"\r\n [attr.aria-label]=\"flt3.tooltip || 'Filtra per ' + flt3.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt3\"\r\n >\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt3=\"matMenu\">\r\n @for (f of flt3.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt3.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt4() && flt4 && flt4.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt4.tooltip || 'Filtra per ' + flt4.title\"\r\n [attr.aria-label]=\"flt4.tooltip || 'Filtra per ' + flt4.title\" \r\n (click)=\"applyFilterAction(4, false)\">\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt4) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(4, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt4() && flt4 && flt4.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt4.tooltip || 'Filtra per ' + flt4.title\"\r\n [attr.aria-label]=\"flt4.tooltip || 'Filtra per ' + flt4.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt4\"\r\n >\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt4=\"matMenu\">\r\n @for (f of flt4.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt4.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt5() && flt5 && flt5.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt5.tooltip || 'Filtra per ' + flt5.title\"\r\n [attr.aria-label]=\"flt5.tooltip || 'Filtra per ' + flt5.title\" \r\n (click)=\"applyFilterAction(5, false)\">\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt5) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(5, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt5() && flt5 && flt5.items) {\r\n <button fxFlexAlign=\"center\"class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt5.tooltip || 'Filtra per ' + flt5.title\"\r\n [attr.aria-label]=\"flt5.tooltip || 'Filtra per ' + flt5.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt5\"\r\n >\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt5=\"matMenu\">\r\n @for (f of flt5.items; track $index) {\r\n\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt5.items[0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n @if (currentFilter.filtered() && canClearAllFilters()) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera tutti i filtri\" aria-label=\"Azzera tutti i filtri\"\r\n (click)=\"clearAllFilters()\">\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.filterbox{border-radius:auto;background-color:transparent;padding:4px}.filterbox-button{max-width:200px;white-space:normal;text-align:center;display:-webkit-box;display:inline-block;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis}.filterbox-selected{font-weight:800!important}.filterbox-filtered{border-radius:12px;background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}@media(prefers-color-scheme:dark){.filterbox-filtered{background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}}\n"] }]
|
|
2817
|
-
}], ctorParameters: () => [], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], canFilterByText: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText", required: false }] }], canFilterByText2: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText2", required: false }] }], canFilterByText3: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText3", required: false }] }], initialText: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText", required: false }] }], initialText2: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText2", required: false }] }], initialText3: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText3", required: false }] }], textName: [{ type: i0.Input, args: [{ isSignal: true, alias: "textName", required: false }] }], text2Name: [{ type: i0.Input, args: [{ isSignal: true, alias: "text2Name", required: false }] }], text3Name: [{ type: i0.Input, args: [{ isSignal: true, alias: "text3Name", required: false }] }], textLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "textLength", required: false }] }], text2Length: [{ type: i0.Input, args: [{ isSignal: true, alias: "text2Length", required: false }] }], text3Length: [{ type: i0.Input, args: [{ isSignal: true, alias: "text3Length", required: false }] }], showTextSearchButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTextSearchButton", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
|
|
2849
|
+
MatTooltipModule, MatButtonModule, MatIconModule, MatMenuModule, MatDividerModule, SafeHtmlPipe], template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"filterbox\"\r\n [class.filterbox-filtered]=\"currentFilter.filtered()\">\r\n <div fxFlex=\"*\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\r\n @if (canFilterByText() || canFilterByText2() || canFilterByText3()) {\r\n <div fxFlex.lt-sm=\"100\" fxFlexAlign=\"center\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill style=\"padding:4px;\">\r\n @if (canFilterByText()) {\r\n <mat-form-field [style.width]=\"textLength() ?? '100%'\" [appearance]=\"appearance()\" subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{textName()}}...</mat-label>\r\n <input matInput name=\"_text\" [ngModel]=\"text()\" (ngModelChange)=\"text.set($event)\" maxlength=\"100\" #_text=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n @if (showTextSearchButton()) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Trova\" (click)=\"applyTextFilter();\"\r\n matTooltip=\"Trova\">\r\n <mat-icon>search</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText2()) {\r\n <mat-form-field \r\n [style.width]=\"text2Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text2Name()}}...</mat-label>\r\n <input matInput name=\"_text2\" [ngModel]=\"text2()\" (ngModelChange)=\"text2.set($event)\" maxlength=\"100\" #_text2=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text2()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text2.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n @if (canFilterByText3()) {\r\n <mat-form-field [style.width]=\"text3Length() ?? '100%'\" [appearance]=\"appearance()\"\r\n subscriptSizing=\"dynamic\">\r\n <mat-label>Cerca per {{text3Name()}}...</mat-label>\r\n <input matInput name=\"_text3\" [ngModel]=\"text3()\" (ngModelChange)=\"text3.set($event)\" maxlength=\"100\" #_text3=\"ngModel\"\r\n (keyup.Enter)=\"applyTextFilter()\" matTooltip=\"Premi INVIO per avviare la ricerca\">\r\n @if (text3()) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"text3.set(undefined); applyTextFilter();\" matTooltip=\"Azzera\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n </div>\r\n }\r\n <div fxFlex.lt-sm=\"100\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n @if (canFilterByFlt1() && flt1()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\"\r\n [attr.aria-label]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\" \r\n (click)=\"applyFilterAction(1, false)\">\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt1) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(1, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt1() && flt1()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\"\r\n [attr.aria-label]=\"flt1()!.tooltip || 'Filtra per ' + flt1()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt1\"\r\n >\r\n \r\n @if (!currentFilter.flt1) {\r\n <span>{{flt1()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt1Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt1=\"matMenu\">\r\n @for (f of flt1()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt1()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt2() && flt2()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\"\r\n [attr.aria-label]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\" \r\n (click)=\"applyFilterAction(2, false)\">\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt2) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(2, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt2() && flt2()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\"\r\n [attr.aria-label]=\"flt2()!.tooltip || 'Filtra per ' + flt2()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt2\"\r\n >\r\n \r\n @if (!currentFilter.flt2) {\r\n <span>{{flt2()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt2Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt2=\"matMenu\">\r\n @for (f of flt2()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt2()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt3() && flt3()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\"\r\n [attr.aria-label]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\" \r\n (click)=\"applyFilterAction(3, false)\">\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt3) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(3, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt3() && flt3()?.items) {\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\"\r\n [attr.aria-label]=\"flt3()!.tooltip || 'Filtra per ' + flt3()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt3\"\r\n >\r\n \r\n @if (!currentFilter.flt3) {\r\n <span>{{flt3()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt3Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt3=\"matMenu\">\r\n @for (f of flt3()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt3()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt4() && flt4()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\"\r\n [attr.aria-label]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\" \r\n (click)=\"applyFilterAction(4, false)\">\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt4) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(4, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt4() && flt4()?.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\"\r\n [attr.aria-label]=\"flt4()!.tooltip || 'Filtra per ' + flt4()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt4\"\r\n >\r\n \r\n @if (!currentFilter.flt4) {\r\n <span>{{flt4()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt4Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt4=\"matMenu\">\r\n @for (f of flt4()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt4()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n\r\n @if (canFilterByFlt5() && flt5()?.action) {\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button type=\"button\" class=\"filterbox-button\" mat-button [matTooltip]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\"\r\n [attr.aria-label]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\" \r\n (click)=\"applyFilterAction(5, false)\">\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n </button>\r\n @if (currentFilter.flt5) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera\" aria-label=\"Azzera\"\r\n (click)=\"applyFilterAction(5, true);\" class=\"small-icon-button\">\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n } @else if (canFilterByFlt5() && flt5()?.items) {\r\n <button fxFlexAlign=\"center\" class=\"filterbox-button\" type=\"button\" mat-button [matTooltip]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\"\r\n [attr.aria-label]=\"flt5()!.tooltip || 'Filtra per ' + flt5()!.title\" [matMenuTriggerFor]=\"menuApplyFilterFlt5\"\r\n >\r\n \r\n @if (!currentFilter.flt5) {\r\n <span>{{flt5()!.title}}</span>\r\n } @else {\r\n <span class=\"filterbox-selected\" [innerHtml]=\"currentFilter.flt5Name | safeHtml\"></span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">expand_more</mat-icon>\r\n <mat-menu #menuApplyFilterFlt5=\"matMenu\">\r\n @for (f of flt5()!.items; track $index) {\r\n @if (f.divider) {\r\n <mat-divider></mat-divider>\r\n }\r\n <button mat-menu-item (click)=\"applyFilter(f)\" [attr.aria-label]=\"f.description\" style=\"min-width: 200px\">\r\n <span [innerHTML]=\"f.title | safeHtml\"></span>\r\n </button>\r\n }\r\n <mat-divider></mat-divider>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxLayoutAlign=\"end\" style=\"width: 100%; min-width: 200px; padding: 4px 4px 0 4px;\">\r\n <button type=\"button\" mat-button (click)=\"clearFilter(flt5()!.items![0].group)\"\r\n aria-label=\"Azzera\">\r\n <mat-icon style=\"font-size:18px; height: 18px; width:18px;\">clear</mat-icon> Azzera\r\n </button>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n @if (currentFilter.filtered() && canClearAllFilters()) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azzera tutti i filtri\" aria-label=\"Azzera tutti i filtri\"\r\n (click)=\"clearAllFilters()\">\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.filterbox{border-radius:auto;background-color:transparent;padding:4px}.filterbox-button{max-width:200px;white-space:normal;text-align:center;display:-webkit-box;display:inline-block;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis}.filterbox-selected{font-weight:800!important}.filterbox-filtered{border-radius:12px;background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}@media(prefers-color-scheme:dark){.filterbox-filtered{background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7)}}\n"] }]
|
|
2850
|
+
}], ctorParameters: () => [], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], canFilterByText: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText", required: false }] }], canFilterByText2: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText2", required: false }] }], canFilterByText3: [{ type: i0.Input, args: [{ isSignal: true, alias: "canFilterByText3", required: false }] }], initialText: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText", required: false }] }], initialText2: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText2", required: false }] }], initialText3: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialText3", required: false }] }], textName: [{ type: i0.Input, args: [{ isSignal: true, alias: "textName", required: false }] }], text2Name: [{ type: i0.Input, args: [{ isSignal: true, alias: "text2Name", required: false }] }], text3Name: [{ type: i0.Input, args: [{ isSignal: true, alias: "text3Name", required: false }] }], textLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "textLength", required: false }] }], text2Length: [{ type: i0.Input, args: [{ isSignal: true, alias: "text2Length", required: false }] }], text3Length: [{ type: i0.Input, args: [{ isSignal: true, alias: "text3Length", required: false }] }], showTextSearchButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTextSearchButton", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }, { type: i0.Output, args: ["textChange"] }], text2: [{ type: i0.Input, args: [{ isSignal: true, alias: "text2", required: false }] }, { type: i0.Output, args: ["text2Change"] }], text3: [{ type: i0.Input, args: [{ isSignal: true, alias: "text3", required: false }] }, { type: i0.Output, args: ["text3Change"] }] } });
|
|
2818
2851
|
|
|
2819
2852
|
/*
|
|
2820
2853
|
* Public API Surface of ars-utils
|