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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-charts-calendar-heatmap.mjs","names":[],"sources":["../../../projects/lib/charts/calendar-heatmap/calendar-heatmap.ts","../../../projects/lib/charts/calendar-heatmap/calendar-heatmap.html"],"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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { WrChartTable, type WrChartTableData, useChartNumbers } from 'ngwr/charts/core';\nimport { wrDateLocale } from 'ngwr/date';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip } from 'ngwr/popover';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrHeatmapDatum } from './types';\n\ninterface Cell {\n readonly iso: string;\n /** The day as the reader's locale writes it — see `cellTitle`. */\n readonly date: Date;\n readonly value: number;\n readonly intensity: number;\n readonly week: number;\n readonly day: number;\n}\n\nfunction toIso(d: Date): string {\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, '0');\n const day = String(d.getDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n}\n\nfunction parseInput(value: string | Date): Date {\n return value instanceof Date ? new Date(value) : new Date(`${value}T00:00:00`);\n}\n\n/** Which rows carry a weekday label: three of seven, or they do not fit. */\nconst LABELLED_ROWS = new Set([1, 3, 5]);\n\n/**\n * A day's contribution, with anything non-finite read as `0`.\n *\n * One `NaN` used to flatten the entire rendered window rather than its own day:\n * `Math.max(a, NaN)` is `NaN`, so the data set's maximum became `NaN`, `max > 0`\n * was false, and every cell fell to intensity 0 — a map that reads as a stretch\n * with no activity at all. The bad day also printed the literal text `NaN` in its\n * `title`.\n */\nfunction amount(raw: number): number {\n return Number.isFinite(raw) ? raw : 0;\n}\n\n/**\n * GitHub-style year-grid heatmap. One column per ISO week, one row per\n * weekday — cells coloured by `value` relative to the data set's max.\n *\n * **A year does not reflow.** Its 53 columns are a fixed cell size, so in a container\n * narrower than the grid the host scrolls sideways. While it does, it is a tab stop with\n * the shared focus ring, so the keyboard can scroll it too — WebKit makes no scroller\n * focusable by itself — and it opens on the inline END, the newest weeks, rather than on\n * the oldest. The stop carries no name of its own: focus lands on the grid's picture,\n * named by `ariaLabel`.\n *\n * **What a screen reader gets.** The grid is one named `role=\"img\"` and every square is\n * hidden, so the days' values are not in text anywhere unless `dataTable` renders them;\n * without it, say what the year shows in `ariaLabel`.\n *\n * @example\n * ```html\n * <wr-calendar-heatmap [data]=\"contributions\" />\n * <wr-calendar-heatmap [data]=\"data\" [endDate]=\"today\" [weeks]=\"26\" color=\"#10b981\" />\n * ```\n *\n * @see https://ngwr.dev/charts/calendar-heatmap\n */\n@Component({\n selector: 'wr-calendar-heatmap',\n templateUrl: './calendar-heatmap.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-calendar-heatmap',\n // A tab stop only while the year is wider than its container: see `scrollable`.\n '[attr.tabindex]': 'scrollable() ? 0 : null',\n },\n imports: [WrChartTable],\n})\nexport class WrCalendarHeatmap {\n /**\n * One entry per day — `{ date, value }`. Days you pass nothing for render as\n * empty cells, so a sparse array is the normal shape rather than a gap.\n */\n readonly data = input<readonly WrHeatmapDatum[]>([]);\n\n /**\n * Accessible name of the whole grid. Its cells are bare spans whose `title` a screen\n * reader on a role-less element does not read, so the map used to be several hundred\n * anonymous nodes with no name. Falls back to `calendarHeatmap.label`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'calendarHeatmap.label', 'Calendar heatmap');\n\n private readonly cellText = useI18nFormatter('calendarHeatmap.cell', '{{date}}: {{count}}');\n\n /**\n * A cell's tooltip, with both halves formatted and the sentence in the catalog.\n *\n * It used to be `` `${cell.iso}: ${cell.value}` `` — a raw ISO date beside an\n * unformatted number, joined by a hard-coded `': '`. Three things were wrong\n * at once and none of them are visible from the template: `2026-09-10` is not\n * how most of the world writes a date, `1234` is not how every locale groups\n * digits (`ar-SA` does not even use these ones), and the separator and order\n * were frozen into a shape a translator could not reach.\n *\n * Both halves go through `Intl`: the date in `WR_DATE_LOCALE`, which the weekday\n * and month labels use too and which follows Angular's `LOCALE_ID` unless\n * `withDates()` pins it, and the count in `LOCALE_ID` itself — or through\n * `valueFormat` — as every chart writes its numbers. The key ships as\n * `{{date}}: {{count}}` everywhere, so nothing reorders today and every locale can.\n */\n protected cellTitle(cell: { readonly date: Date; readonly value: number }): string {\n return this.cellText({ date: this.dateFormat().format(cell.date), count: this.numbers.value(cell.value) });\n }\n\n /**\n * The formatters, built once. They were built per call, and with `tooltip` off\n * the template asks for every square's title on every pass — so each `mousemove`\n * over the grid, which still marks the view for check, built 740 of them: 44,400\n * for 60 moves, measured in dev mode at 907–931ms against 348–358ms with the\n * tooltip on.\n */\n private readonly dateFormat = computed(() => new Intl.DateTimeFormat(this.locale, { dateStyle: 'medium' }));\n\n /**\n * Every square's `title`, and only while the tooltip is off — the tooltip carries the\n * same sentence, and the browser would open a second copy a moment later. Worked out\n * when the days or the catalog change, not on every pass of the template.\n */\n protected readonly titles = computed(() => (this.tooltip() ? null : this.cells().map(cell => this.cellTitle(cell))));\n\n /** Last day to render. @default today */\n readonly endDate = input<string | Date | null>(null);\n\n /** Number of weeks (columns) to render. @default 53 */\n readonly weeks = input(53, { transform: (v: unknown): number => Math.max(4, coerceNumberProperty(v, 53)) });\n\n /** Cell side in CSS pixels. @default 11 */\n readonly cellSize = input(11, { transform: (v: unknown): number => Math.max(4, coerceNumberProperty(v, 11)) });\n\n /** Pixel gap between cells. @default 2 */\n readonly cellGap = input(2, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 2)) });\n\n /** Cell fill colour at full intensity. @default 'var(--wr-color-primary)' */\n readonly color = input<string>('var(--wr-color-primary)');\n\n /** Background colour for zero-value days. @default color-mix(in srgb, var(--wr-border-base) 50%, transparent) */\n readonly emptyColor = input<string>('color-mix(in srgb, var(--wr-border-base) 50%, transparent)');\n\n /** Show the weekday + month labels around the grid. @default true */\n readonly showLabels = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show a tooltip with the day and its count on hover. It is the sentence the\n * square's `title` carried, so the `title` is written only while this is off —\n * or the browser would open a second copy a moment later. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Writes each day's count in the tooltip, the `title` and the data table. `null` uses\n * `Intl.NumberFormat` in `LOCALE_ID`.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /**\n * Render the days' values as a table that only assistive technology reaches: a row per\n * week, headed by its dates, and a column per weekday, each day's count written the way\n * the tooltip writes it. A day after the last one drawn is an empty cell.\n *\n * The grid is one named `role=\"img\"`, which hides everything inside it, so without the\n * table the values are nowhere a screen reader can walk. It is rendered beside the grid,\n * clipped to nothing: it takes no room, draws nothing and holds no tab stop.\n * @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /** A day's count as the tooltip, the `title` and the data table write it, in `LOCALE_ID`: never compact. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly daysEl = viewChild<ElementRef<HTMLElement>>('days');\n\n private readonly gridEl = viewChild<ElementRef<HTMLElement>>('grid');\n\n /**\n * Whether the year is wider than the host, which then scrolls it — and is a tab stop\n * while it does. `axe`'s `scrollable-region-focusable` named the scroller with no stop\n * at all, and in WebKit, which makes no scroller focusable by itself, a keyboard could\n * not reach the newest weeks. Measured in the browser after render and on every resize;\n * `false` on the server and in jsdom, which lay nothing out.\n */\n protected readonly scrollable = signal(false);\n\n private readonly dateLocale = wrDateLocale();\n\n private get locale(): string {\n return this.dateLocale();\n }\n\n /**\n * Weekday names from the locale rather than a hard-coded English list — the row order is\n * Sunday-first, matching the grid's own alignment, so 7 Jan 2024 (a Sunday) is the\n * reference. Rows without a label stay blank on purpose: seven labels do not fit.\n */\n protected readonly weekdayLabels = computed<readonly string[]>(() => {\n const formatter = new Intl.DateTimeFormat(this.locale, { weekday: 'short' });\n const sunday = new Date(2024, 0, 7);\n return Array.from({ length: 7 }, (_, row) => {\n if (!LABELLED_ROWS.has(row)) return '';\n const day = new Date(sunday);\n day.setDate(sunday.getDate() + row);\n return formatter.format(day);\n });\n });\n\n private readonly monthNames = computed<readonly string[]>(() => {\n const formatter = new Intl.DateTimeFormat(this.locale, { month: 'short' });\n return Array.from({ length: 12 }, (_, month) => formatter.format(new Date(2024, month, 15)));\n });\n\n protected readonly cells = computed<readonly Cell[]>(() => {\n const end = this.endDate() ? parseInput(this.endDate()!) : new Date();\n end.setHours(0, 0, 0, 0);\n const weeks = this.weeks();\n\n // Build value lookup.\n const map = new Map<string, number>();\n for (const d of this.data()) {\n const iso = toIso(parseInput(d.date));\n map.set(iso, (map.get(iso) ?? 0) + amount(d.value));\n }\n const max = [...map.values()].reduce((a, b) => Math.max(a, b), 0);\n\n // Walk backwards from end day; arrange into columns by week, rows by weekday.\n const out: Cell[] = [];\n // Exactly `weeks` columns, the last of them the week `end` falls in, every\n // column starting on a Sunday (matches GitHub).\n //\n // Counted in WEEKS rather than in days. It used to allocate `weeks * 7`\n // days and then align the start back to a Sunday, which adds up to six\n // more — so any alignment at all produced one column more than asked for:\n // 54 for the default 53, with `--wr-calendar-heatmap-columns` reporting 54 and a\n // container sized from `weeks * (cellSize + cellGap)` one column short.\n const start = new Date(end);\n start.setDate(end.getDate() - end.getDay() - (weeks - 1) * 7);\n\n const cursor = new Date(start);\n let column = 0;\n while (cursor <= end) {\n for (let row = 0; row < 7; row++) {\n // Stop at `end`. The inner loop always walks a whole week, so once the\n // cursor crossed `end` mid-week it kept going to Saturday — up to six\n // days AFTER the last day to render, drawn as ordinary `value: 0`\n // squares and indistinguishable from a past day of no activity. With\n // the default that is today plus five future days.\n if (cursor > end) break;\n const iso = toIso(cursor);\n const value = map.get(iso) ?? 0;\n // Clamped at the BOTTOM as well as the top. A negative value produced a\n // negative intensity, which is not zero — so `colorFor` painted it in\n // the accent colour and `opacityFor` put it in the lightest band,\n // rendering a day of negative activity exactly like a day of light\n // activity, and unlike the empty day it should have matched. The scale\n // has no negative half; the honest floor is \"nothing\".\n const intensity = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0;\n out.push({ iso, date: new Date(cursor), value, intensity, week: column, day: row });\n cursor.setDate(cursor.getDate() + 1);\n }\n column++;\n }\n return out;\n });\n\n /** Every weekday's full name, Sunday first as the rows are: the data table's columns. */\n private readonly weekdayNames = computed<readonly string[]>(() => {\n const formatter = new Intl.DateTimeFormat(this.locale, { weekday: 'long' });\n return Array.from({ length: 7 }, (_, row) => formatter.format(new Date(2024, 0, 7 + row)));\n });\n\n /**\n * The figures for `dataTable`: the grid's name as the caption, a column per weekday and\n * a row per week, headed by the week's first and last day drawn — `formatRange`, so the\n * locale writes the span its own way — and every day's count as the tooltip writes it.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const range = this.dateFormat();\n const weeks: (Cell | undefined)[][] = [];\n for (const cell of this.cells()) (weeks[cell.week] ??= [])[cell.day] = cell;\n return {\n caption: this.resolvedAriaLabel(),\n columns: this.weekdayNames(),\n groups: [\n {\n rows: weeks.map(days => {\n const drawn = days.filter((day): day is Cell => day !== undefined);\n return {\n header: range.formatRange(drawn[0].date, drawn[drawn.length - 1].date),\n cells: Array.from({ length: 7 }, (_, d) => (days[d] ? this.numbers.value(days[d].value) : '')),\n };\n }),\n },\n ],\n };\n });\n\n protected readonly monthLabels = computed(() => {\n // Pull the first cell of each visible month → render a label centered\n // over its column.\n const cells = this.cells();\n const seen = new Set<string>();\n return cells\n .filter(cell => {\n const date = new Date(`${cell.iso}T00:00:00`);\n if (date.getDate() !== 1) return false;\n const key = `${date.getFullYear()}-${date.getMonth()}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n })\n .map(cell => ({\n label: this.monthNames()[new Date(`${cell.iso}T00:00:00`).getMonth()],\n week: cell.week,\n }));\n });\n\n protected readonly columnCount = computed(() => {\n const cells = this.cells();\n return cells.length === 0 ? 0 : cells[cells.length - 1].week + 1;\n });\n\n /** Each day's position in `cells()`, for the square the pointer lands on. */\n private readonly indexByIso = computed(() => new Map(this.cells().map((cell, index) => [cell.iso, index])));\n\n /**\n * One tooltip for the whole year, pointing at the hovered day: above its square,\n * below it when there is no room above, and slid along the viewport edge for the\n * first and last weeks with the arrow still on the square. A listener on the grid\n * rather than one per square: a year is 371 of them.\n *\n * The box is the square's LAYOUT box rather than its client rect. The hovered square\n * grows by `:hover` over a transition, and a rect read part way through it would\n * move the chip by up to a fifth of a square depending on when it was measured;\n * the scale is centred, so the layout box is the rect's centre and the square's\n * own size.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const cell = this.cells()[index];\n // The squares are the container's only children, drawn in `cells()` order.\n const square = cell ? this.daysEl()?.nativeElement.children.item(index) : null;\n if (!cell || !(square instanceof HTMLElement)) return null;\n const rect = square.getBoundingClientRect();\n const width = square.offsetWidth;\n const height = square.offsetHeight;\n return {\n datum: { value: this.cellTitle(cell) },\n anchor: {\n x: (rect.left + rect.right - width) / 2,\n y: (rect.top + rect.bottom - height) / 2,\n width,\n height,\n },\n };\n });\n\n /**\n * Which square the pointer is on, from a `mousemove` on the grid. Over the gap\n * between two squares it is on none, and the tooltip starts to leave.\n */\n protected onCellsPointer(event: MouseEvent): void {\n const iso = (event.target as Element | null)?.closest<HTMLElement>('.wr-calendar-heatmap__cell')?.dataset['date'];\n const index = iso === undefined ? undefined : this.indexByIso().get(iso);\n if (index === undefined) this.tip.leave(event);\n else this.tip.enter(index);\n }\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/calendar-heatmap');\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const destroyRef = inject(DestroyRef);\n // Measured after render, in a browser, and again whenever the host or the grid changes\n // size: the host when its container does, the grid when `weeks` or `cellSize` does.\n // The observer's first report is the first measurement, so a year that boots narrower\n // than its container opens on its newest weeks, and so does one that starts to\n // overflow later — a chart that booted hidden, a window made narrow. A host that\n // already scrolled is left where the reader put it.\n afterNextRender(() => {\n const grid = this.gridEl()?.nativeElement;\n if (typeof ResizeObserver === 'undefined') return;\n const measure = (): void => {\n const overflows = host.scrollWidth > host.clientWidth;\n if (overflows && !this.scrollable()) WrCalendarHeatmap.scrollToEnd(host);\n this.scrollable.set(overflows);\n };\n const observer = new ResizeObserver(measure);\n observer.observe(host);\n if (grid) observer.observe(grid);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /**\n * Scrolls the host to its inline end, where the newest weeks are: the right in LTR and\n * the left under RTL, where `scrollLeft` runs from 0 down to minus the overflow. The\n * value is clamped by the browser, so either sign of the whole width lands on the end.\n */\n private static scrollToEnd(host: HTMLElement): void {\n const rtl = getComputedStyle(host).direction === 'rtl';\n host.scrollLeft = rtl ? -host.scrollWidth : host.scrollWidth;\n }\n\n protected colorFor(intensity: number): string {\n if (intensity === 0) return this.emptyColor();\n return this.color();\n }\n\n protected opacityFor(intensity: number): number {\n if (intensity === 0) return 1;\n // 4 levels — match the GitHub aesthetic.\n if (intensity < 0.25) return 0.25;\n if (intensity < 0.5) return 0.5;\n if (intensity < 0.75) return 0.75;\n return 1;\n }\n}\n\nexport type { WrHeatmapDatum } from './types';\n","<div\n #grid\n class=\"wr-calendar-heatmap__grid\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.--wr-calendar-heatmap-cell-size.px]=\"cellSize()\"\n [style.--wr-calendar-heatmap-cell-gap.px]=\"cellGap()\"\n [style.--wr-calendar-heatmap-columns]=\"columnCount()\"\n>\n @if (showLabels()) {\n <div class=\"wr-calendar-heatmap__weekdays\">\n @for (label of weekdayLabels(); track $index) {\n <span class=\"wr-calendar-heatmap__weekday\">{{ label }}</span>\n }\n </div>\n }\n\n <div #days class=\"wr-calendar-heatmap__cells\" (mousemove)=\"onCellsPointer($event)\" (mouseleave)=\"tip.leave($event)\">\n @for (cell of cells(); track cell.iso) {\n <span\n class=\"wr-calendar-heatmap__cell\"\n [style.background]=\"colorFor(cell.intensity)\"\n [style.opacity]=\"opacityFor(cell.intensity)\"\n [style.grid-column]=\"cell.week + 1\"\n [style.grid-row]=\"cell.day + 1\"\n [attr.title]=\"titles()?.[$index] ?? null\"\n [attr.data-date]=\"cell.iso\"\n [attr.data-value]=\"cell.value\"\n aria-hidden=\"true\"\n ></span>\n }\n </div>\n\n @if (showLabels()) {\n <div class=\"wr-calendar-heatmap__months\">\n @for (m of monthLabels(); track $index) {\n <span class=\"wr-calendar-heatmap__month\" [style.grid-column]=\"m.week + 1\">{{ m.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the grid's `img` and never inside it: `img`\n makes everything it holds presentational. Clipped to nothing by its own stylesheet,\n so it takes no room, draws nothing and adds nothing to the scroll. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AAuCA,SAAS,MAAM,GAAO;CAIpB,OAAO,GAHG,EAAE,YAGF,EAAC,GAFD,OAAO,EAAE,SAAQ,IAAK,CAAC,CAAC,CAAC,SAAS,GAAG,GAEhC,EAAC,GADJ,OAAO,EAAE,QAAO,CAAE,CAAC,CAAC,SAAS,GAAG,GACxB;AACtB;AAEA,SAAS,WAAW,OAAoB;CACtC,OAAO,iBAAiB,OAAO,IAAI,KAAK,KAAK,oBAAI,IAAI,KAAK,GAAG,MAAK,UAAW;AAC/E;AAGA,MAAM,gCAAgB,IAAI,IAAI;CAAC;CAAG;CAAG;AAAC,CAAC;AAWvC,SAAS,OAAO,KAAW;CACzB,OAAO,OAAO,SAAS,GAAG,IAAI,MAAM;AACtC;AAoCA,IAAa,oBAAb,MAAa,kBAAiB;CAKnB,OAAO,MAAiC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAO3C,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,yBAAyB,kBAAkB;CAE7F,WAAW,iBAAiB,wBAAwB,qBAAqB;CAkBhF,UAAU,MAAqD;EACvE,OAAO,KAAK,SAAS;GAAE,MAAM,KAAK,WAAU,CAAE,CAAC,OAAO,KAAK,IAAI;GAAG,OAAO,KAAK,QAAQ,MAAM,KAAK,KAAK;EAAC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AA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEN,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-charts-calendar-heatmap.mjs","names":[],"sources":["../../../projects/lib/charts/calendar-heatmap/calendar-heatmap.ts","../../../projects/lib/charts/calendar-heatmap/calendar-heatmap.html"],"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 { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { WrChartScale, type WrChartLegendPosition } from 'ngwr/charts/chart-legend';\nimport { WrChartState, WrChartTable, type WrChartTableData, useChartNumbers, useChartState } from 'ngwr/charts/core';\nimport { wrDateLocale } from 'ngwr/date';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { useChartTooltip, wrCoerceChartTooltip } from 'ngwr/popover';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrHeatmapDatum } from './types';\n\ninterface Cell {\n readonly iso: string;\n /** The day as the reader's locale writes it — see `cellTitle`. */\n readonly date: Date;\n readonly value: number;\n readonly intensity: number;\n /** Its step on the scale: 0 for a day of nothing, 1 to 5 for a day of something. */\n readonly level: number;\n /** The paint of its level, written on the square. */\n readonly paint: string;\n readonly week: number;\n readonly day: number;\n}\n\n/**\n * The steps of the sequential scale a day of something is painted with, lowest first: the\n * chart's own hooks, which the stylesheet points at `--wr-chart-seq-1` to `-5`. Written\n * out, so each hook is read by name.\n */\nconst STEPS = [\n 'var(--wr-calendar-heatmap-step-1)',\n 'var(--wr-calendar-heatmap-step-2)',\n 'var(--wr-calendar-heatmap-step-3)',\n 'var(--wr-calendar-heatmap-step-4)',\n 'var(--wr-calendar-heatmap-step-5)',\n] as const;\n\n/** A day in the form the data usually gives it, which sorts as a date does: `2026-03-09`. */\nconst ISO_DAY = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/** Every `Intl.DateTimeFormat` the calendars have asked for, by locale and options. */\nconst DATE_FORMATS = new Map<string, Intl.DateTimeFormat>();\n\n/**\n * The `Intl.DateTimeFormat` for `locale` and `options`, built once for the page: every\n * calendar built four of its own, 0.4 ms an instance, and a formatter holds no state.\n */\nfunction dateFormat(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n const key = `${locale}|${JSON.stringify(options)}`;\n let format = DATE_FORMATS.get(key);\n if (!format) {\n format = new Intl.DateTimeFormat(locale, options);\n DATE_FORMATS.set(key, format);\n }\n return format;\n}\n\nfunction toIso(d: Date): string {\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, '0');\n const day = String(d.getDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n}\n\nfunction parseInput(value: string | Date): Date {\n return value instanceof Date ? new Date(value) : new Date(`${value}T00:00:00`);\n}\n\n/** Which rows carry a weekday label: three of seven, or they do not fit. */\nconst LABELLED_ROWS = new Set([1, 3, 5]);\n\n/**\n * A day's contribution, with anything non-finite read as `0`.\n *\n * One `NaN` used to flatten the entire rendered window rather than its own day:\n * `Math.max(a, NaN)` is `NaN`, so the data set's maximum became `NaN`, `max > 0`\n * was false, and every cell fell to intensity 0 — a map that reads as a stretch\n * with no activity at all. The bad day also printed the literal text `NaN` in its\n * `title`.\n */\nfunction amount(raw: number): number {\n return Number.isFinite(raw) ? raw : 0;\n}\n\n/**\n * GitHub-style year-grid heatmap. One column per ISO week, one row per\n * weekday — cells coloured by `value` relative to the largest day drawn.\n *\n * **The scale.** A day of something takes one of five levels by its share of the largest\n * day, painted with the chart theme's sequential scale: `--wr-chart-seq-1`, a tint of the\n * first palette colour, up to `--wr-chart-seq-5`, the colour itself. `color` steps the same\n * five from a colour of the chart's own. A day of nothing is the theme's track, and every\n * square carries a faint edge, so the lowest level still reads on a dark surface. A scale\n * key under the grid shows the levels from 0 to the largest day (`showLegend`,\n * `legendPosition`).\n *\n * **Empty, loading, error.** With no data the grid keeps its squares and says \"No data\"\n * under them; `loading` and `error` put their own message there.\n *\n * **A year does not reflow.** Its 53 columns are a fixed cell size, so in a container\n * narrower than the grid the host scrolls sideways. While it does, it is a tab stop with\n * the shared focus ring, so the keyboard can scroll it too — WebKit makes no scroller\n * focusable by itself — and it opens on the inline END, the newest weeks, rather than on\n * the oldest. The stop carries no name of its own: focus lands on the grid's picture,\n * named by `ariaLabel`.\n *\n * **What a screen reader gets.** The grid is one named `role=\"img\"` and every square is\n * hidden, so the days' values are not in text anywhere unless `dataTable` renders them;\n * without it, say what the year shows in `ariaLabel`.\n *\n * @example\n * ```html\n * <wr-calendar-heatmap [data]=\"contributions\" />\n * <wr-calendar-heatmap [data]=\"data\" [endDate]=\"today\" [weeks]=\"26\" color=\"#10b981\" />\n * ```\n *\n * @see https://ngwr.dev/charts/calendar-heatmap\n */\n@Component({\n selector: 'wr-calendar-heatmap',\n templateUrl: './calendar-heatmap.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n // `wr-chart--legend`: the shared rule that keeps the scale key's room from the grid.\n class: 'wr-calendar-heatmap wr-chart--legend',\n // A colour of the chart's own for the highest level, which the stylesheet then steps\n // the lower ones from. Without one the levels are the chart theme's sequential scale.\n '[class.wr-calendar-heatmap--tinted]': 'color() !== null',\n '[style.--wr-calendar-heatmap-scale-color]': 'color()',\n // A tab stop only while the year is wider than its container: see `scrollable`.\n '[attr.tabindex]': 'scrollable() ? 0 : null',\n },\n imports: [WrChartScale, WrChartState, WrChartTable],\n})\nexport class WrCalendarHeatmap {\n /**\n * One entry per day — `{ date, value }`. Days you pass nothing for render as\n * empty cells, so a sparse array is the normal shape rather than a gap. Rows outside\n * the weeks drawn are skipped, and do not move the scale.\n */\n readonly data = input<readonly WrHeatmapDatum[]>([]);\n\n /**\n * Accessible name of the whole grid. Its cells are bare spans whose `title` a screen\n * reader on a role-less element does not read, so the map used to be several hundred\n * anonymous nodes with no name. Falls back to `calendarHeatmap.label`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'calendarHeatmap.label', 'Calendar heatmap');\n\n private readonly cellText = useI18nFormatter('calendarHeatmap.cell', '{{date}}: {{count}}');\n\n /**\n * A cell's tooltip, with both halves formatted and the sentence in the catalog.\n *\n * It used to be `` `${cell.iso}: ${cell.value}` `` — a raw ISO date beside an\n * unformatted number, joined by a hard-coded `': '`. Three things were wrong\n * at once and none of them are visible from the template: `2026-09-10` is not\n * how most of the world writes a date, `1234` is not how every locale groups\n * digits (`ar-SA` does not even use these ones), and the separator and order\n * were frozen into a shape a translator could not reach.\n *\n * Both halves go through `Intl`: the date in `WR_DATE_LOCALE`, which the weekday\n * and month labels use too and which follows Angular's `LOCALE_ID` unless\n * `withDates()` pins it, and the count in `LOCALE_ID` itself — or through\n * `valueFormat` — as every chart writes its numbers. The key ships as\n * `{{date}}: {{count}}` everywhere, so nothing reorders today and every locale can.\n */\n protected cellTitle(cell: { readonly date: Date; readonly value: number }): string {\n return this.cellText({ date: this.dateFormat().format(cell.date), count: this.numbers.value(cell.value) });\n }\n\n /**\n * The formatters, built once. They were built per call, and with `tooltip` off\n * the template asks for every square's title on every pass — so each `mousemove`\n * over the grid, which still marks the view for check, built 740 of them: 44,400\n * for 60 moves, measured in dev mode at 907–931ms against 348–358ms with the\n * tooltip on.\n */\n private readonly dateFormat = computed(() => dateFormat(this.locale, { dateStyle: 'medium' }));\n\n /**\n * Every square's `title`, and only while the tooltip is off — the tooltip carries the\n * same sentence, and the browser would open a second copy a moment later. Worked out\n * when the days or the catalog change, not on every pass of the template.\n */\n protected readonly titles = computed(() => (this.tooltip() ? null : this.cells().map(cell => this.cellTitle(cell))));\n\n /** Last day to render. @default today */\n readonly endDate = input<string | Date | null>(null);\n\n /** Number of weeks (columns) to render. @default 53 */\n readonly weeks = input(53, { transform: (v: unknown): number => Math.max(4, coerceNumberProperty(v, 53)) });\n\n /**\n * Cell side in CSS pixels. Twelve with a gap of three reads as a grid of days; the\n * eleven and two it was before 16.5 ran the squares together. @default 12\n */\n readonly cellSize = input(12, { transform: (v: unknown): number => Math.max(4, coerceNumberProperty(v, 12)) });\n\n /** Pixel gap between cells. @default 3 */\n readonly cellGap = input(3, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 3)) });\n\n /**\n * The colour of the highest level: any CSS colour, `var(--wr-…)` included. The four\n * levels under it are stepped from it toward the surface, as the chart theme steps its\n * own scale. `null` paints the levels with the theme's sequential scale,\n * `--wr-chart-seq-1` to `-5`, which an app retints for every chart at once.\n * @default null\n */\n readonly color = input<string | null>(null);\n\n /**\n * Background colour for zero-value days. `null` takes `--wr-calendar-heatmap-empty`,\n * the chart theme's track. @default null\n */\n readonly emptyColor = input<string | null>(null);\n\n /** Show the scale key: the levels from 0 to the largest day. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Where the scale key sits: under the grid, over it, or `none` for no key at all. It\n * keeps to the inline end, where the newest weeks are, so it stays in sight while the\n * year scrolls. @default 'bottom'\n */\n readonly legendPosition = input<Exclude<WrChartLegendPosition, 'start' | 'end'>>('bottom');\n\n /**\n * A request for the days is in flight: the grid keeps its squares, all empty, and the\n * loading message sits under them. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The days failed to load: the grid keeps its squares, all empty, with the error\n * message under them. `loading` wins while both are set. @default false\n */\n readonly error = input(false, { transform: coerceBooleanProperty });\n\n /** The message shown with no data. Falls back to `chart.empty`, then `'No data'`. */\n readonly emptyLabel = input<string | null>(null);\n\n /** The message shown while `loading`. Falls back to `chart.loading`, then `'Loading…'`. */\n readonly loadingLabel = input<string | null>(null);\n\n /** The message shown on `error`. Falls back to `chart.error`, then `'Could not load'`. */\n readonly errorLabel = input<string | null>(null);\n\n /** Show the weekday + month labels around the grid. @default true */\n readonly showLabels = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show a tooltip with the day and its count on hover. It is the sentence the square's\n * `title` carried, so the `title` is written only while this is off — or the browser\n * would open a second copy a moment later.\n *\n * By default the pointer passes under the chip to the chart, so the next section\n * answers at once and the chip closes off the chart; `'hoverable'` lets the pointer\n * rest on the chip instead, as WCAG 1.4.13 asks of a hint. @default true\n */\n readonly tooltip = input<boolean | 'hoverable', unknown>(true, { transform: wrCoerceChartTooltip });\n\n /**\n * Writes each day's count in the tooltip, the `title` and the data table. `null` uses\n * `Intl.NumberFormat` in `LOCALE_ID`.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /**\n * Render the days' values as a table that only assistive technology reaches: a row per\n * week, headed by its dates, and a column per weekday, each day's count written the way\n * the tooltip writes it. A day after the last one drawn is an empty cell.\n *\n * The grid is one named `role=\"img\"`, which hides everything inside it, so without the\n * table the values are nowhere a screen reader can walk. It is rendered beside the grid,\n * clipped to nothing: it takes no room, draws nothing and holds no tab stop.\n * @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /** A day's count as the tooltip, the `title` and the data table write it, in `LOCALE_ID`: never compact. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly daysEl = viewChild<ElementRef<HTMLElement>>('days');\n\n private readonly gridEl = viewChild<ElementRef<HTMLElement>>('grid');\n\n /**\n * Whether the year is wider than the host, which then scrolls it — and is a tab stop\n * while it does. `axe`'s `scrollable-region-focusable` named the scroller with no stop\n * at all, and in WebKit, which makes no scroller focusable by itself, a keyboard could\n * not reach the newest weeks. Measured in the browser after render and on every resize;\n * `false` on the server and in jsdom, which lay nothing out.\n */\n protected readonly scrollable = signal(false);\n\n private readonly dateLocale = wrDateLocale();\n\n private get locale(): string {\n return this.dateLocale();\n }\n\n /**\n * Weekday names from the locale rather than a hard-coded English list — the row order is\n * Sunday-first, matching the grid's own alignment, so 7 Jan 2024 (a Sunday) is the\n * reference. Rows without a label stay blank on purpose: seven labels do not fit.\n */\n protected readonly weekdayLabels = computed<readonly string[]>(() => {\n const formatter = dateFormat(this.locale, { weekday: 'short' });\n const sunday = new Date(2024, 0, 7);\n return Array.from({ length: 7 }, (_, row) => {\n if (!LABELLED_ROWS.has(row)) return '';\n const day = new Date(sunday);\n day.setDate(sunday.getDate() + row);\n return formatter.format(day);\n });\n });\n\n private readonly monthNames = computed<readonly string[]>(() => {\n const formatter = dateFormat(this.locale, { month: 'short' });\n return Array.from({ length: 12 }, (_, month) => formatter.format(new Date(2024, month, 15)));\n });\n\n protected readonly cells = computed<readonly Cell[]>(() => {\n const end = this.endDate() ? parseInput(this.endDate()!) : new Date();\n end.setHours(0, 0, 0, 0);\n const weeks = this.weeks();\n // A state shows the grid as its frame: every square empty.\n const data = this.state() && this.state()?.kind !== 'empty' ? [] : this.data();\n\n // Walk backwards from end day; arrange into columns by week, rows by weekday.\n const out: Cell[] = [];\n // Exactly `weeks` columns, the last of them the week `end` falls in, every\n // column starting on a Sunday (matches GitHub).\n //\n // Counted in WEEKS rather than in days. It used to allocate `weeks * 7`\n // days and then align the start back to a Sunday, which adds up to six\n // more — so any alignment at all produced one column more than asked for:\n // 54 for the default 53, with `--wr-calendar-heatmap-columns` reporting 54 and a\n // container sized from `weeks * (cellSize + cellGap)` one column short.\n const start = new Date(end);\n start.setDate(end.getDate() - end.getDay() - (weeks - 1) * 7);\n\n // Build value lookup, from the rows inside the window only. Ten years of days handed\n // to a year's calendar parsed every one of them, 19 ms for ten thousand rows, to keep\n // 371. A day written `2026-03-09` sorts as a date does, so one outside the window is\n // told by a string compare and never parsed; a week of margin at the start keeps a\n // day the calendar rolls over (`2026-02-31` is 3 March) where it was. A `Date` is\n // told by its time. The largest day is taken over the rows kept.\n const from = new Date(start);\n from.setDate(start.getDate() - 7);\n const firstIso = toIso(from);\n const lastIso = toIso(end);\n const firstTime = start.getTime();\n const lastTime = end.getTime() + 86_400_000;\n const map = new Map<string, number>();\n let max = 0;\n for (const d of data) {\n const { date } = d;\n if (typeof date === 'string') {\n if (ISO_DAY.test(date) && (date < firstIso || date > lastIso)) continue;\n } else {\n const time = date.getTime();\n if (time < firstTime || time >= lastTime) continue;\n }\n const iso = toIso(parseInput(date));\n const sum = (map.get(iso) ?? 0) + amount(d.value);\n map.set(iso, sum);\n }\n const startIso = toIso(start);\n for (const [iso, sum] of map) if (iso >= startIso && iso <= lastIso && sum > max) max = sum;\n\n const empty = this.emptyColor() ?? 'var(--wr-calendar-heatmap-empty)';\n const cursor = new Date(start);\n let column = 0;\n while (cursor <= end) {\n for (let row = 0; row < 7; row++) {\n // Stop at `end`. The inner loop always walks a whole week, so once the\n // cursor crossed `end` mid-week it kept going to Saturday — up to six\n // days AFTER the last day to render, drawn as ordinary `value: 0`\n // squares and indistinguishable from a past day of no activity. With\n // the default that is today plus five future days.\n if (cursor > end) break;\n const iso = toIso(cursor);\n const value = map.get(iso) ?? 0;\n // Clamped at the BOTTOM as well as the top. A negative value produced a\n // negative intensity, which is not zero — so `colorFor` painted it in\n // the accent colour and `opacityFor` put it in the lightest band,\n // rendering a day of negative activity exactly like a day of light\n // activity, and unlike the empty day it should have matched. The scale\n // has no negative half; the honest floor is \"nothing\".\n const intensity = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0;\n // Five levels over the days of something, the largest day on the fifth; a day of\n // nothing has none, and is painted as the track.\n const level = intensity === 0 ? 0 : Math.min(STEPS.length, Math.ceil(intensity * STEPS.length - 1e-9));\n const paint = level === 0 ? empty : STEPS[level - 1];\n out.push({ iso, date: new Date(cursor), value, intensity, level, paint, week: column, day: row });\n cursor.setDate(cursor.getDate() + 1);\n }\n column++;\n }\n return out;\n });\n\n /** Every weekday's full name, Sunday first as the rows are: the data table's columns. */\n private readonly weekdayNames = computed<readonly string[]>(() => {\n const formatter = dateFormat(this.locale, { weekday: 'long' });\n return Array.from({ length: 7 }, (_, row) => formatter.format(new Date(2024, 0, 7 + row)));\n });\n\n /**\n * The figures for `dataTable`: the grid's name as the caption, a column per weekday and\n * a row per week, headed by the week's first and last day drawn — `formatRange`, so the\n * locale writes the span its own way — and every day's count as the tooltip writes it.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const range = this.dateFormat();\n const weeks: (Cell | undefined)[][] = [];\n for (const cell of this.cells()) (weeks[cell.week] ??= [])[cell.day] = cell;\n return {\n caption: this.resolvedAriaLabel(),\n columns: this.weekdayNames(),\n groups: [\n {\n rows: weeks.map(days => {\n const drawn = days.filter((day): day is Cell => day !== undefined);\n return {\n header: range.formatRange(drawn[0].date, drawn[drawn.length - 1].date),\n cells: Array.from({ length: 7 }, (_, d) => (days[d] ? this.numbers.value(days[d].value) : '')),\n };\n }),\n },\n ],\n };\n });\n\n protected readonly monthLabels = computed(() => {\n // Pull the first cell of each visible month → render a label centered\n // over its column.\n const cells = this.cells();\n const seen = new Set<string>();\n // Off the date each cell already carries: its ISO string was parsed again here, twice\n // for a month's first day, 371 string parses a pass.\n return cells\n .filter(({ date }) => {\n if (date.getDate() !== 1) return false;\n const key = `${date.getFullYear()}-${date.getMonth()}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n })\n .map(cell => ({ label: this.monthNames()[cell.date.getMonth()], week: cell.week }));\n });\n\n /** The largest day drawn, which the highest level stands for; 0 with no day of something. */\n private readonly peak = computed(() => this.cells().reduce((max, cell) => Math.max(max, cell.value), 0));\n\n /**\n * The scale key: a day of nothing, then the five levels, between 0 and the largest day\n * as the tooltip writes a count. With no day of something it keys the empty square alone.\n */\n protected readonly legend = computed(() => {\n const peak = this.peak();\n const empty = this.emptyColor() ?? 'var(--wr-calendar-heatmap-empty)';\n return {\n min: this.numbers.value(0),\n max: peak > 0 ? this.numbers.value(peak) : null,\n steps: peak > 0 ? [empty, ...STEPS] : [empty],\n };\n });\n\n /** Whether the chart draws its scale key: with `showLegend`, unless `legendPosition` is `none`. */\n protected readonly legendShown = computed(() => this.showLegend() && this.legendPosition() !== 'none');\n\n /** What the chart shows under its grid in place of the scale key, or `null` while it draws its days. */\n protected readonly state = useChartState({\n loading: this.loading,\n error: this.error,\n empty: computed(() => this.data().length === 0),\n emptyLabel: this.emptyLabel,\n loadingLabel: this.loadingLabel,\n errorLabel: this.errorLabel,\n });\n\n protected readonly columnCount = computed(() => {\n const cells = this.cells();\n return cells.length === 0 ? 0 : cells[cells.length - 1].week + 1;\n });\n\n /** Each day's position in `cells()`, for the square the pointer lands on. */\n private readonly indexByIso = computed(() => new Map(this.cells().map((cell, index) => [cell.iso, index])));\n\n /**\n * One tooltip for the whole year, pointing at the hovered day: above its square,\n * below it when there is no room above, and slid along the viewport edge for the\n * first and last weeks with the arrow still on the square. A listener on the grid\n * rather than one per square: a year is 371 of them.\n *\n * The box is the square's LAYOUT box rather than its client rect. The hovered square\n * grows by `:hover` over a transition, and a rect read part way through it would\n * move the chip by up to a fifth of a square depending on when it was measured;\n * the scale is centred, so the layout box is the rect's centre and the square's\n * own size.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const cell = this.cells()[index];\n // The squares are the container's only children, drawn in `cells()` order.\n const square = cell ? this.daysEl()?.nativeElement.children.item(index) : null;\n if (!cell || !(square instanceof HTMLElement)) return null;\n const rect = square.getBoundingClientRect();\n const width = square.offsetWidth;\n const height = square.offsetHeight;\n return {\n datum: { value: this.cellTitle(cell) },\n anchor: {\n x: (rect.left + rect.right - width) / 2,\n y: (rect.top + rect.bottom - height) / 2,\n width,\n height,\n },\n };\n });\n\n /**\n * Which square the pointer is on, from a `mousemove` on the grid. Over the gap\n * between two squares it is on none, and the tooltip starts to leave.\n */\n private onCellsPointer(event: MouseEvent): void {\n const iso = (event.target as Element | null)?.closest<HTMLElement>('.wr-calendar-heatmap__cell')?.dataset['date'];\n const index = iso === undefined ? undefined : this.indexByIso().get(iso);\n if (index === undefined) this.tip.leave(event);\n else this.tip.enter(index);\n }\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/calendar-heatmap');\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const destroyRef = inject(DestroyRef);\n // Measured after render, in a browser, and again whenever the host or the grid changes\n // size: the host when its container does, the grid when `weeks` or `cellSize` does.\n // The observer's first report is the first measurement, so a year that boots narrower\n // than its container opens on its newest weeks, and so does one that starts to\n // overflow later — a chart that booted hidden, a window made narrow. A host that\n // already scrolled is left where the reader put it.\n // The pointer, heard on the days by two listeners of the chart's own rather than the\n // template's: a template listener checks the whole year again on every event. These\n // run nothing unless the square under the pointer changes.\n afterNextRender(() => {\n const days = this.daysEl()?.nativeElement;\n if (!days) return;\n const move = (event: MouseEvent): void => this.onCellsPointer(event);\n const leave = (event: MouseEvent): void => this.tip.leave(event);\n days.addEventListener('mousemove', move);\n days.addEventListener('mouseleave', leave);\n destroyRef.onDestroy(() => {\n days.removeEventListener('mousemove', move);\n days.removeEventListener('mouseleave', leave);\n });\n });\n\n // The ring round the day the tooltip reads, set by hand on that one square.\n let ringed: Element | null = null;\n effect(() => {\n const active = this.tip.active();\n const next = active === null ? null : (this.daysEl()?.nativeElement.children.item(active) ?? null);\n if (next === ringed) return;\n ringed?.classList.remove('wr-calendar-heatmap__cell--active');\n next?.classList.add('wr-calendar-heatmap__cell--active');\n ringed = next;\n });\n\n afterNextRender(() => {\n const grid = this.gridEl()?.nativeElement;\n if (typeof ResizeObserver === 'undefined') return;\n const measure = (): void => {\n const overflows = host.scrollWidth > host.clientWidth;\n if (overflows && !this.scrollable()) WrCalendarHeatmap.scrollToEnd(host);\n this.scrollable.set(overflows);\n };\n const observer = new ResizeObserver(measure);\n observer.observe(host);\n if (grid) observer.observe(grid);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n /**\n * Scrolls the host to its inline end, where the newest weeks are: the right in LTR and\n * the left under RTL, where `scrollLeft` runs from 0 down to minus the overflow. The\n * value is clamped by the browser, so either sign of the whole width lands on the end.\n */\n private static scrollToEnd(host: HTMLElement): void {\n const rtl = getComputedStyle(host).direction === 'rtl';\n host.scrollLeft = rtl ? -host.scrollWidth : host.scrollWidth;\n }\n}\n\nexport type { WrHeatmapDatum } from './types';\n","@let shown = state();\n@let key = legend();\n@let keyed = legendShown() && !shown;\n\n@if (keyed && legendPosition() === 'top') {\n <!-- The scale key, before the grid or after it so it is in the DOM where it is on\n screen. Hidden, as an axis' ticks are on every chart: the grid's name is what is\n announced, and the counts are in the data table. -->\n <wr-chart-scale\n class=\"wr-calendar-heatmap__legend\"\n aria-hidden=\"true\"\n position=\"top\"\n [steps]=\"key.steps\"\n [minLabel]=\"key.min\"\n [maxLabel]=\"key.max\"\n />\n}\n\n<div\n #grid\n class=\"wr-calendar-heatmap__grid\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.--wr-calendar-heatmap-cell-size.px]=\"cellSize()\"\n [style.--wr-calendar-heatmap-cell-gap.px]=\"cellGap()\"\n [style.--wr-calendar-heatmap-columns]=\"columnCount()\"\n>\n @if (showLabels()) {\n <div class=\"wr-calendar-heatmap__weekdays\">\n @for (label of weekdayLabels(); track $index) {\n <span class=\"wr-calendar-heatmap__weekday\">{{ label }}</span>\n }\n </div>\n }\n\n <!-- The pointer is heard here by listeners the component adds itself, and the reading\n day's ring is set by hand: nothing in this template follows the pointer, so a move\n across the year checks no square. A square's paint is its level's, a step of the\n sequential scale, or the track for a day of nothing. -->\n <div #days class=\"wr-calendar-heatmap__cells\">\n @for (cell of cells(); track cell.iso) {\n <span\n class=\"wr-calendar-heatmap__cell\"\n [style.background]=\"cell.paint\"\n [style.grid-column]=\"cell.week + 1\"\n [style.grid-row]=\"cell.day + 1\"\n [attr.title]=\"titles()?.[$index] ?? null\"\n [attr.data-date]=\"cell.iso\"\n [attr.data-value]=\"cell.value\"\n [attr.data-level]=\"cell.level\"\n aria-hidden=\"true\"\n ></span>\n }\n </div>\n\n @if (showLabels()) {\n <div class=\"wr-calendar-heatmap__months\">\n @for (m of monthLabels(); track $index) {\n <span class=\"wr-calendar-heatmap__month\" [style.grid-column]=\"m.week + 1\">{{ m.label }}</span>\n }\n </div>\n }\n</div>\n\n@if (shown) {\n <!-- Under the grid, in the scale key's place, and never inside the grid's `img`, which\n makes everything it holds presentational: the message is a live region. -->\n <div class=\"wr-calendar-heatmap__status\">\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n </div>\n} @else if (keyed && legendPosition() === 'bottom') {\n <wr-chart-scale\n class=\"wr-calendar-heatmap__legend\"\n aria-hidden=\"true\"\n position=\"bottom\"\n [steps]=\"key.steps\"\n [minLabel]=\"key.min\"\n [maxLabel]=\"key.max\"\n />\n}\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the grid's `img` and never inside it: `img`\n makes everything it holds presentational. Clipped to nothing by its own stylesheet,\n so it takes no room, draws nothing and adds nothing to the scroll. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkDA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;AACQ;AAGV,MAAM,UAAU;AAGhB,MAAM,+BAAe,IAAI,IAAG;AAM5B,SAAS,WAAW,QAAgB,SAAmC;CACrE,MAAM,MAAM,GAAG,OAAM,GAAI,KAAK,UAAU,OAAO;CAC/C,IAAI,SAAS,aAAa,IAAI,GAAG;CACjC,IAAI,CAAC,QAAQ;EACX,SAAS,IAAI,KAAK,eAAe,QAAQ,OAAO;EAChD,aAAa,IAAI,KAAK,MAAM;CAC9B;CACA,OAAO;AACT;AAEA,SAAS,MAAM,GAAO;CAIpB,OAAO,GAHG,EAAE,YAGF,EAAC,GAFD,OAAO,EAAE,SAAQ,IAAK,CAAC,CAAC,CAAC,SAAS,GAAG,GAEhC,EAAC,GADJ,OAAO,EAAE,QAAO,CAAE,CAAC,CAAC,SAAS,GAAG,GACxB;AACtB;AAEA,SAAS,WAAW,OAAoB;CACtC,OAAO,iBAAiB,OAAO,IAAI,KAAK,KAAK,oBAAI,IAAI,KAAK,GAAG,MAAK,UAAW;AAC/E;AAGA,MAAM,gCAAgB,IAAI,IAAI;CAAC;CAAG;CAAG;AAAC,CAAC;AAWvC,SAAS,OAAO,KAAW;CACzB,OAAO,OAAO,SAAS,GAAG,IAAI,MAAM;AACtC;AAoDA,IAAa,oBAAb,MAAa,kBAAiB;CAMnB,OAAO,MAAiC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAO3C,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,oBAAoB,YAAY,KAAK,WAAW,yBAAyB,kBAAkB;CAE7F,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AA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEN,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -23,12 +23,13 @@ var CandleHarness = class extends ComponentHarness {
|
|
|
23
23
|
const increase = await candle.hasClass("wr-candlestick-chart__candle--increase");
|
|
24
24
|
if (increase === await candle.hasClass("wr-candlestick-chart__candle--decrease")) throw new Error(`WrCandlestickChartHarness.getCandles(): a candle carries ${increase ? "both" : "neither"} of \`--increase\` and \`--decrease\`, and the component writes exactly one, which decides its fill.`);
|
|
25
25
|
const style = await candle.getAttribute("style") ?? "";
|
|
26
|
+
const [index, open, high, low, close] = await figures(candle);
|
|
26
27
|
return {
|
|
27
|
-
index
|
|
28
|
-
open
|
|
29
|
-
high
|
|
30
|
-
low
|
|
31
|
-
close
|
|
28
|
+
index,
|
|
29
|
+
open,
|
|
30
|
+
high,
|
|
31
|
+
low,
|
|
32
|
+
close,
|
|
32
33
|
direction: increase ? "increase" : "decrease",
|
|
33
34
|
left: styleNumber(style, "left", "%"),
|
|
34
35
|
top: styleNumber(style, "top", "%"),
|
|
@@ -38,11 +39,11 @@ var CandleHarness = class extends ComponentHarness {
|
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
|
-
async function
|
|
42
|
-
const raw = await element.getAttribute(
|
|
43
|
-
const
|
|
44
|
-
if (!Number.isFinite(value)) throw new Error(`WrCandlestickChartHarness.getCandles(): a candle carries
|
|
45
|
-
return
|
|
42
|
+
async function figures(element) {
|
|
43
|
+
const raw = await element.getAttribute("data-candle");
|
|
44
|
+
const values = (raw ?? "").split(" ").map((part) => Number.parseFloat(part));
|
|
45
|
+
if (values.length !== 5 || !values.every((value) => Number.isFinite(value))) throw new Error(`WrCandlestickChartHarness.getCandles(): a candle carries data-candle="${raw ?? ""}", which the component writes as five finite numbers on every candle it draws.`);
|
|
46
|
+
return values;
|
|
46
47
|
}
|
|
47
48
|
function styleNumber(style, property, unit) {
|
|
48
49
|
const escaped = property.replace(/[-]/g, "\\-");
|
|
@@ -71,6 +72,16 @@ var WrCandlestickChartHarness = class WrCandlestickChartHarness extends Componen
|
|
|
71
72
|
async hasGrid() {
|
|
72
73
|
return await this.locatorForOptional(".wr-candlestick-chart__grid-line")() !== null;
|
|
73
74
|
}
|
|
75
|
+
async hasAxis() {
|
|
76
|
+
return await this.locatorForOptional(".wr-candlestick-chart__y-axis")() !== null;
|
|
77
|
+
}
|
|
78
|
+
async isHollow() {
|
|
79
|
+
return (await this.host()).hasClass("wr-candlestick-chart--hollow");
|
|
80
|
+
}
|
|
81
|
+
async getStateLabel() {
|
|
82
|
+
const state = await this.locatorForOptional(".wr-chart-state")();
|
|
83
|
+
return state ? (await state.text()).trim() : null;
|
|
84
|
+
}
|
|
74
85
|
async getYTicks() {
|
|
75
86
|
const ticks = await this.locatorForAll(".wr-candlestick-chart__y-tick")();
|
|
76
87
|
return Promise.all(ticks.map((tick) => tick.text()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-charts-candlestick-chart-testing.mjs","names":[],"sources":["../../../projects/lib/charts/candlestick-chart/testing/wr-candlestick-chart-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type {\n WrCandlestickChartHarnessCandle,\n WrCandlestickChartHarnessFilters,\n WrCandlestickChartTableRow,\n} from './types';\n\n/** One row of the data table: its `<th scope=\"row\">` and its cells. */\nclass TableRowHarness extends ComponentHarness {\n static hostSelector = '.wr-chart-table tbody tr';\n\n async read(): Promise<WrCandlestickChartTableRow> {\n const header = await this.locatorFor('th[scope=\"row\"]')();\n const cells = await this.locatorForAll('td')();\n return { header: await header.text(), cells: await Promise.all(cells.map(cell => cell.text())) };\n }\n}\n\n/** One candle: the box the component placed from the high to the low, with its prices beside its placement. */\nclass CandleHarness extends ComponentHarness {\n static hostSelector = '.wr-candlestick-chart__candle';\n\n async read(): Promise<WrCandlestickChartHarnessCandle> {\n const candle = await this.host();\n const increase = await candle.hasClass('wr-candlestick-chart__candle--increase');\n const decrease = await candle.hasClass('wr-candlestick-chart__candle--decrease');\n if (increase === decrease) {\n const carries = increase ? 'both' : 'neither';\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): a candle carries ${carries} of \\`--increase\\` and \\`--decrease\\`, ` +\n 'and the component writes exactly one, which decides its fill.'\n );\n }\n const style = (await candle.getAttribute('style')) ?? '';\n return {\n index: await numberAttribute(candle, 'data-index'),\n open: await numberAttribute(candle, 'data-open'),\n high: await numberAttribute(candle, 'data-high'),\n low: await numberAttribute(candle, 'data-low'),\n close: await numberAttribute(candle, 'data-close'),\n direction: increase ? 'increase' : 'decrease',\n left: styleNumber(style, 'left', '%'),\n top: styleNumber(style, 'top', '%'),\n height: styleNumber(style, 'height', '%'),\n upperWick: styleNumber(style, '--wr-candlestick-chart-upper', ''),\n lowerWick: styleNumber(style, '--wr-candlestick-chart-lower', ''),\n };\n }\n}\n\n/** A finite number off one attribute, or a sentence saying which one the candle lacks. */\nasync function numberAttribute(element: TestElement, name: string): Promise<number> {\n const raw = await element.getAttribute(name);\n const value = raw === null ? Number.NaN : Number.parseFloat(raw);\n if (!Number.isFinite(value)) {\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): a candle carries ${name}=\"${raw ?? ''}\", which the component writes ` +\n 'as a finite number on every candle it draws.'\n );\n }\n return value;\n}\n\n/**\n * One declaration's number off the `style` ATTRIBUTE the component wrote, not through\n * `getCssValue()`, which answers from the cascade and so reads a stylesheet's own default\n * at exactly the moment the inline write is what broke.\n */\nfunction styleNumber(style: string, property: string, unit: '%' | ''): number {\n const escaped = property.replace(/[-]/g, '\\\\-');\n const match = new RegExp(`(?:^|;)\\\\s*${escaped}:\\\\s*(-?[\\\\d.]+)${unit}\\\\s*(?:;|$)`).exec(style);\n if (!match) {\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): no inline ${property} on a candle (style: \"${style}\"). The component ` +\n 'writes one on every candle it draws, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n}\n\n/**\n * Test harness for `<wr-candlestick-chart>`.\n *\n * **Candles are read off what the component WROTE, never off a layout.** jsdom lays\n * nothing out, so a measured box would read 0 for a working chart and a broken one\n * alike. Every candle is a box the component places by percentage, and it carries its\n * period's prices in `data-*` attributes beside that placement — so {@link getCandles}\n * answers both questions a spec has: which period is this, and where did the chart put\n * it. A candle with the right prices at the wrong height is exactly the defect worth\n * catching. Hollow or filled is read as the `--increase` / `--decrease` modifier the\n * stylesheet draws it from; what that paints is a browser's question.\n *\n * **A body's width is not read**: it is a share of the slot that the stylesheet holds\n * between 1px and a ceiling, and jsdom has no stylesheet. {@link isDense} reads the\n * decision the component made from that width, which in a unit test is made against\n * the 560px drawing it assumes before a browser measures one — as are the x labels\n * {@link getXLabels} reads.\n *\n * **There is deliberately no hover method.** The tooltip opens on the slot under the\n * pointer, measured against the drawing's box, which jsdom reports as 0×0 — so every\n * synthetic move resolves to nothing, and a `hoverCandle()` would answer \"no tooltip\"\n * for a working chart. A spec that needs the tooltip stubs the drawing's and the plot's\n * `getBoundingClientRect` and dispatches the `mousemove` itself, as the component's own\n * spec does.\n *\n * @example\n * ```ts\n * const chart = await loader.getHarness(WrCandlestickChartHarness);\n *\n * expect(await chart.getCandleCount()).toBe(20);\n * expect((await chart.getCandles())[0]).toMatchObject({ open: 102, close: 106, direction: 'increase' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCandlestickChartHarness extends ComponentHarness {\n static hostSelector = 'wr-candlestick-chart';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCandlestickChartHarnessFilters = {}): HarnessPredicate<WrCandlestickChartHarness> {\n return new HarnessPredicate(WrCandlestickChartHarness, options).addOption(\n 'ariaLabel',\n options.ariaLabel,\n (harness, label) => HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n );\n }\n\n /** The plot's accessible name — the only name the drawing has. */\n async getAccessibleName(): Promise<string | null> {\n return (await this.locatorFor('.wr-candlestick-chart__plot')()).getAttribute('aria-label');\n }\n\n /** How many candles were drawn: every period whose open, high, low and close are all finite. */\n async getCandleCount(): Promise<number> {\n return (await this.locatorForAll('.wr-candlestick-chart__candle')()).length;\n }\n\n /**\n * Every drawn candle, oldest first, with its prices, its direction and the percentages\n * the component placed it at.\n *\n * Throws on a candle missing any of what the component writes on every one, rather\n * than answering with a `NaN` a spec could compare against.\n */\n async getCandles(): Promise<WrCandlestickChartHarnessCandle[]> {\n const candles = await this.locatorForAll(CandleHarness)();\n return Promise.all(candles.map(candle => candle.read()));\n }\n\n /**\n * Whether the chart is drawn dense: its bodies too narrow to leave hollow, so a rising\n * one is dotted. Decided on the measured body in a browser, and on the assumed 560px\n * drawing before that — which is every unit test.\n */\n async isDense(): Promise<boolean> {\n return (await this.host()).hasClass('wr-candlestick-chart--dense');\n }\n\n /** Whether the gridlines are drawn (`showGrid`). */\n async hasGrid(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-candlestick-chart__grid-line')()) !== null;\n }\n\n /** The y-axis tick labels, top to bottom; `[]` with `showGrid` off. */\n async getYTicks(): Promise<string[]> {\n const ticks = await this.locatorForAll('.wr-candlestick-chart__y-tick')();\n return Promise.all(ticks.map(tick => tick.text()));\n }\n\n /**\n * The period labels printed under the candles, left to right — every n-th where they\n * do not all fit, and with `showGrid` off too, since they are the time axis. The hidden\n * copy the chart measures is not one of them.\n */\n async getXLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-candlestick-chart__x-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the hidden data table is rendered (`dataTable`). */\n async hasDataTable(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-chart-table')()) !== null;\n }\n\n /**\n * The data table's column headings: the open, the high, the low and the close.\n *\n * Throws when the chart renders no table (`dataTable` off), rather than answering with\n * no columns.\n */\n async getTableColumns(): Promise<string[]> {\n await this.assertDataTable('getTableColumns');\n const headings = await this.locatorForAll('.wr-chart-table thead th[scope=\"col\"]')();\n return Promise.all(headings.map(heading => heading.text()));\n }\n\n /**\n * The data table's rows, one per period — a period with no candle included — as a\n * screen reader walks them: the period, then its four prices.\n *\n * Throws when the chart renders no table (`dataTable` off), for the reason\n * {@link getTableColumns} gives.\n */\n async getTableRows(): Promise<WrCandlestickChartTableRow[]> {\n await this.assertDataTable('getTableRows');\n const rows = await this.locatorForAll(TableRowHarness)();\n return Promise.all(rows.map(row => row.read()));\n }\n\n /**\n * The plot's height in pixels, read off the `style` ATTRIBUTE the component wrote,\n * not through `getCssValue()`, which answers from the laid-out box and so differs\n * between jsdom and a browser.\n */\n async getPlotHeight(): Promise<number> {\n const style = await (await this.locatorFor('.wr-candlestick-chart__plot')()).getAttribute('style');\n const match = /height:\\s*([\\d.]+)px/.exec(style ?? '');\n if (!match) {\n throw new Error(\n `WrCandlestickChartHarness.getPlotHeight(): no inline height on .wr-candlestick-chart__plot (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n }\n\n private async assertDataTable(method: string): Promise<void> {\n if (!(await this.hasDataTable())) {\n throw new Error(\n `WrCandlestickChartHarness.${method}(): the chart renders no data table — \\`dataTable\\` is off. Ask hasDataTable() first.`\n );\n }\n }\n}\n"],"mappings":";;;;;;;AAgBA,IAAM,kBAAN,cAA8B,iBAAgB;CAC5C,OAAO,eAAe;CAEtB,MAAM,OAAI;EACR,MAAM,SAAS,MAAM,KAAK,WAAW,mBAAiB,CAAC,CAAA;EACvD,MAAM,QAA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I,UAAS,MAAM,KAAI,CAAE,CAAC;CACtD;CAGA,MAAM,eAAY;EAChB,OAAQ,MAAM,KAAK,mBAAmB,iBAAiB,CAAC,CAAA,MAAQ;CAClE;CAQA,MAAM,kBAAe;EACnB,MAAM,KAAK,gBAAgB,iBAAiB;EAC5C,MAAM,WAAW,MAAM,KAAK,cAAc,yCAAuC,CAAC,CAAA;EAClF,OAAO,QAAQ,IAAI,SAAS,KAAI,YAAW,QAAQ,KAAI,CAAE,CAAC;CAC5D;CASA,MAAM,eAAY;EAChB,MAAM,KAAK,gBAAgB,cAAc;EACzC,MAAM,OAAO,MAAM,KAAK,cAAc,eAAe,CAAC,CAAA;EACtD,OAAO,QAAQ,IAAI,KAAK,KAAI,QAAO,IAAI,KAAI,CAAE,CAAC;CAChD;CAOA,MAAM,gBAAa;EACjB,MAAM,QAAQ,OAAO,MAAM,KAAK,WAAW,6BAA6B,CAAC,CAAA,EAAA,CAAI,aAAa,OAAO;EACjG,MAAM,QAAQ,uBAAuB,KAAK,SAAS,EAAE;EACrD,IAAI,CAAC,OACH,MAAM,IAAI,MACR,uGAAuG,SAAS,GAAE,4FACvB;EAG/F,OAAO,OAAO,WAAW,MAAM,EAAE;CACnC;CAEQ,MAAM,gBAAgB,QAAc;EAC1C,IAAI,CAAE,MAAM,KAAK,aAAY,GAC3B,MAAM,IAAI,MACR,6BAA6B,OAAM,sFAAuF;CAGhI"}
|
|
1
|
+
{"version":3,"file":"ngwr-charts-candlestick-chart-testing.mjs","names":[],"sources":["../../../projects/lib/charts/candlestick-chart/testing/wr-candlestick-chart-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type {\n WrCandlestickChartHarnessCandle,\n WrCandlestickChartHarnessFilters,\n WrCandlestickChartTableRow,\n} from './types';\n\n/** One row of the data table: its `<th scope=\"row\">` and its cells. */\nclass TableRowHarness extends ComponentHarness {\n static hostSelector = '.wr-chart-table tbody tr';\n\n async read(): Promise<WrCandlestickChartTableRow> {\n const header = await this.locatorFor('th[scope=\"row\"]')();\n const cells = await this.locatorForAll('td')();\n return { header: await header.text(), cells: await Promise.all(cells.map(cell => cell.text())) };\n }\n}\n\n/** One candle: the box the component placed from the high to the low, with its prices beside its placement. */\nclass CandleHarness extends ComponentHarness {\n static hostSelector = '.wr-candlestick-chart__candle';\n\n async read(): Promise<WrCandlestickChartHarnessCandle> {\n const candle = await this.host();\n const increase = await candle.hasClass('wr-candlestick-chart__candle--increase');\n const decrease = await candle.hasClass('wr-candlestick-chart__candle--decrease');\n if (increase === decrease) {\n const carries = increase ? 'both' : 'neither';\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): a candle carries ${carries} of \\`--increase\\` and \\`--decrease\\`, ` +\n 'and the component writes exactly one, which decides its fill.'\n );\n }\n const style = (await candle.getAttribute('style')) ?? '';\n const [index, open, high, low, close] = await figures(candle);\n return {\n index,\n open,\n high,\n low,\n close,\n direction: increase ? 'increase' : 'decrease',\n left: styleNumber(style, 'left', '%'),\n top: styleNumber(style, 'top', '%'),\n height: styleNumber(style, 'height', '%'),\n upperWick: styleNumber(style, '--wr-candlestick-chart-upper', ''),\n lowerWick: styleNumber(style, '--wr-candlestick-chart-lower', ''),\n };\n }\n}\n\n/**\n * A candle's position and its four prices, off the one attribute the chart writes them\n * in: `data-candle=\"index open high low close\"`.\n */\nasync function figures(element: TestElement): Promise<number[]> {\n const raw = await element.getAttribute('data-candle');\n const values = (raw ?? '').split(' ').map(part => Number.parseFloat(part));\n if (values.length !== 5 || !values.every(value => Number.isFinite(value))) {\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): a candle carries data-candle=\"${raw ?? ''}\", which the component ` +\n 'writes as five finite numbers on every candle it draws.'\n );\n }\n return values;\n}\n\n/**\n * One declaration's number off the `style` ATTRIBUTE the component wrote, not through\n * `getCssValue()`, which answers from the cascade and so reads a stylesheet's own default\n * at exactly the moment the inline write is what broke.\n */\nfunction styleNumber(style: string, property: string, unit: '%' | ''): number {\n const escaped = property.replace(/[-]/g, '\\\\-');\n const match = new RegExp(`(?:^|;)\\\\s*${escaped}:\\\\s*(-?[\\\\d.]+)${unit}\\\\s*(?:;|$)`).exec(style);\n if (!match) {\n throw new Error(\n `WrCandlestickChartHarness.getCandles(): no inline ${property} on a candle (style: \"${style}\"). The component ` +\n 'writes one on every candle it draws, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n}\n\n/**\n * Test harness for `<wr-candlestick-chart>`.\n *\n * **Candles are read off what the component WROTE, never off a layout.** jsdom lays\n * nothing out, so a measured box would read 0 for a working chart and a broken one\n * alike. Every candle is a box the component places by percentage, and it carries its\n * period's prices in one `data-candle` attribute beside that placement — so {@link getCandles}\n * answers both questions a spec has: which period is this, and where did the chart put\n * it. A candle with the right prices at the wrong height is exactly the defect worth\n * catching. Rising or falling is read as the `--increase` / `--decrease` modifier the\n * stylesheet draws it from; what that paints is a browser's question. Past two periods a\n * pixel the chart merges them (`decimate`), and a candle read here is then the merged\n * one: the index of its first period, and the prices the run comes to.\n *\n * **A body's width is not read**: it is a share of the slot that the stylesheet holds\n * between 1px and a ceiling, and jsdom has no stylesheet. {@link isDense} reads the\n * decision the component made from that width, which in a unit test is made against\n * the 560px drawing it assumes before a browser measures one — as are the x labels\n * {@link getXLabels} reads.\n *\n * **There is deliberately no hover method.** The tooltip opens on the slot under the\n * pointer, measured against the drawing's box, which jsdom reports as 0×0 — so every\n * synthetic move resolves to nothing, and a `hoverCandle()` would answer \"no tooltip\"\n * for a working chart. A spec that needs the tooltip stubs the drawing's and the plot's\n * `getBoundingClientRect` and dispatches the `mousemove` itself, as the component's own\n * spec does.\n *\n * @example\n * ```ts\n * const chart = await loader.getHarness(WrCandlestickChartHarness);\n *\n * expect(await chart.getCandleCount()).toBe(20);\n * expect((await chart.getCandles())[0]).toMatchObject({ open: 102, close: 106, direction: 'increase' });\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCandlestickChartHarness extends ComponentHarness {\n static hostSelector = 'wr-candlestick-chart';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCandlestickChartHarnessFilters = {}): HarnessPredicate<WrCandlestickChartHarness> {\n return new HarnessPredicate(WrCandlestickChartHarness, options).addOption(\n 'ariaLabel',\n options.ariaLabel,\n (harness, label) => HarnessPredicate.stringMatches(harness.getAccessibleName(), label)\n );\n }\n\n /** The plot's accessible name — the only name the drawing has. */\n async getAccessibleName(): Promise<string | null> {\n return (await this.locatorFor('.wr-candlestick-chart__plot')()).getAttribute('aria-label');\n }\n\n /** How many candles were drawn: every period whose open, high, low and close are all finite. */\n async getCandleCount(): Promise<number> {\n return (await this.locatorForAll('.wr-candlestick-chart__candle')()).length;\n }\n\n /**\n * Every drawn candle, oldest first, with its prices, its direction and the percentages\n * the component placed it at.\n *\n * Throws on a candle missing any of what the component writes on every one, rather\n * than answering with a `NaN` a spec could compare against.\n */\n async getCandles(): Promise<WrCandlestickChartHarnessCandle[]> {\n const candles = await this.locatorForAll(CandleHarness)();\n return Promise.all(candles.map(candle => candle.read()));\n }\n\n /**\n * Whether the chart is drawn dense: its bodies too narrow to leave hollow, so under\n * `hollow` a rising one is dotted. Decided on the measured body in a browser, and on the assumed 560px\n * drawing before that — which is every unit test.\n */\n async isDense(): Promise<boolean> {\n return (await this.host()).hasClass('wr-candlestick-chart--dense');\n }\n\n /** Whether the gridlines are drawn (`showGrid`). */\n async hasGrid(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-candlestick-chart__grid-line')()) !== null;\n }\n\n /** Whether the price axis' scale is printed beside the plot (`showAxis`). */\n async hasAxis(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-candlestick-chart__y-axis')()) !== null;\n }\n\n /** Whether a rising body is drawn as an outline rather than solid (`hollow`). */\n async isHollow(): Promise<boolean> {\n return (await this.host()).hasClass('wr-candlestick-chart--hollow');\n }\n\n /**\n * The message the chart shows in place of its candles: \"No data\" with nothing to draw,\n * or the loading or error message. `null` while it draws its candles.\n */\n async getStateLabel(): Promise<string | null> {\n const state = await this.locatorForOptional('.wr-chart-state')();\n return state ? (await state.text()).trim() : null;\n }\n\n /** The y-axis tick labels, top to bottom; `[]` with `showAxis` off. */\n async getYTicks(): Promise<string[]> {\n const ticks = await this.locatorForAll('.wr-candlestick-chart__y-tick')();\n return Promise.all(ticks.map(tick => tick.text()));\n }\n\n /**\n * The period labels printed under the candles, left to right — every n-th where they\n * do not all fit, and with `showGrid` off too, since they are the time axis. The hidden\n * copy the chart measures is not one of them.\n */\n async getXLabels(): Promise<string[]> {\n const labels = await this.locatorForAll('.wr-candlestick-chart__x-label')();\n return Promise.all(labels.map(label => label.text()));\n }\n\n /** Whether the hidden data table is rendered (`dataTable`). */\n async hasDataTable(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-chart-table')()) !== null;\n }\n\n /**\n * The data table's column headings: the open, the high, the low and the close.\n *\n * Throws when the chart renders no table (`dataTable` off), rather than answering with\n * no columns.\n */\n async getTableColumns(): Promise<string[]> {\n await this.assertDataTable('getTableColumns');\n const headings = await this.locatorForAll('.wr-chart-table thead th[scope=\"col\"]')();\n return Promise.all(headings.map(heading => heading.text()));\n }\n\n /**\n * The data table's rows, one per period — a period with no candle included — as a\n * screen reader walks them: the period, then its four prices.\n *\n * Throws when the chart renders no table (`dataTable` off), for the reason\n * {@link getTableColumns} gives.\n */\n async getTableRows(): Promise<WrCandlestickChartTableRow[]> {\n await this.assertDataTable('getTableRows');\n const rows = await this.locatorForAll(TableRowHarness)();\n return Promise.all(rows.map(row => row.read()));\n }\n\n /**\n * The plot's height in pixels, read off the `style` ATTRIBUTE the component wrote,\n * not through `getCssValue()`, which answers from the laid-out box and so differs\n * between jsdom and a browser.\n */\n async getPlotHeight(): Promise<number> {\n const style = await (await this.locatorFor('.wr-candlestick-chart__plot')()).getAttribute('style');\n const match = /height:\\s*([\\d.]+)px/.exec(style ?? '');\n if (!match) {\n throw new Error(\n `WrCandlestickChartHarness.getPlotHeight(): no inline height on .wr-candlestick-chart__plot (style: \"${style ?? ''}\"). ` +\n 'The component writes one unconditionally, so its absence is the bug rather than a zero.'\n );\n }\n return Number.parseFloat(match[1]);\n }\n\n private async assertDataTable(method: string): Promise<void> {\n if (!(await this.hasDataTable())) {\n throw new Error(\n `WrCandlestickChartHarness.${method}(): the chart renders no data table — \\`dataTable\\` is off. Ask hasDataTable() first.`\n );\n }\n }\n}\n"],"mappings":";;;;;;;AAgBA,IAAM,kBAAN,cAA8B,iBAAgB;CAC5C,OAAO,eAAe;CAEtB,MAAM,OAAI;EACR,MAAM,SAAS,MAAM,KAAK,WAAW,mBAAiB,CAAC,CAAA;EACvD,MAAM,QAAQ,MAAM,KAAK,cAAc,IAAI,CAAC,CAAA;EAC5C,OAAO;GAAE,QAAQ,MAAM,OAAO,KAAI;GAAI,OAAO,MAAM,QAAQ,IAAI,MAAM,KAAI,SAAQ,KAAK,KAAI,CAAE,CAAC;EAAC;CAChG;;AAIF,IAAM,gBAAN,cAA4B,iBAAgB;CAC1C,OAAO,eAAe;CAEtB,MAAM,OAAI;EACR,MAAM,SAAS,MAAM,KAAK,KAAI;EAC9B,MAAM,WAAW,MAAM,OAAO,SAAS,wCAAwC;EAE/E,IAAI,aAAa,MADM,OAAO,SAAS,wCAAwC,GAG7E,MAAM,IAAI,MACR,4DAFc,WAAW,SAAS,UAEiC,qGACF;EAGrE,MAAM,QAAS,MAAM,OAAO,aAAa,OAAO,KAAM;EACtD,MAAM,CAAC,OAAO,MAAM,MAAM,KAAK,SAAS,MAAM,QAAQ,MAAM;EAC5D,OAAO;GACL;GACA;GACA;GACA;GACA;GACA,WAAW,WAAW,aAAa;GACnC,MAAM,YAAY,OAAO,QAAQ,GAAG;GACpC,KAAK,YAAY,OAAO,OAAO,GAAG;GAClC,QAAQ,YAAY,OAAO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