@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
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ScatterplotConfig, ScatterplotWidgetConfig, ScatterplotWidgetData } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const scatterplotDownloadConfig: ({ refUI }: import('../loader').ConfigProps) => import('../actions').DownloadItem<ScatterplotWidgetData>[];
|
|
3
|
+
/**
|
|
4
|
+
* Generates ECharts configuration for X-Y scatter plot widgets with value axes, legend support, and CARTO qualitative color palette.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Scatterplot configuration including data points and theme.
|
|
7
|
+
* @returns Widget config with ECharts option object.
|
|
8
|
+
*/
|
|
5
9
|
export declare function scatterplotConfig(props: ScatterplotConfig): ScatterplotWidgetConfig;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { WidgetSelectionSummaryProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Displays the count of selected items with an optional clear button. Commonly used with the LockSelection action to show selection state in widgets.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <WidgetSelectionSummary
|
|
8
|
+
* selections={selectedItems.length}
|
|
9
|
+
* onClear={() => setSelectedItems([])}
|
|
10
|
+
* />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
2
13
|
export declare function WidgetSelectionSummary({ selections, onClear, labels, }: WidgetSelectionSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { SkeletonLoaderProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <SkeletonLoader id="sales-chart" Skeleton={BarSkeleton}>
|
|
8
|
+
* <Bar id="sales-chart" />
|
|
9
|
+
* </SkeletonLoader>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
2
12
|
export declare function SkeletonLoader({ id, children, Skeleton, }: SkeletonLoaderProps): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { DownloadItem } from '../actions';
|
|
2
2
|
import { ConfigProps } from '../loader/types';
|
|
3
3
|
import { SpreadWidgetConfig, SpreadWidgetData } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Creates download configuration for spread widgets, supporting PNG (screenshot) and CSV (min/max data) exports.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Configuration with `refUI` reference for PNG export.
|
|
8
|
+
* @returns Array of download items for use with the Download action.
|
|
9
|
+
*/
|
|
4
10
|
export declare function spreadDownloadConfig({ refUI, }: ConfigProps): DownloadItem<SpreadWidgetData>[];
|
|
11
|
+
/**
|
|
12
|
+
* Returns the default configuration for spread (min/max value range) widgets.
|
|
13
|
+
*
|
|
14
|
+
* @returns Default spread widget config with empty series.
|
|
15
|
+
*/
|
|
5
16
|
export declare function spreadConfig(): SpreadWidgetConfig;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { useWidgetStore } from './widget-store';
|
|
2
|
-
export
|
|
1
|
+
export { useWidgetStore, widgetStoreActions } from './widget-store';
|
|
2
|
+
export { useWidgetSelector } from './use-widget-selector';
|
|
3
|
+
export type { BaseWidgetState, ToolRegistration, ToolTransformFunction, ToolType, WidgetsStoreProps, WidgetState, WidgetStore, WidgetStoreActions, WidgetStoreState, } from './types';
|
|
@@ -12,6 +12,10 @@ export interface WidgetsStoreProps {
|
|
|
12
12
|
type: string;
|
|
13
13
|
/** Widget data - flexible to accommodate different widget types */
|
|
14
14
|
data: unknown;
|
|
15
|
+
/** Original pre-pipeline data. Used by NoData to distinguish
|
|
16
|
+
* "no data from API" from "pipeline tools filtered everything out".
|
|
17
|
+
* Set automatically by executeToolPipeline — not a component prop. */
|
|
18
|
+
sourceData?: unknown;
|
|
15
19
|
/** Loading state */
|
|
16
20
|
isLoading: boolean;
|
|
17
21
|
/** Fetching state (e.g., for async data) */
|
|
@@ -29,6 +33,8 @@ export interface WidgetsStoreProps {
|
|
|
29
33
|
registeredTools?: ToolRegistration[];
|
|
30
34
|
/** Formatter function for widget values */
|
|
31
35
|
formatter?: (value: number) => string;
|
|
36
|
+
/** Formatter function for widget label/category values */
|
|
37
|
+
labelFormatter?: (value: string | number) => string | number;
|
|
32
38
|
/** Locale for number formatting (e.g., 'en-US', 'es-ES', 'fr-FR') */
|
|
33
39
|
locale?: string;
|
|
34
40
|
}
|
|
@@ -36,7 +42,7 @@ export interface WidgetsStoreProps {
|
|
|
36
42
|
* Tool transformation function type
|
|
37
43
|
* Can be synchronous or asynchronous to support remote operations
|
|
38
44
|
*/
|
|
39
|
-
export type ToolTransformFunction = (data: unknown
|
|
45
|
+
export type ToolTransformFunction = (data: unknown) => unknown;
|
|
40
46
|
/**
|
|
41
47
|
* Tool registration for widget pipeline
|
|
42
48
|
*
|
|
@@ -78,8 +84,6 @@ export interface ToolRegistration {
|
|
|
78
84
|
enabled: boolean;
|
|
79
85
|
/** 'data' (default) transforms data, 'config' transforms widget config/option */
|
|
80
86
|
type?: ToolType;
|
|
81
|
-
/** Tool-specific configuration */
|
|
82
|
-
config?: Record<string, unknown>;
|
|
83
87
|
/**
|
|
84
88
|
* Array of tool IDs to disable when this tool is active.
|
|
85
89
|
* During pipeline execution, if this tool is enabled, any tools listed
|
|
@@ -145,13 +149,6 @@ export interface WidgetStoreActions {
|
|
|
145
149
|
* @param toolId - Tool ID to remove
|
|
146
150
|
*/
|
|
147
151
|
unregisterTool: (widgetId: string, toolId: string) => void;
|
|
148
|
-
/**
|
|
149
|
-
* Update tool configuration
|
|
150
|
-
* @param widgetId - Widget ID
|
|
151
|
-
* @param toolId - Tool ID
|
|
152
|
-
* @param config - New configuration to merge
|
|
153
|
-
*/
|
|
154
|
-
updateToolConfig: (widgetId: string, toolId: string, config: Record<string, unknown>) => void;
|
|
155
152
|
/**
|
|
156
153
|
* Set tool enabled state
|
|
157
154
|
* @param widgetId - Widget ID
|
|
@@ -159,6 +156,11 @@ export interface WidgetStoreActions {
|
|
|
159
156
|
* @param enabled - Whether tool should be enabled
|
|
160
157
|
*/
|
|
161
158
|
setToolEnabled: (widgetId: string, toolId: string, enabled: boolean) => void;
|
|
159
|
+
/**
|
|
160
|
+
* Trigger pipeline re-execution by bumping the registeredTools reference.
|
|
161
|
+
* @param widgetId - Widget ID
|
|
162
|
+
*/
|
|
163
|
+
triggerToolPipeline: (widgetId: string) => void;
|
|
162
164
|
/**
|
|
163
165
|
* Execute the tool transformation pipeline
|
|
164
166
|
* Supports both synchronous and asynchronous tools
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { WidgetState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scoped selector hook for reading a single widget's state from the store.
|
|
4
|
+
*
|
|
5
|
+
* Consolidates multiple `useWidgetStore(useShallow(...))` calls into a single
|
|
6
|
+
* subscription per component. The selector receives only this widget's state
|
|
7
|
+
* (or undefined if not yet registered), and uses shallow comparison to avoid
|
|
8
|
+
* re-renders when unrelated properties change.
|
|
9
|
+
*
|
|
10
|
+
* @param widgetId - The widget ID to subscribe to.
|
|
11
|
+
* @param selector - A function that extracts the needed properties from the widget state.
|
|
12
|
+
* Must be a stable reference (inline arrow is fine due to useCallback wrapping).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* // Before: 4 separate subscriptions
|
|
17
|
+
* const title = useWidgetStore(useShallow((s) => s.getWidget(id)?.title))
|
|
18
|
+
* const collapsed = useWidgetStore(useShallow((s) => s.getWidget(id)?.collapsed))
|
|
19
|
+
* const disabled = useWidgetStore(useShallow((s) => s.getWidget(id)?.disabled))
|
|
20
|
+
* const isFetching = useWidgetStore(useShallow((s) => s.getWidget(id)?.isFetching))
|
|
21
|
+
*
|
|
22
|
+
* // After: 1 subscription
|
|
23
|
+
* const { title, collapsed, disabled, isFetching } = useWidgetSelector(id, (w) => ({
|
|
24
|
+
* title: w?.title, collapsed: w?.collapsed, disabled: w?.disabled, isFetching: w?.isFetching,
|
|
25
|
+
* }))
|
|
26
|
+
*
|
|
27
|
+
* // With extra dependencies (e.g., index prop):
|
|
28
|
+
* const value = useWidgetSelector(
|
|
29
|
+
* id,
|
|
30
|
+
* (w) => (w as MyState | undefined)?.data?.[index]?.value,
|
|
31
|
+
* [index],
|
|
32
|
+
* )
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function useWidgetSelector<T>(widgetId: string, selector: (widget: WidgetState | undefined) => T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,39 +1,60 @@
|
|
|
1
|
-
import { WidgetStore } from './types';
|
|
1
|
+
import { WidgetStore, WidgetStoreActions } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Zustand store for managing widget state across the application.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Provides centralized state management for all widget UI components, including
|
|
6
|
+
* data/config transformation pipelines via registered tools.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* **Performance optimizations:**
|
|
9
|
+
* - `registerTool` skips the store update when structural properties (order, enabled,
|
|
10
|
+
* type, disables) haven't changed — only `fn` is updated via direct mutation,
|
|
11
|
+
* avoiding a new `registeredTools` array reference and WidgetLoader pipeline cascades.
|
|
12
|
+
* - `setToolEnabled` skips the store update when the enabled state is already the
|
|
13
|
+
* requested value.
|
|
14
|
+
* - `executeToolPipeline` / `executeConfigPipeline` skip the final `set()` when
|
|
15
|
+
* the transformed data/config is referentially identical to what's already in the store.
|
|
16
|
+
* - Both pipelines support cancellation — newer executions for the same widget
|
|
17
|
+
* automatically cancel in-progress ones.
|
|
18
|
+
*
|
|
19
|
+
* @example Reading widget state (prefer useWidgetSelector for performance)
|
|
8
20
|
* ```tsx
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* useEffect(() => {
|
|
18
|
-
* setWidget({
|
|
19
|
-
* id: 'my-widget',
|
|
20
|
-
* type: 'formula',
|
|
21
|
-
* title: 'Total Sales',
|
|
22
|
-
* isLoading: false,
|
|
23
|
-
* visible: true,
|
|
24
|
-
* data: { value: 1000, prefix: '$' }
|
|
25
|
-
* })
|
|
26
|
-
* }, [setWidget])
|
|
27
|
-
*
|
|
28
|
-
* return <div>{widget?.data?.value}</div>
|
|
21
|
+
* import { useWidgetSelector } from '@carto/ps-react-ui/widgets'
|
|
22
|
+
*
|
|
23
|
+
* function MyWidget({ id }: { id: string }) {
|
|
24
|
+
* const { title, data } = useWidgetSelector(id, (w) => ({
|
|
25
|
+
* title: w?.title,
|
|
26
|
+
* data: w?.data,
|
|
27
|
+
* }))
|
|
28
|
+
* return <div>{title}: {JSON.stringify(data)}</div>
|
|
29
29
|
* }
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
-
* @example
|
|
32
|
+
* @example Writing widget state
|
|
33
33
|
* ```tsx
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* const
|
|
34
|
+
* import { widgetStoreActions } from '@carto/ps-react-ui/widgets'
|
|
35
|
+
*
|
|
36
|
+
* const { setWidget } = widgetStoreActions
|
|
37
|
+
* setWidget('my-widget', { type: 'formula', isLoading: false, data: { value: 1000 } })
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
40
|
export declare const useWidgetStore: import('node_modules/zustand/esm/react.mjs').UseBoundStore<import('node_modules/zustand/esm/vanilla.mjs').StoreApi<WidgetStore>>;
|
|
41
|
+
/**
|
|
42
|
+
* Stable references to store actions, accessible without creating a subscription.
|
|
43
|
+
*
|
|
44
|
+
* Use this instead of `useWidgetStore((state) => state.setWidget)` to avoid
|
|
45
|
+
* unnecessary subscriber evaluations. Actions are stable functions that never
|
|
46
|
+
* change, so subscribing to them wastes cycles on every store update.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* import { widgetStoreActions } from '@carto/ps-react-ui/widgets'
|
|
51
|
+
*
|
|
52
|
+
* const { setWidget, registerTool } = widgetStoreActions
|
|
53
|
+
*
|
|
54
|
+
* useEffect(() => {
|
|
55
|
+
* registerTool(id, { id: 'my-tool', order: 10, enabled: true, fn: (d) => d })
|
|
56
|
+
* return () => widgetStoreActions.unregisterTool(id, 'my-tool')
|
|
57
|
+
* }, [id])
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const widgetStoreActions: WidgetStoreActions;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { WidgetSubHeaderProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Flexible two-slot layout for displaying supplementary widget information such as totals, timestamps, or controls. Uses flexbox with space-between justification.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <WidgetSubHeader
|
|
8
|
+
* slotLeft={<Typography variant="caption">Total: 1,234</Typography>}
|
|
9
|
+
* slotRight={<Typography variant="caption">Updated: 2m ago</Typography>}
|
|
10
|
+
* />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
2
13
|
export declare function WidgetSubHeader({ slotLeft, slotRight, sx, }: WidgetSubHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,11 +6,16 @@ export declare const DEFAULT_ROWS_PER_PAGE_OPTIONS: number[];
|
|
|
6
6
|
export declare const DEFAULT_COLUMN_ID: null;
|
|
7
7
|
export declare const DEFAULT_DIRECTION: SortDirection;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Creates download configuration for table widgets, supporting PNG (screenshot) and CSV (data) exports. CSV output uses column keys as headers and filters out `id` fields.
|
|
10
|
+
*
|
|
11
|
+
* @param props - Configuration with `refUI` reference for PNG export.
|
|
12
|
+
* @returns Array of download items for use with the Download action.
|
|
11
13
|
*/
|
|
12
14
|
export declare function tableDownloadConfig({ refUI, }: ConfigProps): TableDownloadConfig;
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Returns the default configuration for table widgets with pagination and sorting, including column definitions and local data mode.
|
|
17
|
+
*
|
|
18
|
+
* @param columns - Array of column definitions for the table.
|
|
19
|
+
* @returns Default table widget config.
|
|
15
20
|
*/
|
|
16
21
|
export declare function tableConfig(columns?: TableColumn[]): TableWidgetConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,8 +26,16 @@ export interface UsePaginationResult<T> {
|
|
|
26
26
|
goToPreviousPage: () => void;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Hook for managing table pagination
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Hook for managing table pagination with support for both local (client-side) and remote (server-side) modes.
|
|
30
|
+
* State is persisted in the widget store for the given widget ID.
|
|
31
|
+
*
|
|
32
|
+
* @param widgetId - The widget ID to persist pagination state under.
|
|
33
|
+
* @param data - The full data array (used for local pagination and total count fallback).
|
|
34
|
+
* @returns Pagination state and navigation helpers.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const { page, setPage, paginatedData, totalPages } = usePagination(widgetId, data)
|
|
39
|
+
* ```
|
|
32
40
|
*/
|
|
33
41
|
export declare function usePagination<T extends TableRow>(widgetId: string, data: T[]): UsePaginationResult<T>;
|
|
@@ -24,7 +24,16 @@ export interface UseSelectionResult {
|
|
|
24
24
|
clearSelection: () => void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Hook for managing table row selection
|
|
28
|
-
* Selection
|
|
27
|
+
* Hook for managing table row selection with persistence across pagination.
|
|
28
|
+
* Selection state is stored in the widget store for the given widget ID.
|
|
29
|
+
*
|
|
30
|
+
* @param widgetId - The widget ID to persist selection state under.
|
|
31
|
+
* @param options - Optional configuration including an `onSelectionChange` callback.
|
|
32
|
+
* @returns Selection state and control functions (toggle, select, deselect, clear).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const { selectedIds, isAllSelected, handleSelectRow, clearSelection } = useSelection(widgetId)
|
|
37
|
+
* ```
|
|
29
38
|
*/
|
|
30
39
|
export declare function useSelection(widgetId: string, options?: UseSelectionOptions): UseSelectionResult;
|
|
@@ -15,8 +15,16 @@ export interface UseSortResult<T> extends SortState {
|
|
|
15
15
|
clearSort: () => void;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Hook for managing table sorting
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Hook for managing table sorting with support for both local (client-side) and remote (server-side) modes.
|
|
19
|
+
* State is persisted in the widget store for the given widget ID.
|
|
20
|
+
*
|
|
21
|
+
* @param widgetId - The widget ID to persist sort state under.
|
|
22
|
+
* @param data - The data array to sort (for local mode).
|
|
23
|
+
* @returns Sort state, sorted data, and sort control functions.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const { sortedData, sortField, sortDirection, handleSort } = useSort(widgetId, data)
|
|
28
|
+
* ```
|
|
21
29
|
*/
|
|
22
30
|
export declare function useSort<T extends TableRow>(widgetId: string, data: T[]): UseSortResult<T>;
|
|
@@ -3,11 +3,15 @@ export { Row } from './components/row';
|
|
|
3
3
|
export { Pagination } from './components/pagination';
|
|
4
4
|
export { PaginationActions } from './components/pagination-actions';
|
|
5
5
|
export { Table } from './table-ui';
|
|
6
|
-
export { usePagination
|
|
6
|
+
export { usePagination } from './hooks/use-pagination';
|
|
7
|
+
export { useSort } from './hooks/use-sort';
|
|
8
|
+
export { useSelection } from './hooks/use-selection';
|
|
7
9
|
export { tableConfig, tableDownloadConfig } from './config';
|
|
8
10
|
export { TableSkeleton } from './skeleton';
|
|
9
11
|
export { sanitizeTableRow, sanitizeTableData } from './serializer';
|
|
10
12
|
export { getCellValue, compareValues, sortData, paginateData } from './helpers';
|
|
11
13
|
export { styles as tableStyles } from './style';
|
|
12
14
|
export type { TableUIProps, TableColumn, TableRow, TableWidgetData, TablePaginationState, SortDirection, SortState, Mode, TableWidgetConfig, TableWidgetState, TableDownloadConfig, TableProps, CellHeaderProps, RowProps, PaginationProps, PaginationActionsProps, } from './types';
|
|
13
|
-
export type { UsePaginationResult
|
|
15
|
+
export type { UsePaginationResult } from './hooks/use-pagination';
|
|
16
|
+
export type { UseSortResult } from './hooks/use-sort';
|
|
17
|
+
export type { UseSelectionOptions, UseSelectionResult, } from './hooks/use-selection';
|
|
@@ -75,7 +75,7 @@ export interface TableWidgetConfig {
|
|
|
75
75
|
/** Enable row selection with checkboxes */
|
|
76
76
|
selectable?: boolean;
|
|
77
77
|
/** Currently selected row IDs */
|
|
78
|
-
selected
|
|
78
|
+
selected?: (string | number)[];
|
|
79
79
|
/** Pagination and sort mode: local (client-side) or remote (server-side) */
|
|
80
80
|
mode: Mode;
|
|
81
81
|
/** Pagination configuration */
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { TimeseriesConfig, TimeseriesWidgetConfig
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { TimeseriesConfig, TimeseriesWidgetConfig } from './types';
|
|
2
|
+
export declare const timeseriesDownloadConfig: ({ refUI }: import('../loader').ConfigProps) => import('../actions').DownloadItem<import('../echart').EchartWidgetData>[];
|
|
3
|
+
/**
|
|
4
|
+
* Generates ECharts configuration for line and area chart widgets over time, with smooth curves, rotated axis labels, and CARTO qualitative color palette.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Timeseries configuration including data and theme.
|
|
7
|
+
* @returns Widget config with ECharts option object.
|
|
8
|
+
*/
|
|
5
9
|
export declare function timeseriesConfig(props: TimeseriesConfig): TimeseriesWidgetConfig;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared utilities for chart widget configuration
|
|
3
3
|
*/
|
|
4
|
+
export { defaultFormatter, defaultLabelFormatter } from '../formatter';
|
|
4
5
|
export { createChartWidgetConfig } from './config-factory';
|
|
5
6
|
export type { ChartWidgetBaseConfig, CreateChartWidgetConfigParams, } from './config-factory';
|
|
6
7
|
export { flattenObjectArrayToCSV, scatterplotDataToCSV } from './csv-modifiers';
|
|
7
|
-
export { buildLegendConfig, buildGridConfig, createTooltipPositioner, createAxisLabelFormatter, createTooltipFormatter, applyXAxisFormatter, applyYAxisFormatter, niceNum, } from './option-builders';
|
|
8
|
+
export { buildLegendConfig, buildGridConfig, createTooltipPositioner, createAxisLabelFormatter, createTooltipFormatter, applyXAxisFormatter, applyYAxisFormatter, niceNum, buildSeriesLabelConfig, buildHistogramSeriesLabelConfig, } from './option-builders';
|
|
9
|
+
export { createChartDownloadConfig } from './download-config';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@mui/material';
|
|
2
2
|
import { LegendComponentOption } from 'echarts';
|
|
3
|
-
import { CallbackDataParams, TopLevelFormatterParams } from '
|
|
3
|
+
import { CallbackDataParams, TopLevelFormatterParams } from 'echarts/types/dist/shared';
|
|
4
4
|
/**
|
|
5
5
|
* Shared EChart configuration builders for chart widgets
|
|
6
6
|
*/
|
|
@@ -14,10 +14,15 @@ export declare function niceNum(value: number): number;
|
|
|
14
14
|
/**
|
|
15
15
|
* Builds standard legend configuration for chart widgets
|
|
16
16
|
*
|
|
17
|
-
* @param
|
|
17
|
+
* @param params - Legend configuration parameters
|
|
18
|
+
* @param params.hasLegend - Whether to show the legend
|
|
19
|
+
* @param params.labelFormatter - Optional formatter for legend item names
|
|
18
20
|
* @returns Legend configuration object
|
|
19
21
|
*/
|
|
20
|
-
export declare function buildLegendConfig(hasLegend
|
|
22
|
+
export declare function buildLegendConfig({ hasLegend, labelFormatter, }: {
|
|
23
|
+
hasLegend: boolean;
|
|
24
|
+
labelFormatter?: (value: string | number) => string | number;
|
|
25
|
+
}): LegendComponentOption;
|
|
21
26
|
/**
|
|
22
27
|
* Builds standard grid configuration with legend-aware spacing
|
|
23
28
|
*
|
|
@@ -49,16 +54,16 @@ export declare function createTooltipPositioner(theme: Theme): (point: [number,
|
|
|
49
54
|
*/
|
|
50
55
|
export declare function createAxisLabelFormatter(formatter?: (value: number) => string): ((value: number) => string) | undefined;
|
|
51
56
|
/**
|
|
52
|
-
* Applies
|
|
53
|
-
*
|
|
57
|
+
* Applies labelFormatter to xAxis configuration
|
|
58
|
+
* Applies to any xAxis regardless of axis type (category, value, etc.)
|
|
54
59
|
*
|
|
55
60
|
* @param xAxis - Existing xAxis configuration
|
|
56
|
-
* @param
|
|
57
|
-
* @returns Updated xAxis configuration
|
|
61
|
+
* @param labelFormatter - Optional labelFormatter function from widget config
|
|
62
|
+
* @returns Updated xAxis configuration
|
|
58
63
|
*/
|
|
59
|
-
export declare function applyXAxisFormatter(xAxis: unknown, formatter?: (value: number) => string): {
|
|
64
|
+
export declare function applyXAxisFormatter(xAxis: unknown, formatter?: (value: string | number) => string | number): {
|
|
60
65
|
axisLabel: {
|
|
61
|
-
formatter: ((value: number) => string) | undefined;
|
|
66
|
+
formatter: ((value: string | number) => string) | undefined;
|
|
62
67
|
};
|
|
63
68
|
type?: string;
|
|
64
69
|
};
|
|
@@ -90,3 +95,30 @@ export declare function createTooltipFormatter(callback: (item: CallbackDataPara
|
|
|
90
95
|
marker: string;
|
|
91
96
|
value: string | number;
|
|
92
97
|
}): (params: TopLevelFormatterParams) => string;
|
|
98
|
+
/**
|
|
99
|
+
* Builds a series `label` config that applies formatter to the data value
|
|
100
|
+
* extracted from a dataset row using ECharts encode/dimensionNames.
|
|
101
|
+
*
|
|
102
|
+
* Does not set `show` — labels remain hidden by default per ECharts defaults.
|
|
103
|
+
*
|
|
104
|
+
* @param formatter - Optional numeric value formatter
|
|
105
|
+
* @param encodeKey - The encode dimension key to extract ('y' for vertical charts, 'x' for horizontal)
|
|
106
|
+
*/
|
|
107
|
+
export declare function buildSeriesLabelConfig(formatter?: (value: number) => string, encodeKey?: string): {
|
|
108
|
+
label: {
|
|
109
|
+
formatter: (params: CallbackDataParams) => string;
|
|
110
|
+
};
|
|
111
|
+
} | object;
|
|
112
|
+
/**
|
|
113
|
+
* Builds a series `label` config that applies formatter to a raw numeric value.
|
|
114
|
+
* Used by histogram where series data is number[] (not datasets).
|
|
115
|
+
*
|
|
116
|
+
* Does not set `show` — labels remain hidden by default per ECharts defaults.
|
|
117
|
+
*
|
|
118
|
+
* @param formatter - Optional numeric value formatter
|
|
119
|
+
*/
|
|
120
|
+
export declare function buildHistogramSeriesLabelConfig(formatter?: (value: number) => string): {
|
|
121
|
+
label: {
|
|
122
|
+
formatter: (params: CallbackDataParams) => string;
|
|
123
|
+
};
|
|
124
|
+
} | object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultFormatter, defaultLabelFormatter } from './formatter';
|
|
2
|
+
export { createChartWidgetConfig } from './chart-config';
|
|
3
|
+
export type { ChartWidgetBaseConfig, CreateChartWidgetConfigParams, } from './chart-config';
|
|
4
|
+
export { flattenObjectArrayToCSV, scatterplotDataToCSV } from './chart-config';
|
|
5
|
+
export { buildLegendConfig, buildGridConfig, createTooltipPositioner, createAxisLabelFormatter, createTooltipFormatter, applyXAxisFormatter, applyYAxisFormatter, niceNum, } from './chart-config';
|
|
6
|
+
export { baseSkeletonStyles } from './skeleton';
|
|
7
|
+
export { createChartDownloadConfig } from './chart-config';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { WrapperActionsProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders action buttons in the widget wrapper header. Each action click event is stopped from propagating to the accordion.
|
|
4
|
+
*/
|
|
2
5
|
export declare function Actions({ actions }: WrapperActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { WrapperOptionsProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a dropdown options menu in the widget wrapper header, triggered by a vertical ellipsis icon button.
|
|
4
|
+
*/
|
|
2
5
|
export declare function Options({ labels, options, }: WrapperOptionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { WrapperOptionsProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the widget title text inside the wrapper header with smart tooltip support for truncated titles.
|
|
5
|
+
*/
|
|
3
6
|
export declare function Title({ label, children, }: {
|
|
4
7
|
children: ReactNode;
|
|
5
8
|
label?: NonNullable<WrapperOptionsProps['labels']>['title'];
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { WrapperUIProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Presentational wrapper component that renders the widget accordion UI with title, actions, options menu, and loading indicator. For uncontrolled usage without automatic widget store synchronization, use this instead of WidgetWrapper.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <WrapperUI
|
|
8
|
+
* id="my-widget"
|
|
9
|
+
* actions={[<Download key="download" id="my-widget" />]}
|
|
10
|
+
* onChangeCollapsed={(e, collapsed) => console.log(collapsed)}
|
|
11
|
+
* >
|
|
12
|
+
* <div>Content</div>
|
|
13
|
+
* </WrapperUI>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
2
16
|
export declare function WrapperUI({ children, id, actions, sx, labels, options, onChangeCollapsed, }: WrapperUIProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { WrapperProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Container component providing a collapsible header with title, action buttons, and options menu for widgets. Syncs collapse, disabled, and title state with the widget store.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <WidgetWrapper
|
|
8
|
+
* id="my-widget"
|
|
9
|
+
* title="Sales Overview"
|
|
10
|
+
* actions={[<Download key="download" id="my-widget" items={downloads} />]}
|
|
11
|
+
* >
|
|
12
|
+
* {children}
|
|
13
|
+
* </WidgetWrapper>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
2
16
|
export declare function WidgetWrapper({ id, title, defaultCollapsed, disabled, sx, actions, options, labels, children, onChangeCollapsed, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
|