@carto/ps-react-ui 4.7.0 → 4.8.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/dist/category-DwaeYjpX.js +656 -0
- package/dist/category-DwaeYjpX.js.map +1 -0
- package/dist/change-column-Cidl_M-4.js +1110 -0
- package/dist/change-column-Cidl_M-4.js.map +1 -0
- package/dist/data-zoom-layout-BH0LPwSy.js +28 -0
- package/dist/data-zoom-layout-BH0LPwSy.js.map +1 -0
- package/dist/echart-CU0KmClP.js +176 -0
- package/dist/echart-CU0KmClP.js.map +1 -0
- package/dist/exports-Cx-f6m6U.js +63 -0
- package/dist/exports-Cx-f6m6U.js.map +1 -0
- package/dist/formula-DuC0NQLH.js +79 -0
- package/dist/formula-DuC0NQLH.js.map +1 -0
- package/dist/markdown-BD1jcknS.js +8326 -0
- package/dist/markdown-BD1jcknS.js.map +1 -0
- package/dist/merge-options-DCkkHZIf.js +34 -0
- package/dist/merge-options-DCkkHZIf.js.map +1 -0
- package/dist/{styles-BYTyKQFP.js → option-builders-F-c9ELi1.js} +25 -45
- package/dist/option-builders-F-c9ELi1.js.map +1 -0
- package/dist/png-item-CS4z1iSH.js +45 -0
- package/dist/png-item-CS4z1iSH.js.map +1 -0
- package/dist/range-DsqTjSpg.js +186 -0
- package/dist/range-DsqTjSpg.js.map +1 -0
- package/dist/spread-CTuIXZSM.js +67 -0
- package/dist/spread-CTuIXZSM.js.map +1 -0
- package/dist/style-DVnT6HC1.js +131 -0
- package/dist/style-DVnT6HC1.js.map +1 -0
- package/dist/styles-cohnxh9F.js +23 -0
- package/dist/styles-cohnxh9F.js.map +1 -0
- package/dist/table-HIpXuq4G.js +390 -0
- package/dist/table-HIpXuq4G.js.map +1 -0
- package/dist/transforms-Cdx4fkU5.js +106 -0
- package/dist/transforms-Cdx4fkU5.js.map +1 -0
- package/dist/types/widgets/echart/utils.test.d.ts +1 -0
- package/dist/types/widgets/formula/config.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store-branches.test.d.ts +1 -0
- package/dist/types/widgets/table/config.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/brush-toggle/brush-toggle.d.ts +56 -0
- package/dist/types/widgets-v2/actions/brush-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/brush-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/brush-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/brush-toggle/transforms.d.ts +11 -0
- package/dist/types/widgets-v2/actions/brush-toggle/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/change-column/change-column-icon.d.ts +2 -0
- package/dist/types/widgets-v2/actions/change-column/change-column.d.ts +29 -0
- package/dist/types/widgets-v2/actions/change-column/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/change-column/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/change-column/sortable-column-item.d.ts +14 -0
- package/dist/types/widgets-v2/actions/change-column/style.d.ts +33 -0
- package/dist/types/widgets-v2/actions/change-column/types.d.ts +10 -0
- package/dist/types/widgets-v2/actions/download/download.d.ts +18 -0
- package/dist/types/widgets-v2/actions/download/exports.d.ts +37 -0
- package/dist/types/widgets-v2/actions/download/icons.d.ts +12 -0
- package/dist/types/widgets-v2/actions/download/index.d.ts +6 -0
- package/dist/types/widgets-v2/actions/download/labels.d.ts +11 -0
- package/dist/types/widgets-v2/actions/download/png-item.d.ts +24 -0
- package/dist/types/widgets-v2/actions/download/style.d.ts +1 -0
- package/dist/types/widgets-v2/actions/download/types.d.ts +35 -0
- package/dist/types/widgets-v2/actions/fullscreen/fullscreen.d.ts +59 -0
- package/dist/types/widgets-v2/actions/fullscreen/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/fullscreen/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/fullscreen/style.d.ts +48 -0
- package/dist/types/widgets-v2/actions/fullscreen/types.d.ts +14 -0
- package/dist/types/widgets-v2/actions/index.d.ts +9 -0
- package/dist/types/widgets-v2/actions/lock-selection/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/lock-selection/labels.d.ts +6 -0
- package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +36 -0
- package/dist/types/widgets-v2/actions/lock-selection/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/lock-selection/transforms.d.ts +6 -0
- package/dist/types/widgets-v2/actions/relative-data/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/relative-data/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/relative-data/relative-data.d.ts +39 -0
- package/dist/types/widgets-v2/actions/relative-data/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/relative-data/transforms.d.ts +30 -0
- package/dist/types/widgets-v2/actions/relative-data/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/searcher/filter.d.ts +6 -0
- package/dist/types/widgets-v2/actions/searcher/index.d.ts +4 -0
- package/dist/types/widgets-v2/actions/searcher/labels.d.ts +7 -0
- package/dist/types/widgets-v2/actions/searcher/searcher-toggle.d.ts +23 -0
- package/dist/types/widgets-v2/actions/searcher/searcher.d.ts +11 -0
- package/dist/types/widgets-v2/actions/searcher/style.d.ts +16 -0
- package/dist/types/widgets-v2/actions/stack-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/stack-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/stack-toggle/stack-toggle.d.ts +10 -0
- package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/stack-toggle/transforms.d.ts +13 -0
- package/dist/types/widgets-v2/actions/stack-toggle/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/index.d.ts +3 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +12 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/transforms.d.ts +51 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/actions/zoom-toggle/zoom-toggle.d.ts +35 -0
- package/dist/types/widgets-v2/bar/download.d.ts +24 -0
- package/dist/types/widgets-v2/bar/index.d.ts +4 -0
- package/dist/types/widgets-v2/bar/options.d.ts +43 -0
- package/dist/types/widgets-v2/bar/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/bar/skeleton.d.ts +6 -0
- package/dist/types/widgets-v2/bar/types.d.ts +41 -0
- package/dist/types/widgets-v2/category/category-ui.d.ts +81 -0
- package/dist/types/widgets-v2/category/category.d.ts +48 -0
- package/dist/types/widgets-v2/category/components/category-bar-stacked.d.ts +28 -0
- package/dist/types/widgets-v2/category/components/category-bar.d.ts +23 -0
- package/dist/types/widgets-v2/category/components/category-legend.d.ts +18 -0
- package/dist/types/widgets-v2/category/components/category-row-multi.d.ts +31 -0
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +13 -0
- package/dist/types/widgets-v2/category/components/category-row-single.d.ts +28 -0
- package/dist/types/widgets-v2/category/components/category-row-stacked.d.ts +38 -0
- package/dist/types/widgets-v2/category/download.d.ts +16 -0
- package/dist/types/widgets-v2/category/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/category/index.d.ts +10 -0
- package/dist/types/widgets-v2/category/skeleton.d.ts +11 -0
- package/dist/types/widgets-v2/category/style.d.ts +166 -0
- package/dist/types/widgets-v2/category/types.d.ts +49 -0
- package/dist/types/widgets-v2/echart/echart-ui.d.ts +44 -0
- package/dist/types/widgets-v2/echart/echart.d.ts +75 -0
- package/dist/types/widgets-v2/echart/index.d.ts +4 -0
- package/dist/types/widgets-v2/echart/shared-resize-observer.d.ts +5 -0
- package/dist/types/widgets-v2/echart/shared-resize-observer.test.d.ts +1 -0
- package/dist/types/widgets-v2/echart/style.d.ts +6 -0
- package/dist/types/widgets-v2/echart/use-chart-selection.d.ts +51 -0
- package/dist/types/widgets-v2/formula/delta.d.ts +22 -0
- package/dist/types/widgets-v2/formula/download.d.ts +20 -0
- package/dist/types/widgets-v2/formula/formula-ui.d.ts +20 -0
- package/dist/types/widgets-v2/formula/formula.d.ts +8 -0
- package/dist/types/widgets-v2/formula/index.d.ts +11 -0
- package/dist/types/widgets-v2/formula/note.d.ts +11 -0
- package/dist/types/widgets-v2/formula/prefix.d.ts +12 -0
- package/dist/types/widgets-v2/formula/series.d.ts +16 -0
- package/dist/types/widgets-v2/formula/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/formula/style.d.ts +29 -0
- package/dist/types/widgets-v2/formula/suffix.d.ts +12 -0
- package/dist/types/widgets-v2/formula/types.d.ts +40 -0
- package/dist/types/widgets-v2/formula/value.d.ts +14 -0
- package/dist/types/widgets-v2/histogram/download.d.ts +17 -0
- package/dist/types/widgets-v2/histogram/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/index.d.ts +5 -0
- package/dist/types/widgets-v2/histogram/options.d.ts +42 -0
- package/dist/types/widgets-v2/histogram/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/histogram/transforms.d.ts +17 -0
- package/dist/types/widgets-v2/histogram/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/histogram/types.d.ts +47 -0
- package/dist/types/widgets-v2/index.d.ts +107 -0
- package/dist/types/widgets-v2/markdown/download.d.ts +16 -0
- package/dist/types/widgets-v2/markdown/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/markdown/index.d.ts +6 -0
- package/dist/types/widgets-v2/markdown/markdown-content.d.ts +34 -0
- package/dist/types/widgets-v2/markdown/markdown-ui.d.ts +12 -0
- package/dist/types/widgets-v2/markdown/markdown.d.ts +6 -0
- package/dist/types/widgets-v2/markdown/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/markdown/style.d.ts +61 -0
- package/dist/types/widgets-v2/markdown/types.d.ts +4 -0
- package/dist/types/widgets-v2/note/labels.d.ts +5 -0
- package/dist/types/widgets-v2/note/style.d.ts +26 -0
- package/dist/types/widgets-v2/note/widget-note.d.ts +46 -0
- package/dist/types/widgets-v2/pie/download.d.ts +17 -0
- package/dist/types/widgets-v2/pie/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/pie/index.d.ts +4 -0
- package/dist/types/widgets-v2/pie/options.d.ts +35 -0
- package/dist/types/widgets-v2/pie/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/pie/skeleton.d.ts +4 -0
- package/dist/types/widgets-v2/pie/types.d.ts +50 -0
- package/dist/types/widgets-v2/provider/widget-provider.d.ts +32 -0
- package/dist/types/widgets-v2/range/index.d.ts +4 -0
- package/dist/types/widgets-v2/range/range-ui.d.ts +19 -0
- package/dist/types/widgets-v2/range/range.d.ts +19 -0
- package/dist/types/widgets-v2/range/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/range/style.d.ts +40 -0
- package/dist/types/widgets-v2/range/types.d.ts +37 -0
- package/dist/types/widgets-v2/scatterplot/download.d.ts +16 -0
- package/dist/types/widgets-v2/scatterplot/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/index.d.ts +5 -0
- package/dist/types/widgets-v2/scatterplot/options.d.ts +42 -0
- package/dist/types/widgets-v2/scatterplot/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +12 -0
- package/dist/types/widgets-v2/scatterplot/transforms.d.ts +17 -0
- package/dist/types/widgets-v2/scatterplot/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/scatterplot/types.d.ts +50 -0
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +6 -0
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +22 -0
- package/dist/types/widgets-v2/selection-summary/style.d.ts +23 -0
- package/dist/types/widgets-v2/spread/download.d.ts +15 -0
- package/dist/types/widgets-v2/spread/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/spread/index.d.ts +6 -0
- package/dist/types/widgets-v2/spread/separator.d.ts +7 -0
- package/dist/types/widgets-v2/spread/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/spread/spread-ui.d.ts +18 -0
- package/dist/types/widgets-v2/spread/spread.d.ts +5 -0
- package/dist/types/widgets-v2/spread/types.d.ts +25 -0
- package/dist/types/widgets-v2/state/labels.d.ts +7 -0
- package/dist/types/widgets-v2/state/labels.test.d.ts +1 -0
- package/dist/types/widgets-v2/state/style.d.ts +19 -0
- package/dist/types/widgets-v2/state/widget-state.d.ts +19 -0
- package/dist/types/widgets-v2/stores/index.d.ts +8 -0
- package/dist/types/widgets-v2/stores/pipeline-middleware.d.ts +5 -0
- package/dist/types/widgets-v2/stores/pipeline-middleware.test.d.ts +1 -0
- package/dist/types/widgets-v2/stores/transforms.d.ts +4 -0
- package/dist/types/widgets-v2/stores/transforms.test.d.ts +1 -0
- package/dist/types/widgets-v2/stores/types.d.ts +55 -0
- package/dist/types/widgets-v2/stores/use-echart-instance.d.ts +15 -0
- package/dist/types/widgets-v2/stores/use-transform-enabled.d.ts +17 -0
- package/dist/types/widgets-v2/stores/use-transform.d.ts +12 -0
- package/dist/types/widgets-v2/stores/widget-context.d.ts +2 -0
- package/dist/types/widgets-v2/stores/widget-store-registry.d.ts +74 -0
- package/dist/types/widgets-v2/stores/widget-store-registry.test.d.ts +1 -0
- package/dist/types/widgets-v2/subheader/style.d.ts +10 -0
- package/dist/types/widgets-v2/subheader/subheader.d.ts +11 -0
- package/dist/types/widgets-v2/table/download.d.ts +18 -0
- package/dist/types/widgets-v2/table/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/table/helpers.d.ts +32 -0
- package/dist/types/widgets-v2/table/helpers.test.d.ts +1 -0
- package/dist/types/widgets-v2/table/index.d.ts +7 -0
- package/dist/types/widgets-v2/table/labels.d.ts +22 -0
- package/dist/types/widgets-v2/table/skeleton.d.ts +22 -0
- package/dist/types/widgets-v2/table/style.d.ts +44 -0
- package/dist/types/widgets-v2/table/table-ui.d.ts +38 -0
- package/dist/types/widgets-v2/table/table.d.ts +50 -0
- package/dist/types/widgets-v2/table/types.d.ts +37 -0
- package/dist/types/widgets-v2/test-utils.d.ts +52 -0
- package/dist/types/widgets-v2/timeseries/download.d.ts +17 -0
- package/dist/types/widgets-v2/timeseries/download.test.d.ts +1 -0
- package/dist/types/widgets-v2/timeseries/index.d.ts +4 -0
- package/dist/types/widgets-v2/timeseries/options.d.ts +39 -0
- package/dist/types/widgets-v2/timeseries/options.test.d.ts +1 -0
- package/dist/types/widgets-v2/timeseries/skeleton.d.ts +8 -0
- package/dist/types/widgets-v2/timeseries/types.d.ts +56 -0
- package/dist/types/widgets-v2/toolbox/labels.d.ts +5 -0
- package/dist/types/widgets-v2/toolbox/style.d.ts +30 -0
- package/dist/types/widgets-v2/toolbox/toolbox.d.ts +49 -0
- package/dist/types/widgets-v2/utils/data-zoom-layout.d.ts +11 -0
- package/dist/types/widgets-v2/utils/index.d.ts +2 -0
- package/dist/types/widgets-v2/utils/merge-options.d.ts +12 -0
- package/dist/types/widgets-v2/utils/merge-options.test.d.ts +1 -0
- package/dist/types/widgets-v2/wrapper/index.d.ts +4 -0
- package/dist/types/widgets-v2/wrapper/labels.d.ts +6 -0
- package/dist/types/widgets-v2/wrapper/style.d.ts +111 -0
- package/dist/types/widgets-v2/wrapper/widget-actions.d.ts +22 -0
- package/dist/types/widgets-v2/wrapper/widget-content.d.ts +12 -0
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +51 -0
- package/dist/use-transform-DXPN3nY7.js +110 -0
- package/dist/use-transform-DXPN3nY7.js.map +1 -0
- package/dist/widget-context-DTGO0Yta.js +13 -0
- package/dist/widget-context-DTGO0Yta.js.map +1 -0
- package/dist/widget-store-registry-_W4Z4xp-.js +178 -0
- package/dist/widget-store-registry-_W4Z4xp-.js.map +1 -0
- package/dist/widgets/actions.js +688 -668
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +14 -13
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/histogram.js +38 -37
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/pie.js +19 -18
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/scatterplot.js +8 -7
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/timeseries.js +11 -10
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/utils.js +8 -7
- package/dist/widgets/utils.js.map +1 -1
- package/dist/widgets-v2/actions.js +43 -0
- package/dist/widgets-v2/actions.js.map +1 -0
- package/dist/widgets-v2/bar.js +327 -0
- package/dist/widgets-v2/bar.js.map +1 -0
- package/dist/widgets-v2/category.js +104 -0
- package/dist/widgets-v2/category.js.map +1 -0
- package/dist/widgets-v2/echart.js +57 -0
- package/dist/widgets-v2/echart.js.map +1 -0
- package/dist/widgets-v2/formula.js +74 -0
- package/dist/widgets-v2/formula.js.map +1 -0
- package/dist/widgets-v2/histogram.js +350 -0
- package/dist/widgets-v2/histogram.js.map +1 -0
- package/dist/widgets-v2/markdown.js +68 -0
- package/dist/widgets-v2/markdown.js.map +1 -0
- package/dist/widgets-v2/pie.js +381 -0
- package/dist/widgets-v2/pie.js.map +1 -0
- package/dist/widgets-v2/range.js +52 -0
- package/dist/widgets-v2/range.js.map +1 -0
- package/dist/widgets-v2/scatterplot.js +405 -0
- package/dist/widgets-v2/scatterplot.js.map +1 -0
- package/dist/widgets-v2/spread.js +72 -0
- package/dist/widgets-v2/spread.js.map +1 -0
- package/dist/widgets-v2/stores.js +42 -0
- package/dist/widgets-v2/stores.js.map +1 -0
- package/dist/widgets-v2/table.js +78 -0
- package/dist/widgets-v2/table.js.map +1 -0
- package/dist/widgets-v2/timeseries.js +352 -0
- package/dist/widgets-v2/timeseries.js.map +1 -0
- package/dist/widgets-v2/utils.js +7 -0
- package/dist/widgets-v2/utils.js.map +1 -0
- package/dist/widgets-v2.js +953 -0
- package/dist/widgets-v2.js.map +1 -0
- package/package.json +73 -5
- package/src/components/lasso-tool/chip.test.tsx +176 -0
- package/src/components/lasso-tool/lasso-tool-inline.test.tsx +171 -0
- package/src/components/lasso-tool/lasso-tool.test.tsx +198 -0
- package/src/components/list-data/list-data.test.tsx +73 -0
- package/src/components/no-data-alert/no-data-alert.test.tsx +38 -0
- package/src/components/responsive-drawer/responsive-drawer.test.tsx +68 -0
- package/src/widgets/actions/brush-toggle/brush-overlay.test.tsx +465 -0
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +24 -2
- package/src/widgets/actions/brush-toggle/brush-toggle.test.tsx +208 -0
- package/src/widgets/actions/change-column/change-column-dnd.test.tsx +193 -0
- package/src/widgets/actions/change-column/sortable-column-item.test.tsx +124 -0
- package/src/widgets/actions/zoom-toggle/zoom-toggle.test.tsx +322 -0
- package/src/widgets/category/components/category-rows.test.tsx +213 -0
- package/src/widgets/echart/utils.test.ts +277 -0
- package/src/widgets/formula/config.test.ts +37 -0
- package/src/widgets/histogram/config.ts +1 -3
- package/src/widgets/range/components/range-item.test.tsx +243 -0
- package/src/widgets/stores/widget-store-branches.test.ts +275 -0
- package/src/widgets/table/config.test.ts +65 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +188 -0
- package/src/widgets-v2/PERFORMANCE.md +189 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.test.tsx +180 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +154 -0
- package/src/widgets-v2/actions/brush-toggle/index.ts +3 -0
- package/src/widgets-v2/actions/brush-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/brush-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.test.ts +47 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.ts +31 -0
- package/src/widgets-v2/actions/change-column/change-column-icon.tsx +14 -0
- package/src/widgets-v2/actions/change-column/change-column.test.tsx +59 -0
- package/src/widgets-v2/actions/change-column/change-column.tsx +180 -0
- package/src/widgets-v2/actions/change-column/index.ts +7 -0
- package/src/widgets-v2/actions/change-column/labels.ts +9 -0
- package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +56 -0
- package/src/widgets-v2/actions/change-column/style.ts +32 -0
- package/src/widgets-v2/actions/change-column/types.ts +11 -0
- package/src/widgets-v2/actions/download/download.test.tsx +327 -0
- package/src/widgets-v2/actions/download/download.tsx +144 -0
- package/src/widgets-v2/actions/download/exports.test.tsx +198 -0
- package/src/widgets-v2/actions/download/exports.ts +115 -0
- package/src/widgets-v2/actions/download/icons.tsx +26 -0
- package/src/widgets-v2/actions/download/index.ts +13 -0
- package/src/widgets-v2/actions/download/labels.ts +16 -0
- package/src/widgets-v2/actions/download/png-item.test.tsx +72 -0
- package/src/widgets-v2/actions/download/png-item.tsx +52 -0
- package/src/widgets-v2/actions/download/style.ts +3 -0
- package/src/widgets-v2/actions/download/types.ts +32 -0
- package/src/widgets-v2/actions/fullscreen/fullscreen.test.tsx +150 -0
- package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +230 -0
- package/src/widgets-v2/actions/fullscreen/index.ts +7 -0
- package/src/widgets-v2/actions/fullscreen/labels.ts +9 -0
- package/src/widgets-v2/actions/fullscreen/style.ts +59 -0
- package/src/widgets-v2/actions/fullscreen/types.ts +15 -0
- package/src/widgets-v2/actions/index.ts +82 -0
- package/src/widgets-v2/actions/lock-selection/index.ts +10 -0
- package/src/widgets-v2/actions/lock-selection/labels.ts +11 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.test.tsx +187 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +130 -0
- package/src/widgets-v2/actions/lock-selection/style.ts +11 -0
- package/src/widgets-v2/actions/lock-selection/transforms.ts +27 -0
- package/src/widgets-v2/actions/relative-data/index.ts +3 -0
- package/src/widgets-v2/actions/relative-data/labels.ts +9 -0
- package/src/widgets-v2/actions/relative-data/relative-data.test.tsx +71 -0
- package/src/widgets-v2/actions/relative-data/relative-data.tsx +107 -0
- package/src/widgets-v2/actions/relative-data/style.ts +11 -0
- package/src/widgets-v2/actions/relative-data/transforms.test.ts +151 -0
- package/src/widgets-v2/actions/relative-data/transforms.ts +70 -0
- package/src/widgets-v2/actions/searcher/filter.ts +28 -0
- package/src/widgets-v2/actions/searcher/index.ts +8 -0
- package/src/widgets-v2/actions/searcher/labels.ts +13 -0
- package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +91 -0
- package/src/widgets-v2/actions/searcher/searcher.test.tsx +92 -0
- package/src/widgets-v2/actions/searcher/searcher.tsx +112 -0
- package/src/widgets-v2/actions/searcher/style.ts +15 -0
- package/src/widgets-v2/actions/stack-toggle/index.ts +3 -0
- package/src/widgets-v2/actions/stack-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/stack-toggle/stack-toggle.test.tsx +61 -0
- package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +54 -0
- package/src/widgets-v2/actions/stack-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/stack-toggle/transforms.test.ts +43 -0
- package/src/widgets-v2/actions/stack-toggle/transforms.ts +25 -0
- package/src/widgets-v2/actions/zoom-toggle/index.ts +9 -0
- package/src/widgets-v2/actions/zoom-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/zoom-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/zoom-toggle/transforms.test.ts +148 -0
- package/src/widgets-v2/actions/zoom-toggle/transforms.ts +171 -0
- package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.test.tsx +107 -0
- package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +106 -0
- package/src/widgets-v2/bar/download.test.tsx +91 -0
- package/src/widgets-v2/bar/download.tsx +66 -0
- package/src/widgets-v2/bar/index.ts +10 -0
- package/src/widgets-v2/bar/options.test.ts +317 -0
- package/src/widgets-v2/bar/options.ts +326 -0
- package/src/widgets-v2/bar/skeleton.test.tsx +19 -0
- package/src/widgets-v2/bar/skeleton.tsx +69 -0
- package/src/widgets-v2/bar/types.ts +46 -0
- package/src/widgets-v2/category/category-ui.test.tsx +746 -0
- package/src/widgets-v2/category/category-ui.tsx +389 -0
- package/src/widgets-v2/category/category.relative-data.test.tsx +107 -0
- package/src/widgets-v2/category/category.stack-toggle.test.tsx +85 -0
- package/src/widgets-v2/category/category.test.tsx +305 -0
- package/src/widgets-v2/category/category.tsx +121 -0
- package/src/widgets-v2/category/components/category-bar-stacked.test.tsx +121 -0
- package/src/widgets-v2/category/components/category-bar-stacked.tsx +73 -0
- package/src/widgets-v2/category/components/category-bar.test.tsx +64 -0
- package/src/widgets-v2/category/components/category-bar.tsx +49 -0
- package/src/widgets-v2/category/components/category-legend.test.tsx +51 -0
- package/src/widgets-v2/category/components/category-legend.tsx +39 -0
- package/src/widgets-v2/category/components/category-row-multi.tsx +86 -0
- package/src/widgets-v2/category/components/category-row-other.test.tsx +28 -0
- package/src/widgets-v2/category/components/category-row-other.tsx +33 -0
- package/src/widgets-v2/category/components/category-row-single.tsx +76 -0
- package/src/widgets-v2/category/components/category-row-stacked.test.tsx +244 -0
- package/src/widgets-v2/category/components/category-row-stacked.tsx +99 -0
- package/src/widgets-v2/category/download.test.ts +71 -0
- package/src/widgets-v2/category/download.ts +54 -0
- package/src/widgets-v2/category/index.ts +32 -0
- package/src/widgets-v2/category/skeleton.test.tsx +26 -0
- package/src/widgets-v2/category/skeleton.tsx +74 -0
- package/src/widgets-v2/category/style.ts +290 -0
- package/src/widgets-v2/category/types.ts +54 -0
- package/src/widgets-v2/echart/echart-ui.test.tsx +232 -0
- package/src/widgets-v2/echart/echart-ui.tsx +184 -0
- package/src/widgets-v2/echart/echart.test.tsx +229 -0
- package/src/widgets-v2/echart/echart.tsx +199 -0
- package/src/widgets-v2/echart/index.ts +22 -0
- package/src/widgets-v2/echart/shared-resize-observer.test.ts +91 -0
- package/src/widgets-v2/echart/shared-resize-observer.ts +56 -0
- package/src/widgets-v2/echart/style.ts +8 -0
- package/src/widgets-v2/echart/use-chart-selection.test.tsx +118 -0
- package/src/widgets-v2/echart/use-chart-selection.ts +115 -0
- package/src/widgets-v2/formula/delta.tsx +61 -0
- package/src/widgets-v2/formula/download.test.tsx +65 -0
- package/src/widgets-v2/formula/download.tsx +69 -0
- package/src/widgets-v2/formula/formula-ui.test.tsx +91 -0
- package/src/widgets-v2/formula/formula-ui.tsx +66 -0
- package/src/widgets-v2/formula/formula.test.tsx +50 -0
- package/src/widgets-v2/formula/formula.tsx +34 -0
- package/src/widgets-v2/formula/index.ts +17 -0
- package/src/widgets-v2/formula/note.tsx +25 -0
- package/src/widgets-v2/formula/prefix.tsx +25 -0
- package/src/widgets-v2/formula/series.tsx +67 -0
- package/src/widgets-v2/formula/skeleton.test.tsx +21 -0
- package/src/widgets-v2/formula/skeleton.tsx +27 -0
- package/src/widgets-v2/formula/style.ts +31 -0
- package/src/widgets-v2/formula/subcomponents.test.tsx +107 -0
- package/src/widgets-v2/formula/suffix.tsx +25 -0
- package/src/widgets-v2/formula/types.ts +44 -0
- package/src/widgets-v2/formula/value.tsx +31 -0
- package/src/widgets-v2/histogram/download.test.ts +94 -0
- package/src/widgets-v2/histogram/download.ts +60 -0
- package/src/widgets-v2/histogram/index.ts +10 -0
- package/src/widgets-v2/histogram/options.test.ts +304 -0
- package/src/widgets-v2/histogram/options.ts +337 -0
- package/src/widgets-v2/histogram/skeleton.test.tsx +16 -0
- package/src/widgets-v2/histogram/skeleton.tsx +70 -0
- package/src/widgets-v2/histogram/transforms.test.ts +46 -0
- package/src/widgets-v2/histogram/transforms.ts +30 -0
- package/src/widgets-v2/histogram/types.ts +51 -0
- package/src/widgets-v2/index.ts +201 -0
- package/src/widgets-v2/markdown/download.test.ts +66 -0
- package/src/widgets-v2/markdown/download.ts +53 -0
- package/src/widgets-v2/markdown/index.ts +6 -0
- package/src/widgets-v2/markdown/markdown-content.test.tsx +155 -0
- package/src/widgets-v2/markdown/markdown-content.tsx +72 -0
- package/src/widgets-v2/markdown/markdown-ui.test.tsx +75 -0
- package/src/widgets-v2/markdown/markdown-ui.tsx +55 -0
- package/src/widgets-v2/markdown/markdown.test.tsx +39 -0
- package/src/widgets-v2/markdown/markdown.tsx +17 -0
- package/src/widgets-v2/markdown/skeleton.test.tsx +15 -0
- package/src/widgets-v2/markdown/skeleton.tsx +32 -0
- package/src/widgets-v2/markdown/style.ts +53 -0
- package/src/widgets-v2/markdown/types.ts +4 -0
- package/src/widgets-v2/note/labels.ts +9 -0
- package/src/widgets-v2/note/style.ts +26 -0
- package/src/widgets-v2/note/widget-note.test.tsx +158 -0
- package/src/widgets-v2/note/widget-note.tsx +172 -0
- package/src/widgets-v2/pie/download.test.ts +78 -0
- package/src/widgets-v2/pie/download.ts +55 -0
- package/src/widgets-v2/pie/index.ts +10 -0
- package/src/widgets-v2/pie/options.test.ts +585 -0
- package/src/widgets-v2/pie/options.ts +509 -0
- package/src/widgets-v2/pie/skeleton.test.tsx +17 -0
- package/src/widgets-v2/pie/skeleton.tsx +32 -0
- package/src/widgets-v2/pie/types.ts +55 -0
- package/src/widgets-v2/provider/widget-provider.test.tsx +119 -0
- package/src/widgets-v2/provider/widget-provider.tsx +111 -0
- package/src/widgets-v2/range/index.ts +4 -0
- package/src/widgets-v2/range/range-ui.test.tsx +130 -0
- package/src/widgets-v2/range/range-ui.tsx +211 -0
- package/src/widgets-v2/range/range.test.tsx +68 -0
- package/src/widgets-v2/range/range.tsx +46 -0
- package/src/widgets-v2/range/skeleton.test.tsx +17 -0
- package/src/widgets-v2/range/skeleton.tsx +47 -0
- package/src/widgets-v2/range/style.ts +41 -0
- package/src/widgets-v2/range/types.ts +37 -0
- package/src/widgets-v2/scatterplot/download.test.ts +71 -0
- package/src/widgets-v2/scatterplot/download.ts +54 -0
- package/src/widgets-v2/scatterplot/index.ts +11 -0
- package/src/widgets-v2/scatterplot/options.test.ts +399 -0
- package/src/widgets-v2/scatterplot/options.ts +421 -0
- package/src/widgets-v2/scatterplot/skeleton.test.tsx +17 -0
- package/src/widgets-v2/scatterplot/skeleton.tsx +84 -0
- package/src/widgets-v2/scatterplot/transforms.test.ts +97 -0
- package/src/widgets-v2/scatterplot/transforms.ts +38 -0
- package/src/widgets-v2/scatterplot/types.ts +55 -0
- package/src/widgets-v2/selection-summary/labels.ts +11 -0
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +53 -0
- package/src/widgets-v2/selection-summary/selection-summary.tsx +62 -0
- package/src/widgets-v2/selection-summary/style.ts +23 -0
- package/src/widgets-v2/spread/download.test.ts +64 -0
- package/src/widgets-v2/spread/download.ts +59 -0
- package/src/widgets-v2/spread/index.ts +6 -0
- package/src/widgets-v2/spread/separator.tsx +11 -0
- package/src/widgets-v2/spread/skeleton.test.tsx +17 -0
- package/src/widgets-v2/spread/skeleton.tsx +38 -0
- package/src/widgets-v2/spread/spread-ui.test.tsx +108 -0
- package/src/widgets-v2/spread/spread-ui.tsx +52 -0
- package/src/widgets-v2/spread/spread.test.tsx +50 -0
- package/src/widgets-v2/spread/spread.tsx +31 -0
- package/src/widgets-v2/spread/types.ts +27 -0
- package/src/widgets-v2/state/labels.test.ts +33 -0
- package/src/widgets-v2/state/labels.ts +20 -0
- package/src/widgets-v2/state/style.ts +25 -0
- package/src/widgets-v2/state/widget-state.test.tsx +294 -0
- package/src/widgets-v2/state/widget-state.tsx +184 -0
- package/src/widgets-v2/stores/index.ts +49 -0
- package/src/widgets-v2/stores/pipeline-middleware.test.ts +187 -0
- package/src/widgets-v2/stores/pipeline-middleware.ts +91 -0
- package/src/widgets-v2/stores/transforms.test.ts +162 -0
- package/src/widgets-v2/stores/transforms.ts +70 -0
- package/src/widgets-v2/stores/types.ts +64 -0
- package/src/widgets-v2/stores/use-echart-instance.test.tsx +91 -0
- package/src/widgets-v2/stores/use-echart-instance.ts +29 -0
- package/src/widgets-v2/stores/use-transform-enabled.test.tsx +127 -0
- package/src/widgets-v2/stores/use-transform-enabled.ts +25 -0
- package/src/widgets-v2/stores/use-transform.test.tsx +262 -0
- package/src/widgets-v2/stores/use-transform.ts +158 -0
- package/src/widgets-v2/stores/widget-context.test.tsx +58 -0
- package/src/widgets-v2/stores/widget-context.ts +15 -0
- package/src/widgets-v2/stores/widget-store-registry.test.ts +292 -0
- package/src/widgets-v2/stores/widget-store-registry.ts +248 -0
- package/src/widgets-v2/subheader/style.ts +12 -0
- package/src/widgets-v2/subheader/subheader.test.tsx +30 -0
- package/src/widgets-v2/subheader/subheader.tsx +16 -0
- package/src/widgets-v2/table/download.test.ts +75 -0
- package/src/widgets-v2/table/download.ts +47 -0
- package/src/widgets-v2/table/helpers.test.ts +214 -0
- package/src/widgets-v2/table/helpers.ts +136 -0
- package/src/widgets-v2/table/index.ts +23 -0
- package/src/widgets-v2/table/labels.tsx +41 -0
- package/src/widgets-v2/table/skeleton.test.tsx +26 -0
- package/src/widgets-v2/table/skeleton.tsx +65 -0
- package/src/widgets-v2/table/style.ts +46 -0
- package/src/widgets-v2/table/table-ui.test.tsx +200 -0
- package/src/widgets-v2/table/table-ui.tsx +331 -0
- package/src/widgets-v2/table/table.test.tsx +119 -0
- package/src/widgets-v2/table/table.tsx +174 -0
- package/src/widgets-v2/table/types.ts +44 -0
- package/src/widgets-v2/test-utils.ts +107 -0
- package/src/widgets-v2/timeseries/download.test.ts +95 -0
- package/src/widgets-v2/timeseries/download.ts +86 -0
- package/src/widgets-v2/timeseries/index.ts +10 -0
- package/src/widgets-v2/timeseries/options.test.ts +379 -0
- package/src/widgets-v2/timeseries/options.ts +341 -0
- package/src/widgets-v2/timeseries/skeleton.test.tsx +13 -0
- package/src/widgets-v2/timeseries/skeleton.tsx +76 -0
- package/src/widgets-v2/timeseries/types.ts +61 -0
- package/src/widgets-v2/toolbox/labels.ts +9 -0
- package/src/widgets-v2/toolbox/style.ts +33 -0
- package/src/widgets-v2/toolbox/toolbox.test.tsx +200 -0
- package/src/widgets-v2/toolbox/toolbox.tsx +309 -0
- package/src/widgets-v2/utils/data-zoom-layout.ts +26 -0
- package/src/widgets-v2/utils/index.ts +2 -0
- package/src/widgets-v2/utils/merge-options.test.ts +52 -0
- package/src/widgets-v2/utils/merge-options.ts +50 -0
- package/src/widgets-v2/wrapper/index.ts +14 -0
- package/src/widgets-v2/wrapper/labels.ts +11 -0
- package/src/widgets-v2/wrapper/style.ts +134 -0
- package/src/widgets-v2/wrapper/widget-actions.test.tsx +52 -0
- package/src/widgets-v2/wrapper/widget-actions.tsx +43 -0
- package/src/widgets-v2/wrapper/widget-content.test.tsx +27 -0
- package/src/widgets-v2/wrapper/widget-content.tsx +29 -0
- package/src/widgets-v2/wrapper/widget-wrapper.test.tsx +159 -0
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +178 -0
- package/dist/styles-BYTyKQFP.js.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { FullScreenLabels } from './labels';
|
|
4
|
+
export interface FullScreenTriggerProps {
|
|
5
|
+
labels?: Partial<FullScreenLabels>;
|
|
6
|
+
enterIcon?: ComponentType<SvgIconProps>;
|
|
7
|
+
exitIcon?: ComponentType<SvgIconProps>;
|
|
8
|
+
iconProps?: SvgIconProps;
|
|
9
|
+
}
|
|
10
|
+
export interface FullScreenSlotProps {
|
|
11
|
+
/**
|
|
12
|
+
* Render-prop body. Receives the live `isFullScreen` flag so the consumer
|
|
13
|
+
* can branch per-mode props (e.g., `Widget.Toolbox visibleCount`) without
|
|
14
|
+
* duplicating the JSX.
|
|
15
|
+
*/
|
|
16
|
+
children: (isFullScreen: boolean) => ReactNode;
|
|
17
|
+
/** Header text rendered above the body when the modal is open. */
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
labels?: Partial<FullScreenLabels>;
|
|
20
|
+
closeIcon?: ComponentType<SvgIconProps>;
|
|
21
|
+
iconProps?: SvgIconProps;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Toggle button placed inside `<Widget.Actions>`. Reads / writes
|
|
25
|
+
* {@link FullScreenWidgetState.isFullScreen} on the per-widget store. The
|
|
26
|
+
* matching modal is rendered by {@link FullScreenSlot} (typically inside
|
|
27
|
+
* `<Widget.Content>`).
|
|
28
|
+
*/
|
|
29
|
+
declare function FullScreenTrigger({ labels, enterIcon: EnterIcon, exitIcon: ExitIcon, iconProps, }: FullScreenTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Body wrapper. Renders its render-prop children once, via a single
|
|
32
|
+
* `createPortal` call whose container is a stable `<div>` we hold as a ref.
|
|
33
|
+
* That div is moved imperatively between an inline placeholder and the
|
|
34
|
+
* `<DialogContent>` of an MUI `<Dialog keepMounted>`. Because both the
|
|
35
|
+
* React parent (the portal call site) AND the portal container are
|
|
36
|
+
* identical across the toggle, the subtree keeps its fiber identity and
|
|
37
|
+
* ECharts (or any other heavy child) stays mounted while only its DOM
|
|
38
|
+
* parent changes.
|
|
39
|
+
*/
|
|
40
|
+
declare function FullScreenSlot({ children, title, labels, closeIcon: CloseSvg, iconProps, }: FullScreenSlotProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* Namespace export. Consumers compose with:
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Widget.Actions>
|
|
46
|
+
* <Widget.FullScreen.Trigger />
|
|
47
|
+
* </Widget.Actions>
|
|
48
|
+
* <Widget.Content>
|
|
49
|
+
* <Widget.FullScreen.Slot title={title}>
|
|
50
|
+
* {(isFullScreen) => <Body visibleCount={isFullScreen ? undefined : 2} />}
|
|
51
|
+
* </Widget.FullScreen.Slot>
|
|
52
|
+
* </Widget.Content>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare const FullScreen: {
|
|
56
|
+
Trigger: typeof FullScreenTrigger;
|
|
57
|
+
Slot: typeof FullScreenSlot;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
inlineSlot: {
|
|
4
|
+
display: "flex";
|
|
5
|
+
flexDirection: "column";
|
|
6
|
+
flex: number;
|
|
7
|
+
minHeight: number;
|
|
8
|
+
gap: number;
|
|
9
|
+
};
|
|
10
|
+
trigger: {
|
|
11
|
+
p: number;
|
|
12
|
+
'& .MuiSvgIcon-root': {
|
|
13
|
+
fontSize: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
triggerActive: {
|
|
17
|
+
background: (theme: Theme) => string;
|
|
18
|
+
};
|
|
19
|
+
dialogPaper: {
|
|
20
|
+
width: string;
|
|
21
|
+
height: string;
|
|
22
|
+
maxWidth: string;
|
|
23
|
+
maxHeight: string;
|
|
24
|
+
};
|
|
25
|
+
dialogTitle: {
|
|
26
|
+
display: "flex";
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
justifyContent: "space-between";
|
|
29
|
+
gap: number;
|
|
30
|
+
py: number;
|
|
31
|
+
pr: number;
|
|
32
|
+
pb: number;
|
|
33
|
+
};
|
|
34
|
+
titleText: {
|
|
35
|
+
minWidth: number;
|
|
36
|
+
overflow: "hidden";
|
|
37
|
+
textOverflow: "ellipsis";
|
|
38
|
+
whiteSpace: "nowrap";
|
|
39
|
+
};
|
|
40
|
+
dialogContent: {
|
|
41
|
+
display: "flex";
|
|
42
|
+
flexDirection: "column";
|
|
43
|
+
gap: number;
|
|
44
|
+
py: number;
|
|
45
|
+
px: number;
|
|
46
|
+
overflow: "auto";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WidgetState } from '../../stores';
|
|
2
|
+
/**
|
|
3
|
+
* State extension owned by FullScreen. The base `WidgetState` deliberately
|
|
4
|
+
* stays free of widget-specific UI flags (R12 from the round-5 amendment);
|
|
5
|
+
* actions that need persistent UI state declare it here and read it via the
|
|
6
|
+
* generic `useWidget<T, S>(id, sel)` form.
|
|
7
|
+
*
|
|
8
|
+
* `isFullScreen` survives `keepAlive` remounts because it lives on the same
|
|
9
|
+
* store the rest of `WidgetState` does — a kept-alive widget that was
|
|
10
|
+
* fullscreen reopens fullscreen automatically.
|
|
11
|
+
*/
|
|
12
|
+
export interface FullScreenWidgetState extends WidgetState {
|
|
13
|
+
isFullScreen: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Searcher, SearcherToggle, setSearcherText, filterBySearchText, DEFAULT_SEARCHER_LABELS, type SearcherProps, type SearcherToggleProps, type SearcherLabels, } from './searcher';
|
|
2
|
+
export { StackToggle, addStack, DEFAULT_STACK_TOGGLE_LABELS, type StackToggleProps, type StackToggleLabels, } from './stack-toggle';
|
|
3
|
+
export { ZoomToggle, addZoom, createAddZoom, ZOOM_LAYOUT, DEFAULT_ZOOM_TOGGLE_LABELS, type ZoomToggleProps, type ZoomToggleLabels, } from './zoom-toggle';
|
|
4
|
+
export { BrushToggle, addBrush, DEFAULT_BRUSH_TOGGLE_LABELS, type BrushToggleProps, type BrushToggleLabels, } from './brush-toggle';
|
|
5
|
+
export { RelativeData, toRelativeData, createPercentFormatter, DEFAULT_RELATIVE_DATA_LABELS, type RelativeDataProps, type RelativeDataLabels, } from './relative-data';
|
|
6
|
+
export { Download, downloadToCSV, downloadDOMToPNG, toCsvString, triggerLinkDownload, buildPngDownloadItem, CSVIcon, PNGIcon, DEFAULT_DOWNLOAD_LABELS, type DownloadProps, type DownloadItem, type DownloadHandle, type DownloadDOMToPNGOptions, type BuildPngDownloadItemArgs, type DownloadLabels, } from './download';
|
|
7
|
+
export { FullScreen, DEFAULT_FULLSCREEN_LABELS, type FullScreenTriggerProps, type FullScreenSlotProps, type FullScreenLabels, type FullScreenWidgetState, } from './fullscreen';
|
|
8
|
+
export { LockSelection, filterByLockedItems, DEFAULT_LOCK_SELECTION_LABELS, type LockSelectionProps, type LockSelectionKey, type LockSelectionLabels, } from './lock-selection';
|
|
9
|
+
export { ChangeColumn, DEFAULT_CHANGE_COLUMN_LABELS, type ChangeColumnProps, type ChangeColumnItem, type ChangeColumnLabels, type ChangeColumnWidgetState, } from './change-column';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { LockSelectionLabels } from './labels';
|
|
4
|
+
export type LockSelectionKey = string | number;
|
|
5
|
+
export interface LockSelectionProps {
|
|
6
|
+
/**
|
|
7
|
+
* Currently-selected items (destination-owned). On lock, this set is
|
|
8
|
+
* snapshotted into `lockedItems` via `onLockChange`.
|
|
9
|
+
*/
|
|
10
|
+
selection: readonly LockSelectionKey[];
|
|
11
|
+
/**
|
|
12
|
+
* Currently-locked items (destination-owned). When non-empty, the widget's
|
|
13
|
+
* data is filtered to these items via the registered transform.
|
|
14
|
+
*/
|
|
15
|
+
lockedItems: readonly LockSelectionKey[];
|
|
16
|
+
/**
|
|
17
|
+
* Fires when the user toggles the lock. The destination is responsible for
|
|
18
|
+
* persisting the new locked set (and re-feeding it via `lockedItems`).
|
|
19
|
+
*/
|
|
20
|
+
onLockChange: (next: readonly LockSelectionKey[]) => void;
|
|
21
|
+
labels?: Partial<LockSelectionLabels>;
|
|
22
|
+
/** Lock icon (default: `LockIcon`). */
|
|
23
|
+
lockIcon?: ComponentType<SvgIconProps>;
|
|
24
|
+
/** Unlock icon (default: `LockOpenIcon`). */
|
|
25
|
+
unlockIcon?: ComponentType<SvgIconProps>;
|
|
26
|
+
iconProps?: SvgIconProps;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Action that pins the current selection so the widget's data filters down
|
|
30
|
+
* to those items even as the user changes selections. Selection and lock
|
|
31
|
+
* state are destination-owned; this component is a controlled UI + a data
|
|
32
|
+
* transform registered against the widget's pipeline.
|
|
33
|
+
*
|
|
34
|
+
* The trigger is disabled when there is nothing to lock and nothing locked.
|
|
35
|
+
*/
|
|
36
|
+
export declare function LockSelection({ selection, lockedItems, onLockChange, labels, lockIcon: LockSvg, unlockIcon: UnlockSvg, iconProps, }: LockSelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filters a 2D series of `{name, ...}` records, keeping only items whose
|
|
3
|
+
* `name` is in the locked set. Multi-series shape is preserved (one inner
|
|
4
|
+
* array per series). Used by the LockSelection action's data transform.
|
|
5
|
+
*/
|
|
6
|
+
export declare function filterByLockedItems(input: unknown, lockedItems: readonly (string | number)[]): unknown;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { RelativeDataLabels } from './labels';
|
|
4
|
+
export interface RelativeDataProps {
|
|
5
|
+
initialEnabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* BCP-47 locale tag forwarded to `Intl.NumberFormat`. Defaults to the
|
|
8
|
+
* runtime locale.
|
|
9
|
+
*/
|
|
10
|
+
locale?: string;
|
|
11
|
+
labels?: Partial<RelativeDataLabels>;
|
|
12
|
+
icon?: ComponentType<SvgIconProps>;
|
|
13
|
+
iconProps?: SvgIconProps;
|
|
14
|
+
/**
|
|
15
|
+
* Data-side transform that rewrites the widget's series into their
|
|
16
|
+
* relative (0–100) form. Defaults to {@link toRelativeData}, which
|
|
17
|
+
* handles the canonical `{ name, value }[]` shape (bar / pie /
|
|
18
|
+
* timeseries / category). Widgets with a different data shape pass
|
|
19
|
+
* their own — `toRelativeHistogramData` for histogram's `number[]`,
|
|
20
|
+
* `toRelativeScatterplotData` for scatter's `[x, y][]`.
|
|
21
|
+
*
|
|
22
|
+
* Should be a stable top-level reference; inline `(data) => ...`
|
|
23
|
+
* literals re-register the transform every render.
|
|
24
|
+
*/
|
|
25
|
+
transform?: (data: unknown) => unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Toggle between absolute and relative (percentage) values.
|
|
29
|
+
*
|
|
30
|
+
* - **Data side**: a single data transform ({@link toRelativeData}) registered
|
|
31
|
+
* through `useSingleTransform`. When disabled, the pipeline skips it and the
|
|
32
|
+
* derived `data` reverts to `rawData` automatically.
|
|
33
|
+
* - **Formatter side**: an effect writes directly to `state.formatter`. When
|
|
34
|
+
* enabled it installs the Intl-based percent formatter; when disabled it
|
|
35
|
+
* reads `state.rawFormatter` (the consumer-supplied original, always live)
|
|
36
|
+
* and writes it back to `formatter`. No "original" snapshot is captured —
|
|
37
|
+
* `rawFormatter` is the original.
|
|
38
|
+
*/
|
|
39
|
+
export declare function RelativeData({ initialEnabled, locale, labels, icon: Icon, iconProps, transform, }: RelativeDataProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default data-side transform for `RelativeData`: rewrite each
|
|
3
|
+
* `{ name, value }` datum's `value` to its share of the series total
|
|
4
|
+
* expressed as 0–100 (matches v1's range). The companion percent
|
|
5
|
+
* formatter divides by 100 so it can call `Intl.NumberFormat` with
|
|
6
|
+
* `style: 'percent'`.
|
|
7
|
+
*
|
|
8
|
+
* Used by widgets whose series are arrays of `{ name, value }`
|
|
9
|
+
* objects — bar, pie, timeseries, category. Widgets with a different
|
|
10
|
+
* data shape pass their own transform via
|
|
11
|
+
* `<RelativeData transform={...} />`; see `widgets-v2/histogram` and
|
|
12
|
+
* `widgets-v2/scatterplot` for in-tree examples.
|
|
13
|
+
*
|
|
14
|
+
* The denominator is the sum of |value| across the series so mixed-sign
|
|
15
|
+
* series (e.g. cashflow with inflows + outflows) produce sane signed
|
|
16
|
+
* shares-of-magnitude. A series whose total magnitude is zero (all-zero
|
|
17
|
+
* or empty input) is returned unchanged so a stalled or empty data set
|
|
18
|
+
* doesn't show misleading 0% values. Series whose shape doesn't match
|
|
19
|
+
* the named-value pattern fall through untouched.
|
|
20
|
+
*/
|
|
21
|
+
export declare const toRelativeData: (input: unknown) => unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Build a percent formatter using `Intl.NumberFormat`. The returned function
|
|
24
|
+
* expects values in the 0–100 range (output of {@link toRelativeData}) and
|
|
25
|
+
* divides by 100 internally before calling `style: 'percent'`.
|
|
26
|
+
*
|
|
27
|
+
* Locale: passed straight to `Intl.NumberFormat`. Falls back to the runtime
|
|
28
|
+
* default when omitted.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createPercentFormatter(locale?: string): (value: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filters a 2D series of `{name, ...}` records by case-insensitive substring on
|
|
3
|
+
* the `name` field. Keeps the dataset shape (one inner array per series).
|
|
4
|
+
* Used by the Searcher action's data transform.
|
|
5
|
+
*/
|
|
6
|
+
export declare function filterBySearchText(input: unknown, search: string): unknown;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Searcher, type SearcherProps } from './searcher';
|
|
2
|
+
export { SearcherToggle, setSearcherText, type SearcherToggleProps, } from './searcher-toggle';
|
|
3
|
+
export { filterBySearchText } from './filter';
|
|
4
|
+
export { DEFAULT_SEARCHER_LABELS, type SearcherLabels } from './labels';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { SearcherLabels } from './labels';
|
|
4
|
+
export interface SearcherToggleProps {
|
|
5
|
+
labels?: Partial<SearcherLabels>;
|
|
6
|
+
icon?: ComponentType<SvgIconProps>;
|
|
7
|
+
iconProps?: SvgIconProps;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the searcher transform is enabled on first mount. Defaults
|
|
10
|
+
* to `false` so the toggle renders un-pressed and the
|
|
11
|
+
* `filterBySearchText` transform stays dormant until the user clicks
|
|
12
|
+
* it. Set to `true` for search-first widgets where the input is the
|
|
13
|
+
* primary affordance.
|
|
14
|
+
*/
|
|
15
|
+
initialEnabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function SearcherToggle({ labels, icon: Icon, iconProps, initialEnabled, }: SearcherToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Imperatively writes the search text into the widget store. Used by the
|
|
20
|
+
* Searcher input to update text inside transformStates without going through
|
|
21
|
+
* a re-rendered React subscription.
|
|
22
|
+
*/
|
|
23
|
+
export declare function setSearcherText(widgetId: string, value: string): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SearcherLabels } from './labels';
|
|
2
|
+
export interface SearcherProps {
|
|
3
|
+
labels?: Partial<SearcherLabels>;
|
|
4
|
+
/** Debounce delay before the input value is written to the widget store. */
|
|
5
|
+
debounceMs?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Renders only when the matching `<SearcherToggle />` is enabled — drives the
|
|
9
|
+
* `transformStates['searcher'].searchText` field via a debounced setter.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Searcher({ labels, debounceMs, }: SearcherProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
toggle: {
|
|
4
|
+
p: number;
|
|
5
|
+
'& .MuiSvgIcon-root': {
|
|
6
|
+
fontSize: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
toggleActive: {
|
|
10
|
+
background: (theme: Theme) => string;
|
|
11
|
+
};
|
|
12
|
+
input: {
|
|
13
|
+
width: string;
|
|
14
|
+
mb: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { StackToggleLabels } from './labels';
|
|
4
|
+
export interface StackToggleProps {
|
|
5
|
+
initialEnabled?: boolean;
|
|
6
|
+
labels?: Partial<StackToggleLabels>;
|
|
7
|
+
icon?: ComponentType<SvgIconProps>;
|
|
8
|
+
iconProps?: SvgIconProps;
|
|
9
|
+
}
|
|
10
|
+
export declare function StackToggle({ initialEnabled, labels, icon: Icon, iconProps, }: StackToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stack-mode config transform: marks every series with `stack: 'total'` so
|
|
3
|
+
* ECharts stacks them vertically (bar) or by value (line). Module-level
|
|
4
|
+
* constant so identity is stable across renders — no `useCallback` needed.
|
|
5
|
+
*
|
|
6
|
+
* Widgets that bake series into options at build time get marked in place.
|
|
7
|
+
* Widgets that build series at data-fusion time (`bar`, `histogram`,
|
|
8
|
+
* `timeseries`) have no `series` array yet at config-transform time, so we
|
|
9
|
+
* also emit a single-entry **broadcast template** (`[{ stack: 'total' }]`).
|
|
10
|
+
* Their option factories merge that template into every series they emit
|
|
11
|
+
* at fusion time, so the `stack` mark survives end-to-end.
|
|
12
|
+
*/
|
|
13
|
+
export declare const addStack: (option: unknown) => unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
/** Which chart axis (or axes) zoom applies to. */
|
|
3
|
+
export type ZoomAxis = 'x' | 'y';
|
|
4
|
+
export interface CreateAddZoomOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Axes to enable zoom on. Default `['x']` (matches bar / histogram /
|
|
7
|
+
* timeseries — horizontal pan/zoom on the category axis). Pass
|
|
8
|
+
* `['x', 'y']` for a scatterplot-style 2D zoom (mouse-wheel scales both
|
|
9
|
+
* axes; a horizontal slider sits at the bottom for x-range and a
|
|
10
|
+
* vertical slider sits on the right for y-range).
|
|
11
|
+
*/
|
|
12
|
+
axes?: readonly ZoomAxis[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Theme-bound zoom config transform: adds one inside `dataZoom`
|
|
16
|
+
* (mouse-wheel + drag) per axis plus a styled slider per axis with the
|
|
17
|
+
* v1 chrome (blue-tinted filler, secondary-color data preview, white
|
|
18
|
+
* pill handles, CARTO typography). The x-slider is horizontal at the
|
|
19
|
+
* bottom; the y-slider is vertical on the right.
|
|
20
|
+
*
|
|
21
|
+
* Returned function has stable identity for a given theme + axes
|
|
22
|
+
* combination; pair with `useMemo` at the call site.
|
|
23
|
+
*
|
|
24
|
+
* **No `start` / `end`** are emitted: ECharts defaults to `0–100` on the
|
|
25
|
+
* first `setOption` and then keeps the runtime slider state across
|
|
26
|
+
* subsequent merges (no `replaceMerge` for `dataZoom`). Re-running the
|
|
27
|
+
* transform on data/formatter/RelativeData updates therefore preserves the
|
|
28
|
+
* user's dragged range instead of snapping it back.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createAddZoom(theme: Theme, options?: CreateAddZoomOptions): (option: unknown) => unknown;
|
|
31
|
+
/**
|
|
32
|
+
* Back-compat untyped transform — produces the bare `dataZoom` config from
|
|
33
|
+
* the original v2 implementation. Use {@link createAddZoom} when a theme is
|
|
34
|
+
* available so the slider matches the v1 styling.
|
|
35
|
+
*
|
|
36
|
+
* `start` / `end` are intentionally omitted so ECharts preserves the user's
|
|
37
|
+
* runtime range across subsequent `setOption` merges (see {@link createAddZoom}).
|
|
38
|
+
*/
|
|
39
|
+
export declare const addZoom: (option: unknown) => unknown;
|
|
40
|
+
/**
|
|
41
|
+
* Visual layout constants used by the data-fusion mergers (bar, histogram,
|
|
42
|
+
* timeseries) when laying out the slider against the legend / grid.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ZOOM_LAYOUT: {
|
|
45
|
+
/** Slider height in px (matches `createAddZoom` output). */
|
|
46
|
+
readonly sliderHeight: 32;
|
|
47
|
+
/** Vertical gap between chart grid and the slider. */
|
|
48
|
+
readonly sliderGap: 8;
|
|
49
|
+
/** Slider `bottom` when a legend is shown — sits above the legend row. */
|
|
50
|
+
readonly sliderBottomWithLegend: 28;
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { ZoomAxis } from './transforms';
|
|
4
|
+
import { ZoomToggleLabels } from './labels';
|
|
5
|
+
export interface ZoomToggleProps {
|
|
6
|
+
initialEnabled?: boolean;
|
|
7
|
+
labels?: Partial<ZoomToggleLabels>;
|
|
8
|
+
icon?: ComponentType<SvgIconProps>;
|
|
9
|
+
iconProps?: SvgIconProps;
|
|
10
|
+
/**
|
|
11
|
+
* Which axes the zoom controls. Default `['x']` — matches bar /
|
|
12
|
+
* histogram / timeseries (horizontal pan on the category axis). Pass
|
|
13
|
+
* `['x', 'y']` for 2D zoom on a scatterplot-style chart (mouse-wheel
|
|
14
|
+
* scales both axes; horizontal slider at bottom + vertical slider on
|
|
15
|
+
* the right).
|
|
16
|
+
*/
|
|
17
|
+
axes?: readonly ZoomAxis[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Toggle a `dataZoom` slider + wheel-zoom on the chart. The transform is
|
|
21
|
+
* theme-bound so the slider gets v1's CARTO chrome (blue-tinted filler,
|
|
22
|
+
* secondary-color preview, white pill handles).
|
|
23
|
+
*
|
|
24
|
+
* `dataZoom` is intentionally NOT in `replaceMergeKeys` — ECharts merges
|
|
25
|
+
* subsequent `setOption` calls so the user's dragged range survives
|
|
26
|
+
* unrelated re-renders (data updates, formatter swaps, RelativeData toggles).
|
|
27
|
+
*
|
|
28
|
+
* On disable the transform is unregistered, but ECharts' merge semantics
|
|
29
|
+
* would otherwise *keep* the live `dataZoom` component visible. To remove
|
|
30
|
+
* the slider immediately we issue a one-shot
|
|
31
|
+
* `setOption({}, { replaceMerge: ['dataZoom'] })` against the live chart
|
|
32
|
+
* instance via {@link getEchartInstance} — this bypasses the pipeline so
|
|
33
|
+
* unrelated transforms aren't disturbed.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ZoomToggle({ initialEnabled, labels, icon: Icon, iconProps, axes, }: ZoomToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DownloadItem } from '../actions/download';
|
|
2
|
+
import { BarWidgetData } from './types';
|
|
3
|
+
export interface BarDownloadConfigArgs {
|
|
4
|
+
filename: string;
|
|
5
|
+
getData: () => BarWidgetData;
|
|
6
|
+
/**
|
|
7
|
+
* Optional getter for the widget's capture element (registered by
|
|
8
|
+
* `Widget.State` on its success path). When provided, a PNG item is
|
|
9
|
+
* prepended to the returned list. Wire it to
|
|
10
|
+
* `() => getCaptureEl(id)`.
|
|
11
|
+
*/
|
|
12
|
+
getCaptureEl?: () => HTMLElement | null;
|
|
13
|
+
/** PNG `pixelRatio` (default 2). */
|
|
14
|
+
pngPixelRatio?: number;
|
|
15
|
+
/** PNG `backgroundColor` (default transparent). */
|
|
16
|
+
pngBackgroundColor?: string | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Builds download items for the Bar widget. Always includes a CSV item
|
|
20
|
+
* with one `name,value` block per series, separated by an empty row when
|
|
21
|
+
* there are multiple. When `getCaptureEl` is supplied, also prepends a PNG
|
|
22
|
+
* item that rasterises the captured element via `html2canvas`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createBarDownloadConfig(args: BarDownloadConfigArgs): DownloadItem[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { barOptions, createBarOptionFactory } from './options';
|
|
2
|
+
export { BarSkeleton } from './skeleton';
|
|
3
|
+
export { createBarDownloadConfig } from './download';
|
|
4
|
+
export type { BarDatum, BarWidgetData, BarOptionsInput, BarOptionFactoryInput, BarEChartsOption, } from './types';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { OptionFactory } from '../echart';
|
|
2
|
+
import { BarEChartsOption, BarOptionFactoryInput, BarOptionsInput } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the **structural** ECharts option for a bar widget — axes, grid,
|
|
5
|
+
* tooltip styling, themed legend. Intentionally data-agnostic: no series,
|
|
6
|
+
* no dataset, no `legend.show` (those depend on data and are added by the
|
|
7
|
+
* option factory's merge phase). This separation is what lets data-side
|
|
8
|
+
* pipeline transforms (Searcher, RelativeData) drive the rendered chart —
|
|
9
|
+
* the merge happens at render time inside the Echart bridge.
|
|
10
|
+
*
|
|
11
|
+
* Styling matches the v1 `barConfig` look-and-feel: minimal axes (only
|
|
12
|
+
* min/max y-labels rendered inside the plot via `niceNum`), themed tooltip,
|
|
13
|
+
* scroll legend, and CARTO color palette. The y-axis min/max + label
|
|
14
|
+
* formatter and the tooltip formatter are wired here for the no-data case;
|
|
15
|
+
* {@link createBarOptionFactory} re-derives them at fusion time so reactive
|
|
16
|
+
* formatter changes (RelativeData) and stack templates (StackToggle) flow
|
|
17
|
+
* through to the chart.
|
|
18
|
+
*/
|
|
19
|
+
export declare function barOptions({ theme, formatter, labelFormatter, }: BarOptionsInput): BarEChartsOption;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the bar widget's {@link OptionFactory} — a single closure that
|
|
22
|
+
* handles BOTH option-construction phases:
|
|
23
|
+
*
|
|
24
|
+
* - **Structural phase** (`option == null`) — builds the theme-aware
|
|
25
|
+
* structural option via {@link barOptions}, optionally merging the
|
|
26
|
+
* consumer-supplied `optionsOverride` on top. Called once by Provider
|
|
27
|
+
* to seed `rawOptions` in the store; configTransforms (StackToggle /
|
|
28
|
+
* ZoomToggle / BrushToggle) then mutate it via the pipeline middleware.
|
|
29
|
+
* - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`
|
|
30
|
+
* (`BarWidgetData`) into the option via the dataset API: one dataset
|
|
31
|
+
* per series, each series referencing its dataset by index, encoded
|
|
32
|
+
* by `name` (x) and `value` (y). Spreads any series-template fields
|
|
33
|
+
* already on the incoming option (e.g. `{ stack: 'total' }` from
|
|
34
|
+
* `addStack`) into every emitted series so configTransforms compose
|
|
35
|
+
* end-to-end. Reactive `ctx.formatter` / `ctx.labelFormatter` drive
|
|
36
|
+
* the y-axis min/max-only label and the tooltip formatter at fusion
|
|
37
|
+
* time so RelativeData's percent formatter flows through without a
|
|
38
|
+
* structural rebuild.
|
|
39
|
+
*
|
|
40
|
+
* Stable identity when the inputs don't change (consumers should wrap the
|
|
41
|
+
* call in `useMemo` keyed on the same inputs).
|
|
42
|
+
*/
|
|
43
|
+
export declare function createBarOptionFactory(options: BarOptionFactoryInput): OptionFactory;
|