@carto/ps-react-ui 4.7.1 → 4.9.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/{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-l4fNHLEg.js +213 -0
- package/dist/range-l4fNHLEg.js.map +1 -0
- package/dist/resolve-theme-color-BdojIw0K.js +47 -0
- package/dist/resolve-theme-color-BdojIw0K.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-CQCAnDLb.js +388 -0
- package/dist/table-CQCAnDLb.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 +46 -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 +53 -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 +43 -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 +51 -0
- package/dist/types/widgets-v2/index.d.ts +108 -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 +57 -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 +27 -0
- package/dist/types/widgets-v2/range/range.d.ts +24 -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 +54 -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 +40 -0
- package/dist/types/widgets-v2/table/table-ui.d.ts +44 -0
- package/dist/types/widgets-v2/table/table.d.ts +50 -0
- package/dist/types/widgets-v2/table/types.d.ts +48 -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 +60 -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/types.d.ts +25 -0
- package/dist/types/widgets-v2/utils/data-zoom-layout.d.ts +11 -0
- package/dist/types/widgets-v2/utils/index.d.ts +3 -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/utils/resolve-theme-color.d.ts +18 -0
- package/dist/types/widgets-v2/utils/resolve-theme-color.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 +330 -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 +353 -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 +387 -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 +411 -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 +358 -0
- package/dist/widgets-v2/timeseries.js.map +1 -0
- package/dist/widgets-v2/utils.js +8 -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 +71 -3
- 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 +334 -0
- package/src/widgets-v2/bar/options.ts +332 -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 +51 -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 +59 -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 +48 -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 +318 -0
- package/src/widgets-v2/histogram/options.ts +338 -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 +55 -0
- package/src/widgets-v2/index.ts +204 -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 +601 -0
- package/src/widgets-v2/pie/options.ts +513 -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 +62 -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 +136 -0
- package/src/widgets-v2/range/range-ui.tsx +278 -0
- package/src/widgets-v2/range/range.test.tsx +68 -0
- package/src/widgets-v2/range/range.tsx +52 -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 +411 -0
- package/src/widgets-v2/scatterplot/options.ts +425 -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 +59 -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 +43 -0
- package/src/widgets-v2/table/table-ui.test.tsx +200 -0
- package/src/widgets-v2/table/table-ui.tsx +364 -0
- package/src/widgets-v2/table/table.test.tsx +119 -0
- package/src/widgets-v2/table/table.tsx +179 -0
- package/src/widgets-v2/table/types.ts +55 -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 +394 -0
- package/src/widgets-v2/timeseries/options.ts +348 -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 +65 -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/types.ts +25 -0
- package/src/widgets-v2/utils/data-zoom-layout.ts +26 -0
- package/src/widgets-v2/utils/index.ts +3 -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/utils/resolve-theme-color.test.ts +43 -0
- package/src/widgets-v2/utils/resolve-theme-color.ts +34 -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,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A single two-thumb range entry. Renders as an MUI `<Slider>` with editable
|
|
4
|
+
* `min` / `max` text inputs below, mirroring the Range v1 widget UX.
|
|
5
|
+
*/
|
|
6
|
+
export interface RangeDataItem {
|
|
7
|
+
/** Lower bound of the slider track. */
|
|
8
|
+
min: number;
|
|
9
|
+
/** Upper bound of the slider track. */
|
|
10
|
+
max: number;
|
|
11
|
+
/**
|
|
12
|
+
* Current selected range `[low, high]`. When omitted, defaults to
|
|
13
|
+
* `[min, max]` — i.e. the full track. The consumer owns this value and
|
|
14
|
+
* updates it in response to `onChange`.
|
|
15
|
+
*/
|
|
16
|
+
value?: readonly [number, number];
|
|
17
|
+
/** Step granularity (default `1`). */
|
|
18
|
+
step?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Tick marks. Pass `true` to enable MUI's auto-marks (one per `step`); pass
|
|
21
|
+
* an array for explicit marks; omit for no marks.
|
|
22
|
+
*/
|
|
23
|
+
marks?: boolean | readonly {
|
|
24
|
+
value: number;
|
|
25
|
+
label?: string;
|
|
26
|
+
}[];
|
|
27
|
+
/** Disable user interaction for this row (slider + inputs). */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** Override the slider's track / thumb colour (any CSS / MUI palette path). */
|
|
30
|
+
color?: string;
|
|
31
|
+
/** Optional caption rendered below the inputs row. */
|
|
32
|
+
note?: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/** Range widget data — one or more two-thumb entries rendered stacked. */
|
|
35
|
+
export type RangeWidgetData = readonly RangeDataItem[];
|
|
36
|
+
/** The shape `onChange` reports — always a `[low, high]` tuple. */
|
|
37
|
+
export type RangeItemValue = readonly [number, number];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DownloadItem } from '../actions/download';
|
|
2
|
+
import { ScatterplotWidgetData } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Download menu items for the Scatterplot widget. Always includes a CSV
|
|
5
|
+
* item with `series, x, y` columns (one row per point). When
|
|
6
|
+
* `getCaptureEl` is supplied, prepends a PNG item that rasterises the
|
|
7
|
+
* captured element via `html2canvas`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createScatterplotDownloadConfig(args: {
|
|
10
|
+
filename: string;
|
|
11
|
+
getData: () => ScatterplotWidgetData;
|
|
12
|
+
seriesNames?: readonly string[];
|
|
13
|
+
getCaptureEl?: () => HTMLElement | null;
|
|
14
|
+
pngPixelRatio?: number;
|
|
15
|
+
pngBackgroundColor?: string | null;
|
|
16
|
+
}): DownloadItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { scatterplotOptions, createScatterplotOptionFactory } from './options';
|
|
2
|
+
export { ScatterplotSkeleton, type ScatterplotSkeletonProps } from './skeleton';
|
|
3
|
+
export { createScatterplotDownloadConfig } from './download';
|
|
4
|
+
export { toRelativeScatterplotData } from './transforms';
|
|
5
|
+
export type { ScatterplotDatum, ScatterplotWidgetData, ScatterplotOptionsInput, ScatterplotOptionFactoryInput, ScatterplotEChartsOption, } from './types';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OptionFactory } from '../echart';
|
|
2
|
+
import { ScatterplotEChartsOption, ScatterplotOptionFactoryInput, ScatterplotOptionsInput } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the **structural** ECharts option for a scatterplot widget — both
|
|
5
|
+
* axes `type: 'value'` (not category, unlike Bar/Histogram), grid, tooltip
|
|
6
|
+
* triggered per-item rather than per-axis. Intentionally data-agnostic: no
|
|
7
|
+
* series, no dataset, no `legend.show` (those depend on data and are added
|
|
8
|
+
* by {@link createScatterplotOptionFactory}).
|
|
9
|
+
*
|
|
10
|
+
* Styling parity with v1: dark themed tooltip via `createTooltipFormatter`
|
|
11
|
+
* + `createTooltipPositioner`, `buildGridConfig`-based grid, polished
|
|
12
|
+
* axisLine/Tick/splitLine, `overlineDelicate` axis labels, structural
|
|
13
|
+
* legend wired via `buildLegendConfig` (toggled by the merger), and the
|
|
14
|
+
* CARTO `qualitative.bold + secondary` palette — same pattern bar /
|
|
15
|
+
* histogram / pie already use. {@link createScatterplotOptionFactory}
|
|
16
|
+
* wraps this builder in its structural-phase branch.
|
|
17
|
+
*/
|
|
18
|
+
export declare function scatterplotOptions({ theme, xFormatter, yFormatter, }: ScatterplotOptionsInput): ScatterplotEChartsOption;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the scatterplot widget's {@link OptionFactory} — one closure
|
|
21
|
+
* that owns BOTH phases of option construction:
|
|
22
|
+
*
|
|
23
|
+
* - **Structural phase** (`option == null`) — builds the theme-aware
|
|
24
|
+
* structural option via {@link scatterplotOptions}, optionally merging
|
|
25
|
+
* the consumer-supplied `optionsOverride`. Called once by Provider to
|
|
26
|
+
* seed `rawOptions` in the store.
|
|
27
|
+
* - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`
|
|
28
|
+
* (`ScatterplotWidgetData`) into the option via the dataset API. Each
|
|
29
|
+
* series's `[x, y]` tuples land in `dataset[i].source` as 2-column
|
|
30
|
+
* rows; the series uses positional encoding (`encode: { x: 0, y: 1 }`)
|
|
31
|
+
* and `type: 'scatter'`. niceMin/niceMax are computed over both axes
|
|
32
|
+
* so the chart frames data on rounded extents and numeric jitters
|
|
33
|
+
* don't shift gridlines per render. Reactive `ctx.formatter` (driven
|
|
34
|
+
* by RelativeData) re-derives the y-axis label and tooltip at fusion
|
|
35
|
+
* time; `xFormatter` stays baked at structural-build time (relative
|
|
36
|
+
* is a values-axis concept; x is coordinate-space).
|
|
37
|
+
*
|
|
38
|
+
* When `ZoomToggle` installs a `dataZoom` slider, grid bottom is
|
|
39
|
+
* extended and the slider is positioned above the legend row (if any) —
|
|
40
|
+
* same layout dance bar / histogram / timeseries do.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createScatterplotOptionFactory(options: ScatterplotOptionFactoryInput): OptionFactory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ScatterplotSkeletonProps {
|
|
2
|
+
/** Number of dots to render. */
|
|
3
|
+
count?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Loading state for the Scatterplot widget. Mirrors a scatter chart's
|
|
7
|
+
* silhouette — a deterministic spread of small circular dots in the plot
|
|
8
|
+
* area plus a legend stub — so the skeleton reads as "a scatter chart"
|
|
9
|
+
* rather than a generic list. Matches bar/histogram/pie skeleton structure
|
|
10
|
+
* (grid stub + legend stub in a flex column).
|
|
11
|
+
*/
|
|
12
|
+
export declare function ScatterplotSkeleton({ count }: ScatterplotSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scatterplot-specific `RelativeData` transform. Scatter data is
|
|
3
|
+
* `[number, number][]` — each series is a list of `[x, y]` tuples.
|
|
4
|
+
* Relative is a values-axis concept, so this rewrites `y` to its
|
|
5
|
+
* share of the series's total `y` (0–100) and leaves `x` raw — x is
|
|
6
|
+
* coordinate space, not part of the cohort total.
|
|
7
|
+
*
|
|
8
|
+
* Pass to `<Widget.RelativeData transform={toRelativeScatterplotData} />`.
|
|
9
|
+
*
|
|
10
|
+
* The denominator is the sum of |y| across the series so mixed-sign
|
|
11
|
+
* y values produce sane signed shares-of-magnitude. A series whose
|
|
12
|
+
* total y-magnitude is zero (all-zero or empty input) is returned
|
|
13
|
+
* unchanged so a stalled or empty data set doesn't show misleading 0%
|
|
14
|
+
* values. Inputs whose shape isn't `[number, number][]` fall through
|
|
15
|
+
* untouched.
|
|
16
|
+
*/
|
|
17
|
+
export declare const toRelativeScatterplotData: (input: unknown) => unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { EChartsOption } from 'echarts';
|
|
3
|
+
import { WidgetSeries } from '../types';
|
|
4
|
+
/** A single point — `[x, y]` tuple. */
|
|
5
|
+
export type ScatterplotDatum = readonly [number, number];
|
|
6
|
+
/** Scatterplot widget data — array of series, each a list of `[x, y]` tuples. */
|
|
7
|
+
export type ScatterplotWidgetData = readonly (readonly ScatterplotDatum[])[];
|
|
8
|
+
/** Inputs to the structural-only {@link scatterplotOptions} builder. */
|
|
9
|
+
export interface ScatterplotOptionsInput {
|
|
10
|
+
theme: Theme;
|
|
11
|
+
/** Optional formatter for x-axis values. */
|
|
12
|
+
xFormatter?: (value: number) => string;
|
|
13
|
+
/** Optional formatter for y-axis values. */
|
|
14
|
+
yFormatter?: (value: number) => string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Combined inputs for the scatterplot option factory creator. Carries
|
|
18
|
+
* everything the widget needs across BOTH phases — the structural-build
|
|
19
|
+
* (`theme`, `xFormatter`, `yFormatter`, `optionsOverride`) AND the data
|
|
20
|
+
* merge (`series`, `symbolSize`, `selection`).
|
|
21
|
+
*/
|
|
22
|
+
export interface ScatterplotOptionFactoryInput {
|
|
23
|
+
theme: Theme;
|
|
24
|
+
/**
|
|
25
|
+
* Optional x-axis value formatter. Drives the structural x-axis
|
|
26
|
+
* label and the reactive tooltip path: when RelativeData overrides
|
|
27
|
+
* `state.formatter` (the y formatter) the merger rebuilds the tooltip
|
|
28
|
+
* and reads `xFormatter` to render coordinates correctly. xFormatter
|
|
29
|
+
* itself isn't relativized — x stays raw.
|
|
30
|
+
*/
|
|
31
|
+
xFormatter?: (value: number) => string;
|
|
32
|
+
/** Optional formatter for y-axis values (structural baseline). */
|
|
33
|
+
yFormatter?: (value: number) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Per-series metadata — drives the legend, `series[i].name`, and
|
|
36
|
+
* (when `color` is set) a per-series colour override on the points.
|
|
37
|
+
*/
|
|
38
|
+
series?: readonly WidgetSeries[];
|
|
39
|
+
/** Symbol size in px (default `8`). */
|
|
40
|
+
symbolSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Selected point keys, one per `${seriesIndex}:${dataIndex}` pair. Points
|
|
43
|
+
* not in this list render dimmed (`itemStyle.opacity: 0.15`). `null`/empty
|
|
44
|
+
* means no selection.
|
|
45
|
+
*/
|
|
46
|
+
selection?: readonly string[] | null;
|
|
47
|
+
/**
|
|
48
|
+
* Consumer-supplied partial option merged into the structural option at
|
|
49
|
+
* structural-build time. Lets stories override pieces of the theme-aware
|
|
50
|
+
* base without forking the structural builder.
|
|
51
|
+
*/
|
|
52
|
+
optionsOverride?: Partial<EChartsOption>;
|
|
53
|
+
}
|
|
54
|
+
export type ScatterplotEChartsOption = EChartsOption;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
import { SelectionSummaryLabels } from './labels';
|
|
4
|
+
export interface SelectionSummaryProps {
|
|
5
|
+
/** Number of currently selected items. */
|
|
6
|
+
count: number;
|
|
7
|
+
/** Optional total — when 0 the component renders nothing (no data to summarize). */
|
|
8
|
+
total?: number;
|
|
9
|
+
/** Clear callback. Shown only when count > 0. */
|
|
10
|
+
onClear?: () => void;
|
|
11
|
+
labels?: Partial<SelectionSummaryLabels>;
|
|
12
|
+
icon?: ComponentType<SvgIconProps>;
|
|
13
|
+
iconProps?: SvgIconProps;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Render rules:
|
|
17
|
+
* - `total === 0` → render nothing.
|
|
18
|
+
* - `count === 0` → render `labels.allSelected` (matches v1 default),
|
|
19
|
+
* prefixed with the optional `icon` glyph when provided.
|
|
20
|
+
* - `count > 0` → render `labels.selections(count)` + Clear (when `onClear`).
|
|
21
|
+
*/
|
|
22
|
+
export declare function SelectionSummary({ count, total, onClear, labels, icon: Icon, iconProps, }: SelectionSummaryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
root: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
gap: number;
|
|
6
|
+
minHeight: number;
|
|
7
|
+
};
|
|
8
|
+
label: {
|
|
9
|
+
color: "text.secondary";
|
|
10
|
+
};
|
|
11
|
+
clear: {
|
|
12
|
+
color: "primary.main";
|
|
13
|
+
cursor: "pointer";
|
|
14
|
+
fontWeight: number;
|
|
15
|
+
'&:hover': {
|
|
16
|
+
textDecoration: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
icon: {
|
|
20
|
+
fontSize: number;
|
|
21
|
+
color: "text.secondary";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DownloadItem } from '../actions/download';
|
|
2
|
+
import { SpreadWidgetData } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Download menu items for the Spread widget. Always includes a CSV item
|
|
5
|
+
* with `series, prefix, min, max, suffix, note` columns (one row per
|
|
6
|
+
* entry). When `getCaptureEl` is supplied, prepends a PNG item that
|
|
7
|
+
* rasterises the captured element via `html2canvas`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createSpreadDownloadConfig(args: {
|
|
10
|
+
filename: string;
|
|
11
|
+
getData: () => SpreadWidgetData;
|
|
12
|
+
getCaptureEl?: () => HTMLElement | null;
|
|
13
|
+
pngPixelRatio?: number;
|
|
14
|
+
pngBackgroundColor?: string | null;
|
|
15
|
+
}): DownloadItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Spread } from './spread';
|
|
2
|
+
export { SpreadUI, type SpreadUIProps } from './spread-ui';
|
|
3
|
+
export { Separator } from './separator';
|
|
4
|
+
export { SpreadSkeleton, type SpreadSkeletonProps } from './skeleton';
|
|
5
|
+
export { createSpreadDownloadConfig } from './download';
|
|
6
|
+
export type { SpreadDataItem, SpreadWidgetData } from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Em-dash separator placed between a Spread row's `min` and `max` values.
|
|
3
|
+
* Built from the Formula {@link Value} primitive so typography (h5/600,
|
|
4
|
+
* baseline alignment) matches the numbers around it. Renders with
|
|
5
|
+
* `text.secondary` so it visually recedes between the two bounds.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Separator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SpreadSkeletonProps {
|
|
2
|
+
count?: number;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Loading placeholder for the Spread widget. Renders `count` rows, each
|
|
6
|
+
* sized for the `min — max` pair so the layout doesn't jump once data
|
|
7
|
+
* resolves. Mirrors the row-per-item structure of {@link SpreadUI}.
|
|
8
|
+
*/
|
|
9
|
+
export declare function SpreadSkeleton({ count }: SpreadSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { SpreadDataItem } from './types';
|
|
3
|
+
export interface SpreadUIProps {
|
|
4
|
+
items: readonly SpreadDataItem[];
|
|
5
|
+
/** Number formatter — applied to each item's `min` and `max`. */
|
|
6
|
+
formatter?: (value: number) => string;
|
|
7
|
+
/** Forwarded to the root `<Box>` so consumers can capture the DOM (PNG export). */
|
|
8
|
+
ref?: Ref<HTMLDivElement>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Pure presentational component for the Spread widget. Each item renders as
|
|
12
|
+
* a row containing (in order): optional `Series` avatar, a body with
|
|
13
|
+
* `[prefix] min — max [suffix]` plus optional `Note`. Reuses the Formula
|
|
14
|
+
* primitives ({@link Series}, {@link Prefix}, {@link Value}, {@link Suffix},
|
|
15
|
+
* {@link Note}) and the Formula row styles so Spread and Formula stay
|
|
16
|
+
* visually aligned when used together.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SpreadUI({ items, formatter, ref }: SpreadUIProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FormulaSeries } from '../formula';
|
|
2
|
+
/**
|
|
3
|
+
* A single min/max pair rendered by the Spread widget. Mirrors
|
|
4
|
+
* {@link FormulaDataItem} — same optional `series`, `prefix`, `suffix`,
|
|
5
|
+
* `color`, and `note` slots — but the value is a range (`min` … `max`)
|
|
6
|
+
* rather than a single `value`.
|
|
7
|
+
*/
|
|
8
|
+
export interface SpreadDataItem {
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
/** Override the values' text colour (e.g. `'success.main'`). */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Optional series indicator — coloured avatar with first letter of `name`. */
|
|
16
|
+
series?: FormulaSeries;
|
|
17
|
+
/** Optional caption rendered below the values. */
|
|
18
|
+
note?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Spread widget data — an array of `{min, max, …}` pairs rendered
|
|
22
|
+
* top-to-bottom, one row per entry. Visual structure matches the Formula
|
|
23
|
+
* widget so the two can sit side-by-side without style drift.
|
|
24
|
+
*/
|
|
25
|
+
export type SpreadWidgetData = readonly SpreadDataItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
emptyRoot: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "column";
|
|
5
|
+
gap: number;
|
|
6
|
+
paddingTop: number;
|
|
7
|
+
paddingBottom: number;
|
|
8
|
+
paddingX: number;
|
|
9
|
+
width: string;
|
|
10
|
+
minHeight: string;
|
|
11
|
+
};
|
|
12
|
+
captureBox: {
|
|
13
|
+
width: string;
|
|
14
|
+
minHeight: number;
|
|
15
|
+
display: "flex";
|
|
16
|
+
flexDirection: "column";
|
|
17
|
+
flex: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StateLabels } from './labels';
|
|
3
|
+
export interface StateProps {
|
|
4
|
+
skeleton: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Override the empty-state predicate. Receives `rawData` (pre-pipeline). */
|
|
7
|
+
isEmpty?: (rawData: unknown) => boolean;
|
|
8
|
+
/** Render an alternative error UI. When omitted, the default ErrorView is used. */
|
|
9
|
+
fallback?: (error: Error) => ReactNode;
|
|
10
|
+
labels?: Partial<StateLabels>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Priority chain: loading → error → empty → content. Both consumer-supplied
|
|
14
|
+
* errors (set via Provider's `error` prop) and transform-throw errors (set by
|
|
15
|
+
* the pipeline middleware) flow through the same `error` field. Render-time
|
|
16
|
+
* errors thrown by `children` are caught by the inlined error boundary and
|
|
17
|
+
* routed through the same path.
|
|
18
|
+
*/
|
|
19
|
+
export declare function State({ skeleton, children, isEmpty, fallback, labels, }: StateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { TransformType, TransformDescriptor, TransformFn, Transform, TransformPair, WidgetState, WidgetInit, WidgetStoreApi, } from './types';
|
|
2
|
+
export { applyTransforms, upsertTransform, removeTransform } from './transforms';
|
|
3
|
+
export { pipelineMiddleware } from './pipeline-middleware';
|
|
4
|
+
export { WidgetContext, useWidgetId } from './widget-context';
|
|
5
|
+
export { getWidgetStore, hasWidgetStore, deleteWidgetStore, resetWidgetStore, clearAllWidgetStores, registerWidgetStore, unregisterWidgetStore, setWidgetStoreEntry, createWidgetStore, useWidget, useWidgetShallow, setCaptureEl, getCaptureEl, clearAllCaptureEls, setEchartInstance, getEchartInstance, subscribeEchartInstance, clearAllEchartInstances, __debugListWidgetStores, } from './widget-store-registry';
|
|
6
|
+
export { useEchartInstance } from './use-echart-instance';
|
|
7
|
+
export { useTransform, useSingleTransform, type UseTransformOptions, type TransformControls, } from './use-transform';
|
|
8
|
+
export { useTransformEnabled } from './use-transform-enabled';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StateCreator, StoreMutatorIdentifier } from 'zustand';
|
|
2
|
+
import { WidgetState } from './types';
|
|
3
|
+
type PipelineMiddleware = <T extends WidgetState, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(config: StateCreator<T, Mps, Mcs>) => StateCreator<T, Mps, Mcs>;
|
|
4
|
+
export declare const pipelineMiddleware: PipelineMiddleware;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Transform } from './types';
|
|
2
|
+
export declare function applyTransforms(input: unknown, transforms: readonly Transform[], onError?: (id: string, error: Error) => void): unknown;
|
|
3
|
+
export declare function upsertTransform(transforms: readonly Transform[], next: Transform): readonly Transform[];
|
|
4
|
+
export declare function removeTransform(transforms: readonly Transform[], id: string): readonly Transform[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StoreApi } from 'zustand';
|
|
2
|
+
export type TransformType = 'data' | 'config';
|
|
3
|
+
export interface TransformDescriptor {
|
|
4
|
+
id: string;
|
|
5
|
+
type: TransformType;
|
|
6
|
+
order: number;
|
|
7
|
+
disables?: string[];
|
|
8
|
+
replaceMergeKeys?: string[];
|
|
9
|
+
}
|
|
10
|
+
export type TransformFn = (input: unknown) => unknown;
|
|
11
|
+
export interface Transform extends TransformDescriptor {
|
|
12
|
+
fn: TransformFn;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TransformPair {
|
|
16
|
+
descriptor: TransformDescriptor;
|
|
17
|
+
fn: TransformFn;
|
|
18
|
+
}
|
|
19
|
+
export interface WidgetState {
|
|
20
|
+
rawData: unknown;
|
|
21
|
+
data: unknown;
|
|
22
|
+
dataTransforms: readonly Transform[];
|
|
23
|
+
configTransforms: readonly Transform[];
|
|
24
|
+
transformStates: Record<string, {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
isFetching: boolean;
|
|
30
|
+
error: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* Original formatter as supplied by the consumer (Provider's `formatter`
|
|
33
|
+
* prop). Always live-synced — never overridden by actions. Actions that need
|
|
34
|
+
* to display a different formatter (e.g. {@link RelativeData}'s percent
|
|
35
|
+
* formatter) should write to {@link WidgetState.formatter} and read this
|
|
36
|
+
* field when restoring the absolute view.
|
|
37
|
+
*/
|
|
38
|
+
rawFormatter?: (value: number) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Active formatter — what consumer code (tooltips, axis labels, legends,
|
|
41
|
+
* etc.) reads. Defaults to {@link WidgetState.rawFormatter}; actions may
|
|
42
|
+
* override it temporarily and restore it from `rawFormatter` later.
|
|
43
|
+
*/
|
|
44
|
+
formatter?: (value: number) => string;
|
|
45
|
+
labelFormatter?: (value: string | number) => string | number;
|
|
46
|
+
}
|
|
47
|
+
export interface WidgetInit {
|
|
48
|
+
data: unknown;
|
|
49
|
+
isLoading?: boolean;
|
|
50
|
+
isFetching?: boolean;
|
|
51
|
+
error?: unknown;
|
|
52
|
+
formatter?: (value: number) => string;
|
|
53
|
+
labelFormatter?: (value: string | number) => string | number;
|
|
54
|
+
}
|
|
55
|
+
export type WidgetStoreApi = StoreApi<WidgetState>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ECharts } from 'echarts';
|
|
2
|
+
/**
|
|
3
|
+
* Reactive read of the live ECharts instance for a widget. Returns
|
|
4
|
+
* `null` before the `Widget.Echart` bridge has mounted (or after it's
|
|
5
|
+
* disposed); the consumer re-renders when the instance arrives /
|
|
6
|
+
* departs / changes.
|
|
7
|
+
*
|
|
8
|
+
* Wraps {@link subscribeEchartInstance} via `useSyncExternalStore`, so
|
|
9
|
+
* actions can use it inside an effect's deps array to react to chart
|
|
10
|
+
* lifecycle events without polling. Required for actions like
|
|
11
|
+
* `BrushToggle` whose effect needs to dispatch `takeGlobalCursor` the
|
|
12
|
+
* moment the chart exists, then re-dispatch on every `'finished'`
|
|
13
|
+
* event.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useEchartInstance(id: string): ECharts | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactive read of a single transform's `enabled` flag from the
|
|
3
|
+
* per-widget store. Returns `false` if the transform hasn't been
|
|
4
|
+
* registered yet (i.e., the action component hasn't mounted) — safe
|
|
5
|
+
* default for "the feature is off".
|
|
6
|
+
*
|
|
7
|
+
* Used by widget composers that want to react to an action's on/off
|
|
8
|
+
* cycle without having the widget primitive import the action. For
|
|
9
|
+
* example, the `CategoryWidget` storybook composer wires the
|
|
10
|
+
* SearcherToggle's open state into `<Widget.Category searcherOpen=…>`
|
|
11
|
+
* so the library primitive stays renderer-agnostic.
|
|
12
|
+
*
|
|
13
|
+
* Magic-string `transformId` is intentional — it lives at the composer
|
|
14
|
+
* layer where the action is already imported by JSX, so the string
|
|
15
|
+
* appears alongside the same name in the toolbox.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useTransformEnabled(id: string, transformId: string): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { TransformDescriptor, TransformFn, TransformPair } from './types';
|
|
3
|
+
export interface UseTransformOptions {
|
|
4
|
+
initialEnabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TransformControls {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
setEnabled: Dispatch<SetStateAction<boolean>>;
|
|
9
|
+
toggle: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useTransform(id: string, pairs: readonly TransformPair[], options?: UseTransformOptions): TransformControls;
|
|
12
|
+
export declare function useSingleTransform(id: string, descriptor: TransformDescriptor, fn: TransformFn, options?: UseTransformOptions): TransformControls;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ECharts } from 'echarts';
|
|
2
|
+
import { WidgetInit, WidgetState, WidgetStoreApi } from './types';
|
|
3
|
+
type EchartInstanceListener = (chart: ECharts | null) => void;
|
|
4
|
+
export declare function getWidgetStore(id: string): WidgetStoreApi;
|
|
5
|
+
export declare function hasWidgetStore(id: string): boolean;
|
|
6
|
+
export declare function deleteWidgetStore(id: string): void;
|
|
7
|
+
export declare function resetWidgetStore(id: string): void;
|
|
8
|
+
export declare function clearAllWidgetStores(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Register or clear the capture element for a widget. Pass `null` to clear.
|
|
11
|
+
* Called by `Widget.State` via a callback ref on its success-path content
|
|
12
|
+
* wrapper. The element is read by per-widget download configs at click time
|
|
13
|
+
* to feed `html2canvas` for PNG export.
|
|
14
|
+
*/
|
|
15
|
+
export declare function setCaptureEl(id: string, el: HTMLElement | null): void;
|
|
16
|
+
/**
|
|
17
|
+
* Read the currently registered capture element for a widget. Returns `null`
|
|
18
|
+
* when no `Widget.State` is on its success path (loading / error / empty)
|
|
19
|
+
* or when the widget hasn't mounted.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCaptureEl(id: string): HTMLElement | null;
|
|
22
|
+
/** @internal — exposed for tests and debugging only. */
|
|
23
|
+
export declare function clearAllCaptureEls(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Register or clear the live ECharts instance for a widget. Pass `null`
|
|
26
|
+
* to clear. Called by the `Widget.Echart` bridge on mount / dispose.
|
|
27
|
+
* Read by actions (e.g. `ZoomToggle`'s disable handler) that need to
|
|
28
|
+
* dispatch on the live chart without going through the pipeline.
|
|
29
|
+
*
|
|
30
|
+
* Notifies subscribers registered via {@link subscribeEchartInstance}
|
|
31
|
+
* after the map mutation, so reactive consumers (the
|
|
32
|
+
* `useEchartInstance` hook) re-render with the new value.
|
|
33
|
+
*/
|
|
34
|
+
export declare function setEchartInstance(id: string, chart: ECharts | null): void;
|
|
35
|
+
/**
|
|
36
|
+
* Read the currently registered ECharts instance for a widget. Returns
|
|
37
|
+
* `null` when no `Widget.Echart` is mounted, or before the bridge has
|
|
38
|
+
* created the instance.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getEchartInstance(id: string): ECharts | null;
|
|
41
|
+
/**
|
|
42
|
+
* Subscribe to changes of the registered ECharts instance for a widget.
|
|
43
|
+
* The listener is called *after* every {@link setEchartInstance} (with
|
|
44
|
+
* the new chart, or `null` when cleared). Returns an unsubscribe
|
|
45
|
+
* function. Used by the `useEchartInstance` hook to drive React effects
|
|
46
|
+
* that need to react to instance arrival / departure (e.g.
|
|
47
|
+
* `BrushToggle`'s `'finished'` re-dispatch loop).
|
|
48
|
+
*/
|
|
49
|
+
export declare function subscribeEchartInstance(id: string, listener: EchartInstanceListener): () => void;
|
|
50
|
+
/** @internal — exposed for tests and debugging only. */
|
|
51
|
+
export declare function clearAllEchartInstances(): void;
|
|
52
|
+
/** @internal — exposed for tests and debugging only. */
|
|
53
|
+
export declare function __debugListWidgetStores(): string[];
|
|
54
|
+
/**
|
|
55
|
+
* Insert or replace a store entry in the registry without refcounting or
|
|
56
|
+
* duplicate-id detection. Used by Provider's lazy `useState` init so the
|
|
57
|
+
* store is reachable from `useWidget(id)` calls in children that render
|
|
58
|
+
* before the Provider's mount effect runs. Refcounting and dev warns happen
|
|
59
|
+
* in {@link registerWidgetStore} during the mount effect.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare function setWidgetStoreEntry(id: string, store: WidgetStoreApi): void;
|
|
64
|
+
/** @internal — used by Provider; not part of the public API. */
|
|
65
|
+
export declare function createWidgetStore(id: string, init: WidgetInit): WidgetStoreApi;
|
|
66
|
+
/** @internal — registers a Provider mount and tracks/warns on duplicate ids in dev. */
|
|
67
|
+
export declare function registerWidgetStore(id: string, store: WidgetStoreApi): void;
|
|
68
|
+
/** @internal — Provider unmount counterpart; on last unmount removes the refcount entry. */
|
|
69
|
+
export declare function unregisterWidgetStore(id: string, options: {
|
|
70
|
+
keepAlive: boolean;
|
|
71
|
+
}): void;
|
|
72
|
+
export declare function useWidget<T, S extends WidgetState = WidgetState>(id: string, selector: (state: S) => T): T;
|
|
73
|
+
export declare function useWidgetShallow<T, S extends WidgetState = WidgetState>(id: string, selector: (state: S) => T): T;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|