@arsedizioni/ars-utils 21.2.296 → 21.2.297
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 +294 -274
- 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 +125 -66
|
@@ -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, booleanAttribute, effect, Optional, Self, computed, 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';
|
|
@@ -41,7 +41,6 @@ import { MatListModule } from '@angular/material/list';
|
|
|
41
41
|
import * as i10 from '@angular/material/menu';
|
|
42
42
|
import { MatMenuModule } from '@angular/material/menu';
|
|
43
43
|
import * as i2 from '@ngbracket/ngx-layout/extended';
|
|
44
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
45
44
|
import * as i7$1 from '@angular/material/badge';
|
|
46
45
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
47
46
|
import * as i4$1 from '@angular/material/chips';
|
|
@@ -1665,21 +1664,13 @@ class ButtonSelectorComponent {
|
|
|
1665
1664
|
this.changed.emit(this._value);
|
|
1666
1665
|
this.current.set(this._value);
|
|
1667
1666
|
}
|
|
1667
|
+
/** The current value as the selected item. */
|
|
1668
1668
|
get value() {
|
|
1669
1669
|
return this._value;
|
|
1670
1670
|
}
|
|
1671
|
+
/** True when the control is disabled, either via `[disabled]` input or via the Angular form layer. */
|
|
1671
1672
|
get disabled() {
|
|
1672
|
-
|
|
1673
|
-
return this.ngControl.disabled;
|
|
1674
|
-
}
|
|
1675
|
-
return this._disabled;
|
|
1676
|
-
}
|
|
1677
|
-
set disabled(value) {
|
|
1678
|
-
this._disabled = coerceBooleanProperty(value);
|
|
1679
|
-
if (this.focused) {
|
|
1680
|
-
this.focused = false;
|
|
1681
|
-
this.stateChanges.next();
|
|
1682
|
-
}
|
|
1673
|
+
return this.ngControl?.disabled ?? this._disabled();
|
|
1683
1674
|
}
|
|
1684
1675
|
constructor(ngControl) {
|
|
1685
1676
|
this.ngControl = ngControl;
|
|
@@ -1690,7 +1681,10 @@ class ButtonSelectorComponent {
|
|
|
1690
1681
|
this.stateChanges = new Subject();
|
|
1691
1682
|
this.focused = false;
|
|
1692
1683
|
this._value = undefined;
|
|
1693
|
-
|
|
1684
|
+
/** @internal Input signal for the disabled state (bound via the `[disabled]` attribute). */
|
|
1685
|
+
this._disabledInput = input(false, { ...(ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
1686
|
+
/** @internal Internal signal tracking the current disabled state. */
|
|
1687
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
1694
1688
|
this.propagateChange = () => { };
|
|
1695
1689
|
this.propagateTouched = () => { };
|
|
1696
1690
|
this.id = `button-selector--${SystemUtils.generateUUID()}`;
|
|
@@ -1715,14 +1709,19 @@ class ButtonSelectorComponent {
|
|
|
1715
1709
|
if (this.ngControl != null) {
|
|
1716
1710
|
this.ngControl.valueAccessor = this;
|
|
1717
1711
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1712
|
+
// Sync the disabled input signal into the internal disabled state signal
|
|
1713
|
+
effect(() => {
|
|
1714
|
+
this._disabled.set(this._disabledInput());
|
|
1715
|
+
});
|
|
1716
|
+
// Pre-select the first option whenever options change and autoSelect is enabled
|
|
1717
|
+
effect(() => {
|
|
1718
|
+
if (this.autoSelect()) {
|
|
1719
|
+
const options = this.options();
|
|
1720
|
+
if (options.length > 0 && options[0].value) {
|
|
1721
|
+
this.current.set(options[0]);
|
|
1722
|
+
}
|
|
1724
1723
|
}
|
|
1725
|
-
}
|
|
1724
|
+
});
|
|
1726
1725
|
}
|
|
1727
1726
|
ngOnDestroy() {
|
|
1728
1727
|
this.stateChanges.complete();
|
|
@@ -1748,10 +1747,23 @@ class ButtonSelectorComponent {
|
|
|
1748
1747
|
registerOnTouched(fn) {
|
|
1749
1748
|
this.propagateTouched = fn;
|
|
1750
1749
|
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
1752
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
1753
|
+
*/
|
|
1751
1754
|
setDescribedByIds(ids) {
|
|
1752
1755
|
this.describedBy = ids.join(' ');
|
|
1753
1756
|
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
1759
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
1760
|
+
*/
|
|
1754
1761
|
setDisabledState(isDisabled) {
|
|
1762
|
+
this._disabled.set(isDisabled);
|
|
1763
|
+
if (isDisabled && this.focused) {
|
|
1764
|
+
this.focused = false;
|
|
1765
|
+
this.stateChanges.next();
|
|
1766
|
+
}
|
|
1755
1767
|
if (!SystemUtils.isBrowser())
|
|
1756
1768
|
return;
|
|
1757
1769
|
const elem = document.getElementById(this.id);
|
|
@@ -1759,6 +1771,9 @@ class ButtonSelectorComponent {
|
|
|
1759
1771
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
1760
1772
|
}
|
|
1761
1773
|
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
1776
|
+
*/
|
|
1762
1777
|
onContainerClick() {
|
|
1763
1778
|
if (!this.focused) {
|
|
1764
1779
|
if (!SystemUtils.isBrowser())
|
|
@@ -1786,31 +1801,25 @@ class ButtonSelectorComponent {
|
|
|
1786
1801
|
this.writeValue(undefined);
|
|
1787
1802
|
}
|
|
1788
1803
|
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: {
|
|
1804
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { _disabledInput: { classPropertyName: "_disabledInput", publicName: "disabled", 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 }, 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
1805
|
}
|
|
1791
1806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ButtonSelectorComponent, decorators: [{
|
|
1792
1807
|
type: Component,
|
|
1793
1808
|
args: [{ selector: 'button-selector', standalone: true, imports: [FlexLayoutModule, MatIconModule, MatButtonModule,
|
|
1794
|
-
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1809
|
+
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1810
|
+
'[id]': 'id',
|
|
1811
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
1812
|
+
}, 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
1813
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1796
1814
|
type: Optional
|
|
1797
1815
|
}, {
|
|
1798
1816
|
type: Self
|
|
1799
|
-
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], selected: [{ type: i0.Output, args: ["selected"] }], disabled: [{
|
|
1800
|
-
type: Input
|
|
1801
|
-
}], id: [{
|
|
1802
|
-
type: HostBinding
|
|
1803
|
-
}], describedBy: [{
|
|
1804
|
-
type: HostBinding,
|
|
1805
|
-
args: ['attr.aria-describedBy']
|
|
1806
|
-
}], 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 }] }] } });
|
|
1817
|
+
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], selected: [{ type: i0.Output, args: ["selected"] }], _disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], 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
1818
|
|
|
1808
1819
|
class ButtonToggleComponent {
|
|
1809
1820
|
constructor() {
|
|
1810
1821
|
/** Emitted each time the button is clicked. Carries the current `value` and the new `toggled` state. */
|
|
1811
1822
|
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
1823
|
/** Current value bound from the parent. Drives label and icon selection. */
|
|
1815
1824
|
this.value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1816
1825
|
/** Width of the button in pixels. Use `-1` for automatic sizing. */
|
|
@@ -1839,8 +1848,8 @@ class ButtonToggleComponent {
|
|
|
1839
1848
|
* The emitted `toggled` value is the logical inverse of the current `value`.
|
|
1840
1849
|
*/
|
|
1841
1850
|
toggle() {
|
|
1842
|
-
|
|
1843
|
-
this.changed.emit({ value: this.value(), toggled
|
|
1851
|
+
const toggled = !this.value();
|
|
1852
|
+
this.changed.emit({ value: this.value(), toggled });
|
|
1844
1853
|
}
|
|
1845
1854
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1846
1855
|
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 +1887,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
1878
1887
|
}], ctorParameters: () => [] });
|
|
1879
1888
|
|
|
1880
1889
|
class ChipsSelectorComponent {
|
|
1890
|
+
/** True when the control is disabled, either via `[disabled]` input or via the Angular form layer. */
|
|
1891
|
+
get disabled() {
|
|
1892
|
+
return this.ngControl?.disabled ?? this._disabled();
|
|
1893
|
+
}
|
|
1894
|
+
/** True when the label should float above the field (focused or has a value). */
|
|
1895
|
+
get shouldLabelFloat() {
|
|
1896
|
+
return this.focused || !this.empty;
|
|
1897
|
+
}
|
|
1881
1898
|
set value(value) {
|
|
1882
1899
|
this._value = value;
|
|
1883
1900
|
this.selection = [];
|
|
@@ -1898,44 +1915,17 @@ class ChipsSelectorComponent {
|
|
|
1898
1915
|
this.changed.emit(this._value);
|
|
1899
1916
|
}
|
|
1900
1917
|
}
|
|
1918
|
+
/** The current value as an array of selected items. */
|
|
1901
1919
|
get value() {
|
|
1902
1920
|
return this._value;
|
|
1903
1921
|
}
|
|
1922
|
+
/** True when no item is selected. */
|
|
1904
1923
|
get empty() {
|
|
1905
|
-
return !this._value || this._value
|
|
1924
|
+
return !this._value || this._value.length === 0;
|
|
1906
1925
|
}
|
|
1926
|
+
/** True when the control has validation errors and has been touched. */
|
|
1907
1927
|
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;
|
|
1928
|
+
return this.ngControl?.errors != null && (this.ngControl?.touched ?? false);
|
|
1939
1929
|
}
|
|
1940
1930
|
constructor(ngControl) {
|
|
1941
1931
|
this.ngControl = ngControl;
|
|
@@ -1974,41 +1964,53 @@ class ChipsSelectorComponent {
|
|
|
1974
1964
|
this.stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
|
|
1975
1965
|
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
1976
1966
|
this.padAt = input(0, ...(ngDevMode ? [{ debugName: "padAt" }] : /* istanbul ignore next */ []));
|
|
1967
|
+
/** When `true`, the control is required. */
|
|
1968
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1969
|
+
/** Placeholder text shown when no value is selected. */
|
|
1970
|
+
this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1971
|
+
/** @internal Input signal for the disabled state (bound via the `[disabled]` attribute). */
|
|
1972
|
+
this._disabledInput = input(false, { ...(ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
1973
|
+
/** @internal Internal signal tracking the current disabled state (updated by the form layer and the input). */
|
|
1974
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
1975
|
+
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
1976
|
+
this.describedBy = '';
|
|
1977
1977
|
this._value = [];
|
|
1978
|
-
this._required = false;
|
|
1979
|
-
this._disabled = false;
|
|
1980
|
-
this._placeholder = '';
|
|
1981
1978
|
this.propagateChange = () => { };
|
|
1982
1979
|
this.propagateTouched = () => { };
|
|
1983
|
-
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
1984
|
-
this.describedBy = '';
|
|
1985
1980
|
this.renderer = inject(Renderer2);
|
|
1986
1981
|
/** Currently selected items (may contain multiple entries when `multiple` is `true`). */
|
|
1987
1982
|
this.selection = [];
|
|
1988
1983
|
if (this.ngControl != null) {
|
|
1989
1984
|
this.ngControl.valueAccessor = this;
|
|
1990
1985
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1986
|
+
// Sync the disabled input signal into the internal disabled state signal
|
|
1987
|
+
effect(() => {
|
|
1988
|
+
this._disabled.set(this._disabledInput());
|
|
1989
|
+
});
|
|
1990
|
+
// Notify state changes whenever required or placeholder inputs change
|
|
1991
|
+
effect(() => {
|
|
1992
|
+
this.required();
|
|
1993
|
+
this.placeholder();
|
|
1994
|
+
this.stateChanges.next();
|
|
1995
|
+
});
|
|
1996
|
+
afterNextRender(() => {
|
|
1997
|
+
// React to window resize to keep the collapsed state up to date
|
|
1998
|
+
fromEvent(window, 'resize')
|
|
1999
|
+
.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250))
|
|
2000
|
+
.subscribe(() => {
|
|
2001
|
+
if (this.collapseAt() > 0) {
|
|
2002
|
+
this.updateContainerWidth();
|
|
2003
|
+
}
|
|
2004
|
+
});
|
|
2005
|
+
setTimeout(() => {
|
|
1999
2006
|
this.updateContainerWidth();
|
|
2000
|
-
|
|
2007
|
+
this.changesEnabled = true;
|
|
2008
|
+
}, 250);
|
|
2001
2009
|
});
|
|
2002
2010
|
}
|
|
2003
2011
|
ngOnDestroy() {
|
|
2004
2012
|
this.stateChanges.complete();
|
|
2005
2013
|
}
|
|
2006
|
-
ngAfterContentInit() {
|
|
2007
|
-
setTimeout(() => {
|
|
2008
|
-
this.updateContainerWidth();
|
|
2009
|
-
this.changesEnabled = true;
|
|
2010
|
-
}, 250);
|
|
2011
|
-
}
|
|
2012
2014
|
/**
|
|
2013
2015
|
* Measures the container (or window) width and updates the `containerWidth` signal,
|
|
2014
2016
|
* retrying after 100 ms if the element is not yet laid out.
|
|
@@ -2017,8 +2019,8 @@ class ChipsSelectorComponent {
|
|
|
2017
2019
|
const elem = document.getElementById(this.containerId);
|
|
2018
2020
|
if (elem && elem.clientWidth > 0) {
|
|
2019
2021
|
this.containerWidth.set(this.collapseAtContainer()
|
|
2020
|
-
?
|
|
2021
|
-
:
|
|
2022
|
+
? elem.clientWidth
|
|
2023
|
+
: window.innerWidth);
|
|
2022
2024
|
}
|
|
2023
2025
|
else {
|
|
2024
2026
|
setTimeout(() => this.updateContainerWidth(), 100);
|
|
@@ -2032,7 +2034,7 @@ class ChipsSelectorComponent {
|
|
|
2032
2034
|
getSelection() {
|
|
2033
2035
|
const value = !this.multiple() && this.collapsed() && this.collapsedDisplayMode() === 'button'
|
|
2034
2036
|
? this.singleSelection
|
|
2035
|
-
: this.selection
|
|
2037
|
+
: this.selection;
|
|
2036
2038
|
if (Array.isArray(value)) {
|
|
2037
2039
|
return value;
|
|
2038
2040
|
}
|
|
@@ -2050,6 +2052,7 @@ class ChipsSelectorComponent {
|
|
|
2050
2052
|
* Returns `true` when the given item can be selected in the current mode.
|
|
2051
2053
|
* In single-select mode an already-selected item is not re-selectable.
|
|
2052
2054
|
* @param item - The item to check.
|
|
2055
|
+
* @returns True when the item is selectable.
|
|
2053
2056
|
*/
|
|
2054
2057
|
isSelectable(item) {
|
|
2055
2058
|
return this.multiple() || this.getSelection().findIndex(x => x.value === item.value) === -1;
|
|
@@ -2078,10 +2081,23 @@ class ChipsSelectorComponent {
|
|
|
2078
2081
|
registerOnTouched(fn) {
|
|
2079
2082
|
this.propagateTouched = fn;
|
|
2080
2083
|
}
|
|
2084
|
+
/**
|
|
2085
|
+
* Sets the ARIA described-by IDs for accessibility.
|
|
2086
|
+
* @param ids - The list of element IDs to associate with this control.
|
|
2087
|
+
*/
|
|
2081
2088
|
setDescribedByIds(ids) {
|
|
2082
2089
|
this.describedBy = ids.join(' ');
|
|
2083
2090
|
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
2093
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
2094
|
+
*/
|
|
2084
2095
|
setDisabledState(isDisabled) {
|
|
2096
|
+
this._disabled.set(isDisabled);
|
|
2097
|
+
if (isDisabled && this.focused) {
|
|
2098
|
+
this.focused = false;
|
|
2099
|
+
this.stateChanges.next();
|
|
2100
|
+
}
|
|
2085
2101
|
if (!SystemUtils.isBrowser())
|
|
2086
2102
|
return;
|
|
2087
2103
|
const elem = document.getElementById(this.id);
|
|
@@ -2089,6 +2105,9 @@ class ChipsSelectorComponent {
|
|
|
2089
2105
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
2090
2106
|
}
|
|
2091
2107
|
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Handles a click on the container element, focusing it and marking it as touched.
|
|
2110
|
+
*/
|
|
2092
2111
|
onContainerClick() {
|
|
2093
2112
|
if (!this.focused) {
|
|
2094
2113
|
if (!SystemUtils.isBrowser())
|
|
@@ -2118,36 +2137,25 @@ class ChipsSelectorComponent {
|
|
|
2118
2137
|
}
|
|
2119
2138
|
}
|
|
2120
2139
|
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:
|
|
2140
|
+
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 }, _disabledInput: { classPropertyName: "_disabledInput", publicName: "disabled", isSignal: true, 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
2141
|
}
|
|
2123
2142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ChipsSelectorComponent, decorators: [{
|
|
2124
2143
|
type: Component,
|
|
2125
2144
|
args: [{ selector: 'chips-selector', standalone: true, imports: [FlexLayoutModule, FormsModule, MatFormFieldModule, MatSelectModule,
|
|
2126
2145
|
MatChipsModule, MatIconModule, MatButtonModule, MatBadgeModule, MatTooltipModule,
|
|
2127
2146
|
ButtonSelectorComponent
|
|
2128
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2147
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2148
|
+
'[id]': 'id',
|
|
2149
|
+
'[class.floating]': 'shouldLabelFloat',
|
|
2150
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
2151
|
+
}, 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
2152
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2130
2153
|
type: Optional
|
|
2131
2154
|
}, {
|
|
2132
2155
|
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: [{
|
|
2136
|
-
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
|
-
}] } });
|
|
2156
|
+
}] }], 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 }] }], _disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
2148
2157
|
|
|
2149
2158
|
class FileInputComponent {
|
|
2150
|
-
// Initialize
|
|
2151
2159
|
static { this.nextId = 0; }
|
|
2152
2160
|
set value(value) {
|
|
2153
2161
|
this._value = value;
|
|
@@ -2155,50 +2163,42 @@ class FileInputComponent {
|
|
|
2155
2163
|
this.stateChanges.next();
|
|
2156
2164
|
this.changed.emit(this._value);
|
|
2157
2165
|
}
|
|
2166
|
+
/** The current FileInfo value. */
|
|
2158
2167
|
get value() {
|
|
2159
2168
|
return this._value;
|
|
2160
2169
|
}
|
|
2170
|
+
/** Size of the current file in bytes. */
|
|
2161
2171
|
get size() {
|
|
2162
2172
|
return this._value?.file?.size;
|
|
2163
2173
|
}
|
|
2174
|
+
/** True when the control is required (implements `MatFormFieldControl.required`). */
|
|
2164
2175
|
get required() {
|
|
2165
|
-
return this.
|
|
2166
|
-
}
|
|
2167
|
-
set required(value) {
|
|
2168
|
-
this._required = coerceBooleanProperty(value);
|
|
2169
|
-
this.stateChanges.next();
|
|
2170
|
-
}
|
|
2171
|
-
get disabled() {
|
|
2172
|
-
if (this.ngControl && this.ngControl.disabled != null) {
|
|
2173
|
-
return this.ngControl.disabled;
|
|
2174
|
-
}
|
|
2175
|
-
return this._disabled;
|
|
2176
|
-
}
|
|
2177
|
-
set disabled(value) {
|
|
2178
|
-
this._disabled = coerceBooleanProperty(value);
|
|
2179
|
-
if (this.focused) {
|
|
2180
|
-
this.focused = false;
|
|
2181
|
-
this.stateChanges.next();
|
|
2182
|
-
}
|
|
2176
|
+
return this._requiredInput();
|
|
2183
2177
|
}
|
|
2178
|
+
/** The effective placeholder label shown in the form field (implements `MatFormFieldControl.placeholder`). */
|
|
2184
2179
|
get placeholder() {
|
|
2185
2180
|
return this._placeholder();
|
|
2186
2181
|
}
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
this.
|
|
2182
|
+
/** True when the control is disabled, either via `[disabled]` input or via the Angular form layer. */
|
|
2183
|
+
get disabled() {
|
|
2184
|
+
return this.ngControl?.disabled ?? this._disabled();
|
|
2190
2185
|
}
|
|
2186
|
+
/** True when no file is selected. */
|
|
2191
2187
|
get empty() {
|
|
2192
2188
|
return !this._value || !this._value.file;
|
|
2193
2189
|
}
|
|
2190
|
+
/** True when the control has validation errors and has been touched. */
|
|
2194
2191
|
get errorState() {
|
|
2195
|
-
return this.ngControl
|
|
2192
|
+
return (this.ngControl?.errors != null) && (this.ngControl?.touched ?? false);
|
|
2196
2193
|
}
|
|
2194
|
+
/** True when the label should float above the field. */
|
|
2197
2195
|
get shouldLabelFloat() {
|
|
2198
2196
|
return this.focused || !this.empty;
|
|
2199
2197
|
}
|
|
2200
2198
|
constructor(ngControl) {
|
|
2201
2199
|
this.ngControl = ngControl;
|
|
2200
|
+
/** Reference to the hidden native file input element. */
|
|
2201
|
+
this.__file = viewChild.required('__file');
|
|
2202
2202
|
this.renderer = inject(Renderer2);
|
|
2203
2203
|
this.uiService = inject(UIService);
|
|
2204
2204
|
this.stateChanges = new Subject();
|
|
@@ -2208,16 +2208,25 @@ class FileInputComponent {
|
|
|
2208
2208
|
this.canCapture = signal(false, ...(ngDevMode ? [{ debugName: "canCapture" }] : /* istanbul ignore next */ []));
|
|
2209
2209
|
/** Size in MB of the currently selected file. */
|
|
2210
2210
|
this.fileSize = signal(0, ...(ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []));
|
|
2211
|
+
/** Internal placeholder text, derived from the input and camera availability. */
|
|
2211
2212
|
this._placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
|
|
2212
2213
|
this._value = new FileInfo();
|
|
2213
|
-
|
|
2214
|
-
this.
|
|
2214
|
+
/** The currently displayed file name. Can be bound from outside or updated by file selection. */
|
|
2215
|
+
this.fileName = model(undefined, ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
|
|
2215
2216
|
this.maxSizeMb = input(5, ...(ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []));
|
|
2216
2217
|
this.minSizeMb = input(0, ...(ngDevMode ? [{ debugName: "minSizeMb" }] : /* istanbul ignore next */ []));
|
|
2217
2218
|
this.isNew = input(false, ...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
|
|
2218
2219
|
this.canPreview = input(false, ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
|
|
2219
2220
|
this.appearance = input(this.uiService.appearance(), ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2220
2221
|
this.accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
2222
|
+
/** @internal Input signal for the required state (bound via the `[required]` attribute). */
|
|
2223
|
+
this._requiredInput = input(false, { ...(ngDevMode ? { debugName: "_requiredInput" } : /* istanbul ignore next */ {}), alias: 'required', transform: booleanAttribute });
|
|
2224
|
+
/** @internal Input signal for the placeholder text (bound via the `[placeholder]` attribute). */
|
|
2225
|
+
this._placeholderInput = input('', { ...(ngDevMode ? { debugName: "_placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
|
|
2226
|
+
/** @internal Input signal for the disabled state (bound via the `[disabled]` attribute). */
|
|
2227
|
+
this._disabledInput = input(false, { ...(ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
2228
|
+
/** @internal Internal signal tracking the current disabled state. */
|
|
2229
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
2221
2230
|
this.id = `${this.controlType}-${FileInputComponent.nextId++}`;
|
|
2222
2231
|
this.describedBy = '';
|
|
2223
2232
|
this.changed = output();
|
|
@@ -2228,12 +2237,35 @@ class FileInputComponent {
|
|
|
2228
2237
|
if (this.ngControl != null) {
|
|
2229
2238
|
this.ngControl.valueAccessor = this;
|
|
2230
2239
|
}
|
|
2240
|
+
// Sync the disabled input into the internal disabled signal
|
|
2241
|
+
effect(() => {
|
|
2242
|
+
this._disabled.set(this._disabledInput());
|
|
2243
|
+
});
|
|
2244
|
+
// Notify state changes when required changes
|
|
2245
|
+
effect(() => {
|
|
2246
|
+
this._requiredInput();
|
|
2247
|
+
this.stateChanges.next();
|
|
2248
|
+
});
|
|
2249
|
+
// Sync placeholder input into internal signal; setupDevices may override it when empty
|
|
2250
|
+
effect(() => {
|
|
2251
|
+
const p = this._placeholderInput();
|
|
2252
|
+
if (p) {
|
|
2253
|
+
this._placeholder.set(p);
|
|
2254
|
+
}
|
|
2255
|
+
});
|
|
2256
|
+
// Detect camera availability and set the default placeholder after the first render
|
|
2257
|
+
afterNextRender(() => {
|
|
2258
|
+
this.setupDevices();
|
|
2259
|
+
});
|
|
2231
2260
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2261
|
+
ngOnDestroy() {
|
|
2262
|
+
this.stateChanges.complete();
|
|
2263
|
+
}
|
|
2264
|
+
ngDoCheck() {
|
|
2265
|
+
this.updateInputDirtyCheck();
|
|
2234
2266
|
}
|
|
2235
2267
|
/**
|
|
2236
|
-
* Detects camera availability and
|
|
2268
|
+
* Detects camera availability and sets the default placeholder when none is explicitly provided.
|
|
2237
2269
|
*/
|
|
2238
2270
|
async setupDevices() {
|
|
2239
2271
|
this.canCapture.set(false);
|
|
@@ -2246,18 +2278,13 @@ class FileInputComponent {
|
|
|
2246
2278
|
}
|
|
2247
2279
|
catch { }
|
|
2248
2280
|
}
|
|
2249
|
-
|
|
2281
|
+
const current = this._placeholderInput();
|
|
2282
|
+
if (!current || current === 'Seleziona file') {
|
|
2250
2283
|
this._placeholder.set(this.canCapture()
|
|
2251
2284
|
? 'Seleziona file o acquisisci con fotocamera'
|
|
2252
2285
|
: 'Seleziona file');
|
|
2253
2286
|
}
|
|
2254
2287
|
}
|
|
2255
|
-
ngOnDestroy() {
|
|
2256
|
-
this.stateChanges.complete();
|
|
2257
|
-
}
|
|
2258
|
-
ngDoCheck() {
|
|
2259
|
-
this.updateInputDirtyCheck();
|
|
2260
|
-
}
|
|
2261
2288
|
/**
|
|
2262
2289
|
* Writes a new value to the component (called by the form layer).
|
|
2263
2290
|
* @param value - The new file info to display.
|
|
@@ -2287,10 +2314,15 @@ class FileInputComponent {
|
|
|
2287
2314
|
this.describedBy = ids.join(' ');
|
|
2288
2315
|
}
|
|
2289
2316
|
/**
|
|
2290
|
-
* Updates the disabled state
|
|
2317
|
+
* Updates the disabled state when the Angular form layer changes it.
|
|
2291
2318
|
* @param isDisabled - Whether the control should be disabled.
|
|
2292
2319
|
*/
|
|
2293
2320
|
setDisabledState(isDisabled) {
|
|
2321
|
+
this._disabled.set(isDisabled);
|
|
2322
|
+
if (isDisabled && this.focused) {
|
|
2323
|
+
this.focused = false;
|
|
2324
|
+
this.stateChanges.next();
|
|
2325
|
+
}
|
|
2294
2326
|
if (!SystemUtils.isBrowser())
|
|
2295
2327
|
return;
|
|
2296
2328
|
const elem = document.getElementById(this.id);
|
|
@@ -2335,7 +2367,7 @@ class FileInputComponent {
|
|
|
2335
2367
|
(!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&
|
|
2336
2368
|
(!this.minSizeMb() || fileSizeMb >= this.minSizeMb());
|
|
2337
2369
|
this.writeValue(fileInfo);
|
|
2338
|
-
this.fileName
|
|
2370
|
+
this.fileName.set(f.name);
|
|
2339
2371
|
this.fileSize.set(Math.round(fileSizeMb));
|
|
2340
2372
|
}
|
|
2341
2373
|
}
|
|
@@ -2351,13 +2383,13 @@ class FileInputComponent {
|
|
|
2351
2383
|
*/
|
|
2352
2384
|
clearFile() {
|
|
2353
2385
|
if (this.hasFile()) {
|
|
2354
|
-
this.fileName
|
|
2386
|
+
this.fileName.set(undefined);
|
|
2355
2387
|
this.fileSize.set(0);
|
|
2356
2388
|
const fi = new FileInfo();
|
|
2357
2389
|
fi.file = undefined;
|
|
2358
2390
|
fi.valid = !this.required;
|
|
2359
2391
|
this.writeValue(fi);
|
|
2360
|
-
this.__file.nativeElement.value = '';
|
|
2392
|
+
this.__file().nativeElement.value = '';
|
|
2361
2393
|
}
|
|
2362
2394
|
}
|
|
2363
2395
|
/**
|
|
@@ -2375,36 +2407,21 @@ class FileInputComponent {
|
|
|
2375
2407
|
this.preview.emit();
|
|
2376
2408
|
}
|
|
2377
2409
|
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: {
|
|
2410
|
+
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 }, _disabledInput: { classPropertyName: "_disabledInput", publicName: "disabled", isSignal: true, 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
2411
|
}
|
|
2380
2412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
2381
2413
|
type: Component,
|
|
2382
2414
|
args: [{ selector: 'file-input', providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormFieldModule, MatInputModule, FormsModule, FileSizeValidatorDirective, MatButtonModule,
|
|
2383
|
-
MatIconModule, MatTooltipModule],
|
|
2415
|
+
MatIconModule, MatTooltipModule], host: {
|
|
2416
|
+
'[id]': 'id',
|
|
2417
|
+
'[class.floating]': 'shouldLabelFloat',
|
|
2418
|
+
'[attr.aria-describedBy]': 'describedBy',
|
|
2419
|
+
}, 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
2420
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2385
2421
|
type: Optional
|
|
2386
2422
|
}, {
|
|
2387
2423
|
type: Self
|
|
2388
|
-
}] }], propDecorators: { __file: [{
|
|
2389
|
-
type: ViewChild,
|
|
2390
|
-
args: ['__file']
|
|
2391
|
-
}], required: [{
|
|
2392
|
-
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
|
-
}], changed: [{ type: i0.Output, args: ["changed"] }], download: [{ type: i0.Output, args: ["download"] }], preview: [{ type: i0.Output, args: ["preview"] }] } });
|
|
2424
|
+
}] }], 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 }] }], _disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], download: [{ type: i0.Output, args: ["download"] }], preview: [{ type: i0.Output, args: ["preview"] }] } });
|
|
2408
2425
|
|
|
2409
2426
|
class FilePreviewComponent {
|
|
2410
2427
|
constructor() {
|
|
@@ -2506,19 +2523,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
2506
2523
|
|
|
2507
2524
|
class FilterBarComponent {
|
|
2508
2525
|
constructor() {
|
|
2526
|
+
/** Emitted whenever any filter value changes. */
|
|
2509
2527
|
this.changed = output();
|
|
2528
|
+
/** The list of filter groups to display. */
|
|
2510
2529
|
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
2530
|
this.canFilterByText = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText" }] : /* istanbul ignore next */ []));
|
|
2517
2531
|
this.canFilterByText2 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText2" }] : /* istanbul ignore next */ []));
|
|
2518
2532
|
this.canFilterByText3 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText3" }] : /* istanbul ignore next */ []));
|
|
2519
|
-
|
|
2520
|
-
this.
|
|
2521
|
-
this.
|
|
2533
|
+
/** Initial text values for the search inputs — synced into the model signals on change. */
|
|
2534
|
+
this.initialText = input(undefined, ...(ngDevMode ? [{ debugName: "initialText" }] : /* istanbul ignore next */ []));
|
|
2535
|
+
this.initialText2 = input(undefined, ...(ngDevMode ? [{ debugName: "initialText2" }] : /* istanbul ignore next */ []));
|
|
2536
|
+
this.initialText3 = input(undefined, ...(ngDevMode ? [{ debugName: "initialText3" }] : /* istanbul ignore next */ []));
|
|
2522
2537
|
this.textName = input("testo", ...(ngDevMode ? [{ debugName: "textName" }] : /* istanbul ignore next */ []));
|
|
2523
2538
|
this.text2Name = input("...", ...(ngDevMode ? [{ debugName: "text2Name" }] : /* istanbul ignore next */ []));
|
|
2524
2539
|
this.text3Name = input("...", ...(ngDevMode ? [{ debugName: "text3Name" }] : /* istanbul ignore next */ []));
|
|
@@ -2527,45 +2542,58 @@ class FilterBarComponent {
|
|
|
2527
2542
|
this.text3Length = input(...(ngDevMode ? [undefined, { debugName: "text3Length" }] : /* istanbul ignore next */ []));
|
|
2528
2543
|
this.showTextSearchButton = input(false, ...(ngDevMode ? [{ debugName: "showTextSearchButton" }] : /* istanbul ignore next */ []));
|
|
2529
2544
|
this.appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2545
|
+
/** Two-way bindable text filter values. */
|
|
2546
|
+
this.text = model(undefined, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
2547
|
+
this.text2 = model(undefined, ...(ngDevMode ? [{ debugName: "text2" }] : /* istanbul ignore next */ []));
|
|
2548
|
+
this.text3 = model(undefined, ...(ngDevMode ? [{ debugName: "text3" }] : /* istanbul ignore next */ []));
|
|
2549
|
+
/** Filter group for slot 1, derived reactively from the `filters` input. */
|
|
2550
|
+
this.flt1 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_1), ...(ngDevMode ? [{ debugName: "flt1" }] : /* istanbul ignore next */ []));
|
|
2551
|
+
/** Filter group for slot 2, derived reactively from the `filters` input. */
|
|
2552
|
+
this.flt2 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_2), ...(ngDevMode ? [{ debugName: "flt2" }] : /* istanbul ignore next */ []));
|
|
2553
|
+
/** Filter group for slot 3, derived reactively from the `filters` input. */
|
|
2554
|
+
this.flt3 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_3), ...(ngDevMode ? [{ debugName: "flt3" }] : /* istanbul ignore next */ []));
|
|
2555
|
+
/** Filter group for slot 4, derived reactively from the `filters` input. */
|
|
2556
|
+
this.flt4 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_4), ...(ngDevMode ? [{ debugName: "flt4" }] : /* istanbul ignore next */ []));
|
|
2557
|
+
/** Filter group for slot 5, derived reactively from the `filters` input. */
|
|
2558
|
+
this.flt5 = computed(() => this.filters()?.find(n => n.group === Filters.FLT_5), ...(ngDevMode ? [{ debugName: "flt5" }] : /* istanbul ignore next */ []));
|
|
2559
|
+
/** True when filter slot 1 has an action or item list. */
|
|
2560
|
+
this.canFilterByFlt1 = computed(() => {
|
|
2561
|
+
const g = this.flt1();
|
|
2562
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2563
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt1" }] : /* istanbul ignore next */ []));
|
|
2564
|
+
/** True when filter slot 2 has an action or item list. */
|
|
2565
|
+
this.canFilterByFlt2 = computed(() => {
|
|
2566
|
+
const g = this.flt2();
|
|
2567
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2568
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt2" }] : /* istanbul ignore next */ []));
|
|
2569
|
+
/** True when filter slot 3 has an action or item list. */
|
|
2570
|
+
this.canFilterByFlt3 = computed(() => {
|
|
2571
|
+
const g = this.flt3();
|
|
2572
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2573
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt3" }] : /* istanbul ignore next */ []));
|
|
2574
|
+
/** True when filter slot 4 has an action or item list. */
|
|
2575
|
+
this.canFilterByFlt4 = computed(() => {
|
|
2576
|
+
const g = this.flt4();
|
|
2577
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2578
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt4" }] : /* istanbul ignore next */ []));
|
|
2579
|
+
/** True when filter slot 5 has an action or item list. */
|
|
2580
|
+
this.canFilterByFlt5 = computed(() => {
|
|
2581
|
+
const g = this.flt5();
|
|
2582
|
+
return !!(g?.action || (g?.items && g.items.length > 0));
|
|
2583
|
+
}, ...(ngDevMode ? [{ debugName: "canFilterByFlt5" }] : /* istanbul ignore next */ []));
|
|
2530
2584
|
this.currentFilter = new CurrentFilter();
|
|
2585
|
+
// Sync the initialText inputs into the model signals whenever they change
|
|
2531
2586
|
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
|
-
}
|
|
2587
|
+
this.text.set(this.initialText());
|
|
2588
|
+
this.text2.set(this.initialText2());
|
|
2589
|
+
this.text3.set(this.initialText3());
|
|
2567
2590
|
});
|
|
2568
2591
|
}
|
|
2592
|
+
/**
|
|
2593
|
+
* No-op kept for API compatibility.
|
|
2594
|
+
* Filter groups are now computed reactively from the `filters()` input.
|
|
2595
|
+
*/
|
|
2596
|
+
initializeFilters() { }
|
|
2569
2597
|
/**
|
|
2570
2598
|
* Applies the selected filter item to the current filter state and emits the change.
|
|
2571
2599
|
* @param filter - The filter item to apply.
|
|
@@ -2631,9 +2659,9 @@ class FilterBarComponent {
|
|
|
2631
2659
|
}
|
|
2632
2660
|
/** Commits the current text inputs to the filter state and emits the change. */
|
|
2633
2661
|
applyTextFilter() {
|
|
2634
|
-
this.currentFilter.text = this.text;
|
|
2635
|
-
this.currentFilter.text2 = this.text2;
|
|
2636
|
-
this.currentFilter.text3 = this.text3;
|
|
2662
|
+
this.currentFilter.text = this.text();
|
|
2663
|
+
this.currentFilter.text2 = this.text2();
|
|
2664
|
+
this.currentFilter.text3 = this.text3();
|
|
2637
2665
|
this.changed.emit({
|
|
2638
2666
|
filter: this.currentFilter,
|
|
2639
2667
|
group: Filters.FLT_TEXT
|
|
@@ -2701,13 +2729,14 @@ class FilterBarComponent {
|
|
|
2701
2729
|
this.currentFilter.text = undefined;
|
|
2702
2730
|
this.currentFilter.text2 = undefined;
|
|
2703
2731
|
this.currentFilter.text3 = undefined;
|
|
2704
|
-
this.text
|
|
2705
|
-
this.text2
|
|
2706
|
-
this.text3
|
|
2732
|
+
this.text.set(undefined);
|
|
2733
|
+
this.text2.set(undefined);
|
|
2734
|
+
this.text3.set(undefined);
|
|
2707
2735
|
this.changed.emit({ filter: this.currentFilter, group: -1 });
|
|
2708
2736
|
}
|
|
2709
2737
|
/**
|
|
2710
2738
|
* Returns `true` when more than one filter type is active, showing the "clear all" button.
|
|
2739
|
+
* @returns True when the clear-all button should be visible.
|
|
2711
2740
|
*/
|
|
2712
2741
|
canClearAllFilters() {
|
|
2713
2742
|
let count = 0;
|
|
@@ -2732,89 +2761,80 @@ class FilterBarComponent {
|
|
|
2732
2761
|
/**
|
|
2733
2762
|
* Returns the filter group matching the given id, or `undefined` if not found.
|
|
2734
2763
|
* @param id - The group id to look up.
|
|
2764
|
+
* @returns The matching `FilterGroup`, or `undefined`.
|
|
2735
2765
|
*/
|
|
2736
2766
|
getFilterGroup(id) {
|
|
2737
|
-
return this.filters()?.find(
|
|
2767
|
+
return this.filters()?.find(n => n.group === id);
|
|
2738
2768
|
}
|
|
2739
2769
|
/** Synchronises the filter bar display with the values currently stored in `currentFilter`. */
|
|
2740
2770
|
syncFilter() {
|
|
2741
2771
|
let g = this.getFilterGroup(Filters.FLT_1);
|
|
2742
|
-
if (g) {
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
this.currentFilter.flt1 = undefined;
|
|
2751
|
-
}
|
|
2772
|
+
if (g?.items) {
|
|
2773
|
+
this.currentFilter.flt1Name = undefined;
|
|
2774
|
+
if (this.currentFilter.flt1) {
|
|
2775
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt1);
|
|
2776
|
+
if (gi)
|
|
2777
|
+
this.currentFilter.flt1Name = gi.titleSelected;
|
|
2778
|
+
else
|
|
2779
|
+
this.currentFilter.flt1 = undefined;
|
|
2752
2780
|
}
|
|
2753
2781
|
}
|
|
2754
2782
|
g = this.getFilterGroup(Filters.FLT_2);
|
|
2755
|
-
if (g) {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
this.currentFilter.flt2 = undefined;
|
|
2764
|
-
}
|
|
2783
|
+
if (g?.items) {
|
|
2784
|
+
this.currentFilter.flt2Name = undefined;
|
|
2785
|
+
if (this.currentFilter.flt2) {
|
|
2786
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt2);
|
|
2787
|
+
if (gi)
|
|
2788
|
+
this.currentFilter.flt2Name = gi.titleSelected;
|
|
2789
|
+
else
|
|
2790
|
+
this.currentFilter.flt2 = undefined;
|
|
2765
2791
|
}
|
|
2766
2792
|
}
|
|
2767
2793
|
g = this.getFilterGroup(Filters.FLT_3);
|
|
2768
|
-
if (g) {
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
this.currentFilter.flt3 = undefined;
|
|
2777
|
-
}
|
|
2794
|
+
if (g?.items) {
|
|
2795
|
+
this.currentFilter.flt3Name = undefined;
|
|
2796
|
+
if (this.currentFilter.flt3) {
|
|
2797
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt3);
|
|
2798
|
+
if (gi)
|
|
2799
|
+
this.currentFilter.flt3Name = gi.titleSelected;
|
|
2800
|
+
else
|
|
2801
|
+
this.currentFilter.flt3 = undefined;
|
|
2778
2802
|
}
|
|
2779
2803
|
}
|
|
2780
2804
|
g = this.getFilterGroup(Filters.FLT_4);
|
|
2781
|
-
if (g) {
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
this.currentFilter.flt4 = undefined;
|
|
2790
|
-
}
|
|
2805
|
+
if (g?.items) {
|
|
2806
|
+
this.currentFilter.flt4Name = undefined;
|
|
2807
|
+
if (this.currentFilter.flt4) {
|
|
2808
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt4);
|
|
2809
|
+
if (gi)
|
|
2810
|
+
this.currentFilter.flt4Name = gi.titleSelected;
|
|
2811
|
+
else
|
|
2812
|
+
this.currentFilter.flt4 = undefined;
|
|
2791
2813
|
}
|
|
2792
2814
|
}
|
|
2793
2815
|
g = this.getFilterGroup(Filters.FLT_5);
|
|
2794
|
-
if (g) {
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
this.currentFilter.flt5 = undefined;
|
|
2803
|
-
}
|
|
2816
|
+
if (g?.items) {
|
|
2817
|
+
this.currentFilter.flt5Name = undefined;
|
|
2818
|
+
if (this.currentFilter.flt5) {
|
|
2819
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt5);
|
|
2820
|
+
if (gi)
|
|
2821
|
+
this.currentFilter.flt5Name = gi.titleSelected;
|
|
2822
|
+
else
|
|
2823
|
+
this.currentFilter.flt5 = undefined;
|
|
2804
2824
|
}
|
|
2805
2825
|
}
|
|
2806
|
-
this.text
|
|
2807
|
-
this.text2
|
|
2808
|
-
this.text3
|
|
2826
|
+
this.text.set(this.currentFilter.text);
|
|
2827
|
+
this.text2.set(this.currentFilter.text2);
|
|
2828
|
+
this.text3.set(this.currentFilter.text3);
|
|
2809
2829
|
}
|
|
2810
2830
|
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 }); }
|
|
2831
|
+
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
2832
|
}
|
|
2813
2833
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterBarComponent, decorators: [{
|
|
2814
2834
|
type: Component,
|
|
2815
2835
|
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 }] }] } });
|
|
2836
|
+
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"] }]
|
|
2837
|
+
}], 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
2838
|
|
|
2819
2839
|
/*
|
|
2820
2840
|
* Public API Surface of ars-utils
|