@4sh/ui-kit 0.15.0 → 0.17.0
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.fr.md +18 -10
- package/README.md +18 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +313 -2
- package/mcp/data/text-search-docs.json +177 -17
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/styles/utils/_mixins.scss +11 -0
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +291 -186
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,698 +1,1278 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NgTemplateOutlet } from
|
|
4
|
-
import { NG_VALUE_ACCESSOR } from
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import { OverlayModule } from
|
|
7
|
-
import { BaseFormField,
|
|
8
|
-
import { UiField } from
|
|
9
|
-
import { UiIcon } from
|
|
10
|
-
import { UiChip } from
|
|
11
|
-
import { UiMotion } from
|
|
12
|
-
import { closeOnNavigation } from
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
], template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"] }]
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, ElementRef, booleanAttribute, computed, contentChild, effect, forwardRef, input, isDevMode, numberAttribute, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
|
+
import * as i1 from "@angular/cdk/overlay";
|
|
6
|
+
import { OverlayModule } from "@angular/cdk/overlay";
|
|
7
|
+
import { BaseFormField, createOptionResolver, dropdownOverlayPositions, formatLabel, warnMissingAccessibleName } from "@4sh/ui-kit/forms";
|
|
8
|
+
import { UiField } from "@4sh/ui-kit/forms/ui-field";
|
|
9
|
+
import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
|
|
10
|
+
import { UiChip } from "@4sh/ui-kit/informative/ui-chip";
|
|
11
|
+
import { UiMotion } from "@4sh/ui-kit/motion";
|
|
12
|
+
import { closeOnNavigation } from "@4sh/ui-kit/overlay";
|
|
13
|
+
var UiInputTags = class UiInputTags extends BaseFormField {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.max = input(void 0, {
|
|
18
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
19
|
+
transform: numberAttribute
|
|
20
|
+
});
|
|
21
|
+
this.delimiter = input(...ngDevMode ? [void 0, { debugName: "delimiter" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.allowDuplicate = input(false, {
|
|
23
|
+
...ngDevMode ? { debugName: "allowDuplicate" } : /* istanbul ignore next */ {},
|
|
24
|
+
transform: booleanAttribute
|
|
25
|
+
});
|
|
26
|
+
this.addOnBlur = input(false, {
|
|
27
|
+
...ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {},
|
|
28
|
+
transform: booleanAttribute
|
|
29
|
+
});
|
|
30
|
+
this.addOnTab = input(false, {
|
|
31
|
+
...ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {},
|
|
32
|
+
transform: booleanAttribute
|
|
33
|
+
});
|
|
34
|
+
this.addOnPaste = input(false, {
|
|
35
|
+
...ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {},
|
|
36
|
+
transform: booleanAttribute
|
|
37
|
+
});
|
|
38
|
+
this.maxLength = input(void 0, {
|
|
39
|
+
...ngDevMode ? { debugName: "maxLength" } : /* istanbul ignore next */ {},
|
|
40
|
+
transform: numberAttribute
|
|
41
|
+
});
|
|
42
|
+
this.chipLevel = input("default", ...ngDevMode ? [{ debugName: "chipLevel" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this.chipSubLevel = input("low", ...ngDevMode ? [{ debugName: "chipSubLevel" }] : /* istanbul ignore next */ []);
|
|
44
|
+
this.chipRounded = input(true, {
|
|
45
|
+
...ngDevMode ? { debugName: "chipRounded" } : /* istanbul ignore next */ {},
|
|
46
|
+
transform: booleanAttribute
|
|
47
|
+
});
|
|
48
|
+
this.typeahead = input(false, {
|
|
49
|
+
...ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {},
|
|
50
|
+
transform: booleanAttribute
|
|
51
|
+
});
|
|
52
|
+
this.suggestions = input([], ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.optionLabel = input(...ngDevMode ? [void 0, { debugName: "optionLabel" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this.optionValue = input(...ngDevMode ? [void 0, { debugName: "optionValue" }] : /* istanbul ignore next */ []);
|
|
55
|
+
this.optionDisabled = input(...ngDevMode ? [void 0, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []);
|
|
56
|
+
this.dataKey = input(...ngDevMode ? [void 0, { debugName: "dataKey" }] : /* istanbul ignore next */ []);
|
|
57
|
+
this.group = input(false, {
|
|
58
|
+
...ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {},
|
|
59
|
+
transform: booleanAttribute
|
|
60
|
+
});
|
|
61
|
+
this.optionGroupLabel = input("label", ...ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.optionGroupChildren = input("items", ...ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.minLength = input(1, {
|
|
64
|
+
...ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {},
|
|
65
|
+
transform: numberAttribute
|
|
66
|
+
});
|
|
67
|
+
this.delay = input(300, {
|
|
68
|
+
...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
|
|
69
|
+
transform: numberAttribute
|
|
70
|
+
});
|
|
71
|
+
this.completeOnFocus = input(false, {
|
|
72
|
+
...ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {},
|
|
73
|
+
transform: booleanAttribute
|
|
74
|
+
});
|
|
75
|
+
this.scrollHeight = input(...ngDevMode ? [void 0, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []);
|
|
76
|
+
this.autoOptionFocus = input(false, {
|
|
77
|
+
...ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {},
|
|
78
|
+
transform: booleanAttribute
|
|
79
|
+
});
|
|
80
|
+
this.focusOnHover = input(true, {
|
|
81
|
+
...ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {},
|
|
82
|
+
transform: booleanAttribute
|
|
83
|
+
});
|
|
84
|
+
this.autoFlip = input(true, {
|
|
85
|
+
...ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {},
|
|
86
|
+
transform: booleanAttribute
|
|
87
|
+
});
|
|
88
|
+
this.panelStyleClass = input(...ngDevMode ? [void 0, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []);
|
|
89
|
+
this.emptyMessage = input("Aucun résultat", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.removeTagLabel = input("Supprimer {0}", ...ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []);
|
|
91
|
+
this.tagAdd = output();
|
|
92
|
+
this.tagRemove = output();
|
|
93
|
+
this.valueChange = output();
|
|
94
|
+
this.completeMethod = output();
|
|
95
|
+
this.optionSelect = output();
|
|
96
|
+
this.opened = output();
|
|
97
|
+
this.closed = output();
|
|
98
|
+
this.inputFocus = output();
|
|
99
|
+
this.inputBlur = output();
|
|
100
|
+
this.itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
101
|
+
this.optionTemplate = contentChild("option", ...ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []);
|
|
102
|
+
this.groupTemplate = contentChild("group", ...ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []);
|
|
103
|
+
this.containerEl = viewChild.required("container", ...ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []);
|
|
104
|
+
this.inputEl = viewChild("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
|
|
105
|
+
this.panelEl = viewChild("panel", ...ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []);
|
|
106
|
+
this.tagEls = viewChildren("tagEl", {
|
|
107
|
+
...ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {},
|
|
108
|
+
read: ElementRef
|
|
109
|
+
});
|
|
110
|
+
this.panelOpen = signal(false, ...ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []);
|
|
111
|
+
this.overlayOrigin = signal(null, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
|
|
112
|
+
this.overlayWidth = signal(null, ...ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []);
|
|
113
|
+
this.inputText = signal("", ...ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []);
|
|
114
|
+
this.focusedTag = signal(-1, ...ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []);
|
|
115
|
+
this.focusedOption = signal(-1, ...ngDevMode ? [{ debugName: "focusedOption" }] : /* istanbul ignore next */ []);
|
|
116
|
+
this.queryDirty = false;
|
|
117
|
+
this.tagValues = computed(() => this.modelValue() ?? [], ...ngDevMode ? [{ debugName: "tagValues" }] : /* istanbul ignore next */ []);
|
|
118
|
+
this.tagRows = computed(() => this.tagValues().map((value, index) => {
|
|
119
|
+
const label = this.labelOfValue(value);
|
|
120
|
+
return {
|
|
121
|
+
value,
|
|
122
|
+
index,
|
|
123
|
+
label,
|
|
124
|
+
removeAriaLabel: formatLabel(this.removeTagLabel(), label)
|
|
125
|
+
};
|
|
126
|
+
}), ...ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []);
|
|
127
|
+
this.listboxId = computed(() => `${this.resolvedId()}-tags`, ...ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []);
|
|
128
|
+
this.panelListId = computed(() => `${this.resolvedId()}-list`, ...ngDevMode ? [{ debugName: "panelListId" }] : /* istanbul ignore next */ []);
|
|
129
|
+
this.iconSize = computed(() => this.size() === "small" ? "sm" : "md", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
|
|
130
|
+
this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []);
|
|
131
|
+
this.isFull = computed(() => {
|
|
132
|
+
const max = this.max();
|
|
133
|
+
return max != null && max > 0 && this.tagValues().length >= max;
|
|
134
|
+
}, ...ngDevMode ? [{ debugName: "isFull" }] : /* istanbul ignore next */ []);
|
|
135
|
+
this.canType = computed(() => !this.isDisabled() && !this.readonly() && !this.isFull(), ...ngDevMode ? [{ debugName: "canType" }] : /* istanbul ignore next */ []);
|
|
136
|
+
this.effectivePlaceholder = computed(() => this.hasFloatLabel() || this.tagValues().length ? "" : this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
|
|
137
|
+
this.isFilled = computed(() => this.tagValues().length > 0 || this.inputText() !== "", ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
|
|
138
|
+
this.flatEntries = computed(() => {
|
|
139
|
+
if (this.group()) return this.groupEntries().flatMap((g) => g.entries);
|
|
140
|
+
return (this.suggestions() ?? []).map((option) => this.toEntry(option));
|
|
141
|
+
}, ...ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []);
|
|
142
|
+
this.groupEntries = computed(() => {
|
|
143
|
+
if (!this.group()) return [];
|
|
144
|
+
return (this.suggestions() ?? []).map((groupOption) => {
|
|
145
|
+
const children = this.getField(groupOption, this.optionGroupChildren());
|
|
146
|
+
return {
|
|
147
|
+
label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? "",
|
|
148
|
+
original: groupOption,
|
|
149
|
+
entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option))
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
}, ...ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []);
|
|
153
|
+
this.visibleRows = computed(() => {
|
|
154
|
+
const rows = [];
|
|
155
|
+
let index = 0;
|
|
156
|
+
const pushOption = (entry) => {
|
|
157
|
+
const present = this.isPresent(entry.value);
|
|
158
|
+
rows.push({
|
|
159
|
+
kind: "option",
|
|
160
|
+
key: `${this.panelListId()}-${index}`,
|
|
161
|
+
id: `${this.resolvedId()}-option-${index}`,
|
|
162
|
+
index,
|
|
163
|
+
entry: {
|
|
164
|
+
...entry,
|
|
165
|
+
disabled: entry.disabled || present && !this.allowDuplicate()
|
|
166
|
+
},
|
|
167
|
+
present
|
|
168
|
+
});
|
|
169
|
+
index++;
|
|
170
|
+
};
|
|
171
|
+
if (this.group()) this.groupEntries().forEach((g, gi) => {
|
|
172
|
+
if (!g.entries.length) return;
|
|
173
|
+
rows.push({
|
|
174
|
+
kind: "group",
|
|
175
|
+
key: `${this.panelListId()}-group-${gi}`,
|
|
176
|
+
label: g.label,
|
|
177
|
+
original: g.original
|
|
178
|
+
});
|
|
179
|
+
g.entries.forEach(pushOption);
|
|
180
|
+
});
|
|
181
|
+
else this.flatEntries().forEach(pushOption);
|
|
182
|
+
return rows;
|
|
183
|
+
}, ...ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []);
|
|
184
|
+
this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === "option"), ...ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []);
|
|
185
|
+
this.optionCount = computed(() => this.visibleOptions().length, ...ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []);
|
|
186
|
+
this.showEmpty = computed(() => this.panelOpen() && !this.visibleRows().length, ...ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []);
|
|
187
|
+
this.activeDescendant = computed(() => {
|
|
188
|
+
if (!this.panelOpen()) return null;
|
|
189
|
+
return this.visibleOptions()[this.focusedOption()]?.id ?? null;
|
|
190
|
+
}, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
|
|
191
|
+
this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
|
|
192
|
+
this.resolver = createOptionResolver({
|
|
193
|
+
optionValue: this.optionValue,
|
|
194
|
+
optionLabel: this.optionLabel,
|
|
195
|
+
optionDisabled: this.optionDisabled,
|
|
196
|
+
dataKey: this.dataKey
|
|
197
|
+
});
|
|
198
|
+
closeOnNavigation(() => this.close(false));
|
|
199
|
+
if (isDevMode()) effect(() => {
|
|
200
|
+
if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-input-tags", "Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.");
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
writeValue(value) {
|
|
204
|
+
this.modelValue.set(Array.isArray(value) ? value : []);
|
|
205
|
+
}
|
|
206
|
+
focus(options) {
|
|
207
|
+
this.inputEl()?.nativeElement.focus(options);
|
|
208
|
+
}
|
|
209
|
+
addValue(value, event) {
|
|
210
|
+
if (!this.canType()) return false;
|
|
211
|
+
if (!this.allowDuplicate() && this.isPresent(value)) return false;
|
|
212
|
+
this.commit([...this.tagValues(), value]);
|
|
213
|
+
this.tagAdd.emit({
|
|
214
|
+
originalEvent: event,
|
|
215
|
+
value
|
|
216
|
+
});
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
addFromInput(event) {
|
|
220
|
+
const parts = this.split(this.inputText()).map((p) => p.trim()).filter(Boolean);
|
|
221
|
+
let added = false;
|
|
222
|
+
for (const part of parts) {
|
|
223
|
+
if (this.addValue(part, event)) added = true;
|
|
224
|
+
if (this.isFull()) break;
|
|
225
|
+
}
|
|
226
|
+
if (added || parts.length) this.inputText.set("");
|
|
227
|
+
}
|
|
228
|
+
removeAt(index, event) {
|
|
229
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
230
|
+
const tags = this.tagValues();
|
|
231
|
+
if (index < 0 || index >= tags.length) return;
|
|
232
|
+
const value = tags[index];
|
|
233
|
+
this.commit(tags.filter((_, i) => i !== index));
|
|
234
|
+
this.tagRemove.emit({
|
|
235
|
+
originalEvent: event,
|
|
236
|
+
value,
|
|
237
|
+
index
|
|
238
|
+
});
|
|
239
|
+
const nextCount = tags.length - 1;
|
|
240
|
+
if (nextCount === 0) this.focusInput();
|
|
241
|
+
else this.focusTag(Math.min(index, nextCount - 1));
|
|
242
|
+
}
|
|
243
|
+
commit(value) {
|
|
244
|
+
this.modelValue.set(value);
|
|
245
|
+
this.emitChange(value);
|
|
246
|
+
this.valueChange.emit(value);
|
|
247
|
+
}
|
|
248
|
+
onInput(event) {
|
|
249
|
+
const value = event.target.value;
|
|
250
|
+
this.inputText.set(value);
|
|
251
|
+
if (this.delimiter() && this.split(value).length > 1) {
|
|
252
|
+
this.flushDelimited(event);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if (!this.typeahead()) return;
|
|
256
|
+
if (this.searchTimeout) clearTimeout(this.searchTimeout);
|
|
257
|
+
const query = this.inputText();
|
|
258
|
+
if (query.length < this.minLength()) {
|
|
259
|
+
this.close(false);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
this.focusedOption.set(-1);
|
|
263
|
+
this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
|
|
264
|
+
}
|
|
265
|
+
flushDelimited(event) {
|
|
266
|
+
const parts = this.split(this.inputText());
|
|
267
|
+
const remainder = parts.pop() ?? "";
|
|
268
|
+
parts.map((p) => p.trim()).filter(Boolean).forEach((p) => this.addValue(p, event));
|
|
269
|
+
this.inputText.set(remainder);
|
|
270
|
+
}
|
|
271
|
+
onKeydown(event) {
|
|
272
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
273
|
+
const input = this.inputEl()?.nativeElement;
|
|
274
|
+
const atStart = !input || input.selectionStart === 0 && input.selectionEnd === 0;
|
|
275
|
+
switch (event.key) {
|
|
276
|
+
case "Enter":
|
|
277
|
+
event.preventDefault();
|
|
278
|
+
if (this.panelOpen() && this.focusedOption() !== -1) this.selectFocusedOption(event);
|
|
279
|
+
else this.addFromInput(event);
|
|
280
|
+
return;
|
|
281
|
+
case "Backspace":
|
|
282
|
+
if (this.inputText().length === 0 && this.tagValues().length) {
|
|
283
|
+
event.preventDefault();
|
|
284
|
+
this.removeAt(this.tagValues().length - 1, event);
|
|
285
|
+
}
|
|
286
|
+
return;
|
|
287
|
+
case "ArrowLeft":
|
|
288
|
+
if (atStart && this.tagValues().length) {
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
this.focusTag(this.tagValues().length - 1);
|
|
291
|
+
}
|
|
292
|
+
return;
|
|
293
|
+
case "ArrowDown":
|
|
294
|
+
if (this.typeahead()) {
|
|
295
|
+
event.preventDefault();
|
|
296
|
+
this.panelOpen() ? this.moveOption(1) : this.reopen();
|
|
297
|
+
}
|
|
298
|
+
return;
|
|
299
|
+
case "ArrowUp":
|
|
300
|
+
if (this.typeahead() && this.panelOpen()) {
|
|
301
|
+
event.preventDefault();
|
|
302
|
+
this.moveOption(-1);
|
|
303
|
+
}
|
|
304
|
+
return;
|
|
305
|
+
case "Escape":
|
|
306
|
+
if (this.panelOpen()) {
|
|
307
|
+
event.preventDefault();
|
|
308
|
+
event.stopPropagation();
|
|
309
|
+
this.close();
|
|
310
|
+
}
|
|
311
|
+
return;
|
|
312
|
+
case "Tab":
|
|
313
|
+
if (this.addOnTab() && this.inputText().trim()) {
|
|
314
|
+
event.preventDefault();
|
|
315
|
+
this.addFromInput(event);
|
|
316
|
+
}
|
|
317
|
+
if (this.panelOpen()) this.close(false);
|
|
318
|
+
return;
|
|
319
|
+
default: return;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
onPaste(event) {
|
|
323
|
+
if (!this.addOnPaste() || !this.canType()) return;
|
|
324
|
+
const text = event.clipboardData?.getData("text") ?? "";
|
|
325
|
+
if (!text) return;
|
|
326
|
+
event.preventDefault();
|
|
327
|
+
const parts = (this.delimiter() ? this.split(text) : text.split(/[\r\n\t,;]+/)).map((p) => p.trim()).filter(Boolean);
|
|
328
|
+
for (const part of parts) {
|
|
329
|
+
this.addValue(part, event);
|
|
330
|
+
if (this.isFull()) break;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
onInputFocus(event) {
|
|
334
|
+
if (this.isDisabled()) return;
|
|
335
|
+
this.focusedTag.set(-1);
|
|
336
|
+
if (this.typeahead() && !this.queryDirty && this.completeOnFocus()) this.runSearch(event, this.inputText());
|
|
337
|
+
this.inputFocus.emit(event);
|
|
338
|
+
}
|
|
339
|
+
onInputBlur(event) {
|
|
340
|
+
const next = event.relatedTarget;
|
|
341
|
+
const insideComponent = this.containerEl().nativeElement.contains(next);
|
|
342
|
+
const insidePanel = this.panelEl()?.nativeElement.contains(next);
|
|
343
|
+
if (!insideComponent && !insidePanel) {
|
|
344
|
+
if (this.addOnBlur() && this.inputText().trim()) this.addFromInput(event);
|
|
345
|
+
this.emitTouch();
|
|
346
|
+
}
|
|
347
|
+
this.inputBlur.emit(event);
|
|
348
|
+
}
|
|
349
|
+
onBoxMousedown(event) {
|
|
350
|
+
const target = event.target;
|
|
351
|
+
if (target.closest("button") || target.closest(".ui-input-tags-tag") || target.closest("input")) return;
|
|
352
|
+
event.preventDefault();
|
|
353
|
+
this.focusInput();
|
|
354
|
+
}
|
|
355
|
+
onTagKeydown(event, index) {
|
|
356
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
357
|
+
switch (event.key) {
|
|
358
|
+
case "ArrowLeft":
|
|
359
|
+
event.preventDefault();
|
|
360
|
+
if (index > 0) this.focusTag(index - 1);
|
|
361
|
+
return;
|
|
362
|
+
case "ArrowRight":
|
|
363
|
+
event.preventDefault();
|
|
364
|
+
if (index < this.tagValues().length - 1) this.focusTag(index + 1);
|
|
365
|
+
else this.focusInput();
|
|
366
|
+
return;
|
|
367
|
+
case "Backspace":
|
|
368
|
+
case "Delete":
|
|
369
|
+
event.preventDefault();
|
|
370
|
+
this.removeAt(index, event);
|
|
371
|
+
return;
|
|
372
|
+
case "Home":
|
|
373
|
+
event.preventDefault();
|
|
374
|
+
this.focusTag(0);
|
|
375
|
+
return;
|
|
376
|
+
case "End":
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
this.focusTag(this.tagValues().length - 1);
|
|
379
|
+
return;
|
|
380
|
+
default: return;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
focusTag(index) {
|
|
384
|
+
this.focusedTag.set(index);
|
|
385
|
+
setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
|
|
386
|
+
}
|
|
387
|
+
focusInput() {
|
|
388
|
+
this.focusedTag.set(-1);
|
|
389
|
+
this.focus();
|
|
390
|
+
}
|
|
391
|
+
runSearch(event, query) {
|
|
392
|
+
this.queryDirty = true;
|
|
393
|
+
this.completeMethod.emit({
|
|
394
|
+
originalEvent: event,
|
|
395
|
+
query
|
|
396
|
+
});
|
|
397
|
+
this.open();
|
|
398
|
+
}
|
|
399
|
+
open() {
|
|
400
|
+
if (!this.canType() || this.panelOpen()) return;
|
|
401
|
+
const origin = this.containerEl().nativeElement.querySelector(".ui-field-box") ?? this.containerEl().nativeElement;
|
|
402
|
+
this.overlayOrigin.set(origin);
|
|
403
|
+
this.overlayWidth.set(origin.getBoundingClientRect().width);
|
|
404
|
+
this.focusedOption.set(this.autoOptionFocus() ? this.visibleOptions().findIndex((o) => !o.entry.disabled) : -1);
|
|
405
|
+
this.panelOpen.set(true);
|
|
406
|
+
this.opened.emit();
|
|
407
|
+
}
|
|
408
|
+
close(focusInput = true) {
|
|
409
|
+
if (!this.panelOpen()) return;
|
|
410
|
+
this.panelOpen.set(false);
|
|
411
|
+
this.focusedOption.set(-1);
|
|
412
|
+
this.queryDirty = false;
|
|
413
|
+
this.closed.emit();
|
|
414
|
+
if (focusInput) this.focus();
|
|
415
|
+
}
|
|
416
|
+
reopen() {
|
|
417
|
+
if (!this.visibleRows().length) return;
|
|
418
|
+
this.open();
|
|
419
|
+
if (this.focusedOption() === -1) this.moveOption(1);
|
|
420
|
+
}
|
|
421
|
+
onOptionClick(row, event) {
|
|
422
|
+
event.preventDefault();
|
|
423
|
+
this.selectRow(row, event);
|
|
424
|
+
}
|
|
425
|
+
onOptionMousedown(event) {
|
|
426
|
+
event.preventDefault();
|
|
427
|
+
}
|
|
428
|
+
onOptionMouseEnter(row) {
|
|
429
|
+
if (this.focusOnHover() && !row.entry.disabled) this.focusedOption.set(row.index);
|
|
430
|
+
}
|
|
431
|
+
selectRow(row, event) {
|
|
432
|
+
if (row.entry.disabled) return;
|
|
433
|
+
if (this.addValue(row.entry.value, event)) this.optionSelect.emit({
|
|
434
|
+
originalEvent: event,
|
|
435
|
+
value: row.entry.original
|
|
436
|
+
});
|
|
437
|
+
this.inputText.set("");
|
|
438
|
+
this.close();
|
|
439
|
+
}
|
|
440
|
+
selectFocusedOption(event) {
|
|
441
|
+
const row = this.visibleOptions()[this.focusedOption()];
|
|
442
|
+
if (row) this.selectRow(row, event);
|
|
443
|
+
else this.addFromInput(event);
|
|
444
|
+
}
|
|
445
|
+
moveOption(delta) {
|
|
446
|
+
const options = this.visibleOptions();
|
|
447
|
+
if (!options.length) return;
|
|
448
|
+
let i = this.focusedOption();
|
|
449
|
+
if (i === -1) i = delta === 1 ? -1 : options.length;
|
|
450
|
+
for (i += delta; i >= 0 && i < options.length; i += delta) if (!options[i].entry.disabled) {
|
|
451
|
+
this.focusedOption.set(i);
|
|
452
|
+
this.scrollOptionIntoView(options[i].id);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
scrollOptionIntoView(id) {
|
|
457
|
+
this.panelEl()?.nativeElement.querySelector(`[id="${id}"]`)?.scrollIntoView({ block: "nearest" });
|
|
458
|
+
}
|
|
459
|
+
labelOfValue(value) {
|
|
460
|
+
if (value === null || value === void 0) return "";
|
|
461
|
+
const entry = this.flatEntries().find((e) => this.equals(e.value, value));
|
|
462
|
+
if (entry) return entry.label;
|
|
463
|
+
return this.resolveLabel(value) ?? this.asText(value) ?? "";
|
|
464
|
+
}
|
|
465
|
+
toEntry(option) {
|
|
466
|
+
return this.resolver.toEntry(option);
|
|
467
|
+
}
|
|
468
|
+
getField(target, path) {
|
|
469
|
+
return this.resolver.getField(target, path);
|
|
470
|
+
}
|
|
471
|
+
resolveValue(option) {
|
|
472
|
+
return this.resolver.resolveValue(option);
|
|
473
|
+
}
|
|
474
|
+
resolveLabel(option) {
|
|
475
|
+
return this.resolver.resolveLabel(option);
|
|
476
|
+
}
|
|
477
|
+
asText(value) {
|
|
478
|
+
return this.resolver.asText(value);
|
|
479
|
+
}
|
|
480
|
+
isPresent(value) {
|
|
481
|
+
return this.tagValues().some((v) => this.equals(v, value));
|
|
482
|
+
}
|
|
483
|
+
equals(a, b) {
|
|
484
|
+
return this.resolver.equals(a, b);
|
|
485
|
+
}
|
|
486
|
+
split(text) {
|
|
487
|
+
const d = this.delimiter();
|
|
488
|
+
if (!d) return [text];
|
|
489
|
+
return text.split(d);
|
|
490
|
+
}
|
|
491
|
+
static {
|
|
492
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
493
|
+
minVersion: "12.0.0",
|
|
494
|
+
version: "22.3.0",
|
|
495
|
+
ngImport: i0,
|
|
496
|
+
type: UiInputTags,
|
|
497
|
+
deps: [],
|
|
498
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
static {
|
|
502
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
503
|
+
minVersion: "17.0.0",
|
|
504
|
+
version: "22.3.0",
|
|
505
|
+
type: UiInputTags,
|
|
506
|
+
isStandalone: true,
|
|
507
|
+
selector: "ui-input-tags",
|
|
508
|
+
inputs: {
|
|
509
|
+
placeholder: {
|
|
510
|
+
classPropertyName: "placeholder",
|
|
511
|
+
publicName: "placeholder",
|
|
512
|
+
isSignal: true,
|
|
513
|
+
isRequired: false,
|
|
514
|
+
transformFunction: null
|
|
515
|
+
},
|
|
516
|
+
max: {
|
|
517
|
+
classPropertyName: "max",
|
|
518
|
+
publicName: "max",
|
|
519
|
+
isSignal: true,
|
|
520
|
+
isRequired: false,
|
|
521
|
+
transformFunction: null
|
|
522
|
+
},
|
|
523
|
+
delimiter: {
|
|
524
|
+
classPropertyName: "delimiter",
|
|
525
|
+
publicName: "delimiter",
|
|
526
|
+
isSignal: true,
|
|
527
|
+
isRequired: false,
|
|
528
|
+
transformFunction: null
|
|
529
|
+
},
|
|
530
|
+
allowDuplicate: {
|
|
531
|
+
classPropertyName: "allowDuplicate",
|
|
532
|
+
publicName: "allowDuplicate",
|
|
533
|
+
isSignal: true,
|
|
534
|
+
isRequired: false,
|
|
535
|
+
transformFunction: null
|
|
536
|
+
},
|
|
537
|
+
addOnBlur: {
|
|
538
|
+
classPropertyName: "addOnBlur",
|
|
539
|
+
publicName: "addOnBlur",
|
|
540
|
+
isSignal: true,
|
|
541
|
+
isRequired: false,
|
|
542
|
+
transformFunction: null
|
|
543
|
+
},
|
|
544
|
+
addOnTab: {
|
|
545
|
+
classPropertyName: "addOnTab",
|
|
546
|
+
publicName: "addOnTab",
|
|
547
|
+
isSignal: true,
|
|
548
|
+
isRequired: false,
|
|
549
|
+
transformFunction: null
|
|
550
|
+
},
|
|
551
|
+
addOnPaste: {
|
|
552
|
+
classPropertyName: "addOnPaste",
|
|
553
|
+
publicName: "addOnPaste",
|
|
554
|
+
isSignal: true,
|
|
555
|
+
isRequired: false,
|
|
556
|
+
transformFunction: null
|
|
557
|
+
},
|
|
558
|
+
maxLength: {
|
|
559
|
+
classPropertyName: "maxLength",
|
|
560
|
+
publicName: "maxLength",
|
|
561
|
+
isSignal: true,
|
|
562
|
+
isRequired: false,
|
|
563
|
+
transformFunction: null
|
|
564
|
+
},
|
|
565
|
+
chipLevel: {
|
|
566
|
+
classPropertyName: "chipLevel",
|
|
567
|
+
publicName: "chipLevel",
|
|
568
|
+
isSignal: true,
|
|
569
|
+
isRequired: false,
|
|
570
|
+
transformFunction: null
|
|
571
|
+
},
|
|
572
|
+
chipSubLevel: {
|
|
573
|
+
classPropertyName: "chipSubLevel",
|
|
574
|
+
publicName: "chipSubLevel",
|
|
575
|
+
isSignal: true,
|
|
576
|
+
isRequired: false,
|
|
577
|
+
transformFunction: null
|
|
578
|
+
},
|
|
579
|
+
chipRounded: {
|
|
580
|
+
classPropertyName: "chipRounded",
|
|
581
|
+
publicName: "chipRounded",
|
|
582
|
+
isSignal: true,
|
|
583
|
+
isRequired: false,
|
|
584
|
+
transformFunction: null
|
|
585
|
+
},
|
|
586
|
+
typeahead: {
|
|
587
|
+
classPropertyName: "typeahead",
|
|
588
|
+
publicName: "typeahead",
|
|
589
|
+
isSignal: true,
|
|
590
|
+
isRequired: false,
|
|
591
|
+
transformFunction: null
|
|
592
|
+
},
|
|
593
|
+
suggestions: {
|
|
594
|
+
classPropertyName: "suggestions",
|
|
595
|
+
publicName: "suggestions",
|
|
596
|
+
isSignal: true,
|
|
597
|
+
isRequired: false,
|
|
598
|
+
transformFunction: null
|
|
599
|
+
},
|
|
600
|
+
optionLabel: {
|
|
601
|
+
classPropertyName: "optionLabel",
|
|
602
|
+
publicName: "optionLabel",
|
|
603
|
+
isSignal: true,
|
|
604
|
+
isRequired: false,
|
|
605
|
+
transformFunction: null
|
|
606
|
+
},
|
|
607
|
+
optionValue: {
|
|
608
|
+
classPropertyName: "optionValue",
|
|
609
|
+
publicName: "optionValue",
|
|
610
|
+
isSignal: true,
|
|
611
|
+
isRequired: false,
|
|
612
|
+
transformFunction: null
|
|
613
|
+
},
|
|
614
|
+
optionDisabled: {
|
|
615
|
+
classPropertyName: "optionDisabled",
|
|
616
|
+
publicName: "optionDisabled",
|
|
617
|
+
isSignal: true,
|
|
618
|
+
isRequired: false,
|
|
619
|
+
transformFunction: null
|
|
620
|
+
},
|
|
621
|
+
dataKey: {
|
|
622
|
+
classPropertyName: "dataKey",
|
|
623
|
+
publicName: "dataKey",
|
|
624
|
+
isSignal: true,
|
|
625
|
+
isRequired: false,
|
|
626
|
+
transformFunction: null
|
|
627
|
+
},
|
|
628
|
+
group: {
|
|
629
|
+
classPropertyName: "group",
|
|
630
|
+
publicName: "group",
|
|
631
|
+
isSignal: true,
|
|
632
|
+
isRequired: false,
|
|
633
|
+
transformFunction: null
|
|
634
|
+
},
|
|
635
|
+
optionGroupLabel: {
|
|
636
|
+
classPropertyName: "optionGroupLabel",
|
|
637
|
+
publicName: "optionGroupLabel",
|
|
638
|
+
isSignal: true,
|
|
639
|
+
isRequired: false,
|
|
640
|
+
transformFunction: null
|
|
641
|
+
},
|
|
642
|
+
optionGroupChildren: {
|
|
643
|
+
classPropertyName: "optionGroupChildren",
|
|
644
|
+
publicName: "optionGroupChildren",
|
|
645
|
+
isSignal: true,
|
|
646
|
+
isRequired: false,
|
|
647
|
+
transformFunction: null
|
|
648
|
+
},
|
|
649
|
+
minLength: {
|
|
650
|
+
classPropertyName: "minLength",
|
|
651
|
+
publicName: "minLength",
|
|
652
|
+
isSignal: true,
|
|
653
|
+
isRequired: false,
|
|
654
|
+
transformFunction: null
|
|
655
|
+
},
|
|
656
|
+
delay: {
|
|
657
|
+
classPropertyName: "delay",
|
|
658
|
+
publicName: "delay",
|
|
659
|
+
isSignal: true,
|
|
660
|
+
isRequired: false,
|
|
661
|
+
transformFunction: null
|
|
662
|
+
},
|
|
663
|
+
completeOnFocus: {
|
|
664
|
+
classPropertyName: "completeOnFocus",
|
|
665
|
+
publicName: "completeOnFocus",
|
|
666
|
+
isSignal: true,
|
|
667
|
+
isRequired: false,
|
|
668
|
+
transformFunction: null
|
|
669
|
+
},
|
|
670
|
+
scrollHeight: {
|
|
671
|
+
classPropertyName: "scrollHeight",
|
|
672
|
+
publicName: "scrollHeight",
|
|
673
|
+
isSignal: true,
|
|
674
|
+
isRequired: false,
|
|
675
|
+
transformFunction: null
|
|
676
|
+
},
|
|
677
|
+
autoOptionFocus: {
|
|
678
|
+
classPropertyName: "autoOptionFocus",
|
|
679
|
+
publicName: "autoOptionFocus",
|
|
680
|
+
isSignal: true,
|
|
681
|
+
isRequired: false,
|
|
682
|
+
transformFunction: null
|
|
683
|
+
},
|
|
684
|
+
focusOnHover: {
|
|
685
|
+
classPropertyName: "focusOnHover",
|
|
686
|
+
publicName: "focusOnHover",
|
|
687
|
+
isSignal: true,
|
|
688
|
+
isRequired: false,
|
|
689
|
+
transformFunction: null
|
|
690
|
+
},
|
|
691
|
+
autoFlip: {
|
|
692
|
+
classPropertyName: "autoFlip",
|
|
693
|
+
publicName: "autoFlip",
|
|
694
|
+
isSignal: true,
|
|
695
|
+
isRequired: false,
|
|
696
|
+
transformFunction: null
|
|
697
|
+
},
|
|
698
|
+
panelStyleClass: {
|
|
699
|
+
classPropertyName: "panelStyleClass",
|
|
700
|
+
publicName: "panelStyleClass",
|
|
701
|
+
isSignal: true,
|
|
702
|
+
isRequired: false,
|
|
703
|
+
transformFunction: null
|
|
704
|
+
},
|
|
705
|
+
emptyMessage: {
|
|
706
|
+
classPropertyName: "emptyMessage",
|
|
707
|
+
publicName: "emptyMessage",
|
|
708
|
+
isSignal: true,
|
|
709
|
+
isRequired: false,
|
|
710
|
+
transformFunction: null
|
|
711
|
+
},
|
|
712
|
+
removeTagLabel: {
|
|
713
|
+
classPropertyName: "removeTagLabel",
|
|
714
|
+
publicName: "removeTagLabel",
|
|
715
|
+
isSignal: true,
|
|
716
|
+
isRequired: false,
|
|
717
|
+
transformFunction: null
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
outputs: {
|
|
721
|
+
tagAdd: "tagAdd",
|
|
722
|
+
tagRemove: "tagRemove",
|
|
723
|
+
valueChange: "valueChange",
|
|
724
|
+
completeMethod: "completeMethod",
|
|
725
|
+
optionSelect: "optionSelect",
|
|
726
|
+
opened: "opened",
|
|
727
|
+
closed: "closed",
|
|
728
|
+
inputFocus: "inputFocus",
|
|
729
|
+
inputBlur: "inputBlur"
|
|
730
|
+
},
|
|
731
|
+
providers: [{
|
|
732
|
+
provide: NG_VALUE_ACCESSOR,
|
|
733
|
+
useExisting: forwardRef(() => UiInputTags),
|
|
734
|
+
multi: true
|
|
735
|
+
}],
|
|
736
|
+
queries: [
|
|
737
|
+
{
|
|
738
|
+
propertyName: "itemTemplate",
|
|
739
|
+
first: true,
|
|
740
|
+
predicate: ["item"],
|
|
741
|
+
descendants: true,
|
|
742
|
+
isSignal: true
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
propertyName: "optionTemplate",
|
|
746
|
+
first: true,
|
|
747
|
+
predicate: ["option"],
|
|
748
|
+
descendants: true,
|
|
749
|
+
isSignal: true
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
propertyName: "groupTemplate",
|
|
753
|
+
first: true,
|
|
754
|
+
predicate: ["group"],
|
|
755
|
+
descendants: true,
|
|
756
|
+
isSignal: true
|
|
757
|
+
}
|
|
758
|
+
],
|
|
759
|
+
viewQueries: [
|
|
760
|
+
{
|
|
761
|
+
propertyName: "containerEl",
|
|
762
|
+
first: true,
|
|
763
|
+
predicate: ["container"],
|
|
764
|
+
descendants: true,
|
|
765
|
+
isSignal: true
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
propertyName: "inputEl",
|
|
769
|
+
first: true,
|
|
770
|
+
predicate: ["inputEl"],
|
|
771
|
+
descendants: true,
|
|
772
|
+
isSignal: true
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
propertyName: "panelEl",
|
|
776
|
+
first: true,
|
|
777
|
+
predicate: ["panel"],
|
|
778
|
+
descendants: true,
|
|
779
|
+
isSignal: true
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
propertyName: "tagEls",
|
|
783
|
+
predicate: ["tagEl"],
|
|
784
|
+
descendants: true,
|
|
785
|
+
read: ElementRef,
|
|
786
|
+
isSignal: true
|
|
787
|
+
}
|
|
788
|
+
],
|
|
789
|
+
usesInheritance: true,
|
|
790
|
+
ngImport: i0,
|
|
791
|
+
template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n",
|
|
792
|
+
styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"],
|
|
793
|
+
dependencies: [
|
|
794
|
+
{
|
|
795
|
+
kind: "directive",
|
|
796
|
+
type: NgTemplateOutlet,
|
|
797
|
+
selector: "[ngTemplateOutlet]",
|
|
798
|
+
inputs: [
|
|
799
|
+
"ngTemplateOutletContext",
|
|
800
|
+
"ngTemplateOutlet",
|
|
801
|
+
"ngTemplateOutletInjector"
|
|
802
|
+
]
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
kind: "ngmodule",
|
|
806
|
+
type: OverlayModule
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
kind: "directive",
|
|
810
|
+
type: i1.CdkConnectedOverlay,
|
|
811
|
+
selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
|
|
812
|
+
inputs: [
|
|
813
|
+
"cdkConnectedOverlayOrigin",
|
|
814
|
+
"cdkConnectedOverlayPositions",
|
|
815
|
+
"cdkConnectedOverlayPositionStrategy",
|
|
816
|
+
"cdkConnectedOverlayOffsetX",
|
|
817
|
+
"cdkConnectedOverlayOffsetY",
|
|
818
|
+
"cdkConnectedOverlayWidth",
|
|
819
|
+
"cdkConnectedOverlayHeight",
|
|
820
|
+
"cdkConnectedOverlayMinWidth",
|
|
821
|
+
"cdkConnectedOverlayMinHeight",
|
|
822
|
+
"cdkConnectedOverlayBackdropClass",
|
|
823
|
+
"cdkConnectedOverlayPanelClass",
|
|
824
|
+
"cdkConnectedOverlayViewportMargin",
|
|
825
|
+
"cdkConnectedOverlayScrollStrategy",
|
|
826
|
+
"cdkConnectedOverlayOpen",
|
|
827
|
+
"cdkConnectedOverlayDisableClose",
|
|
828
|
+
"cdkConnectedOverlayTransformOriginOn",
|
|
829
|
+
"cdkConnectedOverlayHasBackdrop",
|
|
830
|
+
"cdkConnectedOverlayLockPosition",
|
|
831
|
+
"cdkConnectedOverlayFlexibleDimensions",
|
|
832
|
+
"cdkConnectedOverlayGrowAfterOpen",
|
|
833
|
+
"cdkConnectedOverlayPush",
|
|
834
|
+
"cdkConnectedOverlayDisposeOnNavigation",
|
|
835
|
+
"cdkConnectedOverlayUsePopover",
|
|
836
|
+
"cdkConnectedOverlayMatchWidth",
|
|
837
|
+
"cdkConnectedOverlay"
|
|
838
|
+
],
|
|
839
|
+
outputs: [
|
|
840
|
+
"backdropClick",
|
|
841
|
+
"positionChange",
|
|
842
|
+
"attach",
|
|
843
|
+
"detach",
|
|
844
|
+
"overlayKeydown",
|
|
845
|
+
"overlayOutsideClick"
|
|
846
|
+
],
|
|
847
|
+
exportAs: ["cdkConnectedOverlay"]
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
kind: "component",
|
|
851
|
+
type: UiField,
|
|
852
|
+
selector: "ui-field",
|
|
853
|
+
inputs: [
|
|
854
|
+
"label",
|
|
855
|
+
"for",
|
|
856
|
+
"required",
|
|
857
|
+
"size",
|
|
858
|
+
"level",
|
|
859
|
+
"floatLabel",
|
|
860
|
+
"filled",
|
|
861
|
+
"disabled",
|
|
862
|
+
"readonly",
|
|
863
|
+
"multiline",
|
|
864
|
+
"autoHeight",
|
|
865
|
+
"message",
|
|
866
|
+
"messageId",
|
|
867
|
+
"showMessageIcon",
|
|
868
|
+
"messageIcon",
|
|
869
|
+
"hasFooter",
|
|
870
|
+
"hasPrefix"
|
|
871
|
+
]
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
kind: "component",
|
|
875
|
+
type: UiIcon,
|
|
876
|
+
selector: "ui-icon",
|
|
877
|
+
inputs: [
|
|
878
|
+
"name",
|
|
879
|
+
"size",
|
|
880
|
+
"type",
|
|
881
|
+
"family",
|
|
882
|
+
"decorative",
|
|
883
|
+
"ariaLabel"
|
|
884
|
+
]
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
kind: "component",
|
|
888
|
+
type: UiChip,
|
|
889
|
+
selector: "ui-chip",
|
|
890
|
+
inputs: [
|
|
891
|
+
"label",
|
|
892
|
+
"level",
|
|
893
|
+
"subLevel",
|
|
894
|
+
"size",
|
|
895
|
+
"icon",
|
|
896
|
+
"image",
|
|
897
|
+
"alt",
|
|
898
|
+
"rounded",
|
|
899
|
+
"removable",
|
|
900
|
+
"removeIcon",
|
|
901
|
+
"disabled",
|
|
902
|
+
"selectable",
|
|
903
|
+
"selected",
|
|
904
|
+
"selectedIcon",
|
|
905
|
+
"ariaLabel",
|
|
906
|
+
"ariaLabelledBy",
|
|
907
|
+
"removeAriaLabel",
|
|
908
|
+
"removeTabindex"
|
|
909
|
+
],
|
|
910
|
+
outputs: [
|
|
911
|
+
"selectedChange",
|
|
912
|
+
"remove",
|
|
913
|
+
"chipClick",
|
|
914
|
+
"imageError"
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
kind: "directive",
|
|
919
|
+
type: UiMotion,
|
|
920
|
+
selector: "[uiMotion]",
|
|
921
|
+
inputs: [
|
|
922
|
+
"uiMotion",
|
|
923
|
+
"motionDuration",
|
|
924
|
+
"motionDelay",
|
|
925
|
+
"motionEasing",
|
|
926
|
+
"motionEnterEasing",
|
|
927
|
+
"motionLeaveEasing",
|
|
928
|
+
"motionDistance",
|
|
929
|
+
"motionScale",
|
|
930
|
+
"motionDisabled",
|
|
931
|
+
"motionOnInsert"
|
|
932
|
+
],
|
|
933
|
+
exportAs: ["uiMotion"]
|
|
934
|
+
}
|
|
935
|
+
]
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
940
|
+
minVersion: "12.0.0",
|
|
941
|
+
version: "22.3.0",
|
|
942
|
+
ngImport: i0,
|
|
943
|
+
type: UiInputTags,
|
|
944
|
+
decorators: [{
|
|
945
|
+
type: Component,
|
|
946
|
+
args: [{
|
|
947
|
+
selector: "ui-input-tags",
|
|
948
|
+
imports: [
|
|
949
|
+
NgTemplateOutlet,
|
|
950
|
+
OverlayModule,
|
|
951
|
+
UiField,
|
|
952
|
+
UiIcon,
|
|
953
|
+
UiChip,
|
|
954
|
+
UiMotion
|
|
955
|
+
],
|
|
956
|
+
providers: [{
|
|
957
|
+
provide: NG_VALUE_ACCESSOR,
|
|
958
|
+
useExisting: forwardRef(() => UiInputTags),
|
|
959
|
+
multi: true
|
|
960
|
+
}],
|
|
961
|
+
template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\"\n />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row.entry.original,\n option: row.entry.original,\n index: row.index,\n }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div\n class=\"ui-input-tags-scroller\"\n [class._small]=\"size() === 'small'\"\n [style.max-height]=\"scrollHeight() || null\"\n >\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container\n [ngTemplateOutlet]=\"rowTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: tag.value,\n value: tag.value,\n label: tag.label,\n index: tag.index,\n onRemove: removeAt.bind(this, tag.index),\n }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : focusedTag() === tag.index ? 0 : -1\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n",
|
|
962
|
+
styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--ui-input-tags-tag-gap, var(--units-xs));min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-tags-control{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--ui-input-tags-tag-radius, var(--radius-full));transition:box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-input-tags-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-input-tags-tag-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--ui-input-tags-tag-gap-custom, var(--units-2xs));min-height:var(--ui-input-tags-tag-height, 1.5rem);color:var(--ui-input-tags-tag-color, var(--form-high-content-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-tag-font-size, var(--size-typography-text-md))}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-tags-input::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-tags-input{flex:1 1 var(--ui-input-tags-input-min-width, 5rem);min-width:var(--ui-input-tags-input-min-width, 5rem);width:auto}.ui-input-tags-input._small{font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel{border:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-overlay-stroke, var(--ui-input-tags-panel-stroke, var(--form-high-stroke-default)));border-radius:var(--ui-overlay-radius, var(--ui-overlay-panel-radius, var(--radius-default)));background-color:var(--ui-overlay-surface, var(--ui-input-tags-panel-surface, var(--form-high-surface-default)));box-shadow:var(--ui-overlay-shadow, var(--ui-overlay-panel-shadow, var(--shadow-default-md)));font-family:var(--ui-overlay-panel-font-family, var(--fontfamily-base));display:flex;flex-direction:column;box-sizing:border-box;max-width:var(--ui-input-tags-panel-max-width, calc(100vw - var(--units-lg)));padding:var(--ui-input-tags-panel-padding, var(--units-xs))}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:var(--ui-input-tags-scroller-max-height, 12.5rem)}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:var(--ui-input-tags-scroller-max-height-small, 11.25rem)}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--ui-input-tags-panel-gap, var(--units-xs));margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--ui-input-tags-option-gap, var(--units-sm));box-sizing:border-box;height:var(--ui-input-tags-option-height, 2.5rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));border-radius:var(--ui-input-tags-option-radius, var(--radius-sm));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-option-color, var(--form-high-content-default));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-input-tags-panel .ui-input-tags-option._small{height:var(--ui-input-tags-option-height-small, 2rem);padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md));font-size:var(--ui-input-tags-font-size-small, var(--size-typography-text-md))}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--ui-input-tags-option-surface-hover, var(--global-background-default-hover))}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--ui-input-tags-option-color-selected, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--ui-input-tags-option-color-disabled, var(--form-high-content-disabled));cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--ui-input-tags-option-check-color, var(--form-high-content-checked))}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:var(--ui-input-tags-group-height, 2rem);flex-shrink:0;padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-group-font-size, var(--size-typography-text-md));font-weight:var(--ui-input-tags-weight, var(--weight-bold));color:var(--ui-input-tags-group-color, var(--form-low-content-default))}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--ui-input-tags-option-padding-x-small, var(--units-md))}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:var(--ui-input-tags-option-height, 2.5rem);padding:0 var(--ui-input-tags-option-padding-x, var(--units-default));font-family:var(--ui-input-tags-font-family, var(--fontfamily-base));font-size:var(--ui-input-tags-font-size, var(--size-typography-text-default));color:var(--ui-input-tags-empty-color, var(--form-low-content-default))}\n"]
|
|
963
|
+
}]
|
|
964
|
+
}],
|
|
965
|
+
ctorParameters: () => [],
|
|
966
|
+
propDecorators: {
|
|
967
|
+
placeholder: [{
|
|
968
|
+
type: i0.Input,
|
|
969
|
+
args: [{
|
|
970
|
+
isSignal: true,
|
|
971
|
+
alias: "placeholder",
|
|
972
|
+
required: false
|
|
973
|
+
}]
|
|
974
|
+
}],
|
|
975
|
+
max: [{
|
|
976
|
+
type: i0.Input,
|
|
977
|
+
args: [{
|
|
978
|
+
isSignal: true,
|
|
979
|
+
alias: "max",
|
|
980
|
+
required: false
|
|
981
|
+
}]
|
|
982
|
+
}],
|
|
983
|
+
delimiter: [{
|
|
984
|
+
type: i0.Input,
|
|
985
|
+
args: [{
|
|
986
|
+
isSignal: true,
|
|
987
|
+
alias: "delimiter",
|
|
988
|
+
required: false
|
|
989
|
+
}]
|
|
990
|
+
}],
|
|
991
|
+
allowDuplicate: [{
|
|
992
|
+
type: i0.Input,
|
|
993
|
+
args: [{
|
|
994
|
+
isSignal: true,
|
|
995
|
+
alias: "allowDuplicate",
|
|
996
|
+
required: false
|
|
997
|
+
}]
|
|
998
|
+
}],
|
|
999
|
+
addOnBlur: [{
|
|
1000
|
+
type: i0.Input,
|
|
1001
|
+
args: [{
|
|
1002
|
+
isSignal: true,
|
|
1003
|
+
alias: "addOnBlur",
|
|
1004
|
+
required: false
|
|
1005
|
+
}]
|
|
1006
|
+
}],
|
|
1007
|
+
addOnTab: [{
|
|
1008
|
+
type: i0.Input,
|
|
1009
|
+
args: [{
|
|
1010
|
+
isSignal: true,
|
|
1011
|
+
alias: "addOnTab",
|
|
1012
|
+
required: false
|
|
1013
|
+
}]
|
|
1014
|
+
}],
|
|
1015
|
+
addOnPaste: [{
|
|
1016
|
+
type: i0.Input,
|
|
1017
|
+
args: [{
|
|
1018
|
+
isSignal: true,
|
|
1019
|
+
alias: "addOnPaste",
|
|
1020
|
+
required: false
|
|
1021
|
+
}]
|
|
1022
|
+
}],
|
|
1023
|
+
maxLength: [{
|
|
1024
|
+
type: i0.Input,
|
|
1025
|
+
args: [{
|
|
1026
|
+
isSignal: true,
|
|
1027
|
+
alias: "maxLength",
|
|
1028
|
+
required: false
|
|
1029
|
+
}]
|
|
1030
|
+
}],
|
|
1031
|
+
chipLevel: [{
|
|
1032
|
+
type: i0.Input,
|
|
1033
|
+
args: [{
|
|
1034
|
+
isSignal: true,
|
|
1035
|
+
alias: "chipLevel",
|
|
1036
|
+
required: false
|
|
1037
|
+
}]
|
|
1038
|
+
}],
|
|
1039
|
+
chipSubLevel: [{
|
|
1040
|
+
type: i0.Input,
|
|
1041
|
+
args: [{
|
|
1042
|
+
isSignal: true,
|
|
1043
|
+
alias: "chipSubLevel",
|
|
1044
|
+
required: false
|
|
1045
|
+
}]
|
|
1046
|
+
}],
|
|
1047
|
+
chipRounded: [{
|
|
1048
|
+
type: i0.Input,
|
|
1049
|
+
args: [{
|
|
1050
|
+
isSignal: true,
|
|
1051
|
+
alias: "chipRounded",
|
|
1052
|
+
required: false
|
|
1053
|
+
}]
|
|
1054
|
+
}],
|
|
1055
|
+
typeahead: [{
|
|
1056
|
+
type: i0.Input,
|
|
1057
|
+
args: [{
|
|
1058
|
+
isSignal: true,
|
|
1059
|
+
alias: "typeahead",
|
|
1060
|
+
required: false
|
|
1061
|
+
}]
|
|
1062
|
+
}],
|
|
1063
|
+
suggestions: [{
|
|
1064
|
+
type: i0.Input,
|
|
1065
|
+
args: [{
|
|
1066
|
+
isSignal: true,
|
|
1067
|
+
alias: "suggestions",
|
|
1068
|
+
required: false
|
|
1069
|
+
}]
|
|
1070
|
+
}],
|
|
1071
|
+
optionLabel: [{
|
|
1072
|
+
type: i0.Input,
|
|
1073
|
+
args: [{
|
|
1074
|
+
isSignal: true,
|
|
1075
|
+
alias: "optionLabel",
|
|
1076
|
+
required: false
|
|
1077
|
+
}]
|
|
1078
|
+
}],
|
|
1079
|
+
optionValue: [{
|
|
1080
|
+
type: i0.Input,
|
|
1081
|
+
args: [{
|
|
1082
|
+
isSignal: true,
|
|
1083
|
+
alias: "optionValue",
|
|
1084
|
+
required: false
|
|
1085
|
+
}]
|
|
1086
|
+
}],
|
|
1087
|
+
optionDisabled: [{
|
|
1088
|
+
type: i0.Input,
|
|
1089
|
+
args: [{
|
|
1090
|
+
isSignal: true,
|
|
1091
|
+
alias: "optionDisabled",
|
|
1092
|
+
required: false
|
|
1093
|
+
}]
|
|
1094
|
+
}],
|
|
1095
|
+
dataKey: [{
|
|
1096
|
+
type: i0.Input,
|
|
1097
|
+
args: [{
|
|
1098
|
+
isSignal: true,
|
|
1099
|
+
alias: "dataKey",
|
|
1100
|
+
required: false
|
|
1101
|
+
}]
|
|
1102
|
+
}],
|
|
1103
|
+
group: [{
|
|
1104
|
+
type: i0.Input,
|
|
1105
|
+
args: [{
|
|
1106
|
+
isSignal: true,
|
|
1107
|
+
alias: "group",
|
|
1108
|
+
required: false
|
|
1109
|
+
}]
|
|
1110
|
+
}],
|
|
1111
|
+
optionGroupLabel: [{
|
|
1112
|
+
type: i0.Input,
|
|
1113
|
+
args: [{
|
|
1114
|
+
isSignal: true,
|
|
1115
|
+
alias: "optionGroupLabel",
|
|
1116
|
+
required: false
|
|
1117
|
+
}]
|
|
1118
|
+
}],
|
|
1119
|
+
optionGroupChildren: [{
|
|
1120
|
+
type: i0.Input,
|
|
1121
|
+
args: [{
|
|
1122
|
+
isSignal: true,
|
|
1123
|
+
alias: "optionGroupChildren",
|
|
1124
|
+
required: false
|
|
1125
|
+
}]
|
|
1126
|
+
}],
|
|
1127
|
+
minLength: [{
|
|
1128
|
+
type: i0.Input,
|
|
1129
|
+
args: [{
|
|
1130
|
+
isSignal: true,
|
|
1131
|
+
alias: "minLength",
|
|
1132
|
+
required: false
|
|
1133
|
+
}]
|
|
1134
|
+
}],
|
|
1135
|
+
delay: [{
|
|
1136
|
+
type: i0.Input,
|
|
1137
|
+
args: [{
|
|
1138
|
+
isSignal: true,
|
|
1139
|
+
alias: "delay",
|
|
1140
|
+
required: false
|
|
1141
|
+
}]
|
|
1142
|
+
}],
|
|
1143
|
+
completeOnFocus: [{
|
|
1144
|
+
type: i0.Input,
|
|
1145
|
+
args: [{
|
|
1146
|
+
isSignal: true,
|
|
1147
|
+
alias: "completeOnFocus",
|
|
1148
|
+
required: false
|
|
1149
|
+
}]
|
|
1150
|
+
}],
|
|
1151
|
+
scrollHeight: [{
|
|
1152
|
+
type: i0.Input,
|
|
1153
|
+
args: [{
|
|
1154
|
+
isSignal: true,
|
|
1155
|
+
alias: "scrollHeight",
|
|
1156
|
+
required: false
|
|
1157
|
+
}]
|
|
1158
|
+
}],
|
|
1159
|
+
autoOptionFocus: [{
|
|
1160
|
+
type: i0.Input,
|
|
1161
|
+
args: [{
|
|
1162
|
+
isSignal: true,
|
|
1163
|
+
alias: "autoOptionFocus",
|
|
1164
|
+
required: false
|
|
1165
|
+
}]
|
|
1166
|
+
}],
|
|
1167
|
+
focusOnHover: [{
|
|
1168
|
+
type: i0.Input,
|
|
1169
|
+
args: [{
|
|
1170
|
+
isSignal: true,
|
|
1171
|
+
alias: "focusOnHover",
|
|
1172
|
+
required: false
|
|
1173
|
+
}]
|
|
1174
|
+
}],
|
|
1175
|
+
autoFlip: [{
|
|
1176
|
+
type: i0.Input,
|
|
1177
|
+
args: [{
|
|
1178
|
+
isSignal: true,
|
|
1179
|
+
alias: "autoFlip",
|
|
1180
|
+
required: false
|
|
1181
|
+
}]
|
|
1182
|
+
}],
|
|
1183
|
+
panelStyleClass: [{
|
|
1184
|
+
type: i0.Input,
|
|
1185
|
+
args: [{
|
|
1186
|
+
isSignal: true,
|
|
1187
|
+
alias: "panelStyleClass",
|
|
1188
|
+
required: false
|
|
1189
|
+
}]
|
|
1190
|
+
}],
|
|
1191
|
+
emptyMessage: [{
|
|
1192
|
+
type: i0.Input,
|
|
1193
|
+
args: [{
|
|
1194
|
+
isSignal: true,
|
|
1195
|
+
alias: "emptyMessage",
|
|
1196
|
+
required: false
|
|
1197
|
+
}]
|
|
1198
|
+
}],
|
|
1199
|
+
removeTagLabel: [{
|
|
1200
|
+
type: i0.Input,
|
|
1201
|
+
args: [{
|
|
1202
|
+
isSignal: true,
|
|
1203
|
+
alias: "removeTagLabel",
|
|
1204
|
+
required: false
|
|
1205
|
+
}]
|
|
1206
|
+
}],
|
|
1207
|
+
tagAdd: [{
|
|
1208
|
+
type: i0.Output,
|
|
1209
|
+
args: ["tagAdd"]
|
|
1210
|
+
}],
|
|
1211
|
+
tagRemove: [{
|
|
1212
|
+
type: i0.Output,
|
|
1213
|
+
args: ["tagRemove"]
|
|
1214
|
+
}],
|
|
1215
|
+
valueChange: [{
|
|
1216
|
+
type: i0.Output,
|
|
1217
|
+
args: ["valueChange"]
|
|
1218
|
+
}],
|
|
1219
|
+
completeMethod: [{
|
|
1220
|
+
type: i0.Output,
|
|
1221
|
+
args: ["completeMethod"]
|
|
1222
|
+
}],
|
|
1223
|
+
optionSelect: [{
|
|
1224
|
+
type: i0.Output,
|
|
1225
|
+
args: ["optionSelect"]
|
|
1226
|
+
}],
|
|
1227
|
+
opened: [{
|
|
1228
|
+
type: i0.Output,
|
|
1229
|
+
args: ["opened"]
|
|
1230
|
+
}],
|
|
1231
|
+
closed: [{
|
|
1232
|
+
type: i0.Output,
|
|
1233
|
+
args: ["closed"]
|
|
1234
|
+
}],
|
|
1235
|
+
inputFocus: [{
|
|
1236
|
+
type: i0.Output,
|
|
1237
|
+
args: ["inputFocus"]
|
|
1238
|
+
}],
|
|
1239
|
+
inputBlur: [{
|
|
1240
|
+
type: i0.Output,
|
|
1241
|
+
args: ["inputBlur"]
|
|
1242
|
+
}],
|
|
1243
|
+
itemTemplate: [{
|
|
1244
|
+
type: i0.ContentChild,
|
|
1245
|
+
args: ["item", { isSignal: true }]
|
|
1246
|
+
}],
|
|
1247
|
+
optionTemplate: [{
|
|
1248
|
+
type: i0.ContentChild,
|
|
1249
|
+
args: ["option", { isSignal: true }]
|
|
1250
|
+
}],
|
|
1251
|
+
groupTemplate: [{
|
|
1252
|
+
type: i0.ContentChild,
|
|
1253
|
+
args: ["group", { isSignal: true }]
|
|
1254
|
+
}],
|
|
1255
|
+
containerEl: [{
|
|
1256
|
+
type: i0.ViewChild,
|
|
1257
|
+
args: ["container", { isSignal: true }]
|
|
1258
|
+
}],
|
|
1259
|
+
inputEl: [{
|
|
1260
|
+
type: i0.ViewChild,
|
|
1261
|
+
args: ["inputEl", { isSignal: true }]
|
|
1262
|
+
}],
|
|
1263
|
+
panelEl: [{
|
|
1264
|
+
type: i0.ViewChild,
|
|
1265
|
+
args: ["panel", { isSignal: true }]
|
|
1266
|
+
}],
|
|
1267
|
+
tagEls: [{
|
|
1268
|
+
type: i0.ViewChildren,
|
|
1269
|
+
args: ["tagEl", {
|
|
1270
|
+
read: ElementRef,
|
|
1271
|
+
isSignal: true
|
|
1272
|
+
}]
|
|
1273
|
+
}]
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
697
1276
|
export { UiInputTags };
|
|
698
|
-
|
|
1277
|
+
|
|
1278
|
+
//# sourceMappingURL=4sh-ui-kit-forms-ui-input-tags.mjs.map
|