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
|
@@ -4,8 +4,76 @@ import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coerci
|
|
|
4
4
|
import { isPlatformBrowser } from "@angular/common";
|
|
5
5
|
import { wrCheckStyles, wrClamp } from "ngwr/utils";
|
|
6
6
|
import { useI18nText, wrReadI18nText } from "ngwr/i18n";
|
|
7
|
-
import { WrChartTable, useChartNumbers, wrChartAxis } from "ngwr/charts/core";
|
|
8
|
-
import { useChartTooltip } from "ngwr/popover";
|
|
7
|
+
import { WrChartState, WrChartTable, useChartNumbers, useChartSize, useChartState, wrChartAxis, wrChartLongest, wrChartRound } from "ngwr/charts/core";
|
|
8
|
+
import { useChartTooltip, wrCoerceChartTooltip } from "ngwr/popover";
|
|
9
|
+
/**
|
|
10
|
+
* @license
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
13
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
14
|
+
*/
|
|
15
|
+
const DENSITY = 2;
|
|
16
|
+
const COLUMN = 2;
|
|
17
|
+
function drawable(d) {
|
|
18
|
+
return Number.isFinite(d.open) && Number.isFinite(d.high) && Number.isFinite(d.low) && Number.isFinite(d.close);
|
|
19
|
+
}
|
|
20
|
+
function fractionDigits(value) {
|
|
21
|
+
const [mantissa, exponent = "0"] = Math.abs(value).toString().split("e");
|
|
22
|
+
return Math.max(0, (mantissa.split(".")[1]?.length ?? 0) - Number(exponent));
|
|
23
|
+
}
|
|
24
|
+
function wrCandlestickPer(count, width) {
|
|
25
|
+
if (!(width > 0) || count <= width * DENSITY) return 1;
|
|
26
|
+
return Math.ceil(count / Math.max(1, Math.floor(width / COLUMN)));
|
|
27
|
+
}
|
|
28
|
+
function wrCandlestickMerge(data, per) {
|
|
29
|
+
const size = per > 1 ? Math.floor(per) : 1;
|
|
30
|
+
const merged = [];
|
|
31
|
+
for (let start = 0; start < data.length; start += size) {
|
|
32
|
+
const end = Math.min(data.length, start + size);
|
|
33
|
+
let open = NaN;
|
|
34
|
+
let close = NaN;
|
|
35
|
+
let high = Number.NEGATIVE_INFINITY;
|
|
36
|
+
let low = Number.POSITIVE_INFINITY;
|
|
37
|
+
let found = false;
|
|
38
|
+
for (let i = start; i < end; i++) {
|
|
39
|
+
const d = data[i];
|
|
40
|
+
if (!drawable(d)) continue;
|
|
41
|
+
if (!found) {
|
|
42
|
+
open = d.open;
|
|
43
|
+
found = true;
|
|
44
|
+
}
|
|
45
|
+
close = d.close;
|
|
46
|
+
if (d.high > high) high = d.high;
|
|
47
|
+
if (d.low < low) low = d.low;
|
|
48
|
+
}
|
|
49
|
+
if (found) merged.push({
|
|
50
|
+
start,
|
|
51
|
+
end,
|
|
52
|
+
open,
|
|
53
|
+
high,
|
|
54
|
+
low,
|
|
55
|
+
close
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return merged;
|
|
59
|
+
}
|
|
60
|
+
function wrCandlestickDigits(data, least, most) {
|
|
61
|
+
let digits = Math.min(Math.max(0, least), most);
|
|
62
|
+
let factor = 10 ** digits;
|
|
63
|
+
const read = (price) => {
|
|
64
|
+
if (!Number.isFinite(price) || Math.round(price * factor) / factor === price) return;
|
|
65
|
+
digits = Math.min(most, Math.max(digits, fractionDigits(price)));
|
|
66
|
+
factor = 10 ** digits;
|
|
67
|
+
};
|
|
68
|
+
for (const d of data) {
|
|
69
|
+
if (digits >= most) return most;
|
|
70
|
+
read(d.open);
|
|
71
|
+
read(d.high);
|
|
72
|
+
read(d.low);
|
|
73
|
+
read(d.close);
|
|
74
|
+
}
|
|
75
|
+
return digits;
|
|
76
|
+
}
|
|
9
77
|
/**
|
|
10
78
|
* @license
|
|
11
79
|
*
|
|
@@ -18,12 +86,11 @@ const BODY_MAX = 24;
|
|
|
18
86
|
const DENSE_BELOW = 4;
|
|
19
87
|
const CHAR_WIDTH = 7;
|
|
20
88
|
const LABEL_GAP = 12;
|
|
21
|
-
const
|
|
89
|
+
const PROBES = 3;
|
|
90
|
+
const percent = (value) => wrChartRound(value, 3);
|
|
91
|
+
const INCREASE = "wr-candlestick-chart__candle wr-candlestick-chart__candle--increase";
|
|
92
|
+
const DECREASE = "wr-candlestick-chart__candle wr-candlestick-chart__candle--decrease";
|
|
22
93
|
const MAX_PRICE_DIGITS = 10;
|
|
23
|
-
function fractionDigits(value) {
|
|
24
|
-
const [mantissa, exponent = "0"] = Math.abs(value).toString().split("e");
|
|
25
|
-
return Math.max(0, (mantissa.split(".")[1]?.length ?? 0) - Number(exponent));
|
|
26
|
-
}
|
|
27
94
|
var WrCandlestickChart = class WrCandlestickChart {
|
|
28
95
|
data = input([], ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
29
96
|
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -40,9 +107,32 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
40
107
|
...ngDevMode ? { debugName: "showGrid" } : /* istanbul ignore next */ {},
|
|
41
108
|
transform: coerceBooleanProperty
|
|
42
109
|
});
|
|
110
|
+
showAxis = input(true, {
|
|
111
|
+
...ngDevMode ? { debugName: "showAxis" } : /* istanbul ignore next */ {},
|
|
112
|
+
transform: coerceBooleanProperty
|
|
113
|
+
});
|
|
114
|
+
hollow = input(false, {
|
|
115
|
+
...ngDevMode ? { debugName: "hollow" } : /* istanbul ignore next */ {},
|
|
116
|
+
transform: coerceBooleanProperty
|
|
117
|
+
});
|
|
118
|
+
decimate = input(true, {
|
|
119
|
+
...ngDevMode ? { debugName: "decimate" } : /* istanbul ignore next */ {},
|
|
120
|
+
transform: coerceBooleanProperty
|
|
121
|
+
});
|
|
122
|
+
loading = input(false, {
|
|
123
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
124
|
+
transform: coerceBooleanProperty
|
|
125
|
+
});
|
|
126
|
+
error = input(false, {
|
|
127
|
+
...ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {},
|
|
128
|
+
transform: coerceBooleanProperty
|
|
129
|
+
});
|
|
130
|
+
emptyLabel = input(null, ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
|
|
131
|
+
loadingLabel = input(null, ...ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []);
|
|
132
|
+
errorLabel = input(null, ...ngDevMode ? [{ debugName: "errorLabel" }] : /* istanbul ignore next */ []);
|
|
43
133
|
tooltip = input(true, {
|
|
44
134
|
...ngDevMode ? { debugName: "tooltip" } : /* istanbul ignore next */ {},
|
|
45
|
-
transform:
|
|
135
|
+
transform: wrCoerceChartTooltip
|
|
46
136
|
});
|
|
47
137
|
dataTable = input(false, {
|
|
48
138
|
...ngDevMode ? { debugName: "dataTable" } : /* istanbul ignore next */ {},
|
|
@@ -57,30 +147,39 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
57
147
|
probe = viewChild("probe", ...ngDevMode ? [{ debugName: "probe" }] : /* istanbul ignore next */ []);
|
|
58
148
|
candleEls = viewChildren("candleEl", ...ngDevMode ? [{ debugName: "candleEls" }] : /* istanbul ignore next */ []);
|
|
59
149
|
measured = signal(null, ...ngDevMode ? [{ debugName: "measured" }] : /* istanbul ignore next */ []);
|
|
150
|
+
drawingSize = useChartSize(this.drawing);
|
|
60
151
|
constructor() {
|
|
61
152
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/candlestick-chart");
|
|
62
153
|
if (!isPlatformBrowser(inject(PLATFORM_ID))) return;
|
|
63
154
|
const destroyRef = inject(DestroyRef);
|
|
64
155
|
afterRenderEffect(() => {
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
156
|
+
this.probes();
|
|
157
|
+
this.drawnSlots();
|
|
158
|
+
this.drawingSize();
|
|
67
159
|
untracked(() => this.measure());
|
|
68
160
|
});
|
|
69
161
|
afterNextRender(() => {
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
162
|
+
const plot = this.plot()?.nativeElement;
|
|
163
|
+
if (!plot) return;
|
|
164
|
+
const move = (event) => this.onPointerMove(event);
|
|
165
|
+
const leave = (event) => this.tip.leave(event);
|
|
166
|
+
plot.addEventListener("mousemove", move);
|
|
167
|
+
plot.addEventListener("mouseleave", leave);
|
|
168
|
+
destroyRef.onDestroy(() => {
|
|
169
|
+
plot.removeEventListener("mousemove", move);
|
|
170
|
+
plot.removeEventListener("mouseleave", leave);
|
|
171
|
+
});
|
|
75
172
|
});
|
|
76
173
|
}
|
|
77
174
|
slots = computed(() => this.data().length, ...ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []);
|
|
78
|
-
|
|
175
|
+
per = computed(() => this.decimate() ? wrCandlestickPer(this.slots(), this.measured()?.width ?? ASSUMED_WIDTH) : 1, ...ngDevMode ? [{ debugName: "per" }] : /* istanbul ignore next */ []);
|
|
176
|
+
merged = computed(() => wrCandlestickMerge(this.data(), this.per()), ...ngDevMode ? [{ debugName: "merged" }] : /* istanbul ignore next */ []);
|
|
177
|
+
drawnSlots = computed(() => Math.ceil(this.slots() / this.per()), ...ngDevMode ? [{ debugName: "drawnSlots" }] : /* istanbul ignore next */ []);
|
|
178
|
+
slot = computed(() => this.slots() === 0 ? 100 : percent(100 * this.per() / this.slots()), ...ngDevMode ? [{ debugName: "slot" }] : /* istanbul ignore next */ []);
|
|
79
179
|
axis = computed(() => {
|
|
80
180
|
let lo = Number.POSITIVE_INFINITY;
|
|
81
181
|
let hi = Number.NEGATIVE_INFINITY;
|
|
82
|
-
for (const d of this.
|
|
83
|
-
if (!WrCandlestickChart.drawable(d)) continue;
|
|
182
|
+
for (const d of this.merged()) {
|
|
84
183
|
lo = Math.min(lo, d.low, d.open, d.close);
|
|
85
184
|
hi = Math.max(hi, d.high, d.open, d.close);
|
|
86
185
|
}
|
|
@@ -89,47 +188,53 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
89
188
|
candles = computed(() => {
|
|
90
189
|
const { min, max } = this.axis();
|
|
91
190
|
const slots = this.slots();
|
|
92
|
-
const
|
|
93
|
-
return this.
|
|
94
|
-
if (!WrCandlestickChart.drawable(d)) return [];
|
|
191
|
+
const range = max - min;
|
|
192
|
+
return this.merged().map((d) => {
|
|
95
193
|
const top = Math.max(d.high, d.open, d.close);
|
|
96
194
|
const bottom = Math.min(d.low, d.open, d.close);
|
|
97
195
|
const span = top - bottom;
|
|
98
|
-
const
|
|
99
|
-
return
|
|
100
|
-
index,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
height: percent(y(bottom) - y(top)),
|
|
110
|
-
upper: share(top - Math.max(d.open, d.close)),
|
|
111
|
-
lower: share(Math.min(d.open, d.close) - bottom)
|
|
112
|
-
}];
|
|
196
|
+
const y = (max - top) / range * 100;
|
|
197
|
+
return {
|
|
198
|
+
index: d.start,
|
|
199
|
+
classes: d.close >= d.open ? INCREASE : DECREASE,
|
|
200
|
+
figures: `${d.start} ${d.open} ${d.high} ${d.low} ${d.close}`,
|
|
201
|
+
left: percent((d.start + d.end) / 2 / slots * 100),
|
|
202
|
+
top: percent(y),
|
|
203
|
+
height: percent((max - bottom) / range * 100 - y),
|
|
204
|
+
upper: span > 0 ? percent((top - Math.max(d.open, d.close)) / span * 100) : 0,
|
|
205
|
+
lower: span > 0 ? percent((Math.min(d.open, d.close) - bottom) / span * 100) : 0
|
|
206
|
+
};
|
|
113
207
|
});
|
|
114
208
|
}, ...ngDevMode ? [{ debugName: "candles" }] : /* istanbul ignore next */ []);
|
|
115
|
-
positions = computed(() =>
|
|
116
|
-
|
|
209
|
+
positions = computed(() => {
|
|
210
|
+
const per = this.per();
|
|
211
|
+
const positions = new Int32Array(this.drawnSlots()).fill(-1);
|
|
212
|
+
this.merged().forEach((candle, position) => positions[Math.floor(candle.start / per)] = position);
|
|
213
|
+
return positions;
|
|
214
|
+
}, ...ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []);
|
|
215
|
+
drawnAt(index) {
|
|
216
|
+
const d = this.data()[index];
|
|
217
|
+
if (!d || !WrCandlestickChart.drawable(d)) return -1;
|
|
218
|
+
return this.positions()[Math.floor(index / this.per())] ?? -1;
|
|
219
|
+
}
|
|
220
|
+
slotPx = computed(() => (this.measured()?.width ?? ASSUMED_WIDTH) / Math.max(1, this.drawnSlots()), ...ngDevMode ? [{ debugName: "slotPx" }] : /* istanbul ignore next */ []);
|
|
221
|
+
periodPx = computed(() => (this.measured()?.width ?? ASSUMED_WIDTH) / Math.max(1, this.slots()), ...ngDevMode ? [{ debugName: "periodPx" }] : /* istanbul ignore next */ []);
|
|
117
222
|
dense = computed(() => {
|
|
118
223
|
if (this.candles().length === 0) return false;
|
|
119
224
|
const measured = this.measured()?.body ?? 0;
|
|
120
225
|
return (measured > 0 ? measured : wrClamp(this.slotPx() * BODY_SHARE, 1, BODY_MAX)) < DENSE_BELOW;
|
|
121
226
|
}, ...ngDevMode ? [{ debugName: "dense" }] : /* istanbul ignore next */ []);
|
|
122
227
|
longestLabel = computed(() => this.data().reduce((longest, d) => d.label.length > longest.length ? d.label : longest, ""), ...ngDevMode ? [{ debugName: "longestLabel" }] : /* istanbul ignore next */ []);
|
|
123
|
-
|
|
228
|
+
probes = computed(() => wrChartLongest(this.data().map((d) => d.label.replace(/\r\n?|\n/g, " ")), PROBES).join("\n"), ...ngDevMode ? [{ debugName: "probes" }] : /* istanbul ignore next */ []);
|
|
124
229
|
labelPx = computed(() => {
|
|
125
230
|
const measured = this.measured()?.label ?? 0;
|
|
126
231
|
return measured > 0 ? measured : this.longestLabel().length * CHAR_WIDTH;
|
|
127
232
|
}, ...ngDevMode ? [{ debugName: "labelPx" }] : /* istanbul ignore next */ []);
|
|
128
|
-
labelEvery = computed(() => Math.max(1, Math.ceil((this.labelPx() + LABEL_GAP) / this.
|
|
233
|
+
labelEvery = computed(() => Math.max(1, Math.ceil((this.labelPx() + LABEL_GAP) / this.periodPx())), ...ngDevMode ? [{ debugName: "labelEvery" }] : /* istanbul ignore next */ []);
|
|
129
234
|
xLabels = computed(() => {
|
|
130
235
|
const every = this.labelEvery();
|
|
131
236
|
const slots = this.slots();
|
|
132
|
-
const slotPx = this.
|
|
237
|
+
const slotPx = this.periodPx();
|
|
133
238
|
const width = slotPx * slots;
|
|
134
239
|
const label = Math.min(this.labelPx(), width);
|
|
135
240
|
const data = this.data();
|
|
@@ -150,34 +255,34 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
150
255
|
}
|
|
151
256
|
return labels;
|
|
152
257
|
}, ...ngDevMode ? [{ debugName: "xLabels" }] : /* istanbul ignore next */ []);
|
|
153
|
-
xSlot = computed(() => Math.min(100, percent(this.
|
|
258
|
+
xSlot = computed(() => Math.min(100, percent((this.slots() === 0 ? 100 : percent(100 / this.slots())) * this.labelEvery())), ...ngDevMode ? [{ debugName: "xSlot" }] : /* istanbul ignore next */ []);
|
|
154
259
|
yTicks = computed(() => {
|
|
155
260
|
const { min, max, step, ticks } = this.axis();
|
|
156
|
-
const labels = this.numbers.ticks(ticks, step);
|
|
261
|
+
const labels = this.showAxis() ? this.numbers.ticks(ticks, step) : [];
|
|
157
262
|
return ticks.map((value, i) => ({
|
|
158
|
-
label: labels[i],
|
|
159
|
-
top: percent((max - value) / (max - min) * 100)
|
|
263
|
+
label: labels[i] ?? "",
|
|
264
|
+
top: percent((max - value) / (max - min) * 100),
|
|
265
|
+
zero: value === 0
|
|
160
266
|
}));
|
|
161
267
|
}, ...ngDevMode ? [{ debugName: "yTicks" }] : /* istanbul ignore next */ []);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
]
|
|
170
|
-
|
|
171
|
-
|
|
268
|
+
stepDigits = computed(() => {
|
|
269
|
+
const step = this.axis().step;
|
|
270
|
+
return wrCandlestickDigits([{
|
|
271
|
+
open: step,
|
|
272
|
+
high: step,
|
|
273
|
+
low: step,
|
|
274
|
+
close: step
|
|
275
|
+
}], 0, MAX_PRICE_DIGITS);
|
|
276
|
+
}, ...ngDevMode ? [{ debugName: "stepDigits" }] : /* istanbul ignore next */ []);
|
|
277
|
+
priceDigits = computed(() => wrCandlestickDigits(this.data(), this.stepDigits(), MAX_PRICE_DIGITS), ...ngDevMode ? [{ debugName: "priceDigits" }] : /* istanbul ignore next */ []);
|
|
172
278
|
price(value) {
|
|
173
279
|
return this.numbers.exact(value, this.priceDigits());
|
|
174
280
|
}
|
|
175
281
|
tip = useChartTooltip(this.tooltip, (index) => {
|
|
176
|
-
const position = this.
|
|
177
|
-
|
|
178
|
-
const candle = this.candles()[position];
|
|
282
|
+
const position = this.drawnAt(index);
|
|
283
|
+
const candle = this.data()[index];
|
|
179
284
|
const anchor = this.candleEls()[position]?.nativeElement;
|
|
180
|
-
if (!candle || !anchor) return null;
|
|
285
|
+
if (position < 0 || !candle || !anchor || this.state()) return null;
|
|
181
286
|
return {
|
|
182
287
|
datum: {
|
|
183
288
|
label: candle.label,
|
|
@@ -206,8 +311,19 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
206
311
|
}, (x, y) => this.slotAt(x, y));
|
|
207
312
|
activeSlot = computed(() => {
|
|
208
313
|
const index = this.tip.active();
|
|
209
|
-
|
|
314
|
+
if (index === null) return null;
|
|
315
|
+
const per = this.per();
|
|
316
|
+
return { left: percent(Math.floor(index / per) * per / Math.max(1, this.slots()) * 100) };
|
|
210
317
|
}, ...ngDevMode ? [{ debugName: "activeSlot" }] : /* istanbul ignore next */ []);
|
|
318
|
+
empty = computed(() => this.merged().length === 0, ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
|
|
319
|
+
state = useChartState({
|
|
320
|
+
loading: this.loading,
|
|
321
|
+
error: this.error,
|
|
322
|
+
empty: this.empty,
|
|
323
|
+
emptyLabel: this.emptyLabel,
|
|
324
|
+
loadingLabel: this.loadingLabel,
|
|
325
|
+
errorLabel: this.errorLabel
|
|
326
|
+
});
|
|
211
327
|
tableData = computed(() => {
|
|
212
328
|
const cell = (value) => Number.isFinite(value) ? this.price(value) : "";
|
|
213
329
|
return {
|
|
@@ -230,36 +346,38 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
230
346
|
};
|
|
231
347
|
}, ...ngDevMode ? [{ debugName: "tableData" }] : /* istanbul ignore next */ []);
|
|
232
348
|
onPointerMove(event) {
|
|
233
|
-
if (!this.tooltip()) return;
|
|
349
|
+
if (!this.tooltip() || this.tip.active() !== null) return;
|
|
234
350
|
const index = this.slotAt(event.clientX, event.clientY);
|
|
235
351
|
if (index === null) this.tip.leave(event);
|
|
236
352
|
else this.tip.enter(index);
|
|
237
353
|
}
|
|
238
354
|
slotAt(clientX, clientY) {
|
|
239
355
|
const drawing = this.drawing()?.nativeElement;
|
|
240
|
-
const plot = this.plot()?.nativeElement;
|
|
241
356
|
const slots = this.slots();
|
|
242
|
-
if (!drawing ||
|
|
357
|
+
if (!drawing || slots === 0 || this.state()) return null;
|
|
243
358
|
const box = drawing.getBoundingClientRect();
|
|
244
|
-
const frame = plot.getBoundingClientRect();
|
|
245
359
|
if (box.width <= 0 || box.height <= 0) return null;
|
|
246
|
-
|
|
360
|
+
const inset = this.measured()?.inset ?? box.top - (this.plot()?.nativeElement.getBoundingClientRect().top ?? box.top);
|
|
361
|
+
if (clientX < box.left || clientX > box.right || clientY < box.top - inset || clientY > box.bottom + inset) return null;
|
|
247
362
|
const index = wrClamp(Math.floor((clientX - box.left) / box.width * slots), 0, slots - 1);
|
|
248
|
-
return this.
|
|
363
|
+
return this.drawnAt(index) < 0 ? null : index;
|
|
249
364
|
}
|
|
250
365
|
measure() {
|
|
251
366
|
const drawing = this.drawing()?.nativeElement;
|
|
252
367
|
if (!drawing) return;
|
|
253
|
-
const
|
|
368
|
+
const box = drawing.getBoundingClientRect();
|
|
369
|
+
const width = box.width;
|
|
254
370
|
if (width <= 0) return;
|
|
255
371
|
const label = this.probe()?.nativeElement.getBoundingClientRect().width ?? 0;
|
|
256
372
|
const body = this.candleEls()[0]?.nativeElement.getBoundingClientRect().width ?? 0;
|
|
373
|
+
const inset = Math.max(0, box.top - (this.plot()?.nativeElement.getBoundingClientRect().top ?? box.top));
|
|
257
374
|
const last = this.measured();
|
|
258
|
-
if (last?.width === width && last.label === label && last.body === body) return;
|
|
375
|
+
if (last?.width === width && last.label === label && last.body === body && last.inset === inset) return;
|
|
259
376
|
this.measured.set({
|
|
260
377
|
width,
|
|
261
378
|
label,
|
|
262
|
-
body
|
|
379
|
+
body,
|
|
380
|
+
inset
|
|
263
381
|
});
|
|
264
382
|
}
|
|
265
383
|
static drawable(d) {
|
|
@@ -329,6 +447,62 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
329
447
|
isRequired: false,
|
|
330
448
|
transformFunction: null
|
|
331
449
|
},
|
|
450
|
+
showAxis: {
|
|
451
|
+
classPropertyName: "showAxis",
|
|
452
|
+
publicName: "showAxis",
|
|
453
|
+
isSignal: true,
|
|
454
|
+
isRequired: false,
|
|
455
|
+
transformFunction: null
|
|
456
|
+
},
|
|
457
|
+
hollow: {
|
|
458
|
+
classPropertyName: "hollow",
|
|
459
|
+
publicName: "hollow",
|
|
460
|
+
isSignal: true,
|
|
461
|
+
isRequired: false,
|
|
462
|
+
transformFunction: null
|
|
463
|
+
},
|
|
464
|
+
decimate: {
|
|
465
|
+
classPropertyName: "decimate",
|
|
466
|
+
publicName: "decimate",
|
|
467
|
+
isSignal: true,
|
|
468
|
+
isRequired: false,
|
|
469
|
+
transformFunction: null
|
|
470
|
+
},
|
|
471
|
+
loading: {
|
|
472
|
+
classPropertyName: "loading",
|
|
473
|
+
publicName: "loading",
|
|
474
|
+
isSignal: true,
|
|
475
|
+
isRequired: false,
|
|
476
|
+
transformFunction: null
|
|
477
|
+
},
|
|
478
|
+
error: {
|
|
479
|
+
classPropertyName: "error",
|
|
480
|
+
publicName: "error",
|
|
481
|
+
isSignal: true,
|
|
482
|
+
isRequired: false,
|
|
483
|
+
transformFunction: null
|
|
484
|
+
},
|
|
485
|
+
emptyLabel: {
|
|
486
|
+
classPropertyName: "emptyLabel",
|
|
487
|
+
publicName: "emptyLabel",
|
|
488
|
+
isSignal: true,
|
|
489
|
+
isRequired: false,
|
|
490
|
+
transformFunction: null
|
|
491
|
+
},
|
|
492
|
+
loadingLabel: {
|
|
493
|
+
classPropertyName: "loadingLabel",
|
|
494
|
+
publicName: "loadingLabel",
|
|
495
|
+
isSignal: true,
|
|
496
|
+
isRequired: false,
|
|
497
|
+
transformFunction: null
|
|
498
|
+
},
|
|
499
|
+
errorLabel: {
|
|
500
|
+
classPropertyName: "errorLabel",
|
|
501
|
+
publicName: "errorLabel",
|
|
502
|
+
isSignal: true,
|
|
503
|
+
isRequired: false,
|
|
504
|
+
transformFunction: null
|
|
505
|
+
},
|
|
332
506
|
tooltip: {
|
|
333
507
|
classPropertyName: "tooltip",
|
|
334
508
|
publicName: "tooltip",
|
|
@@ -346,6 +520,8 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
346
520
|
},
|
|
347
521
|
host: {
|
|
348
522
|
properties: {
|
|
523
|
+
"class.wr-candlestick-chart--axis": "showAxis()",
|
|
524
|
+
"class.wr-candlestick-chart--hollow": "hollow()",
|
|
349
525
|
"class.wr-candlestick-chart--dense": "dense()",
|
|
350
526
|
"style.--wr-candlestick-chart-input-increase-color": "increaseColor()",
|
|
351
527
|
"style.--wr-candlestick-chart-input-decrease-color": "decreaseColor()"
|
|
@@ -382,8 +558,13 @@ var WrCandlestickChart = class WrCandlestickChart {
|
|
|
382
558
|
}
|
|
383
559
|
],
|
|
384
560
|
ngImport: i0,
|
|
385
|
-
template: "@let active = activeSlot();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (
|
|
561
|
+
template: "@let active = activeSlot();\n@let shown = state();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (showAxis()) {\n <!-- HTML beside the drawing, in flow, so the column is exactly as wide as the longest\n label; each one hands the stylesheet the y of its own gridline. Hidden, as the\n drawing is one image: its name is what is announced, and the prices are the data\n table's. -->\n <div class=\"wr-candlestick-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-candlestick-chart__y-tick\" [style.--wr-candlestick-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-candlestick-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n >\n <!-- Boxes placed by percentage rather than an SVG stretched to the plot: a body's\n width is a share of its slot held between 1px and a ceiling, which CSS can say\n and a stretched viewBox cannot. Hidden as well as presentational: `img` already\n makes it so, and a tree of hundreds of empty boxes is work for nothing. -->\n <div #drawing class=\"wr-candlestick-chart__drawing\" aria-hidden=\"true\" [style.--wr-candlestick-chart-slot]=\"slot()\">\n @if (active) {\n <!-- The slot being read, behind its candle, so the reading is marked by more than\n the tooltip's arrow. Before the gridlines, so they are drawn over it. -->\n <div class=\"wr-candlestick-chart__cursor\" [style.left.%]=\"active.left\"></div>\n }\n\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <div\n class=\"wr-candlestick-chart__grid-line\"\n [class.wr-candlestick-chart__grid-line--zero]=\"tick.zero\"\n [style.top.%]=\"tick.top\"\n ></div>\n }\n }\n\n @if (!shown) {\n @for (candle of candles(); track candle.index) {\n <!-- The candle's box runs from its high to its low, as wide as its body. The\n wicks are its two pseudo-elements, above and below the body, so a hollow\n body is empty rather than crossed by the wick. One class binding for its\n class and its direction, and one attribute for the figures the test harness reads: a\n chart of thousands pays for every binding thousands of times. -->\n <div\n #candleEl\n [class]=\"candle.classes\"\n [style.left.%]=\"candle.left\"\n [style.top.%]=\"candle.top\"\n [style.height.%]=\"candle.height\"\n [style.--wr-candlestick-chart-upper]=\"candle.upper\"\n [style.--wr-candlestick-chart-lower]=\"candle.lower\"\n [attr.data-candle]=\"candle.figures\"\n >\n <div class=\"wr-candlestick-chart__candle-body\"></div>\n </div>\n }\n }\n </div>\n </div>\n\n @if (shown) {\n <!-- Empty, loading or failed: the message, over the grid and the axis the chart\n keeps. Beside the plot in its own grid cell rather than inside it: the plot is\n an `img`, which makes everything it holds presentational, and this is a live\n region. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n }\n\n <!-- The time axis, with or without the grid: the strip is as wide as the plot, and hands\n the stylesheet the room each label has; each label hands it the x of its candle, as\n a percentage of the drawing's width. The hidden copy of the longest few, a line each, is\n what that room is measured against: it is as wide as the widest. -->\n <div class=\"wr-candlestick-chart__x-axis\" aria-hidden=\"true\" [style.--wr-candlestick-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-candlestick-chart__x-probe\">{{ probes() }}</span>\n @for (label of xLabels(); track label.index) {\n <span class=\"wr-candlestick-chart__x-label\" [style.--wr-candlestick-chart-x]=\"label.left\">{{ label.label }}</span>\n }\n </div>\n</div>\n\n@if (dataTable() && (!shown || shown.kind === 'empty')) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. Kept with nothing to draw: a\n period with one price missing draws no candle and still has three to read. Not\n while loading or failed, when the figures are not the chart's to give. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n",
|
|
386
562
|
dependencies: [{
|
|
563
|
+
kind: "component",
|
|
564
|
+
type: WrChartState,
|
|
565
|
+
selector: "wr-chart-state",
|
|
566
|
+
inputs: ["kind", "label"]
|
|
567
|
+
}, {
|
|
387
568
|
kind: "component",
|
|
388
569
|
type: WrChartTable,
|
|
389
570
|
selector: "wr-chart-table",
|
|
@@ -404,12 +585,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
404
585
|
encapsulation: ViewEncapsulation.None,
|
|
405
586
|
host: {
|
|
406
587
|
class: "wr-candlestick-chart",
|
|
588
|
+
"[class.wr-candlestick-chart--axis]": "showAxis()",
|
|
589
|
+
"[class.wr-candlestick-chart--hollow]": "hollow()",
|
|
407
590
|
"[class.wr-candlestick-chart--dense]": "dense()",
|
|
408
591
|
"[style.--wr-candlestick-chart-input-increase-color]": "increaseColor()",
|
|
409
592
|
"[style.--wr-candlestick-chart-input-decrease-color]": "decreaseColor()"
|
|
410
593
|
},
|
|
411
|
-
imports: [WrChartTable],
|
|
412
|
-
template: "@let active = activeSlot();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (
|
|
594
|
+
imports: [WrChartState, WrChartTable],
|
|
595
|
+
template: "@let active = activeSlot();\n@let shown = state();\n<!-- Two columns: the y tick labels at inline start and the plot beside them, with the\n period labels under the plot only, so their percentages are the drawing's. -->\n<div class=\"wr-candlestick-chart__body\">\n @if (showAxis()) {\n <!-- HTML beside the drawing, in flow, so the column is exactly as wide as the longest\n label; each one hands the stylesheet the y of its own gridline. Hidden, as the\n drawing is one image: its name is what is announced, and the prices are the data\n table's. -->\n <div class=\"wr-candlestick-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-candlestick-chart__y-tick\" [style.--wr-candlestick-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div\n #plot\n class=\"wr-candlestick-chart__plot\"\n role=\"img\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"height()\"\n >\n <!-- Boxes placed by percentage rather than an SVG stretched to the plot: a body's\n width is a share of its slot held between 1px and a ceiling, which CSS can say\n and a stretched viewBox cannot. Hidden as well as presentational: `img` already\n makes it so, and a tree of hundreds of empty boxes is work for nothing. -->\n <div #drawing class=\"wr-candlestick-chart__drawing\" aria-hidden=\"true\" [style.--wr-candlestick-chart-slot]=\"slot()\">\n @if (active) {\n <!-- The slot being read, behind its candle, so the reading is marked by more than\n the tooltip's arrow. Before the gridlines, so they are drawn over it. -->\n <div class=\"wr-candlestick-chart__cursor\" [style.left.%]=\"active.left\"></div>\n }\n\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <div\n class=\"wr-candlestick-chart__grid-line\"\n [class.wr-candlestick-chart__grid-line--zero]=\"tick.zero\"\n [style.top.%]=\"tick.top\"\n ></div>\n }\n }\n\n @if (!shown) {\n @for (candle of candles(); track candle.index) {\n <!-- The candle's box runs from its high to its low, as wide as its body. The\n wicks are its two pseudo-elements, above and below the body, so a hollow\n body is empty rather than crossed by the wick. One class binding for its\n class and its direction, and one attribute for the figures the test harness reads: a\n chart of thousands pays for every binding thousands of times. -->\n <div\n #candleEl\n [class]=\"candle.classes\"\n [style.left.%]=\"candle.left\"\n [style.top.%]=\"candle.top\"\n [style.height.%]=\"candle.height\"\n [style.--wr-candlestick-chart-upper]=\"candle.upper\"\n [style.--wr-candlestick-chart-lower]=\"candle.lower\"\n [attr.data-candle]=\"candle.figures\"\n >\n <div class=\"wr-candlestick-chart__candle-body\"></div>\n </div>\n }\n }\n </div>\n </div>\n\n @if (shown) {\n <!-- Empty, loading or failed: the message, over the grid and the axis the chart\n keeps. Beside the plot in its own grid cell rather than inside it: the plot is\n an `img`, which makes everything it holds presentational, and this is a live\n region. -->\n <wr-chart-state [kind]=\"shown.kind\" [label]=\"shown.label\" />\n }\n\n <!-- The time axis, with or without the grid: the strip is as wide as the plot, and hands\n the stylesheet the room each label has; each label hands it the x of its candle, as\n a percentage of the drawing's width. The hidden copy of the longest few, a line each, is\n what that room is measured against: it is as wide as the widest. -->\n <div class=\"wr-candlestick-chart__x-axis\" aria-hidden=\"true\" [style.--wr-candlestick-chart-x-slot]=\"xSlot()\">\n <span #probe class=\"wr-candlestick-chart__x-probe\">{{ probes() }}</span>\n @for (label of xLabels(); track label.index) {\n <span class=\"wr-candlestick-chart__x-label\" [style.--wr-candlestick-chart-x]=\"label.left\">{{ label.label }}</span>\n }\n </div>\n</div>\n\n@if (dataTable() && (!shown || shown.kind === 'empty')) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. Kept with nothing to draw: a\n period with one price missing draws no candle and still has three to read. Not\n while loading or failed, when the figures are not the chart's to give. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"
|
|
413
596
|
}]
|
|
414
597
|
}],
|
|
415
598
|
ctorParameters: () => [],
|
|
@@ -470,6 +653,70 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
470
653
|
required: false
|
|
471
654
|
}]
|
|
472
655
|
}],
|
|
656
|
+
showAxis: [{
|
|
657
|
+
type: i0.Input,
|
|
658
|
+
args: [{
|
|
659
|
+
isSignal: true,
|
|
660
|
+
alias: "showAxis",
|
|
661
|
+
required: false
|
|
662
|
+
}]
|
|
663
|
+
}],
|
|
664
|
+
hollow: [{
|
|
665
|
+
type: i0.Input,
|
|
666
|
+
args: [{
|
|
667
|
+
isSignal: true,
|
|
668
|
+
alias: "hollow",
|
|
669
|
+
required: false
|
|
670
|
+
}]
|
|
671
|
+
}],
|
|
672
|
+
decimate: [{
|
|
673
|
+
type: i0.Input,
|
|
674
|
+
args: [{
|
|
675
|
+
isSignal: true,
|
|
676
|
+
alias: "decimate",
|
|
677
|
+
required: false
|
|
678
|
+
}]
|
|
679
|
+
}],
|
|
680
|
+
loading: [{
|
|
681
|
+
type: i0.Input,
|
|
682
|
+
args: [{
|
|
683
|
+
isSignal: true,
|
|
684
|
+
alias: "loading",
|
|
685
|
+
required: false
|
|
686
|
+
}]
|
|
687
|
+
}],
|
|
688
|
+
error: [{
|
|
689
|
+
type: i0.Input,
|
|
690
|
+
args: [{
|
|
691
|
+
isSignal: true,
|
|
692
|
+
alias: "error",
|
|
693
|
+
required: false
|
|
694
|
+
}]
|
|
695
|
+
}],
|
|
696
|
+
emptyLabel: [{
|
|
697
|
+
type: i0.Input,
|
|
698
|
+
args: [{
|
|
699
|
+
isSignal: true,
|
|
700
|
+
alias: "emptyLabel",
|
|
701
|
+
required: false
|
|
702
|
+
}]
|
|
703
|
+
}],
|
|
704
|
+
loadingLabel: [{
|
|
705
|
+
type: i0.Input,
|
|
706
|
+
args: [{
|
|
707
|
+
isSignal: true,
|
|
708
|
+
alias: "loadingLabel",
|
|
709
|
+
required: false
|
|
710
|
+
}]
|
|
711
|
+
}],
|
|
712
|
+
errorLabel: [{
|
|
713
|
+
type: i0.Input,
|
|
714
|
+
args: [{
|
|
715
|
+
isSignal: true,
|
|
716
|
+
alias: "errorLabel",
|
|
717
|
+
required: false
|
|
718
|
+
}]
|
|
719
|
+
}],
|
|
473
720
|
tooltip: [{
|
|
474
721
|
type: i0.Input,
|
|
475
722
|
args: [{
|