@kirbydesign/extensions-angular 5.0.1 → 6.0.0-dev-d045bb2
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/assets/spot-illustrations/graph.coins.dot.bars.medium.svg +5 -0
- package/assets/spot-illustrations/house.plant.door.bars.medium.svg +5 -0
- package/assets/spot-illustrations/letters.arrow.triangle.circle.large.svg +5 -0
- package/assets/spot-illustrations/moneybag.money-notes.dot.bars.medium.svg +5 -0
- package/assets/spot-illustrations/template.plus.dot.circle.xlarge.svg +5 -0
- package/fesm2022/kirbydesign-extensions-angular-combobox.mjs +897 -852
- package/fesm2022/kirbydesign-extensions-angular-combobox.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs +206 -128
- package/fesm2022/kirbydesign-extensions-angular-image-banner.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs +541 -411
- package/fesm2022/kirbydesign-extensions-angular-localization.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs +1462 -603
- package/fesm2022/kirbydesign-extensions-angular-sidebar-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs +79 -40
- package/fesm2022/kirbydesign-extensions-angular-skeleton-loader.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular-spot-illustration.mjs +164 -140
- package/fesm2022/kirbydesign-extensions-angular-spot-illustration.mjs.map +1 -1
- package/fesm2022/kirbydesign-extensions-angular.mjs +1 -8
- package/fesm2022/kirbydesign-extensions-angular.mjs.map +1 -1
- package/package.json +13 -13
- package/types/kirbydesign-extensions-angular-combobox.d.ts +273 -216
- package/types/kirbydesign-extensions-angular-image-banner.d.ts +102 -66
- package/types/kirbydesign-extensions-angular-localization.d.ts +185 -204
- package/types/kirbydesign-extensions-angular-sidebar-menu.d.ts +137 -120
- package/types/kirbydesign-extensions-angular-skeleton-loader.d.ts +23 -17
- package/types/kirbydesign-extensions-angular-spot-illustration.d.ts +224 -187
- package/types/kirbydesign-extensions-angular.d.ts +2 -2
- package/combobox/package.json +0 -4
- package/image-banner/package.json +0 -4
- package/localization/package.json +0 -4
- package/sidebar-menu/package.json +0 -4
- package/skeleton-loader/package.json +0 -4
- package/spot-illustration/package.json +0 -4
|
@@ -1,855 +1,900 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { CardComponent } from
|
|
5
|
-
import { UniqueIdGenerator } from
|
|
6
|
-
import { ItemComponent } from
|
|
7
|
-
import { ListItemTemplateDirective } from
|
|
8
|
-
import { HorizontalDirection, PopoverComponent } from
|
|
9
|
-
import {
|
|
10
|
-
import { FORM_FIELD_CONTROL } from
|
|
11
|
-
import * as i1 from
|
|
12
|
-
import { forwardAttributes } from
|
|
13
|
-
import { IconComponent } from
|
|
14
|
-
import { NgTemplateOutlet } from
|
|
15
|
-
import { CdkFixedSizeVirtualScroll,
|
|
16
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, RendererStyleFlags2, TemplateRef, ViewChild, ViewChildren, forwardRef } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { CardComponent } from "@kirbydesign/designsystem/card";
|
|
5
|
+
import { UniqueIdGenerator } from "@kirbydesign/designsystem/helpers";
|
|
6
|
+
import { ItemComponent } from "@kirbydesign/designsystem/item";
|
|
7
|
+
import { ListItemTemplateDirective } from "@kirbydesign/designsystem/list";
|
|
8
|
+
import { HorizontalDirection, PopoverComponent } from "@kirbydesign/designsystem/popover";
|
|
9
|
+
import { AffixDirective, InputComponent, InputSize } from "@kirbydesign/designsystem/form-field";
|
|
10
|
+
import { FORM_FIELD_CONTROL } from "@kirbydesign/designsystem/types";
|
|
11
|
+
import * as i1 from "@kirbydesign/designsystem/shared";
|
|
12
|
+
import { forwardAttributes } from "@kirbydesign/designsystem/shared";
|
|
13
|
+
import { IconComponent } from "@kirbydesign/designsystem/icon";
|
|
14
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
15
|
+
import { CdkFixedSizeVirtualScroll, CdkVirtualForOf, CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
|
|
17
16
|
var OpenState;
|
|
18
|
-
(function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
(function(OpenState) {
|
|
18
|
+
OpenState[OpenState["closed"] = 0] = "closed";
|
|
19
|
+
OpenState[OpenState["opening"] = 1] = "opening";
|
|
20
|
+
OpenState[OpenState["open"] = 2] = "open";
|
|
22
21
|
})(OpenState || (OpenState = {}));
|
|
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
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
22
|
+
var ComboboxComponent = class ComboboxComponent {
|
|
23
|
+
static {
|
|
24
|
+
this.HEIGHT_OF_STANDARD_ITEM = 44;
|
|
25
|
+
}
|
|
26
|
+
compareAlphabetically(textA, textB) {
|
|
27
|
+
if (textA < textB) return -1;
|
|
28
|
+
if (textA > textB) return 1;
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
getItemText(item) {
|
|
32
|
+
if (this.isTypeString(item)) return item;
|
|
33
|
+
if (this.objectHasItemTextProperty(item)) {
|
|
34
|
+
const textValue = item[this.itemTextProperty];
|
|
35
|
+
if (typeof textValue === "string") return textValue;
|
|
36
|
+
}
|
|
37
|
+
return "";
|
|
38
|
+
}
|
|
39
|
+
get dropdownMaxHeight() {
|
|
40
|
+
return 8 * ComboboxComponent.HEIGHT_OF_STANDARD_ITEM;
|
|
41
|
+
}
|
|
42
|
+
get dropdownMinHeight() {
|
|
43
|
+
return this.itemHeight;
|
|
44
|
+
}
|
|
45
|
+
get viewportHeight() {
|
|
46
|
+
const itemCount = this.searchItems?.length ?? 0;
|
|
47
|
+
if (itemCount === 0) return this.dropdownMinHeight;
|
|
48
|
+
return Math.min(this.dropdownMaxHeight, Math.max(this.dropdownMinHeight, itemCount * this.itemHeight));
|
|
49
|
+
}
|
|
50
|
+
isTypeString(item) {
|
|
51
|
+
return typeof item === "string";
|
|
52
|
+
}
|
|
53
|
+
objectHasItemTextProperty(item) {
|
|
54
|
+
return item != void 0 && typeof item === "object" && this.itemTextProperty in item;
|
|
55
|
+
}
|
|
56
|
+
objectHasItemIdProperty(item) {
|
|
57
|
+
return item != void 0 && typeof item === "object" && this.itemIdProperty in item;
|
|
58
|
+
}
|
|
59
|
+
getItemId(item) {
|
|
60
|
+
if (this.isTypeString(item)) return item;
|
|
61
|
+
if (this.objectHasItemIdProperty(item)) {
|
|
62
|
+
const idValue = item[this.itemIdProperty];
|
|
63
|
+
if (this.isTypeString(idValue)) return idValue;
|
|
64
|
+
}
|
|
65
|
+
console.error("Each item must have an id property for scroll to work. Ensure that the itemIdProperty input is set correctly, and that each item has a unique id value.");
|
|
66
|
+
return "";
|
|
67
|
+
}
|
|
68
|
+
get searchItems() {
|
|
69
|
+
return this._searchItems;
|
|
70
|
+
}
|
|
71
|
+
set searchItems(value) {
|
|
72
|
+
this._searchItems = value;
|
|
73
|
+
if (!this._searchItems) return;
|
|
74
|
+
if (this.textInput?.nativeElement?.value) {
|
|
75
|
+
this.focusedItem = this._searchItems[0];
|
|
76
|
+
this._virtualScrollViewport?.scrollToIndex(0);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
get items() {
|
|
80
|
+
return this._items;
|
|
81
|
+
}
|
|
82
|
+
set items(value) {
|
|
83
|
+
this._items = value;
|
|
84
|
+
this.searchItems = this._items;
|
|
85
|
+
}
|
|
86
|
+
get selectedItem() {
|
|
87
|
+
return this._selectedItem;
|
|
88
|
+
}
|
|
89
|
+
set selectedItem(value) {
|
|
90
|
+
if (value !== this._selectedItem) {
|
|
91
|
+
this._selectedItem = value;
|
|
92
|
+
this.focusedItem = this._selectedItem;
|
|
93
|
+
this.value = this._selectedItem;
|
|
94
|
+
this.setInputDisplayValue(this.getItemText(this.selectedItem));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
get focusedItem() {
|
|
98
|
+
return this._focusedItem;
|
|
99
|
+
}
|
|
100
|
+
set focusedItem(item) {
|
|
101
|
+
this.setAriaPosinsetOnElement(item);
|
|
102
|
+
if (this._focusedItem === item) return;
|
|
103
|
+
this._focusedItem = item;
|
|
104
|
+
}
|
|
105
|
+
getIndexOfItem(item) {
|
|
106
|
+
return this.searchItems.indexOf(item);
|
|
107
|
+
}
|
|
108
|
+
getKirbyElement(item) {
|
|
109
|
+
const kirbyItems = this.getKirbyItems();
|
|
110
|
+
if (!kirbyItems || !item) return;
|
|
111
|
+
const itemId = this.getItemId(item);
|
|
112
|
+
return kirbyItems.find((el) => el.nativeElement.id === itemId);
|
|
113
|
+
}
|
|
114
|
+
setAriaPosinsetOnElement(item) {
|
|
115
|
+
const element = this.getKirbyElement(item);
|
|
116
|
+
const index = this.getIndexOfItem(item);
|
|
117
|
+
const setsize = this.searchItems.length;
|
|
118
|
+
if (!element) return;
|
|
119
|
+
this.renderer.setAttribute(element.nativeElement, "aria-setsize", setsize.toString());
|
|
120
|
+
this.renderer.setAttribute(element.nativeElement, "aria-posinset", `${index + 1}`);
|
|
121
|
+
}
|
|
122
|
+
set popout(direction) {
|
|
123
|
+
this._popout = direction || HorizontalDirection.right;
|
|
124
|
+
}
|
|
125
|
+
get popout() {
|
|
126
|
+
return this._popout;
|
|
127
|
+
}
|
|
128
|
+
get _isDisabled() {
|
|
129
|
+
return this.disabled ? "disabled" : null;
|
|
130
|
+
}
|
|
131
|
+
get hasError() {
|
|
132
|
+
return this._hasError;
|
|
133
|
+
}
|
|
134
|
+
set hasError(value) {
|
|
135
|
+
if (this._hasError !== value) {
|
|
136
|
+
this._hasError = value;
|
|
137
|
+
this.hasErrorChange.emit(this._hasError);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
get _noBlurOnScroll() {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
get _isBlockLevel() {
|
|
144
|
+
return this.expand === "block";
|
|
145
|
+
}
|
|
146
|
+
get _isOpening() {
|
|
147
|
+
return this.state === OpenState.opening;
|
|
148
|
+
}
|
|
149
|
+
get isOpen() {
|
|
150
|
+
return this.state === OpenState.open;
|
|
151
|
+
}
|
|
152
|
+
get hasValue() {
|
|
153
|
+
return this.selectedItem != null;
|
|
154
|
+
}
|
|
155
|
+
get interactiveElement() {
|
|
156
|
+
return this.textInput.nativeElement;
|
|
157
|
+
}
|
|
158
|
+
forwardAriaLabelToCombobox() {
|
|
159
|
+
forwardAttributes(this.elementRef.nativeElement, this._attributesToForward, this.renderer, this.rootElement.nativeElement);
|
|
160
|
+
}
|
|
161
|
+
set kirbyItemsSlotted(kirbyItems) {
|
|
162
|
+
if (this.disposeItemClickListeners?.length > 0) this.unlistenAllSlottedItems();
|
|
163
|
+
kirbyItems.forEach((kirbyItem) => {
|
|
164
|
+
this.renderer.setAttribute(kirbyItem.nativeElement, "role", "option");
|
|
165
|
+
const disposeClickListener = this.renderer.listen(kirbyItem.nativeElement, "click", () => {
|
|
166
|
+
const id = kirbyItem.nativeElement.getAttribute("id");
|
|
167
|
+
const item = this.items.find((it) => this.getItemId(it) === id);
|
|
168
|
+
if (item) this.onItemSelect(item);
|
|
169
|
+
});
|
|
170
|
+
this.disposeItemClickListeners.push(disposeClickListener);
|
|
171
|
+
});
|
|
172
|
+
this._kirbyItemsSlotted = kirbyItems;
|
|
173
|
+
}
|
|
174
|
+
get kirbyItemsSlotted() {
|
|
175
|
+
return this._kirbyItemsSlotted;
|
|
176
|
+
}
|
|
177
|
+
constructor(renderer, elementRef, cdr, resizeObserverService) {
|
|
178
|
+
this.renderer = renderer;
|
|
179
|
+
this.elementRef = elementRef;
|
|
180
|
+
this.cdr = cdr;
|
|
181
|
+
this.resizeObserverService = resizeObserverService;
|
|
182
|
+
this.state = OpenState.closed;
|
|
183
|
+
this._popout = HorizontalDirection.right;
|
|
184
|
+
this._attributesToForward = ["aria-label", "aria-labelledby"];
|
|
185
|
+
this._listboxId = UniqueIdGenerator.scopedTo("kirby-x-combobox").next();
|
|
186
|
+
this._comboboxId = UniqueIdGenerator.scopedTo("kirby-input").next();
|
|
187
|
+
this._defaultSearchFunction = (searchTerm, itemsToSearch) => {
|
|
188
|
+
if (!searchTerm) return itemsToSearch;
|
|
189
|
+
const lowerSearchTerm = searchTerm.toLowerCase();
|
|
190
|
+
return itemsToSearch.filter((item) => this.getItemText(item).toLowerCase().includes(lowerSearchTerm)).sort((a, b) => {
|
|
191
|
+
const textA = this.getItemText(a).toLowerCase();
|
|
192
|
+
const textB = this.getItemText(b).toLowerCase();
|
|
193
|
+
const textAStartsWith = textA.startsWith(searchTerm);
|
|
194
|
+
const textBStartsWith = textB.startsWith(searchTerm);
|
|
195
|
+
if (textAStartsWith && textBStartsWith) return this.compareAlphabetically(textA, textB);
|
|
196
|
+
if (textAStartsWith) return -1;
|
|
197
|
+
if (textBStartsWith) return 1;
|
|
198
|
+
return this.compareAlphabetically(textA, textB);
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
this.noSearchResultsText = "No results found.";
|
|
202
|
+
this.selectionClearedAnnouncement = "Selection cleared.";
|
|
203
|
+
this._liveRegionText = "";
|
|
204
|
+
this.itemTextProperty = "text";
|
|
205
|
+
this.itemHeight = 44;
|
|
206
|
+
this.itemIdProperty = "id";
|
|
207
|
+
this.searchFunction = this._defaultSearchFunction;
|
|
208
|
+
this._searchItems = [];
|
|
209
|
+
this._items = [];
|
|
210
|
+
this._selectedItem = void 0;
|
|
211
|
+
this._focusedItem = void 0;
|
|
212
|
+
this.placeholder = "Please search...";
|
|
213
|
+
this.disabled = false;
|
|
214
|
+
this.hasErrorChange = new EventEmitter();
|
|
215
|
+
this._hasError = false;
|
|
216
|
+
this.size = InputSize.medium;
|
|
217
|
+
this.change = new EventEmitter();
|
|
218
|
+
this.value = void 0;
|
|
219
|
+
this.disposeItemClickListeners = [];
|
|
220
|
+
this.onChange = () => {};
|
|
221
|
+
this.onTouched = () => {};
|
|
222
|
+
}
|
|
223
|
+
onToggle(event) {
|
|
224
|
+
event.stopPropagation();
|
|
225
|
+
this.textInput?.nativeElement.focus();
|
|
226
|
+
this.toggle();
|
|
227
|
+
}
|
|
228
|
+
toggle() {
|
|
229
|
+
if (this.disabled) return;
|
|
230
|
+
this.isOpen ? this.close() : this.open();
|
|
231
|
+
}
|
|
232
|
+
ngAfterViewInit() {
|
|
233
|
+
if (this.expand === "block") {
|
|
234
|
+
const { width: initialWidth } = this.elementRef.nativeElement.getBoundingClientRect();
|
|
235
|
+
this.setPopoverCardStyle("max-width", "initial");
|
|
236
|
+
this.setPopoverCardStyle("min-width", "initial");
|
|
237
|
+
this.setPopoverCardStyle("--kirby-card-width", `${initialWidth}px`);
|
|
238
|
+
this.resizeObserverService.observe(this.elementRef, (entry) => {
|
|
239
|
+
const newWidth = entry.contentRect.width;
|
|
240
|
+
if (newWidth > 0) this.setPopoverCardStyle("--kirby-card-width", `${newWidth}px`);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
this.forwardAriaLabelToCombobox();
|
|
244
|
+
}
|
|
245
|
+
setPopoverCardStyle(style, value) {
|
|
246
|
+
this.renderer.setStyle(this.cardElement?.nativeElement, style, value, RendererStyleFlags2.DashCase);
|
|
247
|
+
}
|
|
248
|
+
ngOnDestroy() {
|
|
249
|
+
this.unlistenAllSlottedItems();
|
|
250
|
+
this.unobserveResize();
|
|
251
|
+
}
|
|
252
|
+
open() {
|
|
253
|
+
if (this.disabled) return;
|
|
254
|
+
if (!this.isOpen) {
|
|
255
|
+
this.state = OpenState.opening;
|
|
256
|
+
this.showPopOver();
|
|
257
|
+
this.focusedItem = this.selectedItem;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
showPopOver() {
|
|
261
|
+
if (this.state === OpenState.opening) {
|
|
262
|
+
this.state = OpenState.open;
|
|
263
|
+
this.popover?.show();
|
|
264
|
+
this.cdr.markForCheck();
|
|
265
|
+
requestAnimationFrame(() => this.scrollToIndexIntoViewWhenOpeningPopup());
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
close() {
|
|
269
|
+
if (this.disabled) return;
|
|
270
|
+
if (this.isOpen) {
|
|
271
|
+
this.state = OpenState.closed;
|
|
272
|
+
this.setInputDisplayValue(this.getItemText(this.selectedItem));
|
|
273
|
+
this.searchItems = this.items;
|
|
274
|
+
this.popover?.hide();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
onItemSelect(item) {
|
|
278
|
+
if (item instanceof HTMLElement) return;
|
|
279
|
+
this.selectItem(item);
|
|
280
|
+
this.close();
|
|
281
|
+
}
|
|
282
|
+
writeValue(value) {
|
|
283
|
+
this.selectItemByInput(value);
|
|
284
|
+
this.setInputDisplayValue(this.getItemText(this.value));
|
|
285
|
+
this.cdr.markForCheck();
|
|
286
|
+
}
|
|
287
|
+
registerOnChange(fn) {
|
|
288
|
+
this.onChange = fn;
|
|
289
|
+
}
|
|
290
|
+
registerOnTouched(fn) {
|
|
291
|
+
this.onTouched = fn;
|
|
292
|
+
}
|
|
293
|
+
setDisabledState(isDisabled) {
|
|
294
|
+
this.disabled = isDisabled;
|
|
295
|
+
this.cdr.markForCheck();
|
|
296
|
+
}
|
|
297
|
+
selectItem(item) {
|
|
298
|
+
if (item != this.selectedItem) {
|
|
299
|
+
this.selectedItem = item;
|
|
300
|
+
this.focusedItem = item;
|
|
301
|
+
this.change.emit(this.value);
|
|
302
|
+
this.onChange(this.value);
|
|
303
|
+
this.setInputDisplayValue(this.getItemText(item));
|
|
304
|
+
this.searchItems = this.items;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
selectItemByInput(input) {
|
|
308
|
+
this.selectedItem = this.findItemByInput(input);
|
|
309
|
+
}
|
|
310
|
+
onInput(event) {
|
|
311
|
+
if (!this.isOpen) this.open();
|
|
312
|
+
const input = event.target;
|
|
313
|
+
if (!input.value) this.clearSelection();
|
|
314
|
+
this.updateSearchResults(input.value);
|
|
315
|
+
if (document.activeElement !== this.textInput?.nativeElement) this.textInput?.nativeElement.focus();
|
|
316
|
+
}
|
|
317
|
+
clearSelection() {
|
|
318
|
+
this.selectItem(void 0);
|
|
319
|
+
this.announce(this.selectionClearedAnnouncement);
|
|
320
|
+
}
|
|
321
|
+
announce(message) {
|
|
322
|
+
clearTimeout(this._announceTimeout);
|
|
323
|
+
this._liveRegionText = "";
|
|
324
|
+
this._announceTimeout = setTimeout(() => {
|
|
325
|
+
this._liveRegionText = message;
|
|
326
|
+
this.cdr.markForCheck();
|
|
327
|
+
}, 100);
|
|
328
|
+
}
|
|
329
|
+
updateSearchResults(inputValue) {
|
|
330
|
+
this.searchItems = inputValue ? this.searchFunction(inputValue, this.items) : this.items;
|
|
331
|
+
if (inputValue && this.searchItems.length === 0) this.announce(this.noSearchResultsText);
|
|
332
|
+
}
|
|
333
|
+
onPopoverWillHide() {
|
|
334
|
+
this.state = OpenState.closed;
|
|
335
|
+
this.rootElement.nativeElement.focus();
|
|
336
|
+
this.onTouched();
|
|
337
|
+
}
|
|
338
|
+
onPopoverClick() {
|
|
339
|
+
this.close();
|
|
340
|
+
}
|
|
341
|
+
onMouseDown(event) {
|
|
342
|
+
if (this.disabled) {
|
|
343
|
+
event.preventDefault();
|
|
344
|
+
event.stopImmediatePropagation();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
onTouchStart(event) {
|
|
348
|
+
if (this.isOpen) event.stopPropagation();
|
|
349
|
+
}
|
|
350
|
+
onFocusOut() {
|
|
351
|
+
setTimeout(() => {
|
|
352
|
+
const activeElement = document.activeElement;
|
|
353
|
+
const isOnTriggerButton = activeElement && this.elementRef.nativeElement.contains(activeElement);
|
|
354
|
+
const isInsidePopover = activeElement && activeElement.closest("kirby-popover");
|
|
355
|
+
if (isOnTriggerButton || isInsidePopover) return;
|
|
356
|
+
if (this.isOpen && activeElement === document.body) {
|
|
357
|
+
this.textInput?.nativeElement.focus();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
if (this.isOpen) this.close();
|
|
361
|
+
this.onTouched();
|
|
362
|
+
}, 0);
|
|
363
|
+
}
|
|
364
|
+
onTab() {
|
|
365
|
+
if (this.isOpen) {
|
|
366
|
+
this.selectItem(this.focusedItem);
|
|
367
|
+
this.close();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
onEscape() {
|
|
371
|
+
this.close();
|
|
372
|
+
}
|
|
373
|
+
onEnter(event) {
|
|
374
|
+
event.preventDefault();
|
|
375
|
+
event.stopPropagation();
|
|
376
|
+
if (this.isOpen) this.selectItem(this.focusedItem);
|
|
377
|
+
this.toggle();
|
|
378
|
+
}
|
|
379
|
+
onArrowKeys(event) {
|
|
380
|
+
if (this.disabled) return;
|
|
381
|
+
const keyEvent = event;
|
|
382
|
+
event.preventDefault();
|
|
383
|
+
if (!this.isOpen) {
|
|
384
|
+
this.open();
|
|
385
|
+
if (this.selectedItem) this.setFocusOnSelectedItem();
|
|
386
|
+
else this.setFocusOnFirstOrLastItem(keyEvent);
|
|
387
|
+
} else this.handleFocusNavigation(keyEvent);
|
|
388
|
+
}
|
|
389
|
+
handleFocusNavigation(keyEvent) {
|
|
390
|
+
switch (keyEvent.key) {
|
|
391
|
+
case "ArrowDown":
|
|
392
|
+
this.shiftFocusIndex(1);
|
|
393
|
+
break;
|
|
394
|
+
case "ArrowUp":
|
|
395
|
+
this.shiftFocusIndex(-1);
|
|
396
|
+
break;
|
|
397
|
+
case "PageDown":
|
|
398
|
+
this.shiftFocusIndex(10);
|
|
399
|
+
break;
|
|
400
|
+
case "PageUp":
|
|
401
|
+
this.shiftFocusIndex(-10);
|
|
402
|
+
break;
|
|
403
|
+
case "Home":
|
|
404
|
+
this.setFocusOnFirstItem();
|
|
405
|
+
break;
|
|
406
|
+
case "End": this.setFocusOnLastItem();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
shiftFocusIndex(numberOfItems) {
|
|
410
|
+
const currentIndex = this.searchItems.indexOf(this.focusedItem);
|
|
411
|
+
let newIndex;
|
|
412
|
+
if (numberOfItems > 0) newIndex = Math.min(this.searchItems.length - 1, currentIndex + numberOfItems);
|
|
413
|
+
else newIndex = Math.max(0, currentIndex + numberOfItems);
|
|
414
|
+
if (newIndex !== currentIndex) this.focusedItem = this.searchItems[newIndex];
|
|
415
|
+
this.scrollFocusedItemIntoViewWhileNavigating();
|
|
416
|
+
}
|
|
417
|
+
setFocusOnFirstOrLastItem(keyEvent) {
|
|
418
|
+
switch (keyEvent.key) {
|
|
419
|
+
case "ArrowDown":
|
|
420
|
+
case "PageDown":
|
|
421
|
+
case "Home":
|
|
422
|
+
this.setFocusOnFirstItem();
|
|
423
|
+
break;
|
|
424
|
+
case "ArrowUp":
|
|
425
|
+
case "PageUp":
|
|
426
|
+
case "End": this.setFocusOnLastItem();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
setFocusOnSelectedItem() {
|
|
430
|
+
if (this.selectedItem) this.focusedItem = this.selectedItem;
|
|
431
|
+
}
|
|
432
|
+
setFocusOnLastItem() {
|
|
433
|
+
if (this.searchItems.length > 0) this.focusedItem = this.searchItems[this.searchItems.length - 1];
|
|
434
|
+
}
|
|
435
|
+
setFocusOnFirstItem() {
|
|
436
|
+
if (this.searchItems.length > 0) this.focusedItem = this.searchItems[0];
|
|
437
|
+
}
|
|
438
|
+
unlistenAllSlottedItems() {
|
|
439
|
+
let disposeClickListener;
|
|
440
|
+
while ((disposeClickListener = this.disposeItemClickListeners.pop()) !== void 0) disposeClickListener();
|
|
441
|
+
}
|
|
442
|
+
unobserveResize() {
|
|
443
|
+
this.resizeObserverService.unobserve(this.elementRef);
|
|
444
|
+
}
|
|
445
|
+
findItemByInput(input) {
|
|
446
|
+
if (!this.items || this.items.length === 0) return input;
|
|
447
|
+
return this.items.find((it) => this.getItemText(it) === input) ?? input;
|
|
448
|
+
}
|
|
449
|
+
setInputDisplayValue(value) {
|
|
450
|
+
if (this.interactiveElement) this.renderer.setProperty(this.interactiveElement, "value", value);
|
|
451
|
+
}
|
|
452
|
+
scrollFocusedItemIntoViewWhileNavigating() {
|
|
453
|
+
if (!this.focusedItem || !this._virtualScrollViewport) return;
|
|
454
|
+
const focusedIndex = this.searchItems.indexOf(this.focusedItem);
|
|
455
|
+
if (focusedIndex === -1) return;
|
|
456
|
+
const itemTop = focusedIndex * this.itemHeight;
|
|
457
|
+
const itemBottom = itemTop + this.itemHeight;
|
|
458
|
+
const scrollOffset = this._virtualScrollViewport.measureScrollOffset();
|
|
459
|
+
const viewportSize = this._virtualScrollViewport.getViewportSize();
|
|
460
|
+
if (itemTop < scrollOffset) this._virtualScrollViewport.scrollToOffset(itemTop);
|
|
461
|
+
else if (itemBottom > scrollOffset + viewportSize) this._virtualScrollViewport.scrollToOffset(itemBottom - viewportSize);
|
|
462
|
+
this._virtualScrollViewport.checkViewportSize();
|
|
463
|
+
}
|
|
464
|
+
getKirbyItems() {
|
|
465
|
+
return this.kirbyItemsSlotted && this.kirbyItemsSlotted.length ? this.kirbyItemsSlotted : this.kirbyItemsDefault;
|
|
466
|
+
}
|
|
467
|
+
scrollToIndexIntoViewWhenOpeningPopup() {
|
|
468
|
+
const focusedIndex = this.searchItems.indexOf(this.focusedItem);
|
|
469
|
+
this._virtualScrollViewport?.setRenderedRange({
|
|
470
|
+
start: 0,
|
|
471
|
+
end: 20
|
|
472
|
+
});
|
|
473
|
+
this._virtualScrollViewport?.checkViewportSize();
|
|
474
|
+
this._virtualScrollViewport?.scrollToIndex(focusedIndex);
|
|
475
|
+
}
|
|
476
|
+
static {
|
|
477
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
478
|
+
minVersion: "12.0.0",
|
|
479
|
+
version: "22.2.2",
|
|
480
|
+
ngImport: i0,
|
|
481
|
+
type: ComboboxComponent,
|
|
482
|
+
deps: [
|
|
483
|
+
{ token: i0.Renderer2 },
|
|
484
|
+
{ token: i0.ElementRef },
|
|
485
|
+
{ token: i0.ChangeDetectorRef },
|
|
486
|
+
{ token: i1.ResizeObserverService }
|
|
487
|
+
],
|
|
488
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
static {
|
|
492
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
493
|
+
minVersion: "17.0.0",
|
|
494
|
+
version: "22.2.2",
|
|
495
|
+
type: ComboboxComponent,
|
|
496
|
+
isStandalone: true,
|
|
497
|
+
selector: "kirby-x-combobox",
|
|
498
|
+
inputs: {
|
|
499
|
+
noSearchResultsText: "noSearchResultsText",
|
|
500
|
+
selectionClearedAnnouncement: "selectionClearedAnnouncement",
|
|
501
|
+
itemTextProperty: "itemTextProperty",
|
|
502
|
+
itemHeight: "itemHeight",
|
|
503
|
+
itemIdProperty: "itemIdProperty",
|
|
504
|
+
searchFunction: "searchFunction",
|
|
505
|
+
items: "items",
|
|
506
|
+
selectedItem: "selectedItem",
|
|
507
|
+
placeholder: "placeholder",
|
|
508
|
+
popout: "popout",
|
|
509
|
+
expand: "expand",
|
|
510
|
+
disabled: "disabled",
|
|
511
|
+
hasError: "hasError",
|
|
512
|
+
size: "size"
|
|
513
|
+
},
|
|
514
|
+
outputs: {
|
|
515
|
+
hasErrorChange: "hasErrorChange",
|
|
516
|
+
change: "change"
|
|
517
|
+
},
|
|
518
|
+
host: {
|
|
519
|
+
listeners: {
|
|
520
|
+
"mousedown": "onMouseDown($event)",
|
|
521
|
+
"touchstart": "onTouchStart($event)",
|
|
522
|
+
"focusout": "onFocusOut()",
|
|
523
|
+
"keydown.tab": "onTab()",
|
|
524
|
+
"keydown.escape": "onEscape()",
|
|
525
|
+
"keydown.enter": "onEnter($event)",
|
|
526
|
+
"keydown.arrowUp": "onArrowKeys($event)",
|
|
527
|
+
"keydown.arrowDown": "onArrowKeys($event)",
|
|
528
|
+
"keydown.pageUp": "onArrowKeys($event)",
|
|
529
|
+
"keydown.pageDown": "onArrowKeys($event)",
|
|
530
|
+
"keydown.home": "onArrowKeys($event)",
|
|
531
|
+
"keydown.end": "onArrowKeys($event)"
|
|
532
|
+
},
|
|
533
|
+
properties: {
|
|
534
|
+
"attr.disabled": "this._isDisabled",
|
|
535
|
+
"attr.no-blur": "this._noBlurOnScroll",
|
|
536
|
+
"class.expand": "this._isBlockLevel",
|
|
537
|
+
"class.is-opening": "this._isOpening",
|
|
538
|
+
"class.is-open": "this.isOpen",
|
|
539
|
+
"class.has-value": "this.hasValue"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
providers: [{
|
|
543
|
+
provide: NG_VALUE_ACCESSOR,
|
|
544
|
+
useExisting: forwardRef(() => ComboboxComponent),
|
|
545
|
+
multi: true
|
|
546
|
+
}, {
|
|
547
|
+
provide: FORM_FIELD_CONTROL,
|
|
548
|
+
useExisting: forwardRef(() => ComboboxComponent)
|
|
549
|
+
}],
|
|
550
|
+
queries: [
|
|
551
|
+
{
|
|
552
|
+
propertyName: "itemTemplate",
|
|
553
|
+
first: true,
|
|
554
|
+
predicate: ListItemTemplateDirective,
|
|
555
|
+
descendants: true,
|
|
556
|
+
read: TemplateRef
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
propertyName: "slottedItems",
|
|
560
|
+
predicate: ListItemTemplateDirective,
|
|
561
|
+
read: ElementRef
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
propertyName: "kirbyItemsSlotted",
|
|
565
|
+
predicate: ItemComponent,
|
|
566
|
+
read: ElementRef
|
|
567
|
+
}
|
|
568
|
+
],
|
|
569
|
+
viewQueries: [
|
|
570
|
+
{
|
|
571
|
+
propertyName: "cardElement",
|
|
572
|
+
first: true,
|
|
573
|
+
predicate: CardComponent,
|
|
574
|
+
descendants: true,
|
|
575
|
+
read: ElementRef
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
propertyName: "popover",
|
|
579
|
+
first: true,
|
|
580
|
+
predicate: PopoverComponent,
|
|
581
|
+
descendants: true
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
propertyName: "rootElement",
|
|
585
|
+
first: true,
|
|
586
|
+
predicate: ["rootElement"],
|
|
587
|
+
descendants: true,
|
|
588
|
+
read: ElementRef,
|
|
589
|
+
static: true
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
propertyName: "textInput",
|
|
593
|
+
first: true,
|
|
594
|
+
predicate: InputComponent,
|
|
595
|
+
descendants: true,
|
|
596
|
+
read: ElementRef,
|
|
597
|
+
static: true
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
propertyName: "_virtualScrollViewport",
|
|
601
|
+
first: true,
|
|
602
|
+
predicate: CdkVirtualScrollViewport,
|
|
603
|
+
descendants: true
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
propertyName: "kirbyItemsDefault",
|
|
607
|
+
predicate: ItemComponent,
|
|
608
|
+
descendants: true,
|
|
609
|
+
read: ElementRef
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
ngImport: i0,
|
|
613
|
+
template: "<span class=\"kirby-visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ _liveRegionText }}\n</span>\n<div (click)=\"onToggle($event)\" #rootElement>\n <input\n kirby-input\n type=\"text\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n [hasError]=\"hasError\"\n [size]=\"size\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n (change)=\"$event.stopPropagation()\"\n [attr.id]=\"_comboboxId\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-activedescendant]=\"isOpen && focusedItem ? getItemId(focusedItem) : null\"\n (input)=\"onInput($event)\"\n />\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\" kirby-affix=\"suffix\"></kirby-icon>\n</div>\n\n<kirby-popover\n [target]=\"rootElement\"\n [popout]=\"popout\"\n (click)=\"onPopoverClick()\"\n (mousedown)=\"$event.preventDefault()\"\n (willHide)=\"onPopoverWillHide()\"\n>\n <kirby-card [attr.id]=\"_listboxId\" [attr.aria-labelledby]=\"_comboboxId\">\n @if (searchItems.length === 0) {\n <kirby-item>\n <p class=\"kirby-item-title no-results\">{{ noSearchResultsText }}</p>\n </kirby-item>\n } @else {\n <cdk-virtual-scroll-viewport\n class=\"combobox-viewport\"\n role=\"listbox\"\n [itemSize]=\"itemHeight\"\n [style.height.px]=\"viewportHeight\"\n >\n <ng-container *cdkVirtualFor=\"let item of searchItems\">\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate || defaultItemTemplate;\n context: {\n $implicit: item,\n selected: item === selectedItem,\n focused: item === focusedItem,\n }\n \"\n ></ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </kirby-card>\n</kirby-popover>\n\n<ng-template #defaultItemTemplate let-item let-selected=\"selected\" let-focused=\"focused\">\n <kirby-item\n role=\"option\"\n [selectable]=\"true\"\n [selected]=\"selected\"\n [class.focused]=\"focused\"\n [attr.id]=\"getItemId(item)\"\n [attr.aria-selected]=\"selected\"\n (click)=\"onItemSelect(item)\"\n >\n <p class=\"kirby-item-title\">{{ getItemText(item) }}</p>\n @if (selected) {\n <kirby-icon name=\"checkmark-selected\" slot=\"end\"></kirby-icon>\n }\n </kirby-item>\n</ng-template>\n",
|
|
614
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset);outline:none;border-radius:var(--kirby-border-radius-pill)}:host{display:inline-block;position:relative;max-width:calc(100vw - calc(2 * var(--kirby-spacing-s)))}:host.clicked{box-shadow:none}:host.expand{display:block}:host.expand kirby-card{width:100%;min-width:initial;max-width:initial}:host div{position:relative}:host div>input[kirby-input]{padding-right:var(--kirby-spacing-xl)}:host div>input[kirby-input]:disabled~kirby-icon{color:var(--kirby-semi-dark-shade)}:host div>kirby-icon{position:absolute;top:0;bottom:0;right:var(--kirby-spacing-xs)}:host.has-value>div>input[kirby-input]{text-overflow:ellipsis}kirby-popover{--max-height: 352px}kirby-card{display:flex;flex-direction:column;max-height:352px;overflow:hidden;box-shadow:var(--kirby-elevation-4);max-width:calc(100vw - calc(2 * var(--kirby-spacing-s)));min-width:calc(320px - calc(2 * var(--kirby-spacing-s)))}@media(min-width:321px){kirby-card{min-width:calc(375px - calc(2 * var(--kirby-spacing-s)))}}.combobox-viewport{display:block;width:100%}.no-results{color:var(--kirby-text-color-semi-dark)}\n"],
|
|
615
|
+
dependencies: [
|
|
616
|
+
{
|
|
617
|
+
kind: "component",
|
|
618
|
+
type: InputComponent,
|
|
619
|
+
selector: "input[kirby-input]",
|
|
620
|
+
inputs: [
|
|
621
|
+
"type",
|
|
622
|
+
"size",
|
|
623
|
+
"borderless",
|
|
624
|
+
"hasError",
|
|
625
|
+
"autocomplete",
|
|
626
|
+
"autocorrect",
|
|
627
|
+
"value",
|
|
628
|
+
"maxlength",
|
|
629
|
+
"inputmode"
|
|
630
|
+
],
|
|
631
|
+
outputs: ["hasErrorChange"]
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
kind: "directive",
|
|
635
|
+
type: NgTemplateOutlet,
|
|
636
|
+
selector: "[ngTemplateOutlet]",
|
|
637
|
+
inputs: [
|
|
638
|
+
"ngTemplateOutletContext",
|
|
639
|
+
"ngTemplateOutlet",
|
|
640
|
+
"ngTemplateOutletInjector"
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
kind: "component",
|
|
645
|
+
type: PopoverComponent,
|
|
646
|
+
selector: "kirby-popover",
|
|
647
|
+
inputs: ["popout", "target"],
|
|
648
|
+
outputs: ["willHide"]
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
kind: "component",
|
|
652
|
+
type: CardComponent,
|
|
653
|
+
selector: "kirby-card",
|
|
654
|
+
inputs: [
|
|
655
|
+
"title",
|
|
656
|
+
"subtitle",
|
|
657
|
+
"backgroundImageUrl",
|
|
658
|
+
"hasPadding",
|
|
659
|
+
"sizes",
|
|
660
|
+
"variant"
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
kind: "component",
|
|
665
|
+
type: ItemComponent,
|
|
666
|
+
selector: "kirby-item",
|
|
667
|
+
inputs: [
|
|
668
|
+
"disabled",
|
|
669
|
+
"selected",
|
|
670
|
+
"disclosure",
|
|
671
|
+
"selectable",
|
|
672
|
+
"reorderable",
|
|
673
|
+
"size",
|
|
674
|
+
"href",
|
|
675
|
+
"rotateIcon"
|
|
676
|
+
]
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
kind: "component",
|
|
680
|
+
type: IconComponent,
|
|
681
|
+
selector: "kirby-icon",
|
|
682
|
+
inputs: ["size", "name"]
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
kind: "directive",
|
|
686
|
+
type: AffixDirective,
|
|
687
|
+
selector: "[kirby-affix]",
|
|
688
|
+
inputs: ["kirby-affix"]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
kind: "directive",
|
|
692
|
+
type: CdkFixedSizeVirtualScroll,
|
|
693
|
+
selector: "cdk-virtual-scroll-viewport[itemSize]",
|
|
694
|
+
inputs: [
|
|
695
|
+
"itemSize",
|
|
696
|
+
"minBufferPx",
|
|
697
|
+
"maxBufferPx"
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
kind: "component",
|
|
702
|
+
type: CdkVirtualScrollViewport,
|
|
703
|
+
selector: "cdk-virtual-scroll-viewport",
|
|
704
|
+
inputs: ["orientation", "appendOnly"],
|
|
705
|
+
outputs: ["scrolledIndexChange"]
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
kind: "directive",
|
|
709
|
+
type: CdkVirtualForOf,
|
|
710
|
+
selector: "[cdkVirtualFor][cdkVirtualForOf]",
|
|
711
|
+
inputs: [
|
|
712
|
+
"cdkVirtualForOf",
|
|
713
|
+
"cdkVirtualForTrackBy",
|
|
714
|
+
"cdkVirtualForTemplate",
|
|
715
|
+
"cdkVirtualForTemplateCacheSize"
|
|
716
|
+
]
|
|
717
|
+
}
|
|
718
|
+
],
|
|
719
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
724
|
+
minVersion: "12.0.0",
|
|
725
|
+
version: "22.2.2",
|
|
726
|
+
ngImport: i0,
|
|
727
|
+
type: ComboboxComponent,
|
|
728
|
+
decorators: [{
|
|
729
|
+
type: Component,
|
|
730
|
+
args: [{
|
|
731
|
+
selector: "kirby-x-combobox",
|
|
732
|
+
providers: [{
|
|
733
|
+
provide: NG_VALUE_ACCESSOR,
|
|
734
|
+
useExisting: forwardRef(() => ComboboxComponent),
|
|
735
|
+
multi: true
|
|
736
|
+
}, {
|
|
737
|
+
provide: FORM_FIELD_CONTROL,
|
|
738
|
+
useExisting: forwardRef(() => ComboboxComponent)
|
|
739
|
+
}],
|
|
740
|
+
imports: [
|
|
741
|
+
InputComponent,
|
|
742
|
+
NgTemplateOutlet,
|
|
743
|
+
PopoverComponent,
|
|
744
|
+
CardComponent,
|
|
745
|
+
ItemComponent,
|
|
746
|
+
IconComponent,
|
|
747
|
+
AffixDirective,
|
|
748
|
+
CdkFixedSizeVirtualScroll,
|
|
749
|
+
CdkVirtualScrollViewport,
|
|
750
|
+
CdkVirtualForOf
|
|
751
|
+
],
|
|
752
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
753
|
+
template: "<span class=\"kirby-visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ _liveRegionText }}\n</span>\n<div (click)=\"onToggle($event)\" #rootElement>\n <input\n kirby-input\n type=\"text\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n [hasError]=\"hasError\"\n [size]=\"size\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n (change)=\"$event.stopPropagation()\"\n [attr.id]=\"_comboboxId\"\n [attr.aria-controls]=\"_listboxId\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-activedescendant]=\"isOpen && focusedItem ? getItemId(focusedItem) : null\"\n (input)=\"onInput($event)\"\n />\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\" kirby-affix=\"suffix\"></kirby-icon>\n</div>\n\n<kirby-popover\n [target]=\"rootElement\"\n [popout]=\"popout\"\n (click)=\"onPopoverClick()\"\n (mousedown)=\"$event.preventDefault()\"\n (willHide)=\"onPopoverWillHide()\"\n>\n <kirby-card [attr.id]=\"_listboxId\" [attr.aria-labelledby]=\"_comboboxId\">\n @if (searchItems.length === 0) {\n <kirby-item>\n <p class=\"kirby-item-title no-results\">{{ noSearchResultsText }}</p>\n </kirby-item>\n } @else {\n <cdk-virtual-scroll-viewport\n class=\"combobox-viewport\"\n role=\"listbox\"\n [itemSize]=\"itemHeight\"\n [style.height.px]=\"viewportHeight\"\n >\n <ng-container *cdkVirtualFor=\"let item of searchItems\">\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate || defaultItemTemplate;\n context: {\n $implicit: item,\n selected: item === selectedItem,\n focused: item === focusedItem,\n }\n \"\n ></ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n }\n </kirby-card>\n</kirby-popover>\n\n<ng-template #defaultItemTemplate let-item let-selected=\"selected\" let-focused=\"focused\">\n <kirby-item\n role=\"option\"\n [selectable]=\"true\"\n [selected]=\"selected\"\n [class.focused]=\"focused\"\n [attr.id]=\"getItemId(item)\"\n [attr.aria-selected]=\"selected\"\n (click)=\"onItemSelect(item)\"\n >\n <p class=\"kirby-item-title\">{{ getItemText(item) }}</p>\n @if (selected) {\n <kirby-icon name=\"checkmark-selected\" slot=\"end\"></kirby-icon>\n }\n </kirby-item>\n</ng-template>\n",
|
|
754
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset);outline:none;border-radius:var(--kirby-border-radius-pill)}:host{display:inline-block;position:relative;max-width:calc(100vw - calc(2 * var(--kirby-spacing-s)))}:host.clicked{box-shadow:none}:host.expand{display:block}:host.expand kirby-card{width:100%;min-width:initial;max-width:initial}:host div{position:relative}:host div>input[kirby-input]{padding-right:var(--kirby-spacing-xl)}:host div>input[kirby-input]:disabled~kirby-icon{color:var(--kirby-semi-dark-shade)}:host div>kirby-icon{position:absolute;top:0;bottom:0;right:var(--kirby-spacing-xs)}:host.has-value>div>input[kirby-input]{text-overflow:ellipsis}kirby-popover{--max-height: 352px}kirby-card{display:flex;flex-direction:column;max-height:352px;overflow:hidden;box-shadow:var(--kirby-elevation-4);max-width:calc(100vw - calc(2 * var(--kirby-spacing-s)));min-width:calc(320px - calc(2 * var(--kirby-spacing-s)))}@media(min-width:321px){kirby-card{min-width:calc(375px - calc(2 * var(--kirby-spacing-s)))}}.combobox-viewport{display:block;width:100%}.no-results{color:var(--kirby-text-color-semi-dark)}\n"]
|
|
755
|
+
}]
|
|
756
|
+
}],
|
|
757
|
+
ctorParameters: () => [
|
|
758
|
+
{ type: i0.Renderer2 },
|
|
759
|
+
{ type: i0.ElementRef },
|
|
760
|
+
{ type: i0.ChangeDetectorRef },
|
|
761
|
+
{ type: i1.ResizeObserverService }
|
|
762
|
+
],
|
|
763
|
+
propDecorators: {
|
|
764
|
+
noSearchResultsText: [{ type: Input }],
|
|
765
|
+
selectionClearedAnnouncement: [{ type: Input }],
|
|
766
|
+
itemTextProperty: [{ type: Input }],
|
|
767
|
+
itemHeight: [{ type: Input }],
|
|
768
|
+
itemIdProperty: [{ type: Input }],
|
|
769
|
+
searchFunction: [{ type: Input }],
|
|
770
|
+
items: [{ type: Input }],
|
|
771
|
+
selectedItem: [{ type: Input }],
|
|
772
|
+
placeholder: [{ type: Input }],
|
|
773
|
+
popout: [{ type: Input }],
|
|
774
|
+
expand: [{ type: Input }],
|
|
775
|
+
disabled: [{ type: Input }],
|
|
776
|
+
_isDisabled: [{
|
|
777
|
+
type: HostBinding,
|
|
778
|
+
args: ["attr.disabled"]
|
|
779
|
+
}],
|
|
780
|
+
hasErrorChange: [{ type: Output }],
|
|
781
|
+
hasError: [{ type: Input }],
|
|
782
|
+
size: [{ type: Input }],
|
|
783
|
+
_noBlurOnScroll: [{
|
|
784
|
+
type: HostBinding,
|
|
785
|
+
args: ["attr.no-blur"]
|
|
786
|
+
}],
|
|
787
|
+
change: [{ type: Output }],
|
|
788
|
+
_isBlockLevel: [{
|
|
789
|
+
type: HostBinding,
|
|
790
|
+
args: ["class.expand"]
|
|
791
|
+
}],
|
|
792
|
+
_isOpening: [{
|
|
793
|
+
type: HostBinding,
|
|
794
|
+
args: ["class.is-opening"]
|
|
795
|
+
}],
|
|
796
|
+
isOpen: [{
|
|
797
|
+
type: HostBinding,
|
|
798
|
+
args: ["class.is-open"]
|
|
799
|
+
}],
|
|
800
|
+
hasValue: [{
|
|
801
|
+
type: HostBinding,
|
|
802
|
+
args: ["class.has-value"]
|
|
803
|
+
}],
|
|
804
|
+
itemTemplate: [{
|
|
805
|
+
type: ContentChild,
|
|
806
|
+
args: [ListItemTemplateDirective, { read: TemplateRef }]
|
|
807
|
+
}],
|
|
808
|
+
slottedItems: [{
|
|
809
|
+
type: ContentChildren,
|
|
810
|
+
args: [ListItemTemplateDirective, { read: ElementRef }]
|
|
811
|
+
}],
|
|
812
|
+
cardElement: [{
|
|
813
|
+
type: ViewChild,
|
|
814
|
+
args: [CardComponent, { read: ElementRef }]
|
|
815
|
+
}],
|
|
816
|
+
popover: [{
|
|
817
|
+
type: ViewChild,
|
|
818
|
+
args: [PopoverComponent]
|
|
819
|
+
}],
|
|
820
|
+
rootElement: [{
|
|
821
|
+
type: ViewChild,
|
|
822
|
+
args: ["rootElement", {
|
|
823
|
+
static: true,
|
|
824
|
+
read: ElementRef
|
|
825
|
+
}]
|
|
826
|
+
}],
|
|
827
|
+
textInput: [{
|
|
828
|
+
type: ViewChild,
|
|
829
|
+
args: [InputComponent, {
|
|
830
|
+
static: true,
|
|
831
|
+
read: ElementRef
|
|
832
|
+
}]
|
|
833
|
+
}],
|
|
834
|
+
_virtualScrollViewport: [{
|
|
835
|
+
type: ViewChild,
|
|
836
|
+
args: [CdkVirtualScrollViewport]
|
|
837
|
+
}],
|
|
838
|
+
kirbyItemsDefault: [{
|
|
839
|
+
type: ViewChildren,
|
|
840
|
+
args: [ItemComponent, { read: ElementRef }]
|
|
841
|
+
}],
|
|
842
|
+
kirbyItemsSlotted: [{
|
|
843
|
+
type: ContentChildren,
|
|
844
|
+
args: [ItemComponent, { read: ElementRef }]
|
|
845
|
+
}],
|
|
846
|
+
onMouseDown: [{
|
|
847
|
+
type: HostListener,
|
|
848
|
+
args: ["mousedown", ["$event"]]
|
|
849
|
+
}],
|
|
850
|
+
onTouchStart: [{
|
|
851
|
+
type: HostListener,
|
|
852
|
+
args: ["touchstart", ["$event"]]
|
|
853
|
+
}],
|
|
854
|
+
onFocusOut: [{
|
|
855
|
+
type: HostListener,
|
|
856
|
+
args: ["focusout"]
|
|
857
|
+
}],
|
|
858
|
+
onTab: [{
|
|
859
|
+
type: HostListener,
|
|
860
|
+
args: ["keydown.tab"]
|
|
861
|
+
}],
|
|
862
|
+
onEscape: [{
|
|
863
|
+
type: HostListener,
|
|
864
|
+
args: ["keydown.escape"]
|
|
865
|
+
}],
|
|
866
|
+
onEnter: [{
|
|
867
|
+
type: HostListener,
|
|
868
|
+
args: ["keydown.enter", ["$event"]]
|
|
869
|
+
}],
|
|
870
|
+
onArrowKeys: [
|
|
871
|
+
{
|
|
872
|
+
type: HostListener,
|
|
873
|
+
args: ["keydown.arrowUp", ["$event"]]
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
type: HostListener,
|
|
877
|
+
args: ["keydown.arrowDown", ["$event"]]
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
type: HostListener,
|
|
881
|
+
args: ["keydown.pageUp", ["$event"]]
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
type: HostListener,
|
|
885
|
+
args: ["keydown.pageDown", ["$event"]]
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
type: HostListener,
|
|
889
|
+
args: ["keydown.home", ["$event"]]
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
type: HostListener,
|
|
893
|
+
args: ["keydown.end", ["$event"]]
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
});
|
|
854
898
|
export { ComboboxComponent };
|
|
855
|
-
|
|
899
|
+
|
|
900
|
+
//# sourceMappingURL=kirbydesign-extensions-angular-combobox.mjs.map
|