ngwr 7.3.0 → 9.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 +79 -31
- package/action-sheet/styles/_index.scss +93 -0
- package/alert/styles/_index.scss +45 -18
- package/anchor/styles/_index.scss +3 -3
- package/avatar/styles/_index.scss +2 -2
- package/back-top/styles/_index.scss +1 -1
- package/badge/styles/_index.scss +11 -7
- package/badge/styles/_tag.scss +4 -4
- package/bar-chart/styles/_index.scss +5 -6
- package/border-glow/styles/_index.scss +3 -3
- package/breadcrumbs/styles/_index.scss +7 -5
- package/burger/styles/_index.scss +3 -3
- package/button/styles/_index.scss +34 -24
- package/calendar/styles/_index.scss +15 -13
- package/calendar-heatmap/styles/_index.scss +5 -3
- package/card/styles/_index.scss +5 -5
- package/carousel/styles/_index.scss +6 -6
- package/cascader/styles/_index.scss +69 -29
- package/checkbox/styles/_index.scss +41 -9
- package/collapse/styles/_index.scss +7 -7
- package/color-picker/styles/_index.scss +26 -21
- package/command-palette/styles/_index.scss +22 -19
- package/compare/styles/_index.scss +6 -6
- package/context-menu/styles/_index.scss +17 -7
- package/counter/styles/_index.scss +12 -1
- package/date-picker/styles/_index.scss +13 -14
- package/density/styles/_index.scss +3 -3
- package/descriptions/styles/_index.scss +9 -9
- package/dialog/styles/_index.scss +10 -9
- package/divider/styles/_index.scss +3 -3
- package/donut-chart/styles/_index.scss +3 -3
- package/drag-drop/styles/_index.scss +11 -6
- package/drawer/styles/_index.scss +26 -17
- package/dropdown/styles/_index.scss +7 -7
- package/empty/styles/_index.scss +4 -4
- package/fesm2022/ngwr-action-sheet.mjs +81 -0
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -0
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +23 -11
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +4 -4
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +5 -4
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +4 -4
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +4 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +8 -8
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +4 -4
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +4 -4
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +8 -8
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +4 -4
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +5 -5
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +11 -11
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +7 -7
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +58 -89
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +80 -129
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +5 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +27 -7
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +28 -7
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +12 -12
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +58 -66
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +4 -4
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +4 -4
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +98 -75
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +19 -6
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +32 -14
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapter-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-adapter.mjs +10 -5
- package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +142 -123
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +15 -15
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +7 -7
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +16 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +22 -88
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +4 -4
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +11 -5
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +10 -9
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +13 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +4 -4
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +5 -4
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +58 -60
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +11 -11
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +10 -8
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +4 -4
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +15 -7
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +7 -7
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +10 -10
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +6 -7
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +4 -4
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +6 -5
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +56 -73
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +52 -52
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +27 -18
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +4 -4
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +47 -58
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +16 -16
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +20 -7
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +4 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +7 -7
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +6 -5
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +4 -4
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +15 -9
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +7 -7
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +4 -4
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +9 -4
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +4 -4
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +6 -16
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +169 -5
- package/fesm2022/ngwr-platform.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +7 -7
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +7 -7
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +4 -4
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +172 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -0
- package/fesm2022/ngwr-qr.mjs +5 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +49 -72
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +41 -65
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +13 -13
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +15 -4
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +4 -4
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +10 -22
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +303 -86
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +7 -7
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +4 -4
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +4 -4
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +79 -73
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +4 -4
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +13 -5
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +4 -4
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +4 -4
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +4 -4
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +8 -8
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +7 -7
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +138 -14
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +8 -8
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +4 -4
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +22 -58
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +824 -20
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +11 -8
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +94 -67
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +20 -5
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +27 -11
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +7 -7
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +47 -25
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +4 -4
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +280 -84
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +10 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +4 -4
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +42 -4
- package/fesm2022/ngwr-validators.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 +9 -7
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +6 -5
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +16 -15
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +14 -14
- package/form/styles/_index.scss +9 -9
- package/gauge/styles/_index.scss +2 -2
- package/glitch-text/styles/_index.scss +4 -7
- package/gradient-text/styles/_index.scss +1 -1
- package/image-cropper/styles/_index.scss +8 -7
- package/input/styles/_index.scss +35 -16
- package/input-number/styles/_index.scss +1 -1
- package/input-otp/styles/_index.scss +28 -10
- package/keyboard/styles/_index.scss +11 -9
- package/knob/styles/_index.scss +7 -3
- package/layout/styles/_index.scss +12 -12
- package/lightbox/styles/_index.scss +31 -10
- package/line-chart/styles/_index.scss +5 -5
- package/list/styles/_index.scss +6 -6
- package/llms-full.txt +45 -24
- package/llms.txt +48 -32
- package/marquee/styles/_index.scss +1 -1
- package/mention/styles/_index.scss +6 -6
- package/meter-group/styles/_index.scss +4 -4
- package/overlay/styles/_index.scss +9 -1
- package/package.json +21 -14
- package/page-header/styles/_index.scss +4 -4
- package/pagination/styles/_index.scss +6 -29
- package/popconfirm/styles/_index.scss +4 -4
- package/popover/styles/_index.scss +7 -7
- package/progress/styles/_index.scss +1 -1
- package/pull-to-refresh/styles/_index.scss +38 -0
- package/radio/styles/_index.scss +24 -9
- package/rating/styles/_index.scss +13 -2
- package/result/styles/_index.scss +3 -3
- package/schematics/migrations/v8/index.js +122 -0
- package/schematics/migrations/v9/index.js +71 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +3 -3
- package/schematics/ng-add/schema.json +7 -7
- package/schematics/provider/schema.json +1 -1
- package/schematics/use/symbol-map.json +24 -2
- package/segmented/styles/_index.scss +35 -12
- package/select/styles/_index.scss +126 -43
- package/shiny-text/styles/_index.scss +4 -4
- package/sidebar/styles/_index.scss +15 -15
- package/slider/styles/_index.scss +7 -8
- package/speed-dial/styles/_index.scss +23 -6
- package/splash-cursor/styles/_index.scss +1 -0
- package/splitter/styles/_index.scss +11 -8
- package/spotlight-card/styles/_index.scss +11 -7
- package/star-border/styles/_index.scss +3 -3
- package/statistic/styles/_index.scss +51 -4
- package/stepper/styles/_index.scss +10 -10
- package/styles/_animations.scss +0 -23
- package/styles/_typography.scss +4 -1
- package/styles.scss +2 -1
- package/switch/styles/_index.scss +29 -10
- package/table/styles/_index.scss +456 -26
- package/tabs/styles/_index.scss +25 -6
- package/textarea/styles/_index.scss +65 -10
- package/theme/styles/_colors.scss +82 -1
- package/theme/styles/_dark.scss +22 -8
- package/theme/styles/_focus.scss +5 -0
- package/theme/styles/_variables.scss +24 -0
- package/tilt-card/styles/_index.scss +4 -4
- package/timeline/styles/_index.scss +18 -8
- package/toast/styles/_index.scss +24 -16
- package/toolbar/styles/_index.scss +5 -5
- package/tree/styles/_index.scss +63 -32
- package/types/ngwr-action-sheet.d.ts +75 -0
- package/types/ngwr-alert.d.ts +17 -7
- package/types/ngwr-anchor.d.ts +1 -1
- package/types/ngwr-avatar.d.ts +1 -1
- package/types/ngwr-back-top.d.ts +1 -1
- package/types/ngwr-badge.d.ts +4 -4
- package/types/ngwr-bar-chart.d.ts +1 -1
- package/types/ngwr-breadcrumbs.d.ts +1 -1
- package/types/ngwr-burger.d.ts +1 -1
- package/types/ngwr-button.d.ts +3 -3
- package/types/ngwr-calendar-heatmap.d.ts +1 -1
- package/types/ngwr-calendar.d.ts +1 -1
- package/types/ngwr-card.d.ts +1 -1
- package/types/ngwr-carousel.d.ts +1 -1
- package/types/ngwr-cascader.d.ts +31 -17
- package/types/ngwr-checkbox.d.ts +67 -44
- package/types/ngwr-click-spark.d.ts +13 -1
- package/types/ngwr-clipboard.d.ts +13 -2
- package/types/ngwr-collapse.d.ts +3 -3
- package/types/ngwr-color-picker.d.ts +24 -19
- package/types/ngwr-command-palette.d.ts +1 -1
- package/types/ngwr-compare.d.ts +1 -1
- package/types/ngwr-context-menu.d.ts +42 -23
- package/types/ngwr-cookie.d.ts +7 -1
- package/types/ngwr-counter.d.ts +9 -2
- package/types/ngwr-date-picker.d.ts +39 -23
- package/types/ngwr-density.d.ts +8 -8
- package/types/ngwr-descriptions.d.ts +1 -1
- package/types/ngwr-dialog.d.ts +1 -1
- package/types/ngwr-directives.d.ts +18 -49
- package/types/ngwr-divider.d.ts +2 -2
- package/types/ngwr-donut-chart.d.ts +1 -1
- package/types/ngwr-drag-drop.d.ts +1 -1
- package/types/ngwr-drawer.d.ts +1 -1
- package/types/ngwr-dropdown.d.ts +1 -1
- package/types/ngwr-empty.d.ts +1 -1
- package/types/ngwr-file-upload.d.ts +28 -17
- package/types/ngwr-form.d.ts +2 -2
- package/types/ngwr-fuzzy-text.d.ts +1 -1
- package/types/ngwr-gauge.d.ts +1 -1
- package/types/ngwr-glitch-text.d.ts +9 -3
- package/types/ngwr-hotkey.d.ts +1 -1
- package/types/ngwr-i18n.d.ts +1 -1
- package/types/ngwr-icon-adapters-lucide.d.ts +5 -3
- package/types/ngwr-icon.d.ts +1 -1
- package/types/ngwr-image-cropper.d.ts +1 -1
- package/types/ngwr-input-number.d.ts +25 -19
- package/types/ngwr-input-otp.d.ts +28 -18
- package/types/ngwr-input.d.ts +29 -15
- package/types/ngwr-keyboard.d.ts +1 -1
- package/types/ngwr-knob.d.ts +24 -19
- package/types/ngwr-layout.d.ts +1 -1
- package/types/ngwr-lightbox.d.ts +10 -2
- package/types/ngwr-line-chart.d.ts +1 -1
- package/types/ngwr-list.d.ts +1 -1
- package/types/ngwr-loading-bar.d.ts +1 -1
- package/types/ngwr-marquee.d.ts +1 -1
- package/types/ngwr-media.d.ts +1 -1
- package/types/ngwr-mention.d.ts +1 -1
- package/types/ngwr-meta.d.ts +1 -1
- package/types/ngwr-meter-group.d.ts +1 -1
- package/types/ngwr-page-header.d.ts +1 -1
- package/types/ngwr-pagination.d.ts +4 -10
- package/types/ngwr-platform.d.ts +93 -2
- package/types/ngwr-popconfirm.d.ts +3 -3
- package/types/ngwr-progress.d.ts +2 -2
- package/types/ngwr-pull-to-refresh.d.ts +69 -0
- package/types/ngwr-qr.d.ts +1 -1
- package/types/ngwr-radio.d.ts +39 -25
- package/types/ngwr-rating.d.ts +32 -20
- package/types/ngwr-result.d.ts +1 -1
- package/types/ngwr-rotating-text.d.ts +1 -0
- package/types/ngwr-scroll.d.ts +1 -1
- package/types/ngwr-segmented.d.ts +6 -3
- package/types/ngwr-select.d.ts +98 -27
- package/types/ngwr-sidebar.d.ts +1 -1
- package/types/ngwr-skeleton.d.ts +2 -2
- package/types/ngwr-slider.d.ts +35 -21
- package/types/ngwr-sparkline.d.ts +1 -1
- package/types/ngwr-speed-dial.d.ts +8 -2
- package/types/ngwr-spinner.d.ts +1 -1
- package/types/ngwr-splitter.d.ts +1 -1
- package/types/ngwr-spotlight-card.d.ts +1 -1
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-statistic.d.ts +75 -6
- package/types/ngwr-stepper.d.ts +2 -2
- package/types/ngwr-storage.d.ts +1 -1
- package/types/ngwr-switch.d.ts +24 -16
- package/types/ngwr-table.d.ts +417 -6
- package/types/ngwr-tabs.d.ts +1 -1
- package/types/ngwr-textarea.d.ts +45 -20
- package/types/ngwr-theme.d.ts +7 -2
- package/types/ngwr-tilt-card.d.ts +3 -0
- package/types/ngwr-timeline.d.ts +1 -1
- package/types/ngwr-toast.d.ts +8 -2
- package/types/ngwr-toolbar.d.ts +1 -1
- package/types/ngwr-tree.d.ts +100 -19
- package/types/ngwr-typography.d.ts +1 -1
- package/types/ngwr-validators.d.ts +4 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-virtual-scroll.d.ts +1 -1
- package/types/ngwr-window.d.ts +1 -1
- package/typography/styles/_index.scss +11 -11
- package/virtual-scroll/styles/_index.scss +1 -1
- package/waves/styles/_index.scss +1 -1
- package/window/styles/_index.scss +26 -26
- package/fesm2022/ngwr-scramble-text.mjs +0 -165
- package/fesm2022/ngwr-scramble-text.mjs.map +0 -1
- package/scramble-text/scramble-text.scss +0 -1
- package/scramble-text/styles/_index.scss +0 -8
- package/types/ngwr-scramble-text.d.ts +0 -49
package/fesm2022/ngwr-pipes.mjs
CHANGED
|
@@ -33,10 +33,10 @@ class WrBytes {
|
|
|
33
33
|
const fractionDigits = i === 0 ? 0 : Math.max(0, decimals);
|
|
34
34
|
return `${v.toFixed(fractionDigits)} ${UNITS[i]}`;
|
|
35
35
|
}
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
37
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrBytes, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
37
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrBytes, isStandalone: true, name: "wrBytes" });
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrBytes, decorators: [{
|
|
40
40
|
type: Pipe,
|
|
41
41
|
args: [{ name: 'wrBytes' }]
|
|
42
42
|
}] });
|
|
@@ -87,10 +87,10 @@ class WrDate {
|
|
|
87
87
|
const opts = named[format] ?? { dateStyle: 'short' };
|
|
88
88
|
return new Intl.DateTimeFormat(this.locale, opts).format(date);
|
|
89
89
|
}
|
|
90
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
91
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
90
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrDate, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
91
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrDate, isStandalone: true, name: "wrDate" });
|
|
92
92
|
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrDate, decorators: [{
|
|
94
94
|
type: Pipe,
|
|
95
95
|
args: [{ name: 'wrDate' }]
|
|
96
96
|
}] });
|
|
@@ -140,10 +140,10 @@ class WrMark {
|
|
|
140
140
|
const html = safe.replace(pattern, m => `<mark>${escapeHtml(m)}</mark>`);
|
|
141
141
|
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
142
142
|
}
|
|
143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
144
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrMark, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
144
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrMark, isStandalone: true, name: "wrMark" });
|
|
145
145
|
}
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrMark, decorators: [{
|
|
147
147
|
type: Pipe,
|
|
148
148
|
args: [{ name: 'wrMark' }]
|
|
149
149
|
}] });
|
|
@@ -191,10 +191,10 @@ class WrNumber {
|
|
|
191
191
|
return { style: 'decimal' };
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
195
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrNumber, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
195
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrNumber, isStandalone: true, name: "wrNumber" });
|
|
196
196
|
}
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrNumber, decorators: [{
|
|
198
198
|
type: Pipe,
|
|
199
199
|
args: [{ name: 'wrNumber' }]
|
|
200
200
|
}] });
|
|
@@ -237,10 +237,10 @@ class WrPlural {
|
|
|
237
237
|
return word;
|
|
238
238
|
return `${new Intl.NumberFormat(locale).format(value)} ${word}`;
|
|
239
239
|
}
|
|
240
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
241
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPlural, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
241
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrPlural, isStandalone: true, name: "wrPlural" });
|
|
242
242
|
}
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPlural, decorators: [{
|
|
244
244
|
type: Pipe,
|
|
245
245
|
args: [{ name: 'wrPlural' }]
|
|
246
246
|
}] });
|
|
@@ -267,10 +267,10 @@ class WrRange {
|
|
|
267
267
|
transform(length) {
|
|
268
268
|
return Array.from({ length }, (_, i) => i);
|
|
269
269
|
}
|
|
270
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
271
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
270
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRange, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
271
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrRange, isStandalone: true, name: "wrRange" });
|
|
272
272
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrRange, decorators: [{
|
|
274
274
|
type: Pipe,
|
|
275
275
|
args: [{ name: 'wrRange' }]
|
|
276
276
|
}] });
|
|
@@ -299,10 +299,10 @@ class WrTruncate {
|
|
|
299
299
|
return s;
|
|
300
300
|
return s.slice(0, Math.max(0, length)) + ellipsis;
|
|
301
301
|
}
|
|
302
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
303
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
302
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTruncate, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
303
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: WrTruncate, isStandalone: true, name: "wrTruncate" });
|
|
304
304
|
}
|
|
305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTruncate, decorators: [{
|
|
306
306
|
type: Pipe,
|
|
307
307
|
args: [{ name: 'wrTruncate' }]
|
|
308
308
|
}] });
|
|
@@ -27,7 +27,7 @@ import { inject, DestroyRef, PLATFORM_ID, signal, Service } from '@angular/core'
|
|
|
27
27
|
* protected readonly dark = this.platform.prefersDark;
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
30
|
-
* @see https://ngwr.dev/services/platform
|
|
30
|
+
* @see https://ngwr.dev/reference/services/platform
|
|
31
31
|
*/
|
|
32
32
|
class WrPlatform {
|
|
33
33
|
destroyRef = inject(DestroyRef);
|
|
@@ -48,10 +48,174 @@ class WrPlatform {
|
|
|
48
48
|
this.destroyRef.onDestroy(() => mql.removeEventListener('change', handler));
|
|
49
49
|
return sig.asReadonly();
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
52
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPlatform, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
52
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: WrPlatform });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPlatform, decorators: [{
|
|
55
|
+
type: Service
|
|
56
|
+
}] });
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @license
|
|
60
|
+
*
|
|
61
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
62
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* SSR-safe view onto `window.visualViewport` — the part of the layout viewport
|
|
66
|
+
* actually visible once the on-screen keyboard (or other browser chrome) is
|
|
67
|
+
* accounted for.
|
|
68
|
+
*
|
|
69
|
+
* - `bottomInset` — px hidden at the bottom of the layout viewport (the
|
|
70
|
+
* keyboard height); `0` when nothing covers it, on the server, or in browsers
|
|
71
|
+
* without the API.
|
|
72
|
+
* - `offsetTop` — how far the visual viewport is pushed/scrolled down.
|
|
73
|
+
*
|
|
74
|
+
* While active it also mirrors `bottomInset` onto `--wr-keyboard-inset` on the
|
|
75
|
+
* document root, so purely presentational surfaces (the responsive overlay
|
|
76
|
+
* sheet, the command-palette sheet) can lift above the keyboard with CSS alone.
|
|
77
|
+
*
|
|
78
|
+
* @see https://ngwr.dev/reference/services/platform
|
|
79
|
+
*/
|
|
80
|
+
class WrVisualViewport {
|
|
81
|
+
destroyRef = inject(DestroyRef);
|
|
82
|
+
doc = inject(DOCUMENT);
|
|
83
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
84
|
+
_bottomInset = signal(0, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "_bottomInset" }] : /* istanbul ignore next */ []));
|
|
86
|
+
_offsetTop = signal(0, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "_offsetTop" }] : /* istanbul ignore next */ []));
|
|
88
|
+
/** Height (px) the keyboard / browser chrome hides at the viewport bottom. */
|
|
89
|
+
bottomInset = this._bottomInset.asReadonly();
|
|
90
|
+
/** The visual viewport's top offset (px). */
|
|
91
|
+
offsetTop = this._offsetTop.asReadonly();
|
|
92
|
+
constructor() {
|
|
93
|
+
const vv = this.isBrowser ? this.doc.defaultView?.visualViewport : null;
|
|
94
|
+
if (!vv)
|
|
95
|
+
return;
|
|
96
|
+
const root = this.doc.documentElement;
|
|
97
|
+
const update = () => {
|
|
98
|
+
// The band below the visual viewport, in layout-viewport coordinates.
|
|
99
|
+
const bottom = Math.max(0, root.clientHeight - (vv.height + vv.offsetTop));
|
|
100
|
+
this._bottomInset.set(bottom);
|
|
101
|
+
this._offsetTop.set(vv.offsetTop);
|
|
102
|
+
root.style.setProperty('--wr-keyboard-inset', `${bottom}px`);
|
|
103
|
+
};
|
|
104
|
+
update();
|
|
105
|
+
vv.addEventListener('resize', update);
|
|
106
|
+
vv.addEventListener('scroll', update);
|
|
107
|
+
this.destroyRef.onDestroy(() => {
|
|
108
|
+
vv.removeEventListener('resize', update);
|
|
109
|
+
vv.removeEventListener('scroll', update);
|
|
110
|
+
root.style.removeProperty('--wr-keyboard-inset');
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrVisualViewport, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
114
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: WrVisualViewport });
|
|
115
|
+
}
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrVisualViewport, decorators: [{
|
|
117
|
+
type: Service
|
|
118
|
+
}], ctorParameters: () => [] });
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @license
|
|
122
|
+
*
|
|
123
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
124
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
125
|
+
*/
|
|
126
|
+
/**
|
|
127
|
+
* Vibration patterns (ms, or `[buzz, pause, buzz, …]`) behind the semantic
|
|
128
|
+
* presets — loosely modelled on iOS's impact / notification feedback.
|
|
129
|
+
*/
|
|
130
|
+
const PATTERNS = {
|
|
131
|
+
light: 10,
|
|
132
|
+
medium: 20,
|
|
133
|
+
heavy: 40,
|
|
134
|
+
selection: 5,
|
|
135
|
+
success: [15, 60, 30],
|
|
136
|
+
warning: [30, 40, 30],
|
|
137
|
+
error: [40, 60, 40, 60, 40],
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* SSR-safe wrapper around the Vibration API for tactile feedback on touch
|
|
141
|
+
* devices. Semantic presets (`impact`, `selection`, `success`, `warning`,
|
|
142
|
+
* `error`) map to sensible vibration patterns so call sites stay readable.
|
|
143
|
+
*
|
|
144
|
+
* Every method is a no-op — returning `false` — when there is no support:
|
|
145
|
+
* on the server, in browsers without `navigator.vibrate`, and notably on
|
|
146
|
+
* **iOS Safari**, which does not expose the Vibration API at all (its
|
|
147
|
+
* haptics are native-only). Check {@link supported} to branch UI on it.
|
|
148
|
+
*
|
|
149
|
+
* Haptics are best paired with a real user gesture (tap) — some browsers
|
|
150
|
+
* ignore `vibrate()` calls that aren't triggered by one. This service does
|
|
151
|
+
* not gate on `prefers-reduced-motion`; read {@link WrPlatform.prefersReducedMotion}
|
|
152
|
+
* at the call site if you want to suppress feedback for those users.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* private readonly haptics = inject(WrHaptics);
|
|
157
|
+
*
|
|
158
|
+
* onDelete(): void {
|
|
159
|
+
* this.haptics.warning(); // buzz before a destructive confirm
|
|
160
|
+
* }
|
|
161
|
+
*
|
|
162
|
+
* onToggle(): void {
|
|
163
|
+
* this.haptics.selection(); // subtle tick on a switch / segmented change
|
|
164
|
+
* }
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* @see https://ngwr.dev/reference/services/platform
|
|
168
|
+
*/
|
|
169
|
+
class WrHaptics {
|
|
170
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
171
|
+
nav = this.isBrowser ? (inject(DOCUMENT).defaultView?.navigator ?? null) : null;
|
|
172
|
+
/** Whether the Vibration API is available (browser + `navigator.vibrate`). */
|
|
173
|
+
supported = !!this.nav && typeof this.nav.vibrate === 'function';
|
|
174
|
+
/**
|
|
175
|
+
* Fire a raw vibration pattern — a single duration in ms, or an alternating
|
|
176
|
+
* `[buzz, pause, buzz, …]` array. Returns whether it was dispatched; passing
|
|
177
|
+
* `0` / `[]` cancels any ongoing vibration.
|
|
178
|
+
*/
|
|
179
|
+
vibrate(pattern) {
|
|
180
|
+
if (!this.supported)
|
|
181
|
+
return false;
|
|
182
|
+
try {
|
|
183
|
+
// `VibratePattern` is `number | number[]`; readonly arrays are accepted
|
|
184
|
+
// at runtime, so clone to satisfy the mutable-array signature.
|
|
185
|
+
return this.nav.vibrate(typeof pattern === 'number' ? pattern : [...pattern]);
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/** A physical "tap" — `light`, `medium` (default), or `heavy`. */
|
|
192
|
+
impact(strength = 'medium') {
|
|
193
|
+
return this.vibrate(PATTERNS[strength]);
|
|
194
|
+
}
|
|
195
|
+
/** A subtle tick for a discrete change (switch, segmented, stepper). */
|
|
196
|
+
selection() {
|
|
197
|
+
return this.vibrate(PATTERNS.selection);
|
|
198
|
+
}
|
|
199
|
+
/** A confirming pulse for a completed action. */
|
|
200
|
+
success() {
|
|
201
|
+
return this.vibrate(PATTERNS.success);
|
|
202
|
+
}
|
|
203
|
+
/** A cautioning pulse before a risky or destructive action. */
|
|
204
|
+
warning() {
|
|
205
|
+
return this.vibrate(PATTERNS.warning);
|
|
206
|
+
}
|
|
207
|
+
/** A buzzing pulse for a failure or rejected action. */
|
|
208
|
+
error() {
|
|
209
|
+
return this.vibrate(PATTERNS.error);
|
|
210
|
+
}
|
|
211
|
+
/** Cancel any in-progress vibration. */
|
|
212
|
+
stop() {
|
|
213
|
+
this.vibrate(0);
|
|
214
|
+
}
|
|
215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHaptics, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
216
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: WrHaptics });
|
|
217
|
+
}
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrHaptics, decorators: [{
|
|
55
219
|
type: Service
|
|
56
220
|
}] });
|
|
57
221
|
|
|
@@ -59,5 +223,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
59
223
|
* Generated bundle index. Do not edit.
|
|
60
224
|
*/
|
|
61
225
|
|
|
62
|
-
export { WrPlatform };
|
|
226
|
+
export { WrHaptics, WrPlatform, WrVisualViewport };
|
|
63
227
|
//# sourceMappingURL=ngwr-platform.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-platform.mjs","sources":["../../../projects/lib/platform/wr-platform.ts","../../../projects/lib/platform/ngwr-platform.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Service, PLATFORM_ID, type Signal, inject, signal } from '@angular/core';\n\n/**\n * SSR-safe environment probes. Use to gate browser-only code paths and\n * react to user preferences without scattering `matchMedia` calls around.\n *\n * - `isBrowser` / `isServer` — synchronous platform check.\n * - `userAgent` — `navigator.userAgent` or `null` on the server.\n * - `prefersDark` — signal mirroring `(prefers-color-scheme: dark)`.\n * - `prefersReducedMotion` — signal mirroring `(prefers-reduced-motion: reduce)`.\n *\n * @example\n * ```ts\n * private readonly platform = inject(WrPlatform);\n * if (this.platform.isBrowser) {\n * localStorage.setItem('theme', 'dark');\n * }\n *\n * protected readonly dark = this.platform.prefersDark;\n * ```\n *\n * @see https://ngwr.dev/services/platform\n */\n@Service()\nexport class WrPlatform {\n private readonly destroyRef = inject(DestroyRef);\n private readonly doc = inject(DOCUMENT);\n\n readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n readonly isServer = !this.isBrowser;\n readonly userAgent: string | null = this.isBrowser ? (this.doc.defaultView?.navigator?.userAgent ?? null) : null;\n\n readonly prefersDark: Signal<boolean> = this.mediaSignal('(prefers-color-scheme: dark)');\n readonly prefersReducedMotion: Signal<boolean> = this.mediaSignal('(prefers-reduced-motion: reduce)');\n\n private mediaSignal(query: string): Signal<boolean> {\n if (!this.isBrowser || !this.doc.defaultView?.matchMedia) return signal(false).asReadonly();\n const mql = this.doc.defaultView.matchMedia(query);\n const sig = signal(mql.matches);\n const handler = (event: MediaQueryListEvent): void => sig.set(event.matches);\n mql.addEventListener('change', handler);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', handler));\n return sig.asReadonly();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;;;;;AAoBG;MAEU,UAAU,CAAA;AACJ,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;IAE9B,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,C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../../projects/lib/platform/wr-platform.ts","../../../projects/lib/platform/wr-visual-viewport.ts","../../../projects/lib/platform/wr-haptics.ts","../../../projects/lib/platform/ngwr-platform.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Service, PLATFORM_ID, type Signal, inject, signal } from '@angular/core';\n\n/**\n * SSR-safe environment probes. Use to gate browser-only code paths and\n * react to user preferences without scattering `matchMedia` calls around.\n *\n * - `isBrowser` / `isServer` — synchronous platform check.\n * - `userAgent` — `navigator.userAgent` or `null` on the server.\n * - `prefersDark` — signal mirroring `(prefers-color-scheme: dark)`.\n * - `prefersReducedMotion` — signal mirroring `(prefers-reduced-motion: reduce)`.\n *\n * @example\n * ```ts\n * private readonly platform = inject(WrPlatform);\n * if (this.platform.isBrowser) {\n * localStorage.setItem('theme', 'dark');\n * }\n *\n * protected readonly dark = this.platform.prefersDark;\n * ```\n *\n * @see https://ngwr.dev/reference/services/platform\n */\n@Service()\nexport class WrPlatform {\n private readonly destroyRef = inject(DestroyRef);\n private readonly doc = inject(DOCUMENT);\n\n readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n readonly isServer = !this.isBrowser;\n readonly userAgent: string | null = this.isBrowser ? (this.doc.defaultView?.navigator?.userAgent ?? null) : null;\n\n readonly prefersDark: Signal<boolean> = this.mediaSignal('(prefers-color-scheme: dark)');\n readonly prefersReducedMotion: Signal<boolean> = this.mediaSignal('(prefers-reduced-motion: reduce)');\n\n private mediaSignal(query: string): Signal<boolean> {\n if (!this.isBrowser || !this.doc.defaultView?.matchMedia) return signal(false).asReadonly();\n const mql = this.doc.defaultView.matchMedia(query);\n const sig = signal(mql.matches);\n const handler = (event: MediaQueryListEvent): void => sig.set(event.matches);\n mql.addEventListener('change', handler);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', handler));\n return sig.asReadonly();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, PLATFORM_ID, Service, type Signal, inject, signal } from '@angular/core';\n\n/**\n * SSR-safe view onto `window.visualViewport` — the part of the layout viewport\n * actually visible once the on-screen keyboard (or other browser chrome) is\n * accounted for.\n *\n * - `bottomInset` — px hidden at the bottom of the layout viewport (the\n * keyboard height); `0` when nothing covers it, on the server, or in browsers\n * without the API.\n * - `offsetTop` — how far the visual viewport is pushed/scrolled down.\n *\n * While active it also mirrors `bottomInset` onto `--wr-keyboard-inset` on the\n * document root, so purely presentational surfaces (the responsive overlay\n * sheet, the command-palette sheet) can lift above the keyboard with CSS alone.\n *\n * @see https://ngwr.dev/reference/services/platform\n */\n@Service()\nexport class WrVisualViewport {\n private readonly destroyRef = inject(DestroyRef);\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly _bottomInset = signal(0);\n private readonly _offsetTop = signal(0);\n\n /** Height (px) the keyboard / browser chrome hides at the viewport bottom. */\n readonly bottomInset: Signal<number> = this._bottomInset.asReadonly();\n /** The visual viewport's top offset (px). */\n readonly offsetTop: Signal<number> = this._offsetTop.asReadonly();\n\n constructor() {\n const vv = this.isBrowser ? this.doc.defaultView?.visualViewport : null;\n if (!vv) return;\n\n const root = this.doc.documentElement;\n const update = (): void => {\n // The band below the visual viewport, in layout-viewport coordinates.\n const bottom = Math.max(0, root.clientHeight - (vv.height + vv.offsetTop));\n this._bottomInset.set(bottom);\n this._offsetTop.set(vv.offsetTop);\n root.style.setProperty('--wr-keyboard-inset', `${bottom}px`);\n };\n\n update();\n vv.addEventListener('resize', update);\n vv.addEventListener('scroll', update);\n this.destroyRef.onDestroy(() => {\n vv.removeEventListener('resize', update);\n vv.removeEventListener('scroll', update);\n root.style.removeProperty('--wr-keyboard-inset');\n });\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { PLATFORM_ID, Service, inject } from '@angular/core';\n\n/** Impact weight for {@link WrHaptics.impact}. */\ntype WrHapticImpact = 'light' | 'medium' | 'heavy';\n\n/**\n * Vibration patterns (ms, or `[buzz, pause, buzz, …]`) behind the semantic\n * presets — loosely modelled on iOS's impact / notification feedback.\n */\nconst PATTERNS = {\n light: 10,\n medium: 20,\n heavy: 40,\n selection: 5,\n success: [15, 60, 30],\n warning: [30, 40, 30],\n error: [40, 60, 40, 60, 40],\n} as const;\n\n/**\n * SSR-safe wrapper around the Vibration API for tactile feedback on touch\n * devices. Semantic presets (`impact`, `selection`, `success`, `warning`,\n * `error`) map to sensible vibration patterns so call sites stay readable.\n *\n * Every method is a no-op — returning `false` — when there is no support:\n * on the server, in browsers without `navigator.vibrate`, and notably on\n * **iOS Safari**, which does not expose the Vibration API at all (its\n * haptics are native-only). Check {@link supported} to branch UI on it.\n *\n * Haptics are best paired with a real user gesture (tap) — some browsers\n * ignore `vibrate()` calls that aren't triggered by one. This service does\n * not gate on `prefers-reduced-motion`; read {@link WrPlatform.prefersReducedMotion}\n * at the call site if you want to suppress feedback for those users.\n *\n * @example\n * ```ts\n * private readonly haptics = inject(WrHaptics);\n *\n * onDelete(): void {\n * this.haptics.warning(); // buzz before a destructive confirm\n * }\n *\n * onToggle(): void {\n * this.haptics.selection(); // subtle tick on a switch / segmented change\n * }\n * ```\n *\n * @see https://ngwr.dev/reference/services/platform\n */\n@Service()\nexport class WrHaptics {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly nav = this.isBrowser ? (inject(DOCUMENT).defaultView?.navigator ?? null) : null;\n\n /** Whether the Vibration API is available (browser + `navigator.vibrate`). */\n readonly supported: boolean = !!this.nav && typeof this.nav.vibrate === 'function';\n\n /**\n * Fire a raw vibration pattern — a single duration in ms, or an alternating\n * `[buzz, pause, buzz, …]` array. Returns whether it was dispatched; passing\n * `0` / `[]` cancels any ongoing vibration.\n */\n vibrate(pattern: number | readonly number[]): boolean {\n if (!this.supported) return false;\n try {\n // `VibratePattern` is `number | number[]`; readonly arrays are accepted\n // at runtime, so clone to satisfy the mutable-array signature.\n return this.nav!.vibrate(typeof pattern === 'number' ? pattern : [...pattern]);\n } catch {\n return false;\n }\n }\n\n /** A physical \"tap\" — `light`, `medium` (default), or `heavy`. */\n impact(strength: WrHapticImpact = 'medium'): boolean {\n return this.vibrate(PATTERNS[strength]);\n }\n\n /** A subtle tick for a discrete change (switch, segmented, stepper). */\n selection(): boolean {\n return this.vibrate(PATTERNS.selection);\n }\n\n /** A confirming pulse for a completed action. */\n success(): boolean {\n return this.vibrate(PATTERNS.success);\n }\n\n /** A cautioning pulse before a risky or destructive action. */\n warning(): boolean {\n return this.vibrate(PATTERNS.warning);\n }\n\n /** A buzzing pulse for a failure or rejected action. */\n error(): boolean {\n return this.vibrate(PATTERNS.error);\n }\n\n /** Cancel any in-progress vibration. */\n stop(): void {\n this.vibrate(0);\n }\n}\n\nexport type { WrHapticImpact };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;;;;;AAoBG;MAEU,UAAU,CAAA;AACJ,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;IAE9B,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAClD,IAAA,QAAQ,GAAG,CAAC,IAAI,CAAC,SAAS;IAC1B,SAAS,GAAkB,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,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AAC,CAAC;QAChF;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,KAAK;QACd;IACF;;IAGA,MAAM,CAAC,WAA2B,QAAQ,EAAA;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC;;IAGA,SAAS,GAAA;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IACzC;;IAGA,OAAO,GAAA;QACL,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACvC;;IAGA,OAAO,GAAA;QACL,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACvC;;IAGA,KAAK,GAAA;QACH,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IACrC;;IAGA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACjB;uGAnDW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA;wGAAT,SAAS,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB;;;ACzDD;;AAEG;;;;"}
|
|
@@ -43,10 +43,10 @@ class WrPopconfirmPanel {
|
|
|
43
43
|
...(ngDevMode ? [{ debugName: "confirmColor" }] : /* istanbul ignore next */ []));
|
|
44
44
|
confirmed = output();
|
|
45
45
|
cancelled = output();
|
|
46
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopconfirmPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrPopconfirmPanel, isStandalone: true, selector: "wr-popconfirm", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, confirmColor: { classPropertyName: "confirmColor", publicName: "confirmColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { classAttribute: "wr-popconfirm" }, ngImport: i0, template: "<p class=\"wr-popconfirm__message\">{{ message() }}</p>\n\n<div class=\"wr-popconfirm__actions\">\n <wr-btn size=\"sm\" (click)=\"cancelled.emit()\">{{ cancelText() }}</wr-btn>\n <wr-btn size=\"sm\" [color]=\"confirmColor()\" (click)=\"confirmed.emit()\">{{ confirmText() }}</wr-btn>\n</div>\n", dependencies: [{ kind: "component", type: WrButton, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: ["color", "size", "shape", "icon", "iconPosition", "disabled", "outlined", "block", "loading", "isDisabledWhenLoading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopconfirmPanel, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{ selector: 'wr-popconfirm', encapsulation: ViewEncapsulation.None, host: { class: 'wr-popconfirm' }, imports: [WrButton], template: "<p class=\"wr-popconfirm__message\">{{ message() }}</p>\n\n<div class=\"wr-popconfirm__actions\">\n <wr-btn size=\"sm\" (click)=\"cancelled.emit()\">{{ cancelText() }}</wr-btn>\n <wr-btn size=\"sm\" [color]=\"confirmColor()\" (click)=\"confirmed.emit()\">{{ confirmText() }}</wr-btn>\n</div>\n" }]
|
|
52
52
|
}], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirmText: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], confirmColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmColor", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
|
|
@@ -72,7 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
72
72
|
* >Delete</wr-btn>
|
|
73
73
|
* ```
|
|
74
74
|
*
|
|
75
|
-
* @see https://ngwr.dev/components/popconfirm
|
|
75
|
+
* @see https://ngwr.dev/reference/components/popconfirm
|
|
76
76
|
*/
|
|
77
77
|
class WrPopconfirm {
|
|
78
78
|
/** Confirmation message. */
|
|
@@ -169,10 +169,10 @@ class WrPopconfirm {
|
|
|
169
169
|
this.overlayRef = null;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
173
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0
|
|
172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopconfirm, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
173
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: WrPopconfirm, isStandalone: true, selector: "[wrPopconfirm]", inputs: { message: { classPropertyName: "message", publicName: "wrPopconfirm", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, confirmColor: { classPropertyName: "confirmColor", publicName: "confirmColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { listeners: { "click": "toggle($event)" } }, ngImport: i0 });
|
|
174
174
|
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopconfirm, decorators: [{
|
|
176
176
|
type: Directive,
|
|
177
177
|
args: [{
|
|
178
178
|
selector: '[wrPopconfirm]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-popconfirm.mjs","sources":["../../../projects/lib/popconfirm/interfaces/popconfirm-position.ts","../../../projects/lib/popconfirm/popconfirm-panel.ts","../../../projects/lib/popconfirm/popconfirm-panel.html","../../../projects/lib/popconfirm/popconfirm.ts","../../../projects/lib/popconfirm/ngwr-popconfirm.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopconfirmPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/** @internal */\nexport const WR_POPCONFIRM_POSITIONS: Record<WrPopconfirmPosition, ConnectedPosition[]> = {\n top: [{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 }],\n bottom: [{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 }],\n left: [{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 }],\n right: [{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 }],\n};\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, input, output } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport type { WrColor } from 'ngwr/theme';\n\n/**\n * Confirmation panel rendered inside the popconfirm overlay. Not part\n * of the public template API — use `[wrPopconfirm]` instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popconfirm',\n templateUrl: './popconfirm-panel.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-popconfirm' },\n imports: [WrButton],\n})\nexport class WrPopconfirmPanel {\n readonly message = input.required<string>();\n readonly confirmText = input<string>('Confirm');\n readonly cancelText = input<string>('Cancel');\n readonly confirmColor = input<WrColor>('primary');\n\n readonly confirmed = output<void>();\n readonly cancelled = output<void>();\n}\n","<p class=\"wr-popconfirm__message\">{{ message() }}</p>\n\n<div class=\"wr-popconfirm__actions\">\n <wr-btn size=\"sm\" (click)=\"cancelled.emit()\">{{ cancelText() }}</wr-btn>\n <wr-btn size=\"sm\" [color]=\"confirmColor()\" (click)=\"confirmed.emit()\">{{ confirmText() }}</wr-btn>\n</div>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY } from 'ngwr/overlay';\nimport type { WrColor } from 'ngwr/theme';\n\nimport { WR_POPCONFIRM_POSITIONS, type WrPopconfirmPosition } from './interfaces';\nimport { WrPopconfirmPanel } from './popconfirm-panel';\n\n/**\n * Small \"Are you sure?\" panel anchored to its trigger. Fires `confirmed`\n * or `cancelled` and closes automatically. Built on CDK Overlay.\n *\n * @example\n * ```html\n * <wr-btn\n * color=\"danger\"\n * [wrPopconfirm]=\"'Delete this item?'\"\n * confirmColor=\"danger\"\n * confirmText=\"Delete\"\n * (confirmed)=\"remove()\"\n * >Delete</wr-btn>\n * ```\n *\n * @see https://ngwr.dev/components/popconfirm\n */\n@Directive({\n selector: '[wrPopconfirm]',\n host: { '(click)': 'toggle($event)' },\n})\nexport class WrPopconfirm {\n /** Confirmation message. */\n readonly message = input.required<string>({ alias: 'wrPopconfirm' });\n\n /** Anchor side. @default 'top' */\n readonly position = input<WrPopconfirmPosition>('top');\n\n /** Label for the confirm button. @default 'Confirm' */\n readonly confirmText = input<string>('Confirm');\n\n /** Label for the cancel button. @default 'Cancel' */\n readonly cancelText = input<string>('Cancel');\n\n /** Color of the confirm button. @default 'primary' */\n readonly confirmColor = input<WrColor>('primary');\n\n /** Fires when the user clicks confirm. */\n readonly confirmed = output<void>();\n\n /** Fires when the user clicks cancel or dismisses the overlay. */\n readonly cancelled = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n private overlayRef: OverlayRef | null = null;\n\n constructor() {\n this.destroyRef.onDestroy(() => this.dispose());\n }\n\n /** @internal */\n protected toggle(event: MouseEvent): void {\n event.stopPropagation();\n if (this.overlayRef) {\n this.close();\n } else {\n this.open();\n }\n }\n\n open(): void {\n if (this.overlayRef) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(WR_POPCONFIRM_POSITIONS[this.position()])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-popconfirm-overlay', `wr-popconfirm-overlay--${this.position()}`],\n });\n\n const portal = new ComponentPortal(WrPopconfirmPanel, this.vcr);\n const ref = this.overlayRef.attach(portal);\n ref.setInput('message', this.message());\n ref.setInput('confirmText', this.confirmText());\n ref.setInput('cancelText', this.cancelText());\n ref.setInput('confirmColor', this.confirmColor());\n\n ref.instance.confirmed.subscribe(() => {\n this.confirmed.emit();\n this.close();\n });\n ref.instance.cancelled.subscribe(() => this.dismiss());\n\n this.overlayRef\n .outsidePointerEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.dismiss();\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n close(): void {\n this.dispose();\n }\n\n private dismiss(): void {\n if (!this.overlayRef) return;\n this.cancelled.emit();\n this.dispose();\n }\n\n private dispose(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;AAKG;AAMH;AACO,MAAM,uBAAuB,GAAsD;IACxF,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACnG,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,KAAK,EAAE,CAAC,EAAE,O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AA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACtC,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-popconfirm.mjs","sources":["../../../projects/lib/popconfirm/interfaces/popconfirm-position.ts","../../../projects/lib/popconfirm/popconfirm-panel.ts","../../../projects/lib/popconfirm/popconfirm-panel.html","../../../projects/lib/popconfirm/popconfirm.ts","../../../projects/lib/popconfirm/ngwr-popconfirm.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopconfirmPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/** @internal */\nexport const WR_POPCONFIRM_POSITIONS: Record<WrPopconfirmPosition, ConnectedPosition[]> = {\n top: [{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 }],\n bottom: [{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 }],\n left: [{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 }],\n right: [{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 }],\n};\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, input, output } from '@angular/core';\n\nimport { WrButton } from 'ngwr/button';\nimport type { WrColor } from 'ngwr/theme';\n\n/**\n * Confirmation panel rendered inside the popconfirm overlay. Not part\n * of the public template API — use `[wrPopconfirm]` instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popconfirm',\n templateUrl: './popconfirm-panel.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-popconfirm' },\n imports: [WrButton],\n})\nexport class WrPopconfirmPanel {\n readonly message = input.required<string>();\n readonly confirmText = input<string>('Confirm');\n readonly cancelText = input<string>('Cancel');\n readonly confirmColor = input<WrColor>('primary');\n\n readonly confirmed = output<void>();\n readonly cancelled = output<void>();\n}\n","<p class=\"wr-popconfirm__message\">{{ message() }}</p>\n\n<div class=\"wr-popconfirm__actions\">\n <wr-btn size=\"sm\" (click)=\"cancelled.emit()\">{{ cancelText() }}</wr-btn>\n <wr-btn size=\"sm\" [color]=\"confirmColor()\" (click)=\"confirmed.emit()\">{{ confirmText() }}</wr-btn>\n</div>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY } from 'ngwr/overlay';\nimport type { WrColor } from 'ngwr/theme';\n\nimport { WR_POPCONFIRM_POSITIONS, type WrPopconfirmPosition } from './interfaces';\nimport { WrPopconfirmPanel } from './popconfirm-panel';\n\n/**\n * Small \"Are you sure?\" panel anchored to its trigger. Fires `confirmed`\n * or `cancelled` and closes automatically. Built on CDK Overlay.\n *\n * @example\n * ```html\n * <wr-btn\n * color=\"danger\"\n * [wrPopconfirm]=\"'Delete this item?'\"\n * confirmColor=\"danger\"\n * confirmText=\"Delete\"\n * (confirmed)=\"remove()\"\n * >Delete</wr-btn>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popconfirm\n */\n@Directive({\n selector: '[wrPopconfirm]',\n host: { '(click)': 'toggle($event)' },\n})\nexport class WrPopconfirm {\n /** Confirmation message. */\n readonly message = input.required<string>({ alias: 'wrPopconfirm' });\n\n /** Anchor side. @default 'top' */\n readonly position = input<WrPopconfirmPosition>('top');\n\n /** Label for the confirm button. @default 'Confirm' */\n readonly confirmText = input<string>('Confirm');\n\n /** Label for the cancel button. @default 'Cancel' */\n readonly cancelText = input<string>('Cancel');\n\n /** Color of the confirm button. @default 'primary' */\n readonly confirmColor = input<WrColor>('primary');\n\n /** Fires when the user clicks confirm. */\n readonly confirmed = output<void>();\n\n /** Fires when the user clicks cancel or dismisses the overlay. */\n readonly cancelled = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n private overlayRef: OverlayRef | null = null;\n\n constructor() {\n this.destroyRef.onDestroy(() => this.dispose());\n }\n\n /** @internal */\n protected toggle(event: MouseEvent): void {\n event.stopPropagation();\n if (this.overlayRef) {\n this.close();\n } else {\n this.open();\n }\n }\n\n open(): void {\n if (this.overlayRef) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(WR_POPCONFIRM_POSITIONS[this.position()])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-popconfirm-overlay', `wr-popconfirm-overlay--${this.position()}`],\n });\n\n const portal = new ComponentPortal(WrPopconfirmPanel, this.vcr);\n const ref = this.overlayRef.attach(portal);\n ref.setInput('message', this.message());\n ref.setInput('confirmText', this.confirmText());\n ref.setInput('cancelText', this.cancelText());\n ref.setInput('confirmColor', this.confirmColor());\n\n ref.instance.confirmed.subscribe(() => {\n this.confirmed.emit();\n this.close();\n });\n ref.instance.cancelled.subscribe(() => this.dismiss());\n\n this.overlayRef\n .outsidePointerEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.dismiss();\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n close(): void {\n this.dispose();\n }\n\n private dismiss(): void {\n if (!this.overlayRef) return;\n this.cancelled.emit();\n this.dispose();\n }\n\n private dispose(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;AAKG;AAMH;AACO,MAAM,uBAAuB,GAAsD;IACxF,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACnG,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC;IACjG,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;CAClG;;ACjBD;;;;;AAKG;AAOH;;;;;AAKG;MAQU,iBAAiB,CAAA;IACnB,OAAO,GA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,EAAE,gBAAgB,EAAE;AACtC,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
@@ -45,10 +45,10 @@ const WR_POPOVER_POSITIONS = {
|
|
|
45
45
|
class WrPopoverTextPanel {
|
|
46
46
|
text = input.required(/* @ts-ignore */
|
|
47
47
|
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
49
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopoverTextPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: WrPopoverTextPanel, isStandalone: true, selector: "wr-popover-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, classAttribute: "wr-tooltip" }, ngImport: i0, template: '{{ text() }}', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopoverTextPanel, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: 'wr-popover-text',
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
92
92
|
* </button>
|
|
93
93
|
* ```
|
|
94
94
|
*
|
|
95
|
-
* @see https://ngwr.dev/components/popover
|
|
95
|
+
* @see https://ngwr.dev/reference/components/popover
|
|
96
96
|
*/
|
|
97
97
|
let popoverUid = 0;
|
|
98
98
|
class WrPopover {
|
|
@@ -361,10 +361,10 @@ class WrPopover {
|
|
|
361
361
|
this.hoverCloseTimer = null;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
365
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0
|
|
364
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
365
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: WrPopover, isStandalone: true, selector: "[wrPopover]", inputs: { content: { classPropertyName: "content", publicName: "wrPopover", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave($event)", "focus": "onFocus()", "blur": "onBlur()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-haspopup": "isTooltip() ? null : \"dialog\"", "attr.aria-expanded": "isTooltip() ? null : isOpen()", "attr.aria-controls": "!isTooltip() && isOpen() ? panelId : null", "attr.aria-describedby": "isTooltip() && isOpen() ? panelId : null" } }, ngImport: i0 });
|
|
366
366
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrPopover, decorators: [{
|
|
368
368
|
type: Directive,
|
|
369
369
|
args: [{
|
|
370
370
|
selector: '[wrPopover]',
|