@arsedizioni/ars-utils 22.6.86 → 22.6.88
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.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,614 +1,1608 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { coerceBooleanProperty } from
|
|
4
|
-
import * as i4 from
|
|
5
|
-
import { MatButtonModule } from
|
|
6
|
-
import * as i3 from
|
|
7
|
-
import { MatIconModule } from
|
|
8
|
-
import * as i5 from
|
|
9
|
-
import { MatMenuModule } from
|
|
10
|
-
import {
|
|
11
|
-
import * as i2 from
|
|
12
|
-
import { FlexLayoutModule } from
|
|
13
|
-
import { Subject,
|
|
14
|
-
import * as i1 from
|
|
15
|
-
import { takeUntilDestroyed } from
|
|
16
|
-
import {
|
|
17
|
-
import * as i7 from
|
|
18
|
-
import { MatBadgeModule } from
|
|
19
|
-
import * as i4
|
|
20
|
-
import { MatChipsModule } from
|
|
21
|
-
import * as i2
|
|
22
|
-
import { MatFormFieldModule } from
|
|
23
|
-
import * as i3
|
|
24
|
-
import { MatSelectModule } from
|
|
25
|
-
import * as i8 from
|
|
26
|
-
import { MatTooltipModule } from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", 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 }); }
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Input, Optional, Renderer2, Self, afterNextRender, booleanAttribute, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
4
|
+
import * as i4$1 from "@angular/material/button";
|
|
5
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
6
|
+
import * as i3$1 from "@angular/material/icon";
|
|
7
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
8
|
+
import * as i5 from "@angular/material/menu";
|
|
9
|
+
import { MatMenuModule } from "@angular/material/menu";
|
|
10
|
+
import { SafeHtmlPipe, SystemUtils } from "@arsedizioni/ars-utils/core";
|
|
11
|
+
import * as i2$1 from "@arsedizioni/ars-utils/ui";
|
|
12
|
+
import { FlexLayoutModule } from "@arsedizioni/ars-utils/ui";
|
|
13
|
+
import { Subject, animationFrameScheduler, auditTime } from "rxjs";
|
|
14
|
+
import * as i1 from "@angular/forms";
|
|
15
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
16
|
+
import { FormField, form } from "@angular/forms/signals";
|
|
17
|
+
import * as i7 from "@angular/material/badge";
|
|
18
|
+
import { MatBadgeModule } from "@angular/material/badge";
|
|
19
|
+
import * as i4 from "@angular/material/chips";
|
|
20
|
+
import { MatChipsModule } from "@angular/material/chips";
|
|
21
|
+
import * as i2 from "@angular/material/form-field";
|
|
22
|
+
import { MatFormFieldModule } from "@angular/material/form-field";
|
|
23
|
+
import * as i3 from "@angular/material/select";
|
|
24
|
+
import { MatSelectModule } from "@angular/material/select";
|
|
25
|
+
import * as i8 from "@angular/material/tooltip";
|
|
26
|
+
import { MatTooltipModule } from "@angular/material/tooltip";
|
|
27
|
+
var ButtonSelectorComponent = class ButtonSelectorComponent {
|
|
28
|
+
set value(value) {
|
|
29
|
+
this.setValue(value, true);
|
|
30
|
+
}
|
|
31
|
+
setValue(value, propagate) {
|
|
32
|
+
this._value = value;
|
|
33
|
+
if (propagate) this.propagateChange(this._value);
|
|
34
|
+
this.stateChanges.next();
|
|
35
|
+
this.changed.emit(this._value);
|
|
36
|
+
this.current.set(this._value);
|
|
37
|
+
}
|
|
38
|
+
get value() {
|
|
39
|
+
return this._value;
|
|
40
|
+
}
|
|
41
|
+
get disabled() {
|
|
42
|
+
if (this.ngControl && this.ngControl.disabled != null) return this.ngControl.disabled;
|
|
43
|
+
return this._disabled;
|
|
44
|
+
}
|
|
45
|
+
set disabled(value) {
|
|
46
|
+
this._disabled = coerceBooleanProperty(value);
|
|
47
|
+
if (this.focused) {
|
|
48
|
+
this.focused = false;
|
|
49
|
+
this.stateChanges.next();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
constructor(ngControl) {
|
|
53
|
+
this.ngControl = ngControl;
|
|
54
|
+
this.changed = output();
|
|
55
|
+
this.selected = output();
|
|
56
|
+
this.stateChanges = new Subject();
|
|
57
|
+
this.focused = false;
|
|
58
|
+
this._value = void 0;
|
|
59
|
+
this._disabled = false;
|
|
60
|
+
this.propagateChange = () => {};
|
|
61
|
+
this.propagateTouched = () => {};
|
|
62
|
+
this.id = `button-selector--${SystemUtils.generateUUID()}`;
|
|
63
|
+
this.describedBy = "";
|
|
64
|
+
this.renderer = inject(Renderer2);
|
|
65
|
+
this.current = signal(void 0, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.width = input(-1, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.border = input(-1, ...ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.borderRadius = input("9999px", ...ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.label = input(void 0, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.labelSelected = input(void 0, ...ngDevMode ? [{ debugName: "labelSelected" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.autoSelect = input(false, ...ngDevMode ? [{ debugName: "autoSelect" }] : /* istanbul ignore next */ []);
|
|
73
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
74
|
+
effect(() => {
|
|
75
|
+
if (this.autoSelect()) {
|
|
76
|
+
const options = this.options();
|
|
77
|
+
if (options.length > 0 && options[0].value !== void 0) this.current.set(options[0]);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
ngOnDestroy() {
|
|
82
|
+
this.stateChanges.complete();
|
|
83
|
+
}
|
|
84
|
+
writeValue(value) {
|
|
85
|
+
this.setValue(value, false);
|
|
86
|
+
}
|
|
87
|
+
registerOnChange(fn) {
|
|
88
|
+
this.propagateChange = fn;
|
|
89
|
+
}
|
|
90
|
+
registerOnTouched(fn) {
|
|
91
|
+
this.propagateTouched = fn;
|
|
92
|
+
}
|
|
93
|
+
setDescribedByIds(ids) {
|
|
94
|
+
this.describedBy = ids.join(" ");
|
|
95
|
+
}
|
|
96
|
+
setDisabledState(isDisabled) {
|
|
97
|
+
this._disabled = isDisabled;
|
|
98
|
+
if (isDisabled && this.focused) {
|
|
99
|
+
this.focused = false;
|
|
100
|
+
this.stateChanges.next();
|
|
101
|
+
}
|
|
102
|
+
if (!SystemUtils.isBrowser()) return;
|
|
103
|
+
const elem = document.getElementById(this.id);
|
|
104
|
+
if (elem) this.renderer.setProperty(elem, "disabled", isDisabled);
|
|
105
|
+
}
|
|
106
|
+
onContainerClick() {
|
|
107
|
+
if (!this.focused) {
|
|
108
|
+
if (!SystemUtils.isBrowser()) return;
|
|
109
|
+
const elem = document.getElementById(this.id);
|
|
110
|
+
if (elem) {
|
|
111
|
+
elem.focus();
|
|
112
|
+
this.propagateTouched();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
select(item, notify = true) {
|
|
117
|
+
this.setValue(item, true);
|
|
118
|
+
if (notify) this.selected.emit(item);
|
|
119
|
+
}
|
|
120
|
+
reset() {
|
|
121
|
+
this.setValue(void 0, true);
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.1",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: ButtonSelectorComponent,
|
|
129
|
+
deps: [{
|
|
130
|
+
token: i1.NgControl,
|
|
131
|
+
optional: true,
|
|
132
|
+
self: true
|
|
133
|
+
}],
|
|
134
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
static {
|
|
138
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
139
|
+
minVersion: "17.0.0",
|
|
140
|
+
version: "22.2.1",
|
|
141
|
+
type: ButtonSelectorComponent,
|
|
142
|
+
isStandalone: true,
|
|
143
|
+
selector: "button-selector",
|
|
144
|
+
inputs: {
|
|
145
|
+
disabled: {
|
|
146
|
+
classPropertyName: "disabled",
|
|
147
|
+
publicName: "disabled",
|
|
148
|
+
isSignal: false,
|
|
149
|
+
isRequired: false,
|
|
150
|
+
transformFunction: null
|
|
151
|
+
},
|
|
152
|
+
width: {
|
|
153
|
+
classPropertyName: "width",
|
|
154
|
+
publicName: "width",
|
|
155
|
+
isSignal: true,
|
|
156
|
+
isRequired: false,
|
|
157
|
+
transformFunction: null
|
|
158
|
+
},
|
|
159
|
+
border: {
|
|
160
|
+
classPropertyName: "border",
|
|
161
|
+
publicName: "border",
|
|
162
|
+
isSignal: true,
|
|
163
|
+
isRequired: false,
|
|
164
|
+
transformFunction: null
|
|
165
|
+
},
|
|
166
|
+
borderRadius: {
|
|
167
|
+
classPropertyName: "borderRadius",
|
|
168
|
+
publicName: "borderRadius",
|
|
169
|
+
isSignal: true,
|
|
170
|
+
isRequired: false,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
},
|
|
173
|
+
label: {
|
|
174
|
+
classPropertyName: "label",
|
|
175
|
+
publicName: "label",
|
|
176
|
+
isSignal: true,
|
|
177
|
+
isRequired: false,
|
|
178
|
+
transformFunction: null
|
|
179
|
+
},
|
|
180
|
+
labelSelected: {
|
|
181
|
+
classPropertyName: "labelSelected",
|
|
182
|
+
publicName: "labelSelected",
|
|
183
|
+
isSignal: true,
|
|
184
|
+
isRequired: false,
|
|
185
|
+
transformFunction: null
|
|
186
|
+
},
|
|
187
|
+
options: {
|
|
188
|
+
classPropertyName: "options",
|
|
189
|
+
publicName: "options",
|
|
190
|
+
isSignal: true,
|
|
191
|
+
isRequired: false,
|
|
192
|
+
transformFunction: null
|
|
193
|
+
},
|
|
194
|
+
autoSelect: {
|
|
195
|
+
classPropertyName: "autoSelect",
|
|
196
|
+
publicName: "autoSelect",
|
|
197
|
+
isSignal: true,
|
|
198
|
+
isRequired: false,
|
|
199
|
+
transformFunction: null
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
outputs: {
|
|
203
|
+
changed: "changed",
|
|
204
|
+
selected: "selected"
|
|
205
|
+
},
|
|
206
|
+
host: { properties: {
|
|
207
|
+
"id": "id",
|
|
208
|
+
"attr.aria-describedBy": "describedBy"
|
|
209
|
+
} },
|
|
210
|
+
ngImport: i0,
|
|
211
|
+
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>",
|
|
212
|
+
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"],
|
|
213
|
+
dependencies: [
|
|
214
|
+
{
|
|
215
|
+
kind: "ngmodule",
|
|
216
|
+
type: FlexLayoutModule
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
kind: "directive",
|
|
220
|
+
type: i2$1.FxLayoutDirective,
|
|
221
|
+
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] ",
|
|
222
|
+
inputs: [
|
|
223
|
+
"fxLayout",
|
|
224
|
+
"fxLayout.xs",
|
|
225
|
+
"fxLayout.sm",
|
|
226
|
+
"fxLayout.md",
|
|
227
|
+
"fxLayout.lg",
|
|
228
|
+
"fxLayout.xl",
|
|
229
|
+
"fxLayout.lt-sm",
|
|
230
|
+
"fxLayout.lt-md",
|
|
231
|
+
"fxLayout.lt-lg",
|
|
232
|
+
"fxLayout.lt-xl",
|
|
233
|
+
"fxLayout.gt-xs",
|
|
234
|
+
"fxLayout.gt-sm",
|
|
235
|
+
"fxLayout.gt-md",
|
|
236
|
+
"fxLayout.gt-lg"
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
kind: "directive",
|
|
241
|
+
type: i2$1.FxFlexDirective,
|
|
242
|
+
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] ",
|
|
243
|
+
inputs: [
|
|
244
|
+
"fxFlex",
|
|
245
|
+
"fxFlex.xs",
|
|
246
|
+
"fxFlex.sm",
|
|
247
|
+
"fxFlex.md",
|
|
248
|
+
"fxFlex.lg",
|
|
249
|
+
"fxFlex.xl",
|
|
250
|
+
"fxFlex.lt-sm",
|
|
251
|
+
"fxFlex.lt-md",
|
|
252
|
+
"fxFlex.lt-lg",
|
|
253
|
+
"fxFlex.lt-xl",
|
|
254
|
+
"fxFlex.gt-xs",
|
|
255
|
+
"fxFlex.gt-sm",
|
|
256
|
+
"fxFlex.gt-md",
|
|
257
|
+
"fxFlex.gt-lg"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
kind: "directive",
|
|
262
|
+
type: i2$1.FxShowHideDirective,
|
|
263
|
+
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] ",
|
|
264
|
+
inputs: [
|
|
265
|
+
"fxShow",
|
|
266
|
+
"fxShow.xs",
|
|
267
|
+
"fxShow.sm",
|
|
268
|
+
"fxShow.md",
|
|
269
|
+
"fxShow.lg",
|
|
270
|
+
"fxShow.xl",
|
|
271
|
+
"fxShow.lt-sm",
|
|
272
|
+
"fxShow.lt-md",
|
|
273
|
+
"fxShow.lt-lg",
|
|
274
|
+
"fxShow.lt-xl",
|
|
275
|
+
"fxShow.gt-xs",
|
|
276
|
+
"fxShow.gt-sm",
|
|
277
|
+
"fxShow.gt-md",
|
|
278
|
+
"fxShow.gt-lg",
|
|
279
|
+
"fxHide",
|
|
280
|
+
"fxHide.xs",
|
|
281
|
+
"fxHide.sm",
|
|
282
|
+
"fxHide.md",
|
|
283
|
+
"fxHide.lg",
|
|
284
|
+
"fxHide.xl",
|
|
285
|
+
"fxHide.lt-sm",
|
|
286
|
+
"fxHide.lt-md",
|
|
287
|
+
"fxHide.lt-lg",
|
|
288
|
+
"fxHide.lt-xl",
|
|
289
|
+
"fxHide.gt-xs",
|
|
290
|
+
"fxHide.gt-sm",
|
|
291
|
+
"fxHide.gt-md",
|
|
292
|
+
"fxHide.gt-lg"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
kind: "directive",
|
|
297
|
+
type: i2$1.FxLayoutAlignDirective,
|
|
298
|
+
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] ",
|
|
299
|
+
inputs: [
|
|
300
|
+
"fxLayoutAlign",
|
|
301
|
+
"fxLayoutAlign.xs",
|
|
302
|
+
"fxLayoutAlign.sm",
|
|
303
|
+
"fxLayoutAlign.md",
|
|
304
|
+
"fxLayoutAlign.lg",
|
|
305
|
+
"fxLayoutAlign.xl",
|
|
306
|
+
"fxLayoutAlign.lt-sm",
|
|
307
|
+
"fxLayoutAlign.lt-md",
|
|
308
|
+
"fxLayoutAlign.lt-lg",
|
|
309
|
+
"fxLayoutAlign.lt-xl",
|
|
310
|
+
"fxLayoutAlign.gt-xs",
|
|
311
|
+
"fxLayoutAlign.gt-sm",
|
|
312
|
+
"fxLayoutAlign.gt-md",
|
|
313
|
+
"fxLayoutAlign.gt-lg"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
kind: "directive",
|
|
318
|
+
type: i2$1.FxLayoutGapDirective,
|
|
319
|
+
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] ",
|
|
320
|
+
inputs: [
|
|
321
|
+
"fxLayoutGap",
|
|
322
|
+
"fxLayoutGap.xs",
|
|
323
|
+
"fxLayoutGap.sm",
|
|
324
|
+
"fxLayoutGap.md",
|
|
325
|
+
"fxLayoutGap.lg",
|
|
326
|
+
"fxLayoutGap.xl",
|
|
327
|
+
"fxLayoutGap.lt-sm",
|
|
328
|
+
"fxLayoutGap.lt-md",
|
|
329
|
+
"fxLayoutGap.lt-lg",
|
|
330
|
+
"fxLayoutGap.lt-xl",
|
|
331
|
+
"fxLayoutGap.gt-xs",
|
|
332
|
+
"fxLayoutGap.gt-sm",
|
|
333
|
+
"fxLayoutGap.gt-md",
|
|
334
|
+
"fxLayoutGap.gt-lg"
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
kind: "directive",
|
|
339
|
+
type: i2$1.FxFlexAlignDirective,
|
|
340
|
+
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] ",
|
|
341
|
+
inputs: [
|
|
342
|
+
"fxFlexAlign",
|
|
343
|
+
"fxFlexAlign.xs",
|
|
344
|
+
"fxFlexAlign.sm",
|
|
345
|
+
"fxFlexAlign.md",
|
|
346
|
+
"fxFlexAlign.lg",
|
|
347
|
+
"fxFlexAlign.xl",
|
|
348
|
+
"fxFlexAlign.lt-sm",
|
|
349
|
+
"fxFlexAlign.lt-md",
|
|
350
|
+
"fxFlexAlign.lt-lg",
|
|
351
|
+
"fxFlexAlign.lt-xl",
|
|
352
|
+
"fxFlexAlign.gt-xs",
|
|
353
|
+
"fxFlexAlign.gt-sm",
|
|
354
|
+
"fxFlexAlign.gt-md",
|
|
355
|
+
"fxFlexAlign.gt-lg"
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
kind: "directive",
|
|
360
|
+
type: i2$1.FxFlexFillDirective,
|
|
361
|
+
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] ",
|
|
362
|
+
inputs: [
|
|
363
|
+
"fxFlexFill",
|
|
364
|
+
"fxFill",
|
|
365
|
+
"fxFlexFill.xs",
|
|
366
|
+
"fxFlexFill.sm",
|
|
367
|
+
"fxFlexFill.md",
|
|
368
|
+
"fxFlexFill.lg",
|
|
369
|
+
"fxFlexFill.xl",
|
|
370
|
+
"fxFlexFill.lt-sm",
|
|
371
|
+
"fxFlexFill.lt-md",
|
|
372
|
+
"fxFlexFill.lt-lg",
|
|
373
|
+
"fxFlexFill.lt-xl",
|
|
374
|
+
"fxFlexFill.gt-xs",
|
|
375
|
+
"fxFlexFill.gt-sm",
|
|
376
|
+
"fxFlexFill.gt-md",
|
|
377
|
+
"fxFlexFill.gt-lg"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
kind: "ngmodule",
|
|
382
|
+
type: MatIconModule
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
kind: "component",
|
|
386
|
+
type: i3$1.MatIcon,
|
|
387
|
+
selector: "mat-icon",
|
|
388
|
+
inputs: [
|
|
389
|
+
"color",
|
|
390
|
+
"inline",
|
|
391
|
+
"svgIcon",
|
|
392
|
+
"fontSet",
|
|
393
|
+
"fontIcon"
|
|
394
|
+
],
|
|
395
|
+
exportAs: ["matIcon"]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
kind: "ngmodule",
|
|
399
|
+
type: MatButtonModule
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
kind: "component",
|
|
403
|
+
type: i4$1.MatButton,
|
|
404
|
+
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] ",
|
|
405
|
+
inputs: ["matButton"],
|
|
406
|
+
exportAs: ["matButton", "matAnchor"]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
kind: "ngmodule",
|
|
410
|
+
type: MatMenuModule
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
kind: "component",
|
|
414
|
+
type: i5.MatMenu,
|
|
415
|
+
selector: "mat-menu",
|
|
416
|
+
inputs: [
|
|
417
|
+
"backdropClass",
|
|
418
|
+
"aria-label",
|
|
419
|
+
"aria-labelledby",
|
|
420
|
+
"aria-describedby",
|
|
421
|
+
"xPosition",
|
|
422
|
+
"yPosition",
|
|
423
|
+
"overlapTrigger",
|
|
424
|
+
"hasBackdrop",
|
|
425
|
+
"class",
|
|
426
|
+
"classList"
|
|
427
|
+
],
|
|
428
|
+
outputs: ["closed", "close"],
|
|
429
|
+
exportAs: ["matMenu"]
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
kind: "component",
|
|
433
|
+
type: i5.MatMenuItem,
|
|
434
|
+
selector: "[mat-menu-item]",
|
|
435
|
+
inputs: [
|
|
436
|
+
"role",
|
|
437
|
+
"disabled",
|
|
438
|
+
"disabledInteractive",
|
|
439
|
+
"disableRipple"
|
|
440
|
+
],
|
|
441
|
+
exportAs: ["matMenuItem"]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
kind: "directive",
|
|
445
|
+
type: i5.MatMenuTrigger,
|
|
446
|
+
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
447
|
+
inputs: [
|
|
448
|
+
"mat-menu-trigger-for",
|
|
449
|
+
"matMenuTriggerFor",
|
|
450
|
+
"matMenuTriggerData",
|
|
451
|
+
"matMenuTriggerRestoreFocus"
|
|
452
|
+
],
|
|
453
|
+
outputs: [
|
|
454
|
+
"menuOpened",
|
|
455
|
+
"onMenuOpen",
|
|
456
|
+
"menuClosed",
|
|
457
|
+
"onMenuClose"
|
|
458
|
+
],
|
|
459
|
+
exportAs: ["matMenuTrigger"]
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
467
|
+
minVersion: "12.0.0",
|
|
468
|
+
version: "22.2.1",
|
|
469
|
+
ngImport: i0,
|
|
470
|
+
type: ButtonSelectorComponent,
|
|
471
|
+
decorators: [{
|
|
472
|
+
type: Component,
|
|
473
|
+
args: [{
|
|
474
|
+
selector: "button-selector",
|
|
475
|
+
standalone: true,
|
|
476
|
+
imports: [
|
|
477
|
+
FlexLayoutModule,
|
|
478
|
+
MatIconModule,
|
|
479
|
+
MatButtonModule,
|
|
480
|
+
MatMenuModule
|
|
481
|
+
],
|
|
482
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
483
|
+
host: {
|
|
484
|
+
"[id]": "id",
|
|
485
|
+
"[attr.aria-describedBy]": "describedBy"
|
|
486
|
+
},
|
|
487
|
+
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>",
|
|
488
|
+
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"]
|
|
489
|
+
}]
|
|
490
|
+
}],
|
|
491
|
+
ctorParameters: () => [{
|
|
492
|
+
type: i1.NgControl,
|
|
493
|
+
decorators: [{ type: Optional }, { type: Self }]
|
|
494
|
+
}],
|
|
495
|
+
propDecorators: {
|
|
496
|
+
changed: [{
|
|
497
|
+
type: i0.Output,
|
|
498
|
+
args: ["changed"]
|
|
499
|
+
}],
|
|
500
|
+
selected: [{
|
|
501
|
+
type: i0.Output,
|
|
502
|
+
args: ["selected"]
|
|
503
|
+
}],
|
|
504
|
+
disabled: [{ type: Input }],
|
|
505
|
+
width: [{
|
|
506
|
+
type: i0.Input,
|
|
507
|
+
args: [{
|
|
508
|
+
isSignal: true,
|
|
509
|
+
alias: "width",
|
|
510
|
+
required: false
|
|
511
|
+
}]
|
|
512
|
+
}],
|
|
513
|
+
border: [{
|
|
514
|
+
type: i0.Input,
|
|
515
|
+
args: [{
|
|
516
|
+
isSignal: true,
|
|
517
|
+
alias: "border",
|
|
518
|
+
required: false
|
|
519
|
+
}]
|
|
520
|
+
}],
|
|
521
|
+
borderRadius: [{
|
|
522
|
+
type: i0.Input,
|
|
523
|
+
args: [{
|
|
524
|
+
isSignal: true,
|
|
525
|
+
alias: "borderRadius",
|
|
526
|
+
required: false
|
|
527
|
+
}]
|
|
528
|
+
}],
|
|
529
|
+
label: [{
|
|
530
|
+
type: i0.Input,
|
|
531
|
+
args: [{
|
|
532
|
+
isSignal: true,
|
|
533
|
+
alias: "label",
|
|
534
|
+
required: false
|
|
535
|
+
}]
|
|
536
|
+
}],
|
|
537
|
+
labelSelected: [{
|
|
538
|
+
type: i0.Input,
|
|
539
|
+
args: [{
|
|
540
|
+
isSignal: true,
|
|
541
|
+
alias: "labelSelected",
|
|
542
|
+
required: false
|
|
543
|
+
}]
|
|
544
|
+
}],
|
|
545
|
+
options: [{
|
|
546
|
+
type: i0.Input,
|
|
547
|
+
args: [{
|
|
548
|
+
isSignal: true,
|
|
549
|
+
alias: "options",
|
|
550
|
+
required: false
|
|
551
|
+
}]
|
|
552
|
+
}],
|
|
553
|
+
autoSelect: [{
|
|
554
|
+
type: i0.Input,
|
|
555
|
+
args: [{
|
|
556
|
+
isSignal: true,
|
|
557
|
+
alias: "autoSelect",
|
|
558
|
+
required: false
|
|
559
|
+
}]
|
|
560
|
+
}]
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
var ButtonToggleComponent = class ButtonToggleComponent {
|
|
564
|
+
constructor() {
|
|
565
|
+
this.changed = output();
|
|
566
|
+
this.value = input(false, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
567
|
+
this.width = input(-1, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
568
|
+
this.border = input(-1, ...ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []);
|
|
569
|
+
this.labelOn = input(void 0, ...ngDevMode ? [{ debugName: "labelOn" }] : /* istanbul ignore next */ []);
|
|
570
|
+
this.labelOff = input(void 0, ...ngDevMode ? [{ debugName: "labelOff" }] : /* istanbul ignore next */ []);
|
|
571
|
+
this.iconOn = input(void 0, ...ngDevMode ? [{ debugName: "iconOn" }] : /* istanbul ignore next */ []);
|
|
572
|
+
this.iconOff = input(void 0, ...ngDevMode ? [{ debugName: "iconOff" }] : /* istanbul ignore next */ []);
|
|
573
|
+
this.cssClass = input(void 0, ...ngDevMode ? [{ debugName: "cssClass" }] : /* istanbul ignore next */ []);
|
|
574
|
+
this.cssClassSmall = input(void 0, ...ngDevMode ? [{ debugName: "cssClassSmall" }] : /* istanbul ignore next */ []);
|
|
575
|
+
this.label = computed(() => this.value() ? this.labelOn() ?? "" : this.labelOff() ?? "", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
576
|
+
this.icon = computed(() => this.value() ? this.iconOn() ?? "" : this.iconOff() ?? "", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
577
|
+
}
|
|
578
|
+
toggle() {
|
|
579
|
+
const toggled = !this.value();
|
|
580
|
+
this.changed.emit({
|
|
581
|
+
value: this.value(),
|
|
582
|
+
toggled
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
static {
|
|
586
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
587
|
+
minVersion: "12.0.0",
|
|
588
|
+
version: "22.2.1",
|
|
589
|
+
ngImport: i0,
|
|
590
|
+
type: ButtonToggleComponent,
|
|
591
|
+
deps: [],
|
|
592
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
static {
|
|
596
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
597
|
+
minVersion: "17.0.0",
|
|
598
|
+
version: "22.2.1",
|
|
599
|
+
type: ButtonToggleComponent,
|
|
600
|
+
isStandalone: true,
|
|
601
|
+
selector: "button-toggle",
|
|
602
|
+
inputs: {
|
|
603
|
+
value: {
|
|
604
|
+
classPropertyName: "value",
|
|
605
|
+
publicName: "value",
|
|
606
|
+
isSignal: true,
|
|
607
|
+
isRequired: false,
|
|
608
|
+
transformFunction: null
|
|
609
|
+
},
|
|
610
|
+
width: {
|
|
611
|
+
classPropertyName: "width",
|
|
612
|
+
publicName: "width",
|
|
613
|
+
isSignal: true,
|
|
614
|
+
isRequired: false,
|
|
615
|
+
transformFunction: null
|
|
616
|
+
},
|
|
617
|
+
border: {
|
|
618
|
+
classPropertyName: "border",
|
|
619
|
+
publicName: "border",
|
|
620
|
+
isSignal: true,
|
|
621
|
+
isRequired: false,
|
|
622
|
+
transformFunction: null
|
|
623
|
+
},
|
|
624
|
+
labelOn: {
|
|
625
|
+
classPropertyName: "labelOn",
|
|
626
|
+
publicName: "labelOn",
|
|
627
|
+
isSignal: true,
|
|
628
|
+
isRequired: false,
|
|
629
|
+
transformFunction: null
|
|
630
|
+
},
|
|
631
|
+
labelOff: {
|
|
632
|
+
classPropertyName: "labelOff",
|
|
633
|
+
publicName: "labelOff",
|
|
634
|
+
isSignal: true,
|
|
635
|
+
isRequired: false,
|
|
636
|
+
transformFunction: null
|
|
637
|
+
},
|
|
638
|
+
iconOn: {
|
|
639
|
+
classPropertyName: "iconOn",
|
|
640
|
+
publicName: "iconOn",
|
|
641
|
+
isSignal: true,
|
|
642
|
+
isRequired: false,
|
|
643
|
+
transformFunction: null
|
|
644
|
+
},
|
|
645
|
+
iconOff: {
|
|
646
|
+
classPropertyName: "iconOff",
|
|
647
|
+
publicName: "iconOff",
|
|
648
|
+
isSignal: true,
|
|
649
|
+
isRequired: false,
|
|
650
|
+
transformFunction: null
|
|
651
|
+
},
|
|
652
|
+
cssClass: {
|
|
653
|
+
classPropertyName: "cssClass",
|
|
654
|
+
publicName: "cssClass",
|
|
655
|
+
isSignal: true,
|
|
656
|
+
isRequired: false,
|
|
657
|
+
transformFunction: null
|
|
658
|
+
},
|
|
659
|
+
cssClassSmall: {
|
|
660
|
+
classPropertyName: "cssClassSmall",
|
|
661
|
+
publicName: "cssClassSmall",
|
|
662
|
+
isSignal: true,
|
|
663
|
+
isRequired: false,
|
|
664
|
+
transformFunction: null
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
outputs: { changed: "changed" },
|
|
668
|
+
ngImport: i0,
|
|
669
|
+
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>",
|
|
670
|
+
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"],
|
|
671
|
+
dependencies: [
|
|
672
|
+
{
|
|
673
|
+
kind: "ngmodule",
|
|
674
|
+
type: FlexLayoutModule
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
kind: "directive",
|
|
678
|
+
type: i2$1.FxLayoutDirective,
|
|
679
|
+
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] ",
|
|
680
|
+
inputs: [
|
|
681
|
+
"fxLayout",
|
|
682
|
+
"fxLayout.xs",
|
|
683
|
+
"fxLayout.sm",
|
|
684
|
+
"fxLayout.md",
|
|
685
|
+
"fxLayout.lg",
|
|
686
|
+
"fxLayout.xl",
|
|
687
|
+
"fxLayout.lt-sm",
|
|
688
|
+
"fxLayout.lt-md",
|
|
689
|
+
"fxLayout.lt-lg",
|
|
690
|
+
"fxLayout.lt-xl",
|
|
691
|
+
"fxLayout.gt-xs",
|
|
692
|
+
"fxLayout.gt-sm",
|
|
693
|
+
"fxLayout.gt-md",
|
|
694
|
+
"fxLayout.gt-lg"
|
|
695
|
+
]
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
kind: "directive",
|
|
699
|
+
type: i2$1.FxFlexDirective,
|
|
700
|
+
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] ",
|
|
701
|
+
inputs: [
|
|
702
|
+
"fxFlex",
|
|
703
|
+
"fxFlex.xs",
|
|
704
|
+
"fxFlex.sm",
|
|
705
|
+
"fxFlex.md",
|
|
706
|
+
"fxFlex.lg",
|
|
707
|
+
"fxFlex.xl",
|
|
708
|
+
"fxFlex.lt-sm",
|
|
709
|
+
"fxFlex.lt-md",
|
|
710
|
+
"fxFlex.lt-lg",
|
|
711
|
+
"fxFlex.lt-xl",
|
|
712
|
+
"fxFlex.gt-xs",
|
|
713
|
+
"fxFlex.gt-sm",
|
|
714
|
+
"fxFlex.gt-md",
|
|
715
|
+
"fxFlex.gt-lg"
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
kind: "directive",
|
|
720
|
+
type: i2$1.FxLayoutAlignDirective,
|
|
721
|
+
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] ",
|
|
722
|
+
inputs: [
|
|
723
|
+
"fxLayoutAlign",
|
|
724
|
+
"fxLayoutAlign.xs",
|
|
725
|
+
"fxLayoutAlign.sm",
|
|
726
|
+
"fxLayoutAlign.md",
|
|
727
|
+
"fxLayoutAlign.lg",
|
|
728
|
+
"fxLayoutAlign.xl",
|
|
729
|
+
"fxLayoutAlign.lt-sm",
|
|
730
|
+
"fxLayoutAlign.lt-md",
|
|
731
|
+
"fxLayoutAlign.lt-lg",
|
|
732
|
+
"fxLayoutAlign.lt-xl",
|
|
733
|
+
"fxLayoutAlign.gt-xs",
|
|
734
|
+
"fxLayoutAlign.gt-sm",
|
|
735
|
+
"fxLayoutAlign.gt-md",
|
|
736
|
+
"fxLayoutAlign.gt-lg"
|
|
737
|
+
]
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
kind: "directive",
|
|
741
|
+
type: i2$1.FxLayoutGapDirective,
|
|
742
|
+
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] ",
|
|
743
|
+
inputs: [
|
|
744
|
+
"fxLayoutGap",
|
|
745
|
+
"fxLayoutGap.xs",
|
|
746
|
+
"fxLayoutGap.sm",
|
|
747
|
+
"fxLayoutGap.md",
|
|
748
|
+
"fxLayoutGap.lg",
|
|
749
|
+
"fxLayoutGap.xl",
|
|
750
|
+
"fxLayoutGap.lt-sm",
|
|
751
|
+
"fxLayoutGap.lt-md",
|
|
752
|
+
"fxLayoutGap.lt-lg",
|
|
753
|
+
"fxLayoutGap.lt-xl",
|
|
754
|
+
"fxLayoutGap.gt-xs",
|
|
755
|
+
"fxLayoutGap.gt-sm",
|
|
756
|
+
"fxLayoutGap.gt-md",
|
|
757
|
+
"fxLayoutGap.gt-lg"
|
|
758
|
+
]
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
kind: "directive",
|
|
762
|
+
type: i2$1.FxFlexFillDirective,
|
|
763
|
+
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] ",
|
|
764
|
+
inputs: [
|
|
765
|
+
"fxFlexFill",
|
|
766
|
+
"fxFill",
|
|
767
|
+
"fxFlexFill.xs",
|
|
768
|
+
"fxFlexFill.sm",
|
|
769
|
+
"fxFlexFill.md",
|
|
770
|
+
"fxFlexFill.lg",
|
|
771
|
+
"fxFlexFill.xl",
|
|
772
|
+
"fxFlexFill.lt-sm",
|
|
773
|
+
"fxFlexFill.lt-md",
|
|
774
|
+
"fxFlexFill.lt-lg",
|
|
775
|
+
"fxFlexFill.lt-xl",
|
|
776
|
+
"fxFlexFill.gt-xs",
|
|
777
|
+
"fxFlexFill.gt-sm",
|
|
778
|
+
"fxFlexFill.gt-md",
|
|
779
|
+
"fxFlexFill.gt-lg"
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
kind: "directive",
|
|
784
|
+
type: i2$1.FxClassDirective,
|
|
785
|
+
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] ",
|
|
786
|
+
inputs: [
|
|
787
|
+
"fxClass",
|
|
788
|
+
"fxClass.xs",
|
|
789
|
+
"fxClass.sm",
|
|
790
|
+
"fxClass.md",
|
|
791
|
+
"fxClass.lg",
|
|
792
|
+
"fxClass.xl",
|
|
793
|
+
"fxClass.lt-sm",
|
|
794
|
+
"fxClass.lt-md",
|
|
795
|
+
"fxClass.lt-lg",
|
|
796
|
+
"fxClass.lt-xl",
|
|
797
|
+
"fxClass.gt-xs",
|
|
798
|
+
"fxClass.gt-sm",
|
|
799
|
+
"fxClass.gt-md",
|
|
800
|
+
"fxClass.gt-lg"
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
kind: "ngmodule",
|
|
805
|
+
type: MatIconModule
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
kind: "component",
|
|
809
|
+
type: i3$1.MatIcon,
|
|
810
|
+
selector: "mat-icon",
|
|
811
|
+
inputs: [
|
|
812
|
+
"color",
|
|
813
|
+
"inline",
|
|
814
|
+
"svgIcon",
|
|
815
|
+
"fontSet",
|
|
816
|
+
"fontIcon"
|
|
817
|
+
],
|
|
818
|
+
exportAs: ["matIcon"]
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
kind: "ngmodule",
|
|
822
|
+
type: MatButtonModule
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
kind: "component",
|
|
826
|
+
type: i4$1.MatButton,
|
|
827
|
+
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] ",
|
|
828
|
+
inputs: ["matButton"],
|
|
829
|
+
exportAs: ["matButton", "matAnchor"]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
kind: "pipe",
|
|
833
|
+
type: SafeHtmlPipe,
|
|
834
|
+
name: "safeHtml"
|
|
835
|
+
}
|
|
836
|
+
],
|
|
837
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
842
|
+
minVersion: "12.0.0",
|
|
843
|
+
version: "22.2.1",
|
|
844
|
+
ngImport: i0,
|
|
845
|
+
type: ButtonToggleComponent,
|
|
846
|
+
decorators: [{
|
|
847
|
+
type: Component,
|
|
848
|
+
args: [{
|
|
849
|
+
selector: "button-toggle",
|
|
850
|
+
standalone: true,
|
|
851
|
+
imports: [
|
|
852
|
+
FlexLayoutModule,
|
|
853
|
+
MatIconModule,
|
|
854
|
+
MatButtonModule,
|
|
855
|
+
SafeHtmlPipe
|
|
856
|
+
],
|
|
857
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
858
|
+
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>",
|
|
859
|
+
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"]
|
|
860
|
+
}]
|
|
861
|
+
}],
|
|
862
|
+
propDecorators: {
|
|
863
|
+
changed: [{
|
|
864
|
+
type: i0.Output,
|
|
865
|
+
args: ["changed"]
|
|
866
|
+
}],
|
|
867
|
+
value: [{
|
|
868
|
+
type: i0.Input,
|
|
869
|
+
args: [{
|
|
870
|
+
isSignal: true,
|
|
871
|
+
alias: "value",
|
|
872
|
+
required: false
|
|
873
|
+
}]
|
|
874
|
+
}],
|
|
875
|
+
width: [{
|
|
876
|
+
type: i0.Input,
|
|
877
|
+
args: [{
|
|
878
|
+
isSignal: true,
|
|
879
|
+
alias: "width",
|
|
880
|
+
required: false
|
|
881
|
+
}]
|
|
882
|
+
}],
|
|
883
|
+
border: [{
|
|
884
|
+
type: i0.Input,
|
|
885
|
+
args: [{
|
|
886
|
+
isSignal: true,
|
|
887
|
+
alias: "border",
|
|
888
|
+
required: false
|
|
889
|
+
}]
|
|
890
|
+
}],
|
|
891
|
+
labelOn: [{
|
|
892
|
+
type: i0.Input,
|
|
893
|
+
args: [{
|
|
894
|
+
isSignal: true,
|
|
895
|
+
alias: "labelOn",
|
|
896
|
+
required: false
|
|
897
|
+
}]
|
|
898
|
+
}],
|
|
899
|
+
labelOff: [{
|
|
900
|
+
type: i0.Input,
|
|
901
|
+
args: [{
|
|
902
|
+
isSignal: true,
|
|
903
|
+
alias: "labelOff",
|
|
904
|
+
required: false
|
|
905
|
+
}]
|
|
906
|
+
}],
|
|
907
|
+
iconOn: [{
|
|
908
|
+
type: i0.Input,
|
|
909
|
+
args: [{
|
|
910
|
+
isSignal: true,
|
|
911
|
+
alias: "iconOn",
|
|
912
|
+
required: false
|
|
913
|
+
}]
|
|
914
|
+
}],
|
|
915
|
+
iconOff: [{
|
|
916
|
+
type: i0.Input,
|
|
917
|
+
args: [{
|
|
918
|
+
isSignal: true,
|
|
919
|
+
alias: "iconOff",
|
|
920
|
+
required: false
|
|
921
|
+
}]
|
|
922
|
+
}],
|
|
923
|
+
cssClass: [{
|
|
924
|
+
type: i0.Input,
|
|
925
|
+
args: [{
|
|
926
|
+
isSignal: true,
|
|
927
|
+
alias: "cssClass",
|
|
928
|
+
required: false
|
|
929
|
+
}]
|
|
930
|
+
}],
|
|
931
|
+
cssClassSmall: [{
|
|
932
|
+
type: i0.Input,
|
|
933
|
+
args: [{
|
|
934
|
+
isSignal: true,
|
|
935
|
+
alias: "cssClassSmall",
|
|
936
|
+
required: false
|
|
937
|
+
}]
|
|
938
|
+
}]
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
var ChipsSelectorComponent = class ChipsSelectorComponent {
|
|
942
|
+
get disabled() {
|
|
943
|
+
if (this.ngControl && this.ngControl.disabled != null) return this.ngControl.disabled;
|
|
944
|
+
return this._disabled;
|
|
945
|
+
}
|
|
946
|
+
set disabled(value) {
|
|
947
|
+
this._disabled = coerceBooleanProperty(value);
|
|
948
|
+
if (this.focused) {
|
|
949
|
+
this.focused = false;
|
|
950
|
+
this.stateChanges.next();
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
get shouldLabelFloat() {
|
|
954
|
+
return this.focused || !this.empty;
|
|
955
|
+
}
|
|
956
|
+
set value(value) {
|
|
957
|
+
this.setValue(value, true);
|
|
958
|
+
}
|
|
959
|
+
setValue(value, propagate) {
|
|
960
|
+
this._value = value;
|
|
961
|
+
const selection = [];
|
|
962
|
+
if (this._value) this.options().forEach((n) => {
|
|
963
|
+
if (this._value?.findIndex((x) => x.value === n.value) !== -1) selection.push(n);
|
|
964
|
+
});
|
|
965
|
+
this.selection.set(selection);
|
|
966
|
+
this.singleSelection.set(selection.length > 0 ? selection[0] : void 0);
|
|
967
|
+
this.cdr.markForCheck();
|
|
968
|
+
if (propagate) this.propagateChange(this._value);
|
|
969
|
+
this.stateChanges.next();
|
|
970
|
+
if (this.changesEnabled) this.changed.emit(this._value);
|
|
971
|
+
}
|
|
972
|
+
get value() {
|
|
973
|
+
return this._value;
|
|
974
|
+
}
|
|
975
|
+
get empty() {
|
|
976
|
+
return !this._value || this._value.length === 0;
|
|
977
|
+
}
|
|
978
|
+
get errorState() {
|
|
979
|
+
return this.ngControl?.errors != null && (this.ngControl?.touched ?? false);
|
|
980
|
+
}
|
|
981
|
+
constructor(ngControl) {
|
|
982
|
+
this.ngControl = ngControl;
|
|
983
|
+
this.changed = output();
|
|
984
|
+
this.containerId = `chips-selector-container--${SystemUtils.generateUUID()}`;
|
|
985
|
+
this.containerWidth = signal(-6, ...ngDevMode ? [{ debugName: "containerWidth" }] : /* istanbul ignore next */ []);
|
|
986
|
+
this.focused = false;
|
|
987
|
+
this.stateChanges = new Subject();
|
|
988
|
+
this.destroyRef = inject(DestroyRef);
|
|
989
|
+
this.changesEnabled = false;
|
|
990
|
+
this.destroyed = false;
|
|
991
|
+
this.widthRetries = 0;
|
|
992
|
+
this.resize$ = new Subject();
|
|
993
|
+
this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
994
|
+
this.collapsedWidth = input(-1, ...ngDevMode ? [{ debugName: "collapsedWidth" }] : /* istanbul ignore next */ []);
|
|
995
|
+
this.collapsedDisplayMode = input("dropdown", ...ngDevMode ? [{ debugName: "collapsedDisplayMode" }] : /* istanbul ignore next */ []);
|
|
996
|
+
this.collapseAt = input(-1, ...ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []);
|
|
997
|
+
this.collapseAtContainer = input(false, ...ngDevMode ? [{ debugName: "collapseAtContainer" }] : /* istanbul ignore next */ []);
|
|
998
|
+
this.collapsed = computed(() => {
|
|
999
|
+
const cw = this.containerWidth();
|
|
1000
|
+
const mw = this.collapseAt();
|
|
1001
|
+
return this.mode() === "collapsed" || mw !== -1 && cw > 0 && mw > 0 && cw < mw;
|
|
1002
|
+
}, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
1003
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1004
|
+
this.multiple = input(false, ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
|
|
1005
|
+
this.mustSelect = input(false, ...ngDevMode ? [{ debugName: "mustSelect" }] : /* istanbul ignore next */ []);
|
|
1006
|
+
this.mode = input("dynamic", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
1007
|
+
this.stacked = input(false, ...ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []);
|
|
1008
|
+
this.padAt = input(0, ...ngDevMode ? [{ debugName: "padAt" }] : /* istanbul ignore next */ []);
|
|
1009
|
+
this.required = input(false, {
|
|
1010
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
1011
|
+
transform: booleanAttribute
|
|
1012
|
+
});
|
|
1013
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
1014
|
+
this._disabled = false;
|
|
1015
|
+
this.id = `chips-selector--${SystemUtils.generateUUID()}`;
|
|
1016
|
+
this.describedBy = "";
|
|
1017
|
+
this._value = [];
|
|
1018
|
+
this.propagateChange = () => {};
|
|
1019
|
+
this.propagateTouched = () => {};
|
|
1020
|
+
this.renderer = inject(Renderer2);
|
|
1021
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
1022
|
+
this.selection = signal([], ...ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []);
|
|
1023
|
+
this.singleSelection = signal(void 0, ...ngDevMode ? [{ debugName: "singleSelection" }] : /* istanbul ignore next */ []);
|
|
1024
|
+
this.selectionForm = form(this.selection);
|
|
1025
|
+
this.singleForm = form(this.singleSelection);
|
|
1026
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
1027
|
+
effect(() => {
|
|
1028
|
+
this.required();
|
|
1029
|
+
this.placeholder();
|
|
1030
|
+
this.stateChanges.next();
|
|
1031
|
+
});
|
|
1032
|
+
this.resize$.pipe(takeUntilDestroyed(this.destroyRef), auditTime(0, animationFrameScheduler)).subscribe(() => {
|
|
1033
|
+
if (this.collapseAt() > 0) this.updateContainerWidth();
|
|
1034
|
+
});
|
|
1035
|
+
afterNextRender(() => {
|
|
1036
|
+
if (SystemUtils.isBrowser() && typeof ResizeObserver !== "undefined") {
|
|
1037
|
+
const elem = document.getElementById(this.containerId);
|
|
1038
|
+
if (elem) {
|
|
1039
|
+
this.resizeObserver = new ResizeObserver(() => this.resize$.next());
|
|
1040
|
+
this.resizeObserver.observe(elem);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
setTimeout(() => {
|
|
1044
|
+
this.updateContainerWidth();
|
|
1045
|
+
this.changesEnabled = true;
|
|
1046
|
+
}, 250);
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
ngOnDestroy() {
|
|
1050
|
+
this.destroyed = true;
|
|
1051
|
+
this.resizeObserver?.disconnect();
|
|
1052
|
+
this.stateChanges.complete();
|
|
1053
|
+
}
|
|
1054
|
+
updateContainerWidth() {
|
|
1055
|
+
if (this.destroyed) return;
|
|
1056
|
+
const elem = document.getElementById(this.containerId);
|
|
1057
|
+
if (elem && elem.clientWidth > 0) {
|
|
1058
|
+
this.widthRetries = 0;
|
|
1059
|
+
this.containerWidth.set(this.collapseAtContainer() ? elem.clientWidth : window.innerWidth);
|
|
1060
|
+
} else if (this.widthRetries < 50) {
|
|
1061
|
+
this.widthRetries++;
|
|
1062
|
+
setTimeout(() => this.updateContainerWidth(), 100);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
getSelection() {
|
|
1066
|
+
const value = !this.multiple() && this.collapsed() && this.collapsedDisplayMode() === "button" ? this.singleSelection() : this.selection();
|
|
1067
|
+
if (Array.isArray(value)) return value;
|
|
1068
|
+
return value ? [value] : [];
|
|
1069
|
+
}
|
|
1070
|
+
updateValue() {
|
|
1071
|
+
setTimeout(() => {
|
|
1072
|
+
this.setValue(this.getSelection(), true);
|
|
1073
|
+
}, 250);
|
|
1074
|
+
}
|
|
1075
|
+
isSelectable(item) {
|
|
1076
|
+
return this.multiple() || this.getSelection().findIndex((x) => x.value === item.value) === -1;
|
|
1077
|
+
}
|
|
1078
|
+
writeValue(value) {
|
|
1079
|
+
const next = value;
|
|
1080
|
+
if (this.value !== next) this.setValue(next, false);
|
|
1081
|
+
}
|
|
1082
|
+
registerOnChange(fn) {
|
|
1083
|
+
this.propagateChange = fn;
|
|
1084
|
+
}
|
|
1085
|
+
registerOnTouched(fn) {
|
|
1086
|
+
this.propagateTouched = fn;
|
|
1087
|
+
}
|
|
1088
|
+
setDescribedByIds(ids) {
|
|
1089
|
+
this.describedBy = ids.join(" ");
|
|
1090
|
+
}
|
|
1091
|
+
setDisabledState(isDisabled) {
|
|
1092
|
+
this._disabled = isDisabled;
|
|
1093
|
+
if (isDisabled && this.focused) {
|
|
1094
|
+
this.focused = false;
|
|
1095
|
+
this.stateChanges.next();
|
|
1096
|
+
}
|
|
1097
|
+
if (!SystemUtils.isBrowser()) return;
|
|
1098
|
+
const elem = document.getElementById(this.id);
|
|
1099
|
+
if (elem) this.renderer.setProperty(elem, "disabled", isDisabled);
|
|
1100
|
+
}
|
|
1101
|
+
onContainerClick() {
|
|
1102
|
+
if (!this.focused) {
|
|
1103
|
+
if (!SystemUtils.isBrowser()) return;
|
|
1104
|
+
const elem = document.getElementById(this.id);
|
|
1105
|
+
if (elem) {
|
|
1106
|
+
elem.focus();
|
|
1107
|
+
this.propagateTouched();
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
clear(e) {
|
|
1112
|
+
this.setValue([], true);
|
|
1113
|
+
e.stopPropagation();
|
|
1114
|
+
}
|
|
1115
|
+
select(item) {
|
|
1116
|
+
if (item) this.setValue([item], true);
|
|
1117
|
+
}
|
|
1118
|
+
static {
|
|
1119
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1120
|
+
minVersion: "12.0.0",
|
|
1121
|
+
version: "22.2.1",
|
|
1122
|
+
ngImport: i0,
|
|
1123
|
+
type: ChipsSelectorComponent,
|
|
1124
|
+
deps: [{
|
|
1125
|
+
token: i1.NgControl,
|
|
1126
|
+
optional: true,
|
|
1127
|
+
self: true
|
|
1128
|
+
}],
|
|
1129
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
static {
|
|
1133
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1134
|
+
minVersion: "17.0.0",
|
|
1135
|
+
version: "22.2.1",
|
|
1136
|
+
type: ChipsSelectorComponent,
|
|
1137
|
+
isStandalone: true,
|
|
1138
|
+
selector: "chips-selector",
|
|
1139
|
+
inputs: {
|
|
1140
|
+
options: {
|
|
1141
|
+
classPropertyName: "options",
|
|
1142
|
+
publicName: "options",
|
|
1143
|
+
isSignal: true,
|
|
1144
|
+
isRequired: false,
|
|
1145
|
+
transformFunction: null
|
|
1146
|
+
},
|
|
1147
|
+
collapsedWidth: {
|
|
1148
|
+
classPropertyName: "collapsedWidth",
|
|
1149
|
+
publicName: "collapsedWidth",
|
|
1150
|
+
isSignal: true,
|
|
1151
|
+
isRequired: false,
|
|
1152
|
+
transformFunction: null
|
|
1153
|
+
},
|
|
1154
|
+
collapsedDisplayMode: {
|
|
1155
|
+
classPropertyName: "collapsedDisplayMode",
|
|
1156
|
+
publicName: "collapsedDisplayMode",
|
|
1157
|
+
isSignal: true,
|
|
1158
|
+
isRequired: false,
|
|
1159
|
+
transformFunction: null
|
|
1160
|
+
},
|
|
1161
|
+
collapseAt: {
|
|
1162
|
+
classPropertyName: "collapseAt",
|
|
1163
|
+
publicName: "collapseAt",
|
|
1164
|
+
isSignal: true,
|
|
1165
|
+
isRequired: false,
|
|
1166
|
+
transformFunction: null
|
|
1167
|
+
},
|
|
1168
|
+
collapseAtContainer: {
|
|
1169
|
+
classPropertyName: "collapseAtContainer",
|
|
1170
|
+
publicName: "collapseAtContainer",
|
|
1171
|
+
isSignal: true,
|
|
1172
|
+
isRequired: false,
|
|
1173
|
+
transformFunction: null
|
|
1174
|
+
},
|
|
1175
|
+
label: {
|
|
1176
|
+
classPropertyName: "label",
|
|
1177
|
+
publicName: "label",
|
|
1178
|
+
isSignal: true,
|
|
1179
|
+
isRequired: false,
|
|
1180
|
+
transformFunction: null
|
|
1181
|
+
},
|
|
1182
|
+
multiple: {
|
|
1183
|
+
classPropertyName: "multiple",
|
|
1184
|
+
publicName: "multiple",
|
|
1185
|
+
isSignal: true,
|
|
1186
|
+
isRequired: false,
|
|
1187
|
+
transformFunction: null
|
|
1188
|
+
},
|
|
1189
|
+
mustSelect: {
|
|
1190
|
+
classPropertyName: "mustSelect",
|
|
1191
|
+
publicName: "mustSelect",
|
|
1192
|
+
isSignal: true,
|
|
1193
|
+
isRequired: false,
|
|
1194
|
+
transformFunction: null
|
|
1195
|
+
},
|
|
1196
|
+
mode: {
|
|
1197
|
+
classPropertyName: "mode",
|
|
1198
|
+
publicName: "mode",
|
|
1199
|
+
isSignal: true,
|
|
1200
|
+
isRequired: false,
|
|
1201
|
+
transformFunction: null
|
|
1202
|
+
},
|
|
1203
|
+
stacked: {
|
|
1204
|
+
classPropertyName: "stacked",
|
|
1205
|
+
publicName: "stacked",
|
|
1206
|
+
isSignal: true,
|
|
1207
|
+
isRequired: false,
|
|
1208
|
+
transformFunction: null
|
|
1209
|
+
},
|
|
1210
|
+
padAt: {
|
|
1211
|
+
classPropertyName: "padAt",
|
|
1212
|
+
publicName: "padAt",
|
|
1213
|
+
isSignal: true,
|
|
1214
|
+
isRequired: false,
|
|
1215
|
+
transformFunction: null
|
|
1216
|
+
},
|
|
1217
|
+
required: {
|
|
1218
|
+
classPropertyName: "required",
|
|
1219
|
+
publicName: "required",
|
|
1220
|
+
isSignal: true,
|
|
1221
|
+
isRequired: false,
|
|
1222
|
+
transformFunction: null
|
|
1223
|
+
},
|
|
1224
|
+
placeholder: {
|
|
1225
|
+
classPropertyName: "placeholder",
|
|
1226
|
+
publicName: "placeholder",
|
|
1227
|
+
isSignal: true,
|
|
1228
|
+
isRequired: false,
|
|
1229
|
+
transformFunction: null
|
|
1230
|
+
},
|
|
1231
|
+
disabled: {
|
|
1232
|
+
classPropertyName: "disabled",
|
|
1233
|
+
publicName: "disabled",
|
|
1234
|
+
isSignal: false,
|
|
1235
|
+
isRequired: false,
|
|
1236
|
+
transformFunction: null
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
outputs: { changed: "changed" },
|
|
1240
|
+
host: { properties: {
|
|
1241
|
+
"id": "id",
|
|
1242
|
+
"class.floating": "shouldLabelFloat",
|
|
1243
|
+
"attr.aria-describedBy": "describedBy"
|
|
1244
|
+
} },
|
|
1245
|
+
ngImport: i0,
|
|
1246
|
+
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>",
|
|
1247
|
+
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"],
|
|
1248
|
+
dependencies: [
|
|
1249
|
+
{
|
|
1250
|
+
kind: "ngmodule",
|
|
1251
|
+
type: FlexLayoutModule
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
kind: "directive",
|
|
1255
|
+
type: FormField,
|
|
1256
|
+
selector: "[formField]",
|
|
1257
|
+
inputs: ["formField"],
|
|
1258
|
+
exportAs: ["formField"]
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
kind: "ngmodule",
|
|
1262
|
+
type: MatFormFieldModule
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
kind: "component",
|
|
1266
|
+
type: i2.MatFormField,
|
|
1267
|
+
selector: "mat-form-field",
|
|
1268
|
+
inputs: [
|
|
1269
|
+
"hideRequiredMarker",
|
|
1270
|
+
"color",
|
|
1271
|
+
"floatLabel",
|
|
1272
|
+
"appearance",
|
|
1273
|
+
"subscriptSizing",
|
|
1274
|
+
"hintLabel"
|
|
1275
|
+
],
|
|
1276
|
+
exportAs: ["matFormField"]
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
kind: "directive",
|
|
1280
|
+
type: i2.MatLabel,
|
|
1281
|
+
selector: "mat-label"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
kind: "directive",
|
|
1285
|
+
type: i2.MatSuffix,
|
|
1286
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
1287
|
+
inputs: ["matTextSuffix"]
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
kind: "ngmodule",
|
|
1291
|
+
type: MatSelectModule
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
kind: "component",
|
|
1295
|
+
type: i3.MatSelect,
|
|
1296
|
+
selector: "mat-select",
|
|
1297
|
+
inputs: [
|
|
1298
|
+
"aria-describedby",
|
|
1299
|
+
"panelClass",
|
|
1300
|
+
"disabled",
|
|
1301
|
+
"disableRipple",
|
|
1302
|
+
"tabIndex",
|
|
1303
|
+
"hideSingleSelectionIndicator",
|
|
1304
|
+
"placeholder",
|
|
1305
|
+
"required",
|
|
1306
|
+
"multiple",
|
|
1307
|
+
"disableOptionCentering",
|
|
1308
|
+
"compareWith",
|
|
1309
|
+
"value",
|
|
1310
|
+
"aria-label",
|
|
1311
|
+
"aria-labelledby",
|
|
1312
|
+
"errorStateMatcher",
|
|
1313
|
+
"typeaheadDebounceInterval",
|
|
1314
|
+
"sortComparator",
|
|
1315
|
+
"id",
|
|
1316
|
+
"panelWidth",
|
|
1317
|
+
"canSelectNullableOptions"
|
|
1318
|
+
],
|
|
1319
|
+
outputs: [
|
|
1320
|
+
"openedChange",
|
|
1321
|
+
"opened",
|
|
1322
|
+
"closed",
|
|
1323
|
+
"selectionChange",
|
|
1324
|
+
"valueChange"
|
|
1325
|
+
],
|
|
1326
|
+
exportAs: ["matSelect"]
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
kind: "directive",
|
|
1330
|
+
type: i3.MatSelectTrigger,
|
|
1331
|
+
selector: "mat-select-trigger"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
kind: "component",
|
|
1335
|
+
type: i3.MatOption,
|
|
1336
|
+
selector: "mat-option",
|
|
1337
|
+
inputs: [
|
|
1338
|
+
"value",
|
|
1339
|
+
"id",
|
|
1340
|
+
"disabled"
|
|
1341
|
+
],
|
|
1342
|
+
outputs: ["onSelectionChange"],
|
|
1343
|
+
exportAs: ["matOption"]
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
kind: "ngmodule",
|
|
1347
|
+
type: MatChipsModule
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
kind: "component",
|
|
1351
|
+
type: i4.MatChipListbox,
|
|
1352
|
+
selector: "mat-chip-listbox",
|
|
1353
|
+
inputs: [
|
|
1354
|
+
"multiple",
|
|
1355
|
+
"aria-orientation",
|
|
1356
|
+
"selectable",
|
|
1357
|
+
"compareWith",
|
|
1358
|
+
"required",
|
|
1359
|
+
"hideSingleSelectionIndicator",
|
|
1360
|
+
"value"
|
|
1361
|
+
],
|
|
1362
|
+
outputs: ["change"]
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
kind: "component",
|
|
1366
|
+
type: i4.MatChipOption,
|
|
1367
|
+
selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]",
|
|
1368
|
+
inputs: ["selectable", "selected"],
|
|
1369
|
+
outputs: ["selectionChange"]
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
kind: "ngmodule",
|
|
1373
|
+
type: MatIconModule
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
kind: "component",
|
|
1377
|
+
type: i3$1.MatIcon,
|
|
1378
|
+
selector: "mat-icon",
|
|
1379
|
+
inputs: [
|
|
1380
|
+
"color",
|
|
1381
|
+
"inline",
|
|
1382
|
+
"svgIcon",
|
|
1383
|
+
"fontSet",
|
|
1384
|
+
"fontIcon"
|
|
1385
|
+
],
|
|
1386
|
+
exportAs: ["matIcon"]
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
kind: "ngmodule",
|
|
1390
|
+
type: MatButtonModule
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
kind: "component",
|
|
1394
|
+
type: i4$1.MatIconButton,
|
|
1395
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
1396
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
kind: "ngmodule",
|
|
1400
|
+
type: MatBadgeModule
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
kind: "directive",
|
|
1404
|
+
type: i7.MatBadge,
|
|
1405
|
+
selector: "[matBadge]",
|
|
1406
|
+
inputs: [
|
|
1407
|
+
"matBadgeColor",
|
|
1408
|
+
"matBadgeOverlap",
|
|
1409
|
+
"matBadgeDisabled",
|
|
1410
|
+
"matBadgePosition",
|
|
1411
|
+
"matBadge",
|
|
1412
|
+
"matBadgeDescription",
|
|
1413
|
+
"matBadgeSize",
|
|
1414
|
+
"matBadgeHidden"
|
|
1415
|
+
]
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
kind: "ngmodule",
|
|
1419
|
+
type: MatTooltipModule
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
kind: "directive",
|
|
1423
|
+
type: i8.MatTooltip,
|
|
1424
|
+
selector: "[matTooltip]",
|
|
1425
|
+
inputs: [
|
|
1426
|
+
"matTooltipPosition",
|
|
1427
|
+
"matTooltipPositionAtOrigin",
|
|
1428
|
+
"matTooltipDisabled",
|
|
1429
|
+
"matTooltipShowDelay",
|
|
1430
|
+
"matTooltipHideDelay",
|
|
1431
|
+
"matTooltipTouchGestures",
|
|
1432
|
+
"matTooltip",
|
|
1433
|
+
"matTooltipClass"
|
|
1434
|
+
],
|
|
1435
|
+
exportAs: ["matTooltip"]
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
kind: "component",
|
|
1439
|
+
type: ButtonSelectorComponent,
|
|
1440
|
+
selector: "button-selector",
|
|
1441
|
+
inputs: [
|
|
1442
|
+
"disabled",
|
|
1443
|
+
"width",
|
|
1444
|
+
"border",
|
|
1445
|
+
"borderRadius",
|
|
1446
|
+
"label",
|
|
1447
|
+
"labelSelected",
|
|
1448
|
+
"options",
|
|
1449
|
+
"autoSelect"
|
|
1450
|
+
],
|
|
1451
|
+
outputs: ["changed", "selected"]
|
|
1452
|
+
}
|
|
1453
|
+
],
|
|
1454
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1459
|
+
minVersion: "12.0.0",
|
|
1460
|
+
version: "22.2.1",
|
|
1461
|
+
ngImport: i0,
|
|
1462
|
+
type: ChipsSelectorComponent,
|
|
1463
|
+
decorators: [{
|
|
1464
|
+
type: Component,
|
|
1465
|
+
args: [{
|
|
1466
|
+
selector: "chips-selector",
|
|
1467
|
+
standalone: true,
|
|
1468
|
+
imports: [
|
|
1469
|
+
FlexLayoutModule,
|
|
1470
|
+
FormField,
|
|
1471
|
+
MatFormFieldModule,
|
|
1472
|
+
MatSelectModule,
|
|
1473
|
+
MatChipsModule,
|
|
1474
|
+
MatIconModule,
|
|
1475
|
+
MatButtonModule,
|
|
1476
|
+
MatBadgeModule,
|
|
1477
|
+
MatTooltipModule,
|
|
1478
|
+
ButtonSelectorComponent
|
|
1479
|
+
],
|
|
1480
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1481
|
+
host: {
|
|
1482
|
+
"[id]": "id",
|
|
1483
|
+
"[class.floating]": "shouldLabelFloat",
|
|
1484
|
+
"[attr.aria-describedBy]": "describedBy"
|
|
1485
|
+
},
|
|
1486
|
+
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>",
|
|
1487
|
+
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"]
|
|
1488
|
+
}]
|
|
1489
|
+
}],
|
|
1490
|
+
ctorParameters: () => [{
|
|
1491
|
+
type: i1.NgControl,
|
|
1492
|
+
decorators: [{ type: Optional }, { type: Self }]
|
|
1493
|
+
}],
|
|
1494
|
+
propDecorators: {
|
|
1495
|
+
changed: [{
|
|
1496
|
+
type: i0.Output,
|
|
1497
|
+
args: ["changed"]
|
|
1498
|
+
}],
|
|
1499
|
+
options: [{
|
|
1500
|
+
type: i0.Input,
|
|
1501
|
+
args: [{
|
|
1502
|
+
isSignal: true,
|
|
1503
|
+
alias: "options",
|
|
1504
|
+
required: false
|
|
1505
|
+
}]
|
|
1506
|
+
}],
|
|
1507
|
+
collapsedWidth: [{
|
|
1508
|
+
type: i0.Input,
|
|
1509
|
+
args: [{
|
|
1510
|
+
isSignal: true,
|
|
1511
|
+
alias: "collapsedWidth",
|
|
1512
|
+
required: false
|
|
1513
|
+
}]
|
|
1514
|
+
}],
|
|
1515
|
+
collapsedDisplayMode: [{
|
|
1516
|
+
type: i0.Input,
|
|
1517
|
+
args: [{
|
|
1518
|
+
isSignal: true,
|
|
1519
|
+
alias: "collapsedDisplayMode",
|
|
1520
|
+
required: false
|
|
1521
|
+
}]
|
|
1522
|
+
}],
|
|
1523
|
+
collapseAt: [{
|
|
1524
|
+
type: i0.Input,
|
|
1525
|
+
args: [{
|
|
1526
|
+
isSignal: true,
|
|
1527
|
+
alias: "collapseAt",
|
|
1528
|
+
required: false
|
|
1529
|
+
}]
|
|
1530
|
+
}],
|
|
1531
|
+
collapseAtContainer: [{
|
|
1532
|
+
type: i0.Input,
|
|
1533
|
+
args: [{
|
|
1534
|
+
isSignal: true,
|
|
1535
|
+
alias: "collapseAtContainer",
|
|
1536
|
+
required: false
|
|
1537
|
+
}]
|
|
1538
|
+
}],
|
|
1539
|
+
label: [{
|
|
1540
|
+
type: i0.Input,
|
|
1541
|
+
args: [{
|
|
1542
|
+
isSignal: true,
|
|
1543
|
+
alias: "label",
|
|
1544
|
+
required: false
|
|
1545
|
+
}]
|
|
1546
|
+
}],
|
|
1547
|
+
multiple: [{
|
|
1548
|
+
type: i0.Input,
|
|
1549
|
+
args: [{
|
|
1550
|
+
isSignal: true,
|
|
1551
|
+
alias: "multiple",
|
|
1552
|
+
required: false
|
|
1553
|
+
}]
|
|
1554
|
+
}],
|
|
1555
|
+
mustSelect: [{
|
|
1556
|
+
type: i0.Input,
|
|
1557
|
+
args: [{
|
|
1558
|
+
isSignal: true,
|
|
1559
|
+
alias: "mustSelect",
|
|
1560
|
+
required: false
|
|
1561
|
+
}]
|
|
1562
|
+
}],
|
|
1563
|
+
mode: [{
|
|
1564
|
+
type: i0.Input,
|
|
1565
|
+
args: [{
|
|
1566
|
+
isSignal: true,
|
|
1567
|
+
alias: "mode",
|
|
1568
|
+
required: false
|
|
1569
|
+
}]
|
|
1570
|
+
}],
|
|
1571
|
+
stacked: [{
|
|
1572
|
+
type: i0.Input,
|
|
1573
|
+
args: [{
|
|
1574
|
+
isSignal: true,
|
|
1575
|
+
alias: "stacked",
|
|
1576
|
+
required: false
|
|
1577
|
+
}]
|
|
1578
|
+
}],
|
|
1579
|
+
padAt: [{
|
|
1580
|
+
type: i0.Input,
|
|
1581
|
+
args: [{
|
|
1582
|
+
isSignal: true,
|
|
1583
|
+
alias: "padAt",
|
|
1584
|
+
required: false
|
|
1585
|
+
}]
|
|
1586
|
+
}],
|
|
1587
|
+
required: [{
|
|
1588
|
+
type: i0.Input,
|
|
1589
|
+
args: [{
|
|
1590
|
+
isSignal: true,
|
|
1591
|
+
alias: "required",
|
|
1592
|
+
required: false
|
|
1593
|
+
}]
|
|
1594
|
+
}],
|
|
1595
|
+
placeholder: [{
|
|
1596
|
+
type: i0.Input,
|
|
1597
|
+
args: [{
|
|
1598
|
+
isSignal: true,
|
|
1599
|
+
alias: "placeholder",
|
|
1600
|
+
required: false
|
|
1601
|
+
}]
|
|
1602
|
+
}],
|
|
1603
|
+
disabled: [{ type: Input }]
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
613
1606
|
export { ButtonSelectorComponent, ButtonToggleComponent, ChipsSelectorComponent };
|
|
614
|
-
|
|
1607
|
+
|
|
1608
|
+
//# sourceMappingURL=arsedizioni-ars-utils-ui.controls.mjs.map
|