ngwr 10.2.1 → 11.0.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/anchor/styles/_index.scss +4 -4
- package/back-top/styles/_index.scss +6 -1
- package/blur-text/styles/_index.scss +13 -0
- package/button/styles/_index.scss +11 -6
- package/carousel/styles/_index.scss +13 -2
- package/cascader/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +2 -0
- package/collapse/styles/_index.scss +1 -1
- package/color-picker/styles/_index.scss +6 -1
- package/compare/styles/_index.scss +1 -2
- package/context-menu/styles/_index.scss +6 -1
- 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/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/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/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +29 -9
- 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 +1 -1
- package/styles/_grid.scss +4 -4
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +5 -3
- package/table/styles/_index.scss +22 -11
- package/tabs/styles/_index.scss +11 -1
- package/textarea/styles/_index.scss +5 -0
- package/theme/styles/_colors.scss +29 -13
- package/theme/styles/_dark.scss +11 -3
- 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 +5 -3
- 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,291 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { WrPaginationSize } from 'ngwr/pagination';
|
|
3
|
+
import { WrSelectHarness } from 'ngwr/select/testing';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Narrows which `<wr-pagination>` a harness query matches. */
|
|
13
|
+
interface WrPaginationHarnessFilters extends BaseHarnessFilters {
|
|
14
|
+
/**
|
|
15
|
+
* Match the `role="navigation"` landmark's accessible name — the `label` input,
|
|
16
|
+
* the `pagination.label` catalog entry, or the built-in fallback. A string is an
|
|
17
|
+
* exact match, a RegExp is tested. This is how two pagers on one page are told
|
|
18
|
+
* apart, which is also why each of them should be named.
|
|
19
|
+
*/
|
|
20
|
+
readonly label?: string | RegExp;
|
|
21
|
+
/**
|
|
22
|
+
* Match the page the pager announces as current via `aria-current="page"`. A
|
|
23
|
+
* pager announcing none — `currentPage` set below 1 — matches no value here
|
|
24
|
+
* rather than throwing, so one broken pager cannot fail a query for its
|
|
25
|
+
* neighbour.
|
|
26
|
+
*/
|
|
27
|
+
readonly currentPage?: number;
|
|
28
|
+
/** Match only enabled (`false`) or only disabled (`true`) pagers. */
|
|
29
|
+
readonly disabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
*
|
|
35
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
36
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Test harness for `<wr-pagination>` — the numbered strip, its two step controls,
|
|
41
|
+
* the total label and the page-size changer.
|
|
42
|
+
*
|
|
43
|
+
* The strip is not the page list: it is a WINDOW over it, at most seven pages wide,
|
|
44
|
+
* with an `…` standing in for every page it skipped. So "which pages can I click"
|
|
45
|
+
* and "how many pages are there" are different questions and this harness keeps
|
|
46
|
+
* them apart —
|
|
47
|
+
* {@link getPages} answers the first, {@link getTotalPages} the second, and
|
|
48
|
+
* {@link getStrip} shows the gaps for what they are. A gap is a `<span>`, not a
|
|
49
|
+
* control; counting the strip's children as pages is the mistake this API exists to
|
|
50
|
+
* make impossible.
|
|
51
|
+
*
|
|
52
|
+
* **Which page is current has two answers, and this reads the ARIA one.** The
|
|
53
|
+
* current cell is also PAINTED — the template binds
|
|
54
|
+
* `[color]="isCurrent(page) ? 'primary' : null"`, so `.wr-btn--primary` sits on it
|
|
55
|
+
* too. But colour is a theming decision (`ngwr/config` names this very binding as
|
|
56
|
+
* the reason it ships no app-wide `color` default), while `aria-current="page"` is
|
|
57
|
+
* the navigation contract: it is what a screen-reader user hears, what the
|
|
58
|
+
* component's own spec pins, and the only one of the two that still means
|
|
59
|
+
* "you are here" after a restyle. A harness that read the class would be reporting
|
|
60
|
+
* on the paint.
|
|
61
|
+
*
|
|
62
|
+
* **No roving tab stop to disambiguate.** Every cell is a `<wr-btn>` ELEMENT with
|
|
63
|
+
* its own tab stop (`tabindex="0"`, dropped only while the control is off), so the
|
|
64
|
+
* pager has no separate "focused" item that could drift from the current page —
|
|
65
|
+
* unlike a tab strip or a radio group, there is one active state here and
|
|
66
|
+
* {@link getCurrentPage} is it.
|
|
67
|
+
*
|
|
68
|
+
* Composed rather than re-queried: the cells and step controls are driven through
|
|
69
|
+
* {@link WrButtonHarness}, which already knows how a `<wr-btn>` says it is off —
|
|
70
|
+
* both the `disabled` attribute (written on every shape, though inert on a custom
|
|
71
|
+
* element) and `aria-disabled`, in that order — and the size changer through
|
|
72
|
+
* {@link WrSelectHarness}, whose panel is a portal in the overlay container and
|
|
73
|
+
* nowhere inside the pager.
|
|
74
|
+
*
|
|
75
|
+
* jsdom notes: every method here is a class / attribute read or a no-arg click, so
|
|
76
|
+
* none of it needs layout. Two things are therefore invisible in a unit test and
|
|
77
|
+
* deliberately absent from this API — the responsive collapse, which is a container
|
|
78
|
+
* query ({@link isResponsive} reports only that it is ALLOWED), and the compact
|
|
79
|
+
* `‹ 3 / 10 ›` pager it swaps in, which is `aria-hidden` decoration duplicating
|
|
80
|
+
* {@link getCurrentPage} and {@link getTotalPages} and which a real browser would
|
|
81
|
+
* read as empty text while CSS keeps it hidden.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const pager = await loader.getHarness(WrPaginationHarness);
|
|
86
|
+
*
|
|
87
|
+
* expect(await pager.getPages()).toEqual([1, 2, 3, 4, 5, 10]);
|
|
88
|
+
* await pager.goToPage(3);
|
|
89
|
+
* expect(await pager.getCurrentPage()).toBe(3);
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @see https://ngwr.dev/guides/testing
|
|
93
|
+
*/
|
|
94
|
+
declare class WrPaginationHarness extends ComponentHarness {
|
|
95
|
+
static hostSelector: string;
|
|
96
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
97
|
+
static with(options?: WrPaginationHarnessFilters): HarnessPredicate<WrPaginationHarness>;
|
|
98
|
+
/** The numbered cells, in DOM order — ascending, and never a gap. */
|
|
99
|
+
private readonly pageCells;
|
|
100
|
+
/**
|
|
101
|
+
* The two controls bracketing the strip: previous, then next.
|
|
102
|
+
*
|
|
103
|
+
* Located by POSITION, not by their labels. `prevLabel` / `nextLabel` are inputs
|
|
104
|
+
* and both fall back to the `pagination.prev` / `pagination.next` catalog entries,
|
|
105
|
+
* so an English `aria-label` match works right up until someone ships a locale —
|
|
106
|
+
* whereas the nav's shape (one step control, the strip, one step control) is
|
|
107
|
+
* structural. `:not(.wr-pagination__page)` is what keeps the cells out of it.
|
|
108
|
+
*/
|
|
109
|
+
private readonly stepControls;
|
|
110
|
+
/** Both kinds of strip slot, in DOM order — cells and the gaps between them. */
|
|
111
|
+
private readonly stripSlots;
|
|
112
|
+
private readonly totalLabel;
|
|
113
|
+
private readonly sizeChanger;
|
|
114
|
+
/**
|
|
115
|
+
* The accessible name of the `role="navigation"` landmark.
|
|
116
|
+
*
|
|
117
|
+
* `''` only if the landmark lost its name, which is a bug rather than a state: a
|
|
118
|
+
* page with two unnamed pagers gives a screen-reader user two identical
|
|
119
|
+
* "navigation" landmarks.
|
|
120
|
+
*/
|
|
121
|
+
getLabel(): Promise<string>;
|
|
122
|
+
/**
|
|
123
|
+
* The size the pager RENDERS at, from its host modifier.
|
|
124
|
+
*
|
|
125
|
+
* The modifier is always emitted — `sm` included — so the fall-through below is
|
|
126
|
+
* only ever reached for the default, and a size the strip is not wearing cannot
|
|
127
|
+
* come back from here.
|
|
128
|
+
*
|
|
129
|
+
* The STRIP resolves nothing through `provideWrConfig()`, which is worth knowing
|
|
130
|
+
* before an app-wide default is blamed for a cell size: the pager passes its own
|
|
131
|
+
* `size` down to every `<wr-btn>` explicitly, so a configured `button.size` never
|
|
132
|
+
* reaches a cell. The page-size changer is the exception and not covered by this
|
|
133
|
+
* value — it is a bare `<wr-select>`, so `provideWrConfig({ select: … })` does
|
|
134
|
+
* reach it.
|
|
135
|
+
*/
|
|
136
|
+
getSize(): Promise<WrPaginationSize>;
|
|
137
|
+
/**
|
|
138
|
+
* Whether the pager is ALLOWED to collapse into its compact pager.
|
|
139
|
+
*
|
|
140
|
+
* Whether it HAS collapsed is a container query on the control's own box, and a
|
|
141
|
+
* unit test has no layout for one to answer — assert this input in jsdom and the
|
|
142
|
+
* reflow itself in a real browser.
|
|
143
|
+
*/
|
|
144
|
+
isResponsive(): Promise<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Whether the whole control refuses interaction.
|
|
147
|
+
*
|
|
148
|
+
* Read from the host modifier, because a `role="navigation"` landmark has no ARIA
|
|
149
|
+
* disabled state to prefer — the per-control answer lives on the buttons
|
|
150
|
+
* themselves (`disabled` plus `aria-disabled` on each), which is what
|
|
151
|
+
* {@link isPreviousDisabled} and {@link isNextDisabled} read.
|
|
152
|
+
*/
|
|
153
|
+
isDisabled(): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* The whole strip in DOM order: a `number` for every page cell, and the gap
|
|
156
|
+
* marker's own text (`…`) for every ellipsis.
|
|
157
|
+
*
|
|
158
|
+
* The marker is read from the DOM rather than compared against a literal, so a
|
|
159
|
+
* component that changes what it draws in a gap changes this too instead of
|
|
160
|
+
* quietly reporting a page.
|
|
161
|
+
*/
|
|
162
|
+
getStrip(): Promise<(number | string)[]>;
|
|
163
|
+
/**
|
|
164
|
+
* The pages that can be clicked right now, ascending. Gaps are not pages and are
|
|
165
|
+
* not here — `[1, 8, 9, 10, 11, 12, 20]` for a twenty-page list sitting on 10.
|
|
166
|
+
*/
|
|
167
|
+
getPages(): Promise<number[]>;
|
|
168
|
+
/**
|
|
169
|
+
* How many pages there are — not how many are on the strip.
|
|
170
|
+
*
|
|
171
|
+
* Taken from the LAST cell, which the window always pins to the final page (the
|
|
172
|
+
* first is pinned the same way), so this survives the gap that usually precedes
|
|
173
|
+
* it. Deliberately not read from the compact `3 / 10` pager: that span is
|
|
174
|
+
* `aria-hidden` and CSS-hidden outside responsive mode, so a browser-based
|
|
175
|
+
* harness environment would read it as empty.
|
|
176
|
+
*/
|
|
177
|
+
getTotalPages(): Promise<number>;
|
|
178
|
+
/**
|
|
179
|
+
* The page the pager announces as current, from `aria-current="page"`.
|
|
180
|
+
*
|
|
181
|
+
* Throws when no cell claims it. The window always keeps the current page on the
|
|
182
|
+
* strip, so getting here means `currentPage` is not one of the pages at all — it
|
|
183
|
+
* is below 1, or not a whole number. The component clamps a page ABOVE the last
|
|
184
|
+
* one and nothing else, and either survivor leaves every cell looking equally
|
|
185
|
+
* inactive to an assistive tech user.
|
|
186
|
+
*/
|
|
187
|
+
getCurrentPage(): Promise<number>;
|
|
188
|
+
/**
|
|
189
|
+
* Click the cell for a page.
|
|
190
|
+
*
|
|
191
|
+
* Throws when that page is not on the strip — a seven-slot window over twenty
|
|
192
|
+
* pages simply has no cell for page 15, and a silent no-op there reads as
|
|
193
|
+
* "navigation is broken" three assertions later. Step with {@link next} /
|
|
194
|
+
* {@link previous}, or move the host's own `currentPage` model.
|
|
195
|
+
*
|
|
196
|
+
* A disabled pager is still clicked; the component's own guard is what refuses
|
|
197
|
+
* the move, so assert the page rather than assume it. Clicking the CURRENT page
|
|
198
|
+
* is a no-op by the same guard.
|
|
199
|
+
*/
|
|
200
|
+
goToPage(page: number): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Jump to page 1.
|
|
203
|
+
*
|
|
204
|
+
* There is no dedicated first / last control in this component; the window pins
|
|
205
|
+
* the first and last page to the ends of the strip instead, so these two click
|
|
206
|
+
* cells like any other page.
|
|
207
|
+
*/
|
|
208
|
+
goToFirst(): Promise<void>;
|
|
209
|
+
/** Jump to the last page — the trailing cell, not the last one before a gap. */
|
|
210
|
+
goToLast(): Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* Click the next-page control.
|
|
213
|
+
*
|
|
214
|
+
* Disabled on the last page, and a disabled `<wr-btn>` is still clicked here (see
|
|
215
|
+
* {@link goToPage}) — {@link isNextDisabled} is the question, this is the action.
|
|
216
|
+
*/
|
|
217
|
+
next(): Promise<void>;
|
|
218
|
+
/** Click the previous-page control. Disabled on the first page. */
|
|
219
|
+
previous(): Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* Whether the next-page control refuses the move — true on the last page, and
|
|
222
|
+
* true for every control while the pager is disabled.
|
|
223
|
+
*
|
|
224
|
+
* Answered by {@link WrButtonHarness}, which reads the `disabled` attribute first
|
|
225
|
+
* and `aria-disabled` second. A `<wr-btn>` element carries both: the attribute is
|
|
226
|
+
* inert on anything but a real `<button>`, which is why the component adds the
|
|
227
|
+
* ARIA state as well — so this is the accessible answer whichever branch supplies
|
|
228
|
+
* it.
|
|
229
|
+
*/
|
|
230
|
+
isNextDisabled(): Promise<boolean>;
|
|
231
|
+
/** Whether the previous-page control refuses the move — true on the first page. */
|
|
232
|
+
isPreviousDisabled(): Promise<boolean>;
|
|
233
|
+
/** Whether the pager shows its "X–Y of Z" label (the `showTotal` input). */
|
|
234
|
+
hasTotal(): Promise<boolean>;
|
|
235
|
+
/**
|
|
236
|
+
* The total label exactly as rendered, e.g. `1-10 of 95`.
|
|
237
|
+
*
|
|
238
|
+
* Both halves are localizable — the word between range and total comes from
|
|
239
|
+
* `ofLabel` or the `pagination.of` catalog entry — so a spec asserting the whole
|
|
240
|
+
* string should own the copy it asserts.
|
|
241
|
+
*
|
|
242
|
+
* Throws when the label is not rendered, which is a `showTotal` that was never
|
|
243
|
+
* set rather than a total of zero (a zero total still renders `0-0 of 0`).
|
|
244
|
+
*/
|
|
245
|
+
getTotalText(): Promise<string>;
|
|
246
|
+
/** Whether the pager renders its page-size changer (the `showSizeChanger` input). */
|
|
247
|
+
hasPageSizeChanger(): Promise<boolean>;
|
|
248
|
+
/**
|
|
249
|
+
* The page-size changer as a {@link WrSelectHarness} — for anything this harness
|
|
250
|
+
* does not wrap: the offered labels, the open state, keyboard driving.
|
|
251
|
+
*
|
|
252
|
+
* Composed rather than re-queried on purpose: the changer is a real
|
|
253
|
+
* `<wr-select>`, its options live in the overlay container rather than inside the
|
|
254
|
+
* pager, and the select harness is the thing that already knows how to scope them
|
|
255
|
+
* to their own trigger.
|
|
256
|
+
*
|
|
257
|
+
* Throws when there is no changer — an `undefined` here would turn into a
|
|
258
|
+
* confusing failure inside a select call.
|
|
259
|
+
*/
|
|
260
|
+
getPageSizeSelect(): Promise<WrSelectHarness>;
|
|
261
|
+
/**
|
|
262
|
+
* The page size currently in effect.
|
|
263
|
+
*
|
|
264
|
+
* The changer's trigger is the only place the size reaches the DOM, so this reads
|
|
265
|
+
* it there and takes the digits: the label is localizable (`pagination.perPage`,
|
|
266
|
+
* `{{size}} / page`) but interpolates the number in every language — unless a
|
|
267
|
+
* catalog entry drops the placeholder, which is the second throw below.
|
|
268
|
+
*
|
|
269
|
+
* Throws when there is no changer at all: a pager without one says nothing on
|
|
270
|
+
* screen about its page size, and the host's own model is where to assert it.
|
|
271
|
+
*/
|
|
272
|
+
getPageSize(): Promise<number>;
|
|
273
|
+
/**
|
|
274
|
+
* Pick a page size through the changer, the way a user does.
|
|
275
|
+
*
|
|
276
|
+
* Matched on the digits rather than the whole label, for the same reason
|
|
277
|
+
* {@link getPageSize} reads them: `20 / page` and `20 / стр.` are the same option.
|
|
278
|
+
* Throws when no option offers that size, naming what is on offer.
|
|
279
|
+
*
|
|
280
|
+
* Changing the size can move the page — the component pulls `currentPage` back
|
|
281
|
+
* when the new size leaves it past the end — so re-read {@link getCurrentPage}
|
|
282
|
+
* afterwards rather than assuming it held.
|
|
283
|
+
*/
|
|
284
|
+
setPageSize(size: number): Promise<void>;
|
|
285
|
+
/** The current page, or `null` when no cell announces one. @see getCurrentPage */
|
|
286
|
+
private currentPageOrNull;
|
|
287
|
+
private stepControl;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export { WrPaginationHarness };
|
|
291
|
+
export type { WrPaginationHarnessFilters };
|
|
@@ -128,6 +128,7 @@ declare class WrPagination {
|
|
|
128
128
|
* untyped and is narrowed here. It used to arrive as `any` through
|
|
129
129
|
* `[ngModel]`, which hid the coercion rather than removing the need for it.
|
|
130
130
|
*/
|
|
131
|
+
constructor();
|
|
131
132
|
protected onSizeChange(size: unknown): void;
|
|
132
133
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPagination, never>;
|
|
133
134
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPagination, "wr-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showSizeChanger": { "alias": "showSizeChanger"; "required": false; "isSignal": true; }; "showTotal": { "alias": "showTotal"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ofLabel": { "alias": "ofLabel"; "required": false; "isSignal": true; }; "prevLabel": { "alias": "prevLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "pageSize": "pageSizeChange"; }, never, never, true, never>;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, HarnessPredicate, HarnessLoader } from '@angular/cdk/testing';
|
|
2
|
+
import { WrPopconfirmPosition } from 'ngwr/popconfirm';
|
|
3
|
+
import { WrColor } from 'ngwr/theme';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Narrows which `[wrPopconfirm]` trigger a harness query matches. */
|
|
13
|
+
interface WrPopconfirmHarnessFilters extends BaseHarnessFilters {
|
|
14
|
+
/**
|
|
15
|
+
* Match the trigger's own visible text — the label of the button the directive
|
|
16
|
+
* sits on, not the question in the panel. A string is an exact match, a RegExp
|
|
17
|
+
* is tested.
|
|
18
|
+
*/
|
|
19
|
+
readonly triggerText?: string | RegExp;
|
|
20
|
+
/** Match only open (`true`) or only closed (`false`) popconfirms. */
|
|
21
|
+
readonly open?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
*
|
|
27
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
28
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Test harness for `[wrPopconfirm]` — the "are you sure?" dialog anchored to its
|
|
33
|
+
* trigger.
|
|
34
|
+
*
|
|
35
|
+
* The panel is NOT inside the trigger: it is a component portal in the overlay
|
|
36
|
+
* container, a sibling of the whole app. So everything about it is reached
|
|
37
|
+
* through the document root, scoped by the `aria-controls` id the trigger
|
|
38
|
+
* publishes while the dialog is showing — which is what keeps two popconfirms
|
|
39
|
+
* from reading each other's question, and why every panel reader throws while the
|
|
40
|
+
* dialog is shut: there is no element to answer about.
|
|
41
|
+
*
|
|
42
|
+
* **The two actions are told apart by their own modifiers**, never by position.
|
|
43
|
+
* `.wr-popconfirm__action--cancel` and `--confirm` are what `cancel()` and
|
|
44
|
+
* `confirm()` click, so a template that ever reorders the pair cannot silently
|
|
45
|
+
* turn a spec's "cancel" into a delete.
|
|
46
|
+
*
|
|
47
|
+
* Being a CONTENT CONTAINER means a consumer's own harnesses resolve INSIDE this
|
|
48
|
+
* instance's panel — `popconfirm.getHarness(WrButtonHarness…)` reaches the
|
|
49
|
+
* buttons without the spec ever naming the overlay.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const loader = TestbedHarnessEnvironment.loader(fixture);
|
|
54
|
+
* const remove = await loader.getHarness(WrPopconfirmHarness.with({ triggerText: 'Delete' }));
|
|
55
|
+
*
|
|
56
|
+
* await remove.open();
|
|
57
|
+
* expect(await remove.getMessage()).toBe('Delete this item?');
|
|
58
|
+
* await remove.confirm();
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @see https://ngwr.dev/guides/testing
|
|
62
|
+
*/
|
|
63
|
+
declare class WrPopconfirmHarness extends ContentContainerComponentHarness {
|
|
64
|
+
/**
|
|
65
|
+
* The directive's host — whatever element the consumer put `[wrPopconfirm]` on.
|
|
66
|
+
*
|
|
67
|
+
* Matched by the marker class, not by `[wrPopconfirm]`: the question is normally
|
|
68
|
+
* BOUND (`[wrPopconfirm]="question"`), and a property binding leaves no
|
|
69
|
+
* attribute in the DOM at all. Same shape as `.wr-popover-trigger` and
|
|
70
|
+
* `.wr-dropdown-trigger`.
|
|
71
|
+
*/
|
|
72
|
+
static hostSelector: string;
|
|
73
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
74
|
+
static with(options?: WrPopconfirmHarnessFilters): HarnessPredicate<WrPopconfirmHarness>;
|
|
75
|
+
/** The trigger's own visible label. The question inside the panel is `getMessage()`. */
|
|
76
|
+
getTriggerText(): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the dialog is showing.
|
|
79
|
+
*
|
|
80
|
+
* Read from `aria-expanded` rather than from a class, because that is the whole
|
|
81
|
+
* of what the trigger tells a screen reader — the directive puts no state class
|
|
82
|
+
* on its host at all.
|
|
83
|
+
*/
|
|
84
|
+
isOpen(): Promise<boolean>;
|
|
85
|
+
/** Whether the trigger currently has keyboard focus — the state it is handed back on close. */
|
|
86
|
+
isTriggerFocused(): Promise<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* Press the trigger to open the dialog.
|
|
89
|
+
*
|
|
90
|
+
* Throws when nothing opens, because the reason is always worth failing on: a
|
|
91
|
+
* native `<button disabled>` trigger never receives the click at all. (A
|
|
92
|
+
* DISABLED `<wr-btn>` is a jsdom blind spot in the other direction — it is kept
|
|
93
|
+
* inert by `pointer-events: none`, which jsdom does not apply, so it opens here
|
|
94
|
+
* and would not in a browser.)
|
|
95
|
+
*/
|
|
96
|
+
open(): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Press the trigger again to take the question back.
|
|
99
|
+
*
|
|
100
|
+
* This is the ONE way out that answers nothing: the directive treats a second
|
|
101
|
+
* press as withdrawing the question, so `cancelled` does NOT fire — unlike
|
|
102
|
+
* `cancel()`, `sendEscape()` and `clickOutside()`, which all emit it. Use this
|
|
103
|
+
* when a spec needs the panel gone without recording an answer.
|
|
104
|
+
*/
|
|
105
|
+
close(): Promise<void>;
|
|
106
|
+
/** The question being asked. */
|
|
107
|
+
getMessage(): Promise<string>;
|
|
108
|
+
/**
|
|
109
|
+
* The confirm button's label.
|
|
110
|
+
*
|
|
111
|
+
* Resolved, not given: `confirmText` falls back to the `popconfirm.confirm`
|
|
112
|
+
* catalog entry, so a localized app reads its own word here and a spec that
|
|
113
|
+
* asserted the English default would be asserting the wrong thing.
|
|
114
|
+
*/
|
|
115
|
+
getConfirmText(): Promise<string>;
|
|
116
|
+
/** The cancel button's label — `cancelText`, or the `popconfirm.cancel` catalog entry. */
|
|
117
|
+
getCancelText(): Promise<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Both action labels in the order they are rendered: cancel first, confirm
|
|
120
|
+
* second.
|
|
121
|
+
*
|
|
122
|
+
* That order is deliberate and worth reading — the destructive choice is the one
|
|
123
|
+
* being confirmed, so the safe one comes first and takes the initial focus.
|
|
124
|
+
*/
|
|
125
|
+
getActionLabels(): Promise<string[]>;
|
|
126
|
+
/**
|
|
127
|
+
* The confirm button's intent colour.
|
|
128
|
+
*
|
|
129
|
+
* Checked against `WR_COLORS` rather than pattern-matched out of the class list:
|
|
130
|
+
* `wr-btn--*` also spells the size, the shape and the icon position, so only the
|
|
131
|
+
* intent list can say which of them is a colour. Today `WrButton` happens to
|
|
132
|
+
* emit the colour first, so a first-match regex would agree — but that order is
|
|
133
|
+
* not a contract, and the same regex on a button with no colour answers `sm`.
|
|
134
|
+
* Never `null` in practice — `confirmColor` defaults to `primary` — but typed
|
|
135
|
+
* for it, since the button itself allows no colour at all.
|
|
136
|
+
*/
|
|
137
|
+
getConfirmColor(): Promise<WrColor | null>;
|
|
138
|
+
/** Which action holds keyboard focus, by label, or `null` when focus is elsewhere. */
|
|
139
|
+
getFocusedActionLabel(): Promise<string | null>;
|
|
140
|
+
/** Answer the question: click confirm, which emits `confirmed` and closes the dialog. */
|
|
141
|
+
confirm(): Promise<void>;
|
|
142
|
+
/** Decline: click cancel, which emits `cancelled` and closes the dialog. */
|
|
143
|
+
cancel(): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Dismiss with Escape, which emits `cancelled`.
|
|
146
|
+
*
|
|
147
|
+
* Sent at the pane rather than at the focused button, because the target makes
|
|
148
|
+
* no difference: the key is picked up by the overlay's keyboard dispatcher,
|
|
149
|
+
* which keeps one listener on the document and routes to the topmost overlay.
|
|
150
|
+
* The pane is the one element guaranteed to be there.
|
|
151
|
+
*/
|
|
152
|
+
sendEscape(): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Dismiss by pressing outside the panel, which emits `cancelled`.
|
|
155
|
+
*
|
|
156
|
+
* The press lands on the overlay CONTAINER — an ancestor of the pane (the CDK
|
|
157
|
+
* puts a host `<div>` between the two), and so outside the panel by the only
|
|
158
|
+
* measure that matters here, since the dismissal is decided by whether the press
|
|
159
|
+
* started inside the pane. With two dialogs showing it dismisses BOTH: neither
|
|
160
|
+
* pane contains the container. jsdom has no layout
|
|
161
|
+
* and no `document.elementFromPoint`, so a harness cannot aim at "whatever is
|
|
162
|
+
* under the pointer"; to dismiss by pressing a specific element instead, click
|
|
163
|
+
* that element's own `TestElement`.
|
|
164
|
+
*/
|
|
165
|
+
clickOutside(): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* The role the open panel announces — `'dialog'`.
|
|
168
|
+
*
|
|
169
|
+
* Worth asserting rather than assuming: the directive sets it on the OVERLAY
|
|
170
|
+
* PANE, not on the panel component a consumer can see in the template.
|
|
171
|
+
*/
|
|
172
|
+
getRole(): Promise<string | null>;
|
|
173
|
+
/**
|
|
174
|
+
* The dialog's accessible name — the `ariaLabel` input, or the catalog's
|
|
175
|
+
* `popconfirm.label`.
|
|
176
|
+
*
|
|
177
|
+
* A `role="dialog"` with no name announces as a bare "dialog" and trips axe's
|
|
178
|
+
* `aria-dialog-name`, which is why there is always one.
|
|
179
|
+
*/
|
|
180
|
+
getLabel(): Promise<string | null>;
|
|
181
|
+
/**
|
|
182
|
+
* Whether the dialog claims modality.
|
|
183
|
+
*
|
|
184
|
+
* `false`, deliberately, and worth pinning: focus is moved into the panel but
|
|
185
|
+
* NOT trapped, because Escape and an outside click both dismiss — trapping
|
|
186
|
+
* would only make it harder to leave.
|
|
187
|
+
*/
|
|
188
|
+
isModal(): Promise<boolean>;
|
|
189
|
+
/**
|
|
190
|
+
* The text a screen reader reads as the dialog's DESCRIPTION, resolved through
|
|
191
|
+
* `aria-describedby` the way an assistive technology would.
|
|
192
|
+
*
|
|
193
|
+
* This is the question, and it is the entire content of a confirmation: without
|
|
194
|
+
* the link the dialog announces its name and then nothing at all.
|
|
195
|
+
*/
|
|
196
|
+
getDescriptionText(): Promise<string | null>;
|
|
197
|
+
/**
|
|
198
|
+
* Which side of the trigger the panel is anchored to.
|
|
199
|
+
*
|
|
200
|
+
* The side that was ASKED for, read off the pane's public modifier class —
|
|
201
|
+
* `position` is an input, so a bound one never reaches the DOM, and the panel's
|
|
202
|
+
* own offset is a CDK inline style that says nothing in a layout-less jsdom.
|
|
203
|
+
* Not where the panel ended up: the position strategy is flexible and pushes,
|
|
204
|
+
* so a panel with no room on that side moves without the class changing.
|
|
205
|
+
*/
|
|
206
|
+
getPosition(): Promise<WrPopconfirmPosition | null>;
|
|
207
|
+
/**
|
|
208
|
+
* Harnesses for anything inside the panel resolve within THIS instance's dialog.
|
|
209
|
+
*
|
|
210
|
+
* Scoped by the published id rather than by `.wr-popconfirm`: the overlay
|
|
211
|
+
* container is shared, so a class query would answer with whichever popconfirm
|
|
212
|
+
* opened first.
|
|
213
|
+
*/
|
|
214
|
+
protected getRootHarnessLoader(): Promise<HarnessLoader>;
|
|
215
|
+
/**
|
|
216
|
+
* One of the two action buttons.
|
|
217
|
+
*
|
|
218
|
+
* By its own modifier class, never by index: both are a `<wr-btn size="sm">`, so
|
|
219
|
+
* before the modifiers existed the only thing telling them apart was document
|
|
220
|
+
* order — and a harness that clicked "the second button" would go on passing
|
|
221
|
+
* while it started confirming what a spec meant to cancel.
|
|
222
|
+
*/
|
|
223
|
+
private action;
|
|
224
|
+
/** One element inside THIS instance's panel. */
|
|
225
|
+
private inPanel;
|
|
226
|
+
/** Every matching element inside THIS instance's panel, in document order. */
|
|
227
|
+
private allInPanel;
|
|
228
|
+
/** This instance's overlay pane — the element carrying the dialog semantics. */
|
|
229
|
+
private pane;
|
|
230
|
+
/** The id the trigger publishes for its dialog, which exists only while the dialog does. */
|
|
231
|
+
private panelId;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export { WrPopconfirmHarness };
|
|
235
|
+
export type { WrPopconfirmHarnessFilters };
|
|
@@ -9,32 +9,25 @@ import * as _angular_core from '@angular/core';
|
|
|
9
9
|
|
|
10
10
|
type WrPopconfirmPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Small "Are you sure?" panel anchored to its trigger. Fires `confirmed`
|
|
14
|
-
* or `cancelled` and closes automatically. Built on CDK Overlay.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```html
|
|
18
|
-
* <wr-btn
|
|
19
|
-
* color="danger"
|
|
20
|
-
* [wrPopconfirm]="'Delete this item?'"
|
|
21
|
-
* confirmColor="danger"
|
|
22
|
-
* confirmText="Delete"
|
|
23
|
-
* (confirmed)="remove()"
|
|
24
|
-
* >Delete</wr-btn>
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @see https://ngwr.dev/reference/components/popconfirm
|
|
28
|
-
*/
|
|
29
12
|
declare class WrPopconfirm {
|
|
30
13
|
/** Confirmation message. */
|
|
31
14
|
readonly message: _angular_core.InputSignal<string>;
|
|
32
15
|
/** Anchor side. @default 'top' */
|
|
33
16
|
readonly position: _angular_core.InputSignal<WrPopconfirmPosition>;
|
|
34
17
|
/** Label for the confirm button. @default 'Confirm' */
|
|
35
|
-
|
|
18
|
+
/** Confirm button text. Falls back to `popconfirm.confirm`. */
|
|
19
|
+
readonly confirmText: _angular_core.InputSignal<string | null>;
|
|
36
20
|
/** Label for the cancel button. @default 'Cancel' */
|
|
37
|
-
|
|
21
|
+
/** Cancel button text. Falls back to `popconfirm.cancel`. */
|
|
22
|
+
readonly cancelText: _angular_core.InputSignal<string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Accessible name of the confirmation dialog. `role="dialog"` with no name
|
|
25
|
+
* announces as a bare "dialog". Falls back to `popconfirm.label`.
|
|
26
|
+
*/
|
|
27
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
28
|
+
private readonly resolvedConfirm;
|
|
29
|
+
private readonly resolvedCancel;
|
|
30
|
+
private readonly resolvedAriaLabel;
|
|
38
31
|
/** Color of the confirm button. @default 'primary' */
|
|
39
32
|
readonly confirmColor: _angular_core.InputSignal<"primary" | "secondary" | "success" | "warning" | "danger" | "info" | "light" | "medium" | "dark">;
|
|
40
33
|
/** Fires when the user clicks confirm. */
|
|
@@ -43,11 +36,18 @@ declare class WrPopconfirm {
|
|
|
43
36
|
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
44
37
|
private readonly host;
|
|
45
38
|
private readonly overlay;
|
|
39
|
+
private readonly dir;
|
|
46
40
|
private readonly outsideClick;
|
|
47
41
|
private readonly vcr;
|
|
48
42
|
private readonly scrollStrategies;
|
|
49
43
|
private readonly destroyRef;
|
|
44
|
+
/** @internal Public so the host bindings can read it. */
|
|
45
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
50
46
|
private overlayRef;
|
|
47
|
+
private readonly uid;
|
|
48
|
+
/** @internal Public so the host binding can read it. */
|
|
49
|
+
protected readonly panelId: string;
|
|
50
|
+
private readonly messageId;
|
|
51
51
|
constructor();
|
|
52
52
|
/** @internal */
|
|
53
53
|
protected toggle(event: MouseEvent): void;
|
|
@@ -55,8 +55,16 @@ declare class WrPopconfirm {
|
|
|
55
55
|
close(): void;
|
|
56
56
|
private dismiss;
|
|
57
57
|
private dispose;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the app reads right-to-left.
|
|
60
|
+
*
|
|
61
|
+
* Optional inject: `Directionality` is root-provided, so this is never null in
|
|
62
|
+
* an app — but a bare `TestBed` that provides nothing should still get a
|
|
63
|
+
* component that works, and defaulting to LTR is the honest fallback.
|
|
64
|
+
*/
|
|
65
|
+
private isRtl;
|
|
58
66
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPopconfirm, never>;
|
|
59
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopconfirm, "[wrPopconfirm]", never, { "message": { "alias": "wrPopconfirm"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "confirmText": { "alias": "confirmText"; "required": false; "isSignal": true; }; "cancelText": { "alias": "cancelText"; "required": false; "isSignal": true; }; "confirmColor": { "alias": "confirmColor"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
67
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopconfirm, "[wrPopconfirm]", never, { "message": { "alias": "wrPopconfirm"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "confirmText": { "alias": "confirmText"; "required": false; "isSignal": true; }; "cancelText": { "alias": "cancelText"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "confirmColor": { "alias": "confirmColor"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
/**
|
|
@@ -67,13 +75,15 @@ declare class WrPopconfirm {
|
|
|
67
75
|
*/
|
|
68
76
|
declare class WrPopconfirmPanel {
|
|
69
77
|
readonly message: _angular_core.InputSignal<string>;
|
|
78
|
+
/** Id the anchoring directive points `aria-describedby` at. */
|
|
79
|
+
readonly messageId: _angular_core.InputSignal<string | null>;
|
|
70
80
|
readonly confirmText: _angular_core.InputSignal<string>;
|
|
71
81
|
readonly cancelText: _angular_core.InputSignal<string>;
|
|
72
82
|
readonly confirmColor: _angular_core.InputSignal<"primary" | "secondary" | "success" | "warning" | "danger" | "info" | "light" | "medium" | "dark">;
|
|
73
83
|
readonly confirmed: _angular_core.OutputEmitterRef<void>;
|
|
74
84
|
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
75
85
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPopconfirmPanel, never>;
|
|
76
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPopconfirmPanel, "wr-popconfirm", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "confirmText": { "alias": "confirmText"; "required": false; "isSignal": true; }; "cancelText": { "alias": "cancelText"; "required": false; "isSignal": true; }; "confirmColor": { "alias": "confirmColor"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
86
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPopconfirmPanel, "wr-popconfirm", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "messageId": { "alias": "messageId"; "required": false; "isSignal": true; }; "confirmText": { "alias": "confirmText"; "required": false; "isSignal": true; }; "cancelText": { "alias": "cancelText"; "required": false; "isSignal": true; }; "confirmColor": { "alias": "confirmColor"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
export { WrPopconfirm, WrPopconfirmPanel };
|