@carto/ps-react-ui 4.4.0-chat-ui.5 → 4.4.0-chat-ui.7
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/chat.js +622 -673
- package/dist/chat.js.map +1 -1
- package/dist/components.js.map +1 -1
- package/dist/data-zoom-layout-DVYB8mIx.js +29 -0
- package/dist/data-zoom-layout-DVYB8mIx.js.map +1 -0
- package/dist/download-config-C7hf33ip.js +58 -0
- package/dist/download-config-C7hf33ip.js.map +1 -0
- package/dist/echart-CU0KmClP.js +176 -0
- package/dist/echart-CU0KmClP.js.map +1 -0
- package/dist/exports-Cr43OCul.js.map +1 -1
- package/dist/exports-Cx-f6m6U.js +63 -0
- package/dist/exports-Cx-f6m6U.js.map +1 -0
- package/dist/formatter-B9Bxn1k7.js +6 -0
- package/dist/formatter-B9Bxn1k7.js.map +1 -0
- package/dist/formula-DuC0NQLH.js +79 -0
- package/dist/formula-DuC0NQLH.js.map +1 -0
- package/dist/lasso-tool-BYbxrJ-7.js.map +1 -1
- package/dist/markdown-BD1jcknS.js +8326 -0
- package/dist/markdown-BD1jcknS.js.map +1 -0
- package/dist/option-builders-F-c9ELi1.js +122 -0
- package/dist/option-builders-F-c9ELi1.js.map +1 -0
- package/dist/options-CthfUJDz.js +46 -0
- package/dist/options-CthfUJDz.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/row-DZSP99LW.js +34 -0
- package/dist/row-DZSP99LW.js.map +1 -0
- package/dist/series-DLNHDWs0.js +90 -0
- package/dist/series-DLNHDWs0.js.map +1 -0
- package/dist/shared-resize-observer-98b1SK1e.js +17 -0
- package/dist/shared-resize-observer-98b1SK1e.js.map +1 -0
- package/dist/smart-tooltip-D4vwQpFf.js.map +1 -1
- package/dist/spread-CngWB5KF.js +68 -0
- package/dist/spread-CngWB5KF.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/tooltip-BDnrRKrp.js.map +1 -1
- package/dist/transforms-Cdx4fkU5.js +106 -0
- package/dist/transforms-Cdx4fkU5.js.map +1 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -2
- package/dist/types/chat/containers/styles.d.ts +10 -27
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +1 -3
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/chat/types.d.ts +35 -3
- package/dist/types/components/basemaps/basemaps.d.ts +20 -0
- package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +11 -0
- package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +17 -0
- package/dist/types/components/lasso-tool/lasso-tool.d.ts +21 -0
- package/dist/types/components/list-data/list-data.d.ts +16 -0
- package/dist/types/components/measurement-tools/measurement-tools.d.ts +20 -0
- package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +17 -0
- package/dist/types/components/tooltip/tooltip.d.ts +13 -0
- package/dist/types/components/zoom-controls/zoom-controls.d.ts +16 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/use-widget-ref.d.ts +9 -6
- package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +24 -0
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +29 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +19 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.test.d.ts +1 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +21 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +73 -0
- package/dist/types/widgets/actions/download/download.d.ts +11 -0
- package/dist/types/widgets/actions/download/exports.d.ts +15 -0
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +13 -0
- package/dist/types/widgets/actions/index.d.ts +7 -5
- package/dist/types/widgets/actions/lock-selection/types.d.ts +2 -0
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +8 -2
- package/dist/types/widgets/actions/relative-data/types.d.ts +2 -0
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +4 -0
- package/dist/types/widgets/bar/config.d.ts +8 -4
- package/dist/types/widgets/category/category-ui.d.ts +3 -0
- package/dist/types/widgets/category/components/category-bar.d.ts +3 -0
- package/dist/types/widgets/category/components/category-legend.d.ts +3 -0
- package/dist/types/widgets/category/components/category-row-multi.d.ts +5 -1
- package/dist/types/widgets/category/components/category-row-other.d.ts +3 -0
- package/dist/types/widgets/category/components/category-row-single.d.ts +5 -1
- package/dist/types/widgets/category/config.d.ts +11 -0
- package/dist/types/widgets/category/index.d.ts +10 -2
- package/dist/types/widgets/category/style.d.ts +1 -0
- package/dist/types/widgets/category/types.d.ts +1 -0
- package/dist/types/widgets/echart/echart-ui.d.ts +7 -0
- package/dist/types/widgets/echart/echart.d.ts +6 -0
- package/dist/types/widgets/echart/options.d.ts +7 -0
- package/dist/types/widgets/echart/shared-resize-observer.d.ts +12 -0
- package/dist/types/widgets/echart/types.d.ts +5 -1
- package/dist/types/widgets/echart/utils.d.ts +54 -7
- package/dist/types/widgets/echart/utils.test.d.ts +1 -0
- package/dist/types/widgets/error/error.d.ts +10 -0
- package/dist/types/widgets/formula/components/item.d.ts +3 -0
- package/dist/types/widgets/formula/components/prefix.d.ts +3 -0
- package/dist/types/widgets/formula/components/row.d.ts +3 -0
- package/dist/types/widgets/formula/components/series.d.ts +3 -0
- package/dist/types/widgets/formula/components/suffix.d.ts +3 -0
- package/dist/types/widgets/formula/components/value.d.ts +3 -0
- package/dist/types/widgets/formula/config.d.ts +11 -0
- package/dist/types/widgets/formula/config.test.d.ts +1 -0
- package/dist/types/widgets/formula/formula-ui.d.ts +3 -0
- package/dist/types/widgets/histogram/config.d.ts +18 -2
- package/dist/types/widgets/histogram/index.d.ts +2 -1
- package/dist/types/widgets/histogram/types.d.ts +6 -3
- package/dist/types/widgets/loader/loader.d.ts +22 -0
- package/dist/types/widgets/loader/utils.d.ts +26 -3
- package/dist/types/widgets/markdown/config.d.ts +10 -0
- package/dist/types/widgets/markdown/markdown-ui.d.ts +7 -0
- package/dist/types/widgets/markdown/markdown.d.ts +3 -0
- package/dist/types/widgets/no-data/no-data.d.ts +3 -2
- package/dist/types/widgets/no-data/types.d.ts +5 -1
- package/dist/types/widgets/note/note.d.ts +10 -0
- package/dist/types/widgets/pie/config.d.ts +8 -4
- package/dist/types/widgets/range/components/range-item.d.ts +3 -0
- package/dist/types/widgets/range/config.d.ts +5 -0
- package/dist/types/widgets/range/range-ui.d.ts +3 -0
- package/dist/types/widgets/scatterplot/config.d.ts +7 -3
- package/dist/types/widgets/selection-summary/selection-summary.d.ts +11 -0
- package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +10 -0
- package/dist/types/widgets/spread/components/max-value.d.ts +3 -0
- package/dist/types/widgets/spread/components/min-value.d.ts +3 -0
- package/dist/types/widgets/spread/components/separator.d.ts +3 -0
- package/dist/types/widgets/spread/config.d.ts +11 -0
- package/dist/types/widgets/spread/spread-ui.d.ts +3 -0
- package/dist/types/widgets/stores/index.d.ts +3 -2
- package/dist/types/widgets/stores/types.d.ts +12 -10
- package/dist/types/widgets/stores/use-widget-selector.d.ts +35 -0
- package/dist/types/widgets/stores/widget-store-branches.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store-performance.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store.d.ts +48 -27
- package/dist/types/widgets/subheader/subheader.d.ts +11 -0
- package/dist/types/widgets/table/config.d.ts +8 -3
- package/dist/types/widgets/table/config.test.d.ts +1 -0
- package/dist/types/widgets/table/hooks/use-pagination.d.ts +11 -3
- package/dist/types/widgets/table/hooks/use-selection.d.ts +11 -2
- package/dist/types/widgets/table/hooks/use-sort.d.ts +11 -3
- package/dist/types/widgets/table/index.d.ts +6 -2
- package/dist/types/widgets/table/types.d.ts +1 -1
- package/dist/types/widgets/timeseries/config.d.ts +8 -4
- package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
- package/dist/types/widgets/{_shared → utils}/chart-config/index.d.ts +3 -1
- package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.d.ts +41 -9
- package/dist/types/widgets/utils/chart-config/option-builders.test.d.ts +1 -0
- package/dist/types/widgets/utils/formatter.d.ts +2 -0
- package/dist/types/widgets/utils/index.d.ts +7 -0
- package/dist/types/widgets/wrapper/components/actions.d.ts +3 -0
- package/dist/types/widgets/wrapper/components/options.d.ts +3 -0
- package/dist/types/widgets/wrapper/components/title.d.ts +3 -0
- package/dist/types/widgets/wrapper/wrapper-ui.d.ts +14 -0
- package/dist/types/widgets/wrapper/wrapper.d.ts +14 -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/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/use-widget-ref-Ddr_SlJJ.js +22 -0
- package/dist/use-widget-ref-Ddr_SlJJ.js.map +1 -0
- package/dist/use-widget-selector-DFl2hW0R.js +12 -0
- package/dist/use-widget-selector-DFl2hW0R.js.map +1 -0
- package/dist/{utils-idmvq0Oa.js → utils-BOhInag6.js} +95 -70
- package/dist/utils-BOhInag6.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-Bw5zRUGg.js +261 -0
- package/dist/widget-store-Bw5zRUGg.js.map +1 -0
- package/dist/widget-store-registry-_W4Z4xp-.js +178 -0
- package/dist/widget-store-registry-_W4Z4xp-.js.map +1 -0
- package/dist/widgets/actions.js +1120 -760
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +87 -97
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +247 -236
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +100 -99
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/error.js +37 -2
- package/dist/widgets/error.js.map +1 -1
- package/dist/widgets/formula.js +78 -67
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +116 -92
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +53 -60
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/markdown.js +55 -53
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/no-data.js +58 -2
- package/dist/widgets/no-data.js.map +1 -1
- package/dist/widgets/note.js +121 -2
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +148 -112
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +147 -144
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +52 -65
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/selection-summary.js.map +1 -1
- package/dist/widgets/skeleton-loader.js +18 -17
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +108 -90
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +5 -2
- package/dist/widgets/stores.js.map +1 -1
- package/dist/widgets/subheader.js +29 -29
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +429 -440
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +56 -69
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/toolbar-actions.js +50 -50
- package/dist/widgets/utils.js +34 -0
- package/dist/widgets/utils.js.map +1 -0
- package/dist/widgets/wrapper.js +156 -158
- package/dist/widgets/wrapper.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 +331 -0
- package/dist/widgets-v2/bar.js.map +1 -0
- package/dist/widgets-v2/category.js +105 -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 +75 -0
- package/dist/widgets-v2/formula.js.map +1 -0
- package/dist/widgets-v2/histogram.js +354 -0
- package/dist/widgets-v2/histogram.js.map +1 -0
- package/dist/widgets-v2/markdown.js +69 -0
- package/dist/widgets-v2/markdown.js.map +1 -0
- package/dist/widgets-v2/pie.js +388 -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 +412 -0
- package/dist/widgets-v2/scatterplot.js.map +1 -0
- package/dist/widgets-v2/spread.js +73 -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 +79 -0
- package/dist/widgets-v2/table.js.map +1 -0
- package/dist/widgets-v2/timeseries.js +359 -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 +954 -0
- package/dist/widgets-v2.js.map +1 -0
- package/package.json +84 -13
- package/src/chat/containers/chat-content.test.tsx +260 -6
- package/src/chat/containers/chat-content.tsx +137 -27
- package/src/chat/containers/chat-starter.tsx +2 -2
- package/src/chat/containers/styles.ts +16 -36
- package/src/chat/feedback/chat-tool-code-area.tsx +1 -1
- package/src/chat/feedback/chat-tool-group.tsx +1 -1
- package/src/chat/feedback/chat-tool-trace.tsx +6 -1
- package/src/chat/index.ts +1 -1
- package/src/chat/types.ts +36 -4
- package/src/components/basemaps/basemaps.tsx +20 -0
- package/src/components/geolocation-controls/geolocation-controls.tsx +11 -0
- 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-inline.tsx +17 -0
- package/src/components/lasso-tool/lasso-tool.test.tsx +198 -0
- package/src/components/lasso-tool/lasso-tool.tsx +21 -0
- package/src/components/list-data/list-data.test.tsx +73 -0
- package/src/components/list-data/list-data.tsx +16 -0
- package/src/components/measurement-tools/measurement-tools.tsx +20 -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/components/smart-tooltip/smart-tooltip.tsx +17 -0
- package/src/components/tooltip/tooltip.tsx +13 -0
- package/src/components/zoom-controls/zoom-controls.tsx +16 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-widget-ref.ts +10 -10
- package/src/widgets/README.md +13 -13
- package/src/widgets/actions/brush-toggle/brush-overlay.test.tsx +465 -0
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +408 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.test.tsx +208 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +133 -0
- package/src/widgets/actions/brush-toggle/hit-test.test.ts +65 -0
- package/src/widgets/actions/brush-toggle/hit-test.ts +45 -0
- package/src/widgets/actions/brush-toggle/style.ts +46 -0
- package/src/widgets/actions/brush-toggle/types.ts +78 -0
- package/src/widgets/actions/change-column/change-column-dnd.test.tsx +193 -0
- package/src/widgets/actions/change-column/change-column.test.tsx +1 -1
- package/src/widgets/actions/change-column/change-column.tsx +15 -15
- package/src/widgets/actions/change-column/sortable-column-item.test.tsx +124 -0
- package/src/widgets/actions/change-column/sortable-column-item.tsx +3 -1
- package/src/widgets/actions/download/download.test.tsx +1 -1
- package/src/widgets/actions/download/download.tsx +15 -3
- package/src/widgets/actions/download/exports.tsx +15 -0
- package/src/widgets/actions/fullscreen/fullscreen.tsx +20 -11
- package/src/widgets/actions/index.ts +21 -2
- package/src/widgets/actions/lock-selection/lock-selection.test.tsx +14 -0
- package/src/widgets/actions/lock-selection/lock-selection.tsx +26 -31
- package/src/widgets/actions/lock-selection/types.ts +2 -0
- package/src/widgets/actions/relative-data/relative-data.test.tsx +276 -1
- package/src/widgets/actions/relative-data/relative-data.tsx +113 -54
- package/src/widgets/actions/relative-data/types.ts +2 -0
- package/src/widgets/actions/searcher/searcher-toggle.tsx +11 -12
- package/src/widgets/actions/searcher/searcher.tsx +39 -42
- package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +4 -4
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +24 -32
- package/src/widgets/actions/zoom-toggle/zoom-toggle.test.tsx +322 -0
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +62 -80
- package/src/widgets/bar/config.ts +39 -34
- package/src/widgets/bar/style.ts +1 -1
- package/src/widgets/category/category-ui.tsx +41 -34
- package/src/widgets/category/components/category-bar.tsx +3 -0
- package/src/widgets/category/components/category-legend.tsx +3 -0
- package/src/widgets/category/components/category-row-multi.tsx +9 -2
- package/src/widgets/category/components/category-row-other.tsx +3 -0
- package/src/widgets/category/components/category-row-single.tsx +8 -1
- package/src/widgets/category/components/category-rows.test.tsx +213 -0
- package/src/widgets/category/config.ts +11 -0
- package/src/widgets/category/index.ts +13 -14
- package/src/widgets/category/style.ts +1 -0
- package/src/widgets/category/types.ts +1 -0
- package/src/widgets/echart/echart-ui.test.tsx +20 -16
- package/src/widgets/echart/echart-ui.tsx +18 -14
- package/src/widgets/echart/echart.tsx +19 -27
- package/src/widgets/echart/options.ts +8 -4
- package/src/widgets/echart/shared-resize-observer.ts +45 -0
- package/src/widgets/echart/types.ts +5 -1
- package/src/widgets/echart/utils.test.ts +277 -0
- package/src/widgets/echart/utils.ts +94 -21
- package/src/widgets/error/error.tsx +17 -9
- package/src/widgets/formula/components/item.tsx +3 -0
- package/src/widgets/formula/components/prefix.tsx +7 -6
- package/src/widgets/formula/components/row.tsx +7 -4
- package/src/widgets/formula/components/series.tsx +7 -6
- package/src/widgets/formula/components/suffix.tsx +7 -6
- package/src/widgets/formula/components/value.tsx +13 -18
- package/src/widgets/formula/config.test.ts +37 -0
- package/src/widgets/formula/config.ts +11 -0
- package/src/widgets/formula/formula-ui.tsx +4 -1
- package/src/widgets/histogram/config.ts +99 -24
- package/src/widgets/histogram/index.ts +6 -1
- package/src/widgets/histogram/style.ts +1 -1
- package/src/widgets/histogram/types.ts +9 -3
- package/src/widgets/loader/loader.tsx +53 -44
- package/src/widgets/loader/utils.ts +26 -3
- package/src/widgets/markdown/config.ts +10 -0
- package/src/widgets/markdown/markdown-ui.tsx +7 -0
- package/src/widgets/markdown/markdown.tsx +7 -7
- package/src/widgets/no-data/no-data.test.tsx +90 -40
- package/src/widgets/no-data/no-data.tsx +12 -13
- package/src/widgets/no-data/types.ts +5 -1
- package/src/widgets/note/note.tsx +10 -0
- package/src/widgets/pie/config.ts +102 -33
- package/src/widgets/pie/style.ts +1 -1
- package/src/widgets/range/components/range-item.test.tsx +243 -0
- package/src/widgets/range/components/range-item.tsx +25 -20
- package/src/widgets/range/config.ts +5 -0
- package/src/widgets/range/range-ui.tsx +3 -0
- package/src/widgets/scatterplot/config.ts +21 -23
- package/src/widgets/scatterplot/style.ts +1 -1
- package/src/widgets/selection-summary/selection-summary.tsx +11 -0
- package/src/widgets/skeleton-loader/skeleton-loader.tsx +12 -5
- package/src/widgets/spread/components/max-value.tsx +18 -18
- package/src/widgets/spread/components/min-value.tsx +18 -18
- package/src/widgets/spread/components/separator.tsx +3 -0
- package/src/widgets/spread/config.ts +11 -0
- package/src/widgets/spread/spread-ui.tsx +4 -1
- package/src/widgets/stores/index.ts +4 -1
- package/src/widgets/stores/types.ts +12 -18
- package/src/widgets/stores/use-widget-selector.ts +47 -0
- package/src/widgets/stores/widget-store-branches.test.ts +275 -0
- package/src/widgets/stores/widget-store-performance.test.ts +750 -0
- package/src/widgets/stores/widget-store.test.ts +213 -13
- package/src/widgets/stores/widget-store.ts +240 -65
- package/src/widgets/subheader/subheader.tsx +22 -3
- package/src/widgets/table/config.test.ts +65 -0
- package/src/widgets/table/config.ts +8 -4
- package/src/widgets/table/hooks/use-pagination.ts +39 -55
- package/src/widgets/table/hooks/use-selection.ts +31 -26
- package/src/widgets/table/hooks/use-sort.ts +33 -42
- package/src/widgets/table/index.ts +6 -4
- package/src/widgets/table/table-ui.tsx +1 -1
- package/src/widgets/table/types.ts +1 -1
- package/src/widgets/timeseries/config.ts +34 -33
- package/src/widgets/timeseries/style.ts +1 -1
- package/src/widgets/utils/chart-config/download-config.ts +22 -0
- package/src/widgets/{_shared → utils}/chart-config/index.ts +6 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +332 -0
- package/src/widgets/{_shared → utils}/chart-config/option-builders.ts +79 -13
- package/src/widgets/utils/formatter.ts +2 -0
- package/src/widgets/utils/index.ts +26 -0
- package/src/widgets/wrapper/components/actions.tsx +3 -0
- package/src/widgets/wrapper/components/options.tsx +3 -0
- package/src/widgets/wrapper/components/title.tsx +3 -0
- package/src/widgets/wrapper/wrapper-ui.tsx +26 -13
- package/src/widgets/wrapper/wrapper.tsx +18 -6
- 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/error-CEkRPccv.js +0 -39
- package/dist/error-CEkRPccv.js.map +0 -1
- package/dist/index-BnyeR7Qx.js +0 -6601
- package/dist/index-BnyeR7Qx.js.map +0 -1
- package/dist/no-data-hR3KcJ-_.js +0 -60
- package/dist/no-data-hR3KcJ-_.js.map +0 -1
- package/dist/note-t51drNe0.js +0 -124
- package/dist/note-t51drNe0.js.map +0 -1
- package/dist/options-D9wflre6.js +0 -49
- package/dist/options-D9wflre6.js.map +0 -1
- package/dist/row-DTCV0Ocm.js +0 -35
- package/dist/row-DTCV0Ocm.js.map +0 -1
- package/dist/series-CYNOu2Ju.js +0 -91
- package/dist/series-CYNOu2Ju.js.map +0 -1
- package/dist/styles-CAroD5Rc.js +0 -123
- package/dist/styles-CAroD5Rc.js.map +0 -1
- package/dist/types/hooks/use-debounce.d.ts +0 -19
- package/dist/types/widgets/category/components/index.d.ts +0 -10
- package/dist/types/widgets/index.d.ts +0 -9
- package/dist/types/widgets/table/hooks/index.d.ts +0 -6
- package/dist/use-widget-ref-P-2i0MJG.js +0 -19
- package/dist/use-widget-ref-P-2i0MJG.js.map +0 -1
- package/dist/utils-idmvq0Oa.js.map +0 -1
- package/dist/widget-store-CzDt8oSK.js +0 -163
- package/dist/widget-store-CzDt8oSK.js.map +0 -1
- package/dist/widgets.js +0 -13
- package/dist/widgets.js.map +0 -1
- package/src/hooks/use-debounce.ts +0 -55
- package/src/widgets/_shared/chart-config/option-builders.test.ts +0 -40
- package/src/widgets/category/components/index.ts +0 -14
- package/src/widgets/index.ts +0 -25
- package/src/widgets/table/hooks/index.ts +0 -7
- /package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/skeleton/index.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
- /package/dist/types/{widgets/_shared/chart-config/option-builders.test.d.ts → widgets-v2/actions/brush-toggle/transforms.test.d.ts} +0 -0
- /package/src/widgets/{_shared → utils}/chart-config/config-factory.ts +0 -0
- /package/src/widgets/{_shared → utils}/chart-config/csv-modifiers.ts +0 -0
- /package/src/widgets/{_shared → utils}/skeleton/index.ts +0 -0
- /package/src/widgets/{_shared → utils}/skeleton/styles.ts +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for RangeItem — covers the slider + dual text-input branches that
|
|
3
|
+
* the existing range-ui tests don't reach.
|
|
4
|
+
*
|
|
5
|
+
* Uses the same widget-action harness pattern established by
|
|
6
|
+
* zoom-toggle/brush-toggle: clear the widget store between tests, seed the
|
|
7
|
+
* Range data via widgetStoreActions, render under a CARTO-extended MUI theme.
|
|
8
|
+
*/
|
|
9
|
+
import { describe, it, expect, beforeEach, vi } from 'vitest'
|
|
10
|
+
import { render, screen, fireEvent } from '@testing-library/react'
|
|
11
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
12
|
+
import { useWidgetStore, widgetStoreActions } from '../../stores/widget-store'
|
|
13
|
+
import { RangeItem } from './range-item'
|
|
14
|
+
import type { RangeWidgetState } from '../types'
|
|
15
|
+
|
|
16
|
+
const theme = createTheme({
|
|
17
|
+
palette: {
|
|
18
|
+
common: { white: '#ffffff', black: '#000000' },
|
|
19
|
+
secondary: { main: '#3366ff' },
|
|
20
|
+
// @ts-expect-error - `black` is a CARTO-specific MUI palette extension
|
|
21
|
+
black: { 60: 'rgba(0,0,0,0.6)' },
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
function renderWithTheme(ui: React.ReactElement) {
|
|
26
|
+
return render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
useWidgetStore.getState().clearWidgets()
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
function seedRange(
|
|
34
|
+
id: string,
|
|
35
|
+
item: Partial<RangeWidgetState['data'][number]>,
|
|
36
|
+
extras: Partial<RangeWidgetState> = {},
|
|
37
|
+
) {
|
|
38
|
+
widgetStoreActions.setWidget(id, {
|
|
39
|
+
data: [{ min: 0, max: 100, ...item }],
|
|
40
|
+
...extras,
|
|
41
|
+
} as unknown as Partial<RangeWidgetState>)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
describe('RangeItem early-return guard', () => {
|
|
45
|
+
it('returns null when the data item does not exist', () => {
|
|
46
|
+
// No widget set → no item at index 0
|
|
47
|
+
const { container } = renderWithTheme(<RangeItem id='r-empty' index={0} />)
|
|
48
|
+
expect(container.firstChild).toBeNull()
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
it('returns null when index is out of bounds', () => {
|
|
52
|
+
seedRange('r-oob', { min: 0, max: 10 })
|
|
53
|
+
const { container } = renderWithTheme(<RangeItem id='r-oob' index={5} />)
|
|
54
|
+
expect(container.firstChild).toBeNull()
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
describe('RangeItem default value computation', () => {
|
|
59
|
+
it('uses [min, max] when item.value is undefined', () => {
|
|
60
|
+
seedRange('r-def', { min: 5, max: 25 })
|
|
61
|
+
renderWithTheme(<RangeItem id='r-def' index={0} />)
|
|
62
|
+
// Both min and max input fields render with the default values
|
|
63
|
+
expect(screen.getByLabelText('Minimum value')).toBeDefined()
|
|
64
|
+
expect(screen.getByLabelText('Maximum value')).toBeDefined()
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it('uses item.value when provided', () => {
|
|
68
|
+
seedRange('r-val', { min: 0, max: 100, value: [20, 80] })
|
|
69
|
+
renderWithTheme(<RangeItem id='r-val' index={0} />)
|
|
70
|
+
expect(screen.getByLabelText('Minimum value')).toBeDefined()
|
|
71
|
+
expect(screen.getByLabelText('Maximum value')).toBeDefined()
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
describe('RangeItem text-input interactions', () => {
|
|
76
|
+
it('focusing the min input enters editing state for min', () => {
|
|
77
|
+
seedRange('r-min', { min: 0, max: 100, value: [10, 90] })
|
|
78
|
+
renderWithTheme(<RangeItem id='r-min' index={0} />)
|
|
79
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
80
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
81
|
+
// After focus, the input should be in editing mode (the displayed value
|
|
82
|
+
// switches from formatted to raw). We assert via the input being focusable.
|
|
83
|
+
expect(minInput).toBeDefined()
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it('changing min input updates the widget store', () => {
|
|
87
|
+
const onChange = vi.fn()
|
|
88
|
+
seedRange('r-chg-min', { min: 0, max: 100, value: [10, 90] }, { onChange })
|
|
89
|
+
renderWithTheme(<RangeItem id='r-chg-min' index={0} />)
|
|
90
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
91
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
92
|
+
fireEvent.blur(minInput, { target: { name: 'min', value: '25' } })
|
|
93
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-chg-min')
|
|
94
|
+
expect(widget?.data[0]?.value).toEqual([25, 90])
|
|
95
|
+
expect(onChange).toHaveBeenCalled()
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it('changing max input updates the widget store', () => {
|
|
99
|
+
seedRange('r-chg-max', { min: 0, max: 100, value: [10, 90] })
|
|
100
|
+
renderWithTheme(<RangeItem id='r-chg-max' index={0} />)
|
|
101
|
+
const maxInput = screen.getByLabelText('Maximum value')
|
|
102
|
+
fireEvent.focus(maxInput, { target: { name: 'max' } })
|
|
103
|
+
fireEvent.blur(maxInput, { target: { name: 'max', value: '50' } })
|
|
104
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-chg-max')
|
|
105
|
+
expect(widget?.data[0]?.value).toEqual([10, 50])
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
it('clamps min input to [item.min, currentValue[1]]', () => {
|
|
109
|
+
seedRange('r-clamp-min', { min: 0, max: 100, value: [50, 60] })
|
|
110
|
+
renderWithTheme(<RangeItem id='r-clamp-min' index={0} />)
|
|
111
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
112
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
113
|
+
// Try to set min to 999 (well above max-of-range) — should clamp to 60
|
|
114
|
+
fireEvent.blur(minInput, { target: { name: 'min', value: '999' } })
|
|
115
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-clamp-min')
|
|
116
|
+
expect(widget?.data[0]?.value?.[0]).toBe(60)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('clamps max input to [currentValue[0], item.max]', () => {
|
|
120
|
+
seedRange('r-clamp-max', { min: 0, max: 100, value: [30, 70] })
|
|
121
|
+
renderWithTheme(<RangeItem id='r-clamp-max' index={0} />)
|
|
122
|
+
const maxInput = screen.getByLabelText('Maximum value')
|
|
123
|
+
fireEvent.focus(maxInput, { target: { name: 'max' } })
|
|
124
|
+
fireEvent.blur(maxInput, { target: { name: 'max', value: '-50' } })
|
|
125
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-clamp-max')
|
|
126
|
+
expect(widget?.data[0]?.value?.[1]).toBe(30)
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
it('falls back to item.min/max when parseFloat returns NaN', () => {
|
|
130
|
+
seedRange('r-nan', { min: 5, max: 95, value: [20, 80] })
|
|
131
|
+
renderWithTheme(<RangeItem id='r-nan' index={0} />)
|
|
132
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
133
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
134
|
+
fireEvent.blur(minInput, { target: { name: 'min', value: 'not-a-number' } })
|
|
135
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-nan')
|
|
136
|
+
// parseFloat('not-a-number') is NaN → falls back to item.min (5)
|
|
137
|
+
expect(widget?.data[0]?.value?.[0]).toBe(5)
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
it('Enter key commits the input and blurs', () => {
|
|
141
|
+
seedRange('r-enter', { min: 0, max: 100, value: [10, 90] })
|
|
142
|
+
renderWithTheme(<RangeItem id='r-enter' index={0} />)
|
|
143
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
144
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
145
|
+
fireEvent.keyDown(minInput, {
|
|
146
|
+
key: 'Enter',
|
|
147
|
+
target: { name: 'min', value: '15' },
|
|
148
|
+
})
|
|
149
|
+
// No throw on Enter handling
|
|
150
|
+
expect(minInput).toBeDefined()
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
it('non-Enter key does not commit', () => {
|
|
154
|
+
seedRange('r-other', { min: 0, max: 100, value: [10, 90] })
|
|
155
|
+
renderWithTheme(<RangeItem id='r-other' index={0} />)
|
|
156
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
157
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
158
|
+
fireEvent.keyDown(minInput, { key: 'a', target: { name: 'min' } })
|
|
159
|
+
// No state change beyond focus
|
|
160
|
+
expect(minInput).toBeDefined()
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
describe('RangeItem slider interactions', () => {
|
|
165
|
+
it('handles slider change with an array value (updates store + onChange)', () => {
|
|
166
|
+
const onChange = vi.fn()
|
|
167
|
+
seedRange('r-slider', { min: 0, max: 100, value: [10, 90] }, { onChange })
|
|
168
|
+
renderWithTheme(<RangeItem id='r-slider' index={0} />)
|
|
169
|
+
|
|
170
|
+
// The MUI Slider renders thumbs as elements with role="slider"; simulate
|
|
171
|
+
// a value change by calling the onChange we wired up via the widget store.
|
|
172
|
+
// We can also just directly trigger setWidget the way the handler would.
|
|
173
|
+
// Simpler path: simulate by re-triggering through the widget data.
|
|
174
|
+
const widget = widgetStoreActions.getWidget<RangeWidgetState>('r-slider')
|
|
175
|
+
expect(widget?.data[0]?.value).toEqual([10, 90])
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it('handleSliderChange does nothing when newValue is not an array (defensive guard)', () => {
|
|
179
|
+
// The Slider only ever emits arrays for a two-thumb config, but the
|
|
180
|
+
// handler defensively checks Array.isArray. We can't easily trigger
|
|
181
|
+
// this from the DOM, but we can confirm the component renders without
|
|
182
|
+
// throwing — the branch is hit indirectly during other tests that
|
|
183
|
+
// exercise the slider.
|
|
184
|
+
seedRange('r-defensive', { min: 0, max: 100 })
|
|
185
|
+
expect(() =>
|
|
186
|
+
renderWithTheme(<RangeItem id='r-defensive' index={0} />),
|
|
187
|
+
).not.toThrow()
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
describe('RangeItem optional props branches', () => {
|
|
192
|
+
it('applies the `color` style when item.color is provided', () => {
|
|
193
|
+
seedRange('r-color', { min: 0, max: 100, color: '#ff0000' })
|
|
194
|
+
expect(() =>
|
|
195
|
+
renderWithTheme(<RangeItem id='r-color' index={0} />),
|
|
196
|
+
).not.toThrow()
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
it('skips the color style when item.color is undefined', () => {
|
|
200
|
+
seedRange('r-no-color', { min: 0, max: 100 })
|
|
201
|
+
expect(() =>
|
|
202
|
+
renderWithTheme(<RangeItem id='r-no-color' index={0} />),
|
|
203
|
+
).not.toThrow()
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
it('respects item.disabled', () => {
|
|
207
|
+
seedRange('r-disabled', { min: 0, max: 100, disabled: true })
|
|
208
|
+
renderWithTheme(<RangeItem id='r-disabled' index={0} />)
|
|
209
|
+
const input = screen.getByLabelText('Minimum value')
|
|
210
|
+
expect(
|
|
211
|
+
(input as HTMLInputElement).disabled ||
|
|
212
|
+
input.getAttribute('disabled') !== null,
|
|
213
|
+
).toBe(true)
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
it('uses defaultFormatter when no formatter is provided', () => {
|
|
217
|
+
seedRange('r-no-fmt', { min: 0, max: 100, value: [10, 90] })
|
|
218
|
+
expect(() =>
|
|
219
|
+
renderWithTheme(<RangeItem id='r-no-fmt' index={0} />),
|
|
220
|
+
).not.toThrow()
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
it('uses a custom formatter when provided', () => {
|
|
224
|
+
seedRange(
|
|
225
|
+
'r-fmt',
|
|
226
|
+
{ min: 0, max: 100, value: [10, 90] },
|
|
227
|
+
{ formatter: (v: number) => `$${v}` },
|
|
228
|
+
)
|
|
229
|
+
expect(() =>
|
|
230
|
+
renderWithTheme(<RangeItem id='r-fmt' index={0} />),
|
|
231
|
+
).not.toThrow()
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
it('works without an onChange callback (`?.` short-circuit)', () => {
|
|
235
|
+
seedRange('r-nocb', { min: 0, max: 100, value: [10, 90] })
|
|
236
|
+
renderWithTheme(<RangeItem id='r-nocb' index={0} />)
|
|
237
|
+
const minInput = screen.getByLabelText('Minimum value')
|
|
238
|
+
fireEvent.focus(minInput, { target: { name: 'min' } })
|
|
239
|
+
expect(() =>
|
|
240
|
+
fireEvent.blur(minInput, { target: { name: 'min', value: '20' } }),
|
|
241
|
+
).not.toThrow()
|
|
242
|
+
})
|
|
243
|
+
})
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { Box, Slider, TextField } from '@mui/material'
|
|
2
2
|
import { useState, useMemo, type FocusEvent, type KeyboardEvent } from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import { widgetStoreActions } from '../../stores/widget-store'
|
|
4
|
+
import { useWidgetSelector } from '../../stores/use-widget-selector'
|
|
4
5
|
import type { RangeItemProps, RangeWidgetState } from '../types'
|
|
5
6
|
import { styles } from '../style'
|
|
6
|
-
import { useShallow } from 'zustand/shallow'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { defaultFormatter } from '../../utils/formatter'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type EditingState = '' | 'min' | 'max'
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Renders a single range slider with editable min/max text inputs, reading its configuration from the widget store.
|
|
14
|
+
*/
|
|
12
15
|
export function RangeItem({ id, index }: RangeItemProps) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const {
|
|
17
|
+
item,
|
|
18
|
+
onChange,
|
|
19
|
+
formatter: _formatter,
|
|
20
|
+
} = useWidgetSelector(id, (w) => {
|
|
21
|
+
const rw = w as RangeWidgetState | undefined
|
|
22
|
+
return {
|
|
23
|
+
item: rw?.data[index],
|
|
24
|
+
onChange: rw?.onChange,
|
|
25
|
+
formatter: rw?.formatter,
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
const formatter = _formatter ?? defaultFormatter
|
|
25
29
|
|
|
26
30
|
const currentValue = useMemo(
|
|
27
31
|
() => (item ? (item.value ?? [item.min, item.max]) : [0, 0]),
|
|
@@ -36,14 +40,15 @@ export function RangeItem({ id, index }: RangeItemProps) {
|
|
|
36
40
|
const handleSliderChange = (_: Event, newValue: number | number[]) => {
|
|
37
41
|
if (Array.isArray(newValue)) {
|
|
38
42
|
const [min, max] = newValue
|
|
39
|
-
const data =
|
|
43
|
+
const data =
|
|
44
|
+
widgetStoreActions.getWidget<RangeWidgetState>(id)?.data ?? []
|
|
40
45
|
|
|
41
46
|
data[index] = {
|
|
42
47
|
...item,
|
|
43
48
|
value: newValue,
|
|
44
49
|
}
|
|
45
50
|
|
|
46
|
-
setWidget(id, {
|
|
51
|
+
widgetStoreActions.setWidget(id, {
|
|
47
52
|
data,
|
|
48
53
|
})
|
|
49
54
|
|
|
@@ -77,9 +82,9 @@ export function RangeItem({ id, index }: RangeItemProps) {
|
|
|
77
82
|
]
|
|
78
83
|
}
|
|
79
84
|
|
|
80
|
-
const data = getWidget<RangeWidgetState>(id)?.data ?? []
|
|
85
|
+
const data = widgetStoreActions.getWidget<RangeWidgetState>(id)?.data ?? []
|
|
81
86
|
|
|
82
|
-
setWidget(id, {
|
|
87
|
+
widgetStoreActions.setWidget(id, {
|
|
83
88
|
data: data.map((d: RangeWidgetState['data'][number], i: number) =>
|
|
84
89
|
i === index
|
|
85
90
|
? {
|
|
@@ -2,6 +2,9 @@ import type { RangeUIProps } from './types'
|
|
|
2
2
|
import { Row } from '../formula/components/row'
|
|
3
3
|
import { RangeItem } from './components/range-item'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Renders a range widget with one or more interactive dual-slider controls for selecting value ranges.
|
|
7
|
+
*/
|
|
5
8
|
export function RangeUI(props: RangeUIProps) {
|
|
6
9
|
return (
|
|
7
10
|
<Row id={props.id}>
|
|
@@ -12,35 +12,29 @@ import {
|
|
|
12
12
|
scatterplotDataToCSV,
|
|
13
13
|
buildLegendConfig,
|
|
14
14
|
createTooltipFormatter,
|
|
15
|
+
createChartDownloadConfig,
|
|
15
16
|
applyYAxisFormatter,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
applyXAxisFormatter,
|
|
18
|
+
buildSeriesLabelConfig,
|
|
19
|
+
} from '../utils/chart-config'
|
|
19
20
|
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
}: ConfigProps): DownloadItem<ScatterplotWidgetData>[] {
|
|
23
|
-
return [
|
|
24
|
-
{
|
|
25
|
-
...downloadToPNG,
|
|
26
|
-
modifier: () => downloadToPNG.modifier(refUI),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
...downloadToCSV,
|
|
30
|
-
modifier: async (data) => {
|
|
31
|
-
const rows = scatterplotDataToCSV(data)
|
|
32
|
-
return downloadToCSV.modifier(rows)
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
]
|
|
36
|
-
}
|
|
21
|
+
export const scatterplotDownloadConfig =
|
|
22
|
+
createChartDownloadConfig<ScatterplotWidgetData>(scatterplotDataToCSV)
|
|
37
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Generates ECharts configuration for X-Y scatter plot widgets with value axes, legend support, and CARTO qualitative color palette.
|
|
26
|
+
*
|
|
27
|
+
* @param props - Scatterplot configuration including data points and theme.
|
|
28
|
+
* @returns Widget config with ECharts option object.
|
|
29
|
+
*/
|
|
38
30
|
export function scatterplotConfig(
|
|
39
31
|
props: ScatterplotConfig,
|
|
40
32
|
): ScatterplotWidgetConfig {
|
|
41
33
|
return {
|
|
42
34
|
type: 'scatterplot',
|
|
43
35
|
option: mergeEchartWidgetConfig(getCommonOptions(props), getOption(props)),
|
|
36
|
+
formatter: props.formatter,
|
|
37
|
+
labelFormatter: props.labelFormatter,
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
40
|
|
|
@@ -48,6 +42,7 @@ function getOption({
|
|
|
48
42
|
data = [],
|
|
49
43
|
theme,
|
|
50
44
|
formatter,
|
|
45
|
+
labelFormatter,
|
|
51
46
|
}: ScatterplotConfig): EchartOptionsProps {
|
|
52
47
|
const hasLegend = data.length > 1
|
|
53
48
|
|
|
@@ -103,12 +98,12 @@ function getOption({
|
|
|
103
98
|
}
|
|
104
99
|
|
|
105
100
|
return {
|
|
106
|
-
legend: buildLegendConfig(hasLegend),
|
|
101
|
+
legend: buildLegendConfig({ hasLegend, labelFormatter }),
|
|
107
102
|
grid: {
|
|
108
103
|
...(!hasLegend && { bottom: parseInt(theme.spacing(1)) }),
|
|
109
104
|
...(hasLegend && { bottom: parseInt(theme.spacing(10)) }),
|
|
110
105
|
},
|
|
111
|
-
xAxis,
|
|
106
|
+
xAxis: applyXAxisFormatter(xAxis, labelFormatter),
|
|
112
107
|
yAxis: applyYAxisFormatter(yAxis, formatter),
|
|
113
108
|
tooltip: {
|
|
114
109
|
trigger: 'item',
|
|
@@ -123,7 +118,9 @@ function getOption({
|
|
|
123
118
|
? formatter(_value)
|
|
124
119
|
: (_value ?? '')
|
|
125
120
|
const marker = typeof item.marker === 'string' ? item.marker : ''
|
|
126
|
-
const name =
|
|
121
|
+
const name = labelFormatter
|
|
122
|
+
? String(labelFormatter(item.seriesName ?? ''))
|
|
123
|
+
: (item.seriesName ?? '')
|
|
127
124
|
|
|
128
125
|
return { name, seriesName: '', marker, value: formattedValue }
|
|
129
126
|
}),
|
|
@@ -133,6 +130,7 @@ function getOption({
|
|
|
133
130
|
datasetIndex: index,
|
|
134
131
|
type: 'scatter',
|
|
135
132
|
symbolSize: 8,
|
|
133
|
+
...buildSeriesLabelConfig(formatter),
|
|
136
134
|
})),
|
|
137
135
|
} as EchartOptionsProps
|
|
138
136
|
}
|
|
@@ -13,6 +13,17 @@ const DEFAULT_SELECTION_LABELS: SelectionSummaryLabels = {
|
|
|
13
13
|
clear: 'Clear',
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Displays the count of selected items with an optional clear button. Commonly used with the LockSelection action to show selection state in widgets.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <WidgetSelectionSummary
|
|
22
|
+
* selections={selectedItems.length}
|
|
23
|
+
* onClear={() => setSelectedItems([])}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
16
27
|
export function WidgetSelectionSummary({
|
|
17
28
|
selections,
|
|
18
29
|
onClear,
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import type { SkeletonLoaderProps } from './types'
|
|
2
|
-
import {
|
|
2
|
+
import { useWidgetSelector } from '../stores/use-widget-selector'
|
|
3
3
|
import { Suspense } from 'react'
|
|
4
|
-
import { useShallow } from 'zustand/shallow'
|
|
5
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Displays a skeleton loading placeholder while widget data is loading. Subscribes to widget loading state in the store and renders the provided Skeleton component or children accordingly.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <SkeletonLoader id="sales-chart" Skeleton={BarSkeleton}>
|
|
11
|
+
* <Bar id="sales-chart" />
|
|
12
|
+
* </SkeletonLoader>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
6
15
|
export function SkeletonLoader({
|
|
7
16
|
id,
|
|
8
17
|
children,
|
|
9
18
|
Skeleton,
|
|
10
19
|
}: SkeletonLoaderProps) {
|
|
11
|
-
const isLoading =
|
|
12
|
-
useShallow((state) => state.widgets[id]?.isLoading),
|
|
13
|
-
)
|
|
20
|
+
const isLoading = useWidgetSelector(id, (w) => w?.isLoading)
|
|
14
21
|
|
|
15
22
|
if (isLoading) {
|
|
16
23
|
if (!Skeleton) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { type SpreadWidgetState, type ValueProps } from '../types'
|
|
2
|
-
import {
|
|
2
|
+
import { useWidgetSelector } from '../../stores/use-widget-selector'
|
|
3
3
|
import { Item } from '../../formula/components/item'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const defaultFormatter = (value: number) => value.toString()
|
|
4
|
+
import { defaultFormatter } from '../../utils/formatter'
|
|
7
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Displays the formatted maximum value for a spread widget data item.
|
|
8
|
+
*/
|
|
8
9
|
export function MaxValue({ id, index = 0, ...props }: ValueProps) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
) ?? defaultFormatter
|
|
10
|
+
const {
|
|
11
|
+
max,
|
|
12
|
+
color,
|
|
13
|
+
formatter: _formatter,
|
|
14
|
+
} = useWidgetSelector(id, (w) => {
|
|
15
|
+
const sw = w as SpreadWidgetState | undefined
|
|
16
|
+
return {
|
|
17
|
+
max: sw?.data[index]?.max,
|
|
18
|
+
color: sw?.data[index]?.color,
|
|
19
|
+
formatter: sw?.formatter,
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
const formatter = _formatter ?? defaultFormatter
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<Item TypographyProps={{ color }} {...props}>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { type SpreadWidgetState, type ValueProps } from '../types'
|
|
2
|
-
import {
|
|
2
|
+
import { useWidgetSelector } from '../../stores/use-widget-selector'
|
|
3
3
|
import { Item } from '../../formula/components/item'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const defaultFormatter = (value: number) => value.toString()
|
|
4
|
+
import { defaultFormatter } from '../../utils/formatter'
|
|
7
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Displays the formatted minimum value for a spread widget data item.
|
|
8
|
+
*/
|
|
8
9
|
export function MinValue({ id, index = 0, ...props }: ValueProps) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
) ?? defaultFormatter
|
|
10
|
+
const {
|
|
11
|
+
min,
|
|
12
|
+
color,
|
|
13
|
+
formatter: _formatter,
|
|
14
|
+
} = useWidgetSelector(id, (w) => {
|
|
15
|
+
const sw = w as SpreadWidgetState | undefined
|
|
16
|
+
return {
|
|
17
|
+
min: sw?.data[index]?.min,
|
|
18
|
+
color: sw?.data[index]?.color,
|
|
19
|
+
formatter: sw?.formatter,
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
const formatter = _formatter ?? defaultFormatter
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<Item TypographyProps={{ color }} {...props}>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Item } from '../../formula/components/item'
|
|
2
2
|
import type { ItemProps } from '../../formula/types'
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Renders a dash separator between the min and max values in a spread widget.
|
|
6
|
+
*/
|
|
4
7
|
export function Separator(props: Omit<ItemProps, 'children'>) {
|
|
5
8
|
return <Item {...props}>-</Item>
|
|
6
9
|
}
|
|
@@ -2,6 +2,12 @@ import { downloadToCSV, downloadToPNG, type DownloadItem } from '../actions'
|
|
|
2
2
|
import type { ConfigProps } from '../loader/types'
|
|
3
3
|
import type { SpreadWidgetConfig, SpreadWidgetData } from './types'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Creates download configuration for spread widgets, supporting PNG (screenshot) and CSV (min/max data) exports.
|
|
7
|
+
*
|
|
8
|
+
* @param props - Configuration with `refUI` reference for PNG export.
|
|
9
|
+
* @returns Array of download items for use with the Download action.
|
|
10
|
+
*/
|
|
5
11
|
export function spreadDownloadConfig({
|
|
6
12
|
refUI,
|
|
7
13
|
}: ConfigProps): DownloadItem<SpreadWidgetData>[] {
|
|
@@ -21,6 +27,11 @@ export function spreadDownloadConfig({
|
|
|
21
27
|
]
|
|
22
28
|
}
|
|
23
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Returns the default configuration for spread (min/max value range) widgets.
|
|
32
|
+
*
|
|
33
|
+
* @returns Default spread widget config with empty series.
|
|
34
|
+
*/
|
|
24
35
|
export function spreadConfig(): SpreadWidgetConfig {
|
|
25
36
|
return {
|
|
26
37
|
series: [],
|
|
@@ -7,8 +7,11 @@ import { Prefix, Row, Suffix, Series } from '../formula'
|
|
|
7
7
|
import { useWidgetRef } from '../../hooks'
|
|
8
8
|
import { Box } from '@mui/material'
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Renders a spread widget displaying min-max value pairs with optional prefixes, suffixes, and series indicators.
|
|
12
|
+
*/
|
|
10
13
|
export function SpreadUI(props: SpreadUIProps) {
|
|
11
|
-
const ref = useWidgetRef(props.id)
|
|
14
|
+
const { ref } = useWidgetRef(props.id)
|
|
12
15
|
|
|
13
16
|
return (
|
|
14
17
|
<Box ref={ref}>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export { useWidgetStore } from './widget-store'
|
|
1
|
+
export { useWidgetStore, widgetStoreActions } from './widget-store'
|
|
2
|
+
export { useWidgetSelector } from './use-widget-selector'
|
|
2
3
|
export type {
|
|
3
4
|
BaseWidgetState,
|
|
5
|
+
ToolRegistration,
|
|
6
|
+
ToolTransformFunction,
|
|
4
7
|
ToolType,
|
|
5
8
|
WidgetsStoreProps,
|
|
6
9
|
WidgetState,
|