@arsedizioni/ars-utils 21.2.220 → 21.2.221
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 +2946 -2946
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +895 -895
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +891 -891
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +196 -196
- package/types/arsedizioni-ars-utils-core.d.ts +16 -16
- package/types/arsedizioni-ars-utils-ui.application.d.ts +237 -237
- package/types/arsedizioni-ars-utils-ui.d.ts +206 -206
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, Renderer2, ElementRef, afterNextRender, Directive, output, signal, ChangeDetectionStrategy, Component, Injectable, DestroyRef, viewChild, NgModule, HostBinding, Input,
|
|
2
|
+
import { input, inject, Renderer2, ElementRef, afterNextRender, Directive, output, signal, ChangeDetectionStrategy, Component, Injectable, DestroyRef, viewChild, NgModule, HostBinding, Input, Optional, Self, computed, ChangeDetectorRef, ViewChild, effect } 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';
|
|
@@ -43,11 +43,11 @@ import * as i10 from '@angular/material/menu';
|
|
|
43
43
|
import { MatMenuModule } from '@angular/material/menu';
|
|
44
44
|
import * as i2 from '@ngbracket/ngx-layout/extended';
|
|
45
45
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
46
|
-
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
47
46
|
import * as i7$1 from '@angular/material/badge';
|
|
48
47
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
49
48
|
import * as i4$1 from '@angular/material/chips';
|
|
50
49
|
import { MatChipsModule } from '@angular/material/chips';
|
|
50
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
51
51
|
|
|
52
52
|
class ResizeTableColumnDirective {
|
|
53
53
|
constructor() {
|
|
@@ -1645,28 +1645,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
1645
1645
|
}]
|
|
1646
1646
|
}] });
|
|
1647
1647
|
|
|
1648
|
-
class
|
|
1649
|
-
// Initialize
|
|
1650
|
-
static { this.nextId = 0; }
|
|
1648
|
+
class ButtonSelectorComponent {
|
|
1651
1649
|
set value(value) {
|
|
1652
1650
|
this._value = value;
|
|
1653
1651
|
this.propagateChange(this._value);
|
|
1654
1652
|
this.stateChanges.next();
|
|
1655
1653
|
this.changed.emit(this._value);
|
|
1654
|
+
this.current.set(this._value);
|
|
1656
1655
|
}
|
|
1657
1656
|
get value() {
|
|
1658
1657
|
return this._value;
|
|
1659
1658
|
}
|
|
1660
|
-
get size() {
|
|
1661
|
-
return this._value?.file?.size;
|
|
1662
|
-
}
|
|
1663
|
-
get required() {
|
|
1664
|
-
return this._required;
|
|
1665
|
-
}
|
|
1666
|
-
set required(value) {
|
|
1667
|
-
this._required = coerceBooleanProperty(value);
|
|
1668
|
-
this.stateChanges.next();
|
|
1669
|
-
}
|
|
1670
1659
|
get disabled() {
|
|
1671
1660
|
if (this.ngControl && this.ngControl.disabled != null) {
|
|
1672
1661
|
return this.ngControl.disabled;
|
|
@@ -1680,86 +1669,55 @@ class FileInputComponent {
|
|
|
1680
1669
|
this.stateChanges.next();
|
|
1681
1670
|
}
|
|
1682
1671
|
}
|
|
1683
|
-
get placeholder() {
|
|
1684
|
-
return this._placeholder();
|
|
1685
|
-
}
|
|
1686
|
-
set placeholder(value) {
|
|
1687
|
-
this._placeholder.set(value);
|
|
1688
|
-
this.stateChanges.next();
|
|
1689
|
-
}
|
|
1690
|
-
get empty() {
|
|
1691
|
-
return !this._value || !this._value.file;
|
|
1692
|
-
}
|
|
1693
|
-
get errorState() {
|
|
1694
|
-
return this.ngControl.errors != null && this.ngControl.touched;
|
|
1695
|
-
}
|
|
1696
|
-
get shouldLabelFloat() {
|
|
1697
|
-
return this.focused || !this.empty;
|
|
1698
|
-
}
|
|
1699
1672
|
constructor(ngControl) {
|
|
1700
1673
|
this.ngControl = ngControl;
|
|
1701
|
-
|
|
1702
|
-
this.
|
|
1674
|
+
/** Emitted whenever the selected value changes (including programmatic resets). */
|
|
1675
|
+
this.changed = output();
|
|
1676
|
+
/** Emitted when the user explicitly picks an item from the menu. */
|
|
1677
|
+
this.selected = output();
|
|
1703
1678
|
this.stateChanges = new Subject();
|
|
1704
|
-
this.controlType = 'file-input';
|
|
1705
1679
|
this.focused = false;
|
|
1706
|
-
|
|
1707
|
-
this.canCapture = signal(false, ...(ngDevMode ? [{ debugName: "canCapture" }] : /* istanbul ignore next */ []));
|
|
1708
|
-
/** Size in MB of the currently selected file. */
|
|
1709
|
-
this.fileSize = signal(0, ...(ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []));
|
|
1710
|
-
this._placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
|
|
1711
|
-
this._value = new FileInfo();
|
|
1712
|
-
this._required = false;
|
|
1680
|
+
this._value = undefined;
|
|
1713
1681
|
this._disabled = false;
|
|
1714
|
-
this.
|
|
1715
|
-
this.minSizeMb = input(0, ...(ngDevMode ? [{ debugName: "minSizeMb" }] : /* istanbul ignore next */ []));
|
|
1716
|
-
this.isNew = input(false, ...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
|
|
1717
|
-
this.canPreview = input(false, ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
|
|
1718
|
-
this.appearance = input(this.uiService.appearance(), ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
1719
|
-
this.accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
1720
|
-
this.id = `${this.controlType}-${FileInputComponent.nextId++}`;
|
|
1721
|
-
this.describedBy = '';
|
|
1722
|
-
this.changed = output();
|
|
1723
|
-
this.download = output();
|
|
1724
|
-
this.preview = output();
|
|
1725
|
-
this.propagateChange = (_) => { };
|
|
1682
|
+
this.propagateChange = () => { };
|
|
1726
1683
|
this.propagateTouched = () => { };
|
|
1684
|
+
this.id = `button-selector--${SystemUtils.generateUUID()}`;
|
|
1685
|
+
this.describedBy = '';
|
|
1686
|
+
this.renderer = inject(Renderer2);
|
|
1687
|
+
/** Currently selected item, kept in sync with the form control value. */
|
|
1688
|
+
this.current = signal(undefined, ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
|
|
1689
|
+
/** Width of the trigger button in pixels. Use `-1` for 100 %, `0` for `auto`. */
|
|
1690
|
+
this.width = input(-1, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
1691
|
+
/** Border thickness override. Use `-1` to inherit. */
|
|
1692
|
+
this.border = input(-1, ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
|
|
1693
|
+
/** CSS border-radius of the trigger button. Defaults to a pill shape. */
|
|
1694
|
+
this.borderRadius = input('9999px', ...(ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []));
|
|
1695
|
+
/** Placeholder label shown when nothing is selected. */
|
|
1696
|
+
this.label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1697
|
+
/** Label shown above the selected value (replaces `label` when an item is selected). */
|
|
1698
|
+
this.labelSelected = input(undefined, ...(ngDevMode ? [{ debugName: "labelSelected" }] : /* istanbul ignore next */ []));
|
|
1699
|
+
/** List of selectable options. */
|
|
1700
|
+
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
1701
|
+
/** When `true`, the first available option is pre-selected on init. */
|
|
1702
|
+
this.autoSelect = input(false, ...(ngDevMode ? [{ debugName: "autoSelect" }] : /* istanbul ignore next */ []));
|
|
1727
1703
|
if (this.ngControl != null) {
|
|
1728
1704
|
this.ngControl.valueAccessor = this;
|
|
1729
1705
|
}
|
|
1730
1706
|
}
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
*/
|
|
1737
|
-
async setupDevices() {
|
|
1738
|
-
this.canCapture.set(false);
|
|
1739
|
-
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
|
1740
|
-
try {
|
|
1741
|
-
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
|
1742
|
-
if (stream) {
|
|
1743
|
-
this.canCapture.set(true);
|
|
1744
|
-
}
|
|
1707
|
+
ngOnInit() {
|
|
1708
|
+
if (this.autoSelect()) {
|
|
1709
|
+
const options = this.options();
|
|
1710
|
+
if (options && options.length > 0 && options[0].value) {
|
|
1711
|
+
this.current.set(options[0]);
|
|
1745
1712
|
}
|
|
1746
|
-
catch { }
|
|
1747
|
-
}
|
|
1748
|
-
if (!this.placeholder || this.placeholder === 'Seleziona file') {
|
|
1749
|
-
this._placeholder.set(this.canCapture()
|
|
1750
|
-
? 'Seleziona file o acquisisci con fotocamera'
|
|
1751
|
-
: 'Seleziona file');
|
|
1752
1713
|
}
|
|
1753
1714
|
}
|
|
1754
1715
|
ngOnDestroy() {
|
|
1755
1716
|
this.stateChanges.complete();
|
|
1756
1717
|
}
|
|
1757
|
-
ngDoCheck() {
|
|
1758
|
-
this.updateInputDirtyCheck();
|
|
1759
|
-
}
|
|
1760
1718
|
/**
|
|
1761
1719
|
* Writes a new value to the component (called by the form layer).
|
|
1762
|
-
* @param value - The new
|
|
1720
|
+
* @param value - The new value to display.
|
|
1763
1721
|
*/
|
|
1764
1722
|
writeValue(value) {
|
|
1765
1723
|
this.value = value;
|
|
@@ -1778,17 +1736,9 @@ class FileInputComponent {
|
|
|
1778
1736
|
registerOnTouched(fn) {
|
|
1779
1737
|
this.propagateTouched = fn;
|
|
1780
1738
|
}
|
|
1781
|
-
/**
|
|
1782
|
-
* Sets the ARIA describedby attribute from the given element IDs.
|
|
1783
|
-
* @param ids - Array of element IDs that describe this control.
|
|
1784
|
-
*/
|
|
1785
1739
|
setDescribedByIds(ids) {
|
|
1786
1740
|
this.describedBy = ids.join(' ');
|
|
1787
1741
|
}
|
|
1788
|
-
/**
|
|
1789
|
-
* Updates the disabled state of the underlying native element.
|
|
1790
|
-
* @param isDisabled - Whether the control should be disabled.
|
|
1791
|
-
*/
|
|
1792
1742
|
setDisabledState(isDisabled) {
|
|
1793
1743
|
if (!SystemUtils.isBrowser())
|
|
1794
1744
|
return;
|
|
@@ -1797,7 +1747,6 @@ class FileInputComponent {
|
|
|
1797
1747
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
1798
1748
|
}
|
|
1799
1749
|
}
|
|
1800
|
-
/** Focuses the native input element and marks the control as touched. */
|
|
1801
1750
|
onContainerClick() {
|
|
1802
1751
|
if (!this.focused) {
|
|
1803
1752
|
if (!SystemUtils.isBrowser())
|
|
@@ -1810,549 +1759,403 @@ class FileInputComponent {
|
|
|
1810
1759
|
}
|
|
1811
1760
|
}
|
|
1812
1761
|
/**
|
|
1813
|
-
*
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
const newValue = this._value;
|
|
1817
|
-
if (this.previousNativeValue !== newValue) {
|
|
1818
|
-
this.previousNativeValue = newValue;
|
|
1819
|
-
this.stateChanges.next();
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* Handles file selection from the native input element.
|
|
1824
|
-
* @param e - The DOM change event from the file input.
|
|
1825
|
-
*/
|
|
1826
|
-
selectFile(e) {
|
|
1827
|
-
const input = e.target;
|
|
1828
|
-
if (input.files?.length) {
|
|
1829
|
-
const f = input.files[0];
|
|
1830
|
-
const fileInfo = new FileInfo();
|
|
1831
|
-
const fileSizeMb = f.size / 1048576;
|
|
1832
|
-
fileInfo.file = f;
|
|
1833
|
-
fileInfo.valid =
|
|
1834
|
-
(!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&
|
|
1835
|
-
(!this.minSizeMb() || fileSizeMb >= this.minSizeMb());
|
|
1836
|
-
this.writeValue(fileInfo);
|
|
1837
|
-
this.fileName = f.name;
|
|
1838
|
-
this.fileSize.set(Math.round(fileSizeMb));
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
/**
|
|
1842
|
-
* Checks whether a file is currently selected.
|
|
1843
|
-
* @returns `true` if a file is attached to the current value.
|
|
1844
|
-
*/
|
|
1845
|
-
hasFile() {
|
|
1846
|
-
return !!(this._value?.file);
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* Clears the currently selected file and resets the control.
|
|
1762
|
+
* Selects an option and optionally emits the `selected` output event.
|
|
1763
|
+
* @param item - The item to select.
|
|
1764
|
+
* @param notify - When `true` (default), emits the `selected` event.
|
|
1850
1765
|
*/
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
this.
|
|
1855
|
-
const fi = new FileInfo();
|
|
1856
|
-
fi.file = undefined;
|
|
1857
|
-
fi.valid = !this.required;
|
|
1858
|
-
this.writeValue(fi);
|
|
1859
|
-
this.__file.nativeElement.value = '';
|
|
1766
|
+
select(item, notify = true) {
|
|
1767
|
+
this.writeValue(item);
|
|
1768
|
+
if (notify) {
|
|
1769
|
+
this.selected.emit(item);
|
|
1860
1770
|
}
|
|
1861
1771
|
}
|
|
1862
|
-
/**
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
downloadFile() {
|
|
1866
|
-
if (!this.isNew())
|
|
1867
|
-
this.download.emit();
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
|
-
* Emits the `preview` output event if the file is not new and preview is enabled.
|
|
1871
|
-
*/
|
|
1872
|
-
previewFile() {
|
|
1873
|
-
if (!this.isNew() && this.canPreview())
|
|
1874
|
-
this.preview.emit();
|
|
1772
|
+
/** Clears the current selection and resets the control to an empty state. */
|
|
1773
|
+
reset() {
|
|
1774
|
+
this.writeValue(undefined);
|
|
1875
1775
|
}
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
1877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type:
|
|
1776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ButtonSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelSelected: { classPropertyName: "labelSelected", publicName: "labelSelected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", selected: "selected" }, host: { properties: { "id": "this.id", "attr.aria-describedBy": "this.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 }); }
|
|
1878
1778
|
}
|
|
1879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
1779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ButtonSelectorComponent, decorators: [{
|
|
1880
1780
|
type: Component,
|
|
1881
|
-
args: [{ selector: '
|
|
1882
|
-
|
|
1781
|
+
args: [{ selector: 'button-selector', standalone: true, imports: [FlexLayoutModule, MatIconModule, MatButtonModule,
|
|
1782
|
+
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
1883
1783
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1884
1784
|
type: Optional
|
|
1885
1785
|
}, {
|
|
1886
1786
|
type: Self
|
|
1887
|
-
}] }], propDecorators: {
|
|
1888
|
-
type: ViewChild,
|
|
1889
|
-
args: ['__file']
|
|
1890
|
-
}], required: [{
|
|
1891
|
-
type: Input
|
|
1892
|
-
}], disabled: [{
|
|
1893
|
-
type: Input
|
|
1894
|
-
}], placeholder: [{
|
|
1895
|
-
type: Input
|
|
1896
|
-
}], fileName: [{
|
|
1787
|
+
}] }], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], selected: [{ type: i0.Output, args: ["selected"] }], disabled: [{
|
|
1897
1788
|
type: Input
|
|
1898
|
-
}],
|
|
1789
|
+
}], id: [{
|
|
1899
1790
|
type: HostBinding
|
|
1900
|
-
}], shouldLabelFloat: [{
|
|
1901
|
-
type: HostBinding,
|
|
1902
|
-
args: ['class.floating']
|
|
1903
1791
|
}], describedBy: [{
|
|
1904
1792
|
type: HostBinding,
|
|
1905
1793
|
args: ['attr.aria-describedBy']
|
|
1906
|
-
}],
|
|
1794
|
+
}], 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 }] }] } });
|
|
1907
1795
|
|
|
1908
|
-
class
|
|
1796
|
+
class ButtonToggleComponent {
|
|
1909
1797
|
constructor() {
|
|
1910
|
-
|
|
1911
|
-
this.
|
|
1912
|
-
|
|
1913
|
-
this.
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
}
|
|
1937
|
-
else {
|
|
1938
|
-
this.url.set('https://view.officeapps.live.com/op/embed.aspx?src=' + encodeURIComponent(data.url));
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
/**
|
|
1942
|
-
* Handles the iframe load event: scrolls to the top and centers a single image when present.
|
|
1943
|
-
*/
|
|
1944
|
-
loaded() {
|
|
1945
|
-
const iframe = this.iframe()?.nativeElement;
|
|
1946
|
-
if (!iframe) {
|
|
1947
|
-
return;
|
|
1948
|
-
}
|
|
1949
|
-
try {
|
|
1950
|
-
iframe.contentWindow?.scrollTo(0, 0);
|
|
1951
|
-
// Resize and center single image
|
|
1952
|
-
if (!this.dialogData?.embed && iframe.contentDocument) {
|
|
1953
|
-
const images = iframe.contentDocument.querySelectorAll('img') || [];
|
|
1954
|
-
if (images.length === 1) {
|
|
1955
|
-
Object.assign(images[0].style, {
|
|
1956
|
-
position: 'absolute',
|
|
1957
|
-
top: '50%',
|
|
1958
|
-
left: '50%',
|
|
1959
|
-
transform: 'translate(-50%, -50%)',
|
|
1960
|
-
maxWidth: images[0].style.maxWidth || '100%',
|
|
1961
|
-
maxHeight: images[0].style.maxHeight || '100%'
|
|
1962
|
-
});
|
|
1963
|
-
const iframeBody = iframe.contentDocument.body;
|
|
1964
|
-
if (iframeBody && !iframeBody.style.height) {
|
|
1965
|
-
iframeBody.style.height = '100%';
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
catch (e) {
|
|
1971
|
-
console.error('Impossibile accedere al contenuto dell\'iframe:', e);
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
/**
|
|
1975
|
-
* Opens the current file URL in a new browser tab for manual download.
|
|
1976
|
-
*/
|
|
1977
|
-
download() {
|
|
1978
|
-
const currentUrl = this.url();
|
|
1979
|
-
if (currentUrl) {
|
|
1980
|
-
window.open(currentUrl, '_blank');
|
|
1981
|
-
}
|
|
1798
|
+
/** Emitted each time the button is clicked. Carries the current `value` and the new `toggled` state. */
|
|
1799
|
+
this.changed = output();
|
|
1800
|
+
/** Tracks whether the button has been toggled (opposite of the current `value` input). */
|
|
1801
|
+
this.toggled = signal(false, ...(ngDevMode ? [{ debugName: "toggled" }] : /* istanbul ignore next */ []));
|
|
1802
|
+
/** Current value bound from the parent. Drives label and icon selection. */
|
|
1803
|
+
this.value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1804
|
+
/** Width of the button in pixels. Use `-1` for automatic sizing. */
|
|
1805
|
+
this.width = input(-1, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
1806
|
+
/** Border thickness override in pixels. Use `-1` to inherit. */
|
|
1807
|
+
this.border = input(-1, ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
|
|
1808
|
+
/** Label shown when `value` is `true`. */
|
|
1809
|
+
this.labelOn = input(undefined, ...(ngDevMode ? [{ debugName: "labelOn" }] : /* istanbul ignore next */ []));
|
|
1810
|
+
/** Label shown when `value` is `false`. */
|
|
1811
|
+
this.labelOff = input(undefined, ...(ngDevMode ? [{ debugName: "labelOff" }] : /* istanbul ignore next */ []));
|
|
1812
|
+
/** Material icon name shown when `value` is `true`. */
|
|
1813
|
+
this.iconOn = input(undefined, ...(ngDevMode ? [{ debugName: "iconOn" }] : /* istanbul ignore next */ []));
|
|
1814
|
+
/** Material icon name shown when `value` is `false`. */
|
|
1815
|
+
this.iconOff = input(undefined, ...(ngDevMode ? [{ debugName: "iconOff" }] : /* istanbul ignore next */ []));
|
|
1816
|
+
/** CSS class applied to the button at all breakpoints. */
|
|
1817
|
+
this.cssClass = input(undefined, ...(ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []));
|
|
1818
|
+
/** CSS class applied to the button on `xs` screens. */
|
|
1819
|
+
this.cssClassSmall = input(undefined, ...(ngDevMode ? [{ debugName: "cssClassSmall" }] : /* istanbul ignore next */ []));
|
|
1820
|
+
/** Resolves the appropriate label for the current value state. */
|
|
1821
|
+
this.label = computed(() => this.value() ? this.labelOn() ?? '' : this.labelOff() ?? '', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1822
|
+
/** Resolves the appropriate icon name for the current value state. */
|
|
1823
|
+
this.icon = computed(() => this.value() ? this.iconOn() ?? '' : this.iconOff() ?? '', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1982
1824
|
}
|
|
1983
1825
|
/**
|
|
1984
|
-
*
|
|
1826
|
+
* Toggles the button state and emits the `changed` event.
|
|
1827
|
+
* The emitted `toggled` value is the logical inverse of the current `value`.
|
|
1985
1828
|
*/
|
|
1986
|
-
|
|
1987
|
-
this.
|
|
1988
|
-
|
|
1989
|
-
"<p class='small' style='padding-left:10px'><i>impostazioni > privacy e sicurezza > impostazioni sito > documenti PDF</i></p>" +
|
|
1990
|
-
"<b>Per Microsoft Chrome</b><br>" +
|
|
1991
|
-
"<p class='small' style='padding-left:10px'><i>impostazioni > cookie e autorizzazioni sito > documenti PDF</i></p>" +
|
|
1992
|
-
"<b>Per Mozilla Firefox</b><br>" +
|
|
1993
|
-
"<p class='small' style='padding-left:10px'><i>impostazioni > generale > applicazioni</i></p>" +
|
|
1994
|
-
"<b>Altri browser</b><br>" +
|
|
1995
|
-
"<p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>", "Problemi con lee anteprime dei file PDF?");
|
|
1829
|
+
toggle() {
|
|
1830
|
+
this.toggled.set(!this.value());
|
|
1831
|
+
this.changed.emit({ value: this.value(), toggled: this.toggled() });
|
|
1996
1832
|
}
|
|
1997
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
1998
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type:
|
|
1833
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1834
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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 }); }
|
|
1999
1835
|
}
|
|
2000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
1836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ButtonToggleComponent, decorators: [{
|
|
2001
1837
|
type: Component,
|
|
2002
|
-
args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2003
|
-
|
|
2004
|
-
}], ctorParameters: () => [], propDecorators: { iframe: [{ type: i0.ViewChild, args: ['iframe', { isSignal: true }] }] } });
|
|
1838
|
+
args: [{ selector: 'button-toggle', standalone: true, imports: [FlexLayoutModule, MatIconModule, MatButtonModule, SafeHtmlPipe], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
1839
|
+
}], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], labelOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOn", required: false }] }], labelOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOff", required: false }] }], iconOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOn", required: false }] }], iconOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOff", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], cssClassSmall: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClassSmall", required: false }] }] } });
|
|
2005
1840
|
|
|
2006
|
-
|
|
1841
|
+
/**
|
|
1842
|
+
* A blank calendar header that hides the month/year navigation controls.
|
|
1843
|
+
* Used when an inline calendar should render without any navigation UI.
|
|
1844
|
+
*/
|
|
1845
|
+
class CalendarEmptyHeader {
|
|
2007
1846
|
constructor() {
|
|
2008
|
-
this.
|
|
2009
|
-
this.
|
|
2010
|
-
this.
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
this.
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
this.canFilterByText2 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText2" }] : /* istanbul ignore next */ []));
|
|
2017
|
-
this.canFilterByText3 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText3" }] : /* istanbul ignore next */ []));
|
|
2018
|
-
this.initialText = input(null, ...(ngDevMode ? [{ debugName: "initialText" }] : /* istanbul ignore next */ []));
|
|
2019
|
-
this.initialText2 = input(null, ...(ngDevMode ? [{ debugName: "initialText2" }] : /* istanbul ignore next */ []));
|
|
2020
|
-
this.initialText3 = input(null, ...(ngDevMode ? [{ debugName: "initialText3" }] : /* istanbul ignore next */ []));
|
|
2021
|
-
this.textName = input("testo", ...(ngDevMode ? [{ debugName: "textName" }] : /* istanbul ignore next */ []));
|
|
2022
|
-
this.text2Name = input("...", ...(ngDevMode ? [{ debugName: "text2Name" }] : /* istanbul ignore next */ []));
|
|
2023
|
-
this.text3Name = input("...", ...(ngDevMode ? [{ debugName: "text3Name" }] : /* istanbul ignore next */ []));
|
|
2024
|
-
this.textLength = input(...(ngDevMode ? [undefined, { debugName: "textLength" }] : /* istanbul ignore next */ []));
|
|
2025
|
-
this.text2Length = input(...(ngDevMode ? [undefined, { debugName: "text2Length" }] : /* istanbul ignore next */ []));
|
|
2026
|
-
this.text3Length = input(...(ngDevMode ? [undefined, { debugName: "text3Length" }] : /* istanbul ignore next */ []));
|
|
2027
|
-
this.showTextSearchButton = input(false, ...(ngDevMode ? [{ debugName: "showTextSearchButton" }] : /* istanbul ignore next */ []));
|
|
2028
|
-
this.appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2029
|
-
this.currentFilter = new CurrentFilter();
|
|
2030
|
-
effect(() => {
|
|
2031
|
-
this.text = this.initialText();
|
|
2032
|
-
this.text2 = this.initialText2();
|
|
2033
|
-
this.text3 = this.initialText3();
|
|
2034
|
-
});
|
|
2035
|
-
effect(() => {
|
|
2036
|
-
this.initializeFilters();
|
|
2037
|
-
});
|
|
2038
|
-
}
|
|
2039
|
-
/** Reads the `filters` input and populates the filter group fields and capability signals. */
|
|
2040
|
-
initializeFilters() {
|
|
2041
|
-
if (!this.filters())
|
|
2042
|
-
return;
|
|
2043
|
-
this.filters()?.forEach((n) => {
|
|
2044
|
-
switch (n.group) {
|
|
2045
|
-
case Filters.FLT_1:
|
|
2046
|
-
this.flt1 = n;
|
|
2047
|
-
this.canFilterByFlt1.set(n.action || (n.items && n.items.length > 0));
|
|
2048
|
-
break;
|
|
2049
|
-
case Filters.FLT_2:
|
|
2050
|
-
this.flt2 = n;
|
|
2051
|
-
this.canFilterByFlt2.set(n.action || (n.items && n.items.length > 0));
|
|
2052
|
-
break;
|
|
2053
|
-
case Filters.FLT_3:
|
|
2054
|
-
this.flt3 = n;
|
|
2055
|
-
this.canFilterByFlt3.set(n.action || (n.items && n.items.length > 0));
|
|
2056
|
-
break;
|
|
2057
|
-
case Filters.FLT_4:
|
|
2058
|
-
this.flt4 = n;
|
|
2059
|
-
this.canFilterByFlt4.set(n.action || (n.items && n.items.length > 0));
|
|
2060
|
-
break;
|
|
2061
|
-
case Filters.FLT_5:
|
|
2062
|
-
this.flt5 = n;
|
|
2063
|
-
this.canFilterByFlt5.set(n.action || (n.items && n.items.length > 0));
|
|
2064
|
-
break;
|
|
2065
|
-
}
|
|
2066
|
-
});
|
|
1847
|
+
this.destroyRef = inject(DestroyRef);
|
|
1848
|
+
this.calendar = inject((MatCalendar));
|
|
1849
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
1850
|
+
// Re-run change detection whenever the calendar's internal state changes
|
|
1851
|
+
// (e.g. active date, selected date) so the blank header stays in sync.
|
|
1852
|
+
this.calendar.stateChanges
|
|
1853
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1854
|
+
.subscribe(() => this.changeDetector.markForCheck());
|
|
2067
1855
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
case Filters.FLT_3:
|
|
2090
|
-
changed = this.currentFilter.flt3 !== filter.value;
|
|
2091
|
-
if (changed) {
|
|
2092
|
-
this.currentFilter.flt3 = filter.value;
|
|
2093
|
-
this.currentFilter.flt3Name = filter.titleSelected;
|
|
2094
|
-
}
|
|
2095
|
-
break;
|
|
2096
|
-
case Filters.FLT_4:
|
|
2097
|
-
changed = this.currentFilter.flt4 !== filter.value;
|
|
2098
|
-
if (changed) {
|
|
2099
|
-
this.currentFilter.flt4 = filter.value;
|
|
2100
|
-
this.currentFilter.flt4Name = filter.titleSelected;
|
|
2101
|
-
}
|
|
2102
|
-
break;
|
|
2103
|
-
case Filters.FLT_5:
|
|
2104
|
-
changed = this.currentFilter.flt5 !== filter.value;
|
|
2105
|
-
if (changed) {
|
|
2106
|
-
this.currentFilter.flt5 = filter.value;
|
|
2107
|
-
this.currentFilter.flt5Name = filter.titleSelected;
|
|
1856
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CalendarEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1857
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", type: CalendarEmptyHeader, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1858
|
+
}
|
|
1859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CalendarEmptyHeader, decorators: [{
|
|
1860
|
+
type: Component,
|
|
1861
|
+
args: [{
|
|
1862
|
+
template: '<div></div>',
|
|
1863
|
+
standalone: true,
|
|
1864
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1865
|
+
}]
|
|
1866
|
+
}], ctorParameters: () => [] });
|
|
1867
|
+
|
|
1868
|
+
class ChipsSelectorComponent {
|
|
1869
|
+
set value(value) {
|
|
1870
|
+
this._value = value;
|
|
1871
|
+
this.selection = [];
|
|
1872
|
+
this.singleSelection = undefined;
|
|
1873
|
+
if (this._value) {
|
|
1874
|
+
this.options().forEach(n => {
|
|
1875
|
+
if (this._value?.findIndex((x) => x.value === n.value) !== -1) {
|
|
1876
|
+
this.selection.push(n);
|
|
2108
1877
|
}
|
|
2109
|
-
|
|
1878
|
+
});
|
|
1879
|
+
if (this.selection.length > 0) {
|
|
1880
|
+
this.singleSelection = this.selection[0];
|
|
1881
|
+
}
|
|
2110
1882
|
}
|
|
2111
|
-
|
|
2112
|
-
|
|
1883
|
+
this.propagateChange(this._value);
|
|
1884
|
+
this.stateChanges.next();
|
|
1885
|
+
if (this.changesEnabled) {
|
|
1886
|
+
this.changed.emit(this._value);
|
|
2113
1887
|
}
|
|
2114
1888
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
1889
|
+
get value() {
|
|
1890
|
+
return this._value;
|
|
1891
|
+
}
|
|
1892
|
+
get empty() {
|
|
1893
|
+
return !this._value || this._value?.length === 0;
|
|
1894
|
+
}
|
|
1895
|
+
get errorState() {
|
|
1896
|
+
return this.ngControl.errors != null && this.ngControl.touched;
|
|
1897
|
+
}
|
|
1898
|
+
get required() {
|
|
1899
|
+
return this._required;
|
|
1900
|
+
}
|
|
1901
|
+
set required(value) {
|
|
1902
|
+
this._required = coerceBooleanProperty(value);
|
|
1903
|
+
this.stateChanges.next();
|
|
1904
|
+
}
|
|
1905
|
+
get disabled() {
|
|
1906
|
+
if (this.ngControl && this.ngControl.disabled != null) {
|
|
1907
|
+
return this.ngControl.disabled;
|
|
2126
1908
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
1909
|
+
return this._disabled;
|
|
1910
|
+
}
|
|
1911
|
+
set disabled(value) {
|
|
1912
|
+
this._disabled = coerceBooleanProperty(value);
|
|
1913
|
+
if (this.focused) {
|
|
1914
|
+
this.focused = false;
|
|
1915
|
+
this.stateChanges.next();
|
|
2129
1916
|
}
|
|
2130
1917
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
this.currentFilter.text = this.text;
|
|
2134
|
-
this.currentFilter.text2 = this.text2;
|
|
2135
|
-
this.currentFilter.text3 = this.text3;
|
|
2136
|
-
this.changed.emit({
|
|
2137
|
-
filter: this.currentFilter,
|
|
2138
|
-
group: Filters.FLT_TEXT
|
|
2139
|
-
});
|
|
1918
|
+
get placeholder() {
|
|
1919
|
+
return this._placeholder;
|
|
2140
1920
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
1921
|
+
set placeholder(value) {
|
|
1922
|
+
this._placeholder = value;
|
|
1923
|
+
this.stateChanges.next();
|
|
1924
|
+
}
|
|
1925
|
+
get shouldLabelFloat() {
|
|
1926
|
+
return this.focused || !this.empty;
|
|
1927
|
+
}
|
|
1928
|
+
constructor(ngControl) {
|
|
1929
|
+
this.ngControl = ngControl;
|
|
1930
|
+
/** Emitted when the selection changes. Carries the new array of selected items, or `undefined` when cleared. */
|
|
1931
|
+
this.changed = output();
|
|
1932
|
+
this.containerId = `chips-selector-container--${SystemUtils.generateUUID()}`;
|
|
1933
|
+
this.containerWidth = signal(-6, ...(ngDevMode ? [{ debugName: "containerWidth" }] : /* istanbul ignore next */ []));
|
|
1934
|
+
this.focused = false;
|
|
1935
|
+
this.stateChanges = new Subject();
|
|
1936
|
+
this.destroyRef = inject(DestroyRef);
|
|
1937
|
+
this.changesEnabled = false;
|
|
1938
|
+
/** List of available options to display as chips. */
|
|
1939
|
+
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
1940
|
+
/** Minimum width in pixels when collapsed. Use `-1` for automatic. */
|
|
1941
|
+
this.collapsedWidth = input(-1, ...(ngDevMode ? [{ debugName: "collapsedWidth" }] : /* istanbul ignore next */ []));
|
|
1942
|
+
/** Display mode used when the selector is in collapsed state. */
|
|
1943
|
+
this.collapsedDisplayMode = input('dropdown', ...(ngDevMode ? [{ debugName: "collapsedDisplayMode" }] : /* istanbul ignore next */ []));
|
|
1944
|
+
/** Pixel threshold below which the selector collapses. Use `-1` to disable. */
|
|
1945
|
+
this.collapseAt = input(-1, ...(ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []));
|
|
1946
|
+
/** When `true`, `collapseAt` is compared against the container width rather than the window width. */
|
|
1947
|
+
this.collapseAtContainer = input(false, ...(ngDevMode ? [{ debugName: "collapseAtContainer" }] : /* istanbul ignore next */ []));
|
|
1948
|
+
this.collapsed = computed(() => {
|
|
1949
|
+
const cw = this.containerWidth();
|
|
1950
|
+
const mw = this.collapseAt();
|
|
1951
|
+
return this.mode() === 'collapsed' || (mw !== -1 && cw > 0 && mw > 0 && cw < mw);
|
|
1952
|
+
}, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
1953
|
+
/** Label shown in the dropdown / above the chip list. */
|
|
1954
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1955
|
+
/** When `true`, multiple chips can be selected simultaneously. */
|
|
1956
|
+
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
1957
|
+
/** When `true`, at least one item must remain selected. */
|
|
1958
|
+
this.mustSelect = input(false, ...(ngDevMode ? [{ debugName: "mustSelect" }] : /* istanbul ignore next */ []));
|
|
1959
|
+
/** Layout mode: `'collapsed'` forces dropdown mode, `'dynamic'` collapses based on `collapseAt`. */
|
|
1960
|
+
this.mode = input('dynamic', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
1961
|
+
/** When `true`, chips are stacked vertically instead of wrapping horizontally. */
|
|
1962
|
+
this.stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
|
|
1963
|
+
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
1964
|
+
this.padAt = input(0, ...(ngDevMode ? [{ debugName: "padAt" }] : /* istanbul ignore next */ []));
|
|
1965
|
+
this._value = [];
|
|
1966
|
+
this._required = false;
|
|
1967
|
+
this._disabled = false;
|
|
1968
|
+
this._placeholder = '';
|
|
1969
|
+
this.propagateChange = () => { };
|
|
1970
|
+
this.propagateTouched = () => { };
|
|
1971
|
+
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
1972
|
+
this.describedBy = '';
|
|
1973
|
+
this.renderer = inject(Renderer2);
|
|
1974
|
+
/** Currently selected items (may contain multiple entries when `multiple` is `true`). */
|
|
1975
|
+
this.selection = [];
|
|
1976
|
+
if (this.ngControl != null) {
|
|
1977
|
+
this.ngControl.valueAccessor = this;
|
|
2186
1978
|
}
|
|
2187
1979
|
}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
this.
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
1980
|
+
ngOnInit() {
|
|
1981
|
+
// React to window size change
|
|
1982
|
+
fromEvent(window, 'resize')
|
|
1983
|
+
.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(250))
|
|
1984
|
+
.subscribe(() => {
|
|
1985
|
+
if (this.collapseAt() > 0) {
|
|
1986
|
+
// Close the options menu if open
|
|
1987
|
+
this.updateContainerWidth();
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
ngOnDestroy() {
|
|
1992
|
+
this.stateChanges.complete();
|
|
1993
|
+
}
|
|
1994
|
+
ngAfterContentInit() {
|
|
1995
|
+
setTimeout(() => {
|
|
1996
|
+
this.updateContainerWidth();
|
|
1997
|
+
this.changesEnabled = true;
|
|
1998
|
+
}, 250);
|
|
2207
1999
|
}
|
|
2208
2000
|
/**
|
|
2209
|
-
*
|
|
2001
|
+
* Measures the container (or window) width and updates the `containerWidth` signal,
|
|
2002
|
+
* retrying after 100 ms if the element is not yet laid out.
|
|
2210
2003
|
*/
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
if (
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
if (this.canFilterByFlt2())
|
|
2222
|
-
count++;
|
|
2223
|
-
if (this.canFilterByFlt3())
|
|
2224
|
-
count++;
|
|
2225
|
-
if (this.canFilterByFlt4())
|
|
2226
|
-
count++;
|
|
2227
|
-
if (this.canFilterByFlt5())
|
|
2228
|
-
count++;
|
|
2229
|
-
return count > 1;
|
|
2004
|
+
updateContainerWidth() {
|
|
2005
|
+
const elem = document.getElementById(this.containerId);
|
|
2006
|
+
if (elem && elem.clientWidth > 0) {
|
|
2007
|
+
this.containerWidth.set(this.collapseAtContainer()
|
|
2008
|
+
? (elem?.clientWidth ?? -1)
|
|
2009
|
+
: (window.innerWidth ?? -1));
|
|
2010
|
+
}
|
|
2011
|
+
else {
|
|
2012
|
+
setTimeout(() => this.updateContainerWidth(), 100);
|
|
2013
|
+
}
|
|
2230
2014
|
}
|
|
2231
2015
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2016
|
+
* Resolves the effective selection array for the current display mode.
|
|
2017
|
+
* In single-select collapsed button mode the `singleSelection` item is wrapped in an array.
|
|
2018
|
+
* @returns The array of currently selected items.
|
|
2234
2019
|
*/
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
if (g) {
|
|
2242
|
-
if (g.items) {
|
|
2243
|
-
this.currentFilter.flt1Name = undefined;
|
|
2244
|
-
if (this.currentFilter.flt1) {
|
|
2245
|
-
const gi = g.items.find(n => n.value === this.currentFilter.flt1);
|
|
2246
|
-
if (gi)
|
|
2247
|
-
this.currentFilter.flt1Name = gi.titleSelected;
|
|
2248
|
-
else
|
|
2249
|
-
this.currentFilter.flt1 = undefined;
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
g = this.getFilterGroup(Filters.FLT_2);
|
|
2254
|
-
if (g) {
|
|
2255
|
-
if (g.items) {
|
|
2256
|
-
this.currentFilter.flt2Name = undefined;
|
|
2257
|
-
if (this.currentFilter.flt2) {
|
|
2258
|
-
const gi = g.items.find(n => n.value === this.currentFilter.flt2);
|
|
2259
|
-
if (gi)
|
|
2260
|
-
this.currentFilter.flt2Name = gi.titleSelected;
|
|
2261
|
-
else
|
|
2262
|
-
this.currentFilter.flt2 = undefined;
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2020
|
+
getSelection() {
|
|
2021
|
+
const value = !this.multiple() && this.collapsed() && this.collapsedDisplayMode() === 'button'
|
|
2022
|
+
? this.singleSelection
|
|
2023
|
+
: this.selection ?? [];
|
|
2024
|
+
if (Array.isArray(value)) {
|
|
2025
|
+
return value;
|
|
2265
2026
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2027
|
+
return value ? [value] : [];
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* Schedules a value update after a short delay, giving the template time to sync `ngModel`.
|
|
2031
|
+
*/
|
|
2032
|
+
updateValue() {
|
|
2033
|
+
setTimeout(() => {
|
|
2034
|
+
this.writeValue(this.getSelection());
|
|
2035
|
+
}, 250);
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Returns `true` when the given item can be selected in the current mode.
|
|
2039
|
+
* In single-select mode an already-selected item is not re-selectable.
|
|
2040
|
+
* @param item - The item to check.
|
|
2041
|
+
*/
|
|
2042
|
+
isSelectable(item) {
|
|
2043
|
+
return this.multiple() || this.getSelection().findIndex(x => x.value === item.value) === -1;
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Writes a new value to the component (called by the form layer).
|
|
2047
|
+
* @param value - The new selection to display.
|
|
2048
|
+
*/
|
|
2049
|
+
writeValue(value) {
|
|
2050
|
+
const next = value;
|
|
2051
|
+
if (this.value !== next) {
|
|
2052
|
+
this.value = next;
|
|
2278
2053
|
}
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Registers the on-change callback (called by the form layer).
|
|
2057
|
+
* @param fn - Callback to invoke whenever the value changes.
|
|
2058
|
+
*/
|
|
2059
|
+
registerOnChange(fn) {
|
|
2060
|
+
this.propagateChange = fn;
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Registers the on-touched callback (called by the form layer).
|
|
2064
|
+
* @param fn - Callback to invoke when the control is touched.
|
|
2065
|
+
*/
|
|
2066
|
+
registerOnTouched(fn) {
|
|
2067
|
+
this.propagateTouched = fn;
|
|
2068
|
+
}
|
|
2069
|
+
setDescribedByIds(ids) {
|
|
2070
|
+
this.describedBy = ids.join(' ');
|
|
2071
|
+
}
|
|
2072
|
+
setDisabledState(isDisabled) {
|
|
2073
|
+
if (!SystemUtils.isBrowser())
|
|
2074
|
+
return;
|
|
2075
|
+
const elem = document.getElementById(this.id);
|
|
2076
|
+
if (elem) {
|
|
2077
|
+
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
2291
2078
|
}
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
this.currentFilter.flt5 = undefined;
|
|
2302
|
-
}
|
|
2079
|
+
}
|
|
2080
|
+
onContainerClick() {
|
|
2081
|
+
if (!this.focused) {
|
|
2082
|
+
if (!SystemUtils.isBrowser())
|
|
2083
|
+
return;
|
|
2084
|
+
const elem = document.getElementById(this.id);
|
|
2085
|
+
if (elem) {
|
|
2086
|
+
elem.focus();
|
|
2087
|
+
this.propagateTouched();
|
|
2303
2088
|
}
|
|
2304
2089
|
}
|
|
2305
|
-
this.text = this.currentFilter.text;
|
|
2306
|
-
this.text2 = this.currentFilter.text2;
|
|
2307
|
-
this.text3 = this.currentFilter.text3;
|
|
2308
2090
|
}
|
|
2309
|
-
|
|
2310
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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-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 }); }
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
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-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"] }]
|
|
2316
|
-
}], 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 }] }] } });
|
|
2317
|
-
|
|
2318
|
-
/**
|
|
2319
|
-
* A blank calendar header that hides the month/year navigation controls.
|
|
2320
|
-
* Used when an inline calendar should render without any navigation UI.
|
|
2321
|
-
*/
|
|
2322
|
-
class CalendarEmptyHeader {
|
|
2323
|
-
constructor() {
|
|
2324
|
-
this.destroyRef = inject(DestroyRef);
|
|
2325
|
-
this.calendar = inject((MatCalendar));
|
|
2326
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
2327
|
-
// Re-run change detection whenever the calendar's internal state changes
|
|
2328
|
-
// (e.g. active date, selected date) so the blank header stays in sync.
|
|
2329
|
-
this.calendar.stateChanges
|
|
2330
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2331
|
-
.subscribe(() => this.changeDetector.markForCheck());
|
|
2091
|
+
/**
|
|
2092
|
+
* Clears the current selection and stops the event from bubbling.
|
|
2093
|
+
* @param e - The originating click event.
|
|
2094
|
+
*/
|
|
2095
|
+
clear(e) {
|
|
2096
|
+
this.writeValue([]);
|
|
2097
|
+
e.stopPropagation();
|
|
2332
2098
|
}
|
|
2333
|
-
|
|
2334
|
-
|
|
2099
|
+
/**
|
|
2100
|
+
* Selects a single item, replacing any existing selection.
|
|
2101
|
+
* @param item - The item to select. Does nothing when `undefined`.
|
|
2102
|
+
*/
|
|
2103
|
+
select(item) {
|
|
2104
|
+
if (item) {
|
|
2105
|
+
this.writeValue([item]);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ChipsSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedBy": "this.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 }); }
|
|
2335
2110
|
}
|
|
2336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
2111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ChipsSelectorComponent, decorators: [{
|
|
2337
2112
|
type: Component,
|
|
2338
|
-
args: [{
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2342
|
-
|
|
2343
|
-
|
|
2113
|
+
args: [{ selector: 'chips-selector', standalone: true, imports: [FlexLayoutModule, FormsModule, MatFormFieldModule, MatSelectModule,
|
|
2114
|
+
MatChipsModule, MatIconModule, MatButtonModule, MatBadgeModule, MatTooltipModule,
|
|
2115
|
+
ButtonSelectorComponent
|
|
2116
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2117
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2118
|
+
type: Optional
|
|
2119
|
+
}, {
|
|
2120
|
+
type: Self
|
|
2121
|
+
}] }], 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: [{
|
|
2122
|
+
type: Input
|
|
2123
|
+
}], disabled: [{
|
|
2124
|
+
type: Input
|
|
2125
|
+
}], placeholder: [{
|
|
2126
|
+
type: Input
|
|
2127
|
+
}], id: [{
|
|
2128
|
+
type: HostBinding
|
|
2129
|
+
}], shouldLabelFloat: [{
|
|
2130
|
+
type: HostBinding,
|
|
2131
|
+
args: ['class.floating']
|
|
2132
|
+
}], describedBy: [{
|
|
2133
|
+
type: HostBinding,
|
|
2134
|
+
args: ['attr.aria-describedBy']
|
|
2135
|
+
}] } });
|
|
2344
2136
|
|
|
2345
|
-
class
|
|
2137
|
+
class FileInputComponent {
|
|
2138
|
+
// Initialize
|
|
2139
|
+
static { this.nextId = 0; }
|
|
2346
2140
|
set value(value) {
|
|
2347
2141
|
this._value = value;
|
|
2348
2142
|
this.propagateChange(this._value);
|
|
2349
2143
|
this.stateChanges.next();
|
|
2350
2144
|
this.changed.emit(this._value);
|
|
2351
|
-
this.current.set(this._value);
|
|
2352
2145
|
}
|
|
2353
2146
|
get value() {
|
|
2354
2147
|
return this._value;
|
|
2355
2148
|
}
|
|
2149
|
+
get size() {
|
|
2150
|
+
return this._value?.file?.size;
|
|
2151
|
+
}
|
|
2152
|
+
get required() {
|
|
2153
|
+
return this._required;
|
|
2154
|
+
}
|
|
2155
|
+
set required(value) {
|
|
2156
|
+
this._required = coerceBooleanProperty(value);
|
|
2157
|
+
this.stateChanges.next();
|
|
2158
|
+
}
|
|
2356
2159
|
get disabled() {
|
|
2357
2160
|
if (this.ngControl && this.ngControl.disabled != null) {
|
|
2358
2161
|
return this.ngControl.disabled;
|
|
@@ -2366,55 +2169,86 @@ class ButtonSelectorComponent {
|
|
|
2366
2169
|
this.stateChanges.next();
|
|
2367
2170
|
}
|
|
2368
2171
|
}
|
|
2172
|
+
get placeholder() {
|
|
2173
|
+
return this._placeholder();
|
|
2174
|
+
}
|
|
2175
|
+
set placeholder(value) {
|
|
2176
|
+
this._placeholder.set(value);
|
|
2177
|
+
this.stateChanges.next();
|
|
2178
|
+
}
|
|
2179
|
+
get empty() {
|
|
2180
|
+
return !this._value || !this._value.file;
|
|
2181
|
+
}
|
|
2182
|
+
get errorState() {
|
|
2183
|
+
return this.ngControl.errors != null && this.ngControl.touched;
|
|
2184
|
+
}
|
|
2185
|
+
get shouldLabelFloat() {
|
|
2186
|
+
return this.focused || !this.empty;
|
|
2187
|
+
}
|
|
2369
2188
|
constructor(ngControl) {
|
|
2370
2189
|
this.ngControl = ngControl;
|
|
2371
|
-
|
|
2372
|
-
this.
|
|
2373
|
-
/** Emitted when the user explicitly picks an item from the menu. */
|
|
2374
|
-
this.selected = output();
|
|
2190
|
+
this.renderer = inject(Renderer2);
|
|
2191
|
+
this.uiService = inject(UIService);
|
|
2375
2192
|
this.stateChanges = new Subject();
|
|
2193
|
+
this.controlType = 'file-input';
|
|
2376
2194
|
this.focused = false;
|
|
2377
|
-
|
|
2195
|
+
/** Whether the device supports camera capture. */
|
|
2196
|
+
this.canCapture = signal(false, ...(ngDevMode ? [{ debugName: "canCapture" }] : /* istanbul ignore next */ []));
|
|
2197
|
+
/** Size in MB of the currently selected file. */
|
|
2198
|
+
this.fileSize = signal(0, ...(ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []));
|
|
2199
|
+
this._placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
|
|
2200
|
+
this._value = new FileInfo();
|
|
2201
|
+
this._required = false;
|
|
2378
2202
|
this._disabled = false;
|
|
2379
|
-
this.
|
|
2380
|
-
this.
|
|
2381
|
-
this.
|
|
2203
|
+
this.maxSizeMb = input(5, ...(ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []));
|
|
2204
|
+
this.minSizeMb = input(0, ...(ngDevMode ? [{ debugName: "minSizeMb" }] : /* istanbul ignore next */ []));
|
|
2205
|
+
this.isNew = input(false, ...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
|
|
2206
|
+
this.canPreview = input(false, ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
|
|
2207
|
+
this.appearance = input(this.uiService.appearance(), ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2208
|
+
this.accept = input(...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
2209
|
+
this.id = `${this.controlType}-${FileInputComponent.nextId++}`;
|
|
2382
2210
|
this.describedBy = '';
|
|
2383
|
-
this.
|
|
2384
|
-
|
|
2385
|
-
this.
|
|
2386
|
-
|
|
2387
|
-
this.
|
|
2388
|
-
/** Border thickness override. Use `-1` to inherit. */
|
|
2389
|
-
this.border = input(-1, ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
|
|
2390
|
-
/** CSS border-radius of the trigger button. Defaults to a pill shape. */
|
|
2391
|
-
this.borderRadius = input('9999px', ...(ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []));
|
|
2392
|
-
/** Placeholder label shown when nothing is selected. */
|
|
2393
|
-
this.label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2394
|
-
/** Label shown above the selected value (replaces `label` when an item is selected). */
|
|
2395
|
-
this.labelSelected = input(undefined, ...(ngDevMode ? [{ debugName: "labelSelected" }] : /* istanbul ignore next */ []));
|
|
2396
|
-
/** List of selectable options. */
|
|
2397
|
-
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2398
|
-
/** When `true`, the first available option is pre-selected on init. */
|
|
2399
|
-
this.autoSelect = input(false, ...(ngDevMode ? [{ debugName: "autoSelect" }] : /* istanbul ignore next */ []));
|
|
2211
|
+
this.changed = output();
|
|
2212
|
+
this.download = output();
|
|
2213
|
+
this.preview = output();
|
|
2214
|
+
this.propagateChange = (_) => { };
|
|
2215
|
+
this.propagateTouched = () => { };
|
|
2400
2216
|
if (this.ngControl != null) {
|
|
2401
2217
|
this.ngControl.valueAccessor = this;
|
|
2402
2218
|
}
|
|
2403
2219
|
}
|
|
2404
|
-
ngOnInit() {
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2220
|
+
async ngOnInit() {
|
|
2221
|
+
await this.setupDevices();
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* Detects camera availability and updates the placeholder accordingly.
|
|
2225
|
+
*/
|
|
2226
|
+
async setupDevices() {
|
|
2227
|
+
this.canCapture.set(false);
|
|
2228
|
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
|
2229
|
+
try {
|
|
2230
|
+
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
|
2231
|
+
if (stream) {
|
|
2232
|
+
this.canCapture.set(true);
|
|
2233
|
+
}
|
|
2409
2234
|
}
|
|
2235
|
+
catch { }
|
|
2236
|
+
}
|
|
2237
|
+
if (!this.placeholder || this.placeholder === 'Seleziona file') {
|
|
2238
|
+
this._placeholder.set(this.canCapture()
|
|
2239
|
+
? 'Seleziona file o acquisisci con fotocamera'
|
|
2240
|
+
: 'Seleziona file');
|
|
2410
2241
|
}
|
|
2411
2242
|
}
|
|
2412
2243
|
ngOnDestroy() {
|
|
2413
2244
|
this.stateChanges.complete();
|
|
2414
2245
|
}
|
|
2246
|
+
ngDoCheck() {
|
|
2247
|
+
this.updateInputDirtyCheck();
|
|
2248
|
+
}
|
|
2415
2249
|
/**
|
|
2416
2250
|
* Writes a new value to the component (called by the form layer).
|
|
2417
|
-
* @param value - The new
|
|
2251
|
+
* @param value - The new file info to display.
|
|
2418
2252
|
*/
|
|
2419
2253
|
writeValue(value) {
|
|
2420
2254
|
this.value = value;
|
|
@@ -2433,9 +2267,17 @@ class ButtonSelectorComponent {
|
|
|
2433
2267
|
registerOnTouched(fn) {
|
|
2434
2268
|
this.propagateTouched = fn;
|
|
2435
2269
|
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Sets the ARIA describedby attribute from the given element IDs.
|
|
2272
|
+
* @param ids - Array of element IDs that describe this control.
|
|
2273
|
+
*/
|
|
2436
2274
|
setDescribedByIds(ids) {
|
|
2437
2275
|
this.describedBy = ids.join(' ');
|
|
2438
2276
|
}
|
|
2277
|
+
/**
|
|
2278
|
+
* Updates the disabled state of the underlying native element.
|
|
2279
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
2280
|
+
*/
|
|
2439
2281
|
setDisabledState(isDisabled) {
|
|
2440
2282
|
if (!SystemUtils.isBrowser())
|
|
2441
2283
|
return;
|
|
@@ -2444,6 +2286,7 @@ class ButtonSelectorComponent {
|
|
|
2444
2286
|
this.renderer.setProperty(elem, 'disabled', isDisabled);
|
|
2445
2287
|
}
|
|
2446
2288
|
}
|
|
2289
|
+
/** Focuses the native input element and marks the control as touched. */
|
|
2447
2290
|
onContainerClick() {
|
|
2448
2291
|
if (!this.focused) {
|
|
2449
2292
|
if (!SystemUtils.isBrowser())
|
|
@@ -2456,353 +2299,510 @@ class ButtonSelectorComponent {
|
|
|
2456
2299
|
}
|
|
2457
2300
|
}
|
|
2458
2301
|
/**
|
|
2459
|
-
*
|
|
2460
|
-
* @param item - The item to select.
|
|
2461
|
-
* @param notify - When `true` (default), emits the `selected` event.
|
|
2302
|
+
* Checks whether the value has changed since the last dirty check and emits `stateChanges` if needed.
|
|
2462
2303
|
*/
|
|
2463
|
-
|
|
2464
|
-
this.
|
|
2465
|
-
if (
|
|
2466
|
-
this.
|
|
2304
|
+
updateInputDirtyCheck() {
|
|
2305
|
+
const newValue = this._value;
|
|
2306
|
+
if (this.previousNativeValue !== newValue) {
|
|
2307
|
+
this.previousNativeValue = newValue;
|
|
2308
|
+
this.stateChanges.next();
|
|
2467
2309
|
}
|
|
2468
2310
|
}
|
|
2469
|
-
/**
|
|
2470
|
-
|
|
2471
|
-
|
|
2311
|
+
/**
|
|
2312
|
+
* Handles file selection from the native input element.
|
|
2313
|
+
* @param e - The DOM change event from the file input.
|
|
2314
|
+
*/
|
|
2315
|
+
selectFile(e) {
|
|
2316
|
+
const input = e.target;
|
|
2317
|
+
if (input.files?.length) {
|
|
2318
|
+
const f = input.files[0];
|
|
2319
|
+
const fileInfo = new FileInfo();
|
|
2320
|
+
const fileSizeMb = f.size / 1048576;
|
|
2321
|
+
fileInfo.file = f;
|
|
2322
|
+
fileInfo.valid =
|
|
2323
|
+
(!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) &&
|
|
2324
|
+
(!this.minSizeMb() || fileSizeMb >= this.minSizeMb());
|
|
2325
|
+
this.writeValue(fileInfo);
|
|
2326
|
+
this.fileName = f.name;
|
|
2327
|
+
this.fileSize.set(Math.round(fileSizeMb));
|
|
2328
|
+
}
|
|
2472
2329
|
}
|
|
2473
|
-
|
|
2474
|
-
|
|
2330
|
+
/**
|
|
2331
|
+
* Checks whether a file is currently selected.
|
|
2332
|
+
* @returns `true` if a file is attached to the current value.
|
|
2333
|
+
*/
|
|
2334
|
+
hasFile() {
|
|
2335
|
+
return !!(this._value?.file);
|
|
2336
|
+
}
|
|
2337
|
+
/**
|
|
2338
|
+
* Clears the currently selected file and resets the control.
|
|
2339
|
+
*/
|
|
2340
|
+
clearFile() {
|
|
2341
|
+
if (this.hasFile()) {
|
|
2342
|
+
this.fileName = undefined;
|
|
2343
|
+
this.fileSize.set(0);
|
|
2344
|
+
const fi = new FileInfo();
|
|
2345
|
+
fi.file = undefined;
|
|
2346
|
+
fi.valid = !this.required;
|
|
2347
|
+
this.writeValue(fi);
|
|
2348
|
+
this.__file.nativeElement.value = '';
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
/**
|
|
2352
|
+
* Emits the `download` output event if the file is not newly added.
|
|
2353
|
+
*/
|
|
2354
|
+
downloadFile() {
|
|
2355
|
+
if (!this.isNew())
|
|
2356
|
+
this.download.emit();
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* Emits the `preview` output event if the file is not new and preview is enabled.
|
|
2360
|
+
*/
|
|
2361
|
+
previewFile() {
|
|
2362
|
+
if (!this.isNew() && this.canPreview())
|
|
2363
|
+
this.preview.emit();
|
|
2364
|
+
}
|
|
2365
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FileInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2366
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: FileInputComponent, isStandalone: true, selector: "file-input", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: false, 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 } }, outputs: { changed: "changed", download: "download", preview: "preview" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedBy": "this.describedBy" } }, providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }], viewQueries: [{ propertyName: "__file", first: true, predicate: ["__file"], descendants: 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\" [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 }); }
|
|
2475
2367
|
}
|
|
2476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
2477
2369
|
type: Component,
|
|
2478
|
-
args: [{ selector: '
|
|
2479
|
-
|
|
2370
|
+
args: [{ selector: 'file-input', providers: [{ provide: MatFormFieldControl, useExisting: FileInputComponent }], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormFieldModule, MatInputModule, FormsModule, FileSizeValidatorDirective, MatButtonModule,
|
|
2371
|
+
MatIconModule, MatTooltipModule], 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\" [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>" }]
|
|
2480
2372
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2481
2373
|
type: Optional
|
|
2482
2374
|
}, {
|
|
2483
2375
|
type: Self
|
|
2484
|
-
}] }], propDecorators: {
|
|
2376
|
+
}] }], propDecorators: { __file: [{
|
|
2377
|
+
type: ViewChild,
|
|
2378
|
+
args: ['__file']
|
|
2379
|
+
}], required: [{
|
|
2485
2380
|
type: Input
|
|
2486
|
-
}],
|
|
2381
|
+
}], disabled: [{
|
|
2382
|
+
type: Input
|
|
2383
|
+
}], placeholder: [{
|
|
2384
|
+
type: Input
|
|
2385
|
+
}], fileName: [{
|
|
2386
|
+
type: Input
|
|
2387
|
+
}], 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: [{
|
|
2487
2388
|
type: HostBinding
|
|
2389
|
+
}], shouldLabelFloat: [{
|
|
2390
|
+
type: HostBinding,
|
|
2391
|
+
args: ['class.floating']
|
|
2488
2392
|
}], describedBy: [{
|
|
2489
2393
|
type: HostBinding,
|
|
2490
2394
|
args: ['attr.aria-describedBy']
|
|
2491
|
-
}],
|
|
2395
|
+
}], changed: [{ type: i0.Output, args: ["changed"] }], download: [{ type: i0.Output, args: ["download"] }], preview: [{ type: i0.Output, args: ["preview"] }] } });
|
|
2492
2396
|
|
|
2493
|
-
class
|
|
2494
|
-
|
|
2495
|
-
this.
|
|
2496
|
-
this.
|
|
2497
|
-
this.
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2397
|
+
class FilePreviewComponent {
|
|
2398
|
+
constructor() {
|
|
2399
|
+
this.iframe = viewChild('iframe', ...(ngDevMode ? [{ debugName: "iframe" }] : /* istanbul ignore next */ []));
|
|
2400
|
+
this.httpClient = inject(HttpClient);
|
|
2401
|
+
this.dialogService = inject(DialogService);
|
|
2402
|
+
this.dialogData = inject(MAT_DIALOG_DATA) ?? {};
|
|
2403
|
+
this.url = signal(null, ...(ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []));
|
|
2404
|
+
const data = this.dialogData;
|
|
2405
|
+
if (!data?.url)
|
|
2406
|
+
return;
|
|
2407
|
+
if (!data.embed) {
|
|
2408
|
+
this.dialogService.setBusy('Download in corso...');
|
|
2409
|
+
this.httpClient.get(data.url, {
|
|
2410
|
+
headers: data.authToken
|
|
2411
|
+
? new HttpHeaders().set('Authorization', data.authToken)
|
|
2412
|
+
: new HttpHeaders(),
|
|
2413
|
+
responseType: 'blob'
|
|
2414
|
+
})
|
|
2415
|
+
.pipe(takeUntilDestroyed())
|
|
2416
|
+
.subscribe({
|
|
2417
|
+
next: (res) => {
|
|
2418
|
+
this.url.set(URL.createObjectURL(res));
|
|
2419
|
+
this.dialogService.clearBusy();
|
|
2420
|
+
},
|
|
2421
|
+
error: () => {
|
|
2422
|
+
this.dialogService.clearBusy();
|
|
2502
2423
|
}
|
|
2503
2424
|
});
|
|
2504
|
-
if (this.selection.length > 0) {
|
|
2505
|
-
this.singleSelection = this.selection[0];
|
|
2506
|
-
}
|
|
2507
|
-
}
|
|
2508
|
-
this.propagateChange(this._value);
|
|
2509
|
-
this.stateChanges.next();
|
|
2510
|
-
if (this.changesEnabled) {
|
|
2511
|
-
this.changed.emit(this._value);
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
get value() {
|
|
2515
|
-
return this._value;
|
|
2516
|
-
}
|
|
2517
|
-
get empty() {
|
|
2518
|
-
return !this._value || this._value?.length === 0;
|
|
2519
|
-
}
|
|
2520
|
-
get errorState() {
|
|
2521
|
-
return this.ngControl.errors != null && this.ngControl.touched;
|
|
2522
|
-
}
|
|
2523
|
-
get required() {
|
|
2524
|
-
return this._required;
|
|
2525
|
-
}
|
|
2526
|
-
set required(value) {
|
|
2527
|
-
this._required = coerceBooleanProperty(value);
|
|
2528
|
-
this.stateChanges.next();
|
|
2529
|
-
}
|
|
2530
|
-
get disabled() {
|
|
2531
|
-
if (this.ngControl && this.ngControl.disabled != null) {
|
|
2532
|
-
return this.ngControl.disabled;
|
|
2533
2425
|
}
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
set disabled(value) {
|
|
2537
|
-
this._disabled = coerceBooleanProperty(value);
|
|
2538
|
-
if (this.focused) {
|
|
2539
|
-
this.focused = false;
|
|
2540
|
-
this.stateChanges.next();
|
|
2426
|
+
else {
|
|
2427
|
+
this.url.set('https://view.officeapps.live.com/op/embed.aspx?src=' + encodeURIComponent(data.url));
|
|
2541
2428
|
}
|
|
2542
2429
|
}
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
get shouldLabelFloat() {
|
|
2551
|
-
return this.focused || !this.empty;
|
|
2552
|
-
}
|
|
2553
|
-
constructor(ngControl) {
|
|
2554
|
-
this.ngControl = ngControl;
|
|
2555
|
-
/** Emitted when the selection changes. Carries the new array of selected items, or `undefined` when cleared. */
|
|
2556
|
-
this.changed = output();
|
|
2557
|
-
this.containerId = `chips-selector-container--${SystemUtils.generateUUID()}`;
|
|
2558
|
-
this.containerWidth = signal(-6, ...(ngDevMode ? [{ debugName: "containerWidth" }] : /* istanbul ignore next */ []));
|
|
2559
|
-
this.focused = false;
|
|
2560
|
-
this.stateChanges = new Subject();
|
|
2561
|
-
this.destroyRef = inject(DestroyRef);
|
|
2562
|
-
this.changesEnabled = false;
|
|
2563
|
-
/** List of available options to display as chips. */
|
|
2564
|
-
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2565
|
-
/** Minimum width in pixels when collapsed. Use `-1` for automatic. */
|
|
2566
|
-
this.collapsedWidth = input(-1, ...(ngDevMode ? [{ debugName: "collapsedWidth" }] : /* istanbul ignore next */ []));
|
|
2567
|
-
/** Display mode used when the selector is in collapsed state. */
|
|
2568
|
-
this.collapsedDisplayMode = input('dropdown', ...(ngDevMode ? [{ debugName: "collapsedDisplayMode" }] : /* istanbul ignore next */ []));
|
|
2569
|
-
/** Pixel threshold below which the selector collapses. Use `-1` to disable. */
|
|
2570
|
-
this.collapseAt = input(-1, ...(ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []));
|
|
2571
|
-
/** When `true`, `collapseAt` is compared against the container width rather than the window width. */
|
|
2572
|
-
this.collapseAtContainer = input(false, ...(ngDevMode ? [{ debugName: "collapseAtContainer" }] : /* istanbul ignore next */ []));
|
|
2573
|
-
this.collapsed = computed(() => {
|
|
2574
|
-
const cw = this.containerWidth();
|
|
2575
|
-
const mw = this.collapseAt();
|
|
2576
|
-
return this.mode() === 'collapsed' || (mw !== -1 && cw > 0 && mw > 0 && cw < mw);
|
|
2577
|
-
}, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
2578
|
-
/** Label shown in the dropdown / above the chip list. */
|
|
2579
|
-
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2580
|
-
/** When `true`, multiple chips can be selected simultaneously. */
|
|
2581
|
-
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
2582
|
-
/** When `true`, at least one item must remain selected. */
|
|
2583
|
-
this.mustSelect = input(false, ...(ngDevMode ? [{ debugName: "mustSelect" }] : /* istanbul ignore next */ []));
|
|
2584
|
-
/** Layout mode: `'collapsed'` forces dropdown mode, `'dynamic'` collapses based on `collapseAt`. */
|
|
2585
|
-
this.mode = input('dynamic', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
2586
|
-
/** When `true`, chips are stacked vertically instead of wrapping horizontally. */
|
|
2587
|
-
this.stacked = input(false, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
|
|
2588
|
-
/** Chips below this index receive extra padding to align with other UI elements. */
|
|
2589
|
-
this.padAt = input(0, ...(ngDevMode ? [{ debugName: "padAt" }] : /* istanbul ignore next */ []));
|
|
2590
|
-
this._value = [];
|
|
2591
|
-
this._required = false;
|
|
2592
|
-
this._disabled = false;
|
|
2593
|
-
this._placeholder = '';
|
|
2594
|
-
this.propagateChange = () => { };
|
|
2595
|
-
this.propagateTouched = () => { };
|
|
2596
|
-
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
2597
|
-
this.describedBy = '';
|
|
2598
|
-
this.renderer = inject(Renderer2);
|
|
2599
|
-
/** Currently selected items (may contain multiple entries when `multiple` is `true`). */
|
|
2600
|
-
this.selection = [];
|
|
2601
|
-
if (this.ngControl != null) {
|
|
2602
|
-
this.ngControl.valueAccessor = this;
|
|
2430
|
+
/**
|
|
2431
|
+
* Handles the iframe load event: scrolls to the top and centers a single image when present.
|
|
2432
|
+
*/
|
|
2433
|
+
loaded() {
|
|
2434
|
+
const iframe = this.iframe()?.nativeElement;
|
|
2435
|
+
if (!iframe) {
|
|
2436
|
+
return;
|
|
2603
2437
|
}
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2438
|
+
try {
|
|
2439
|
+
iframe.contentWindow?.scrollTo(0, 0);
|
|
2440
|
+
// Resize and center single image
|
|
2441
|
+
if (!this.dialogData?.embed && iframe.contentDocument) {
|
|
2442
|
+
const images = iframe.contentDocument.querySelectorAll('img') || [];
|
|
2443
|
+
if (images.length === 1) {
|
|
2444
|
+
Object.assign(images[0].style, {
|
|
2445
|
+
position: 'absolute',
|
|
2446
|
+
top: '50%',
|
|
2447
|
+
left: '50%',
|
|
2448
|
+
transform: 'translate(-50%, -50%)',
|
|
2449
|
+
maxWidth: images[0].style.maxWidth || '100%',
|
|
2450
|
+
maxHeight: images[0].style.maxHeight || '100%'
|
|
2451
|
+
});
|
|
2452
|
+
const iframeBody = iframe.contentDocument.body;
|
|
2453
|
+
if (iframeBody && !iframeBody.style.height) {
|
|
2454
|
+
iframeBody.style.height = '100%';
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2613
2457
|
}
|
|
2458
|
+
}
|
|
2459
|
+
catch (e) {
|
|
2460
|
+
console.error('Impossibile accedere al contenuto dell\'iframe:', e);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* Opens the current file URL in a new browser tab for manual download.
|
|
2465
|
+
*/
|
|
2466
|
+
download() {
|
|
2467
|
+
const currentUrl = this.url();
|
|
2468
|
+
if (currentUrl) {
|
|
2469
|
+
window.open(currentUrl, '_blank');
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
/**
|
|
2473
|
+
* Displays a help dialog with browser-specific instructions for enabling PDF preview.
|
|
2474
|
+
*/
|
|
2475
|
+
troubles() {
|
|
2476
|
+
this.dialogService.info("<p>Se non riesci a visualizzare l'anteprima dei file PDF probabilmente devi abilitare un'impostazione del tuo browser.</p>" +
|
|
2477
|
+
"<b>Per Google Chrome</b><br>" +
|
|
2478
|
+
"<p class='small' style='padding-left:10px'><i>impostazioni > privacy e sicurezza > impostazioni sito > documenti PDF</i></p>" +
|
|
2479
|
+
"<b>Per Microsoft Chrome</b><br>" +
|
|
2480
|
+
"<p class='small' style='padding-left:10px'><i>impostazioni > cookie e autorizzazioni sito > documenti PDF</i></p>" +
|
|
2481
|
+
"<b>Per Mozilla Firefox</b><br>" +
|
|
2482
|
+
"<p class='small' style='padding-left:10px'><i>impostazioni > generale > applicazioni</i></p>" +
|
|
2483
|
+
"<b>Altri browser</b><br>" +
|
|
2484
|
+
"<p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>", "Problemi con lee anteprime dei file PDF?");
|
|
2485
|
+
}
|
|
2486
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2487
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: FilePreviewComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{animation:blinker 2s linear infinite;font-size:x-large;color:var(--ars-color-text, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0;background-color:var(--ars-filepreview-content-background-color, #f7faf8)!important}@keyframes blinker{50%{opacity:0}}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { 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: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "pipe", type: SafeUrlPipe, name: "safeUrl" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2488
|
+
}
|
|
2489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FilePreviewComponent, decorators: [{
|
|
2490
|
+
type: Component,
|
|
2491
|
+
args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogContent, FlexLayoutModule, MatDialogActions, MatButtonModule, MatTooltipModule,
|
|
2492
|
+
MatDialogClose, SafeUrlPipe], template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{animation:blinker 2s linear infinite;font-size:x-large;color:var(--ars-color-text, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0;background-color:var(--ars-filepreview-content-background-color, #f7faf8)!important}@keyframes blinker{50%{opacity:0}}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"] }]
|
|
2493
|
+
}], ctorParameters: () => [], propDecorators: { iframe: [{ type: i0.ViewChild, args: ['iframe', { isSignal: true }] }] } });
|
|
2494
|
+
|
|
2495
|
+
class FilterBarComponent {
|
|
2496
|
+
constructor() {
|
|
2497
|
+
this.changed = output();
|
|
2498
|
+
this.filters = input(...(ngDevMode ? [undefined, { debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
2499
|
+
this.canFilterByFlt1 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt1" }] : /* istanbul ignore next */ []));
|
|
2500
|
+
this.canFilterByFlt2 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt2" }] : /* istanbul ignore next */ []));
|
|
2501
|
+
this.canFilterByFlt3 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt3" }] : /* istanbul ignore next */ []));
|
|
2502
|
+
this.canFilterByFlt4 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt4" }] : /* istanbul ignore next */ []));
|
|
2503
|
+
this.canFilterByFlt5 = signal(false, ...(ngDevMode ? [{ debugName: "canFilterByFlt5" }] : /* istanbul ignore next */ []));
|
|
2504
|
+
this.canFilterByText = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText" }] : /* istanbul ignore next */ []));
|
|
2505
|
+
this.canFilterByText2 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText2" }] : /* istanbul ignore next */ []));
|
|
2506
|
+
this.canFilterByText3 = input(false, ...(ngDevMode ? [{ debugName: "canFilterByText3" }] : /* istanbul ignore next */ []));
|
|
2507
|
+
this.initialText = input(null, ...(ngDevMode ? [{ debugName: "initialText" }] : /* istanbul ignore next */ []));
|
|
2508
|
+
this.initialText2 = input(null, ...(ngDevMode ? [{ debugName: "initialText2" }] : /* istanbul ignore next */ []));
|
|
2509
|
+
this.initialText3 = input(null, ...(ngDevMode ? [{ debugName: "initialText3" }] : /* istanbul ignore next */ []));
|
|
2510
|
+
this.textName = input("testo", ...(ngDevMode ? [{ debugName: "textName" }] : /* istanbul ignore next */ []));
|
|
2511
|
+
this.text2Name = input("...", ...(ngDevMode ? [{ debugName: "text2Name" }] : /* istanbul ignore next */ []));
|
|
2512
|
+
this.text3Name = input("...", ...(ngDevMode ? [{ debugName: "text3Name" }] : /* istanbul ignore next */ []));
|
|
2513
|
+
this.textLength = input(...(ngDevMode ? [undefined, { debugName: "textLength" }] : /* istanbul ignore next */ []));
|
|
2514
|
+
this.text2Length = input(...(ngDevMode ? [undefined, { debugName: "text2Length" }] : /* istanbul ignore next */ []));
|
|
2515
|
+
this.text3Length = input(...(ngDevMode ? [undefined, { debugName: "text3Length" }] : /* istanbul ignore next */ []));
|
|
2516
|
+
this.showTextSearchButton = input(false, ...(ngDevMode ? [{ debugName: "showTextSearchButton" }] : /* istanbul ignore next */ []));
|
|
2517
|
+
this.appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2518
|
+
this.currentFilter = new CurrentFilter();
|
|
2519
|
+
effect(() => {
|
|
2520
|
+
this.text = this.initialText();
|
|
2521
|
+
this.text2 = this.initialText2();
|
|
2522
|
+
this.text3 = this.initialText3();
|
|
2523
|
+
});
|
|
2524
|
+
effect(() => {
|
|
2525
|
+
this.initializeFilters();
|
|
2614
2526
|
});
|
|
2615
2527
|
}
|
|
2616
|
-
|
|
2617
|
-
|
|
2528
|
+
/** Reads the `filters` input and populates the filter group fields and capability signals. */
|
|
2529
|
+
initializeFilters() {
|
|
2530
|
+
if (!this.filters())
|
|
2531
|
+
return;
|
|
2532
|
+
this.filters()?.forEach((n) => {
|
|
2533
|
+
switch (n.group) {
|
|
2534
|
+
case Filters.FLT_1:
|
|
2535
|
+
this.flt1 = n;
|
|
2536
|
+
this.canFilterByFlt1.set(n.action || (n.items && n.items.length > 0));
|
|
2537
|
+
break;
|
|
2538
|
+
case Filters.FLT_2:
|
|
2539
|
+
this.flt2 = n;
|
|
2540
|
+
this.canFilterByFlt2.set(n.action || (n.items && n.items.length > 0));
|
|
2541
|
+
break;
|
|
2542
|
+
case Filters.FLT_3:
|
|
2543
|
+
this.flt3 = n;
|
|
2544
|
+
this.canFilterByFlt3.set(n.action || (n.items && n.items.length > 0));
|
|
2545
|
+
break;
|
|
2546
|
+
case Filters.FLT_4:
|
|
2547
|
+
this.flt4 = n;
|
|
2548
|
+
this.canFilterByFlt4.set(n.action || (n.items && n.items.length > 0));
|
|
2549
|
+
break;
|
|
2550
|
+
case Filters.FLT_5:
|
|
2551
|
+
this.flt5 = n;
|
|
2552
|
+
this.canFilterByFlt5.set(n.action || (n.items && n.items.length > 0));
|
|
2553
|
+
break;
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2618
2556
|
}
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2557
|
+
/**
|
|
2558
|
+
* Applies the selected filter item to the current filter state and emits the change.
|
|
2559
|
+
* @param filter - The filter item to apply.
|
|
2560
|
+
*/
|
|
2561
|
+
applyFilter(filter) {
|
|
2562
|
+
let changed = false;
|
|
2563
|
+
switch (filter.group) {
|
|
2564
|
+
case Filters.FLT_1:
|
|
2565
|
+
changed = this.currentFilter.flt1 !== filter.value;
|
|
2566
|
+
if (changed) {
|
|
2567
|
+
this.currentFilter.flt1 = filter.value;
|
|
2568
|
+
this.currentFilter.flt1Name = filter.titleSelected;
|
|
2569
|
+
}
|
|
2570
|
+
break;
|
|
2571
|
+
case Filters.FLT_2:
|
|
2572
|
+
changed = this.currentFilter.flt2 !== filter.value;
|
|
2573
|
+
if (changed) {
|
|
2574
|
+
this.currentFilter.flt2 = filter.value;
|
|
2575
|
+
this.currentFilter.flt2Name = filter.titleSelected;
|
|
2576
|
+
}
|
|
2577
|
+
break;
|
|
2578
|
+
case Filters.FLT_3:
|
|
2579
|
+
changed = this.currentFilter.flt3 !== filter.value;
|
|
2580
|
+
if (changed) {
|
|
2581
|
+
this.currentFilter.flt3 = filter.value;
|
|
2582
|
+
this.currentFilter.flt3Name = filter.titleSelected;
|
|
2583
|
+
}
|
|
2584
|
+
break;
|
|
2585
|
+
case Filters.FLT_4:
|
|
2586
|
+
changed = this.currentFilter.flt4 !== filter.value;
|
|
2587
|
+
if (changed) {
|
|
2588
|
+
this.currentFilter.flt4 = filter.value;
|
|
2589
|
+
this.currentFilter.flt4Name = filter.titleSelected;
|
|
2590
|
+
}
|
|
2591
|
+
break;
|
|
2592
|
+
case Filters.FLT_5:
|
|
2593
|
+
changed = this.currentFilter.flt5 !== filter.value;
|
|
2594
|
+
if (changed) {
|
|
2595
|
+
this.currentFilter.flt5 = filter.value;
|
|
2596
|
+
this.currentFilter.flt5Name = filter.titleSelected;
|
|
2597
|
+
}
|
|
2598
|
+
break;
|
|
2599
|
+
}
|
|
2600
|
+
if (changed) {
|
|
2601
|
+
this.changed.emit({ filter: this.currentFilter, group: filter.group });
|
|
2602
|
+
}
|
|
2624
2603
|
}
|
|
2625
2604
|
/**
|
|
2626
|
-
*
|
|
2627
|
-
*
|
|
2605
|
+
* Executes the action associated with a filter group, or clears the filter.
|
|
2606
|
+
* @param group - The filter group number.
|
|
2607
|
+
* @param clear - When `true`, clears the filter instead of triggering its action.
|
|
2628
2608
|
*/
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2609
|
+
applyFilterAction(group, clear = false) {
|
|
2610
|
+
if (!clear) {
|
|
2611
|
+
const g = this.getFilterGroup(group);
|
|
2612
|
+
if (g?.action) {
|
|
2613
|
+
g.action(this, g);
|
|
2614
|
+
}
|
|
2635
2615
|
}
|
|
2636
2616
|
else {
|
|
2637
|
-
|
|
2617
|
+
this.clearFilter(group);
|
|
2638
2618
|
}
|
|
2639
2619
|
}
|
|
2620
|
+
/** Commits the current text inputs to the filter state and emits the change. */
|
|
2621
|
+
applyTextFilter() {
|
|
2622
|
+
this.currentFilter.text = this.text;
|
|
2623
|
+
this.currentFilter.text2 = this.text2;
|
|
2624
|
+
this.currentFilter.text3 = this.text3;
|
|
2625
|
+
this.changed.emit({
|
|
2626
|
+
filter: this.currentFilter,
|
|
2627
|
+
group: Filters.FLT_TEXT
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2640
2630
|
/**
|
|
2641
|
-
*
|
|
2642
|
-
*
|
|
2643
|
-
* @returns The array of currently selected items.
|
|
2631
|
+
* Clears the active filter for the specified group and emits the change if it was set.
|
|
2632
|
+
* @param group - The filter group number to clear.
|
|
2644
2633
|
*/
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2634
|
+
clearFilter(group) {
|
|
2635
|
+
let changed = false;
|
|
2636
|
+
switch (group) {
|
|
2637
|
+
case Filters.FLT_1:
|
|
2638
|
+
changed = this.currentFilter.flt1 != undefined;
|
|
2639
|
+
if (changed) {
|
|
2640
|
+
this.currentFilter.flt1 = undefined;
|
|
2641
|
+
this.currentFilter.flt1Name = undefined;
|
|
2642
|
+
}
|
|
2643
|
+
break;
|
|
2644
|
+
case Filters.FLT_2:
|
|
2645
|
+
changed = this.currentFilter.flt2 != undefined;
|
|
2646
|
+
if (changed) {
|
|
2647
|
+
this.currentFilter.flt2 = undefined;
|
|
2648
|
+
this.currentFilter.flt2Name = undefined;
|
|
2649
|
+
}
|
|
2650
|
+
break;
|
|
2651
|
+
case Filters.FLT_3:
|
|
2652
|
+
changed = this.currentFilter.flt3 != undefined;
|
|
2653
|
+
if (changed) {
|
|
2654
|
+
this.currentFilter.flt3 = undefined;
|
|
2655
|
+
this.currentFilter.flt3Name = undefined;
|
|
2656
|
+
}
|
|
2657
|
+
break;
|
|
2658
|
+
case Filters.FLT_4:
|
|
2659
|
+
changed = this.currentFilter.flt4 != undefined;
|
|
2660
|
+
if (changed) {
|
|
2661
|
+
this.currentFilter.flt4 = undefined;
|
|
2662
|
+
this.currentFilter.flt4Name = undefined;
|
|
2663
|
+
}
|
|
2664
|
+
break;
|
|
2665
|
+
case Filters.FLT_5:
|
|
2666
|
+
changed = this.currentFilter.flt5 != undefined;
|
|
2667
|
+
if (changed) {
|
|
2668
|
+
this.currentFilter.flt5 = undefined;
|
|
2669
|
+
this.currentFilter.flt5Name = undefined;
|
|
2670
|
+
}
|
|
2671
|
+
break;
|
|
2672
|
+
}
|
|
2673
|
+
if (changed) {
|
|
2674
|
+
this.changed.emit({ filter: this.currentFilter, group: group });
|
|
2651
2675
|
}
|
|
2652
|
-
return value ? [value] : [];
|
|
2653
|
-
}
|
|
2654
|
-
/**
|
|
2655
|
-
* Schedules a value update after a short delay, giving the template time to sync `ngModel`.
|
|
2656
|
-
*/
|
|
2657
|
-
updateValue() {
|
|
2658
|
-
setTimeout(() => {
|
|
2659
|
-
this.writeValue(this.getSelection());
|
|
2660
|
-
}, 250);
|
|
2661
|
-
}
|
|
2662
|
-
/**
|
|
2663
|
-
* Returns `true` when the given item can be selected in the current mode.
|
|
2664
|
-
* In single-select mode an already-selected item is not re-selectable.
|
|
2665
|
-
* @param item - The item to check.
|
|
2666
|
-
*/
|
|
2667
|
-
isSelectable(item) {
|
|
2668
|
-
return this.multiple() || this.getSelection().findIndex(x => x.value === item.value) === -1;
|
|
2669
2676
|
}
|
|
2670
|
-
/**
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2677
|
+
/** Resets all active filters and text inputs, then emits the change. */
|
|
2678
|
+
clearAllFilters() {
|
|
2679
|
+
this.currentFilter.flt1 = undefined;
|
|
2680
|
+
this.currentFilter.flt1Name = undefined;
|
|
2681
|
+
this.currentFilter.flt2 = undefined;
|
|
2682
|
+
this.currentFilter.flt2Name = undefined;
|
|
2683
|
+
this.currentFilter.flt3 = undefined;
|
|
2684
|
+
this.currentFilter.flt3Name = undefined;
|
|
2685
|
+
this.currentFilter.flt4 = undefined;
|
|
2686
|
+
this.currentFilter.flt4Name = undefined;
|
|
2687
|
+
this.currentFilter.flt5 = undefined;
|
|
2688
|
+
this.currentFilter.flt5Name = undefined;
|
|
2689
|
+
this.currentFilter.text = undefined;
|
|
2690
|
+
this.currentFilter.text2 = undefined;
|
|
2691
|
+
this.currentFilter.text3 = undefined;
|
|
2692
|
+
this.text = undefined;
|
|
2693
|
+
this.text2 = undefined;
|
|
2694
|
+
this.text3 = undefined;
|
|
2695
|
+
this.changed.emit({ filter: this.currentFilter, group: -1 });
|
|
2679
2696
|
}
|
|
2680
2697
|
/**
|
|
2681
|
-
*
|
|
2682
|
-
* @param fn - Callback to invoke whenever the value changes.
|
|
2698
|
+
* Returns `true` when more than one filter type is active, showing the "clear all" button.
|
|
2683
2699
|
*/
|
|
2684
|
-
|
|
2685
|
-
|
|
2700
|
+
canClearAllFilters() {
|
|
2701
|
+
let count = 0;
|
|
2702
|
+
if (this.canFilterByText())
|
|
2703
|
+
count++;
|
|
2704
|
+
if (this.canFilterByText2())
|
|
2705
|
+
count++;
|
|
2706
|
+
if (this.canFilterByText3())
|
|
2707
|
+
count++;
|
|
2708
|
+
if (this.canFilterByFlt1())
|
|
2709
|
+
count++;
|
|
2710
|
+
if (this.canFilterByFlt2())
|
|
2711
|
+
count++;
|
|
2712
|
+
if (this.canFilterByFlt3())
|
|
2713
|
+
count++;
|
|
2714
|
+
if (this.canFilterByFlt4())
|
|
2715
|
+
count++;
|
|
2716
|
+
if (this.canFilterByFlt5())
|
|
2717
|
+
count++;
|
|
2718
|
+
return count > 1;
|
|
2686
2719
|
}
|
|
2687
2720
|
/**
|
|
2688
|
-
*
|
|
2689
|
-
* @param
|
|
2721
|
+
* Returns the filter group matching the given id, or `undefined` if not found.
|
|
2722
|
+
* @param id - The group id to look up.
|
|
2690
2723
|
*/
|
|
2691
|
-
|
|
2692
|
-
this.
|
|
2693
|
-
}
|
|
2694
|
-
setDescribedByIds(ids) {
|
|
2695
|
-
this.describedBy = ids.join(' ');
|
|
2724
|
+
getFilterGroup(id) {
|
|
2725
|
+
return this.filters()?.find((n) => n.group === id);
|
|
2696
2726
|
}
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2727
|
+
/** Synchronises the filter bar display with the values currently stored in `currentFilter`. */
|
|
2728
|
+
syncFilter() {
|
|
2729
|
+
let g = this.getFilterGroup(Filters.FLT_1);
|
|
2730
|
+
if (g) {
|
|
2731
|
+
if (g.items) {
|
|
2732
|
+
this.currentFilter.flt1Name = undefined;
|
|
2733
|
+
if (this.currentFilter.flt1) {
|
|
2734
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt1);
|
|
2735
|
+
if (gi)
|
|
2736
|
+
this.currentFilter.flt1Name = gi.titleSelected;
|
|
2737
|
+
else
|
|
2738
|
+
this.currentFilter.flt1 = undefined;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2703
2741
|
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2742
|
+
g = this.getFilterGroup(Filters.FLT_2);
|
|
2743
|
+
if (g) {
|
|
2744
|
+
if (g.items) {
|
|
2745
|
+
this.currentFilter.flt2Name = undefined;
|
|
2746
|
+
if (this.currentFilter.flt2) {
|
|
2747
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt2);
|
|
2748
|
+
if (gi)
|
|
2749
|
+
this.currentFilter.flt2Name = gi.titleSelected;
|
|
2750
|
+
else
|
|
2751
|
+
this.currentFilter.flt2 = undefined;
|
|
2752
|
+
}
|
|
2713
2753
|
}
|
|
2714
2754
|
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
*/
|
|
2728
|
-
select(item) {
|
|
2729
|
-
if (item) {
|
|
2730
|
-
this.writeValue([item]);
|
|
2755
|
+
g = this.getFilterGroup(Filters.FLT_3);
|
|
2756
|
+
if (g) {
|
|
2757
|
+
if (g.items) {
|
|
2758
|
+
this.currentFilter.flt3Name = undefined;
|
|
2759
|
+
if (this.currentFilter.flt3) {
|
|
2760
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt3);
|
|
2761
|
+
if (gi)
|
|
2762
|
+
this.currentFilter.flt3Name = gi.titleSelected;
|
|
2763
|
+
else
|
|
2764
|
+
this.currentFilter.flt3 = undefined;
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2731
2767
|
}
|
|
2768
|
+
g = this.getFilterGroup(Filters.FLT_4);
|
|
2769
|
+
if (g) {
|
|
2770
|
+
if (g.items) {
|
|
2771
|
+
this.currentFilter.flt4Name = undefined;
|
|
2772
|
+
if (this.currentFilter.flt4) {
|
|
2773
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt4);
|
|
2774
|
+
if (gi)
|
|
2775
|
+
this.currentFilter.flt4Name = gi.titleSelected;
|
|
2776
|
+
else
|
|
2777
|
+
this.currentFilter.flt4 = undefined;
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
g = this.getFilterGroup(Filters.FLT_5);
|
|
2782
|
+
if (g) {
|
|
2783
|
+
if (g.items) {
|
|
2784
|
+
this.currentFilter.flt5Name = undefined;
|
|
2785
|
+
if (this.currentFilter.flt5) {
|
|
2786
|
+
const gi = g.items.find(n => n.value === this.currentFilter.flt5);
|
|
2787
|
+
if (gi)
|
|
2788
|
+
this.currentFilter.flt5Name = gi.titleSelected;
|
|
2789
|
+
else
|
|
2790
|
+
this.currentFilter.flt5 = undefined;
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
this.text = this.currentFilter.text;
|
|
2795
|
+
this.text2 = this.currentFilter.text2;
|
|
2796
|
+
this.text3 = this.currentFilter.text3;
|
|
2732
2797
|
}
|
|
2733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
2734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedBy": "this.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 }); }
|
|
2735
|
-
}
|
|
2736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ChipsSelectorComponent, decorators: [{
|
|
2737
|
-
type: Component,
|
|
2738
|
-
args: [{ selector: 'chips-selector', standalone: true, imports: [FlexLayoutModule, FormsModule, MatFormFieldModule, MatSelectModule,
|
|
2739
|
-
MatChipsModule, MatIconModule, MatButtonModule, MatBadgeModule, MatTooltipModule,
|
|
2740
|
-
ButtonSelectorComponent
|
|
2741
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2742
|
-
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2743
|
-
type: Optional
|
|
2744
|
-
}, {
|
|
2745
|
-
type: Self
|
|
2746
|
-
}] }], 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: [{
|
|
2747
|
-
type: Input
|
|
2748
|
-
}], disabled: [{
|
|
2749
|
-
type: Input
|
|
2750
|
-
}], placeholder: [{
|
|
2751
|
-
type: Input
|
|
2752
|
-
}], id: [{
|
|
2753
|
-
type: HostBinding
|
|
2754
|
-
}], shouldLabelFloat: [{
|
|
2755
|
-
type: HostBinding,
|
|
2756
|
-
args: ['class.floating']
|
|
2757
|
-
}], describedBy: [{
|
|
2758
|
-
type: HostBinding,
|
|
2759
|
-
args: ['attr.aria-describedBy']
|
|
2760
|
-
}] } });
|
|
2761
|
-
|
|
2762
|
-
class ButtonToggleComponent {
|
|
2763
|
-
constructor() {
|
|
2764
|
-
/** Emitted each time the button is clicked. Carries the current `value` and the new `toggled` state. */
|
|
2765
|
-
this.changed = output();
|
|
2766
|
-
/** Tracks whether the button has been toggled (opposite of the current `value` input). */
|
|
2767
|
-
this.toggled = signal(false, ...(ngDevMode ? [{ debugName: "toggled" }] : /* istanbul ignore next */ []));
|
|
2768
|
-
/** Current value bound from the parent. Drives label and icon selection. */
|
|
2769
|
-
this.value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2770
|
-
/** Width of the button in pixels. Use `-1` for automatic sizing. */
|
|
2771
|
-
this.width = input(-1, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
2772
|
-
/** Border thickness override in pixels. Use `-1` to inherit. */
|
|
2773
|
-
this.border = input(-1, ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
|
|
2774
|
-
/** Label shown when `value` is `true`. */
|
|
2775
|
-
this.labelOn = input(undefined, ...(ngDevMode ? [{ debugName: "labelOn" }] : /* istanbul ignore next */ []));
|
|
2776
|
-
/** Label shown when `value` is `false`. */
|
|
2777
|
-
this.labelOff = input(undefined, ...(ngDevMode ? [{ debugName: "labelOff" }] : /* istanbul ignore next */ []));
|
|
2778
|
-
/** Material icon name shown when `value` is `true`. */
|
|
2779
|
-
this.iconOn = input(undefined, ...(ngDevMode ? [{ debugName: "iconOn" }] : /* istanbul ignore next */ []));
|
|
2780
|
-
/** Material icon name shown when `value` is `false`. */
|
|
2781
|
-
this.iconOff = input(undefined, ...(ngDevMode ? [{ debugName: "iconOff" }] : /* istanbul ignore next */ []));
|
|
2782
|
-
/** CSS class applied to the button at all breakpoints. */
|
|
2783
|
-
this.cssClass = input(undefined, ...(ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []));
|
|
2784
|
-
/** CSS class applied to the button on `xs` screens. */
|
|
2785
|
-
this.cssClassSmall = input(undefined, ...(ngDevMode ? [{ debugName: "cssClassSmall" }] : /* istanbul ignore next */ []));
|
|
2786
|
-
/** Resolves the appropriate label for the current value state. */
|
|
2787
|
-
this.label = computed(() => this.value() ? this.labelOn() ?? '' : this.labelOff() ?? '', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2788
|
-
/** Resolves the appropriate icon name for the current value state. */
|
|
2789
|
-
this.icon = computed(() => this.value() ? this.iconOn() ?? '' : this.iconOff() ?? '', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
2790
|
-
}
|
|
2791
|
-
/**
|
|
2792
|
-
* Toggles the button state and emits the `changed` event.
|
|
2793
|
-
* The emitted `toggled` value is the logical inverse of the current `value`.
|
|
2794
|
-
*/
|
|
2795
|
-
toggle() {
|
|
2796
|
-
this.toggled.set(!this.value());
|
|
2797
|
-
this.changed.emit({ value: this.value(), toggled: this.toggled() });
|
|
2798
|
-
}
|
|
2799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2800
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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 }); }
|
|
2798
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2799
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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-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 }); }
|
|
2801
2800
|
}
|
|
2802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type:
|
|
2801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: FilterBarComponent, decorators: [{
|
|
2803
2802
|
type: Component,
|
|
2804
|
-
args: [{ selector:
|
|
2805
|
-
}], propDecorators: { changed: [{ type: i0.Output, args: ["changed"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], labelOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOn", required: false }] }], labelOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOff", required: false }] }], iconOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOn", required: false }] }], iconOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOff", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClass", required: false }] }], cssClassSmall: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClassSmall", required: false }] }] } });
|
|
2803
|
+
args: [{ selector: "filter-bar", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexLayoutModule, MatFormFieldModule, MatInputModule, FormsModule,
|
|
2804
|
+
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-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"] }]
|
|
2805
|
+
}], 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 }] }] } });
|
|
2806
2806
|
|
|
2807
2807
|
/*
|
|
2808
2808
|
* Public API Surface of ars-utils
|