ngwr 16.4.0 → 16.6.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/back-top/styles/_index.scss +6 -0
- package/breadcrumbs/styles/_rules.scss +34 -0
- package/cascader/styles/_rules.scss +7 -0
- package/charts/bar-chart/styles/_index.scss +494 -305
- package/charts/boxplot-chart/styles/_index.scss +114 -48
- package/charts/bullet-chart/styles/_index.scss +113 -42
- package/charts/calendar-heatmap/styles/_index.scss +111 -20
- package/charts/candlestick-chart/styles/_index.scss +61 -26
- package/charts/chart-legend/styles/_index.scss +120 -10
- package/charts/core/styles/_index.scss +201 -5
- package/charts/donut-chart/styles/_index.scss +76 -21
- package/charts/funnel-chart/styles/_index.scss +66 -38
- package/charts/gauge/styles/_index.scss +12 -1
- package/charts/heatmap-chart/styles/_index.scss +90 -53
- package/charts/line-chart/styles/_index.scss +143 -139
- package/charts/meter-group/styles/_index.scss +87 -25
- package/charts/radar-chart/styles/_index.scss +82 -40
- package/charts/scatter-chart/styles/_index.scss +117 -44
- package/charts/sparkline/styles/_index.scss +7 -1
- package/charts/treemap-chart/styles/_index.scss +94 -42
- package/charts/waterfall-chart/styles/_index.scss +150 -87
- package/color-picker/styles/_index.scss +7 -3
- package/copy-value/styles/_index.scss +21 -2
- package/counter/styles/_index.scss +1 -8
- package/date-picker/styles/_index.scss +15 -9
- package/date-stamp/styles/_index.scss +2 -1
- package/dialog/styles/_index.scss +43 -0
- package/drawer/styles/_index.scss +5 -1
- package/editor/styles/_index.scss +1 -8
- package/event-calendar/styles/_index.scss +2 -6
- package/fesm2022/ngwr-affix.mjs +1 -1
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +9 -2
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
- package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
- package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
- package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
- package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
- package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
- package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
- package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
- package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-tilt.mjs +20 -13
- package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
- package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +40 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +12 -3
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +4 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +27 -2
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +72 -8
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +311 -23
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +98 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +225 -31
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +3 -2
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +65 -5
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +51 -24
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
- package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +38 -2
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +105 -9
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +29 -11
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +9 -6
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +35 -6
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +20 -9
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +170 -3
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +81 -13
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +20 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +20 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +20 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +20 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +20 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +20 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +20 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +20 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +20 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +20 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +20 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +20 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +20 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +20 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +20 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +20 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +20 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +20 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +20 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +20 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +20 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +20 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +82 -11
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +24 -1
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +2 -2
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +10 -2
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +20 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +1 -1
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +8 -0
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +9 -6
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +21 -0
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +2 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +8 -1
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +43 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +114 -15
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +6 -2
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +71 -5
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +12 -1
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +1 -3
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +20 -0
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +80 -9
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +16 -4
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +1 -1
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +2 -2
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +43 -7
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +2 -2
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +28 -0
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +16 -11
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +49 -16
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +20 -0
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils-router.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +46 -4
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +33 -1
- 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-window.mjs +16 -9
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/form/styles/_index.scss +37 -0
- package/graph/styles/_index.scss +1 -9
- package/i18n/ar.json +20 -0
- package/i18n/cs.json +20 -0
- package/i18n/de.json +20 -0
- package/i18n/en.json +20 -0
- package/i18n/es.json +20 -0
- package/i18n/fr.json +20 -0
- package/i18n/he.json +20 -0
- package/i18n/hi.json +20 -0
- package/i18n/id.json +20 -0
- package/i18n/it.json +20 -0
- package/i18n/ja.json +20 -0
- package/i18n/ko.json +20 -0
- package/i18n/nl.json +20 -0
- package/i18n/pl.json +20 -0
- package/i18n/pt.json +20 -0
- package/i18n/ru.json +20 -0
- package/i18n/sv.json +20 -0
- package/i18n/tr.json +20 -0
- package/i18n/uk.json +20 -0
- package/i18n/vi.json +20 -0
- package/i18n/zh-TW.json +20 -0
- package/i18n/zh.json +20 -0
- package/image-cropper/styles/_index.scss +1 -9
- package/input-number/styles/_index.scss +7 -0
- package/layout/styles/_index.scss +13 -1
- package/llms-full.txt +17 -17
- package/llms.txt +7 -3
- package/loading-bar/styles/_rules.scss +6 -0
- package/package.json +2 -2
- package/page-header/styles/_index.scss +18 -0
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +31 -13
- package/schematics/use/symbol-map.json +3 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +7 -0
- package/sidebar/styles/_index.scss +6 -0
- package/skills/ngwr/references/catalog.md +2 -2
- package/sortable-list/styles/_rules.scss +1 -9
- package/speed-dial/styles/_index.scss +6 -0
- package/stepper/styles/_index.scss +1 -9
- package/table/styles/_index.scss +49 -0
- package/theme/_index.scss +12 -1
- package/theme/styles/_colors.scss +11 -0
- package/theme/styles/_contrast.scss +6 -0
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +45 -0
- package/theme/styles/_print.scss +17 -0
- package/toast/styles/_index.scss +7 -0
- package/tour/styles/_index.scss +14 -0
- package/tree/styles/_index.scss +1 -9
- package/types/ngwr-anchor.d.ts +3 -0
- package/types/ngwr-animations-aurora.d.ts +6 -0
- package/types/ngwr-animations-blur-reveal.d.ts +6 -0
- package/types/ngwr-animations-click-sparks.d.ts +6 -0
- package/types/ngwr-animations-confetti.d.ts +6 -0
- package/types/ngwr-animations-decode.d.ts +6 -0
- package/types/ngwr-animations-destruct.d.ts +6 -0
- package/types/ngwr-animations-dot-grid.d.ts +6 -0
- package/types/ngwr-animations-falling-letters.d.ts +6 -0
- package/types/ngwr-animations-flow-lines.d.ts +6 -0
- package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
- package/types/ngwr-animations-glitch.d.ts +6 -0
- package/types/ngwr-animations-glow-border.d.ts +6 -0
- package/types/ngwr-animations-gradient-flow.d.ts +6 -0
- package/types/ngwr-animations-marquee.d.ts +6 -0
- package/types/ngwr-animations-orbit.d.ts +6 -0
- package/types/ngwr-animations-reveal.d.ts +6 -0
- package/types/ngwr-animations-ripple-grid.d.ts +6 -0
- package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
- package/types/ngwr-animations-shimmer.d.ts +6 -0
- package/types/ngwr-animations-spotlight.d.ts +6 -0
- package/types/ngwr-animations-thread-lines.d.ts +6 -0
- package/types/ngwr-animations-tilt.d.ts +10 -0
- package/types/ngwr-animations-typewriter.d.ts +6 -0
- package/types/ngwr-breadcrumbs.d.ts +25 -0
- package/types/ngwr-button.d.ts +23 -3
- package/types/ngwr-carousel-testing.d.ts +6 -4
- package/types/ngwr-carousel.d.ts +16 -3
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +34 -3
- package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
- package/types/ngwr-charts-bar-chart.d.ts +220 -48
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
- package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
- package/types/ngwr-charts-bullet-chart.d.ts +72 -12
- package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
- package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
- package/types/ngwr-charts-chart-legend.d.ts +142 -5
- package/types/ngwr-charts-core.d.ts +275 -21
- package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -16
- package/types/ngwr-charts-funnel-chart.d.ts +62 -6
- package/types/ngwr-charts-gauge-testing.d.ts +5 -1
- package/types/ngwr-charts-gauge.d.ts +72 -10
- package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
- package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
- package/types/ngwr-charts-line-chart.d.ts +215 -86
- package/types/ngwr-charts-meter-group.d.ts +98 -7
- package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
- package/types/ngwr-charts-radar-chart.d.ts +148 -28
- package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
- package/types/ngwr-charts-scatter-chart.d.ts +188 -18
- package/types/ngwr-charts-sparkline.d.ts +26 -4
- package/types/ngwr-charts-treemap-chart.d.ts +121 -23
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
- package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
- package/types/ngwr-checkbox.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +28 -0
- package/types/ngwr-context-menu-testing.d.ts +10 -9
- package/types/ngwr-context-menu.d.ts +18 -1
- package/types/ngwr-copy-value.d.ts +8 -0
- package/types/ngwr-date-picker.d.ts +53 -2
- package/types/ngwr-dialog.d.ts +64 -13
- package/types/ngwr-directives.d.ts +12 -4
- package/types/ngwr-drawer.d.ts +33 -2
- package/types/ngwr-dropdown-testing.d.ts +8 -5
- package/types/ngwr-dropdown.d.ts +29 -6
- package/types/ngwr-event-calendar.d.ts +4 -0
- package/types/ngwr-form.d.ts +85 -1
- package/types/ngwr-graph.d.ts +22 -6
- package/types/ngwr-i18n.d.ts +65 -5
- package/types/ngwr-input-number.d.ts +8 -0
- package/types/ngwr-input.d.ts +7 -0
- package/types/ngwr-layout.d.ts +1 -1
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-loading-bar-router.d.ts +6 -0
- package/types/ngwr-overlay.d.ts +16 -1
- package/types/ngwr-page-header.d.ts +23 -1
- package/types/ngwr-popconfirm-testing.d.ts +11 -2
- package/types/ngwr-popconfirm.d.ts +29 -2
- package/types/ngwr-popover.d.ts +87 -13
- package/types/ngwr-radio.d.ts +47 -5
- package/types/ngwr-segmented.d.ts +7 -0
- package/types/ngwr-select.d.ts +57 -13
- package/types/ngwr-sortable-list.d.ts +20 -7
- package/types/ngwr-table.d.ts +59 -6
- package/types/ngwr-tabs-router.d.ts +6 -0
- package/types/ngwr-toast.d.ts +11 -0
- package/types/ngwr-tour.d.ts +21 -3
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +33 -2
- package/types/ngwr-typography.d.ts +7 -0
- package/types/ngwr-utils-router.d.ts +6 -0
- package/types/ngwr-utils.d.ts +56 -2
- package/types/ngwr-validators.d.ts +49 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +14 -11
- package/typography/styles/_index.scss +4 -0
- package/window/styles/_index.scss +6 -19
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import { isDevMode } from "@angular/core";
|
|
2
2
|
import { wrParseDate } from "ngwr/date";
|
|
3
|
+
import { required, requiredError, validate } from "@angular/forms/signals";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
function messageOf(message, ctx) {
|
|
11
|
+
return typeof message === "function" ? message(ctx) : message;
|
|
12
|
+
}
|
|
13
|
+
function wrMatches(path, otherPath, options) {
|
|
14
|
+
validate(path, (ctx) => {
|
|
15
|
+
const value = ctx.value();
|
|
16
|
+
if (value == null || value === "") return void 0;
|
|
17
|
+
if (options?.when && !options.when(ctx)) return void 0;
|
|
18
|
+
if (value === ctx.valueOf(otherPath)) return void 0;
|
|
19
|
+
return {
|
|
20
|
+
kind: "match",
|
|
21
|
+
target: String(ctx.stateOf(otherPath).keyInParent()),
|
|
22
|
+
message: messageOf(options?.message, ctx)
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function wrNotBlank(path, options) {
|
|
27
|
+
required(path, options);
|
|
28
|
+
validate(path, (ctx) => {
|
|
29
|
+
const value = ctx.value();
|
|
30
|
+
if (typeof value !== "string" || value === "" || value.trim() !== "") return void 0;
|
|
31
|
+
if (options?.when && !options.when(ctx)) return void 0;
|
|
32
|
+
return requiredError({ message: messageOf(options?.message, ctx) });
|
|
33
|
+
});
|
|
34
|
+
}
|
|
3
35
|
/**
|
|
4
36
|
* @license
|
|
5
37
|
*
|
|
@@ -191,6 +223,6 @@ const WrValidators = {
|
|
|
191
223
|
};
|
|
192
224
|
}
|
|
193
225
|
};
|
|
194
|
-
export { WrValidators };
|
|
226
|
+
export { WrValidators, wrMatches, wrNotBlank };
|
|
195
227
|
|
|
196
228
|
//# sourceMappingURL=ngwr-validators.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-validators.mjs","names":[],"sources":["../../../projects/lib/validators/wr-validators.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 { isDevMode } from '@angular/core';\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\nimport { wrParseDate } from 'ngwr/date';\n\nfunction stringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v.trim();\n if (typeof v === 'number' || typeof v === 'boolean') return String(v).trim();\n return '';\n}\n\n/** Like {@link stringValue} but preserves whitespace — for checks that inspect spacing. */\nfunction rawStringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n return '';\n}\n\n/**\n * `localhost` or a dotted name, then a port: a host the user typed without a\n * scheme, not a scheme of that name. A one-label name (`tel:911`) is left a\n * scheme, since nothing in the text tells the two apart; so is `myhost:8080`.\n */\nconst HOST_WITH_PORT = /^(?:localhost|[a-z0-9-]+(?:\\.[a-z0-9-]+)+):\\d+(?:[/?#]|$)/i;\n\n/** Luhn checksum. Returns true when the digit string is a valid card number. */\nfunction luhn(digits: string): boolean {\n let sum = 0;\n let dbl = false;\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits.charCodeAt(i) - 48;\n if (dbl) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n sum += d;\n dbl = !dbl;\n }\n return sum % 10 === 0;\n}\n\n/** ISO 13616 mod-97 check for IBANs. Returns the remainder; valid IBANs yield 1. */\nfunction mod97(iban: string): number {\n // Move first 4 chars to the end + convert letters to digits (A=10..Z=35).\n const rearranged = iban.slice(4) + iban.slice(0, 4);\n let expanded = '';\n for (let i = 0; i < rearranged.length; i++) {\n const code = rearranged.charCodeAt(i);\n if (code >= 65 && code <= 90) expanded += (code - 55).toString();\n else expanded += rearranged.charAt(i);\n }\n // Apply mod 97 in chunks — BigInt isn't necessary.\n let remainder = 0;\n for (let i = 0; i < expanded.length; i += 7) {\n const slice = remainder.toString() + expanded.substring(i, i + 7);\n remainder = Number.parseInt(slice, 10) % 97;\n }\n return remainder;\n}\n\n/**\n * A bound or a value as milliseconds, read as `wrParseDate` reads it. A date-only\n * string (`'2026-01-01'`) is that day's LOCAL midnight, so `minDate('2026-01-01')`\n * accepts the 1 January a date picker emits, in every zone, and a backend's\n * `'2026-01-01 14:30:00'` is the instant its `T` form names.\n */\nfunction toMs(value: unknown): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value !== 'string' && typeof value !== 'number') return Number.NaN;\n return wrParseDate(value)?.getTime() ?? Number.NaN;\n}\n\n/**\n * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps\n * one bit of per-instance state, a latch so its dev-mode misconfiguration\n * warning fires once rather than on every validation run; it is never read as\n * part of the result.) Mirrors the API shape of Angular's built-in\n * `Validators` so it composes cleanly:\n *\n * ```ts\n * import { Validators } from '@angular/forms';\n * import { WrValidators } from 'ngwr/validators';\n *\n * new FormControl('', [\n * Validators.required,\n * WrValidators.cardNumber,\n * WrValidators.cvc(3),\n * WrValidators.match('password'),\n * WrValidators.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n * ]);\n * ```\n *\n * Each error is keyed under the validator name (e.g. `cardNumber`,\n * `cvc`, `iban`) so consumers can branch in templates.\n *\n * Anything Angular already ships (`required`, `email`, `min`, `max`,\n * `pattern`, …) is deliberately NOT duplicated here.\n *\n * @see https://ngwr.dev/reference/validators\n */\nexport const WrValidators = {\n // String shape\n\n /** No whitespace anywhere in the value. */\n noWhitespace: (control: AbstractControl): ValidationErrors | null => {\n const v = rawStringValue(control);\n if (v === '') return null;\n return /\\s/.test(v) ? { noWhitespace: true } : null;\n },\n\n /** 3, 4, 6, or 8-digit hex colour (`#abc`, `#1a2b3c`, `#1a2b3c4d`). */\n hexColor: (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(v) ? null : { hexColor: true };\n },\n\n // Network / payments\n\n /**\n * Valid URL. Accepts any scheme by default; pass `{ protocols: ['https'] }`\n * to restrict. A scheme is required by default; pass `{ requireProtocol: false }`\n * to also accept bare domains (e.g. `ngwr.dev`), assuming `https`. `localhost`\n * or a dotted name followed by a port (`ngwr.dev:8080`) is a bare domain, not a\n * scheme called `ngwr.dev`.\n */\n url: (options: { readonly protocols?: readonly string[]; readonly requireProtocol?: boolean } = {}): ValidatorFn => {\n const allow = options.protocols?.map(p => p.replace(/:$/, '').toLowerCase());\n const requireProtocol = options.requireProtocol ?? true;\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n // Without a scheme `new URL()` always throws, so this is the input it\n // cannot take — plus a host with a port. `localhost:4200` and\n // `ngwr.dev:443/docs` PARSE, the name before the colon being a legal\n // scheme and the port a legal path, and nobody typing one meant a scheme\n // called `localhost`.\n if (HOST_WITH_PORT.test(v) || !/^[a-z][a-z0-9+.-]*:/i.test(v)) {\n if (requireProtocol) return { url: true };\n // Bare domain support: when protocols aren't required, retry assuming\n // `https://`.\n let retried: URL;\n try {\n retried = new URL(`https://${v}`);\n } catch {\n return { url: true };\n }\n // Unreachable, and kept as a guard rather than deleted. `https` is a\n // WHATWG \"special\" scheme, which may not have an empty host, so\n // `new URL('https://' + v)` either threw above or produced one —\n // there is no `v` that lands here (checked by brute force over\n // two-character ASCII as well as by the spec). It stays because the\n // line above is the only thing making that true, and a future retry\n // through a non-special scheme would need it back.\n if (retried.host === '') {\n return { url: true };\n }\n if (allow && !allow.includes('https')) {\n return { url: { allowed: allow } };\n }\n return null;\n }\n let parsed: URL;\n try {\n parsed = new URL(v);\n } catch {\n return { url: true };\n }\n const protocol = parsed.protocol.replace(/:$/, '').toLowerCase();\n // WHATWG auto-inserts the authority for \"special\" schemes, so `http:host`\n // (missing `//`) still parses. Require the explicit `//` for those.\n const needsAuthority = ['http', 'https', 'ws', 'wss', 'ftp', 'file'].includes(protocol);\n if (needsAuthority && !/^[a-z][a-z0-9+.-]*:\\/\\//i.test(v)) {\n return { url: true };\n }\n if (allow && !allow.includes(protocol)) {\n return { url: { allowed: allow } };\n }\n return null;\n };\n },\n\n /** Credit card number — Luhn check + 13-19 digit length. Spaces and dashes are stripped first. */\n cardNumber: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/[\\s-]/g, '');\n if (raw === '') return null;\n if (!/^\\d{13,19}$/.test(raw)) return { cardNumber: true };\n return luhn(raw) ? null : { cardNumber: true };\n },\n\n /** CVC / CVV — N digits (default 3). Common: 3 for Visa/MC, 4 for Amex. */\n cvc: (length = 3): ValidatorFn => {\n const re = new RegExp(`^\\\\d{${length}}$`);\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return re.test(v) ? null : { cvc: { length } };\n };\n },\n\n /**\n * IBAN — basic structure (CC + 2 digits + up to 30 alphanumerics) +\n * the mod-97 check. Country-length tables not enforced.\n */\n iban: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/\\s/g, '').toUpperCase();\n if (raw === '') return null;\n if (!/^[A-Z]{2}\\d{2}[A-Z0-9]{4,30}$/.test(raw)) return { iban: true };\n return mod97(raw) === 1 ? null : { iban: true };\n },\n\n // Cross-field\n\n /**\n * Value must equal a sibling control's value (e.g. confirm-password).\n * The target lookup uses `control.parent.get(name)`, so it works\n * inside `FormGroup` and nested groups.\n *\n * **It cannot report a mismatch until something revalidates the control.**\n * Angular runs a control's validators inside the control's own constructor,\n * before the control has a parent — so the lookup finds nothing and this\n * returns `null`, and attaching the control to a group does not re-run it.\n *\n * `formControlName` revalidates when it binds, so a group rendered through\n * the reactive-forms directives corrects itself on its first change\n * detection. The window is open for everything that reads validity BEFORE\n * that: a route guard or resolver checking `form.valid`, a form built and\n * submitted from a service, a unit test. Such a group reports itself valid\n * with two values that plainly disagree.\n *\n * Put {@link WrValidators.matchFields} on the group to close it, and keep\n * this one on the child for the per-field message. They do not conflict —\n * different error keys, different hosts.\n *\n * @see WrValidators.matchFields\n */\n match: (targetName: string): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const target = control.parent?.get(targetName);\n if (!target) return null;\n return control.value === target.value ? null : { match: { target: targetName } };\n };\n },\n\n /**\n * Every named control must hold the same value — the group-level counterpart\n * to {@link WrValidators.match}. Attach it to the group that OWNS the fields,\n * not to one of its children.\n *\n * Unlike `match` this has no ordering hole: Angular attaches the children and\n * aggregates their values BEFORE it runs the group's own validators, so a\n * group built from a record whose fields already disagree is invalid the\n * moment it exists — no revalidation step, and nothing that depends on the\n * form having been rendered.\n *\n * Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a\n * nested group. `null`, `undefined` and `''` all count as the same empty\n * value; everything else is compared with `===`, so two equal `Date`s are NOT\n * equal — compare a derived primitive instead. **Disabled controls are\n * skipped**, which makes the rule compare exactly what `group.value`\n * contains, and the error names only the controls it actually compared.\n *\n * A name that resolves to nothing, or to a group or an array rather than a\n * leaf control, turns the whole check off and warns once per validator\n * instance in dev — never a partial comparison of the names that did\n * resolve, and never an error the user has no way to satisfy.\n *\n * The error lands on the GROUP, and `<wr-form-field>` only reads the one\n * control projected into it — so pair this with `match` for a per-field\n * message, or render it yourself from `form.hasError('matchFields')`.\n *\n * @example\n * ```ts\n * new FormGroup(\n * {\n * password: new FormControl(''),\n * confirm: new FormControl('', [WrValidators.match('password')]),\n * },\n * { validators: [WrValidators.matchFields('password', 'confirm')] },\n * );\n * ```\n */\n matchFields: (first: string, second: string, ...rest: readonly string[]): ValidatorFn => {\n // Frozen because the payload hands these names out: a consumer who mutated\n // the array would be editing the validator's own configuration, and a\n // `push` of a name that resolves to nothing switches the check OFF — the\n // form then goes valid with two values that plainly disagree.\n const fields: readonly string[] = Object.freeze([first, second, ...rest]);\n\n // Per-instance, never module-level: a shared latch is process-wide state\n // under SSR, where one request's warning would silence every later one.\n let warned = false;\n\n const warn = (message: string): void => {\n if (!isDevMode() || warned) return;\n warned = true;\n // `warn`, not `error`: a prerender worker forwards app console errors as\n // `ERROR …` and `scripts/build/showcase-app.ts` fails the build on them —\n // and adding the control later is a legitimate pattern, not a red build.\n // Reported rather than thrown for the same reason.\n // eslint-disable-next-line no-console -- a silent pass is the very bug this validator removes\n console.warn(`[NGWR] matchFields: ${message} — the check did not run.`);\n };\n\n return (group: AbstractControl): ValidationErrors | null => {\n const compared: string[] = [];\n const values: unknown[] = [];\n\n for (const name of fields) {\n const found = group.get(name);\n if (!found) {\n warn(`no control at \"${name}\". Names are AbstractControl.get() paths, relative to this group`);\n return null;\n }\n\n // A group or an array RESOLVES, so it slips past the check above and\n // would then be compared by reference against another container —\n // never equal, whatever the user types. `'billing'` instead of\n // `'billing.zip'` is the easy mistake, and it makes a form that can\n // never be submitted and says nothing about why.\n if ('controls' in found) {\n warn(`\"${name}\" is a group or an array; name a leaf control, e.g. \"${name}.<field>\"`);\n return null;\n }\n\n // A disabled control is absent from `group.value` and its own\n // validators do not run; blocking a form on a value the user cannot\n // edit is not a rule anyone can satisfy.\n if (found.disabled) continue;\n\n compared.push(name);\n values.push((found.value as unknown) ?? '');\n }\n\n if (values.length < 2) return null;\n // A fresh array, and only the names that actually took part: naming a\n // disabled control would point the reader at something they cannot edit.\n // No control VALUES — this guards passwords, and error objects reach the\n // DOM, logs and error reporters.\n return values.every(v => v === values[0]) ? null : { matchFields: { fields: [...compared] } };\n };\n },\n\n // Choice\n\n /** Value must be one of the allowed entries (strict equality). */\n oneOf: <T>(allowed: readonly T[]): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const v = control.value as T;\n if (v == null || (v as unknown) === '') return null;\n return allowed.includes(v) ? null : { oneOf: { allowed } };\n };\n },\n\n // Date bounds\n\n /**\n * Value (Date | parseable) must be ≥ `min`. A date-only string (`'2026-01-01'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-01-01 14:30:00'` is read as its `T` form.\n */\n minDate: (min: Date | string | number): ValidatorFn => {\n const minMs = toMs(min);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { minDate: { min } };\n return got >= minMs ? null : { minDate: { min } };\n };\n },\n\n /**\n * Value (Date | parseable) must be ≤ `max`. A date-only string (`'2026-12-31'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-12-31 14:30:00'` is read as its `T` form.\n */\n maxDate: (max: Date | string | number): ValidatorFn => {\n const maxMs = toMs(max);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { maxDate: { max } };\n return got <= maxMs ? null : { maxDate: { max } };\n };\n },\n};\n"],"mappings":";;;;;;;;AAYA,SAAS,YAAY,SAAwB;CAC3C,MAAM,IAAa,QAAQ;CAC3B,IAAI,KAAK,MAAM,OAAO;CACtB,IAAI,OAAO,MAAM,UAAU,OAAO,EAAE,KAAI;CACxC,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,WAAW,OAAO,OAAO,CAAC,CAAC,CAAC,KAAI;CAC1E,OAAO;AACT;AAGA,SAAS,eAAe,SAAwB;CAC9C,MAAM,IAAa,QAAQ;CAC3B,IAAI,KAAK,MAAM,OAAO;CACtB,IAAI,OAAO,MAAM,UAAU,OAAO;CAClC,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,WAAW,OAAO,OAAO,CAAC;CACpE,OAAO;AACT;AAOA,MAAM,iBAAiB;AAGvB,SAAS,KAAK,QAAc;CAC1B,IAAI,MAAM;CACV,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;EAC3C,IAAI,IAAI,OAAO,WAAW,CAAC,IAAI;EAC/B,IAAI,KAAK;GACP,KAAK;GACL,IAAI,IAAI,GAAG,KAAK;EAClB;EACA,OAAO;EACP,MAAM,CAAC;CACT;CACA,OAAO,MAAM,OAAO;AACtB;AAGA,SAAS,MAAM,MAAY;CAEzB,MAAM,aAAa,KAAK,MAAM,CAAC,IAAI,KAAK,MAAM,GAAG,CAAC;CAClD,IAAI,WAAW;CACf,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;EAC1C,MAAM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,YAAsC;EAC/C,QAAQ,YAAqD;GAC3D,MAAM,IAAI,QAAQ;GAClB,IAAI,KAAK,QAAS,MAAkB,IAAI,OAAO;GAC/C,OAAO,QAAQ,SAAS,CAAC,IAAI,OAAO,EAAE,OAAO,EAAE,QAAO,EAAE;EAC1D;CACF;CASA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;CAOA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;AACD"}
|
|
1
|
+
{"version":3,"file":"ngwr-validators.mjs","names":[],"sources":["../../../projects/lib/validators/rules.ts","../../../projects/lib/validators/wr-validators.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 {\n type LogicFn,\n type PathKind,\n type SchemaPath,\n type SchemaPathRules,\n required,\n requiredError,\n validate,\n} from '@angular/forms/signals';\n\nfunction messageOf<TContext>(\n message: string | ((ctx: TContext) => string) | undefined,\n ctx: TContext\n): string | undefined {\n return typeof message === 'function' ? message(ctx) : message;\n}\n\n/** What both rules accept, shaped like the options of Angular's own Signal Forms rules. */\nexport interface WrRuleOptions<TValue, TPathKind extends PathKind = PathKind.Root> {\n /** The sentence the error carries. With none, the error has a `kind` only and the app words it. */\n readonly message?: string | LogicFn<TValue, string, TPathKind>;\n /** The rule applies only while this returns `true`. */\n readonly when?: LogicFn<TValue, boolean, TPathKind>;\n}\n\n/**\n * Signal Forms rule: the value at `path` must equal the value at `otherPath`,\n * such as a password confirmation. The counterpart of `WrValidators.match`.\n *\n * The error is `{ kind: 'match', target }`, where `target` is the other field's\n * key, so one `validation.match` entry answers both forms flavours. It is\n * re-evaluated when either value changes.\n *\n * Silent while `path` is empty (`''`, `null` or `undefined`), the way Angular's\n * own `minLength` and `pattern` are: add `required` to refuse an empty value.\n * Values are compared with `===`.\n *\n * @example\n * ```ts\n * form(model, path => {\n * required(path.confirm);\n * wrMatches(path.confirm, path.password);\n * });\n * ```\n */\nexport function wrMatches<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n otherPath: SchemaPath<NoInfer<TValue>, SchemaPathRules, PathKind.Child>,\n options?: WrRuleOptions<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n const value = ctx.value();\n if (value == null || value === '') return undefined;\n if (options?.when && !options.when(ctx)) return undefined;\n if (value === ctx.valueOf(otherPath)) return undefined;\n\n return {\n kind: 'match',\n target: String(ctx.stateOf(otherPath).keyInParent()),\n message: messageOf(options?.message, ctx),\n };\n });\n}\n\n/**\n * Signal Forms rule: the string at `path` must hold something other than\n * whitespace. It is `required` that also refuses `' '`, so it replaces\n * `required` on the field rather than joining it.\n *\n * The error is Angular's own `{ kind: 'required' }` and the field is marked\n * required, so the copy and the asterisk an app already has for `required`\n * cover it. An empty string, `null` and `undefined` are refused by `required`\n * itself.\n *\n * @example\n * ```ts\n * form(model, path => {\n * wrNotBlank(path.reason, { message: 'Say why.' });\n * });\n * ```\n */\nexport function wrNotBlank<TValue extends string | null | undefined, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n options?: WrRuleOptions<TValue, TPathKind>\n): void {\n required(path, options);\n validate(path, ctx => {\n const value = ctx.value();\n // An empty string is `required`'s to report, and reporting it here too would print the message twice.\n if (typeof value !== 'string' || value === '' || value.trim() !== '') return undefined;\n if (options?.when && !options.when(ctx)) return undefined;\n\n return requiredError({ message: messageOf(options?.message, ctx) });\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 { isDevMode } from '@angular/core';\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\nimport { wrParseDate } from 'ngwr/date';\n\nfunction stringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v.trim();\n if (typeof v === 'number' || typeof v === 'boolean') return String(v).trim();\n return '';\n}\n\n/** Like {@link stringValue} but preserves whitespace — for checks that inspect spacing. */\nfunction rawStringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n return '';\n}\n\n/**\n * `localhost` or a dotted name, then a port: a host the user typed without a\n * scheme, not a scheme of that name. A one-label name (`tel:911`) is left a\n * scheme, since nothing in the text tells the two apart; so is `myhost:8080`.\n */\nconst HOST_WITH_PORT = /^(?:localhost|[a-z0-9-]+(?:\\.[a-z0-9-]+)+):\\d+(?:[/?#]|$)/i;\n\n/** Luhn checksum. Returns true when the digit string is a valid card number. */\nfunction luhn(digits: string): boolean {\n let sum = 0;\n let dbl = false;\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits.charCodeAt(i) - 48;\n if (dbl) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n sum += d;\n dbl = !dbl;\n }\n return sum % 10 === 0;\n}\n\n/** ISO 13616 mod-97 check for IBANs. Returns the remainder; valid IBANs yield 1. */\nfunction mod97(iban: string): number {\n // Move first 4 chars to the end + convert letters to digits (A=10..Z=35).\n const rearranged = iban.slice(4) + iban.slice(0, 4);\n let expanded = '';\n for (let i = 0; i < rearranged.length; i++) {\n const code = rearranged.charCodeAt(i);\n if (code >= 65 && code <= 90) expanded += (code - 55).toString();\n else expanded += rearranged.charAt(i);\n }\n // Apply mod 97 in chunks — BigInt isn't necessary.\n let remainder = 0;\n for (let i = 0; i < expanded.length; i += 7) {\n const slice = remainder.toString() + expanded.substring(i, i + 7);\n remainder = Number.parseInt(slice, 10) % 97;\n }\n return remainder;\n}\n\n/**\n * A bound or a value as milliseconds, read as `wrParseDate` reads it. A date-only\n * string (`'2026-01-01'`) is that day's LOCAL midnight, so `minDate('2026-01-01')`\n * accepts the 1 January a date picker emits, in every zone, and a backend's\n * `'2026-01-01 14:30:00'` is the instant its `T` form names.\n */\nfunction toMs(value: unknown): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value !== 'string' && typeof value !== 'number') return Number.NaN;\n return wrParseDate(value)?.getTime() ?? Number.NaN;\n}\n\n/**\n * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps\n * one bit of per-instance state, a latch so its dev-mode misconfiguration\n * warning fires once rather than on every validation run; it is never read as\n * part of the result.) Mirrors the API shape of Angular's built-in\n * `Validators` so it composes cleanly:\n *\n * ```ts\n * import { Validators } from '@angular/forms';\n * import { WrValidators } from 'ngwr/validators';\n *\n * new FormControl('', [\n * Validators.required,\n * WrValidators.cardNumber,\n * WrValidators.cvc(3),\n * WrValidators.match('password'),\n * WrValidators.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n * ]);\n * ```\n *\n * Each error is keyed under the validator name (e.g. `cardNumber`,\n * `cvc`, `iban`) so consumers can branch in templates.\n *\n * Anything Angular already ships (`required`, `email`, `min`, `max`,\n * `pattern`, …) is deliberately NOT duplicated here.\n *\n * @see https://ngwr.dev/reference/validators\n */\nexport const WrValidators = {\n // String shape\n\n /** No whitespace anywhere in the value. */\n noWhitespace: (control: AbstractControl): ValidationErrors | null => {\n const v = rawStringValue(control);\n if (v === '') return null;\n return /\\s/.test(v) ? { noWhitespace: true } : null;\n },\n\n /** 3, 4, 6, or 8-digit hex colour (`#abc`, `#1a2b3c`, `#1a2b3c4d`). */\n hexColor: (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(v) ? null : { hexColor: true };\n },\n\n // Network / payments\n\n /**\n * Valid URL. Accepts any scheme by default; pass `{ protocols: ['https'] }`\n * to restrict. A scheme is required by default; pass `{ requireProtocol: false }`\n * to also accept bare domains (e.g. `ngwr.dev`), assuming `https`. `localhost`\n * or a dotted name followed by a port (`ngwr.dev:8080`) is a bare domain, not a\n * scheme called `ngwr.dev`.\n */\n url: (options: { readonly protocols?: readonly string[]; readonly requireProtocol?: boolean } = {}): ValidatorFn => {\n const allow = options.protocols?.map(p => p.replace(/:$/, '').toLowerCase());\n const requireProtocol = options.requireProtocol ?? true;\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n // Without a scheme `new URL()` always throws, so this is the input it\n // cannot take — plus a host with a port. `localhost:4200` and\n // `ngwr.dev:443/docs` PARSE, the name before the colon being a legal\n // scheme and the port a legal path, and nobody typing one meant a scheme\n // called `localhost`.\n if (HOST_WITH_PORT.test(v) || !/^[a-z][a-z0-9+.-]*:/i.test(v)) {\n if (requireProtocol) return { url: true };\n // Bare domain support: when protocols aren't required, retry assuming\n // `https://`.\n let retried: URL;\n try {\n retried = new URL(`https://${v}`);\n } catch {\n return { url: true };\n }\n // Unreachable, and kept as a guard rather than deleted. `https` is a\n // WHATWG \"special\" scheme, which may not have an empty host, so\n // `new URL('https://' + v)` either threw above or produced one —\n // there is no `v` that lands here (checked by brute force over\n // two-character ASCII as well as by the spec). It stays because the\n // line above is the only thing making that true, and a future retry\n // through a non-special scheme would need it back.\n if (retried.host === '') {\n return { url: true };\n }\n if (allow && !allow.includes('https')) {\n return { url: { allowed: allow } };\n }\n return null;\n }\n let parsed: URL;\n try {\n parsed = new URL(v);\n } catch {\n return { url: true };\n }\n const protocol = parsed.protocol.replace(/:$/, '').toLowerCase();\n // WHATWG auto-inserts the authority for \"special\" schemes, so `http:host`\n // (missing `//`) still parses. Require the explicit `//` for those.\n const needsAuthority = ['http', 'https', 'ws', 'wss', 'ftp', 'file'].includes(protocol);\n if (needsAuthority && !/^[a-z][a-z0-9+.-]*:\\/\\//i.test(v)) {\n return { url: true };\n }\n if (allow && !allow.includes(protocol)) {\n return { url: { allowed: allow } };\n }\n return null;\n };\n },\n\n /** Credit card number — Luhn check + 13-19 digit length. Spaces and dashes are stripped first. */\n cardNumber: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/[\\s-]/g, '');\n if (raw === '') return null;\n if (!/^\\d{13,19}$/.test(raw)) return { cardNumber: true };\n return luhn(raw) ? null : { cardNumber: true };\n },\n\n /** CVC / CVV — N digits (default 3). Common: 3 for Visa/MC, 4 for Amex. */\n cvc: (length = 3): ValidatorFn => {\n const re = new RegExp(`^\\\\d{${length}}$`);\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return re.test(v) ? null : { cvc: { length } };\n };\n },\n\n /**\n * IBAN — basic structure (CC + 2 digits + up to 30 alphanumerics) +\n * the mod-97 check. Country-length tables not enforced.\n */\n iban: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/\\s/g, '').toUpperCase();\n if (raw === '') return null;\n if (!/^[A-Z]{2}\\d{2}[A-Z0-9]{4,30}$/.test(raw)) return { iban: true };\n return mod97(raw) === 1 ? null : { iban: true };\n },\n\n // Cross-field\n\n /**\n * Value must equal a sibling control's value (e.g. confirm-password).\n * The target lookup uses `control.parent.get(name)`, so it works\n * inside `FormGroup` and nested groups.\n *\n * **It cannot report a mismatch until something revalidates the control.**\n * Angular runs a control's validators inside the control's own constructor,\n * before the control has a parent — so the lookup finds nothing and this\n * returns `null`, and attaching the control to a group does not re-run it.\n *\n * `formControlName` revalidates when it binds, so a group rendered through\n * the reactive-forms directives corrects itself on its first change\n * detection. The window is open for everything that reads validity BEFORE\n * that: a route guard or resolver checking `form.valid`, a form built and\n * submitted from a service, a unit test. Such a group reports itself valid\n * with two values that plainly disagree.\n *\n * Put {@link WrValidators.matchFields} on the group to close it, and keep\n * this one on the child for the per-field message. They do not conflict —\n * different error keys, different hosts.\n *\n * @see WrValidators.matchFields\n */\n match: (targetName: string): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const target = control.parent?.get(targetName);\n if (!target) return null;\n return control.value === target.value ? null : { match: { target: targetName } };\n };\n },\n\n /**\n * Every named control must hold the same value — the group-level counterpart\n * to {@link WrValidators.match}. Attach it to the group that OWNS the fields,\n * not to one of its children.\n *\n * Unlike `match` this has no ordering hole: Angular attaches the children and\n * aggregates their values BEFORE it runs the group's own validators, so a\n * group built from a record whose fields already disagree is invalid the\n * moment it exists — no revalidation step, and nothing that depends on the\n * form having been rendered.\n *\n * Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a\n * nested group. `null`, `undefined` and `''` all count as the same empty\n * value; everything else is compared with `===`, so two equal `Date`s are NOT\n * equal — compare a derived primitive instead. **Disabled controls are\n * skipped**, which makes the rule compare exactly what `group.value`\n * contains, and the error names only the controls it actually compared.\n *\n * A name that resolves to nothing, or to a group or an array rather than a\n * leaf control, turns the whole check off and warns once per validator\n * instance in dev — never a partial comparison of the names that did\n * resolve, and never an error the user has no way to satisfy.\n *\n * The error lands on the GROUP, and `<wr-form-field>` only reads the one\n * control projected into it — so pair this with `match` for a per-field\n * message, or render it yourself from `form.hasError('matchFields')`.\n *\n * @example\n * ```ts\n * new FormGroup(\n * {\n * password: new FormControl(''),\n * confirm: new FormControl('', [WrValidators.match('password')]),\n * },\n * { validators: [WrValidators.matchFields('password', 'confirm')] },\n * );\n * ```\n */\n matchFields: (first: string, second: string, ...rest: readonly string[]): ValidatorFn => {\n // Frozen because the payload hands these names out: a consumer who mutated\n // the array would be editing the validator's own configuration, and a\n // `push` of a name that resolves to nothing switches the check OFF — the\n // form then goes valid with two values that plainly disagree.\n const fields: readonly string[] = Object.freeze([first, second, ...rest]);\n\n // Per-instance, never module-level: a shared latch is process-wide state\n // under SSR, where one request's warning would silence every later one.\n let warned = false;\n\n const warn = (message: string): void => {\n if (!isDevMode() || warned) return;\n warned = true;\n // `warn`, not `error`: a prerender worker forwards app console errors as\n // `ERROR …` and `scripts/build/showcase-app.ts` fails the build on them —\n // and adding the control later is a legitimate pattern, not a red build.\n // Reported rather than thrown for the same reason.\n // eslint-disable-next-line no-console -- a silent pass is the very bug this validator removes\n console.warn(`[NGWR] matchFields: ${message} — the check did not run.`);\n };\n\n return (group: AbstractControl): ValidationErrors | null => {\n const compared: string[] = [];\n const values: unknown[] = [];\n\n for (const name of fields) {\n const found = group.get(name);\n if (!found) {\n warn(`no control at \"${name}\". Names are AbstractControl.get() paths, relative to this group`);\n return null;\n }\n\n // A group or an array RESOLVES, so it slips past the check above and\n // would then be compared by reference against another container —\n // never equal, whatever the user types. `'billing'` instead of\n // `'billing.zip'` is the easy mistake, and it makes a form that can\n // never be submitted and says nothing about why.\n if ('controls' in found) {\n warn(`\"${name}\" is a group or an array; name a leaf control, e.g. \"${name}.<field>\"`);\n return null;\n }\n\n // A disabled control is absent from `group.value` and its own\n // validators do not run; blocking a form on a value the user cannot\n // edit is not a rule anyone can satisfy.\n if (found.disabled) continue;\n\n compared.push(name);\n values.push((found.value as unknown) ?? '');\n }\n\n if (values.length < 2) return null;\n // A fresh array, and only the names that actually took part: naming a\n // disabled control would point the reader at something they cannot edit.\n // No control VALUES — this guards passwords, and error objects reach the\n // DOM, logs and error reporters.\n return values.every(v => v === values[0]) ? null : { matchFields: { fields: [...compared] } };\n };\n },\n\n // Choice\n\n /** Value must be one of the allowed entries (strict equality). */\n oneOf: <T>(allowed: readonly T[]): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const v = control.value as T;\n if (v == null || (v as unknown) === '') return null;\n return allowed.includes(v) ? null : { oneOf: { allowed } };\n };\n },\n\n // Date bounds\n\n /**\n * Value (Date | parseable) must be ≥ `min`. A date-only string (`'2026-01-01'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-01-01 14:30:00'` is read as its `T` form.\n */\n minDate: (min: Date | string | number): ValidatorFn => {\n const minMs = toMs(min);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { minDate: { min } };\n return got >= minMs ? null : { minDate: { min } };\n };\n },\n\n /**\n * Value (Date | parseable) must be ≤ `max`. A date-only string (`'2026-12-31'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-12-31 14:30:00'` is read as its `T` form.\n */\n maxDate: (max: Date | string | number): ValidatorFn => {\n const maxMs = toMs(max);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { maxDate: { max } };\n return got <= maxMs ? null : { maxDate: { max } };\n };\n },\n};\n"],"mappings":";;;;;;;;;AAiBA,SAAS,UACP,SACA,KAAa;CAEb,OAAO,OAAO,YAAY,aAAa,QAAQ,GAAG,IAAI;AACxD;AA8BA,SAAgB,UACd,MACA,WACA,SAA0C;CAE1C,SAAS,OAAM,QAAM;EACnB,MAAM,QAAQ,IAAI,MAAK;EACvB,IAAI,SAAS,QAAQ,UAAU,IAAI,OAAO;EAC1C,IAAI,SAAS,QAAQ,CAAC,QAAQ,KAAK,GAAG,GAAG,OAAO;EAChD,IAAI,UAAU,IAAI,QAAQ,SAAS,GAAG,OAAO;EAE7C,OAAO;GACL,MAAM;GACN,QAAQ,OAAO,IAAI,QAAQ,SAAS,CA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,MAAM,OAAO,EAAE,IAAI,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAC,EAAE;EAC7F;CACF;CAKA,QAAW,YAAsC;EAC/C,QAAQ,YAAqD;GAC3D,MAAM,IAAI,QAAQ;GAClB,IAAI,KAAK,QAAS,MAAkB,IAAI,OAAO;GAC/C,OAAO,QAAQ,SAAS,CAAC,IAAI,OAAO,EAAE,OAAO,EAAE,QAAO,EAAE;EAC1D;CACF;CASA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;CAOA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;AACD"}
|
|
@@ -5,7 +5,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
7
|
*/
|
|
8
|
-
const NGWR_VERSION = "16.
|
|
8
|
+
const NGWR_VERSION = "16.6.0";
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.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\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.
|
|
1
|
+
{"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.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\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.6.0';\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 { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
|
package/fesm2022/ngwr-window.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { wrCheckStyles, wrClamp, wrFeature, wrRandomId, wrRestoreFocus, wrToClas
|
|
|
6
6
|
import { useI18nFormatter, useI18nText } from "ngwr/i18n";
|
|
7
7
|
import { Directionality } from "@angular/cdk/bidi";
|
|
8
8
|
import { ComponentPortal } from "@angular/cdk/portal";
|
|
9
|
-
import { WR_OVERLAY, wrFollowDirection } from "ngwr/overlay";
|
|
9
|
+
import { WR_OVERLAY, wrFocusOverlay, wrFollowDirection } from "ngwr/overlay";
|
|
10
10
|
import { FocusMonitor, FocusTrapFactory } from "@angular/cdk/a11y";
|
|
11
11
|
import { ReplaySubject, Subject } from "rxjs";
|
|
12
12
|
import { WrStorage } from "ngwr/storage";
|
|
@@ -72,6 +72,7 @@ var WrWindow = class WrWindow {
|
|
|
72
72
|
manager = inject(WrWindowManager);
|
|
73
73
|
elRef = inject(ElementRef);
|
|
74
74
|
focusTraps = inject(FocusTrapFactory);
|
|
75
|
+
ownInjector = inject(Injector);
|
|
75
76
|
dir = inject(Directionality, { optional: true });
|
|
76
77
|
endMove = null;
|
|
77
78
|
constructor() {
|
|
@@ -129,17 +130,20 @@ var WrWindow = class WrWindow {
|
|
|
129
130
|
maximize() {
|
|
130
131
|
this.model().maximize();
|
|
131
132
|
}
|
|
133
|
+
initialFocus = "dialog";
|
|
132
134
|
focusInitial() {
|
|
135
|
+
const mode = this.initialFocus;
|
|
133
136
|
const host = this.elRef.nativeElement;
|
|
134
137
|
if (!host.isConnected || this.state() === "minimized") return;
|
|
135
138
|
const body = host.querySelector(".wr-window__body");
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (moved) return;
|
|
139
|
+
const finder = this.focusTraps.create(body ?? host, true);
|
|
140
|
+
if (mode === "dialog") {
|
|
141
|
+
wrFocusOverlay(host, finder, mode, this.ownInjector);
|
|
142
|
+
return;
|
|
141
143
|
}
|
|
142
|
-
|
|
144
|
+
const moved = !!body && finder.focusInitialElement({ preventScroll: true });
|
|
145
|
+
finder.destroy();
|
|
146
|
+
if (!moved) host.focus({ preventScroll: true });
|
|
143
147
|
}
|
|
144
148
|
focusLast() {
|
|
145
149
|
const host = this.elRef.nativeElement;
|
|
@@ -652,7 +656,7 @@ var WrWindowContainer = class WrWindowContainer {
|
|
|
652
656
|
ref;
|
|
653
657
|
componentType;
|
|
654
658
|
childInjector;
|
|
655
|
-
autoFocus =
|
|
659
|
+
autoFocus = "dialog";
|
|
656
660
|
hostInjector = inject(Injector);
|
|
657
661
|
manager = inject(WrWindowManager);
|
|
658
662
|
storage = inject(WrStorage);
|
|
@@ -679,6 +683,7 @@ var WrWindowContainer = class WrWindowContainer {
|
|
|
679
683
|
const componentRef = this.contentVcr().createComponent(this.componentType, { injector: this.childInjector });
|
|
680
684
|
this.ref.componentRef = componentRef;
|
|
681
685
|
const w = this.wrWindow();
|
|
686
|
+
w.initialFocus = this.autoFocus || "dialog";
|
|
682
687
|
const model = this.ref._model;
|
|
683
688
|
this.ref._focusWindow = (mode) => afterNextRender(() => {
|
|
684
689
|
if (mode === "initial") {
|
|
@@ -1497,7 +1502,8 @@ var WrWindowManager = class WrWindowManager {
|
|
|
1497
1502
|
container.ref = ref;
|
|
1498
1503
|
container.componentType = component;
|
|
1499
1504
|
container.childInjector = childInjector;
|
|
1500
|
-
|
|
1505
|
+
const autoFocus = config.autoFocus ?? (pending ? false : "dialog");
|
|
1506
|
+
container.autoFocus = autoFocus === true ? "dialog" : autoFocus;
|
|
1501
1507
|
ref._returnFocus = opener;
|
|
1502
1508
|
overlayRef.keydownEvents().subscribe((event) => {
|
|
1503
1509
|
if (event.key !== "Escape" || event.defaultPrevented || !model.options().closeOnEscape) return;
|
|
@@ -2145,6 +2151,7 @@ var WrWindowTaskbar = class WrWindowTaskbar {
|
|
|
2145
2151
|
"position",
|
|
2146
2152
|
"arrow",
|
|
2147
2153
|
"wrDropdownDisabled",
|
|
2154
|
+
"wrDropdownAutoFocus",
|
|
2148
2155
|
"panelClass"
|
|
2149
2156
|
],
|
|
2150
2157
|
outputs: ["opened", "closed"],
|