@arsedizioni/ars-utils 22.5.38 → 22.5.39
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/README.md +185 -179
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +44 -43
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-core.mjs +48 -48
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +42 -42
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +118 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +17 -448
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +368 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +18 -18
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +10 -10
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +61 -61
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +9 -9
- package/package.json +9 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +3 -2
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +3 -180
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +49 -0
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +136 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { output, inject, Renderer2, signal, input, effect, Input, Optional, Self, ChangeDetectionStrategy, Component, computed, DestroyRef, booleanAttribute, ChangeDetectorRef, afterNextRender
|
|
2
|
+
import { output, inject, Renderer2, signal, input, effect, Input, Optional, Self, ChangeDetectionStrategy, Component, computed, DestroyRef, booleanAttribute, ChangeDetectorRef, afterNextRender } from '@angular/core';
|
|
3
3
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i4 from '@angular/material/button';
|
|
5
5
|
import { MatButtonModule } from '@angular/material/button';
|
|
6
6
|
import * as i3 from '@angular/material/icon';
|
|
7
7
|
import { MatIconModule } from '@angular/material/icon';
|
|
@@ -16,7 +16,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
16
16
|
import { form, FormField } from '@angular/forms/signals';
|
|
17
17
|
import * as i7 from '@angular/material/badge';
|
|
18
18
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i4$1 from '@angular/material/chips';
|
|
20
20
|
import { MatChipsModule } from '@angular/material/chips';
|
|
21
21
|
import * as i2$1 from '@angular/material/form-field';
|
|
22
22
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -24,15 +24,6 @@ import * as i3$1 from '@angular/material/select';
|
|
|
24
24
|
import { MatSelectModule } from '@angular/material/select';
|
|
25
25
|
import * as i8 from '@angular/material/tooltip';
|
|
26
26
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
27
|
-
import * as i1$1 from '@angular/material/tree';
|
|
28
|
-
import { MatTree, MatTreeModule } from '@angular/material/tree';
|
|
29
|
-
import * as i2$2 from '@angular/material/checkbox';
|
|
30
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
31
|
-
import * as i4 from '@angular/material/tabs';
|
|
32
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
33
|
-
import * as i9 from '@angular/material/input';
|
|
34
|
-
import { MatInputModule } from '@angular/material/input';
|
|
35
|
-
import { MatCalendar, MatDatepickerInput, MatStartDate, MatEndDate } from '@angular/material/datepicker';
|
|
36
27
|
|
|
37
28
|
class ButtonSelectorComponent {
|
|
38
29
|
set value(value) {
|
|
@@ -202,10 +193,10 @@ class ButtonSelectorComponent {
|
|
|
202
193
|
reset() {
|
|
203
194
|
this.setValue(undefined, true);
|
|
204
195
|
}
|
|
205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelSelected: { classPropertyName: "labelSelected", publicName: "labelSelected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", selected: "selected" }, host: { properties: { "id": "id", "attr.aria-describedBy": "describedBy" } }, ngImport: i0, template: "<button mat-stroked-button class=\"menu-selector-button\" [style.border]=\"border() >= 0 ? border() : 'auto'\"\r\n [style.border-radius]=\"borderRadius()\" [style.height]=\"border() <= 0 ? '40px' : 'auto'\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\" [attr.aria-label]=\"label()\"\r\n [matMenuTriggerFor]=\"optionsMenu\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"100\" fxFlexAlign=\"center\">\r\n @if(current()) {\r\n <div style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n @if(labelSelected() || label()) {\r\n <div class=\"x-small \">{{labelSelected() ?? label()}}</div>\r\n <div fxHide.xs class=\"small truncated-1\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated-1\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n } @else {\r\n <div fxHide.xs class=\"small truncated\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else if(labelSelected() || label()) {\r\n <div class=\"truncated\" style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n {{labelSelected() ?? label()}}</div>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </div>\r\n </div>\r\n</button>\r\n<mat-menu #optionsMenu=\"matMenu\">\r\n @for (o of options(); track $index) {\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: i2.FxLayoutDirective, 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: i2.FxFlexDirective, 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.FxShowHideDirective, selector: " [fxShow], [fxHide], [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.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.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.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: "directive", type: i2.FxLayoutAlignDirective, 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: i2.FxLayoutGapDirective, 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: i2.FxFlexAlignDirective, 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: i2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.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: i5.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: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.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 }); }
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
197
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ButtonSelectorComponent, isStandalone: true, selector: "button-selector", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelSelected: { classPropertyName: "labelSelected", publicName: "labelSelected", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", selected: "selected" }, host: { properties: { "id": "id", "attr.aria-describedBy": "describedBy" } }, ngImport: i0, template: "<button mat-stroked-button class=\"menu-selector-button\" [style.border]=\"border() >= 0 ? border() : 'auto'\"\r\n [style.border-radius]=\"borderRadius()\" [style.height]=\"border() <= 0 ? '40px' : 'auto'\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\" [attr.aria-label]=\"label()\"\r\n [matMenuTriggerFor]=\"optionsMenu\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"100\" fxFlexAlign=\"center\">\r\n @if(current()) {\r\n <div style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n @if(labelSelected() || label()) {\r\n <div class=\"x-small \">{{labelSelected() ?? label()}}</div>\r\n <div fxHide.xs class=\"small truncated-1\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated-1\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n } @else {\r\n <div fxHide.xs class=\"small truncated\">{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n <div fxHide.gt-xs class=\"x-small truncated\" style=\"max-width: 120px;\">\r\n <div>{{current()?.shortName ?? current()?.name ?? ''}}</div>\r\n </div>\r\n }\r\n </div>\r\n } @else if(labelSelected() || label()) {\r\n <div class=\"truncated\" style=\"text-align: left;\"\r\n [style.min-width]=\"width() > 0 ? width()+'px' : (width() === -1 ? '100%' : 'auto')\">\r\n {{labelSelected() ?? label()}}</div>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </div>\r\n </div>\r\n</button>\r\n<mat-menu #optionsMenu=\"matMenu\">\r\n @for (o of options(); track $index) {\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: i2.FxLayoutDirective, 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: i2.FxFlexDirective, 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.FxShowHideDirective, selector: " [fxShow], [fxHide], [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.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.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.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: "directive", type: i2.FxLayoutAlignDirective, 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: i2.FxLayoutGapDirective, 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: i2.FxFlexAlignDirective, 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: i2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: i5.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: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.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 }); }
|
|
207
198
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonSelectorComponent, decorators: [{
|
|
209
200
|
type: Component,
|
|
210
201
|
args: [{ selector: 'button-selector', standalone: true, imports: [FlexLayoutModule, MatIconModule, MatButtonModule,
|
|
211
202
|
MatMenuModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
@@ -266,10 +257,10 @@ class ButtonToggleComponent {
|
|
|
266
257
|
const toggled = !this.value();
|
|
267
258
|
this.changed.emit({ value: this.value(), toggled });
|
|
268
259
|
}
|
|
269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
270
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
261
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", 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'\"\n [style.height]=\"border() <= 0 ? '40px' : 'auto'\" [style.minWidth.px]=\"width() > 0 ? width() : 'auto'\"\n [style.mxn-width.px]=\"width() > 0 ? width() : 'auto'\" [class]=\"cssClass()\" [attr.aria-label]=\"label()\"\n (click)=\"toggle()\" [class.button-on]=\"value() === true\" [fxClass.xs]=\"cssClassSmall()\">\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"center center\" fxFill>\n @if(icon()) {\n <div fxFlex=\"24px\"><mat-icon style=\"display: block;\">{{icon()}}</mat-icon></div>\n }\n <div [innerHtml]=\"label() | safeHtml\"></div>\n </div>\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: i2.FxLayoutDirective, 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: i2.FxFlexDirective, 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.FxLayoutAlignDirective, 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: i2.FxLayoutGapDirective, 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: i2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "directive", type: i2.FxClassDirective, selector: " [fxClass], [fxClass.xs], [fxClass.sm], [fxClass.md], [fxClass.lg], [fxClass.xl], [fxClass.lt-sm], [fxClass.lt-md], [fxClass.lt-lg], [fxClass.lt-xl], [fxClass.gt-xs], [fxClass.gt-sm], [fxClass.gt-md], [fxClass.gt-lg] ", inputs: ["fxClass", "fxClass.xs", "fxClass.sm", "fxClass.md", "fxClass.lg", "fxClass.xl", "fxClass.lt-sm", "fxClass.lt-md", "fxClass.lt-lg", "fxClass.lt-xl", "fxClass.gt-xs", "fxClass.gt-sm", "fxClass.gt-md", "fxClass.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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 }); }
|
|
271
262
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ButtonToggleComponent, decorators: [{
|
|
273
264
|
type: Component,
|
|
274
265
|
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'\"\n [style.height]=\"border() <= 0 ? '40px' : 'auto'\" [style.minWidth.px]=\"width() > 0 ? width() : 'auto'\"\n [style.mxn-width.px]=\"width() > 0 ? width() : 'auto'\" [class]=\"cssClass()\" [attr.aria-label]=\"label()\"\n (click)=\"toggle()\" [class.button-on]=\"value() === true\" [fxClass.xs]=\"cssClassSmall()\">\n <div fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"center center\" fxFill>\n @if(icon()) {\n <div fxFlex=\"24px\"><mat-icon style=\"display: block;\">{{icon()}}</mat-icon></div>\n }\n <div [innerHtml]=\"label() | safeHtml\"></div>\n </div>\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"] }]
|
|
275
266
|
}], 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 }] }] } });
|
|
@@ -586,10 +577,10 @@ class ChipsSelectorComponent {
|
|
|
586
577
|
this.setValue([item], true);
|
|
587
578
|
}
|
|
588
579
|
}
|
|
589
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
590
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
580
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ChipsSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
581
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ChipsSelectorComponent, isStandalone: true, selector: "chips-selector", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, collapsedWidth: { classPropertyName: "collapsedWidth", publicName: "collapsedWidth", isSignal: true, isRequired: false, transformFunction: null }, collapsedDisplayMode: { classPropertyName: "collapsedDisplayMode", publicName: "collapsedDisplayMode", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null }, collapseAtContainer: { classPropertyName: "collapseAtContainer", publicName: "collapseAtContainer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, mustSelect: { classPropertyName: "mustSelect", publicName: "mustSelect", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null }, padAt: { classPropertyName: "padAt", publicName: "padAt", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, host: { properties: { "id": "id", "class.floating": "shouldLabelFloat", "attr.aria-describedBy": "describedBy" } }, ngImport: i0, template: "<div [id]=\"containerId\" class=\"chips-selector\">\n @if(containerWidth() > 0) {\n @if(collapsed()) {\n @if(collapsedDisplayMode() === 'dropdown') {\n <mat-form-field [style.min-width]=\"collapsedWidth() > 0 ? collapsedWidth()+'px' : '100%'\" subscriptSizing=\"dynamic\">\n @if(label()) {\n <mat-label>{{label()}}</mat-label>\n }\n <mat-select [formField]=\"selectionForm\" [multiple]=\"multiple()\" (selectionChange)=\"updateValue()\">\n <mat-select-trigger>\n @if (value && (value.length || 0) > 0) {\n {{value[0].shortName ?? value[0].name}}\n }\n @if (value && (value.length || 0) > 1) {\n <span class=\"collapsed-additional-selection\">\n (+{{(value.length || 0) - 1}} {{value.length === 2 ? 'altro' : 'altri'}})\n </span>\n }\n </mat-select-trigger>\n @for (o of options(); track $index) {\n <mat-option [value]=\"o\" [disabled]=\"o.disabled\">\n {{o.name}}\n @if(o.bag) {\n ({{o.bag}})\n }\n </mat-option>\n }\n </mat-select>\n @if (value && (value.length || 0) > 0) {\n <button matSuffix tabindex=\"-1\" mat-icon-button aria-label=\"Pulisci\" (click)=\"clear($event)\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @else {\n <button-selector [label]=\"label()\" [options]=\"options()\" [width]=\"collapsedWidth()\" [formField]=\"singleForm\"\n (selected)=\"updateValue()\"></button-selector>\n\n }\n } @else {\n <mat-chip-listbox [class]=\"stacked() ? 'mat-mdc-chip-set-stacked' : ''\" [multiple]=\"multiple()\"\n [formField]=\"selectionForm\" (change)=\"updateValue()\">\n @for (o of options(); track $index; let i = $index) {\n <mat-chip-option [matBadge]=\"o.bag\" [matTooltip]=\"o.disabled === true ? 'Non disponibile' : (o.bagInfo ?? '')\" [selectable]=\"isSelectable(o)\" [value]=\"o\"\n [disabled]=\"o.disabled\" [class.chip-padded]=\"i < padAt()\">{{o.shortName ??\n o.name}}</mat-chip-option>\n }\n </mat-chip-listbox>\n }\n }\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: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.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: i3$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i3$1.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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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.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 }); }
|
|
591
582
|
}
|
|
592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ChipsSelectorComponent, decorators: [{
|
|
593
584
|
type: Component,
|
|
594
585
|
args: [{ selector: 'chips-selector', standalone: true, imports: [FlexLayoutModule, FormField, MatFormFieldModule, MatSelectModule,
|
|
595
586
|
MatChipsModule, MatIconModule, MatButtonModule, MatBadgeModule, MatTooltipModule,
|
|
@@ -607,439 +598,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
607
598
|
type: Input
|
|
608
599
|
}] } });
|
|
609
600
|
|
|
610
|
-
class TreePickerComponent {
|
|
611
|
-
/** Returns true when the node can be selected: depth < maxDepth or explicitly listed in maxDepthOverrides. */
|
|
612
|
-
isSelectable(node) {
|
|
613
|
-
return this._isSelectableNode(node);
|
|
614
|
-
}
|
|
615
|
-
_isSelectableNode(node) {
|
|
616
|
-
const depth = this._maps().depthMap.get(node.id) ?? 0;
|
|
617
|
-
return depth < this.maxDepth() || this._overrideSubtreeSet().has(node.id);
|
|
618
|
-
}
|
|
619
|
-
constructor() {
|
|
620
|
-
/** Nested tree data to display. */
|
|
621
|
-
this.tree = input([], /* @ts-ignore */
|
|
622
|
-
...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
|
|
623
|
-
/** Currently selected node ids. Supports two-way binding via [(selection)]. */
|
|
624
|
-
this.selection = model([], /* @ts-ignore */
|
|
625
|
-
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
626
|
-
/** When true, checkboxes and chip remove buttons are disabled (mirrors Material convention). */
|
|
627
|
-
this.disabled = input(false, /* @ts-ignore */
|
|
628
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
629
|
-
/** Description to display when no selection is made. */
|
|
630
|
-
this.descriptionEmpty = input('<span>Nessuna selezione: vengono inclusi <strong>tutti gli elementi</strong>.</span>', /* @ts-ignore */
|
|
631
|
-
...(ngDevMode ? [{ debugName: "descriptionEmpty" }] : /* istanbul ignore next */ []));
|
|
632
|
-
/** Maximum number of tree levels to display (default: 3). */
|
|
633
|
-
this.maxDepth = input(3, /* @ts-ignore */
|
|
634
|
-
...(ngDevMode ? [{ debugName: "maxDepth" }] : /* istanbul ignore next */ []));
|
|
635
|
-
/**
|
|
636
|
-
* List of node IDs at depth >= maxDepth that unlock selection for themselves
|
|
637
|
-
* and all their descendants, regardless of depth.
|
|
638
|
-
*/
|
|
639
|
-
this.maxDepthOverrides = input([], /* @ts-ignore */
|
|
640
|
-
...(ngDevMode ? [{ debugName: "maxDepthOverrides" }] : /* istanbul ignore next */ []));
|
|
641
|
-
/**
|
|
642
|
-
* Number of levels to auto-expand on load.
|
|
643
|
-
* 0 or undefined = only top level visible (no expansion);
|
|
644
|
-
* 1 = expand depth-0 nodes; 2 = expand depth-0 and depth-1 nodes; etc.
|
|
645
|
-
* Must be less than maxDepth.
|
|
646
|
-
*/
|
|
647
|
-
this.minDepth = input(undefined, /* @ts-ignore */
|
|
648
|
-
...(ngDevMode ? [{ debugName: "minDepth" }] : /* istanbul ignore next */ []));
|
|
649
|
-
/**
|
|
650
|
-
* Emits the count of visible selected nodes whenever the selection changes.
|
|
651
|
-
* Emits 0 when nothing is selected (meaning all items are implicitly included).
|
|
652
|
-
*/
|
|
653
|
-
this.selectionCount = output();
|
|
654
|
-
/** Emits void whenever the user changes the selection (toggle, remove, clear). */
|
|
655
|
-
this.changed = output();
|
|
656
|
-
this._treeRef = viewChild((MatTree), /* @ts-ignore */
|
|
657
|
-
...(ngDevMode ? [{ debugName: "_treeRef" }] : /* istanbul ignore next */ []));
|
|
658
|
-
this._elRef = inject(ElementRef);
|
|
659
|
-
/**
|
|
660
|
-
* Set of all node IDs selectable via overrides: each listed root and all its descendants.
|
|
661
|
-
* Recomputed whenever the tree data or the override list changes.
|
|
662
|
-
*/
|
|
663
|
-
this._overrideSubtreeSet = computed(() => {
|
|
664
|
-
const overrideIds = new Set(this.maxDepthOverrides());
|
|
665
|
-
const maps = this._maps();
|
|
666
|
-
const result = new Set();
|
|
667
|
-
for (const id of overrideIds) {
|
|
668
|
-
const root = maps.nodeMap.get(id);
|
|
669
|
-
if (!root)
|
|
670
|
-
continue;
|
|
671
|
-
const addSubtree = (n) => {
|
|
672
|
-
result.add(n.id);
|
|
673
|
-
for (const child of (n.children ?? []))
|
|
674
|
-
addSubtree(child);
|
|
675
|
-
};
|
|
676
|
-
addSubtree(root);
|
|
677
|
-
}
|
|
678
|
-
return result;
|
|
679
|
-
}, /* @ts-ignore */
|
|
680
|
-
...(ngDevMode ? [{ debugName: "_overrideSubtreeSet" }] : /* istanbul ignore next */ []));
|
|
681
|
-
/** All three maps rebuilt lazily as a single computed whenever taxonomy changes. */
|
|
682
|
-
this._maps = computed(() => {
|
|
683
|
-
const parentMap = new Map();
|
|
684
|
-
const depthMap = new Map();
|
|
685
|
-
const nodeMap = new Map();
|
|
686
|
-
const build = (nodes, parent, depth = 0) => {
|
|
687
|
-
for (const node of nodes) {
|
|
688
|
-
depthMap.set(node.id, depth);
|
|
689
|
-
nodeMap.set(node.id, node);
|
|
690
|
-
if (parent)
|
|
691
|
-
parentMap.set(node.id, parent);
|
|
692
|
-
if (node.children?.length)
|
|
693
|
-
build(node.children, node, depth + 1);
|
|
694
|
-
}
|
|
695
|
-
};
|
|
696
|
-
build(this.tree());
|
|
697
|
-
return { parentMap, depthMap, nodeMap };
|
|
698
|
-
}, /* @ts-ignore */
|
|
699
|
-
...(ngDevMode ? [{ debugName: "_maps" }] : /* istanbul ignore next */ []));
|
|
700
|
-
/** O(1) set of selected ids, rebuilt only when selection changes. */
|
|
701
|
-
this._selectedSet = computed(() => new Set(this.selection()), /* @ts-ignore */
|
|
702
|
-
...(ngDevMode ? [{ debugName: "_selectedSet" }] : /* istanbul ignore next */ []));
|
|
703
|
-
/** True when at least one node is explicitly selected. */
|
|
704
|
-
this.hasSelection = computed(() => this.selection().length > 0, /* @ts-ignore */
|
|
705
|
-
...(ngDevMode ? [{ debugName: "hasSelection" }] : /* istanbul ignore next */ []));
|
|
706
|
-
/** Count of selected nodes within selectable levels (depth < maxDepth or in overrides), shown in the tab label. */
|
|
707
|
-
this.selectedVisibleCount = computed(() => this.selection().filter(id => {
|
|
708
|
-
const node = this._maps().nodeMap.get(id);
|
|
709
|
-
return node ? this._isSelectableNode(node) : false;
|
|
710
|
-
}).length, /* @ts-ignore */
|
|
711
|
-
...(ngDevMode ? [{ debugName: "selectedVisibleCount" }] : /* istanbul ignore next */ []));
|
|
712
|
-
this.treeChildrenAccessor = (node) => {
|
|
713
|
-
return (node.children ?? []);
|
|
714
|
-
};
|
|
715
|
-
this.hasChild = (_, node) => !!(node.children?.length);
|
|
716
|
-
/** Current filter text. */
|
|
717
|
-
this.filterText = signal('', /* @ts-ignore */
|
|
718
|
-
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
719
|
-
/** Root signal form bound to the filter text input. */
|
|
720
|
-
this.filterForm = form(this.filterText);
|
|
721
|
-
/** Nodes matching the current filter text, in nodeMap iteration order. */
|
|
722
|
-
this.filteredItems = signal([], /* @ts-ignore */
|
|
723
|
-
...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
724
|
-
/** Index of the currently highlighted filtered node (-1 = none). */
|
|
725
|
-
this.filterIndex = signal(-1, /* @ts-ignore */
|
|
726
|
-
...(ngDevMode ? [{ debugName: "filterIndex" }] : /* istanbul ignore next */ []));
|
|
727
|
-
/** The currently highlighted filtered node, or null. */
|
|
728
|
-
this.filteredNode = computed(() => {
|
|
729
|
-
const idx = this.filterIndex();
|
|
730
|
-
return idx >= 0 ? (this.filteredItems()[idx] ?? null) : null;
|
|
731
|
-
}, /* @ts-ignore */
|
|
732
|
-
...(ngDevMode ? [{ debugName: "filteredNode" }] : /* istanbul ignore next */ []));
|
|
733
|
-
// Expand nodes up to minDepth whenever new taxonomy data arrives
|
|
734
|
-
effect(() => {
|
|
735
|
-
const maps = this._maps();
|
|
736
|
-
const expandLevels = this.minDepth() ?? 0;
|
|
737
|
-
setTimeout(() => {
|
|
738
|
-
const tree = this._treeRef();
|
|
739
|
-
if (!tree)
|
|
740
|
-
return;
|
|
741
|
-
tree.collapseAll();
|
|
742
|
-
if (expandLevels <= 0)
|
|
743
|
-
return;
|
|
744
|
-
maps.depthMap.forEach((depth, id) => {
|
|
745
|
-
if (depth < expandLevels) {
|
|
746
|
-
const node = maps.nodeMap.get(id);
|
|
747
|
-
if (node)
|
|
748
|
-
tree.expand(node);
|
|
749
|
-
}
|
|
750
|
-
});
|
|
751
|
-
});
|
|
752
|
-
});
|
|
753
|
-
// Emit visible selection count on every selection change
|
|
754
|
-
effect(() => {
|
|
755
|
-
this.selectionCount.emit(this.selectedVisibleCount());
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
/** Expands all visible nodes in the tree. */
|
|
759
|
-
expandAll() {
|
|
760
|
-
this._treeRef()?.expandAll();
|
|
761
|
-
}
|
|
762
|
-
/** Collapses all nodes in the tree. */
|
|
763
|
-
collapseAll() {
|
|
764
|
-
this._treeRef()?.collapseAll();
|
|
765
|
-
}
|
|
766
|
-
/** Clears the entire selection. */
|
|
767
|
-
clearAll() {
|
|
768
|
-
this.selection.set([]);
|
|
769
|
-
this.changed.emit();
|
|
770
|
-
}
|
|
771
|
-
/** Searches nodes by text and moves to the first match. */
|
|
772
|
-
doFilter() {
|
|
773
|
-
const text = this.filterText().trim().toLowerCase();
|
|
774
|
-
if (text.length < 3) {
|
|
775
|
-
this.filteredItems.set([]);
|
|
776
|
-
this.filterIndex.set(-1);
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
const matches = Array.from(this._maps().nodeMap.values())
|
|
780
|
-
.filter(n => n.name?.toLowerCase().includes(text));
|
|
781
|
-
this.filteredItems.set(matches);
|
|
782
|
-
const idx = matches.length > 0 ? 0 : -1;
|
|
783
|
-
this.filterIndex.set(idx);
|
|
784
|
-
if (idx >= 0)
|
|
785
|
-
this._scrollToFiltered(idx, matches);
|
|
786
|
-
}
|
|
787
|
-
/** Clears the filter and restores the original tree state. */
|
|
788
|
-
clearFilter() {
|
|
789
|
-
this.filterText.set('');
|
|
790
|
-
this.filteredItems.set([]);
|
|
791
|
-
this.filterIndex.set(-1);
|
|
792
|
-
}
|
|
793
|
-
/** Moves to the next matching node, cycling back to the first. */
|
|
794
|
-
nextFiltered() {
|
|
795
|
-
const items = this.filteredItems();
|
|
796
|
-
if (!items.length)
|
|
797
|
-
return;
|
|
798
|
-
const next = (this.filterIndex() + 1) % items.length;
|
|
799
|
-
this.filterIndex.set(next);
|
|
800
|
-
this._scrollToFiltered(next, items);
|
|
801
|
-
}
|
|
802
|
-
/** Returns true when the node is the currently highlighted filter match. */
|
|
803
|
-
isFilteredNode(node) {
|
|
804
|
-
return this.filteredNode()?.id === node.id;
|
|
805
|
-
}
|
|
806
|
-
/** Expands ancestors of the target node and scrolls it into view. */
|
|
807
|
-
_scrollToFiltered(index, items) {
|
|
808
|
-
const node = items[index];
|
|
809
|
-
if (!node)
|
|
810
|
-
return;
|
|
811
|
-
const tree = this._treeRef();
|
|
812
|
-
if (tree) {
|
|
813
|
-
let parent = this._maps().parentMap.get(node.id);
|
|
814
|
-
while (parent) {
|
|
815
|
-
tree.expand(parent);
|
|
816
|
-
parent = this._maps().parentMap.get(parent.id);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
setTimeout(() => {
|
|
820
|
-
const el = this._elRef.nativeElement.querySelector(`[data-node-id="${node.id}"]`);
|
|
821
|
-
el?.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
* Returns true when the node is in the active selection.
|
|
826
|
-
* @param node - tree node to check
|
|
827
|
-
* @returns true if selected
|
|
828
|
-
*/
|
|
829
|
-
isSelected(node) {
|
|
830
|
-
return this._selectedSet().has(node.id);
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Returns true when a subset (but not all) of the node's descendants are selected,
|
|
834
|
-
* producing the indeterminate checkbox state.
|
|
835
|
-
* @param node - tree node to evaluate
|
|
836
|
-
* @returns true if the node is in a partial-selection (indeterminate) state
|
|
837
|
-
*/
|
|
838
|
-
isIndeterminate(node) {
|
|
839
|
-
if (!node.children?.length)
|
|
840
|
-
return false;
|
|
841
|
-
const descendants = this._getSelectableDescendants(node);
|
|
842
|
-
const set = this._selectedSet();
|
|
843
|
-
const count = descendants.filter(d => set.has(d.id)).length;
|
|
844
|
-
return count > 0 && count < descendants.length;
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* Toggles the node and all its descendants; then syncs the ancestor chain.
|
|
848
|
-
* @param node - the node that was clicked
|
|
849
|
-
*/
|
|
850
|
-
toggleNode(node) {
|
|
851
|
-
this.selection.update(current => {
|
|
852
|
-
const set = new Set(current);
|
|
853
|
-
if (set.has(node.id)) {
|
|
854
|
-
set.delete(node.id);
|
|
855
|
-
}
|
|
856
|
-
else {
|
|
857
|
-
set.add(node.id);
|
|
858
|
-
}
|
|
859
|
-
this._syncParentsInSet(node, set);
|
|
860
|
-
return Array.from(set);
|
|
861
|
-
});
|
|
862
|
-
this.changed.emit();
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Deselects the node and all its descendants. Called by the chip remove button.
|
|
866
|
-
* @param node - the node to remove from the selection
|
|
867
|
-
*/
|
|
868
|
-
removeNode(node) {
|
|
869
|
-
this.selection.update(current => {
|
|
870
|
-
const set = new Set(current);
|
|
871
|
-
set.delete(node.id);
|
|
872
|
-
this._syncParentsInSet(node, set);
|
|
873
|
-
return Array.from(set);
|
|
874
|
-
});
|
|
875
|
-
this.changed.emit();
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* Returns the INode for the given id, or undefined if not found.
|
|
879
|
-
* @param id - node id to look up
|
|
880
|
-
* @returns the matching INode
|
|
881
|
-
*/
|
|
882
|
-
nodeById(id) {
|
|
883
|
-
return this._maps().nodeMap.get(id);
|
|
884
|
-
}
|
|
885
|
-
/**
|
|
886
|
-
* Returns true when the node at the given id is within the visible depth range
|
|
887
|
-
* and should appear in the chip list.
|
|
888
|
-
* @param id - node id to check
|
|
889
|
-
* @returns true if the node depth is less than maxDepth
|
|
890
|
-
*/
|
|
891
|
-
isChipVisible(id) {
|
|
892
|
-
const node = this._maps().nodeMap.get(id);
|
|
893
|
-
return node ? this._isSelectableNode(node) : false;
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* Returns only the selectable descendants of node (depth < maxDepth or in overrides),
|
|
897
|
-
* used for indeterminate state and parent auto-selection logic.
|
|
898
|
-
* @param node - root of the subtree to traverse
|
|
899
|
-
* @returns flat array of selectable descendant INodes
|
|
900
|
-
*/
|
|
901
|
-
_getSelectableDescendants(node) {
|
|
902
|
-
const result = [];
|
|
903
|
-
for (const child of (node.children ?? [])) {
|
|
904
|
-
const c = child;
|
|
905
|
-
if (this._isSelectableNode(c))
|
|
906
|
-
result.push(c);
|
|
907
|
-
result.push(...this._getSelectableDescendants(c));
|
|
908
|
-
}
|
|
909
|
-
return result;
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* Walks up the ancestor chain from node, selecting a parent only when all
|
|
913
|
-
* its descendants are in the set, deselecting it otherwise.
|
|
914
|
-
* @param node - starting node for the upward traversal
|
|
915
|
-
* @param set - mutable selection set updated in place
|
|
916
|
-
*/
|
|
917
|
-
_syncParentsInSet(node, set) {
|
|
918
|
-
let parent = this._maps().parentMap.get(node.id);
|
|
919
|
-
while (parent) {
|
|
920
|
-
const descendants = this._getSelectableDescendants(parent);
|
|
921
|
-
if (descendants.length > 0 && descendants.every(d => set.has(d.id))) {
|
|
922
|
-
set.add(parent.id);
|
|
923
|
-
}
|
|
924
|
-
else {
|
|
925
|
-
set.delete(parent.id);
|
|
926
|
-
}
|
|
927
|
-
parent = this._maps().parentMap.get(parent.id);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
931
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: TreePickerComponent, isStandalone: true, selector: "tree-picker", inputs: { tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, descriptionEmpty: { classPropertyName: "descriptionEmpty", publicName: "descriptionEmpty", isSignal: true, isRequired: false, transformFunction: null }, maxDepth: { classPropertyName: "maxDepth", publicName: "maxDepth", isSignal: true, isRequired: false, transformFunction: null }, maxDepthOverrides: { classPropertyName: "maxDepthOverrides", publicName: "maxDepthOverrides", isSignal: true, isRequired: false, transformFunction: null }, minDepth: { classPropertyName: "minDepth", publicName: "minDepth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", selectionCount: "selectionCount", changed: "changed" }, viewQueries: [{ propertyName: "_treeRef", first: true, predicate: (MatTree), descendants: true, isSignal: true }], ngImport: i0, template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>", styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i1$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i1$1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i1$1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i1$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i1$1.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i4.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i5$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5$1.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { 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: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.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: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i2.FxLayoutDirective, 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: i2.FxFlexDirective, 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.FxShowHideDirective, selector: " [fxShow], [fxHide], [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.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.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.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: "directive", type: i2.FxLayoutAlignDirective, 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: i2.FxLayoutGapDirective, 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: i2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
932
|
-
}
|
|
933
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreePickerComponent, decorators: [{
|
|
934
|
-
type: Component,
|
|
935
|
-
args: [{ selector: 'tree-picker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTreeModule, MatCheckboxModule, MatIconModule, MatTabsModule, MatChipsModule,
|
|
936
|
-
MatButtonModule, MatTooltipModule, MatFormFieldModule, MatInputModule, FormField, FlexLayoutModule, SafeHtmlPipe], template: "<mat-tab-group class=\"taxonomy-picker-tabs\" style=\"height:100%\">\n <mat-tab style=\"overflow-x: hidden !important; height: 100%\">\n <ng-template mat-tab-label>\n Seleziona\n <mat-icon\n style=\"font-size:16px;height:16px;width:16px;margin-left:4px;vertical-align:middle;color:var(--mat-sys-primary)\"\n [matTooltip]=\"'Nessuna selezione = tutti gli argomenti inclusi;\\r\\nOgni elemento selezionato include sempre tutti i suoi sottoelementi'\"\n matTooltipPosition=\"above\">\n info\n </mat-icon>\n </ng-template>\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex fxHide.xs>\n <mat-form-field style=\"width:200px; padding: 8px 0px\" appearance=\"outline\"\n subscriptSizing=\"dynamic\">\n <mat-label>Cerca...</mat-label>\n <input type=\"text\" (keyup)=\"doFilter()\" matInput [formField]=\"filterForm\"\n (keydown.enter)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\"\n (keydown.arrowDown)=\"$event.preventDefault(); $event.stopPropagation(); nextFiltered()\">\n @if (filterText()) {\n <button type=\"button\" type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button\n aria-label=\"Clear\" (click)=\"clearFilter()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n @if (filteredItems().length > 0) {\n <div fxFlex=\"50px\" fxHide.xs fxLayoutAlign=\"end center\">\n <div class=\"small\">{{filterIndex() + 1}} / {{filteredItems().length}}</div>\n </div>\n <div fxFlex=\"48px\" fxHide.xs fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"nextFiltered()\">\n <mat-icon aria-label=\"Vai al prossimo\"\n matTooltip=\"Vai al prossimo\">arrow_downward</mat-icon>\n </button>\n </div>\n }\n <div fxFlex=\"*\" fxLayoutAlign=\"end center\">\n <button mat-icon-button [matTooltip]=\"'Espandi tutto'\" (click)=\"expandAll()\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Comprimi tutto'\" (click)=\"collapseAll()\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'Azzera selezione'\" [disabled]=\"!hasSelection()\"\n (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto;\">\n <mat-tree [dataSource]=\"tree()\" [childrenAccessor]=\"treeChildrenAccessor\" class=\"tree\">\n <!-- Leaf node -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\n class=\"tree-node\" [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button disabled style=\"visibility: hidden\"></button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n <!-- Expandable node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [matTreeNodePaddingIndent]=\"20\" #treeNode=\"matTreeNode\" class=\"tree-node\"\n [class.tree-node-filtered]=\"filteredNode()?.id === node.id\"\n [class.tree-node-no-select]=\"!isSelectable(node)\"\n [attr.data-node-id]=\"node.id\">\n <button mat-icon-button matTreeNodeToggle>\n <mat-icon>{{treeNode.isExpanded ? 'expand_more' : 'chevron_right'}}</mat-icon>\n </button>\n @if (isSelectable(node)) {\n <mat-checkbox [checked]=\"isSelected(node)\" [indeterminate]=\"isIndeterminate(node)\"\n [disabled]=\"disabled()\" (change)=\"toggleNode(node)\">\n <span class=\"small\">{{node.name}}</span>\n </mat-checkbox>\n } @else {\n <div class=\"tree-node-label-only\">\n <span class=\"small\">{{node.name}}</span>\n </div>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </div>\n </mat-tab>\n <mat-tab [label]=\"hasSelection() ? 'Selezionati (' + selectedVisibleCount() + ')' : 'Selezionati (tutti)'\"\n style=\"height: 100%;\">\n <div fxLayout=\"column\" fxFill style=\"overflow: hidden; height: 100%;\">\n <div fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"8px\" style=\"padding:12px\">\n @if (!hasSelection()) {\n <mat-icon>info</mat-icon>\n <span [innerHTML]=\"descriptionEmpty() | safeHtml\"></span>\n } @else {\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-button color=\"warn\" style=\"margin-left:auto\" (click)=\"clearAll()\">\n <mat-icon>deselect</mat-icon> Azzera tutto\n </button>\n </div>\n }\n </div>\n </div>\n <div fxFlex=\"*\" style=\"overflow-y: auto; padding-bottom: 12px;\">\n <mat-chip-set>\n @for (id of selection(); track id) {\n @let node = nodeById(id);\n @if (node && isChipVisible(id)) {\n <mat-chip (removed)=\"removeNode(node)\" style=\"max-width: 280px;\" [matTooltip]=\"node.name\">\n {{node.name}}\n @if (!disabled()) {\n <button matChipRemove matTooltip=\"Elimina\"><mat-icon>cancel</mat-icon></button>\n }\n </mat-chip>\n }\n }\n </mat-chip-set>\n </div>\n </div>\n </mat-tab>\n</mat-tab-group>", styles: [".tree-picker-tabs ::ng-deep .mat-mdc-tab-body-wrapper{flex:1 1 auto;height:100%}.tree{padding:8px 0 16px;background-color:transparent!important}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:not(.tree-node-no-select):hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-filtered ::ng-deep .mdc-label,.tree-node-filtered ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-accent, #7894ae)!important}.tree-node-filtered .tree-node-label-only{font-weight:700;color:var(--ars-color-accent, #7894ae);opacity:1}.tree-node-activated ::ng-deep .mdc-label,.tree-node-activated ::ng-deep .mat-mdc-checkbox label{font-weight:700;color:var(--ars-color-secondary, #4a635f)!important}.tree-node-label-only{display:flex;flex-direction:column;justify-content:center;padding-left:30px;opacity:.7}\n"] }]
|
|
937
|
-
}], ctorParameters: () => [], propDecorators: { tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], descriptionEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptionEmpty", required: false }] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], maxDepthOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepthOverrides", required: false }] }], minDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDepth", required: false }] }], selectionCount: [{ type: i0.Output, args: ["selectionCount"] }], changed: [{ type: i0.Output, args: ["changed"] }], _treeRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTree), { isSignal: true }] }] } });
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* A blank calendar header that hides the month/year navigation controls.
|
|
941
|
-
* Used when an inline calendar should render without any navigation UI.
|
|
942
|
-
*/
|
|
943
|
-
class CalendarEmptyHeader {
|
|
944
|
-
constructor() {
|
|
945
|
-
this.destroyRef = inject(DestroyRef);
|
|
946
|
-
this.calendar = inject((MatCalendar));
|
|
947
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
948
|
-
// Re-run change detection whenever the calendar's internal state changes
|
|
949
|
-
// (e.g. active date, selected date) so the blank header stays in sync.
|
|
950
|
-
this.calendar.stateChanges
|
|
951
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
952
|
-
.subscribe(() => this.changeDetector.markForCheck());
|
|
953
|
-
}
|
|
954
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CalendarEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
955
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: CalendarEmptyHeader, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
956
|
-
}
|
|
957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CalendarEmptyHeader, decorators: [{
|
|
958
|
-
type: Component,
|
|
959
|
-
args: [{
|
|
960
|
-
template: '<div></div>',
|
|
961
|
-
standalone: true,
|
|
962
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
963
|
-
}]
|
|
964
|
-
}], ctorParameters: () => [] });
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Works around a MatDatepicker/Signal Forms interop bug.
|
|
968
|
-
*
|
|
969
|
-
* `MatDatepickerInputBase._onInput()` only notifies its registered validator-change
|
|
970
|
-
* callback from the branch it does not take when the parsed date is null. Signal
|
|
971
|
-
* Forms recomputes CVA parse errors from that callback or from a model value
|
|
972
|
-
* change, and neither happens while the user erases an unparseable date one
|
|
973
|
-
* character at a time (the model is already `null`, so the signal write is a
|
|
974
|
-
* no-op). The stale `matDatepickerParse` error therefore survives on an empty
|
|
975
|
-
* field. Notifying on every keystroke re-runs the datepicker validators.
|
|
976
|
-
*/
|
|
977
|
-
class MatDatepickerParseErrorFixDirective {
|
|
978
|
-
constructor() {
|
|
979
|
-
this.singleDate = inject(MatDatepickerInput, {
|
|
980
|
-
optional: true,
|
|
981
|
-
self: true,
|
|
982
|
-
});
|
|
983
|
-
this.startDate = inject(MatStartDate, {
|
|
984
|
-
optional: true,
|
|
985
|
-
self: true,
|
|
986
|
-
});
|
|
987
|
-
this.endDate = inject(MatEndDate, {
|
|
988
|
-
optional: true,
|
|
989
|
-
self: true,
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
/**
|
|
993
|
-
* Re-runs the datepicker validators after Material has updated its internal
|
|
994
|
-
* parse flag.
|
|
995
|
-
*
|
|
996
|
-
* @returns Nothing.
|
|
997
|
-
*/
|
|
998
|
-
onInput() {
|
|
999
|
-
// Deferred: Material updates `_lastValueValid` in its own `input` host
|
|
1000
|
-
// listener, and host listener order across directives is not guaranteed.
|
|
1001
|
-
queueMicrotask(() => this.revalidate());
|
|
1002
|
-
}
|
|
1003
|
-
/**
|
|
1004
|
-
* Notifies the validator-change callback of this input and, for range parts,
|
|
1005
|
-
* of the sibling input as well.
|
|
1006
|
-
*
|
|
1007
|
-
* @returns Nothing.
|
|
1008
|
-
*/
|
|
1009
|
-
revalidate() {
|
|
1010
|
-
const host = this.singleDate ?? this.startDate ?? this.endDate;
|
|
1011
|
-
if (!host) {
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
host._validatorOnChange();
|
|
1015
|
-
const rangePart = this.startDate ?? this.endDate;
|
|
1016
|
-
if (!rangePart) {
|
|
1017
|
-
return;
|
|
1018
|
-
}
|
|
1019
|
-
const rangeInput = rangePart._rangeInput;
|
|
1020
|
-
const sibling = this.startDate ? rangeInput._endInput : rangeInput._startInput;
|
|
1021
|
-
sibling?._validatorOnChange();
|
|
1022
|
-
}
|
|
1023
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MatDatepickerParseErrorFixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1024
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: MatDatepickerParseErrorFixDirective, isStandalone: true, selector: "input[matDatepicker], input[matStartDate], input[matEndDate]", host: { listeners: { "input": "onInput()" } }, ngImport: i0 }); }
|
|
1025
|
-
}
|
|
1026
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MatDatepickerParseErrorFixDirective, decorators: [{
|
|
1027
|
-
type: Directive,
|
|
1028
|
-
args: [{
|
|
1029
|
-
selector: 'input[matDatepicker], input[matStartDate], input[matEndDate]',
|
|
1030
|
-
}]
|
|
1031
|
-
}], propDecorators: { onInput: [{
|
|
1032
|
-
type: HostListener,
|
|
1033
|
-
args: ['input']
|
|
1034
|
-
}] } });
|
|
1035
|
-
|
|
1036
601
|
/*
|
|
1037
602
|
* Public API Surface of @arsedizioni/ars-utils/ui.controls
|
|
603
|
+
*
|
|
604
|
+
* Small form controls sharing the same Material base (button, icon, form-field). The datepicker
|
|
605
|
+
* pieces live in `ui.controls.date` and the tree picker in `ui.controls.tree`, so that a chunk
|
|
606
|
+
* needing one of those does not link this file, and vice versa.
|
|
1038
607
|
*/
|
|
1039
608
|
|
|
1040
609
|
/**
|
|
1041
610
|
* Generated bundle index. Do not edit.
|
|
1042
611
|
*/
|
|
1043
612
|
|
|
1044
|
-
export { ButtonSelectorComponent, ButtonToggleComponent,
|
|
613
|
+
export { ButtonSelectorComponent, ButtonToggleComponent, ChipsSelectorComponent };
|
|
1045
614
|
//# sourceMappingURL=arsedizioni-ars-utils-ui.controls.mjs.map
|