@carto/ps-react-ui 4.7.1 → 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/bar.js +14 -13
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/histogram.js +8 -7
- 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-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/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,32 @@
|
|
|
1
|
+
import { TableColumn, TableRow, TableSortDirection, TableWidgetData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Compares two values with a consistent ordering across primitive types.
|
|
4
|
+
* Strings use locale comparison; numbers subtract; booleans rank false < true;
|
|
5
|
+
* objects/arrays compare by JSON serialization. Null/undefined sort to the end
|
|
6
|
+
* regardless of direction.
|
|
7
|
+
*/
|
|
8
|
+
export declare function compareValues(a: unknown, b: unknown, direction: TableSortDirection): number;
|
|
9
|
+
/** Returns a new array sorted by the named column. Does not mutate the input. */
|
|
10
|
+
export declare function sortRows<T extends TableRow>(rows: readonly T[], columnId: string, direction: TableSortDirection): T[];
|
|
11
|
+
/** Returns the slice for the requested page. Out-of-range pages return []. */
|
|
12
|
+
export declare function paginateRows<T>(rows: readonly T[], page: number, pageSize: number): T[];
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the effective column list. When the widget store has a
|
|
15
|
+
* `columnOrder` set (e.g. ChangeColumn was used), the column array is
|
|
16
|
+
* reordered to match. Unknown ids in the order are skipped; columns not
|
|
17
|
+
* present in the order keep their original relative position at the end.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveColumns(columns: readonly TableColumn[], columnOrder: readonly string[] | undefined): readonly TableColumn[];
|
|
20
|
+
/** Applies sort and pagination to the input data. Pure. */
|
|
21
|
+
export declare function deriveVisibleRows<T extends TableRow>(rows: readonly T[], options: {
|
|
22
|
+
sort?: {
|
|
23
|
+
columnId: string | null;
|
|
24
|
+
direction: TableSortDirection;
|
|
25
|
+
};
|
|
26
|
+
page: number;
|
|
27
|
+
pageSize: number;
|
|
28
|
+
}): {
|
|
29
|
+
sorted: readonly T[];
|
|
30
|
+
visible: T[];
|
|
31
|
+
};
|
|
32
|
+
export declare function tableDataToCsv(data: TableWidgetData, columns: readonly TableColumn[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Table, type TableProps } from './table';
|
|
2
|
+
export { TableUI, type TableUIProps } from './table-ui';
|
|
3
|
+
export { TableSkeleton, type TableSkeletonProps } from './skeleton';
|
|
4
|
+
export { createTableDownloadConfig } from './download';
|
|
5
|
+
export { compareValues, sortRows, paginateRows, resolveColumns, deriveVisibleRows, tableDataToCsv, } from './helpers';
|
|
6
|
+
export { DEFAULT_TABLE_LABELS, type TableLabels } from './labels';
|
|
7
|
+
export { DEFAULT_TABLE_PAGE_SIZE, DEFAULT_TABLE_PAGE_SIZE_OPTIONS, type TableColumn, type TableRow, type TableWidgetData, type TableWidgetState, type TableSortDirection, type TableSortState, } from './types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TableLabels {
|
|
3
|
+
selectAll: string;
|
|
4
|
+
selectRow: (rowId: string | number) => string;
|
|
5
|
+
rowsPerPage: string;
|
|
6
|
+
/**
|
|
7
|
+
* Renders the displayed-rows summary in the pagination footer. Returns
|
|
8
|
+
* a `ReactNode` so the default can emphasise the active range
|
|
9
|
+
* (`from-to`) with a bolder weight while keeping the trailing
|
|
10
|
+
* ` of total` muted. Override to localise wording or restyle.
|
|
11
|
+
*/
|
|
12
|
+
paginationOf: (from: number, to: number, total: number) => ReactNode;
|
|
13
|
+
/** aria-label for the first-page pagination button. */
|
|
14
|
+
firstPage: string;
|
|
15
|
+
/** aria-label for the previous-page pagination button. */
|
|
16
|
+
previousPage: string;
|
|
17
|
+
/** aria-label for the next-page pagination button. */
|
|
18
|
+
nextPage: string;
|
|
19
|
+
/** aria-label for the last-page pagination button. */
|
|
20
|
+
lastPage: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const DEFAULT_TABLE_LABELS: TableLabels;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TableProps as MuiTableProps } from '@mui/material';
|
|
2
|
+
export interface TableSkeletonProps {
|
|
3
|
+
/** Number of body rows to render. Defaults to `5` (matches v1). */
|
|
4
|
+
rows?: number;
|
|
5
|
+
/** Number of columns to render. Defaults to `4` (matches v1). */
|
|
6
|
+
columns?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Forwarded to MUI's `<Table size>` so the loading layout matches the
|
|
9
|
+
* size you'll render in {@link TableUI}. Leave `undefined` (the
|
|
10
|
+
* default) to use MUI's own default density.
|
|
11
|
+
*/
|
|
12
|
+
size?: MuiTableProps['size'];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Loading placeholder for the Table widget. Renders the same MUI table
|
|
16
|
+
* primitives that {@link TableUI} uses so the loading layout (column
|
|
17
|
+
* widths, header band, row density) doesn't shift when data resolves.
|
|
18
|
+
*
|
|
19
|
+
* Mirrors the v1 widget's `<TableSkeleton>` structure with v2's themed
|
|
20
|
+
* `styles.headerCell`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function TableSkeleton({ rows, columns, size, }: TableSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
overflowX: "auto";
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Minimum table width so columns don't collapse to unreadable widths on
|
|
8
|
+
* narrow widget shells. Mirrors v1.
|
|
9
|
+
*/
|
|
10
|
+
table: {
|
|
11
|
+
minWidth: number;
|
|
12
|
+
};
|
|
13
|
+
headerCell: {
|
|
14
|
+
fontWeight: number;
|
|
15
|
+
backgroundColor: "background.paper";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Strip the bottom border from the last body row so the body flushes
|
|
19
|
+
* against the pagination border instead of doubling it up. Mirrors v1.
|
|
20
|
+
*/
|
|
21
|
+
row: {
|
|
22
|
+
'&:last-child td, &:last-child th': {
|
|
23
|
+
border: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
rowClickable: {
|
|
27
|
+
cursor: "pointer";
|
|
28
|
+
};
|
|
29
|
+
pagination: {
|
|
30
|
+
borderTop: string;
|
|
31
|
+
borderColor: "divider";
|
|
32
|
+
};
|
|
33
|
+
paginationActions: {
|
|
34
|
+
display: "flex";
|
|
35
|
+
alignItems: "center";
|
|
36
|
+
gap: number;
|
|
37
|
+
ml: number;
|
|
38
|
+
};
|
|
39
|
+
empty: {
|
|
40
|
+
textAlign: "center";
|
|
41
|
+
color: "text.secondary";
|
|
42
|
+
py: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TableProps as MuiTableProps } from '@mui/material';
|
|
2
|
+
import { TableLabels } from './labels';
|
|
3
|
+
import { TableColumn, TableRow, TableSortState } from './types';
|
|
4
|
+
export interface TableUIProps<T extends TableRow = TableRow> {
|
|
5
|
+
columns: readonly TableColumn[];
|
|
6
|
+
/** Already-paginated, already-sorted rows for the current view. */
|
|
7
|
+
rows: readonly T[];
|
|
8
|
+
/** Total row count (across all pages). Required for pagination footer. */
|
|
9
|
+
total: number;
|
|
10
|
+
page: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
pageSizeOptions?: readonly number[];
|
|
13
|
+
sort?: TableSortState;
|
|
14
|
+
/** Selected row ids. Destination-owned. */
|
|
15
|
+
selection?: readonly (string | number)[];
|
|
16
|
+
selectable?: boolean;
|
|
17
|
+
onSortChange?: (next: TableSortState) => void;
|
|
18
|
+
onPageChange?: (page: number) => void;
|
|
19
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
20
|
+
onSelectionChange?: (next: readonly (string | number)[]) => void;
|
|
21
|
+
onRowClick?: (row: T) => void;
|
|
22
|
+
onRowHover?: (row: T | null) => void;
|
|
23
|
+
labels?: Partial<TableLabels>;
|
|
24
|
+
/** Row rendered when `rows` is empty for the current page. */
|
|
25
|
+
emptyContent?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Forwarded to MUI's `<Table size>` — `'small'` for compact rows,
|
|
28
|
+
* `'medium'` for the default density. Leave `undefined` (the default)
|
|
29
|
+
* to let MUI's own default kick in.
|
|
30
|
+
*/
|
|
31
|
+
size?: MuiTableProps['size'];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Pure renderer for a paginated, sortable, optionally-selectable table.
|
|
35
|
+
* Has no widget-store coupling — `<Table>` (the bridge) reads from the store
|
|
36
|
+
* and feeds this UI with already-projected data.
|
|
37
|
+
*/
|
|
38
|
+
export declare function TableUI<T extends TableRow = TableRow>({ columns, rows, total, page, pageSize, pageSizeOptions, sort, selection, selectable, onSortChange, onPageChange, onPageSizeChange, onSelectionChange, onRowClick, onRowHover, labels, emptyContent, size, }: TableUIProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TableUIProps } from './table-ui';
|
|
2
|
+
import { TableColumn, TableRow, TableSortState } from './types';
|
|
3
|
+
export interface TableProps<T extends TableRow = TableRow> extends Pick<TableUIProps<T>, 'pageSizeOptions' | 'selectable' | 'labels' | 'emptyContent' | 'size'> {
|
|
4
|
+
/**
|
|
5
|
+
* Column definitions. Order can be overridden by ChangeColumn via the
|
|
6
|
+
* `columnOrder` field on the extended widget state.
|
|
7
|
+
*/
|
|
8
|
+
columns: readonly TableColumn[];
|
|
9
|
+
/**
|
|
10
|
+
* When set, render only the first `visibleColumns` entries **after**
|
|
11
|
+
* applying the user's `columnOrder` from the store. Useful for showing
|
|
12
|
+
* a compact projection while letting consumers (e.g. `Widget.ChangeColumn`)
|
|
13
|
+
* see the full column list. When omitted, every column renders.
|
|
14
|
+
*/
|
|
15
|
+
visibleColumns?: number;
|
|
16
|
+
/** Initial page size (only on first mount; afterwards lives on the store). */
|
|
17
|
+
initialPageSize?: number;
|
|
18
|
+
/** Selected row ids (destination-owned). */
|
|
19
|
+
selection?: readonly (string | number)[];
|
|
20
|
+
onSelectionChange?: (next: readonly (string | number)[]) => void;
|
|
21
|
+
onRowClick?: (row: T) => void;
|
|
22
|
+
onRowHover?: (row: T | null) => void;
|
|
23
|
+
/**
|
|
24
|
+
* When `true`, the bridge stops sorting and paginating locally and
|
|
25
|
+
* renders `data` as-is — the consumer is then responsible for
|
|
26
|
+
* refetching the slice that matches the active `page` / `pageSize` /
|
|
27
|
+
* `sort` from the outbound callbacks below. `total` is required in
|
|
28
|
+
* this mode (the server already knows the full row count; the
|
|
29
|
+
* widget can't infer it from a partial page).
|
|
30
|
+
*/
|
|
31
|
+
remote?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Server-reported total row count. Required when `remote === true`;
|
|
34
|
+
* ignored in local mode (where the bridge derives total from the
|
|
35
|
+
* sorted result of `deriveVisibleRows`).
|
|
36
|
+
*/
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Fires after the store-level sort write so the consumer can refetch. */
|
|
39
|
+
onSortChange?: (next: TableSortState) => void;
|
|
40
|
+
/** Fires after the store-level page write so the consumer can refetch. */
|
|
41
|
+
onPageChange?: (page: number) => void;
|
|
42
|
+
/** Fires after the store-level pageSize write so the consumer can refetch. */
|
|
43
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Bridge component — reads the widget store's `data`, applies sort + pagination
|
|
47
|
+
* locally, and feeds `<TableUI />`. Sort, page, and pageSize live on the
|
|
48
|
+
* extended widget state ({@link TableWidgetState}).
|
|
49
|
+
*/
|
|
50
|
+
export declare function Table<T extends TableRow = TableRow>({ columns, visibleColumns, initialPageSize, selection, onSelectionChange, onRowClick, onRowHover, remote, total: remoteTotal, onSortChange, onPageChange, onPageSizeChange, ...uiProps }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WidgetState } from '../stores';
|
|
3
|
+
/** Single row of tabular data. Must have an `id` for selection / keying. */
|
|
4
|
+
export interface TableRow extends Record<string, unknown> {
|
|
5
|
+
id: string | number;
|
|
6
|
+
}
|
|
7
|
+
export type TableWidgetData = readonly TableRow[];
|
|
8
|
+
export type TableSortDirection = 'asc' | 'desc';
|
|
9
|
+
export interface TableSortState {
|
|
10
|
+
columnId: string | null;
|
|
11
|
+
direction: TableSortDirection;
|
|
12
|
+
}
|
|
13
|
+
export interface TableColumn {
|
|
14
|
+
/** Unique column identifier; matches the field name on each row. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Header label. */
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
align?: 'left' | 'center' | 'right';
|
|
19
|
+
width?: number | string;
|
|
20
|
+
sortable?: boolean;
|
|
21
|
+
/** Custom cell renderer. Falls back to a string-cast of the raw value. */
|
|
22
|
+
formatter?: (value: unknown, row: TableRow) => ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* State extension carrying Table-specific UI state on the per-widget store.
|
|
26
|
+
* Per R12: widget-specific UI state lives in widget-specific extensions of
|
|
27
|
+
* `WidgetState`, not on the base type.
|
|
28
|
+
*/
|
|
29
|
+
export interface TableWidgetState extends WidgetState {
|
|
30
|
+
/** Optional reordered column list driven by ChangeColumn. Falls back to props. */
|
|
31
|
+
columnOrder?: readonly string[];
|
|
32
|
+
sort?: TableSortState;
|
|
33
|
+
page: number;
|
|
34
|
+
pageSize: number;
|
|
35
|
+
}
|
|
36
|
+
export declare const DEFAULT_TABLE_PAGE_SIZE = 10;
|
|
37
|
+
export declare const DEFAULT_TABLE_PAGE_SIZE_OPTIONS: readonly [10, 25, 50, 100];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import { ECharts, EChartsOption } from 'echarts';
|
|
3
|
+
import { WidgetState, WidgetStoreApi } from './stores';
|
|
4
|
+
export interface MockChartHandlers {
|
|
5
|
+
finished?: () => void;
|
|
6
|
+
rendered?: () => void;
|
|
7
|
+
click?: (params: unknown) => void;
|
|
8
|
+
globalcursortaken?: (params: unknown) => void;
|
|
9
|
+
datazoom?: (params: unknown) => void;
|
|
10
|
+
brushselected?: (params: unknown) => void;
|
|
11
|
+
brushend?: (params: unknown) => void;
|
|
12
|
+
[key: string]: ((params?: unknown) => void) | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface MockChart {
|
|
15
|
+
dispatchAction: ReturnType<typeof vi.fn>;
|
|
16
|
+
setOption: ReturnType<typeof vi.fn>;
|
|
17
|
+
getOption: ReturnType<typeof vi.fn>;
|
|
18
|
+
resize: ReturnType<typeof vi.fn>;
|
|
19
|
+
clear: ReturnType<typeof vi.fn>;
|
|
20
|
+
dispose: ReturnType<typeof vi.fn>;
|
|
21
|
+
isDisposed: ReturnType<typeof vi.fn>;
|
|
22
|
+
getWidth: ReturnType<typeof vi.fn>;
|
|
23
|
+
getHeight: ReturnType<typeof vi.fn>;
|
|
24
|
+
getDom: ReturnType<typeof vi.fn>;
|
|
25
|
+
on: (event: string, callback: (params?: unknown) => void) => void;
|
|
26
|
+
off: (event: string, callback?: (params?: unknown) => void) => void;
|
|
27
|
+
__handlers: MockChartHandlers;
|
|
28
|
+
__emit: (event: keyof MockChartHandlers, params?: unknown) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns a duck-typed `ECharts` instance suitable for tests. The instance
|
|
32
|
+
* captures `on()` handlers in `__handlers` so tests can `__emit('finished')`
|
|
33
|
+
* directly, and all imperative methods (`dispatchAction`, `setOption`,
|
|
34
|
+
* `resize`, …) are `vi.fn()` spies.
|
|
35
|
+
*/
|
|
36
|
+
export declare function createMockChart(): MockChart;
|
|
37
|
+
/** Convenience cast for tests that need an `ECharts`-typed reference. */
|
|
38
|
+
export declare const asEcharts: (chart: MockChart) => ECharts;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a `vi.fn()` option factory. The factory takes the standard
|
|
41
|
+
* `(option, data, ctx)` signature and returns the supplied `output` unchanged.
|
|
42
|
+
* Useful when the test only cares about how the bridge wires the factory in.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createMockOptionFactory(output?: EChartsOption): import('vitest').Mock<() => EChartsOption>;
|
|
45
|
+
/**
|
|
46
|
+
* Typed re-export of `getWidgetStore(id).getState()` — the verbose form
|
|
47
|
+
* shows up dozens of times across the suite. Tests that need the store
|
|
48
|
+
* api itself (`setState`, `subscribe`) still call `getWidgetStore(id)`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getState(id: string): WidgetState;
|
|
51
|
+
/** Typed re-export of `getWidgetStore(id)` for tests that need the api. */
|
|
52
|
+
export declare function getStore(id: string): WidgetStoreApi;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DownloadItem } from '../actions/download';
|
|
2
|
+
import { TimeseriesWidgetData } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Download menu items for the Timeseries widget. Always includes a CSV
|
|
5
|
+
* item with `time, series_1, series_2, …` columns (one row per unique time
|
|
6
|
+
* across all series; ISO-8601 strings for `Date`/numeric times). When
|
|
7
|
+
* `getCaptureEl` is supplied, prepends a PNG item that rasterises the
|
|
8
|
+
* captured element via `html2canvas`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createTimeseriesDownloadConfig(args: {
|
|
11
|
+
filename: string;
|
|
12
|
+
getData: () => TimeseriesWidgetData;
|
|
13
|
+
seriesNames?: readonly string[];
|
|
14
|
+
getCaptureEl?: () => HTMLElement | null;
|
|
15
|
+
pngPixelRatio?: number;
|
|
16
|
+
pngBackgroundColor?: string | null;
|
|
17
|
+
}): DownloadItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { timeseriesOptions, createTimeseriesOptionFactory } from './options';
|
|
2
|
+
export { TimeseriesSkeleton } from './skeleton';
|
|
3
|
+
export { createTimeseriesDownloadConfig } from './download';
|
|
4
|
+
export type { TimeseriesDatum, TimeseriesWidgetData, TimeseriesOptionsInput, TimeseriesOptionFactoryInput, TimeseriesEChartsOption, } from './types';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OptionFactory } from '../echart';
|
|
2
|
+
import { TimeseriesEChartsOption, TimeseriesOptionFactoryInput, TimeseriesOptionsInput } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the **structural** ECharts option for a timeseries widget —
|
|
5
|
+
* time x-axis, value y-axis, themed tooltip, themed legend, CARTO color
|
|
6
|
+
* palette. Mirrors {@link import('../bar/options').barOptions} so all
|
|
7
|
+
* four ECharts widgets share v1 look-and-feel.
|
|
8
|
+
*
|
|
9
|
+
* Intentional deviations from bar (timeseries-specific):
|
|
10
|
+
* - **X-axis is `type: 'time'`** (not 'category'). ECharts handles
|
|
11
|
+
* uneven sample spacing and zoom-level-aware label formatting.
|
|
12
|
+
* `labelFormatter` is wrapped so the consumer sees a `Date`, not
|
|
13
|
+
* a numeric timestamp.
|
|
14
|
+
* - **Tooltip body reads `{ name, value }` rows**, same as bar, but
|
|
15
|
+
* the `name` may arrive as `Date | number | string`. The
|
|
16
|
+
* `labelFormatter` receives a `Date` regardless.
|
|
17
|
+
*
|
|
18
|
+
* Intentionally data-agnostic: no series, no dataset, no `legend.show`
|
|
19
|
+
* (those depend on data and are added by the option factory's merge
|
|
20
|
+
* phase via {@link createTimeseriesOptionFactory}).
|
|
21
|
+
*/
|
|
22
|
+
export declare function timeseriesOptions({ theme, formatter, labelFormatter, }: TimeseriesOptionsInput): TimeseriesEChartsOption;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the timeseries widget's {@link OptionFactory} — one closure
|
|
25
|
+
* that owns BOTH phases of option construction:
|
|
26
|
+
*
|
|
27
|
+
* - **Structural phase** (`option == null`) — builds the theme-aware
|
|
28
|
+
* structural option via {@link timeseriesOptions}, optionally merging
|
|
29
|
+
* the consumer-supplied `optionsOverride`. Called once by Provider to
|
|
30
|
+
* seed `rawOptions` in the store.
|
|
31
|
+
* - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`
|
|
32
|
+
* (`TimeseriesWidgetData`) into the option via the dataset API: one
|
|
33
|
+
* dataset per series, each series referencing its dataset by index,
|
|
34
|
+
* encoded by `name` (x — time) and `value` (y). Mirrors {@link import('../bar/options').createBarOptionFactory}:
|
|
35
|
+
* series-template merge for `addStack`, reactive formatters from
|
|
36
|
+
* `ctx`, `niceNum`-rounded y-axis bounds at fusion time, and
|
|
37
|
+
* `positionDataZoomForLegend` layout for ZoomToggle sliders.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createTimeseriesOptionFactory(options: TimeseriesOptionFactoryInput): OptionFactory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading state for the Timeseries widget. Mirrors a line chart's
|
|
3
|
+
* silhouette — three thin horizontal segments at staggered offsets to
|
|
4
|
+
* suggest a moving line, plus a 2-dot legend stub. Sibling-consistent
|
|
5
|
+
* with Bar / Histogram / Scatter skeletons (column-flex container with
|
|
6
|
+
* legend strip below).
|
|
7
|
+
*/
|
|
8
|
+
export declare function TimeseriesSkeleton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { EChartsOption } from 'echarts';
|
|
3
|
+
/**
|
|
4
|
+
* A single point on a time series. `name` is the time coordinate — accepts a
|
|
5
|
+
* Date object, a number (ms-since-epoch), or an ISO-8601 string. ECharts'
|
|
6
|
+
* time axis parses any of these.
|
|
7
|
+
*/
|
|
8
|
+
export interface TimeseriesDatum {
|
|
9
|
+
name: Date | number | string;
|
|
10
|
+
value: number;
|
|
11
|
+
}
|
|
12
|
+
/** Timeseries widget data — one array of points per series. */
|
|
13
|
+
export type TimeseriesWidgetData = readonly (readonly TimeseriesDatum[])[];
|
|
14
|
+
/** Inputs to the structural-only {@link timeseriesOptions} builder. */
|
|
15
|
+
export interface TimeseriesOptionsInput {
|
|
16
|
+
theme: Theme;
|
|
17
|
+
formatter?: (value: number) => string;
|
|
18
|
+
/** Optional formatter for the time-axis tick labels. Receives a JS Date. */
|
|
19
|
+
labelFormatter?: (value: Date) => string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Combined inputs for the timeseries option factory creator. Carries
|
|
23
|
+
* everything the widget needs across BOTH phases — the structural-build
|
|
24
|
+
* (`theme`, `formatter`, `labelFormatter`, `optionsOverride`) AND the
|
|
25
|
+
* data merge (`seriesNames`, `smooth`, `area`, `selection`).
|
|
26
|
+
*/
|
|
27
|
+
export interface TimeseriesOptionFactoryInput {
|
|
28
|
+
theme: Theme;
|
|
29
|
+
formatter?: (value: number) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Time-axis label formatter (also used in the tooltip name). Receives
|
|
32
|
+
* a JS Date — applied both at structural-build time (x-axis ticks) and
|
|
33
|
+
* at fusion time (tooltip name) so the date-aware labeling survives
|
|
34
|
+
* RelativeData's reactive formatter swaps.
|
|
35
|
+
*/
|
|
36
|
+
labelFormatter?: (value: Date) => string;
|
|
37
|
+
/** Series names — drives the legend and `series[i].name`. */
|
|
38
|
+
seriesNames?: readonly string[];
|
|
39
|
+
/** Smooth lines (default `true`). */
|
|
40
|
+
smooth?: boolean;
|
|
41
|
+
/** Filled area below each line (default `false`). */
|
|
42
|
+
area?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Selected point keys (matched against `TimeseriesDatum.name`; `Date`
|
|
45
|
+
* names are normalized to ms-since-epoch). Points not in this list render
|
|
46
|
+
* dimmed (`itemStyle.opacity: 0.15`). `null`/empty means no selection.
|
|
47
|
+
*/
|
|
48
|
+
selection?: readonly (string | number)[] | null;
|
|
49
|
+
/**
|
|
50
|
+
* Consumer-supplied partial option merged into the structural option at
|
|
51
|
+
* structural-build time. Lets stories override pieces of the theme-aware
|
|
52
|
+
* base without forking the structural builder.
|
|
53
|
+
*/
|
|
54
|
+
optionsOverride?: Partial<EChartsOption>;
|
|
55
|
+
}
|
|
56
|
+
export type TimeseriesEChartsOption = EChartsOption;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
root: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
gap: number;
|
|
6
|
+
width: string;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
gridColumn: number;
|
|
9
|
+
height: string;
|
|
10
|
+
};
|
|
11
|
+
preview: {
|
|
12
|
+
display: "flex";
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
gap: number;
|
|
15
|
+
};
|
|
16
|
+
triggerActive: {
|
|
17
|
+
bgcolor: "primary.relatedLight";
|
|
18
|
+
};
|
|
19
|
+
paper: {
|
|
20
|
+
display: "flex";
|
|
21
|
+
alignItems: "center";
|
|
22
|
+
gap: number;
|
|
23
|
+
px: number;
|
|
24
|
+
py: number;
|
|
25
|
+
mx: number;
|
|
26
|
+
mt: string;
|
|
27
|
+
bgcolor: "background.paper";
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { SvgIconProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { ToolboxLabels } from './labels';
|
|
4
|
+
export interface ToolboxProps {
|
|
5
|
+
/**
|
|
6
|
+
* Maximum number of (non-`data-toolbar-hidden`) children rendered inline
|
|
7
|
+
* when collapsed. Excess children are revealed via the overflow trigger
|
|
8
|
+
* inside a floating Paper. When omitted, all children render inline.
|
|
9
|
+
*/
|
|
10
|
+
visibleCount?: number;
|
|
11
|
+
labels?: Partial<ToolboxLabels>;
|
|
12
|
+
/**
|
|
13
|
+
* Glyph used for the closed-state trigger. Defaults to the meridian-ds
|
|
14
|
+
* `WidgetOptions` icon (matches v1's `ToolbarActions`).
|
|
15
|
+
*/
|
|
16
|
+
icon?: ComponentType<SvgIconProps>;
|
|
17
|
+
iconProps?: SvgIconProps;
|
|
18
|
+
/**
|
|
19
|
+
* Side the overflow Paper opens toward. `'right'` (default) places the
|
|
20
|
+
* trigger on the left and the Paper covers the row to the right;
|
|
21
|
+
* `'left'` is the mirror.
|
|
22
|
+
*/
|
|
23
|
+
direction?: 'left' | 'right';
|
|
24
|
+
sx?: SxProps<Theme>;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Smart overflow toolbar with **single-mount** items. Children mount once
|
|
29
|
+
* into a stable, hidden host element and are *physically reparented* via
|
|
30
|
+
* `appendChild` between the inline preview area and the overflow `<Paper>`
|
|
31
|
+
* as the popper opens / closes — same pattern as `Widget.FullScreen.Slot`.
|
|
32
|
+
* Items with no inline space when closed are kept mounted but visually
|
|
33
|
+
* hidden via `display: none`.
|
|
34
|
+
*
|
|
35
|
+
* Why this matters: every toggle's `useTransform` registers a config /
|
|
36
|
+
* data transform on mount and removes it on unmount. If items remounted
|
|
37
|
+
* on each open / close, the brief setup → cleanup window would re-emit
|
|
38
|
+
* the pipeline (transform missing → transform present), causing a visible
|
|
39
|
+
* flicker on state-bearing transforms (Stack, Zoom, RelativeData). With
|
|
40
|
+
* stable mounts the transform stays registered across the whole popover
|
|
41
|
+
* lifecycle.
|
|
42
|
+
*
|
|
43
|
+
* Children flagged with `data-toolbar-hidden` (e.g. dividers) skip the
|
|
44
|
+
* visibility budget but still render in their natural position. Trailing
|
|
45
|
+
* hidden items past the budget are excluded from the inline preview so
|
|
46
|
+
* they don't appear as orphan separators in the inline row; they're still
|
|
47
|
+
* there in the popover.
|
|
48
|
+
*/
|
|
49
|
+
export declare function Toolbox({ visibleCount, labels, icon: Icon, iconProps, direction, sx, children, }: ToolboxProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* If the option includes a `dataZoom` array (from ZoomToggle's transform),
|
|
3
|
+
* lift any slider entries above the legend row so they don't overlap.
|
|
4
|
+
* Returns `null` when there is no `dataZoom` — caller skips the layout
|
|
5
|
+
* adjustment entirely.
|
|
6
|
+
*
|
|
7
|
+
* Shared between bar, histogram, and timeseries — every widget with a
|
|
8
|
+
* horizontal x-axis dataZoom slider needs the same offset when a legend
|
|
9
|
+
* is rendered below the plot.
|
|
10
|
+
*/
|
|
11
|
+
export declare function positionDataZoomForLegend(dataZoom: unknown, hasLegend: boolean): unknown[] | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shallow-merges two ECharts option objects:
|
|
3
|
+
* - Top-level keys from both are combined.
|
|
4
|
+
* - Arrays are merged by index (element-wise shallow merge, primitive override).
|
|
5
|
+
* - Plain objects are shallow-merged.
|
|
6
|
+
* - Primitives are overridden by the override value.
|
|
7
|
+
*
|
|
8
|
+
* Designed for the two-stage memoization pattern: first build a base option
|
|
9
|
+
* object from data + theme + formatters, then call `mergeOptions(base, override)`
|
|
10
|
+
* inside a second `useMemo` keyed on `[base, override]`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeOptions<T extends Record<string, unknown>>(base: T, override?: Partial<T>): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Wrapper, type WrapperProps } from './widget-wrapper';
|
|
2
|
+
export { Actions, Options, type ActionsProps, type OptionsProps, } from './widget-actions';
|
|
3
|
+
export { Content, Footer, type ContentProps, type FooterProps, } from './widget-content';
|
|
4
|
+
export { DEFAULT_WRAPPER_LABELS, type WrapperLabels } from './labels';
|