ngwr 14.10.0 → 14.12.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/card/styles/_rules.scss +1 -1
- package/event-calendar/styles/_index.scss +14 -0
- package/fesm2022/ngwr-action-sheet-testing.mjs +111 -310
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
- package/fesm2022/ngwr-action-sheet.mjs +209 -89
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +122 -140
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +204 -107
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +171 -113
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +278 -198
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +191 -190
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +140 -95
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +339 -204
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart-testing.mjs +56 -120
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +204 -113
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text-testing.mjs +44 -198
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +322 -202
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +134 -318
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +440 -277
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +256 -120
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +115 -63
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs +39 -94
- package/fesm2022/ngwr-button-testing.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +404 -354
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +50 -96
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +360 -264
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +181 -378
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +612 -790
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +216 -98
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +131 -374
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +459 -332
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs +227 -600
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +482 -418
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +45 -99
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +461 -354
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +56 -223
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +226 -186
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +303 -199
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +95 -163
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +118 -365
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +287 -227
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +223 -461
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +952 -976
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs +236 -585
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +512 -443
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +252 -225
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-confetti.mjs +163 -181
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +31 -106
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +233 -642
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +837 -1167
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +103 -140
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +646 -460
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-fns.mjs +173 -266
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-luxon.mjs +164 -236
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +340 -700
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +2581 -2416
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +606 -861
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text-testing.mjs +57 -256
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +489 -409
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +157 -154
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +188 -90
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +44 -87
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +391 -522
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +354 -271
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +151 -133
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +48 -111
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +295 -190
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +411 -301
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs +97 -248
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +862 -889
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +125 -288
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +613 -641
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor-testing.mjs +194 -640
- package/fesm2022/ngwr-editor-testing.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +2062 -2541
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +117 -72
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs +217 -439
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +906 -822
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +52 -216
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +375 -342
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +138 -320
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +475 -328
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form-testing.mjs +145 -452
- package/fesm2022/ngwr-form-testing.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +512 -590
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +36 -132
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +635 -421
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs +49 -98
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +297 -129
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text-testing.mjs +61 -213
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +170 -73
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +82 -251
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +215 -114
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +65 -233
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +882 -1046
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +307 -285
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +374 -464
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +374 -434
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +374 -453
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +374 -561
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +374 -434
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +374 -458
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +374 -457
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +374 -434
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +374 -434
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +374 -453
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +374 -438
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +374 -446
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +374 -450
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +374 -460
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +374 -443
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +374 -447
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +374 -434
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +374 -458
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +374 -455
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +374 -451
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-TW.mjs +374 -442
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +374 -433
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +415 -683
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs +28 -77
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +32 -94
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +371 -690
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper-testing.mjs +84 -227
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +577 -639
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +108 -305
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +511 -361
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +172 -420
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +400 -352
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +52 -100
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +356 -303
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +63 -45
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs +101 -223
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +436 -303
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +362 -207
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox-testing.mjs +100 -221
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +335 -268
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +65 -133
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +356 -281
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +251 -134
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +26 -68
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +173 -186
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs +174 -505
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +1578 -2219
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs +118 -331
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +411 -230
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +100 -127
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs +179 -506
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +668 -732
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +257 -329
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group-testing.mjs +56 -101
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +206 -114
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +264 -576
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +107 -67
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +125 -388
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +505 -335
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +343 -382
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +182 -221
- package/fesm2022/ngwr-platform.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +112 -307
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +474 -277
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +114 -332
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +1106 -1311
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +124 -68
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +198 -185
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +1179 -1100
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs +138 -389
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +351 -239
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs +153 -390
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +296 -247
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +359 -114
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +45 -215
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +402 -272
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +384 -213
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +95 -105
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs +184 -593
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +238 -251
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select-testing.mjs +139 -284
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +1810 -2098
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +83 -228
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +304 -131
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +256 -205
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +101 -72
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +191 -473
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +444 -443
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +37 -74
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +311 -196
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial-testing.mjs +135 -278
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +242 -140
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +97 -60
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor-testing.mjs +23 -87
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +980 -725
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text-testing.mjs +48 -218
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +365 -220
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +107 -241
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +222 -184
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card-testing.mjs +105 -360
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +217 -135
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +410 -326
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border-testing.mjs +53 -168
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +160 -70
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +570 -389
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs +158 -471
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +336 -215
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +217 -330
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch-testing.mjs +42 -75
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +212 -114
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +238 -572
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1879 -1446
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +84 -153
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +217 -617
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +402 -425
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +84 -236
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +388 -264
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +247 -443
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +79 -186
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +257 -168
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +157 -70
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +59 -99
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +769 -691
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +73 -58
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +75 -171
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +333 -347
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +195 -534
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +444 -322
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +277 -754
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +884 -906
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +50 -237
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +461 -242
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +142 -81
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +304 -613
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +179 -361
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +17 -47
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +259 -125
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs +34 -125
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +816 -373
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +171 -366
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +1437 -1351
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/fesm2022/ngwr.mjs +0 -4
- package/i18n/ar.json +0 -1
- package/i18n/cs.json +0 -1
- package/i18n/de.json +0 -1
- package/i18n/en.json +0 -1
- package/i18n/es.json +0 -1
- package/i18n/fr.json +0 -1
- package/i18n/he.json +0 -1
- package/i18n/hi.json +0 -1
- package/i18n/id.json +0 -1
- package/i18n/it.json +0 -1
- package/i18n/ja.json +0 -1
- package/i18n/ko.json +0 -1
- package/i18n/nl.json +0 -1
- package/i18n/pl.json +0 -1
- package/i18n/pt.json +0 -1
- package/i18n/ru.json +0 -1
- package/i18n/sv.json +0 -1
- package/i18n/tr.json +0 -1
- package/i18n/uk.json +0 -1
- package/i18n/vi.json +0 -1
- package/i18n/zh-TW.json +0 -1
- package/i18n/zh.json +0 -1
- package/input-number/styles/_index.scss +33 -35
- package/llms-full.txt +3 -3
- package/loading-bar/styles/_rules.scss +1 -1
- package/package.json +2 -2
- package/segmented/styles/_index.scss +10 -3
- package/theme/_index.scss +84 -0
- package/theme/styles/_contrast.scss +1 -1
- package/theme/styles/_dark.scss +59 -3
- package/types/ngwr-action-sheet-testing.d.ts +174 -200
- package/types/ngwr-action-sheet.d.ts +83 -45
- package/types/ngwr-affix.d.ts +27 -22
- package/types/ngwr-alert.d.ts +93 -59
- package/types/ngwr-anchor.d.ts +52 -35
- package/types/ngwr-aurora.d.ts +53 -35
- package/types/ngwr-avatar.d.ts +97 -81
- package/types/ngwr-back-top.d.ts +36 -23
- package/types/ngwr-badge.d.ts +160 -105
- package/types/ngwr-bar-chart-testing.d.ts +40 -58
- package/types/ngwr-bar-chart.d.ts +86 -60
- package/types/ngwr-blur-text-testing.d.ts +103 -121
- package/types/ngwr-blur-text.d.ts +99 -60
- package/types/ngwr-border-glow-testing.d.ts +155 -173
- package/types/ngwr-border-glow.d.ts +93 -45
- package/types/ngwr-breadcrumbs.d.ts +60 -32
- package/types/ngwr-burger.d.ts +38 -23
- package/types/ngwr-button-testing.d.ts +41 -59
- package/types/ngwr-button.d.ts +213 -163
- package/types/ngwr-calendar-heatmap-testing.d.ts +38 -56
- package/types/ngwr-calendar-heatmap.d.ts +151 -105
- package/types/ngwr-calendar-testing.d.ts +198 -224
- package/types/ngwr-calendar.d.ts +285 -246
- package/types/ngwr-card.d.ts +41 -23
- package/types/ngwr-carousel-testing.d.ts +196 -214
- package/types/ngwr-carousel.d.ts +173 -122
- package/types/ngwr-cascader-testing.d.ts +338 -372
- package/types/ngwr-cascader.d.ts +235 -161
- package/types/ngwr-checkbox-testing.d.ts +45 -63
- package/types/ngwr-checkbox.d.ts +252 -183
- package/types/ngwr-circular-text-testing.d.ts +108 -126
- package/types/ngwr-circular-text.d.ts +53 -41
- package/types/ngwr-click-spark.d.ts +82 -50
- package/types/ngwr-clipboard.d.ts +40 -44
- package/types/ngwr-collapse-testing.d.ts +193 -219
- package/types/ngwr-collapse.d.ts +82 -71
- package/types/ngwr-color-picker-testing.d.ts +211 -237
- package/types/ngwr-color-picker.d.ts +353 -300
- package/types/ngwr-command-palette-testing.d.ts +311 -345
- package/types/ngwr-command-palette.d.ts +257 -197
- package/types/ngwr-compare.d.ts +102 -67
- package/types/ngwr-confetti.d.ts +51 -55
- package/types/ngwr-config.d.ts +44 -71
- package/types/ngwr-context-menu-testing.d.ts +301 -327
- package/types/ngwr-context-menu.d.ts +350 -310
- package/types/ngwr-cookie.d.ts +37 -41
- package/types/ngwr-counter.d.ts +223 -128
- package/types/ngwr-date-adapters-fns.d.ts +40 -59
- package/types/ngwr-date-adapters-luxon.d.ts +61 -72
- package/types/ngwr-date-picker-testing.d.ts +295 -339
- package/types/ngwr-date-picker.d.ts +771 -583
- package/types/ngwr-date.d.ts +229 -258
- package/types/ngwr-decrypt-text-testing.d.ts +140 -158
- package/types/ngwr-decrypt-text.d.ts +104 -62
- package/types/ngwr-density.d.ts +42 -57
- package/types/ngwr-descriptions.d.ts +50 -27
- package/types/ngwr-dialog-testing.d.ts +36 -54
- package/types/ngwr-dialog.d.ts +166 -190
- package/types/ngwr-directives.d.ts +82 -60
- package/types/ngwr-divider.d.ts +78 -62
- package/types/ngwr-donut-chart-testing.d.ts +36 -54
- package/types/ngwr-donut-chart.d.ts +102 -66
- package/types/ngwr-drag-drop.d.ts +139 -106
- package/types/ngwr-drawer-testing.d.ts +141 -159
- package/types/ngwr-drawer.d.ts +374 -316
- package/types/ngwr-dropdown-testing.d.ts +128 -154
- package/types/ngwr-dropdown.d.ts +260 -166
- package/types/ngwr-editor-testing.d.ts +312 -330
- package/types/ngwr-editor.d.ts +435 -344
- package/types/ngwr-empty.d.ts +41 -28
- package/types/ngwr-event-calendar-testing.d.ts +221 -243
- package/types/ngwr-event-calendar.d.ts +340 -298
- package/types/ngwr-falling-text-testing.d.ts +108 -126
- package/types/ngwr-falling-text.d.ts +57 -35
- package/types/ngwr-file-upload-testing.d.ts +134 -151
- package/types/ngwr-file-upload.d.ts +210 -128
- package/types/ngwr-form-testing.d.ts +255 -282
- package/types/ngwr-form.d.ts +324 -306
- package/types/ngwr-fuzzy-text-testing.d.ts +63 -81
- package/types/ngwr-fuzzy-text.d.ts +152 -65
- package/types/ngwr-gauge-testing.d.ts +43 -61
- package/types/ngwr-gauge.d.ts +113 -61
- package/types/ngwr-glitch-text-testing.d.ts +125 -143
- package/types/ngwr-glitch-text.d.ts +47 -24
- package/types/ngwr-gradient-text-testing.d.ts +114 -132
- package/types/ngwr-gradient-text.d.ts +51 -24
- package/types/ngwr-graph-testing.d.ts +89 -115
- package/types/ngwr-graph.d.ts +137 -124
- package/types/ngwr-hotkey.d.ts +85 -75
- package/types/ngwr-i18n-ar.d.ts +2 -5
- package/types/ngwr-i18n-cs.d.ts +2 -5
- package/types/ngwr-i18n-de.d.ts +2 -5
- package/types/ngwr-i18n-en.d.ts +2 -5
- package/types/ngwr-i18n-es.d.ts +2 -5
- package/types/ngwr-i18n-fr.d.ts +2 -5
- package/types/ngwr-i18n-he.d.ts +2 -5
- package/types/ngwr-i18n-hi.d.ts +2 -5
- package/types/ngwr-i18n-id.d.ts +2 -5
- package/types/ngwr-i18n-it.d.ts +2 -5
- package/types/ngwr-i18n-ja.d.ts +2 -5
- package/types/ngwr-i18n-ko.d.ts +2 -5
- package/types/ngwr-i18n-nl.d.ts +2 -5
- package/types/ngwr-i18n-pl.d.ts +2 -5
- package/types/ngwr-i18n-pt.d.ts +2 -5
- package/types/ngwr-i18n-ru.d.ts +2 -5
- package/types/ngwr-i18n-sv.d.ts +2 -5
- package/types/ngwr-i18n-tr.d.ts +2 -5
- package/types/ngwr-i18n-uk.d.ts +2 -5
- package/types/ngwr-i18n-vi.d.ts +2 -5
- package/types/ngwr-i18n-zh-TW.d.ts +2 -5
- package/types/ngwr-i18n-zh.d.ts +2 -5
- package/types/ngwr-i18n.d.ts +202 -246
- package/types/ngwr-icon-adapters-feather.d.ts +2 -11
- package/types/ngwr-icon-adapters-lucide.d.ts +2 -12
- package/types/ngwr-icon.d.ts +62 -84
- package/types/ngwr-image-cropper-testing.d.ts +116 -134
- package/types/ngwr-image-cropper.d.ts +287 -252
- package/types/ngwr-input-number-testing.d.ts +164 -182
- package/types/ngwr-input-number.d.ts +238 -150
- package/types/ngwr-input-otp-testing.d.ts +210 -244
- package/types/ngwr-input-otp.d.ts +175 -123
- package/types/ngwr-input-testing.d.ts +42 -60
- package/types/ngwr-input.d.ts +118 -94
- package/types/ngwr-keyboard.d.ts +14 -12
- package/types/ngwr-knob-testing.d.ts +106 -124
- package/types/ngwr-knob.d.ts +203 -129
- package/types/ngwr-layout.d.ts +57 -40
- package/types/ngwr-lightbox-testing.d.ts +101 -119
- package/types/ngwr-lightbox.d.ts +140 -87
- package/types/ngwr-line-chart-testing.d.ts +51 -69
- package/types/ngwr-line-chart.d.ts +171 -134
- package/types/ngwr-list.d.ts +55 -27
- package/types/ngwr-loading-bar-router.d.ts +2 -12
- package/types/ngwr-loading-bar.d.ts +45 -39
- package/types/ngwr-markdown-testing.d.ts +323 -350
- package/types/ngwr-markdown.d.ts +432 -318
- package/types/ngwr-marquee-testing.d.ts +190 -216
- package/types/ngwr-marquee.d.ts +127 -75
- package/types/ngwr-media.d.ts +25 -39
- package/types/ngwr-mention-testing.d.ts +274 -300
- package/types/ngwr-mention.d.ts +249 -164
- package/types/ngwr-meta.d.ts +93 -108
- package/types/ngwr-meter-group-testing.d.ts +33 -51
- package/types/ngwr-meter-group.d.ts +86 -60
- package/types/ngwr-overlay.d.ts +57 -132
- package/types/ngwr-page-header.d.ts +32 -19
- package/types/ngwr-pagination-testing.d.ts +215 -233
- package/types/ngwr-pagination.d.ts +213 -141
- package/types/ngwr-pipes.d.ts +67 -84
- package/types/ngwr-platform.d.ts +52 -57
- package/types/ngwr-popconfirm-testing.d.ts +181 -199
- package/types/ngwr-popconfirm.d.ts +151 -82
- package/types/ngwr-popover-testing.d.ts +183 -201
- package/types/ngwr-popover.d.ts +291 -207
- package/types/ngwr-progress.d.ts +38 -25
- package/types/ngwr-pull-to-refresh.d.ts +55 -40
- package/types/ngwr-qr.d.ts +79 -37
- package/types/ngwr-radio-testing.d.ts +208 -234
- package/types/ngwr-radio.d.ts +171 -125
- package/types/ngwr-rating-testing.d.ts +218 -244
- package/types/ngwr-rating.d.ts +154 -111
- package/types/ngwr-result.d.ts +85 -41
- package/types/ngwr-rotating-text-testing.d.ts +107 -125
- package/types/ngwr-rotating-text.d.ts +96 -52
- package/types/ngwr-schema-form.d.ts +57 -49
- package/types/ngwr-scroll.d.ts +27 -31
- package/types/ngwr-segmented-testing.d.ts +333 -359
- package/types/ngwr-segmented.d.ts +189 -165
- package/types/ngwr-select-testing.d.ts +128 -154
- package/types/ngwr-select.d.ts +1103 -906
- package/types/ngwr-shiny-text-testing.d.ts +82 -100
- package/types/ngwr-shiny-text.d.ts +83 -36
- package/types/ngwr-sidebar.d.ts +108 -93
- package/types/ngwr-skeleton.d.ts +34 -26
- package/types/ngwr-slider-testing.d.ts +228 -254
- package/types/ngwr-slider.d.ts +244 -186
- package/types/ngwr-sparkline-testing.d.ts +29 -47
- package/types/ngwr-sparkline.d.ts +130 -88
- package/types/ngwr-speed-dial-testing.d.ts +129 -155
- package/types/ngwr-speed-dial.d.ts +92 -57
- package/types/ngwr-spinner.d.ts +30 -23
- package/types/ngwr-splash-cursor-testing.d.ts +42 -60
- package/types/ngwr-splash-cursor.d.ts +129 -61
- package/types/ngwr-split-text-testing.d.ts +119 -137
- package/types/ngwr-split-text.d.ts +120 -71
- package/types/ngwr-splitter-testing.d.ts +114 -132
- package/types/ngwr-splitter.d.ts +85 -55
- package/types/ngwr-spotlight-card-testing.d.ts +177 -203
- package/types/ngwr-spotlight-card.d.ts +50 -32
- package/types/ngwr-squircle.d.ts +112 -70
- package/types/ngwr-star-border-testing.d.ts +74 -92
- package/types/ngwr-star-border.d.ts +42 -20
- package/types/ngwr-statistic.d.ts +210 -130
- package/types/ngwr-stepper-testing.d.ts +258 -284
- package/types/ngwr-stepper.d.ts +112 -75
- package/types/ngwr-storage.d.ts +96 -118
- package/types/ngwr-switch-testing.d.ts +26 -44
- package/types/ngwr-switch.d.ts +99 -62
- package/types/ngwr-table-testing.d.ts +291 -333
- package/types/ngwr-table.d.ts +930 -707
- package/types/ngwr-tabs-router.d.ts +21 -24
- package/types/ngwr-tabs-testing.d.ts +354 -380
- package/types/ngwr-tabs.d.ts +169 -155
- package/types/ngwr-textarea-testing.d.ts +123 -141
- package/types/ngwr-textarea.d.ts +166 -105
- package/types/ngwr-theme.d.ts +81 -163
- package/types/ngwr-tilt-card-testing.d.ts +94 -112
- package/types/ngwr-tilt-card.d.ts +64 -35
- package/types/ngwr-timeline.d.ts +36 -19
- package/types/ngwr-toast-testing.d.ts +37 -55
- package/types/ngwr-toast.d.ts +165 -209
- package/types/ngwr-toolbar.d.ts +17 -14
- package/types/ngwr-tour-testing.d.ts +84 -102
- package/types/ngwr-tour.d.ts +142 -144
- package/types/ngwr-transfer-testing.d.ts +293 -328
- package/types/ngwr-transfer.d.ts +228 -159
- package/types/ngwr-tree-testing.d.ts +428 -454
- package/types/ngwr-tree.d.ts +407 -296
- package/types/ngwr-typewriter-testing.d.ts +125 -143
- package/types/ngwr-typewriter.d.ts +137 -63
- package/types/ngwr-typography.d.ts +49 -27
- package/types/ngwr-utils.d.ts +100 -107
- package/types/ngwr-validators.d.ts +94 -104
- package/types/ngwr-version.d.ts +3 -14
- package/types/ngwr-virtual-scroll.d.ts +86 -58
- package/types/ngwr-waves-testing.d.ts +61 -79
- package/types/ngwr-waves.d.ts +116 -63
- package/types/ngwr-window-testing.d.ts +178 -204
- package/types/ngwr-window.d.ts +299 -325
- package/types/ngwr.d.ts +1 -2
- package/fesm2022/ngwr.mjs.map +0 -1
|
@@ -1,291 +1,128 @@
|
|
|
1
|
-
import { ComponentHarness,
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
*
|
|
6
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Test harness for one `<wr-dropdown-item>` inside a dropdown menu.
|
|
11
|
-
*
|
|
12
|
-
* The selector is the CLASS rather than the element: `.wr-dropdown-item` is what
|
|
13
|
-
* the directive's own keyboard navigation queries, so it is the contract both
|
|
14
|
-
* sides already rely on. Only the class, though — the directive narrows its query
|
|
15
|
-
* to `:not(.wr-dropdown-item--disabled)` because it is looking for focus stops,
|
|
16
|
-
* while a spec still has to be able to see a disabled item and assert that it is
|
|
17
|
-
* one.
|
|
18
|
-
*
|
|
19
|
-
* @see https://ngwr.dev/guides/testing
|
|
20
|
-
*/
|
|
21
|
-
class WrDropdownItemHarness extends ComponentHarness {
|
|
22
|
-
/** The class the item paints on its host, and the one arrow-key navigation looks for. */
|
|
23
|
-
static hostSelector = '.wr-dropdown-item';
|
|
24
|
-
/** Build a predicate that narrows the query. */
|
|
25
|
-
static with(options = {}) {
|
|
26
|
-
return new HarnessPredicate(WrDropdownItemHarness, options)
|
|
27
|
-
.addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
|
|
28
|
-
.addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);
|
|
29
|
-
}
|
|
30
|
-
/** The item's label, trimmed. A leading icon is not part of it. */
|
|
31
|
-
async getText() {
|
|
32
|
-
return (await this.locatorFor('.wr-dropdown-item__label')()).text();
|
|
33
|
-
}
|
|
34
|
-
/** The role the item announces — `menuitem`. */
|
|
35
|
-
async getRole() {
|
|
36
|
-
return (await this.host()).getAttribute('role');
|
|
37
|
-
}
|
|
38
|
-
/** Whether the item refuses activation. */
|
|
39
|
-
async isDisabled() {
|
|
40
|
-
return (await (await this.host()).getAttribute('aria-disabled')) === 'true';
|
|
41
|
-
}
|
|
42
|
-
/** Whether the item shows a leading icon. */
|
|
43
|
-
async hasIcon() {
|
|
44
|
-
return (await this.locatorForOptional('.wr-dropdown-item__icon')()) !== null;
|
|
45
|
-
}
|
|
46
|
-
/** The leading icon's registered name, or `null` when the item has no icon. */
|
|
47
|
-
async getIconName() {
|
|
48
|
-
const icon = await this.locatorForOptional('.wr-dropdown-item__icon')();
|
|
49
|
-
// `<wr-icon>` reflects the name it was asked for as `data-icon`, whether or not
|
|
50
|
-
// that name is registered — so this answers what the item MEANT to draw.
|
|
51
|
-
return icon ? icon.getAttribute('data-icon') : null;
|
|
52
|
-
}
|
|
53
|
-
/** Whether the item holds the menu's roving focus. */
|
|
54
|
-
async isFocused() {
|
|
55
|
-
return (await this.host()).isFocused();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Click the item. A disabled item throws instead.
|
|
59
|
-
*
|
|
60
|
-
* Refusing is the only honest answer: the item's own `disabled` guards the
|
|
61
|
-
* KEYBOARD path only, and a pointer is stopped by `pointer-events: none` in the
|
|
62
|
-
* stylesheet. jsdom loads no stylesheets, so a click dispatched here would land
|
|
63
|
-
* on the host — exactly where the consumer bound `(click)` — and the spec would
|
|
64
|
-
* record an activation that cannot happen in a browser. Assert `isDisabled()`
|
|
65
|
-
* instead.
|
|
66
|
-
*/
|
|
67
|
-
async click() {
|
|
68
|
-
if (await this.isDisabled()) {
|
|
69
|
-
throw new Error(`WrDropdownItemHarness.click(): "${await this.getText()}" is disabled, so clicking it would ` +
|
|
70
|
-
'report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does ' +
|
|
71
|
-
'not load. Assert isDisabled() instead.');
|
|
72
|
-
}
|
|
73
|
-
return (await this.host()).click();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
1
|
+
import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate, TestKey } from "@angular/cdk/testing";
|
|
77
2
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
3
|
+
* @license
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
|
+
*/
|
|
8
|
+
var WrDropdownItemHarness = class WrDropdownItemHarness extends ComponentHarness {
|
|
9
|
+
static hostSelector = ".wr-dropdown-item";
|
|
10
|
+
static with(options = {}) {
|
|
11
|
+
return new HarnessPredicate(WrDropdownItemHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text)).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled);
|
|
12
|
+
}
|
|
13
|
+
async getText() {
|
|
14
|
+
return (await this.locatorFor(".wr-dropdown-item__label")()).text();
|
|
15
|
+
}
|
|
16
|
+
async getRole() {
|
|
17
|
+
return (await this.host()).getAttribute("role");
|
|
18
|
+
}
|
|
19
|
+
async isDisabled() {
|
|
20
|
+
return await (await this.host()).getAttribute("aria-disabled") === "true";
|
|
21
|
+
}
|
|
22
|
+
async hasIcon() {
|
|
23
|
+
return await this.locatorForOptional(".wr-dropdown-item__icon")() !== null;
|
|
24
|
+
}
|
|
25
|
+
async getIconName() {
|
|
26
|
+
const icon = await this.locatorForOptional(".wr-dropdown-item__icon")();
|
|
27
|
+
return icon ? icon.getAttribute("data-icon") : null;
|
|
28
|
+
}
|
|
29
|
+
async isFocused() {
|
|
30
|
+
return (await this.host()).isFocused();
|
|
31
|
+
}
|
|
32
|
+
async click() {
|
|
33
|
+
if (await this.isDisabled()) throw new Error(`WrDropdownItemHarness.click(): "${await this.getText()}" is disabled, so clicking it would report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does not load. Assert isDisabled() instead.`);
|
|
34
|
+
return (await this.host()).click();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
83
37
|
/**
|
|
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
|
-
* outside pointer event for the first and closes it.
|
|
173
|
-
*/
|
|
174
|
-
async openByKeyboard() {
|
|
175
|
-
if (await this.isOpen())
|
|
176
|
-
return;
|
|
177
|
-
await (await this.host()).sendKeys(TestKey.DOWN_ARROW);
|
|
178
|
-
if (await this.isOpen())
|
|
179
|
-
return;
|
|
180
|
-
throw new Error('WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component ' +
|
|
181
|
-
'takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; ' +
|
|
182
|
-
'check that this element is the trigger you meant.');
|
|
183
|
-
}
|
|
184
|
-
/** Close the menu. A closed dropdown is left alone. */
|
|
185
|
-
async close() {
|
|
186
|
-
if (!(await this.isOpen()))
|
|
187
|
-
return;
|
|
188
|
-
const host = await this.host();
|
|
189
|
-
// Pointer-out leads for the reason `open()` hovers first: it closes a
|
|
190
|
-
// `trigger="hover"` dropdown without a click, and the click a `trigger="click"`
|
|
191
|
-
// one needs would also count as an outside press for every other open overlay.
|
|
192
|
-
await host.mouseAway();
|
|
193
|
-
if (!(await this.isOpen()))
|
|
194
|
-
return;
|
|
195
|
-
await host.click();
|
|
196
|
-
if (!(await this.isOpen()))
|
|
197
|
-
return;
|
|
198
|
-
throw new Error('WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a ' +
|
|
199
|
-
'`trigger="hover"` dropdown and a second click closes a `trigger="click"` one; neither worked.');
|
|
200
|
-
}
|
|
201
|
-
/** Click the trigger. A `trigger="hover"` dropdown deliberately ignores this. */
|
|
202
|
-
async clickTrigger() {
|
|
203
|
-
return (await this.host()).click();
|
|
204
|
-
}
|
|
205
|
-
/** Move the pointer onto the trigger. Opens a `trigger="hover"` dropdown. */
|
|
206
|
-
async hoverTrigger() {
|
|
207
|
-
return (await this.host()).hover();
|
|
208
|
-
}
|
|
209
|
-
/** Move the pointer off the trigger. Closes a `trigger="hover"` dropdown. */
|
|
210
|
-
async mouseAwayFromTrigger() {
|
|
211
|
-
return (await this.host()).mouseAway();
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* The items in this dropdown's menu, in DOM order.
|
|
215
|
-
*
|
|
216
|
-
* Throws while the menu is closed: the items do not exist anywhere until the
|
|
217
|
-
* portal is attached, and an empty array reads like a menu that rendered
|
|
218
|
-
* nothing — a failure three lines later instead of here.
|
|
219
|
-
*/
|
|
220
|
-
async getItems(filters = {}) {
|
|
221
|
-
return this.getAllHarnesses(WrDropdownItemHarness.with(filters));
|
|
222
|
-
}
|
|
223
|
-
/** The labels of the items in this dropdown's menu, in DOM order. */
|
|
224
|
-
async getItemTexts() {
|
|
225
|
-
const items = await this.getItems();
|
|
226
|
-
return Promise.all(items.map(item => item.getText()));
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Open the menu if it is closed, then click the first item matching the filters.
|
|
230
|
-
*
|
|
231
|
-
* Picking does NOT close the menu — there is no close-on-select in the item or
|
|
232
|
-
* the menu, so a consumer who wants one calls `close()` themselves.
|
|
233
|
-
*/
|
|
234
|
-
async clickItem(filters) {
|
|
235
|
-
await this.open();
|
|
236
|
-
const [item] = await this.getItems(filters);
|
|
237
|
-
if (!item) {
|
|
238
|
-
const offered = await this.getItemTexts();
|
|
239
|
-
throw new Error(`WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. ` +
|
|
240
|
-
`The menu offers: ${offered.join(', ')}.`);
|
|
241
|
-
}
|
|
242
|
-
await item.click();
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* The label of the item that currently holds focus, or `null` when focus is
|
|
246
|
-
* elsewhere.
|
|
247
|
-
*
|
|
248
|
-
* The menu roves focus rather than moving a visual cursor — it lands on the
|
|
249
|
-
* first ENABLED item as the menu renders, and the arrow keys walk it from there
|
|
250
|
-
* over the enabled items only (a disabled one is not a stop) — so this is the
|
|
251
|
-
* only way to ask where the keyboard is.
|
|
252
|
-
*/
|
|
253
|
-
async getFocusedItemText() {
|
|
254
|
-
for (const item of await this.getItems()) {
|
|
255
|
-
if (await item.isFocused())
|
|
256
|
-
return item.getText();
|
|
257
|
-
}
|
|
258
|
-
return null;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* A loader scoped to THIS dropdown's menu — the content loader every
|
|
262
|
-
* `HarnessLoader` method on this class runs through, `getItems()` included.
|
|
263
|
-
*
|
|
264
|
-
* Scoped by the published id rather than by `.wr-dropdown-menu`: the overlay
|
|
265
|
-
* container is shared, so a bare class query would answer with whichever
|
|
266
|
-
* dropdown happened to open first.
|
|
267
|
-
*/
|
|
268
|
-
async getRootHarnessLoader() {
|
|
269
|
-
return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);
|
|
270
|
-
}
|
|
271
|
-
/** This dropdown's menu element in the overlay. */
|
|
272
|
-
async menu() {
|
|
273
|
-
return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();
|
|
274
|
-
}
|
|
275
|
-
/** The id the trigger publishes as `aria-controls`, which its menu carries. */
|
|
276
|
-
async menuId() {
|
|
277
|
-
const id = await (await this.host()).getAttribute('aria-controls');
|
|
278
|
-
if (!id) {
|
|
279
|
-
throw new Error('WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() ' +
|
|
280
|
-
'first. The trigger publishes `aria-controls` only while its menu is open.');
|
|
281
|
-
}
|
|
282
|
-
return id;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Generated bundle index. Do not edit.
|
|
288
|
-
*/
|
|
289
|
-
|
|
38
|
+
* @license
|
|
39
|
+
*
|
|
40
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
41
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
42
|
+
*/
|
|
43
|
+
var WrDropdownHarness = class WrDropdownHarness extends ContentContainerComponentHarness {
|
|
44
|
+
static hostSelector = ".wr-dropdown-trigger";
|
|
45
|
+
static with(options = {}) {
|
|
46
|
+
return new HarnessPredicate(WrDropdownHarness, options).addOption("text", options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text)).addOption("open", options.open, async (harness, open) => await harness.isOpen() === open);
|
|
47
|
+
}
|
|
48
|
+
async getTriggerText() {
|
|
49
|
+
return (await this.host()).text();
|
|
50
|
+
}
|
|
51
|
+
async isOpen() {
|
|
52
|
+
return await (await this.host()).getAttribute("aria-expanded") === "true";
|
|
53
|
+
}
|
|
54
|
+
async getMenuRole() {
|
|
55
|
+
return (await this.menu()).getAttribute("role");
|
|
56
|
+
}
|
|
57
|
+
async isMenuLabelledByTrigger() {
|
|
58
|
+
const labelledBy = await (await this.menu()).getAttribute("aria-labelledby");
|
|
59
|
+
return labelledBy !== null && labelledBy === await (await this.host()).getAttribute("id");
|
|
60
|
+
}
|
|
61
|
+
async open() {
|
|
62
|
+
if (await this.isOpen()) return;
|
|
63
|
+
const host = await this.host();
|
|
64
|
+
await host.hover();
|
|
65
|
+
if (await this.isOpen()) return;
|
|
66
|
+
await host.click();
|
|
67
|
+
if (await this.isOpen()) return;
|
|
68
|
+
throw new Error("WrDropdownHarness.open(): the menu did not open — neither hovering the trigger nor clicking it had any effect. Both gestures were tried, so the `trigger` mode is not the cause; check that this element is the trigger you meant. openByKeyboard() is the third route in.");
|
|
69
|
+
}
|
|
70
|
+
async openByKeyboard() {
|
|
71
|
+
if (await this.isOpen()) return;
|
|
72
|
+
await (await this.host()).sendKeys(TestKey.DOWN_ARROW);
|
|
73
|
+
if (await this.isOpen()) return;
|
|
74
|
+
throw new Error("WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; check that this element is the trigger you meant.");
|
|
75
|
+
}
|
|
76
|
+
async close() {
|
|
77
|
+
if (!await this.isOpen()) return;
|
|
78
|
+
const host = await this.host();
|
|
79
|
+
await host.mouseAway();
|
|
80
|
+
if (!await this.isOpen()) return;
|
|
81
|
+
await host.click();
|
|
82
|
+
if (!await this.isOpen()) return;
|
|
83
|
+
throw new Error("WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a `trigger=\"hover\"` dropdown and a second click closes a `trigger=\"click\"` one; neither worked.");
|
|
84
|
+
}
|
|
85
|
+
async clickTrigger() {
|
|
86
|
+
return (await this.host()).click();
|
|
87
|
+
}
|
|
88
|
+
async hoverTrigger() {
|
|
89
|
+
return (await this.host()).hover();
|
|
90
|
+
}
|
|
91
|
+
async mouseAwayFromTrigger() {
|
|
92
|
+
return (await this.host()).mouseAway();
|
|
93
|
+
}
|
|
94
|
+
async getItems(filters = {}) {
|
|
95
|
+
return this.getAllHarnesses(WrDropdownItemHarness.with(filters));
|
|
96
|
+
}
|
|
97
|
+
async getItemTexts() {
|
|
98
|
+
const items = await this.getItems();
|
|
99
|
+
return Promise.all(items.map((item) => item.getText()));
|
|
100
|
+
}
|
|
101
|
+
async clickItem(filters) {
|
|
102
|
+
await this.open();
|
|
103
|
+
const [item] = await this.getItems(filters);
|
|
104
|
+
if (!item) {
|
|
105
|
+
const offered = await this.getItemTexts();
|
|
106
|
+
throw new Error(`WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. The menu offers: ${offered.join(", ")}.`);
|
|
107
|
+
}
|
|
108
|
+
await item.click();
|
|
109
|
+
}
|
|
110
|
+
async getFocusedItemText() {
|
|
111
|
+
for (const item of await this.getItems()) if (await item.isFocused()) return item.getText();
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
async getRootHarnessLoader() {
|
|
115
|
+
return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);
|
|
116
|
+
}
|
|
117
|
+
async menu() {
|
|
118
|
+
return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();
|
|
119
|
+
}
|
|
120
|
+
async menuId() {
|
|
121
|
+
const id = await (await this.host()).getAttribute("aria-controls");
|
|
122
|
+
if (!id) throw new Error("WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() first. The trigger publishes `aria-controls` only while its menu is open.");
|
|
123
|
+
return id;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
290
126
|
export { WrDropdownHarness, WrDropdownItemHarness };
|
|
291
|
-
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=ngwr-dropdown-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-dropdown-testing.mjs","sources":["../../../projects/lib/dropdown/testing/wr-dropdown-item-harness.ts","../../../projects/lib/dropdown/testing/wr-dropdown-harness.ts","../../../projects/lib/dropdown/testing/ngwr-dropdown-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrDropdownItemHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one `<wr-dropdown-item>` inside a dropdown menu.\n *\n * The selector is the CLASS rather than the element: `.wr-dropdown-item` is what\n * the directive's own keyboard navigation queries, so it is the contract both\n * sides already rely on. Only the class, though — the directive narrows its query\n * to `:not(.wr-dropdown-item--disabled)` because it is looking for focus stops,\n * while a spec still has to be able to see a disabled item and assert that it is\n * one.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownItemHarness extends ComponentHarness {\n /** The class the item paints on its host, and the one arrow-key navigation looks for. */\n static hostSelector = '.wr-dropdown-item';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownItemHarnessFilters = {}): HarnessPredicate<WrDropdownItemHarness> {\n return new HarnessPredicate(WrDropdownItemHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The item's label, trimmed. A leading icon is not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-dropdown-item__label')()).text();\n }\n\n /** The role the item announces — `menuitem`. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the item refuses activation. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the item shows a leading icon. */\n async hasIcon(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-dropdown-item__icon')()) !== null;\n }\n\n /** The leading icon's registered name, or `null` when the item has no icon. */\n async getIconName(): Promise<string | null> {\n const icon = await this.locatorForOptional('.wr-dropdown-item__icon')();\n // `<wr-icon>` reflects the name it was asked for as `data-icon`, whether or not\n // that name is registered — so this answers what the item MEANT to draw.\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /** Whether the item holds the menu's roving focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Click the item. A disabled item throws instead.\n *\n * Refusing is the only honest answer: the item's own `disabled` guards the\n * KEYBOARD path only, and a pointer is stopped by `pointer-events: none` in the\n * stylesheet. jsdom loads no stylesheets, so a click dispatched here would land\n * on the host — exactly where the consumer bound `(click)` — and the spec would\n * record an activation that cannot happen in a browser. Assert `isDisabled()`\n * instead.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n `WrDropdownItemHarness.click(): \"${await this.getText()}\" is disabled, so clicking it would ` +\n 'report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does ' +\n 'not load. Assert isDisabled() instead.'\n );\n }\n\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrDropdownHarnessFilters, WrDropdownItemHarnessFilters } from './interfaces';\nimport { WrDropdownItemHarness } from './wr-dropdown-item-harness';\n\n/**\n * Test harness for `[wrDropdown]` — the trigger, and the menu it opens.\n *\n * The harness matches the TRIGGER, because that is the only part of the dropdown\n * in the fixture: `<wr-dropdown-menu>` renders nothing of its own (it hands over\n * an `<ng-template>`), and the menu is portalled into the overlay container, a\n * sibling of the whole app. So every item is read through the document root,\n * scoped by the `aria-controls` id the trigger publishes while it is open — which\n * is what keeps two dropdowns on one page from answering with each other's items.\n *\n * That scoped loader is also this harness's CONTENT loader, so\n * `dropdown.getHarness(…)` resolves inside THIS dropdown's menu: the consumer's\n * own components in the menu are reachable without the spec ever touching the\n * overlay, and so is a nested `[wrDropdown]`, which is how a submenu is built\n * here (the component ships no submenu API of its own).\n *\n * @example\n * ```ts\n * const dropdown = await loader.getHarness(WrDropdownHarness.with({ text: 'Actions' }));\n *\n * await dropdown.open();\n * expect(await dropdown.getItemTexts()).toEqual(['Copy', 'Delete']);\n *\n * await dropdown.clickItem({ text: 'Copy' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownHarness extends ContentContainerComponentHarness {\n /** The directive's host — whatever element the consumer put `[wrDropdown]` on. */\n static hostSelector = '.wr-dropdown-trigger';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownHarnessFilters = {}): HarnessPredicate<WrDropdownHarness> {\n return new HarnessPredicate(WrDropdownHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n /** The trigger's visible text. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the menu is showing. */\n async isOpen(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** The role the menu announces — `menu`. Throws while the menu is closed. */\n async getMenuRole(): Promise<string | null> {\n return (await this.menu()).getAttribute('role');\n }\n\n /**\n * Whether the menu takes its accessible name from this trigger.\n *\n * The menu carries no label of its own, so that reference IS its name — and the\n * id it points at is generated unless the consumer named the trigger\n * themselves, which is why a spec cannot simply hard-code one.\n */\n async isMenuLabelledByTrigger(): Promise<boolean> {\n const labelledBy = await (await this.menu()).getAttribute('aria-labelledby');\n return labelledBy !== null && labelledBy === (await (await this.host()).getAttribute('id'));\n }\n\n /**\n * Open the menu, whichever gesture this dropdown listens for.\n *\n * `trigger` is not reflected in the DOM, so the harness cannot ask which mode it\n * is in: it moves the pointer on first and falls back to a click. Hover leads\n * because a click is an outside pointer event for every OTHER open overlay — so\n * leading with it would shut someone else's menu on the way to opening this one\n * — and a `trigger=\"click\"` dropdown ignores the hover outright.\n */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n const host = await this.host();\n\n await host.hover();\n if (await this.isOpen()) return;\n\n await host.click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.open(): the menu did not open — neither hovering the trigger nor clicking it ' +\n 'had any effect. Both gestures were tried, so the `trigger` mode is not the cause; check that this ' +\n 'element is the trigger you meant. openByKeyboard() is the third route in.'\n );\n }\n\n /**\n * Open the menu from the keyboard — ArrowDown on the trigger, the APG\n * menu-button path (ArrowUp / Enter / Space do the same).\n *\n * Worth its own method rather than an argument to `open()`: it is the only way\n * to get TWO dropdowns open at once, because clicking a second trigger is an\n * outside pointer event for the first and closes it.\n */\n async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.DOWN_ARROW);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component ' +\n 'takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; ' +\n 'check that this element is the trigger you meant.'\n );\n }\n\n /** Close the menu. A closed dropdown is left alone. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n const host = await this.host();\n\n // Pointer-out leads for the reason `open()` hovers first: it closes a\n // `trigger=\"hover\"` dropdown without a click, and the click a `trigger=\"click\"`\n // one needs would also count as an outside press for every other open overlay.\n await host.mouseAway();\n if (!(await this.isOpen())) return;\n\n await host.click();\n if (!(await this.isOpen())) return;\n\n throw new Error(\n 'WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a ' +\n '`trigger=\"hover\"` dropdown and a second click closes a `trigger=\"click\"` one; neither worked.'\n );\n }\n\n /** Click the trigger. A `trigger=\"hover\"` dropdown deliberately ignores this. */\n async clickTrigger(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger. Opens a `trigger=\"hover\"` dropdown. */\n async hoverTrigger(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. Closes a `trigger=\"hover\"` dropdown. */\n async mouseAwayFromTrigger(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * The items in this dropdown's menu, in DOM order.\n *\n * Throws while the menu is closed: the items do not exist anywhere until the\n * portal is attached, and an empty array reads like a menu that rendered\n * nothing — a failure three lines later instead of here.\n */\n async getItems(filters: WrDropdownItemHarnessFilters = {}): Promise<WrDropdownItemHarness[]> {\n return this.getAllHarnesses(WrDropdownItemHarness.with(filters));\n }\n\n /** The labels of the items in this dropdown's menu, in DOM order. */\n async getItemTexts(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getText()));\n }\n\n /**\n * Open the menu if it is closed, then click the first item matching the filters.\n *\n * Picking does NOT close the menu — there is no close-on-select in the item or\n * the menu, so a consumer who wants one calls `close()` themselves.\n */\n async clickItem(filters: WrDropdownItemHarnessFilters): Promise<void> {\n await this.open();\n\n const [item] = await this.getItems(filters);\n if (!item) {\n const offered = await this.getItemTexts();\n throw new Error(\n `WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. ` +\n `The menu offers: ${offered.join(', ')}.`\n );\n }\n\n await item.click();\n }\n\n /**\n * The label of the item that currently holds focus, or `null` when focus is\n * elsewhere.\n *\n * The menu roves focus rather than moving a visual cursor — it lands on the\n * first ENABLED item as the menu renders, and the arrow keys walk it from there\n * over the enabled items only (a disabled one is not a stop) — so this is the\n * only way to ask where the keyboard is.\n */\n async getFocusedItemText(): Promise<string | null> {\n for (const item of await this.getItems()) {\n if (await item.isFocused()) return item.getText();\n }\n return null;\n }\n\n /**\n * A loader scoped to THIS dropdown's menu — the content loader every\n * `HarnessLoader` method on this class runs through, `getItems()` included.\n *\n * Scoped by the published id rather than by `.wr-dropdown-menu`: the overlay\n * container is shared, so a bare class query would answer with whichever\n * dropdown happened to open first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);\n }\n\n /** This dropdown's menu element in the overlay. */\n private async menu(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();\n }\n\n /** The id the trigger publishes as `aria-controls`, which its menu carries. */\n private async menuId(): Promise<string> {\n const id = await (await this.host()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n 'WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() ' +\n 'first. The trigger publishes `aria-controls` only while its menu is open.'\n );\n }\n return id;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;AAWG;AACG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;;AAEzD,IAAA,OAAO,YAAY,GAAG,mBAAmB;;AAGzC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAwC,EAAE,EAAA;AACpD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO;aACvD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC;aAC1G,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC;IACpH;;AAGA,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE,EAAE,IAAI,EAAE;IACrE;;AAGA,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC;IACjD;;AAGA,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM;IAC7E;;AAGA,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,OAAO,CAAC,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AAA,CAAE,CAAC,EAAE;IAClF;;AAGQ,IAAA,MAAM,MAAM,GAAA;AAClB,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,eAAe,CAAC;QAClE,IAAI,CAAC,EAAE,EAAE;YACP,MAAM,IAAI,KAAK,CACb,6FAA6F;AAC3F,gBAAA,2EAA2E,CAC9E;QACH;AACA,QAAA,OAAO,EAAE;IACX;;;ACzPF;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-dropdown-testing.mjs","names":[],"sources":["../../../projects/lib/dropdown/testing/wr-dropdown-item-harness.ts","../../../projects/lib/dropdown/testing/wr-dropdown-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrDropdownItemHarnessFilters } from './interfaces';\n\n/**\n * Test harness for one `<wr-dropdown-item>` inside a dropdown menu.\n *\n * The selector is the CLASS rather than the element: `.wr-dropdown-item` is what\n * the directive's own keyboard navigation queries, so it is the contract both\n * sides already rely on. Only the class, though — the directive narrows its query\n * to `:not(.wr-dropdown-item--disabled)` because it is looking for focus stops,\n * while a spec still has to be able to see a disabled item and assert that it is\n * one.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownItemHarness extends ComponentHarness {\n /** The class the item paints on its host, and the one arrow-key navigation looks for. */\n static hostSelector = '.wr-dropdown-item';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownItemHarnessFilters = {}): HarnessPredicate<WrDropdownItemHarness> {\n return new HarnessPredicate(WrDropdownItemHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The item's label, trimmed. A leading icon is not part of it. */\n async getText(): Promise<string> {\n return (await this.locatorFor('.wr-dropdown-item__label')()).text();\n }\n\n /** The role the item announces — `menuitem`. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether the item refuses activation. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the item shows a leading icon. */\n async hasIcon(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-dropdown-item__icon')()) !== null;\n }\n\n /** The leading icon's registered name, or `null` when the item has no icon. */\n async getIconName(): Promise<string | null> {\n const icon = await this.locatorForOptional('.wr-dropdown-item__icon')();\n // `<wr-icon>` reflects the name it was asked for as `data-icon`, whether or not\n // that name is registered — so this answers what the item MEANT to draw.\n return icon ? icon.getAttribute('data-icon') : null;\n }\n\n /** Whether the item holds the menu's roving focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Click the item. A disabled item throws instead.\n *\n * Refusing is the only honest answer: the item's own `disabled` guards the\n * KEYBOARD path only, and a pointer is stopped by `pointer-events: none` in the\n * stylesheet. jsdom loads no stylesheets, so a click dispatched here would land\n * on the host — exactly where the consumer bound `(click)` — and the spec would\n * record an activation that cannot happen in a browser. Assert `isDisabled()`\n * instead.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n `WrDropdownItemHarness.click(): \"${await this.getText()}\" is disabled, so clicking it would ` +\n 'report behaviour a browser cannot produce — the pointer is stopped by CSS, which jsdom does ' +\n 'not load. Assert isDisabled() instead.'\n );\n }\n\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n ContentContainerComponentHarness,\n type HarnessLoader,\n HarnessPredicate,\n TestKey,\n type TestElement,\n} from '@angular/cdk/testing';\n\nimport type { WrDropdownHarnessFilters, WrDropdownItemHarnessFilters } from './interfaces';\nimport { WrDropdownItemHarness } from './wr-dropdown-item-harness';\n\n/**\n * Test harness for `[wrDropdown]` — the trigger, and the menu it opens.\n *\n * The harness matches the TRIGGER, because that is the only part of the dropdown\n * in the fixture: `<wr-dropdown-menu>` renders nothing of its own (it hands over\n * an `<ng-template>`), and the menu is portalled into the overlay container, a\n * sibling of the whole app. So every item is read through the document root,\n * scoped by the `aria-controls` id the trigger publishes while it is open — which\n * is what keeps two dropdowns on one page from answering with each other's items.\n *\n * That scoped loader is also this harness's CONTENT loader, so\n * `dropdown.getHarness(…)` resolves inside THIS dropdown's menu: the consumer's\n * own components in the menu are reachable without the spec ever touching the\n * overlay, and so is a nested `[wrDropdown]`, which is how a submenu is built\n * here (the component ships no submenu API of its own).\n *\n * @example\n * ```ts\n * const dropdown = await loader.getHarness(WrDropdownHarness.with({ text: 'Actions' }));\n *\n * await dropdown.open();\n * expect(await dropdown.getItemTexts()).toEqual(['Copy', 'Delete']);\n *\n * await dropdown.clickItem({ text: 'Copy' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDropdownHarness extends ContentContainerComponentHarness {\n /** The directive's host — whatever element the consumer put `[wrDropdown]` on. */\n static hostSelector = '.wr-dropdown-trigger';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrDropdownHarnessFilters = {}): HarnessPredicate<WrDropdownHarness> {\n return new HarnessPredicate(WrDropdownHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getTriggerText(), text)\n )\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n /** The trigger's visible text. */\n async getTriggerText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the menu is showing. */\n async isOpen(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** The role the menu announces — `menu`. Throws while the menu is closed. */\n async getMenuRole(): Promise<string | null> {\n return (await this.menu()).getAttribute('role');\n }\n\n /**\n * Whether the menu takes its accessible name from this trigger.\n *\n * The menu carries no label of its own, so that reference IS its name — and the\n * id it points at is generated unless the consumer named the trigger\n * themselves, which is why a spec cannot simply hard-code one.\n */\n async isMenuLabelledByTrigger(): Promise<boolean> {\n const labelledBy = await (await this.menu()).getAttribute('aria-labelledby');\n return labelledBy !== null && labelledBy === (await (await this.host()).getAttribute('id'));\n }\n\n /**\n * Open the menu, whichever gesture this dropdown listens for.\n *\n * `trigger` is not reflected in the DOM, so the harness cannot ask which mode it\n * is in: it moves the pointer on first and falls back to a click. Hover leads\n * because a click is an outside pointer event for every OTHER open overlay — so\n * leading with it would shut someone else's menu on the way to opening this one\n * — and a `trigger=\"click\"` dropdown ignores the hover outright.\n */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n const host = await this.host();\n\n await host.hover();\n if (await this.isOpen()) return;\n\n await host.click();\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.open(): the menu did not open — neither hovering the trigger nor clicking it ' +\n 'had any effect. Both gestures were tried, so the `trigger` mode is not the cause; check that this ' +\n 'element is the trigger you meant. openByKeyboard() is the third route in.'\n );\n }\n\n /**\n * Open the menu from the keyboard — ArrowDown on the trigger, the APG\n * menu-button path (ArrowUp / Enter / Space do the same).\n *\n * Worth its own method rather than an argument to `open()`: it is the only way\n * to get TWO dropdowns open at once, because clicking a second trigger is an\n * outside pointer event for the first and closes it.\n */\n async openByKeyboard(): Promise<void> {\n if (await this.isOpen()) return;\n\n await (await this.host()).sendKeys(TestKey.DOWN_ARROW);\n if (await this.isOpen()) return;\n\n throw new Error(\n 'WrDropdownHarness.openByKeyboard(): ArrowDown on the trigger did not open the menu. The component ' +\n 'takes ArrowDown / ArrowUp / Enter / Space in EVERY `trigger` mode, so the mode is not the cause; ' +\n 'check that this element is the trigger you meant.'\n );\n }\n\n /** Close the menu. A closed dropdown is left alone. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n const host = await this.host();\n\n // Pointer-out leads for the reason `open()` hovers first: it closes a\n // `trigger=\"hover\"` dropdown without a click, and the click a `trigger=\"click\"`\n // one needs would also count as an outside press for every other open overlay.\n await host.mouseAway();\n if (!(await this.isOpen())) return;\n\n await host.click();\n if (!(await this.isOpen())) return;\n\n throw new Error(\n 'WrDropdownHarness.close(): the menu is still open. Moving the pointer away closes a ' +\n '`trigger=\"hover\"` dropdown and a second click closes a `trigger=\"click\"` one; neither worked.'\n );\n }\n\n /** Click the trigger. A `trigger=\"hover\"` dropdown deliberately ignores this. */\n async clickTrigger(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Move the pointer onto the trigger. Opens a `trigger=\"hover\"` dropdown. */\n async hoverTrigger(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /** Move the pointer off the trigger. Closes a `trigger=\"hover\"` dropdown. */\n async mouseAwayFromTrigger(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * The items in this dropdown's menu, in DOM order.\n *\n * Throws while the menu is closed: the items do not exist anywhere until the\n * portal is attached, and an empty array reads like a menu that rendered\n * nothing — a failure three lines later instead of here.\n */\n async getItems(filters: WrDropdownItemHarnessFilters = {}): Promise<WrDropdownItemHarness[]> {\n return this.getAllHarnesses(WrDropdownItemHarness.with(filters));\n }\n\n /** The labels of the items in this dropdown's menu, in DOM order. */\n async getItemTexts(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getText()));\n }\n\n /**\n * Open the menu if it is closed, then click the first item matching the filters.\n *\n * Picking does NOT close the menu — there is no close-on-select in the item or\n * the menu, so a consumer who wants one calls `close()` themselves.\n */\n async clickItem(filters: WrDropdownItemHarnessFilters): Promise<void> {\n await this.open();\n\n const [item] = await this.getItems(filters);\n if (!item) {\n const offered = await this.getItemTexts();\n throw new Error(\n `WrDropdownHarness.clickItem(): no item matched ${JSON.stringify(filters)}. ` +\n `The menu offers: ${offered.join(', ')}.`\n );\n }\n\n await item.click();\n }\n\n /**\n * The label of the item that currently holds focus, or `null` when focus is\n * elsewhere.\n *\n * The menu roves focus rather than moving a visual cursor — it lands on the\n * first ENABLED item as the menu renders, and the arrow keys walk it from there\n * over the enabled items only (a disabled one is not a stop) — so this is the\n * only way to ask where the keyboard is.\n */\n async getFocusedItemText(): Promise<string | null> {\n for (const item of await this.getItems()) {\n if (await item.isFocused()) return item.getText();\n }\n return null;\n }\n\n /**\n * A loader scoped to THIS dropdown's menu — the content loader every\n * `HarnessLoader` method on this class runs through, `getItems()` included.\n *\n * Scoped by the published id rather than by `.wr-dropdown-menu`: the overlay\n * container is shared, so a bare class query would answer with whichever\n * dropdown happened to open first.\n */\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${await this.menuId()}`);\n }\n\n /** This dropdown's menu element in the overlay. */\n private async menu(): Promise<TestElement> {\n return this.documentRootLocatorFactory().locatorFor(`#${await this.menuId()}`)();\n }\n\n /** The id the trigger publishes as `aria-controls`, which its menu carries. */\n private async menuId(): Promise<string> {\n const id = await (await this.host()).getAttribute('aria-controls');\n if (!id) {\n throw new Error(\n 'WrDropdownHarness: the menu is closed, so there is nothing inside it to read — call open() ' +\n 'first. The trigger publishes `aria-controls` only while its menu is open.'\n );\n }\n return id;\n }\n}\n"],"mappings":";;;;;;;AAuBA,IAAa,wBAAb,MAAa,8BAA8B,iBAAgB;CAEzD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAwC,CAAA,GAAE;EACpD,OAAO,IAAI,iBAAiB,uBAAuB,OAAO,CAAC,CACxD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAiB,cAAc,QAAQ,QAAO,GAAI,IAAI,CAAC,CAAC,CAC3G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,WAAW,0BAA0B,CAAC,CAAA,EAAA,CAAI,KAAI;CACnE;CAGA,MAAM,UAAO;EACX,QAAQ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