ngwr 10.2.1 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -19
- package/action-sheet/styles/_index.scss +4 -1
- package/anchor/styles/_index.scss +6 -5
- package/back-top/styles/_index.scss +6 -1
- package/blur-text/styles/_index.scss +13 -0
- package/button/styles/_index.scss +11 -6
- package/calendar/styles/_index.scss +11 -2
- package/carousel/styles/_index.scss +13 -2
- package/cascader/styles/_index.scss +5 -3
- package/circular-text/styles/_index.scss +2 -0
- package/collapse/styles/_index.scss +1 -1
- package/color-picker/styles/_index.scss +6 -1
- package/command-palette/styles/_index.scss +2 -1
- package/compare/styles/_index.scss +1 -2
- package/context-menu/styles/_index.scss +8 -2
- package/descriptions/styles/_index.scss +2 -2
- package/dialog/styles/_index.scss +7 -0
- package/drawer/styles/_index.scss +20 -1
- package/dropdown/styles/_index.scss +19 -5
- package/empty/styles/_index.scss +10 -0
- package/falling-text/styles/_index.scss +2 -1
- package/fesm2022/ngwr-action-sheet.mjs +13 -3
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +40 -13
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +18 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +2 -2
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +31 -7
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +6 -2
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +1 -1
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +30 -9
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +2 -2
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +2 -2
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +9 -4
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs +96 -0
- package/fesm2022/ngwr-button-testing.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +31 -14
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +40 -8
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +20 -1
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +377 -0
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
- package/fesm2022/ngwr-carousel.mjs +67 -13
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs +534 -0
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +9 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +2 -2
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +368 -0
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +134 -14
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
- package/fesm2022/ngwr-command-palette.mjs +58 -8
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +103 -13
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +106 -0
- package/fesm2022/ngwr-config.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu.mjs +94 -8
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +5 -1
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +11 -3
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs +52 -4
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter.mjs +54 -8
- package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker.mjs +73 -3
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +27 -9
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +89 -0
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
- package/fesm2022/ngwr-directives.mjs +36 -12
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +22 -5
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs +250 -0
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown.mjs +10 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +24 -7
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +57 -10
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form-testing.mjs +451 -0
- package/fesm2022/ngwr-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +19 -3
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +9 -2
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +19 -5
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +50 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +48 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +23 -0
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +306 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-number.mjs +35 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-otp.mjs +36 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +102 -0
- package/fesm2022/ngwr-input-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input.mjs +47 -10
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +44 -8
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +21 -5
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +33 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +17 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs +516 -0
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-markdown.mjs +1492 -0
- package/fesm2022/ngwr-markdown.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +17 -6
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs +513 -0
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
- package/fesm2022/ngwr-mention.mjs +10 -1
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +22 -7
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +19 -5
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +41 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +389 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pagination.mjs +14 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popconfirm.mjs +95 -17
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +316 -0
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popover.mjs +21 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +17 -2
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +13 -3
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs +392 -0
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
- package/fesm2022/ngwr-radio.mjs +10 -3
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs +384 -0
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rating.mjs +37 -2
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs +512 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select-testing.mjs +268 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +87 -16
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +2 -2
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +65 -12
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +478 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
- package/fesm2022/ngwr-slider.mjs +57 -13
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +26 -6
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +37 -4
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +12 -3
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +2 -2
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +2 -2
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +70 -9
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +24 -7
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs +477 -0
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch-testing.mjs +77 -0
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch.mjs +9 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +580 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -0
- package/fesm2022/ngwr-table.mjs +87 -14
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +617 -0
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tabs.mjs +38 -6
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +238 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
- package/fesm2022/ngwr-textarea.mjs +32 -4
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +101 -0
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
- package/fesm2022/ngwr-toast.mjs +2 -2
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +61 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +538 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-transfer.mjs +45 -14
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +734 -0
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +73 -7
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +5 -3
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +31 -5
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +8 -0
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +7 -2
- package/gauge/styles/_index.scss +1 -1
- package/glitch-text/styles/_index.scss +4 -0
- package/i18n/en.json +48 -0
- package/i18n/ru.json +48 -0
- package/image-cropper/styles/_index.scss +13 -1
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +7 -2
- package/knob/styles/_index.scss +8 -1
- package/layout/styles/_index.scss +3 -3
- package/lightbox/styles/_index.scss +10 -2
- package/line-chart/styles/_index.scss +6 -0
- package/llms-full.txt +151 -4
- package/llms.txt +57 -8
- package/loading-bar/styles/_index.scss +1 -2
- package/markdown/styles/_index.scss +296 -0
- package/marquee/styles/_index.scss +12 -0
- package/mcp/api.js +512 -0
- package/mcp/catalog.js +157 -0
- package/mcp/server.js +273 -0
- package/mcp/tools.js +366 -0
- package/meter-group/styles/_index.scss +1 -1
- package/package.json +186 -35
- package/pagination/styles/_index.scss +6 -6
- package/popover/styles/_index.scss +37 -5
- package/rating/styles/_index.scss +10 -0
- package/result/styles/_index.scss +3 -1
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +12 -1
- package/select/styles/_index.scss +32 -10
- package/sidebar/styles/_index.scss +30 -5
- package/slider/styles/_index.scss +15 -0
- package/speed-dial/styles/_index.scss +20 -0
- package/split-text/styles/_index.scss +13 -0
- package/star-border/styles/_index.scss +2 -0
- package/stepper/styles/_index.scss +19 -3
- package/styles/_grid.scss +4 -4
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +5 -3
- package/table/styles/_index.scss +25 -12
- package/tabs/styles/_index.scss +11 -1
- package/textarea/styles/_index.scss +5 -0
- package/theme/styles/_colors.scss +44 -15
- package/theme/styles/_dark.scss +35 -15
- package/theme/styles/_mixins.scss +3 -0
- package/timeline/styles/_index.scss +2 -2
- package/toast/styles/_index.scss +17 -8
- package/toolbar/styles/_index.scss +3 -3
- package/tour/styles/_index.scss +7 -1
- package/tree/styles/_index.scss +9 -5
- package/types/ngwr-action-sheet.d.ts +9 -1
- package/types/ngwr-affix.d.ts +7 -1
- package/types/ngwr-anchor.d.ts +8 -1
- package/types/ngwr-avatar.d.ts +13 -3
- package/types/ngwr-bar-chart.d.ts +16 -0
- package/types/ngwr-burger.d.ts +6 -2
- package/types/ngwr-button-testing.d.ts +85 -0
- package/types/ngwr-button.d.ts +26 -10
- package/types/ngwr-calendar-heatmap.d.ts +16 -2
- package/types/ngwr-calendar.d.ts +10 -0
- package/types/ngwr-carousel-testing.d.ts +257 -0
- package/types/ngwr-carousel.d.ts +20 -4
- package/types/ngwr-cascader-testing.d.ts +392 -0
- package/types/ngwr-checkbox-testing.d.ts +77 -0
- package/types/ngwr-checkbox.d.ts +7 -2
- package/types/ngwr-collapse-testing.d.ts +290 -0
- package/types/ngwr-color-picker.d.ts +20 -11
- package/types/ngwr-command-palette-testing.d.ts +437 -0
- package/types/ngwr-command-palette.d.ts +25 -2
- package/types/ngwr-compare.d.ts +50 -2
- package/types/ngwr-config.d.ts +176 -0
- package/types/ngwr-context-menu-testing.d.ts +401 -0
- package/types/ngwr-context-menu.d.ts +65 -17
- package/types/ngwr-counter.d.ts +6 -1
- package/types/ngwr-date-adapter-luxon.d.ts +26 -0
- package/types/ngwr-date-picker-testing.d.ts +518 -0
- package/types/ngwr-date-picker.d.ts +4 -0
- package/types/ngwr-dialog-testing.d.ts +79 -0
- package/types/ngwr-directives.d.ts +10 -1
- package/types/ngwr-donut-chart.d.ts +8 -1
- package/types/ngwr-drawer-testing.d.ts +196 -0
- package/types/ngwr-dropdown-testing.d.ts +202 -0
- package/types/ngwr-dropdown.d.ts +7 -1
- package/types/ngwr-empty.d.ts +19 -4
- package/types/ngwr-event-calendar.d.ts +26 -1
- package/types/ngwr-file-upload-testing.d.ts +194 -0
- package/types/ngwr-form-testing.d.ts +379 -0
- package/types/ngwr-form.d.ts +17 -0
- package/types/ngwr-gauge.d.ts +13 -1
- package/types/ngwr-image-cropper.d.ts +10 -0
- package/types/ngwr-input-number-testing.d.ts +226 -0
- package/types/ngwr-input-number.d.ts +29 -1
- package/types/ngwr-input-otp-testing.d.ts +299 -0
- package/types/ngwr-input-otp.d.ts +23 -2
- package/types/ngwr-input-testing.d.ts +84 -0
- package/types/ngwr-input.d.ts +20 -6
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-layout.d.ts +1 -0
- package/types/ngwr-lightbox.d.ts +17 -3
- package/types/ngwr-line-chart.d.ts +9 -2
- package/types/ngwr-markdown-testing.d.ts +462 -0
- package/types/ngwr-markdown.d.ts +534 -0
- package/types/ngwr-marquee.d.ts +12 -2
- package/types/ngwr-mention-testing.d.ts +359 -0
- package/types/ngwr-meta.d.ts +4 -2
- package/types/ngwr-meter-group.d.ts +11 -1
- package/types/ngwr-overlay.d.ts +33 -2
- package/types/ngwr-pagination-testing.d.ts +291 -0
- package/types/ngwr-pagination.d.ts +1 -0
- package/types/ngwr-popconfirm-testing.d.ts +235 -0
- package/types/ngwr-popconfirm.d.ts +31 -21
- package/types/ngwr-popover-testing.d.ts +221 -0
- package/types/ngwr-popover.d.ts +9 -0
- package/types/ngwr-pull-to-refresh.d.ts +7 -0
- package/types/ngwr-qr.d.ts +9 -1
- package/types/ngwr-radio-testing.d.ts +296 -0
- package/types/ngwr-radio.d.ts +8 -2
- package/types/ngwr-rating-testing.d.ts +291 -0
- package/types/ngwr-rating.d.ts +23 -0
- package/types/ngwr-segmented-testing.d.ts +401 -0
- package/types/ngwr-select-testing.d.ts +175 -0
- package/types/ngwr-select.d.ts +45 -4
- package/types/ngwr-sidebar.d.ts +17 -2
- package/types/ngwr-slider-testing.d.ts +329 -0
- package/types/ngwr-slider.d.ts +35 -1
- package/types/ngwr-sparkline.d.ts +12 -2
- package/types/ngwr-speed-dial.d.ts +17 -18
- package/types/ngwr-spinner.d.ts +8 -1
- package/types/ngwr-splitter.d.ts +24 -1
- package/types/ngwr-statistic.d.ts +12 -2
- package/types/ngwr-stepper-testing.d.ts +346 -0
- package/types/ngwr-switch-testing.d.ts +66 -0
- package/types/ngwr-switch.d.ts +7 -2
- package/types/ngwr-table-testing.d.ts +423 -0
- package/types/ngwr-table.d.ts +42 -0
- package/types/ngwr-tabs-testing.d.ts +470 -0
- package/types/ngwr-tabs.d.ts +9 -0
- package/types/ngwr-textarea-testing.d.ts +184 -0
- package/types/ngwr-textarea.d.ts +7 -2
- package/types/ngwr-toast-testing.d.ts +80 -0
- package/types/ngwr-tour.d.ts +27 -0
- package/types/ngwr-transfer-testing.d.ts +444 -0
- package/types/ngwr-transfer.d.ts +16 -1
- package/types/ngwr-tree-testing.d.ts +501 -0
- package/types/ngwr-tree.d.ts +33 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-virtual-scroll.d.ts +13 -1
- package/typewriter/styles/_index.scss +1 -1
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +32 -9
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
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
|
+
/** Narrows which `<wr-cascader>` a harness query matches. */
|
|
11
|
+
interface WrCascaderHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/**
|
|
13
|
+
* Match the trigger's displayed value — the selected labels joined by the
|
|
14
|
+
* `separator`, e.g. `'Europe / Germany / Berlin'`. A string is an exact match,
|
|
15
|
+
* a RegExp is tested. A cascader with nothing selected shows its placeholder
|
|
16
|
+
* and matches `''`.
|
|
17
|
+
*/
|
|
18
|
+
readonly text?: string | RegExp;
|
|
19
|
+
/** Match the placeholder, which only shows while nothing is selected. */
|
|
20
|
+
readonly placeholder?: string | RegExp;
|
|
21
|
+
/** Match only enabled (`false`) or only disabled (`true`) cascaders. */
|
|
22
|
+
readonly disabled?: boolean;
|
|
23
|
+
/** Match only open (`true`) or only closed (`false`) cascaders. */
|
|
24
|
+
readonly open?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Narrows which column of an open cascader panel a harness query matches. */
|
|
27
|
+
interface WrCascaderColumnHarnessFilters extends BaseHarnessFilters {
|
|
28
|
+
/**
|
|
29
|
+
* Match a column that offers an option with this label — the way to ask for
|
|
30
|
+
* "the level Germany lives in" without counting columns. A string is an exact
|
|
31
|
+
* match, a RegExp is tested.
|
|
32
|
+
*/
|
|
33
|
+
readonly optionText?: string | RegExp;
|
|
34
|
+
}
|
|
35
|
+
/** Narrows which option inside a cascader column a harness query matches. */
|
|
36
|
+
interface WrCascaderOptionHarnessFilters extends BaseHarnessFilters {
|
|
37
|
+
/** Match the option's label — a string is an exact match, a RegExp is tested. */
|
|
38
|
+
readonly text?: string | RegExp;
|
|
39
|
+
/** Match only enabled (`false`) or only disabled (`true`) options. */
|
|
40
|
+
readonly disabled?: boolean;
|
|
41
|
+
/** Match only the expanded option of its column (`true`), or only the rest (`false`). */
|
|
42
|
+
readonly active?: boolean;
|
|
43
|
+
/** Match only branches (`true`) or only leaves (`false`). */
|
|
44
|
+
readonly hasChildren?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
*
|
|
50
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
51
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Test harness for one option inside a `<wr-cascader>` column.
|
|
56
|
+
*
|
|
57
|
+
* An option is either a BRANCH (it has children, so clicking it opens the next
|
|
58
|
+
* column) or a LEAF (clicking it commits the whole path and closes the panel).
|
|
59
|
+
* {@link hasChildren} is the only way to tell them apart, and it reads the
|
|
60
|
+
* chevron the template draws for branches — the option carries no
|
|
61
|
+
* `aria-haspopup` / `aria-expanded`, so a screen-reader user is told nothing
|
|
62
|
+
* about a branch either. Reported here rather than papered over.
|
|
63
|
+
*
|
|
64
|
+
* @see https://ngwr.dev/guides/testing
|
|
65
|
+
*/
|
|
66
|
+
declare class WrCascaderOptionHarness extends ComponentHarness {
|
|
67
|
+
/** The `<li role="menuitem">` a column renders per option. */
|
|
68
|
+
static hostSelector: string;
|
|
69
|
+
/** Build a predicate that narrows the query. */
|
|
70
|
+
static with(options?: WrCascaderOptionHarnessFilters): HarnessPredicate<WrCascaderOptionHarness>;
|
|
71
|
+
/** The option's label, trimmed. The branch chevron contributes no text. */
|
|
72
|
+
getText(): Promise<string>;
|
|
73
|
+
/** The role the option announces — `menuitem`. */
|
|
74
|
+
getRole(): Promise<string | null>;
|
|
75
|
+
/** Whether the option refuses selection, from the state a screen reader is given. */
|
|
76
|
+
isDisabled(): Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Whether this is the option its column is currently drilled into — the one
|
|
79
|
+
* whose children the column to the right is showing, or the committed segment
|
|
80
|
+
* at this level.
|
|
81
|
+
*
|
|
82
|
+
* Read from the `--active` modifier because nothing else says it: the option
|
|
83
|
+
* has no `aria-selected` and no `aria-expanded`, so the class is both the
|
|
84
|
+
* whole visual answer and the only one available.
|
|
85
|
+
*/
|
|
86
|
+
isActive(): Promise<boolean>;
|
|
87
|
+
/** Whether the option opens a deeper level rather than ending the path. */
|
|
88
|
+
hasChildren(): Promise<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* The option's tab index — `0` for every enabled option, `-1` for a disabled
|
|
91
|
+
* one.
|
|
92
|
+
*
|
|
93
|
+
* Worth asking: a cascader column is NOT a roving-cursor listbox. Every
|
|
94
|
+
* enabled option is its own tab stop, in every column, which is the documented
|
|
95
|
+
* reason virtual scrolling is deferred for this component — there is no
|
|
96
|
+
* container-owned arrow-nav model to hang a window off.
|
|
97
|
+
*
|
|
98
|
+
* Read as the element's `tabIndex` PROPERTY rather than the attribute, so an
|
|
99
|
+
* option that carried no `tabindex` at all answers `-1` — what the DOM says of a
|
|
100
|
+
* bare `<li>` — instead of a made-up `0` that would report an unfocusable option
|
|
101
|
+
* as a tab stop if this component ever moved to a roving cursor.
|
|
102
|
+
*/
|
|
103
|
+
getTabIndex(): Promise<number>;
|
|
104
|
+
/**
|
|
105
|
+
* Click the option: a branch opens its children to the right, a leaf commits
|
|
106
|
+
* the path and closes the panel.
|
|
107
|
+
*
|
|
108
|
+
* A disabled option is clickable here on purpose — the component refuses it in
|
|
109
|
+
* its own handler rather than through `pointer-events`, so the click a spec
|
|
110
|
+
* dispatches is exactly as ineffective as one in a browser.
|
|
111
|
+
*/
|
|
112
|
+
click(): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Activate the option from the keyboard (Enter; Space is bound to the same
|
|
115
|
+
* handler).
|
|
116
|
+
*
|
|
117
|
+
* This is the component's entire keyboard model — the columns bind
|
|
118
|
+
* `keydown.enter` / `keydown.space` per option and nothing else, so there are
|
|
119
|
+
* no arrow keys to walk levels with. A keyboard user reaches the option they
|
|
120
|
+
* want with Tab and presses Enter — and Tab is a long way round: the panel is a
|
|
121
|
+
* portal in the overlay container at the end of the document, and nothing moves
|
|
122
|
+
* focus into it on open, so the first option is not the next stop after the
|
|
123
|
+
* trigger.
|
|
124
|
+
*/
|
|
125
|
+
selectByKeyboard(): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Move the pointer onto the option.
|
|
128
|
+
*
|
|
129
|
+
* Deliberately does NOT expand a branch: this cascader drills down on CLICK
|
|
130
|
+
* only, unlike the hover-to-expand cascaders elsewhere. Kept because a spec
|
|
131
|
+
* may want to pin that, and because the option's hover tint is styled.
|
|
132
|
+
*/
|
|
133
|
+
hover(): Promise<void>;
|
|
134
|
+
/** Move keyboard focus to the option. */
|
|
135
|
+
focus(): Promise<void>;
|
|
136
|
+
/** Whether the option holds keyboard focus. */
|
|
137
|
+
isFocused(): Promise<boolean>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @license
|
|
142
|
+
*
|
|
143
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
144
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Test harness for one COLUMN of an open `<wr-cascader>` panel.
|
|
149
|
+
*
|
|
150
|
+
* A column is a level of the tree: column 0 holds the root options, and each
|
|
151
|
+
* further column holds the children of the active option in the column before
|
|
152
|
+
* it. Which columns exist is therefore a function of what is expanded — the
|
|
153
|
+
* relationship this harness exists to let a spec assert. Column 0 is always
|
|
154
|
+
* there; a column only appears once there are children to put in it, so a leaf
|
|
155
|
+
* adds none.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* const [countries, cities] = await cascader.getColumns();
|
|
160
|
+
*
|
|
161
|
+
* expect(await countries.getActiveOptionText()).toBe('Germany');
|
|
162
|
+
* expect(await cities.getOptionLabels()).toEqual(['Berlin']);
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @see https://ngwr.dev/guides/testing
|
|
166
|
+
*/
|
|
167
|
+
declare class WrCascaderColumnHarness extends ComponentHarness {
|
|
168
|
+
/** The `<ul role="menu">` the panel renders per level. */
|
|
169
|
+
static hostSelector: string;
|
|
170
|
+
/** Build a predicate that narrows the query. */
|
|
171
|
+
static with(options?: WrCascaderColumnHarnessFilters): HarnessPredicate<WrCascaderColumnHarness>;
|
|
172
|
+
/** The role the column announces — `menu`. */
|
|
173
|
+
getRole(): Promise<string | null>;
|
|
174
|
+
/** The options this level offers, in order. */
|
|
175
|
+
getOptions(filters?: WrCascaderOptionHarnessFilters): Promise<WrCascaderOptionHarness[]>;
|
|
176
|
+
/** The labels this level offers, in order. */
|
|
177
|
+
getOptionLabels(): Promise<string[]>;
|
|
178
|
+
/**
|
|
179
|
+
* The first option matching the filters.
|
|
180
|
+
*
|
|
181
|
+
* Throws rather than answering `null`, and names what the column does offer:
|
|
182
|
+
* a missing option here almost always means the level is not the one the spec
|
|
183
|
+
* thought it was, and that is far easier to see with the alternatives listed.
|
|
184
|
+
*/
|
|
185
|
+
getOption(filters: WrCascaderOptionHarnessFilters): Promise<WrCascaderOptionHarness>;
|
|
186
|
+
/** The option this level is drilled into, or `null` when nothing here is expanded. */
|
|
187
|
+
getActiveOption(): Promise<WrCascaderOptionHarness | null>;
|
|
188
|
+
/** The label of the option this level is drilled into, or `null`. */
|
|
189
|
+
getActiveOptionText(): Promise<string | null>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @license
|
|
194
|
+
*
|
|
195
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
196
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Test harness for `<wr-cascader>` — the trigger, and the panel of COLUMNS it
|
|
201
|
+
* opens. Root of a small family: {@link WrCascaderColumnHarness} for one level,
|
|
202
|
+
* `WrCascaderOptionHarness` for one option in it.
|
|
203
|
+
*
|
|
204
|
+
* A cascader is not a select with extra steps. Its value is the whole PATH from
|
|
205
|
+
* root to leaf (`['eu', 'de', 'ber']`, not `'ber'`), and the panel shows one
|
|
206
|
+
* column per level, so which columns exist depends on what is expanded — column
|
|
207
|
+
* 0 is the roots, and every further column holds the children of the active
|
|
208
|
+
* option in the column to its left. That relationship is the component, so it is
|
|
209
|
+
* what {@link getColumns} and {@link getColumnLabels} are for.
|
|
210
|
+
*
|
|
211
|
+
* The panel is NOT inside the cascader: it is a template portal in the overlay
|
|
212
|
+
* container, a sibling of the whole app. Every read of it goes through the
|
|
213
|
+
* document root scoped by the `aria-controls` id the trigger publishes, so two
|
|
214
|
+
* cascaders on one page can never answer with each other's columns.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* const cascader = await loader.getHarness(WrCascaderHarness);
|
|
219
|
+
*
|
|
220
|
+
* await cascader.selectPath(['Europe', 'Germany', 'Berlin']);
|
|
221
|
+
*
|
|
222
|
+
* expect(await cascader.getValueText()).toBe('Europe / Germany / Berlin');
|
|
223
|
+
* expect(await cascader.isOpen()).toBe(false);
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @see https://ngwr.dev/guides/testing
|
|
227
|
+
*/
|
|
228
|
+
declare class WrCascaderHarness extends ComponentHarness {
|
|
229
|
+
static hostSelector: string;
|
|
230
|
+
/** Build a predicate that narrows the query. */
|
|
231
|
+
static with(options?: WrCascaderHarnessFilters): HarnessPredicate<WrCascaderHarness>;
|
|
232
|
+
private readonly trigger;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the panel is showing.
|
|
235
|
+
*
|
|
236
|
+
* From the trigger's `aria-expanded` rather than the host's `--open` class:
|
|
237
|
+
* both exist, and the ARIA state is the one a screen-reader user is told.
|
|
238
|
+
*/
|
|
239
|
+
isOpen(): Promise<boolean>;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the cascader refuses interaction.
|
|
242
|
+
*
|
|
243
|
+
* From the trigger's native `disabled`, which is what actually stops a pointer
|
|
244
|
+
* and what assistive tech reports; the host's `--disabled` class only mirrors
|
|
245
|
+
* it for styling.
|
|
246
|
+
*/
|
|
247
|
+
isDisabled(): Promise<boolean>;
|
|
248
|
+
/**
|
|
249
|
+
* What the trigger displays as the selection: the labels of the whole path
|
|
250
|
+
* joined by the `separator` (`'Europe / Germany / Berlin'` by default), or `''`
|
|
251
|
+
* while nothing is selected and the placeholder is showing.
|
|
252
|
+
*
|
|
253
|
+
* The joined string is all the DOM has — the separator is not published
|
|
254
|
+
* anywhere on its own, so the harness will not pretend it can split the path
|
|
255
|
+
* back apart. Assert against the bound value, or against
|
|
256
|
+
* {@link getActiveTrail} while the panel is open, when the segments matter.
|
|
257
|
+
*/
|
|
258
|
+
getValueText(): Promise<string>;
|
|
259
|
+
/**
|
|
260
|
+
* The placeholder, or `null` when a selection is hiding it.
|
|
261
|
+
*
|
|
262
|
+
* `''` is a real answer, not an absence: a cascader with no `placeholder` still
|
|
263
|
+
* renders the element while unselected.
|
|
264
|
+
*/
|
|
265
|
+
getPlaceholder(): Promise<string | null>;
|
|
266
|
+
/**
|
|
267
|
+
* The trigger's accessible name — the `ariaLabel` input, falling back to the
|
|
268
|
+
* placeholder and then to the i18n catalog, because a `role="combobox"` with
|
|
269
|
+
* nothing selected and no placeholder would otherwise have no name at all.
|
|
270
|
+
*/
|
|
271
|
+
getAccessibleName(): Promise<string | null>;
|
|
272
|
+
/** The kind of popup the trigger promises via `aria-haspopup` — `menu`. */
|
|
273
|
+
getPopupRole(): Promise<string | null>;
|
|
274
|
+
/** The role the panel announces — `menu`, matching what the trigger promised. */
|
|
275
|
+
getPanelRole(): Promise<string | null>;
|
|
276
|
+
/**
|
|
277
|
+
* The id the trigger publishes as `aria-controls`.
|
|
278
|
+
*
|
|
279
|
+
* Published unconditionally, open or closed — so while the panel is closed this
|
|
280
|
+
* id resolves to nothing in the document. Exposed so a spec can pin that
|
|
281
|
+
* (dangling or not) rather than have the harness quietly decide for it; every
|
|
282
|
+
* panel read goes through the same id but refuses to run while closed.
|
|
283
|
+
*/
|
|
284
|
+
getPanelId(): Promise<string | null>;
|
|
285
|
+
/**
|
|
286
|
+
* Whether the panel now in the overlay is the one this trigger claims to
|
|
287
|
+
* control — `aria-controls` resolving to a real element that carries that id.
|
|
288
|
+
*
|
|
289
|
+
* With several cascaders on a page it is also the check that the reference lands
|
|
290
|
+
* on THIS instance's panel rather than a neighbour's: the overlay container is
|
|
291
|
+
* shared, so panels sit side by side in it with nothing but their ids to tell
|
|
292
|
+
* them apart.
|
|
293
|
+
*/
|
|
294
|
+
isPanelWiredToTrigger(): Promise<boolean>;
|
|
295
|
+
/**
|
|
296
|
+
* Open the panel.
|
|
297
|
+
*
|
|
298
|
+
* Clicks the trigger, because that is the only gesture the component binds. The
|
|
299
|
+
* trigger is a native `<button>`, so a browser turns Enter / Space on it into
|
|
300
|
+
* the same click — there is no separate keyboard route to model here, and jsdom
|
|
301
|
+
* does not synthesise button activation from a key, so an `openByKeyboard()`
|
|
302
|
+
* would only be able to lie.
|
|
303
|
+
*/
|
|
304
|
+
open(): Promise<void>;
|
|
305
|
+
/**
|
|
306
|
+
* Close the panel with Escape. A closed cascader is left alone.
|
|
307
|
+
*
|
|
308
|
+
* Escape reaches the panel through the CDK's keyboard dispatcher rather than
|
|
309
|
+
* through the DOM tree, which is why sending it to the trigger works even
|
|
310
|
+
* though the panel is somewhere else entirely.
|
|
311
|
+
*/
|
|
312
|
+
close(): Promise<void>;
|
|
313
|
+
/** Click the trigger once, whatever that does — opens a closed panel, closes an open one. */
|
|
314
|
+
clickTrigger(): Promise<void>;
|
|
315
|
+
/**
|
|
316
|
+
* The columns of the open panel, left to right: column 0 is the root options,
|
|
317
|
+
* and each further one holds the children of its neighbour's active option.
|
|
318
|
+
*
|
|
319
|
+
* Throws while the panel is closed. The columns do not exist anywhere until the
|
|
320
|
+
* portal is attached, and an empty array reads like a panel that rendered
|
|
321
|
+
* nothing — a confusing failure three lines later instead of here.
|
|
322
|
+
*/
|
|
323
|
+
getColumns(filters?: WrCascaderColumnHarnessFilters): Promise<WrCascaderColumnHarness[]>;
|
|
324
|
+
/** How many levels the panel is currently showing. */
|
|
325
|
+
getColumnCount(): Promise<number>;
|
|
326
|
+
/**
|
|
327
|
+
* One column by its 0-based level. Throws when the level is not showing, which
|
|
328
|
+
* is the interesting failure: it means the option before it has no children, or
|
|
329
|
+
* has not been expanded yet.
|
|
330
|
+
*/
|
|
331
|
+
getColumn(index: number): Promise<WrCascaderColumnHarness>;
|
|
332
|
+
/** The labels offered by every column, outer array left to right. */
|
|
333
|
+
getColumnLabels(): Promise<string[][]>;
|
|
334
|
+
/**
|
|
335
|
+
* The expanded trail — the label of the active option in each column, root
|
|
336
|
+
* first.
|
|
337
|
+
*
|
|
338
|
+
* This is the panel's own idea of where the user is, which is NOT always the
|
|
339
|
+
* committed value: drilling into a branch moves the trail without committing
|
|
340
|
+
* anything unless `changeOnSelect` is on. Once a leaf is picked the two agree,
|
|
341
|
+
* and this is the only place the path's segments exist separately in the DOM.
|
|
342
|
+
*/
|
|
343
|
+
getActiveTrail(): Promise<string[]>;
|
|
344
|
+
/**
|
|
345
|
+
* The first option matching the filters, anywhere in the panel. Throws when
|
|
346
|
+
* nothing matches, naming what is on offer.
|
|
347
|
+
*
|
|
348
|
+
* Use {@link getColumn} when the level matters — the same label can legitimately
|
|
349
|
+
* appear at more than one level.
|
|
350
|
+
*/
|
|
351
|
+
getOption(filters: WrCascaderOptionHarnessFilters): Promise<WrCascaderOptionHarness>;
|
|
352
|
+
/**
|
|
353
|
+
* Walk a path by label, opening the panel first if needed: each label is
|
|
354
|
+
* clicked in the column it belongs to, so `['Europe', 'Germany', 'Berlin']`
|
|
355
|
+
* drills two levels and commits the third.
|
|
356
|
+
*
|
|
357
|
+
* Clicking is the only way down — this cascader does not expand on hover, so
|
|
358
|
+
* neither does the harness. A path that ends on a BRANCH just leaves that
|
|
359
|
+
* branch expanded: the component commits nothing on the way down unless
|
|
360
|
+
* `changeOnSelect` is on, and only a leaf closes the panel.
|
|
361
|
+
*/
|
|
362
|
+
selectPath(labels: readonly string[]): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* Click the clear (×) control on the trigger.
|
|
365
|
+
*
|
|
366
|
+
* Throws when there is none, and both reasons are worth failing on: the
|
|
367
|
+
* cascader is not `clearable`, or nothing is selected — the control is not
|
|
368
|
+
* rendered at all in either case (nor while disabled).
|
|
369
|
+
*/
|
|
370
|
+
clear(): Promise<void>;
|
|
371
|
+
/** Move keyboard focus to the trigger. */
|
|
372
|
+
focus(): Promise<void>;
|
|
373
|
+
/** Take focus off the trigger, which is what makes a bound form field touched. */
|
|
374
|
+
blur(): Promise<void>;
|
|
375
|
+
/** Whether the trigger holds keyboard focus. */
|
|
376
|
+
isFocused(): Promise<boolean>;
|
|
377
|
+
/** This cascader's panel element in the overlay — the single-element scoped read. */
|
|
378
|
+
private panel;
|
|
379
|
+
/**
|
|
380
|
+
* A loader scoped to THIS cascader's panel — the list scoped read.
|
|
381
|
+
*
|
|
382
|
+
* Scoped by the published id rather than by `.wr-cascader-panel`: the overlay
|
|
383
|
+
* container is shared with every other overlay in the app, so a bare class
|
|
384
|
+
* query would answer with whichever panel happened to be open.
|
|
385
|
+
*/
|
|
386
|
+
private panelLoader;
|
|
387
|
+
/** The panel id, refusing to hand it out while there is no panel to find. */
|
|
388
|
+
private panelId;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export { WrCascaderColumnHarness, WrCascaderHarness, WrCascaderOptionHarness };
|
|
392
|
+
export type { WrCascaderColumnHarnessFilters, WrCascaderHarnessFilters, WrCascaderOptionHarnessFilters };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
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
|
+
/** Narrows which `<wr-checkbox>` a harness query matches. */
|
|
11
|
+
interface WrCheckboxHarnessFilters extends BaseHarnessFilters {
|
|
12
|
+
/** Match the projected label — a string is an exact match, a RegExp is tested. */
|
|
13
|
+
readonly label?: string | RegExp;
|
|
14
|
+
/** Match only ticked (`true`) or only unticked (`false`) boxes. */
|
|
15
|
+
readonly checked?: boolean;
|
|
16
|
+
/** Match only enabled (`false`) or only disabled (`true`) boxes. */
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @license
|
|
22
|
+
*
|
|
23
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
24
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Test harness for `<wr-checkbox>`.
|
|
29
|
+
*
|
|
30
|
+
* The visible box is a `<span>` the stylesheet paints; the state lives on a real
|
|
31
|
+
* `<input type="checkbox">` inside the label, and that is what this harness reads
|
|
32
|
+
* and clicks. Toggling through the input rather than the painted box is what makes
|
|
33
|
+
* `check()` behave the way a user does — the label is what a click lands on.
|
|
34
|
+
*
|
|
35
|
+
* Note `checkboxValue` versus `value`: a checkbox's group identity is
|
|
36
|
+
* `checkboxValue`, because `FormCheckboxControl` reserves `value` for the form
|
|
37
|
+
* value. {@link getCheckboxValue} reads the identity.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const terms = await loader.getHarness(WrCheckboxHarness.with({ label: 'I agree' }));
|
|
42
|
+
* await terms.check();
|
|
43
|
+
* expect(await terms.isChecked()).toBe(true);
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @see https://ngwr.dev/guides/testing
|
|
47
|
+
*/
|
|
48
|
+
declare class WrCheckboxHarness extends ComponentHarness {
|
|
49
|
+
static hostSelector: string;
|
|
50
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
51
|
+
static with(options?: WrCheckboxHarnessFilters): HarnessPredicate<WrCheckboxHarness>;
|
|
52
|
+
private readonly input;
|
|
53
|
+
/** The projected label text, trimmed. */
|
|
54
|
+
getLabel(): Promise<string>;
|
|
55
|
+
isChecked(): Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the box is in its third state.
|
|
58
|
+
*
|
|
59
|
+
* `indeterminate` is a DOM PROPERTY, not an attribute — reading the attribute
|
|
60
|
+
* would report `null` for a box that is visibly dashed.
|
|
61
|
+
*/
|
|
62
|
+
isIndeterminate(): Promise<boolean>;
|
|
63
|
+
isDisabled(): Promise<boolean>;
|
|
64
|
+
/** The group identity — `checkboxValue`, not the form value. */
|
|
65
|
+
getCheckboxValue(): Promise<string | null>;
|
|
66
|
+
/** Flip the box. A disabled checkbox does not move; assert rather than assume. */
|
|
67
|
+
toggle(): Promise<void>;
|
|
68
|
+
/** Tick the box if it is not already ticked. */
|
|
69
|
+
check(): Promise<void>;
|
|
70
|
+
/** Untick the box if it is ticked. */
|
|
71
|
+
uncheck(): Promise<void>;
|
|
72
|
+
focus(): Promise<void>;
|
|
73
|
+
isFocused(): Promise<boolean>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { WrCheckboxHarness };
|
|
77
|
+
export type { WrCheckboxHarnessFilters };
|
package/types/ngwr-checkbox.d.ts
CHANGED
|
@@ -70,8 +70,13 @@ declare class WrCheckbox implements FormCheckboxControl {
|
|
|
70
70
|
* @default false
|
|
71
71
|
*/
|
|
72
72
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
73
|
-
/**
|
|
74
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Control size — shares the `--wr-control-*` contract. Unset falls back to the
|
|
75
|
+
* `checkbox.size` app default from `provideWrConfig()`. @default 'md'
|
|
76
|
+
*/
|
|
77
|
+
readonly size: _angular_core.InputSignal<WrCheckboxSize | null>;
|
|
78
|
+
/** `size`, then the app config, then `md`. @internal */
|
|
79
|
+
protected readonly resolvedSize: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
75
80
|
/**
|
|
76
81
|
* Optional icon name rendered inside the box when checked, in place of the
|
|
77
82
|
* default checkmark. Use any registered NGWR icon.
|