@carto/ps-react-ui 5.0.0-widgets.9 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions-CGJD6q0t.js +1318 -0
- package/dist/actions-CGJD6q0t.js.map +1 -0
- package/dist/actions-yPZwFxSZ.js +1004 -0
- package/dist/actions-yPZwFxSZ.js.map +1 -0
- package/dist/category-DGUDabsi.js +829 -0
- package/dist/category-DGUDabsi.js.map +1 -0
- package/dist/chart-config-B_fdIcD3.js +108 -0
- package/dist/chart-config-B_fdIcD3.js.map +1 -0
- package/dist/chat.js +1642 -0
- package/dist/chat.js.map +1 -0
- package/dist/cjs-CBrZjPCj.js +75 -0
- package/dist/cjs-CBrZjPCj.js.map +1 -0
- package/dist/components-FED-ArwH.js +4053 -0
- package/dist/components-FED-ArwH.js.map +1 -0
- package/dist/components.js +5 -1351
- package/dist/copy-button-TTlZONkX.js +34 -0
- package/dist/copy-button-TTlZONkX.js.map +1 -0
- package/dist/csv-modifiers-D6HGC24b.js +26 -0
- package/dist/csv-modifiers-D6HGC24b.js.map +1 -0
- package/dist/download-DdaK3qgC.js +232 -0
- package/dist/download-DdaK3qgC.js.map +1 -0
- package/dist/echart-BkaV3V5G.js +133 -0
- package/dist/echart-BkaV3V5G.js.map +1 -0
- package/dist/echart-DeBgdOtX.js +250 -0
- package/dist/echart-DeBgdOtX.js.map +1 -0
- package/dist/formatter-wVO81tYk.js +6 -0
- package/dist/formatter-wVO81tYk.js.map +1 -0
- package/dist/formula-YfZmmuYX.js +190 -0
- package/dist/formula-YfZmmuYX.js.map +1 -0
- package/dist/formula-noJzQwKo.js +285 -0
- package/dist/formula-noJzQwKo.js.map +1 -0
- package/dist/hooks-zf5gKZYq.js +22 -0
- package/dist/hooks-zf5gKZYq.js.map +1 -0
- package/dist/legend/stores.js +2 -0
- package/dist/legend.js +2284 -0
- package/dist/legend.js.map +1 -0
- package/dist/markdown-2dfL6Cmb.js +165 -0
- package/dist/markdown-2dfL6Cmb.js.map +1 -0
- package/dist/markdown-content-BWUqwx9F.js +8776 -0
- package/dist/markdown-content-BWUqwx9F.js.map +1 -0
- package/dist/range-BCMAl5xf.js +277 -0
- package/dist/range-BCMAl5xf.js.map +1 -0
- package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
- package/dist/row-CvVGBuy_.js +35 -0
- package/dist/row-CvVGBuy_.js.map +1 -0
- package/dist/shared-resize-observer-BEiP2rQt.js +157 -0
- package/dist/shared-resize-observer-BEiP2rQt.js.map +1 -0
- package/dist/smart-tooltip-CwGHCqab.js +34 -0
- package/dist/smart-tooltip-CwGHCqab.js.map +1 -0
- package/dist/spread-Ccpg9fi0.js +149 -0
- package/dist/spread-Ccpg9fi0.js.map +1 -0
- package/dist/stores-mad-9yFn.js +369 -0
- package/dist/stores-mad-9yFn.js.map +1 -0
- package/dist/stores-tiFePP0A.js +243 -0
- package/dist/stores-tiFePP0A.js.map +1 -0
- package/dist/styles-Y-qGBELO.js +13 -0
- package/dist/styles-Y-qGBELO.js.map +1 -0
- package/dist/table-Bx9Uj3U0.js +440 -0
- package/dist/table-Bx9Uj3U0.js.map +1 -0
- package/dist/tooltip-DJUGNZxY.js +23 -0
- package/dist/tooltip-DJUGNZxY.js.map +1 -0
- package/dist/types/chat/bubbles/chat-agent-message-markdown.d.ts +12 -0
- package/dist/types/chat/bubbles/chat-agent-message.d.ts +9 -0
- package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
- package/dist/types/chat/bubbles/index.d.ts +5 -0
- package/dist/types/chat/bubbles/styles.d.ts +88 -0
- package/dist/types/chat/const.d.ts +4 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -0
- package/dist/types/chat/containers/chat-footer.d.ts +2 -0
- package/dist/types/chat/containers/chat-header.d.ts +2 -0
- package/dist/types/chat/containers/chat-starter.d.ts +2 -0
- package/dist/types/chat/containers/index.d.ts +4 -0
- package/dist/types/chat/containers/styles.d.ts +160 -0
- package/dist/types/chat/feedback/chat-actions-container.d.ts +3 -0
- package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
- package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
- package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
- package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
- package/dist/types/chat/feedback/index.d.ts +8 -0
- package/dist/types/chat/feedback/styles.d.ts +212 -0
- package/dist/types/chat/index.d.ts +21 -0
- package/dist/types/chat/types.d.ts +214 -0
- package/dist/types/chat/use-typewriter.d.ts +32 -0
- package/dist/types/components/basemaps/basemaps.d.ts +21 -1
- package/dist/types/components/basemaps/const.d.ts +1 -1
- package/dist/types/components/basemaps/group-wrapper.d.ts +1 -1
- package/dist/types/components/basemaps/group.d.ts +2 -2
- package/dist/types/components/basemaps/header.d.ts +2 -2
- package/dist/types/components/common-types.d.ts +49 -0
- package/dist/types/components/copy-button/copy-button.d.ts +2 -0
- package/dist/types/components/copy-button/types.d.ts +6 -0
- package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +12 -1
- package/dist/types/components/index.d.ts +37 -20
- package/dist/types/components/lasso-tool/chip.d.ts +2 -2
- package/dist/types/components/lasso-tool/const.d.ts +2 -2
- package/dist/types/components/lasso-tool/edit-confirm-toolbar.d.ts +26 -0
- package/dist/types/components/lasso-tool/geometry-toolbar.d.ts +49 -0
- package/dist/types/components/lasso-tool/icons.d.ts +22 -5
- package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +36 -3
- package/dist/types/components/lasso-tool/lasso-tool.d.ts +34 -9
- package/dist/types/components/lasso-tool/layer-filters.d.ts +10 -0
- package/dist/types/components/lasso-tool/message.d.ts +7 -0
- package/dist/types/components/lasso-tool/options-sections.d.ts +28 -0
- package/dist/types/components/lasso-tool/styles.d.ts +24 -2
- package/dist/types/components/lasso-tool/toolbar/actions/accept-action.d.ts +13 -0
- package/dist/types/components/lasso-tool/toolbar/actions/action-menu.d.ts +28 -0
- package/dist/types/components/lasso-tool/toolbar/actions/cancel-action.d.ts +13 -0
- package/dist/types/components/lasso-tool/toolbar/actions/color-action.d.ts +44 -0
- package/dist/types/components/lasso-tool/toolbar/actions/delete-action.d.ts +11 -0
- package/dist/types/components/lasso-tool/toolbar/actions/duplicate-action.d.ts +11 -0
- package/dist/types/components/lasso-tool/toolbar/actions/edit-geometry-action.d.ts +13 -0
- package/dist/types/components/lasso-tool/toolbar/actions/edit-properties-action.d.ts +60 -0
- package/dist/types/components/lasso-tool/toolbar/actions/fill-action.d.ts +26 -0
- package/dist/types/components/lasso-tool/toolbar/actions/intersect-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/actions/label-action.d.ts +69 -0
- package/dist/types/components/lasso-tool/toolbar/actions/lock-action.d.ts +17 -0
- package/dist/types/components/lasso-tool/toolbar/actions/redo-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/actions/split-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/actions/stroke-action.d.ts +27 -0
- package/dist/types/components/lasso-tool/toolbar/actions/subtract-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/actions/toggle-type-action.d.ts +19 -0
- package/dist/types/components/lasso-tool/toolbar/actions/undo-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/actions/union-action.d.ts +14 -0
- package/dist/types/components/lasso-tool/toolbar/button.d.ts +24 -0
- package/dist/types/components/lasso-tool/toolbar/connected.d.ts +55 -0
- package/dist/types/components/lasso-tool/toolbar/context.d.ts +31 -0
- package/dist/types/components/lasso-tool/toolbar/index.d.ts +41 -0
- package/dist/types/components/lasso-tool/toolbar/styles.d.ts +26 -0
- package/dist/types/components/lasso-tool/toolbar/toolbar.d.ts +30 -0
- package/dist/types/components/lasso-tool/tools-context.d.ts +12 -0
- package/dist/types/components/lasso-tool/types.d.ts +284 -10
- package/dist/types/components/lasso-tool/undo-redo.d.ts +25 -0
- package/dist/types/components/list-data/list-data-skeleton.d.ts +1 -1
- package/dist/types/components/list-data/list-data.d.ts +17 -1
- package/dist/types/components/measurement-tools/const.d.ts +2 -2
- package/dist/types/components/measurement-tools/icons.d.ts +3 -3
- package/dist/types/components/measurement-tools/measurement-tools.d.ts +21 -1
- package/dist/types/components/measurement-tools/styles.d.ts +14 -4
- package/dist/types/components/measurement-tools/types.d.ts +1 -1
- package/dist/types/components/no-data-alert/no-data-alert.d.ts +1 -1
- package/dist/types/components/responsive-drawer/responsive-drawer.d.ts +38 -6
- package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +18 -1
- package/dist/types/components/tooltip/tooltip.d.ts +14 -1
- package/dist/types/components/types.d.ts +1 -1
- package/dist/types/components/zoom-controls/zoom-controls.d.ts +17 -1
- package/dist/types/hooks/index.d.ts +1 -2
- package/dist/types/hooks/use-widget-ref.d.ts +10 -6
- package/dist/types/legend/components/a11y.d.ts +6 -0
- package/dist/types/legend/components/contexts.d.ts +38 -0
- package/dist/types/legend/components/icons.d.ts +12 -0
- package/dist/types/legend/components/index.d.ts +26 -0
- package/dist/types/legend/components/legend-actions/legend-actions.d.ts +25 -0
- package/dist/types/legend/components/legend-actions/styles.d.ts +7 -0
- package/dist/types/legend/components/legend-category/legend-category-ui.d.ts +13 -0
- package/dist/types/legend/components/legend-category/styles.d.ts +52 -0
- package/dist/types/legend/components/legend-config-select/legend-config-select.d.ts +14 -0
- package/dist/types/legend/components/legend-config-select/styles.d.ts +44 -0
- package/dist/types/legend/components/legend-group/legend-group.d.ts +12 -0
- package/dist/types/legend/components/legend-group/styles.d.ts +129 -0
- package/dist/types/legend/components/legend-group-menu/legend-group-menu-items.d.ts +28 -0
- package/dist/types/legend/components/legend-group-menu/legend-group-menu.d.ts +11 -0
- package/dist/types/legend/components/legend-icon/legend-icon-ui.d.ts +10 -0
- package/dist/types/legend/components/legend-icon/styles.d.ts +52 -0
- package/dist/types/legend/components/legend-item/legend-item-ui.d.ts +14 -0
- package/dist/types/legend/components/legend-item/legend-item.d.ts +10 -0
- package/dist/types/{widgets/root/style.d.ts → legend/components/legend-item/styles.d.ts} +2 -3
- package/dist/types/legend/components/legend-opacity/legend-opacity.d.ts +22 -0
- package/dist/types/legend/components/legend-opacity/styles.d.ts +28 -0
- package/dist/types/legend/components/legend-overflow-menu/legend-overflow-menu.d.ts +12 -0
- package/dist/types/legend/components/legend-panel-menu/legend-panel-menu.d.ts +11 -0
- package/dist/types/legend/components/legend-proportion/legend-proportion-ui.d.ts +16 -0
- package/dist/types/legend/components/legend-proportion/styles.d.ts +37 -0
- package/dist/types/legend/components/legend-ramp/legend-ramp-ui.d.ts +20 -0
- package/dist/types/legend/components/legend-ramp/styles.d.ts +53 -0
- package/dist/types/legend/components/legend-row/legend-row.d.ts +16 -0
- package/dist/types/legend/components/legend-row/styles.d.ts +149 -0
- package/dist/types/legend/components/legend-row-menu/legend-row-menu-items.d.ts +12 -0
- package/dist/types/legend/components/legend-row-menu/legend-row-menu.d.ts +12 -0
- package/dist/types/legend/components/legend-row-menu/legend-zoom-to.d.ts +10 -0
- package/dist/types/legend/components/legend-sortable/contexts.d.ts +7 -0
- package/dist/types/legend/components/legend-sortable/legend-sortable.d.ts +11 -0
- package/dist/types/legend/components/legend-sortable/sortable-entity.d.ts +27 -0
- package/dist/types/legend/components/legend-sortable/sortable-ids.d.ts +6 -0
- package/dist/types/legend/components/legend-sortable/styles.d.ts +55 -0
- package/dist/types/legend/components/legend-swatch/legend-swatch.d.ts +26 -0
- package/dist/types/legend/components/legend-visibility-toggle/legend-visibility-toggle.d.ts +35 -0
- package/dist/types/legend/components/legend-visible-layers/legend-visible-layers.d.ts +7 -0
- package/dist/types/legend/components/legend-visible-layers/styles.d.ts +48 -0
- package/dist/types/legend/components/run-async-menu-action.d.ts +7 -0
- package/dist/types/legend/index.d.ts +135 -0
- package/dist/types/legend/provider/index.d.ts +6 -0
- package/dist/types/legend/provider/labels.d.ts +48 -0
- package/dist/types/legend/provider/legend-config-context.d.ts +7 -0
- package/dist/types/legend/provider/legend-provider.d.ts +38 -0
- package/dist/types/legend/stores/index.d.ts +5 -0
- package/dist/types/legend/stores/legend-context.d.ts +4 -0
- package/dist/types/legend/stores/legend-store-registry.d.ts +39 -0
- package/dist/types/legend/stores/selectors.d.ts +64 -0
- package/dist/types/legend/stores/types.d.ts +294 -0
- 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/style.d.ts +21 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +73 -0
- package/dist/types/widgets/actions/change-column/change-column-icon.d.ts +1 -1
- package/dist/types/widgets/actions/change-column/change-column.d.ts +6 -2
- package/dist/types/widgets/actions/change-column/sortable-column-item.d.ts +2 -2
- package/dist/types/widgets/actions/download/download.d.ts +13 -2
- package/dist/types/widgets/actions/download/exports.d.ts +16 -1
- package/dist/types/widgets/actions/download/types.d.ts +1 -1
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +15 -2
- package/dist/types/widgets/actions/fullscreen/types.d.ts +3 -2
- package/dist/types/widgets/actions/index.d.ts +20 -18
- package/dist/types/widgets/actions/lock-selection/lock-selection.d.ts +2 -2
- package/dist/types/widgets/actions/lock-selection/types.d.ts +10 -10
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +10 -4
- package/dist/types/widgets/actions/relative-data/types.d.ts +3 -1
- package/dist/types/widgets/actions/relative-data/utils.d.ts +1 -1
- package/dist/types/widgets/actions/searcher/searcher-toggle.d.ts +2 -2
- package/dist/types/widgets/actions/searcher/searcher.d.ts +2 -2
- package/dist/types/widgets/actions/searcher/types.d.ts +2 -2
- package/dist/types/widgets/actions/stack-toggle/grouped-bar-chart-icon.d.ts +1 -1
- package/dist/types/widgets/actions/stack-toggle/stack-toggle.d.ts +5 -4
- package/dist/types/widgets/actions/stack-toggle/types.d.ts +1 -1
- package/dist/types/widgets/actions/zoom-toggle/types.d.ts +1 -1
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +10 -2
- package/dist/types/widgets/bar/config.d.ts +8 -4
- package/dist/types/widgets/bar/index.d.ts +3 -3
- package/dist/types/widgets/bar/skeleton.d.ts +1 -1
- package/dist/types/widgets/bar/types.d.ts +3 -3
- package/dist/types/widgets/category/category-ui.d.ts +5 -2
- package/dist/types/widgets/category/components/category-bar.d.ts +4 -1
- package/dist/types/widgets/category/components/category-legend.d.ts +5 -2
- package/dist/types/widgets/category/components/category-row-multi.d.ts +6 -2
- package/dist/types/widgets/category/components/category-row-other.d.ts +4 -1
- package/dist/types/widgets/category/components/category-row-single.d.ts +6 -2
- package/dist/types/widgets/category/config.d.ts +16 -12
- package/dist/types/widgets/category/index.d.ts +14 -6
- package/dist/types/widgets/category/skeleton.d.ts +1 -1
- package/dist/types/widgets/category/style.d.ts +1 -1
- package/dist/types/widgets/category/types.d.ts +4 -3
- package/dist/types/widgets/echart/echart-ui.d.ts +9 -2
- package/dist/types/widgets/echart/echart.d.ts +8 -2
- package/dist/types/widgets/echart/index.d.ts +5 -5
- package/dist/types/widgets/echart/options.d.ts +8 -1
- package/dist/types/widgets/echart/shared-resize-observer.d.ts +12 -0
- package/dist/types/widgets/echart/types.d.ts +7 -2
- package/dist/types/widgets/echart/utils.d.ts +57 -9
- package/dist/types/widgets/error/error.d.ts +12 -2
- package/dist/types/widgets/error/index.d.ts +2 -2
- package/dist/types/widgets/error/types.d.ts +9 -1
- package/dist/types/widgets/formula/components/item.d.ts +5 -2
- package/dist/types/widgets/formula/components/prefix.d.ts +5 -2
- package/dist/types/widgets/formula/components/row.d.ts +5 -2
- package/dist/types/widgets/formula/components/series.d.ts +5 -2
- package/dist/types/widgets/formula/components/suffix.d.ts +5 -2
- package/dist/types/widgets/formula/components/value.d.ts +5 -2
- package/dist/types/widgets/formula/config.d.ts +13 -2
- package/dist/types/widgets/formula/formula-ui.d.ts +5 -2
- package/dist/types/widgets/formula/index.d.ts +11 -11
- package/dist/types/widgets/formula/serializer.d.ts +1 -1
- package/dist/types/widgets/formula/skeleton.d.ts +1 -1
- package/dist/types/widgets/formula/types.d.ts +3 -3
- package/dist/types/widgets/histogram/config.d.ts +20 -4
- package/dist/types/widgets/histogram/index.d.ts +4 -3
- package/dist/types/widgets/histogram/skeleton.d.ts +1 -1
- package/dist/types/widgets/histogram/types.d.ts +8 -5
- package/dist/types/widgets/loader/index.d.ts +3 -0
- package/dist/types/widgets/loader/loader.d.ts +24 -0
- package/dist/types/widgets/loader/types.d.ts +9 -0
- package/dist/types/widgets/loader/utils.d.ts +35 -0
- package/dist/types/widgets/markdown/config.d.ts +12 -2
- package/dist/types/widgets/markdown/index.d.ts +5 -5
- package/dist/types/widgets/markdown/markdown-ui.d.ts +9 -2
- package/dist/types/widgets/markdown/markdown.d.ts +5 -2
- package/dist/types/widgets/markdown/skeleton.d.ts +1 -1
- package/dist/types/widgets/markdown/types.d.ts +3 -3
- package/dist/types/widgets/no-data/index.d.ts +2 -2
- package/dist/types/widgets/no-data/no-data.d.ts +5 -4
- package/dist/types/widgets/no-data/types.d.ts +6 -2
- package/dist/types/widgets/note/index.d.ts +2 -2
- package/dist/types/widgets/note/note.d.ts +12 -2
- package/dist/types/widgets/note/types.d.ts +1 -1
- package/dist/types/widgets/pie/config.d.ts +8 -4
- package/dist/types/widgets/pie/index.d.ts +3 -3
- package/dist/types/widgets/pie/skeleton.d.ts +1 -1
- package/dist/types/widgets/pie/types.d.ts +3 -3
- package/dist/types/widgets/range/components/range-item.d.ts +5 -2
- package/dist/types/widgets/range/config.d.ts +6 -5
- package/dist/types/widgets/range/index.d.ts +6 -6
- package/dist/types/widgets/range/range-ui.d.ts +5 -2
- package/dist/types/widgets/range/serializer.d.ts +1 -1
- package/dist/types/widgets/range/skeleton.d.ts +1 -1
- package/dist/types/widgets/range/types.d.ts +3 -3
- package/dist/types/widgets/scatterplot/config.d.ts +8 -4
- package/dist/types/widgets/scatterplot/index.d.ts +3 -3
- package/dist/types/widgets/scatterplot/skeleton.d.ts +1 -1
- package/dist/types/widgets/scatterplot/types.d.ts +3 -3
- package/dist/types/widgets/selection-summary/index.d.ts +2 -2
- package/dist/types/widgets/selection-summary/selection-summary.d.ts +13 -2
- package/dist/types/widgets/skeleton-loader/index.d.ts +2 -2
- package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +12 -2
- package/dist/types/widgets/skeleton-loader/types.d.ts +1 -1
- package/dist/types/widgets/spread/components/max-value.d.ts +5 -2
- package/dist/types/widgets/spread/components/min-value.d.ts +5 -2
- package/dist/types/widgets/spread/components/separator.d.ts +5 -2
- package/dist/types/widgets/spread/config.d.ts +14 -8
- package/dist/types/widgets/spread/index.d.ts +9 -9
- package/dist/types/widgets/spread/skeleton.d.ts +1 -1
- package/dist/types/widgets/spread/spread-ui.d.ts +5 -2
- package/dist/types/widgets/spread/types.d.ts +4 -4
- package/dist/types/widgets/stores/index.d.ts +3 -2
- package/dist/types/widgets/stores/types.d.ts +31 -10
- package/dist/types/widgets/stores/use-widget-selector.d.ts +35 -0
- package/dist/types/widgets/stores/widget-store.d.ts +48 -27
- package/dist/types/widgets/subheader/index.d.ts +2 -2
- package/dist/types/widgets/subheader/subheader.d.ts +13 -2
- package/dist/types/widgets/table/components/cell-header.d.ts +2 -2
- package/dist/types/widgets/table/components/cell.d.ts +4 -2
- package/dist/types/widgets/table/components/pagination-actions.d.ts +2 -2
- package/dist/types/widgets/table/components/pagination.d.ts +2 -2
- package/dist/types/widgets/table/components/row.d.ts +2 -2
- package/dist/types/widgets/table/config.d.ts +10 -6
- package/dist/types/widgets/table/hooks/use-pagination.d.ts +12 -4
- package/dist/types/widgets/table/hooks/use-selection.d.ts +12 -3
- package/dist/types/widgets/table/hooks/use-sort.d.ts +12 -4
- package/dist/types/widgets/table/index.d.ts +17 -13
- package/dist/types/widgets/table/serializer.d.ts +1 -1
- package/dist/types/widgets/table/skeleton.d.ts +1 -1
- package/dist/types/widgets/table/table-ui.d.ts +8 -8
- package/dist/types/widgets/table/types.d.ts +5 -5
- package/dist/types/widgets/timeseries/config.d.ts +8 -4
- package/dist/types/widgets/timeseries/index.d.ts +3 -3
- package/dist/types/widgets/timeseries/skeleton.d.ts +1 -1
- package/dist/types/widgets/timeseries/types.d.ts +3 -3
- package/dist/types/widgets/toolbar-actions/index.d.ts +2 -2
- package/dist/types/widgets/toolbar-actions/toolbar-actions.d.ts +13 -4
- package/dist/types/widgets/toolbar-actions/types.d.ts +10 -3
- package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +1 -1
- package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
- package/dist/types/widgets/utils/chart-config/index.d.ts +9 -0
- package/dist/types/widgets/utils/chart-config/option-builders.d.ts +142 -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/utils/skeleton/index.d.ts +4 -0
- package/dist/types/widgets/wrapper/components/actions.d.ts +5 -2
- package/dist/types/widgets/wrapper/components/options.d.ts +5 -2
- package/dist/types/widgets/wrapper/components/title.d.ts +5 -2
- package/dist/types/widgets/wrapper/index.d.ts +6 -6
- package/dist/types/widgets/wrapper/types.d.ts +1 -1
- package/dist/types/widgets/wrapper/wrapper-ui.d.ts +16 -2
- package/dist/types/widgets/wrapper/wrapper.d.ts +16 -2
- 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 +6 -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 +59 -0
- package/dist/types/widgets-v2/actions/change-column/types.d.ts +10 -0
- package/dist/types/widgets-v2/actions/download/constants.d.ts +12 -0
- package/dist/types/widgets-v2/actions/download/csv-item.d.ts +38 -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 +18 -0
- package/dist/types/widgets-v2/actions/download/index.d.ts +8 -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 +10 -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 +57 -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/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/show-all/index.d.ts +2 -0
- package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
- package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -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/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/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/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 +88 -0
- package/dist/types/widgets-v2/category/category.d.ts +55 -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 +34 -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 +26 -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 +43 -0
- package/dist/types/widgets-v2/category/download.d.ts +16 -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 +193 -0
- package/dist/types/widgets-v2/category/types.d.ts +55 -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/edge-label-clamp.d.ts +57 -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/style.d.ts +6 -0
- package/dist/types/widgets-v2/echart/use-chart-selection.d.ts +57 -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/index.d.ts +5 -0
- package/dist/types/widgets-v2/histogram/options.d.ts +42 -0
- package/dist/types/widgets-v2/histogram/skeleton.d.ts +9 -0
- package/dist/types/widgets-v2/histogram/transforms.d.ts +28 -0
- package/dist/types/widgets-v2/histogram/types.d.ts +60 -0
- package/dist/types/widgets-v2/index.d.ts +109 -0
- package/dist/types/widgets-v2/markdown/download.d.ts +16 -0
- package/dist/types/widgets-v2/markdown/index.d.ts +6 -0
- package/dist/types/widgets-v2/markdown/markdown-content.d.ts +40 -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/index.d.ts +4 -0
- package/dist/types/widgets-v2/pie/options.d.ts +35 -0
- package/dist/types/widgets-v2/pie/skeleton.d.ts +13 -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/index.d.ts +5 -0
- package/dist/types/widgets-v2/scatterplot/options.d.ts +42 -0
- package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +12 -0
- package/dist/types/widgets-v2/scatterplot/transforms.d.ts +26 -0
- package/dist/types/widgets-v2/scatterplot/types.d.ts +54 -0
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +11 -0
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +29 -0
- package/dist/types/widgets-v2/selection-summary/style.d.ts +38 -0
- package/dist/types/widgets-v2/spread/band.d.ts +37 -0
- package/dist/types/widgets-v2/spread/download.d.ts +15 -0
- package/dist/types/widgets-v2/spread/index.d.ts +7 -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/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/transforms.d.ts +4 -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/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/helpers.d.ts +32 -0
- package/dist/types/widgets-v2/table/index.d.ts +8 -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/transforms.d.ts +15 -0
- package/dist/types/widgets-v2/table/types.d.ts +48 -0
- package/dist/types/widgets-v2/timeseries/download.d.ts +17 -0
- package/dist/types/widgets-v2/timeseries/index.d.ts +5 -0
- package/dist/types/widgets-v2/timeseries/options.d.ts +39 -0
- package/dist/types/widgets-v2/timeseries/skeleton.d.ts +8 -0
- package/dist/types/widgets-v2/timeseries/transforms.d.ts +10 -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/resolve-theme-color.d.ts +18 -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 +103 -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 +56 -0
- package/dist/use-widget-selector-VSPhfhNm.js +12 -0
- package/dist/use-widget-selector-VSPhfhNm.js.map +1 -0
- package/dist/utils-Dr6gf3vD.js +58 -0
- package/dist/utils-Dr6gf3vD.js.map +1 -0
- package/dist/widget-store-BFPKYm4R.js +187 -0
- package/dist/widget-store-BFPKYm4R.js.map +1 -0
- package/dist/widgets/actions.js +2 -837
- package/dist/widgets/bar.js +183 -186
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +438 -455
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +3 -123
- package/dist/widgets/error.js +30 -5
- package/dist/widgets/error.js.map +1 -1
- package/dist/widgets/formula.js +3 -125
- package/dist/widgets/histogram.js +185 -167
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +66 -0
- package/dist/widgets/loader.js.map +1 -0
- package/dist/widgets/markdown.js +142 -121
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/no-data.js +55 -5
- package/dist/widgets/no-data.js.map +1 -1
- package/dist/widgets/note.js +126 -4
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +244 -208
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +226 -210
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +219 -216
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/selection-summary.js +39 -38
- package/dist/widgets/selection-summary.js.map +1 -1
- package/dist/widgets/skeleton-loader.js +23 -23
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +150 -159
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +3 -5
- package/dist/widgets/subheader.js +49 -50
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +573 -653
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +175 -170
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/toolbar-actions.js +144 -6105
- package/dist/widgets/toolbar-actions.js.map +1 -1
- package/dist/widgets/utils.js +18 -0
- package/dist/widgets/utils.js.map +1 -0
- package/dist/widgets/wrapper.js +265 -287
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +4 -0
- package/dist/widgets-v2/bar.js +260 -0
- package/dist/widgets-v2/bar.js.map +1 -0
- package/dist/widgets-v2/category.js +2 -0
- package/dist/widgets-v2/echart.js +2 -0
- package/dist/widgets-v2/formula.js +2 -0
- package/dist/widgets-v2/histogram.js +297 -0
- package/dist/widgets-v2/histogram.js.map +1 -0
- package/dist/widgets-v2/markdown.js +3 -0
- package/dist/widgets-v2/pie.js +374 -0
- package/dist/widgets-v2/pie.js.map +1 -0
- package/dist/widgets-v2/range.js +2 -0
- package/dist/widgets-v2/scatterplot.js +330 -0
- package/dist/widgets-v2/scatterplot.js.map +1 -0
- package/dist/widgets-v2/spread.js +2 -0
- package/dist/widgets-v2/stores.js +2 -0
- package/dist/widgets-v2/table.js +2 -0
- package/dist/widgets-v2/timeseries.js +294 -0
- package/dist/widgets-v2/timeseries.js.map +1 -0
- package/dist/widgets-v2/utils.js +2 -0
- package/dist/widgets-v2.js +964 -0
- package/dist/widgets-v2.js.map +1 -0
- package/dist/zoom-toggle-IsF8BnAp.js +163 -0
- package/dist/zoom-toggle-IsF8BnAp.js.map +1 -0
- package/package.json +109 -17
- package/src/chat/bubbles/chat-agent-message-markdown.test.tsx +38 -0
- package/src/chat/bubbles/chat-agent-message-markdown.tsx +34 -0
- package/src/chat/bubbles/chat-agent-message.test.tsx +42 -0
- package/src/chat/bubbles/chat-agent-message.tsx +31 -0
- package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
- package/src/chat/bubbles/chat-error-message.tsx +47 -0
- package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
- package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.tsx +27 -0
- package/src/chat/bubbles/index.ts +5 -0
- package/src/chat/bubbles/styles.ts +171 -0
- package/src/chat/const.ts +4 -0
- package/src/chat/containers/chat-content.test.tsx +269 -0
- package/src/chat/containers/chat-content.tsx +145 -0
- package/src/chat/containers/chat-footer.test.tsx +93 -0
- package/src/chat/containers/chat-footer.tsx +166 -0
- package/src/chat/containers/chat-header.test.tsx +28 -0
- package/src/chat/containers/chat-header.tsx +29 -0
- package/src/chat/containers/chat-starter.test.tsx +32 -0
- package/src/chat/containers/chat-starter.tsx +75 -0
- package/src/chat/containers/index.ts +4 -0
- package/src/chat/containers/styles.ts +187 -0
- package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
- package/src/chat/feedback/chat-actions-container.tsx +10 -0
- package/src/chat/feedback/chat-loader.test.tsx +10 -0
- package/src/chat/feedback/chat-loader.tsx +31 -0
- package/src/chat/feedback/chat-rating-action.tsx +43 -0
- package/src/chat/feedback/chat-thinking.test.tsx +15 -0
- package/src/chat/feedback/chat-thinking.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
- package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
- package/src/chat/feedback/chat-tool-group.tsx +156 -0
- package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
- package/src/chat/feedback/chat-tool-trace.tsx +192 -0
- package/src/chat/feedback/get-tool-label.test.tsx +91 -0
- package/src/chat/feedback/get-tool-label.ts +13 -0
- package/src/chat/feedback/index.ts +8 -0
- package/src/chat/feedback/styles.ts +239 -0
- package/src/chat/index.ts +62 -0
- package/src/chat/types.ts +247 -0
- package/src/chat/use-typewriter.test.tsx +38 -0
- package/src/chat/use-typewriter.ts +90 -0
- package/src/components/basemaps/basemaps.test.tsx +196 -0
- package/src/components/basemaps/basemaps.tsx +150 -0
- package/src/components/basemaps/const.ts +13 -0
- package/src/components/basemaps/group-wrapper.test.tsx +38 -0
- package/src/components/basemaps/group-wrapper.tsx +28 -0
- package/src/components/basemaps/group.test.tsx +52 -0
- package/src/components/basemaps/group.tsx +42 -0
- package/src/components/basemaps/header.test.tsx +54 -0
- package/src/components/basemaps/header.tsx +36 -0
- package/src/components/basemaps/styles.ts +76 -0
- package/src/components/basemaps/types.ts +30 -0
- package/src/components/common-types.ts +1 -0
- package/src/components/copy-button/copy-button.test.tsx +41 -0
- package/src/components/copy-button/copy-button.tsx +31 -0
- package/src/components/copy-button/types.ts +10 -0
- package/src/components/geolocation-controls/const.ts +6 -0
- package/src/components/geolocation-controls/geolocation-controls.test.tsx +148 -0
- package/src/components/geolocation-controls/geolocation-controls.tsx +126 -0
- package/src/components/geolocation-controls/types.ts +17 -0
- package/src/components/index.ts +163 -0
- package/src/components/lasso-tool/chip.test.tsx +257 -0
- package/src/components/lasso-tool/chip.tsx +66 -0
- package/src/components/lasso-tool/const.tsx +94 -0
- package/src/components/lasso-tool/edit-confirm-toolbar.test.tsx +67 -0
- package/src/components/lasso-tool/edit-confirm-toolbar.tsx +48 -0
- package/src/components/lasso-tool/geometry-toolbar.test.tsx +804 -0
- package/src/components/lasso-tool/geometry-toolbar.tsx +158 -0
- package/src/components/lasso-tool/icons.tsx +193 -0
- package/src/components/lasso-tool/lasso-tool-inline.test.tsx +759 -0
- package/src/components/lasso-tool/lasso-tool-inline.tsx +508 -0
- package/src/components/lasso-tool/lasso-tool.test.tsx +700 -0
- package/src/components/lasso-tool/lasso-tool.tsx +673 -0
- package/src/components/lasso-tool/layer-filters.test.tsx +103 -0
- package/src/components/lasso-tool/layer-filters.tsx +242 -0
- package/src/components/lasso-tool/message.tsx +36 -0
- package/src/components/lasso-tool/options-sections.test.tsx +101 -0
- package/src/components/lasso-tool/options-sections.tsx +104 -0
- package/src/components/lasso-tool/styles.test.ts +26 -0
- package/src/components/lasso-tool/styles.ts +190 -0
- package/src/components/lasso-tool/toolbar/actions/accept-action.tsx +34 -0
- package/src/components/lasso-tool/toolbar/actions/action-menu.tsx +103 -0
- package/src/components/lasso-tool/toolbar/actions/cancel-action.tsx +34 -0
- package/src/components/lasso-tool/toolbar/actions/color-action.tsx +201 -0
- package/src/components/lasso-tool/toolbar/actions/delete-action.tsx +31 -0
- package/src/components/lasso-tool/toolbar/actions/duplicate-action.tsx +30 -0
- package/src/components/lasso-tool/toolbar/actions/edit-geometry-action.tsx +44 -0
- package/src/components/lasso-tool/toolbar/actions/edit-properties-action.tsx +487 -0
- package/src/components/lasso-tool/toolbar/actions/fill-action.tsx +55 -0
- package/src/components/lasso-tool/toolbar/actions/intersect-action.tsx +33 -0
- package/src/components/lasso-tool/toolbar/actions/label-action.tsx +292 -0
- package/src/components/lasso-tool/toolbar/actions/lock-action.tsx +40 -0
- package/src/components/lasso-tool/toolbar/actions/redo-action.tsx +35 -0
- package/src/components/lasso-tool/toolbar/actions/split-action.tsx +33 -0
- package/src/components/lasso-tool/toolbar/actions/stroke-action.tsx +57 -0
- package/src/components/lasso-tool/toolbar/actions/style-actions.test.tsx +212 -0
- package/src/components/lasso-tool/toolbar/actions/subtract-action.tsx +33 -0
- package/src/components/lasso-tool/toolbar/actions/toggle-type-action.tsx +50 -0
- package/src/components/lasso-tool/toolbar/actions/undo-action.tsx +35 -0
- package/src/components/lasso-tool/toolbar/actions/union-action.tsx +40 -0
- package/src/components/lasso-tool/toolbar/button.tsx +62 -0
- package/src/components/lasso-tool/toolbar/connected.tsx +383 -0
- package/src/components/lasso-tool/toolbar/context.tsx +65 -0
- package/src/components/lasso-tool/toolbar/index.ts +70 -0
- package/src/components/lasso-tool/toolbar/styles.ts +42 -0
- package/src/components/lasso-tool/toolbar/toolbar.test.tsx +77 -0
- package/src/components/lasso-tool/toolbar/toolbar.tsx +50 -0
- package/src/components/lasso-tool/tools-context.tsx +47 -0
- package/src/components/lasso-tool/types.ts +384 -0
- package/src/components/lasso-tool/undo-redo.test.tsx +162 -0
- package/src/components/lasso-tool/undo-redo.tsx +55 -0
- package/src/components/list-data/list-data-skeleton.test.tsx +10 -0
- package/src/components/list-data/list-data-skeleton.tsx +40 -0
- package/src/components/list-data/list-data.test.tsx +167 -0
- package/src/components/list-data/list-data.tsx +124 -0
- package/src/components/list-data/styles.ts +37 -0
- package/src/components/list-data/types.ts +25 -0
- package/src/components/measurement-tools/const.tsx +108 -0
- package/src/components/measurement-tools/icons.tsx +54 -0
- package/src/components/measurement-tools/measurement-tools.test.tsx +165 -0
- package/src/components/measurement-tools/measurement-tools.tsx +467 -0
- package/src/components/measurement-tools/styles.ts +92 -0
- package/src/components/measurement-tools/types.ts +77 -0
- package/src/components/no-data-alert/no-data-alert.test.tsx +69 -0
- package/src/components/no-data-alert/no-data-alert.tsx +59 -0
- package/src/components/responsive-drawer/responsive-drawer.test.tsx +415 -0
- package/src/components/responsive-drawer/responsive-drawer.tsx +219 -0
- package/src/components/smart-tooltip/smart-tooltip.test.tsx +168 -0
- package/src/components/smart-tooltip/smart-tooltip.tsx +74 -0
- package/src/components/tooltip/tooltip.test.tsx +86 -0
- package/src/components/tooltip/tooltip.tsx +43 -0
- package/src/components/types.ts +1 -0
- package/src/components/zoom-controls/styles.ts +27 -0
- package/src/components/zoom-controls/types.ts +19 -0
- package/src/components/zoom-controls/zoom-controls.test.tsx +101 -0
- package/src/components/zoom-controls/zoom-controls.tsx +130 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-skeleton.test.tsx +32 -0
- package/src/hooks/use-skeleton.ts +19 -0
- package/src/hooks/use-widget-ref.ts +34 -0
- package/src/legend/components/a11y.ts +14 -0
- package/src/legend/components/contexts.ts +57 -0
- package/src/legend/components/icons.tsx +22 -0
- package/src/legend/components/index.ts +38 -0
- package/src/legend/components/legend-actions/legend-actions.tsx +58 -0
- package/src/legend/components/legend-actions/styles.ts +9 -0
- package/src/legend/components/legend-category/legend-category-ui.tsx +91 -0
- package/src/legend/components/legend-category/styles.ts +61 -0
- package/src/legend/components/legend-config-select/legend-config-select.tsx +96 -0
- package/src/legend/components/legend-config-select/styles.ts +48 -0
- package/src/legend/components/legend-group/legend-group.test.tsx +297 -0
- package/src/legend/components/legend-group/legend-group.tsx +126 -0
- package/src/legend/components/legend-group/styles.ts +184 -0
- package/src/legend/components/legend-group-menu/legend-group-menu-items.tsx +132 -0
- package/src/legend/components/legend-group-menu/legend-group-menu.tsx +25 -0
- package/src/legend/components/legend-icon/legend-icon-ui.tsx +56 -0
- package/src/legend/components/legend-icon/styles.ts +56 -0
- package/src/legend/components/legend-item/legend-item-ui.test.tsx +362 -0
- package/src/legend/components/legend-item/legend-item-ui.tsx +43 -0
- package/src/legend/components/legend-item/legend-item.tsx +34 -0
- package/src/legend/components/legend-item/styles.ts +11 -0
- package/src/legend/components/legend-opacity/legend-opacity.tsx +152 -0
- package/src/legend/components/legend-opacity/styles.ts +33 -0
- package/src/legend/components/legend-overflow-menu/legend-overflow-menu.tsx +84 -0
- package/src/legend/components/legend-panel-menu/legend-panel-menu.tsx +23 -0
- package/src/legend/components/legend-proportion/legend-proportion-ui.tsx +122 -0
- package/src/legend/components/legend-proportion/styles.ts +43 -0
- package/src/legend/components/legend-ramp/legend-ramp-ui.tsx +160 -0
- package/src/legend/components/legend-ramp/styles.ts +62 -0
- package/src/legend/components/legend-row/legend-row.test.tsx +736 -0
- package/src/legend/components/legend-row/legend-row.tsx +170 -0
- package/src/legend/components/legend-row/styles.ts +219 -0
- package/src/legend/components/legend-row-menu/legend-row-menu-items.tsx +57 -0
- package/src/legend/components/legend-row-menu/legend-row-menu.tsx +30 -0
- package/src/legend/components/legend-row-menu/legend-zoom-to.tsx +43 -0
- package/src/legend/components/legend-sortable/contexts.ts +12 -0
- package/src/legend/components/legend-sortable/legend-sortable.test.tsx +144 -0
- package/src/legend/components/legend-sortable/legend-sortable.tsx +195 -0
- package/src/legend/components/legend-sortable/sortable-entity.tsx +91 -0
- package/src/legend/components/legend-sortable/sortable-ids.ts +17 -0
- package/src/legend/components/legend-sortable/styles.ts +65 -0
- package/src/legend/components/legend-swatch/legend-swatch.test.tsx +109 -0
- package/src/legend/components/legend-swatch/legend-swatch.tsx +237 -0
- package/src/legend/components/legend-visibility-toggle/legend-visibility-toggle.tsx +133 -0
- package/src/legend/components/legend-visible-layers/legend-visible-layers.test.tsx +86 -0
- package/src/legend/components/legend-visible-layers/legend-visible-layers.tsx +135 -0
- package/src/legend/components/legend-visible-layers/styles.ts +60 -0
- package/src/legend/components/run-async-menu-action.ts +20 -0
- package/src/legend/index.ts +176 -0
- package/src/legend/provider/index.ts +6 -0
- package/src/legend/provider/labels.ts +101 -0
- package/src/legend/provider/legend-config-context.ts +15 -0
- package/src/legend/provider/legend-provider.tsx +102 -0
- package/src/legend/stores/index.ts +50 -0
- package/src/legend/stores/legend-context.ts +17 -0
- package/src/legend/stores/legend-store-registry.ts +745 -0
- package/src/legend/stores/legend-store.test.ts +701 -0
- package/src/legend/stores/selectors.ts +127 -0
- package/src/legend/stores/types.ts +359 -0
- package/src/widgets/README.md +277 -0
- 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-icon.tsx +10 -0
- package/src/widgets/actions/change-column/change-column.test.tsx +290 -0
- package/src/widgets/actions/change-column/change-column.tsx +218 -0
- package/src/widgets/actions/change-column/sortable-column-item.test.tsx +124 -0
- package/src/widgets/actions/change-column/sortable-column-item.tsx +51 -0
- package/src/widgets/actions/change-column/types.ts +20 -0
- package/src/widgets/actions/download/download.test.tsx +326 -0
- package/src/widgets/actions/download/download.tsx +132 -0
- package/src/widgets/actions/download/exports.test.tsx +288 -0
- package/src/widgets/actions/download/exports.tsx +118 -0
- package/src/widgets/actions/download/types.ts +21 -0
- package/src/widgets/actions/fullscreen/fullscreen.test.tsx +269 -0
- package/src/widgets/actions/fullscreen/fullscreen.tsx +98 -0
- package/src/widgets/actions/fullscreen/styles.ts +17 -0
- package/src/widgets/actions/fullscreen/types.ts +32 -0
- package/src/widgets/actions/index.ts +73 -0
- package/src/widgets/actions/lock-selection/lock-selection.test.tsx +198 -0
- package/src/widgets/actions/lock-selection/lock-selection.tsx +128 -0
- package/src/widgets/actions/lock-selection/types.ts +43 -0
- package/src/widgets/actions/relative-data/relative-data.test.tsx +542 -0
- package/src/widgets/actions/relative-data/relative-data.tsx +188 -0
- package/src/widgets/actions/relative-data/types.ts +33 -0
- package/src/widgets/actions/relative-data/utils.test.ts +223 -0
- package/src/widgets/actions/relative-data/utils.ts +58 -0
- package/src/widgets/actions/searcher/searcher-toggle.test.tsx +354 -0
- package/src/widgets/actions/searcher/searcher-toggle.tsx +72 -0
- package/src/widgets/actions/searcher/searcher.tsx +196 -0
- package/src/widgets/actions/searcher/types.ts +72 -0
- package/src/widgets/actions/shared/styles.ts +12 -0
- package/src/widgets/actions/stack-toggle/grouped-bar-chart-icon.tsx +14 -0
- package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +414 -0
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +129 -0
- package/src/widgets/actions/stack-toggle/types.ts +29 -0
- package/src/widgets/actions/zoom-toggle/style.ts +14 -0
- package/src/widgets/actions/zoom-toggle/types.ts +44 -0
- package/src/widgets/actions/zoom-toggle/zoom-toggle.test.tsx +322 -0
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +218 -0
- package/src/widgets/bar/config.ts +140 -0
- package/src/widgets/bar/index.ts +9 -0
- package/src/widgets/bar/skeleton.tsx +60 -0
- package/src/widgets/bar/style.ts +33 -0
- package/src/widgets/bar/types.ts +16 -0
- package/src/widgets/category/category-ui.test.tsx +399 -0
- package/src/widgets/category/category-ui.tsx +166 -0
- package/src/widgets/category/components/category-bar.tsx +31 -0
- package/src/widgets/category/components/category-legend.tsx +33 -0
- package/src/widgets/category/components/category-row-multi.tsx +57 -0
- package/src/widgets/category/components/category-row-other.tsx +26 -0
- package/src/widgets/category/components/category-row-single.tsx +54 -0
- package/src/widgets/category/components/category-rows.test.tsx +213 -0
- package/src/widgets/category/config.ts +86 -0
- package/src/widgets/category/index.ts +29 -0
- package/src/widgets/category/skeleton.tsx +24 -0
- package/src/widgets/category/style.ts +134 -0
- package/src/widgets/category/types.ts +41 -0
- package/src/widgets/echart/const.ts +1 -0
- package/src/widgets/echart/echart-ui.test.tsx +526 -0
- package/src/widgets/echart/echart-ui.tsx +78 -0
- package/src/widgets/echart/echart.test.tsx +546 -0
- package/src/widgets/echart/echart.tsx +66 -0
- package/src/widgets/echart/index.ts +16 -0
- package/src/widgets/echart/options.ts +57 -0
- package/src/widgets/echart/shared-resize-observer.ts +45 -0
- package/src/widgets/echart/types.ts +45 -0
- package/src/widgets/echart/utils.test.ts +277 -0
- package/src/widgets/echart/utils.ts +244 -0
- package/src/widgets/error/error.test.tsx +331 -0
- package/src/widgets/error/error.tsx +51 -0
- package/src/widgets/error/index.ts +2 -0
- package/src/widgets/error/types.ts +24 -0
- package/src/widgets/formula/components/item.test.tsx +249 -0
- package/src/widgets/formula/components/item.tsx +21 -0
- package/src/widgets/formula/components/prefix.test.tsx +341 -0
- package/src/widgets/formula/components/prefix.tsx +19 -0
- package/src/widgets/formula/components/row.test.tsx +364 -0
- package/src/widgets/formula/components/row.tsx +24 -0
- package/src/widgets/formula/components/series.tsx +35 -0
- package/src/widgets/formula/components/suffix.test.tsx +383 -0
- package/src/widgets/formula/components/suffix.tsx +29 -0
- package/src/widgets/formula/components/value.test.tsx +329 -0
- package/src/widgets/formula/components/value.tsx +24 -0
- package/src/widgets/formula/config.test.ts +37 -0
- package/src/widgets/formula/config.ts +38 -0
- package/src/widgets/formula/formula-ui.test.tsx +399 -0
- package/src/widgets/formula/formula-ui.tsx +30 -0
- package/src/widgets/formula/index.ts +24 -0
- package/src/widgets/formula/serializer.test.tsx +144 -0
- package/src/widgets/formula/serializer.ts +28 -0
- package/src/widgets/formula/skeleton.tsx +10 -0
- package/src/widgets/formula/style.ts +23 -0
- package/src/widgets/formula/types.ts +50 -0
- package/src/widgets/histogram/config.ts +230 -0
- package/src/widgets/histogram/index.ts +13 -0
- package/src/widgets/histogram/skeleton.tsx +52 -0
- package/src/widgets/histogram/style.ts +8 -0
- package/src/widgets/histogram/types.ts +23 -0
- package/src/widgets/loader/index.ts +4 -0
- package/src/widgets/loader/loader.tsx +92 -0
- package/src/widgets/loader/types.ts +13 -0
- package/src/widgets/loader/utils.test.ts +112 -0
- package/src/widgets/loader/utils.ts +57 -0
- package/src/widgets/markdown/config.ts +28 -0
- package/src/widgets/markdown/index.ts +14 -0
- package/src/widgets/markdown/markdown-ui.test.tsx +341 -0
- package/src/widgets/markdown/markdown-ui.tsx +59 -0
- package/src/widgets/markdown/markdown.tsx +20 -0
- package/src/widgets/markdown/skeleton.tsx +12 -0
- package/src/widgets/markdown/style.ts +28 -0
- package/src/widgets/markdown/types.ts +28 -0
- package/src/widgets/no-data/index.ts +2 -0
- package/src/widgets/no-data/no-data.test.tsx +497 -0
- package/src/widgets/no-data/no-data.tsx +112 -0
- package/src/widgets/no-data/style.ts +18 -0
- package/src/widgets/no-data/types.ts +76 -0
- package/src/widgets/note/index.ts +2 -0
- package/src/widgets/note/note.test.tsx +391 -0
- package/src/widgets/note/note.tsx +124 -0
- package/src/widgets/note/style.ts +29 -0
- package/src/widgets/note/types.ts +9 -0
- package/src/widgets/pie/config.ts +245 -0
- package/src/widgets/pie/index.ts +8 -0
- package/src/widgets/pie/skeleton.tsx +70 -0
- package/src/widgets/pie/style.ts +8 -0
- package/src/widgets/pie/types.ts +16 -0
- package/src/widgets/range/components/range-item.test.tsx +243 -0
- package/src/widgets/range/components/range-item.tsx +214 -0
- package/src/widgets/range/config.ts +10 -0
- package/src/widgets/range/index.ts +16 -0
- package/src/widgets/range/range-ui.test.tsx +203 -0
- package/src/widgets/range/range-ui.tsx +14 -0
- package/src/widgets/range/serializer.test.ts +70 -0
- package/src/widgets/range/serializer.ts +27 -0
- package/src/widgets/range/skeleton.tsx +14 -0
- package/src/widgets/range/style.ts +37 -0
- package/src/widgets/range/types.ts +39 -0
- package/src/widgets/scatterplot/config.ts +136 -0
- package/src/widgets/scatterplot/index.ts +8 -0
- package/src/widgets/scatterplot/skeleton.tsx +59 -0
- package/src/widgets/scatterplot/style.ts +21 -0
- package/src/widgets/scatterplot/types.ts +17 -0
- package/src/widgets/selection-summary/index.ts +6 -0
- package/src/widgets/selection-summary/selection-summary.tsx +57 -0
- package/src/widgets/selection-summary/style.ts +10 -0
- package/src/widgets/selection-summary/types.ts +14 -0
- package/src/widgets/skeleton-loader/index.ts +2 -0
- package/src/widgets/skeleton-loader/skeleton-loader.test.tsx +139 -0
- package/src/widgets/skeleton-loader/skeleton-loader.tsx +35 -0
- package/src/widgets/skeleton-loader/types.ts +8 -0
- package/src/widgets/spread/components/max-value.tsx +29 -0
- package/src/widgets/spread/components/min-value.tsx +29 -0
- package/src/widgets/spread/components/separator.tsx +9 -0
- package/src/widgets/spread/config.ts +39 -0
- package/src/widgets/spread/index.ts +23 -0
- package/src/widgets/spread/skeleton.tsx +10 -0
- package/src/widgets/spread/spread-ui.test.tsx +368 -0
- package/src/widgets/spread/spread-ui.tsx +32 -0
- package/src/widgets/spread/style.ts +22 -0
- package/src/widgets/spread/types.ts +47 -0
- package/src/widgets/stores/index.ts +13 -0
- package/src/widgets/stores/types.ts +203 -0
- 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 +942 -0
- package/src/widgets/stores/widget-store.ts +484 -0
- package/src/widgets/subheader/index.ts +3 -0
- package/src/widgets/subheader/style.ts +20 -0
- package/src/widgets/subheader/subheader.test.tsx +45 -0
- package/src/widgets/subheader/subheader.tsx +35 -0
- package/src/widgets/subheader/types.ts +11 -0
- package/src/widgets/table/components/cell-header.tsx +58 -0
- package/src/widgets/table/components/cell.tsx +82 -0
- package/src/widgets/table/components/pagination-actions.tsx +67 -0
- package/src/widgets/table/components/pagination.tsx +41 -0
- package/src/widgets/table/components/row.tsx +65 -0
- package/src/widgets/table/config.test.ts +65 -0
- package/src/widgets/table/config.ts +75 -0
- package/src/widgets/table/helpers.test.ts +244 -0
- package/src/widgets/table/helpers.ts +107 -0
- package/src/widgets/table/hooks/use-pagination.test.ts +294 -0
- package/src/widgets/table/hooks/use-pagination.ts +148 -0
- package/src/widgets/table/hooks/use-selection.test.ts +504 -0
- package/src/widgets/table/hooks/use-selection.ts +194 -0
- package/src/widgets/table/hooks/use-sort.test.ts +296 -0
- package/src/widgets/table/hooks/use-sort.ts +131 -0
- package/src/widgets/table/index.ts +55 -0
- package/src/widgets/table/serializer.ts +54 -0
- package/src/widgets/table/skeleton.tsx +48 -0
- package/src/widgets/table/style.ts +34 -0
- package/src/widgets/table/table-ui.tsx +64 -0
- package/src/widgets/table/types.ts +223 -0
- package/src/widgets/timeseries/config.ts +136 -0
- package/src/widgets/timeseries/index.ts +8 -0
- package/src/widgets/timeseries/skeleton.tsx +55 -0
- package/src/widgets/timeseries/style.ts +36 -0
- package/src/widgets/timeseries/types.ts +17 -0
- package/src/widgets/toolbar-actions/index.ts +6 -0
- package/src/widgets/toolbar-actions/styles.ts +38 -0
- package/src/widgets/toolbar-actions/toolbar-actions.test.tsx +691 -0
- package/src/widgets/toolbar-actions/toolbar-actions.tsx +145 -0
- package/src/widgets/toolbar-actions/types.ts +60 -0
- package/src/widgets/utils/chart-config/config-factory.ts +67 -0
- package/src/widgets/utils/chart-config/csv-modifiers.ts +56 -0
- package/src/widgets/utils/chart-config/download-config.ts +22 -0
- package/src/widgets/utils/chart-config/index.ts +29 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +366 -0
- package/src/widgets/utils/chart-config/option-builders.ts +308 -0
- package/src/widgets/utils/formatter.ts +2 -0
- package/src/widgets/utils/index.ts +26 -0
- package/{dist/types/widgets/_shared/skeleton/index.d.ts → src/widgets/utils/skeleton/index.ts} +2 -1
- package/src/widgets/utils/skeleton/styles.ts +20 -0
- package/src/widgets/wrapper/components/actions.test.tsx +105 -0
- package/src/widgets/wrapper/components/actions.tsx +35 -0
- package/src/widgets/wrapper/components/options.test.tsx +331 -0
- package/src/widgets/wrapper/components/options.tsx +81 -0
- package/src/widgets/wrapper/components/title.test.tsx +126 -0
- package/src/widgets/wrapper/components/title.tsx +35 -0
- package/src/widgets/wrapper/index.ts +16 -0
- package/src/widgets/wrapper/styles.ts +98 -0
- package/src/widgets/wrapper/types.ts +55 -0
- package/src/widgets/wrapper/wrapper-ui.test.tsx +232 -0
- package/src/widgets/wrapper/wrapper-ui.tsx +72 -0
- package/src/widgets/wrapper/wrapper.test.tsx +365 -0
- package/src/widgets/wrapper/wrapper.tsx +60 -0
- package/src/widgets-v2/PERFORMANCE.md +189 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.test.tsx +180 -0
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +154 -0
- package/src/widgets-v2/actions/brush-toggle/index.ts +3 -0
- package/src/widgets-v2/actions/brush-toggle/labels.ts +9 -0
- package/src/widgets-v2/actions/brush-toggle/style.ts +11 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.test.ts +47 -0
- package/src/widgets-v2/actions/brush-toggle/transforms.ts +31 -0
- package/src/widgets-v2/actions/change-column/change-column-icon.tsx +14 -0
- package/src/widgets-v2/actions/change-column/change-column.test.tsx +59 -0
- package/src/widgets-v2/actions/change-column/change-column.tsx +189 -0
- package/src/widgets-v2/actions/change-column/index.ts +7 -0
- package/src/widgets-v2/actions/change-column/labels.ts +11 -0
- package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +63 -0
- package/src/widgets-v2/actions/change-column/style.ts +58 -0
- package/src/widgets-v2/actions/change-column/types.ts +11 -0
- package/src/widgets-v2/actions/download/constants.ts +14 -0
- package/src/widgets-v2/actions/download/csv-item.test.tsx +77 -0
- package/src/widgets-v2/actions/download/csv-item.tsx +71 -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 +35 -0
- package/src/widgets-v2/actions/download/index.ts +15 -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 +53 -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 +95 -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 +301 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +188 -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 +111 -0
- package/src/widgets-v2/actions/searcher/style.ts +15 -0
- package/src/widgets-v2/actions/show-all/index.ts +7 -0
- package/src/widgets-v2/actions/show-all/labels.ts +8 -0
- package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
- package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
- package/src/widgets-v2/actions/show-all/style.ts +8 -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 +60 -0
- package/src/widgets-v2/bar/index.ts +10 -0
- package/src/widgets-v2/bar/options.test.ts +361 -0
- package/src/widgets-v2/bar/options.ts +333 -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 +909 -0
- package/src/widgets-v2/category/category-ui.tsx +479 -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 +130 -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 +102 -0
- package/src/widgets-v2/category/components/category-legend.tsx +82 -0
- package/src/widgets-v2/category/components/category-row-multi.tsx +86 -0
- package/src/widgets-v2/category/components/category-row-other.test.tsx +57 -0
- package/src/widgets-v2/category/components/category-row-other.tsx +84 -0
- package/src/widgets-v2/category/components/category-row-single.tsx +76 -0
- package/src/widgets-v2/category/components/category-row-stacked.test.tsx +248 -0
- package/src/widgets-v2/category/components/category-row-stacked.tsx +104 -0
- package/src/widgets-v2/category/download.test.ts +80 -0
- package/src/widgets-v2/category/download.ts +50 -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 +329 -0
- package/src/widgets-v2/category/types.ts +61 -0
- package/src/widgets-v2/echart/echart-ui.test.tsx +327 -0
- package/src/widgets-v2/echart/echart-ui.tsx +232 -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/edge-label-clamp.test.ts +198 -0
- package/src/widgets-v2/echart/edge-label-clamp.ts +217 -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 +120 -0
- package/src/widgets-v2/echart/use-chart-selection.ts +121 -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 +63 -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 +56 -0
- package/src/widgets-v2/histogram/index.ts +13 -0
- package/src/widgets-v2/histogram/options.test.ts +411 -0
- package/src/widgets-v2/histogram/options.ts +390 -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 +81 -0
- package/src/widgets-v2/histogram/transforms.ts +53 -0
- package/src/widgets-v2/histogram/types.ts +64 -0
- package/src/widgets-v2/index.ts +212 -0
- package/src/widgets-v2/markdown/download.test.ts +66 -0
- package/src/widgets-v2/markdown/download.tsx +56 -0
- package/src/widgets-v2/markdown/index.ts +6 -0
- package/src/widgets-v2/markdown/markdown-content.test.tsx +165 -0
- package/src/widgets-v2/markdown/markdown-content.tsx +81 -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 +51 -0
- package/src/widgets-v2/pie/index.ts +10 -0
- package/src/widgets-v2/pie/options.test.ts +930 -0
- package/src/widgets-v2/pie/options.ts +611 -0
- package/src/widgets-v2/pie/skeleton.test.tsx +20 -0
- package/src/widgets-v2/pie/skeleton.tsx +94 -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 +50 -0
- package/src/widgets-v2/scatterplot/index.ts +14 -0
- package/src/widgets-v2/scatterplot/options.test.ts +411 -0
- package/src/widgets-v2/scatterplot/options.ts +422 -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 +134 -0
- package/src/widgets-v2/scatterplot/transforms.ts +61 -0
- package/src/widgets-v2/scatterplot/types.ts +59 -0
- package/src/widgets-v2/selection-summary/labels.ts +15 -0
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +59 -0
- package/src/widgets-v2/selection-summary/selection-summary.tsx +82 -0
- package/src/widgets-v2/selection-summary/style.ts +38 -0
- package/src/widgets-v2/spread/band.test.ts +46 -0
- package/src/widgets-v2/spread/band.ts +47 -0
- package/src/widgets-v2/spread/download.test.ts +64 -0
- package/src/widgets-v2/spread/download.ts +55 -0
- package/src/widgets-v2/spread/index.ts +11 -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 +239 -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 +85 -0
- package/src/widgets-v2/table/download.ts +43 -0
- package/src/widgets-v2/table/helpers.test.ts +233 -0
- package/src/widgets-v2/table/helpers.ts +131 -0
- package/src/widgets-v2/table/index.ts +24 -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/transforms.test.ts +40 -0
- package/src/widgets-v2/table/transforms.ts +28 -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 +82 -0
- package/src/widgets-v2/timeseries/index.ts +11 -0
- package/src/widgets-v2/timeseries/options.test.ts +399 -0
- package/src/widgets-v2/timeseries/options.ts +342 -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/transforms.test.ts +49 -0
- package/src/widgets-v2/timeseries/transforms.ts +31 -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 +128 -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 +255 -0
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +194 -0
- package/dist/cjs-D9ro6BXv.js +0 -85
- package/dist/cjs-D9ro6BXv.js.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/error-B2IJ9d2h.js +0 -38
- package/dist/error-B2IJ9d2h.js.map +0 -1
- package/dist/exports-Cr43OCul.js +0 -51
- package/dist/exports-Cr43OCul.js.map +0 -1
- package/dist/lasso-tool-CYn3ivf-.js +0 -534
- package/dist/lasso-tool-CYn3ivf-.js.map +0 -1
- package/dist/markdown-ui-CpNYUPqC.js +0 -68
- package/dist/markdown-ui-CpNYUPqC.js.map +0 -1
- package/dist/no-data-C54XJt13.js +0 -61
- package/dist/no-data-C54XJt13.js.map +0 -1
- package/dist/note-Clng2ej6.js +0 -124
- package/dist/note-Clng2ej6.js.map +0 -1
- package/dist/options-D9wflre6.js +0 -49
- package/dist/options-D9wflre6.js.map +0 -1
- package/dist/row-DLKZN5aF.js +0 -33
- package/dist/row-DLKZN5aF.js.map +0 -1
- package/dist/row-DrHwXNvF.js +0 -35
- package/dist/row-DrHwXNvF.js.map +0 -1
- package/dist/series-Cf1QPZHV.js +0 -83
- package/dist/series-Cf1QPZHV.js.map +0 -1
- package/dist/series-Do02NQUF.js +0 -91
- package/dist/series-Do02NQUF.js.map +0 -1
- package/dist/smart-tooltip-BEtBaIdz.js +0 -39
- package/dist/smart-tooltip-BEtBaIdz.js.map +0 -1
- package/dist/styles-CcC5L2cr.js +0 -77
- package/dist/styles-CcC5L2cr.js.map +0 -1
- package/dist/styles-dOu_pRNb.js +0 -77
- package/dist/styles-dOu_pRNb.js.map +0 -1
- package/dist/tooltip-BDnrRKrp.js +0 -25
- package/dist/tooltip-BDnrRKrp.js.map +0 -1
- package/dist/types/common/common.d.ts +0 -3
- package/dist/types/common/index.d.ts +0 -26
- package/dist/types/common/lasso-tools.d.ts +0 -36
- package/dist/types/common/measurement-tools.d.ts +0 -65
- package/dist/types/hooks/use-debounce.d.ts +0 -19
- package/dist/types/widgets/_shared/chart-config/index.d.ts +0 -7
- package/dist/types/widgets/_shared/chart-config/option-builders.d.ts +0 -34
- package/dist/types/widgets/actions/relative-data/style.d.ts +0 -8
- package/dist/types/widgets/actions/relative-data/utils.test.d.ts +0 -1
- package/dist/types/widgets/actions/zoom-toggle/index.d.ts +0 -2
- package/dist/types/widgets/category/components/index.d.ts +0 -10
- package/dist/types/widgets/index.d.ts +0 -8
- package/dist/types/widgets/range/serializer.test.d.ts +0 -1
- package/dist/types/widgets/root/index.d.ts +0 -3
- package/dist/types/widgets/root/root.d.ts +0 -2
- package/dist/types/widgets/root/types.d.ts +0 -9
- package/dist/types/widgets/root/utils.d.ts +0 -1
- package/dist/types/widgets/stores/widget-store.test.d.ts +0 -1
- package/dist/types/widgets/table/components/index.d.ts +0 -4
- package/dist/types/widgets/table/helpers.test.d.ts +0 -1
- package/dist/types/widgets/table/hooks/index.d.ts +0 -6
- package/dist/types/widgets/table/hooks/use-pagination.test.d.ts +0 -1
- package/dist/types/widgets/table/hooks/use-selection.test.d.ts +0 -1
- package/dist/types/widgets/table/hooks/use-sort.test.d.ts +0 -1
- package/dist/utils-DNtU8q7E.js +0 -144
- package/dist/utils-DNtU8q7E.js.map +0 -1
- package/dist/utils-Dv5Z47UQ.js +0 -144
- package/dist/utils-Dv5Z47UQ.js.map +0 -1
- package/dist/widget-store-CB6Trp_0.js +0 -131
- package/dist/widget-store-CB6Trp_0.js.map +0 -1
- package/dist/widget-store-yDO2ul8g.js +0 -44
- package/dist/widget-store-yDO2ul8g.js.map +0 -1
- package/dist/widgets/actions.js.map +0 -1
- package/dist/widgets/echart.js.map +0 -1
- package/dist/widgets/formula.js.map +0 -1
- package/dist/widgets/root.js +0 -68
- package/dist/widgets/root.js.map +0 -1
- package/dist/widgets/stores.js.map +0 -1
- package/dist/widgets.js +0 -11
- package/dist/widgets.js.map +0 -1
- /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
- /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { C as e, T as t } from "./stores-tiFePP0A.js";
|
|
2
|
+
import { c as n } from "react/compiler-runtime";
|
|
3
|
+
import { useState as r } from "react";
|
|
4
|
+
import { Box as i, Skeleton as a, Slider as o, TextField as s, Typography as c } from "@mui/material";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
//#region src/widgets-v2/range/style.ts
|
|
7
|
+
var d = {
|
|
8
|
+
root: {
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
gap: 3,
|
|
12
|
+
py: 1
|
|
13
|
+
},
|
|
14
|
+
item: {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: 1.5
|
|
18
|
+
},
|
|
19
|
+
sliderContainer: {
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
gap: 1,
|
|
23
|
+
px: 1
|
|
24
|
+
},
|
|
25
|
+
slider: {
|
|
26
|
+
width: "100%",
|
|
27
|
+
"&.Mui-disabled": { color: (e) => e.palette.text.disabled }
|
|
28
|
+
},
|
|
29
|
+
inputsRow: {
|
|
30
|
+
display: "flex",
|
|
31
|
+
gap: 2,
|
|
32
|
+
alignItems: "center"
|
|
33
|
+
},
|
|
34
|
+
input: {
|
|
35
|
+
flex: 1,
|
|
36
|
+
"& .MuiInputBase-input": { textAlign: "center" }
|
|
37
|
+
},
|
|
38
|
+
note: { color: "text.secondary" }
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/widgets-v2/range/range-ui.tsx
|
|
42
|
+
function f(e) {
|
|
43
|
+
let t = n(11), { items: r, onChange: a, onChangeCommitted: o, formatter: s } = e, c = s ?? p, u;
|
|
44
|
+
if (t[0] !== c || t[1] !== r || t[2] !== a || t[3] !== o) {
|
|
45
|
+
let e;
|
|
46
|
+
t[5] !== c || t[6] !== a || t[7] !== o ? (e = (e, t) => /* @__PURE__ */ l(m, {
|
|
47
|
+
index: t,
|
|
48
|
+
item: e,
|
|
49
|
+
fmt: c,
|
|
50
|
+
onChange: a,
|
|
51
|
+
onChangeCommitted: o
|
|
52
|
+
}, `range-${e.min}-${e.max}-${t}`), t[5] = c, t[6] = a, t[7] = o, t[8] = e) : e = t[8], u = r.map(e), t[0] = c, t[1] = r, t[2] = a, t[3] = o, t[4] = u;
|
|
53
|
+
} else u = t[4];
|
|
54
|
+
let f;
|
|
55
|
+
return t[9] === u ? f = t[10] : (f = /* @__PURE__ */ l(i, {
|
|
56
|
+
sx: d.root,
|
|
57
|
+
children: u
|
|
58
|
+
}), t[9] = u, t[10] = f), f;
|
|
59
|
+
}
|
|
60
|
+
function p(e) {
|
|
61
|
+
return String(e);
|
|
62
|
+
}
|
|
63
|
+
function m(e) {
|
|
64
|
+
let t = n(70), { index: a, item: s, fmt: f, onChange: p, onChangeCommitted: m } = e, _;
|
|
65
|
+
t[0] !== s.max || t[1] !== s.min || t[2] !== s.value ? (_ = s.value ?? [s.min, s.max], t[0] = s.max, t[1] = s.min, t[2] = s.value, t[3] = _) : _ = t[3];
|
|
66
|
+
let v = _, [y, b] = r(""), x;
|
|
67
|
+
t[4] !== s.max || t[5] !== s.min ? (x = (e) => {
|
|
68
|
+
let [t, n] = e, r = Math.min(Math.max(t, s.min), s.max), i = Math.min(Math.max(n, s.min), s.max);
|
|
69
|
+
return r <= i ? [r, i] : [i, r];
|
|
70
|
+
}, t[4] = s.max, t[5] = s.min, t[6] = x) : x = t[6];
|
|
71
|
+
let S = x, C;
|
|
72
|
+
t[7] !== a || t[8] !== S || t[9] !== p ? (C = (e) => {
|
|
73
|
+
p?.(a, S(e));
|
|
74
|
+
}, t[7] = a, t[8] = S, t[9] = p, t[10] = C) : C = t[10];
|
|
75
|
+
let w = C, T;
|
|
76
|
+
t[11] !== a || t[12] !== S || t[13] !== m ? (T = (e) => {
|
|
77
|
+
m?.(a, S(e));
|
|
78
|
+
}, t[11] = a, t[12] = S, t[13] = m, t[14] = T) : T = t[14];
|
|
79
|
+
let E = T, D;
|
|
80
|
+
t[15] !== a || t[16] !== S || t[17] !== p || t[18] !== m ? (D = (e) => {
|
|
81
|
+
let t = S(e);
|
|
82
|
+
p?.(a, t), m?.(a, t);
|
|
83
|
+
}, t[15] = a, t[16] = S, t[17] = p, t[18] = m, t[19] = D) : D = t[19];
|
|
84
|
+
let O = D, k;
|
|
85
|
+
t[20] !== w || t[21] !== s.max || t[22] !== s.min ? (k = (e, t) => {
|
|
86
|
+
if (!Array.isArray(t)) return;
|
|
87
|
+
let n = t[0] ?? s.min, r = t[1] ?? s.max;
|
|
88
|
+
w([n, r]);
|
|
89
|
+
}, t[20] = w, t[21] = s.max, t[22] = s.min, t[23] = k) : k = t[23];
|
|
90
|
+
let A = k, j;
|
|
91
|
+
t[24] !== E || t[25] !== s.max || t[26] !== s.min ? (j = (e, t) => {
|
|
92
|
+
if (!Array.isArray(t)) return;
|
|
93
|
+
let n = t[0] ?? s.min, r = t[1] ?? s.max;
|
|
94
|
+
E([n, r]);
|
|
95
|
+
}, t[24] = E, t[25] = s.max, t[26] = s.min, t[27] = j) : j = t[27];
|
|
96
|
+
let M = j, N;
|
|
97
|
+
t[28] === s.color ? N = t[29] : (N = s.color ? { color: s.color } : null, t[28] = s.color, t[29] = N);
|
|
98
|
+
let P;
|
|
99
|
+
t[30] === N ? P = t[31] : (P = {
|
|
100
|
+
...d.slider,
|
|
101
|
+
...N
|
|
102
|
+
}, t[30] = N, t[31] = P);
|
|
103
|
+
let F;
|
|
104
|
+
t[32] === v ? F = t[33] : (F = [...v], t[32] = v, t[33] = F);
|
|
105
|
+
let I = s.min, L = s.max, R = s.step ?? 1, z;
|
|
106
|
+
t[34] === s.marks ? z = t[35] : (z = g(s.marks), t[34] = s.marks, t[35] = z);
|
|
107
|
+
let B;
|
|
108
|
+
t[36] !== f || t[37] !== A || t[38] !== M || t[39] !== s.disabled || t[40] !== s.max || t[41] !== s.min || t[42] !== F || t[43] !== R || t[44] !== z || t[45] !== P ? (B = /* @__PURE__ */ l(i, {
|
|
109
|
+
sx: d.sliderContainer,
|
|
110
|
+
children: /* @__PURE__ */ l(o, {
|
|
111
|
+
sx: P,
|
|
112
|
+
value: F,
|
|
113
|
+
min: I,
|
|
114
|
+
max: L,
|
|
115
|
+
step: R,
|
|
116
|
+
marks: z,
|
|
117
|
+
disabled: s.disabled,
|
|
118
|
+
valueLabelDisplay: "auto",
|
|
119
|
+
valueLabelFormat: f,
|
|
120
|
+
onChange: A,
|
|
121
|
+
onChangeCommitted: M
|
|
122
|
+
})
|
|
123
|
+
}), t[36] = f, t[37] = A, t[38] = M, t[39] = s.disabled, t[40] = s.max, t[41] = s.min, t[42] = F, t[43] = R, t[44] = z, t[45] = P, t[46] = B) : B = t[46];
|
|
124
|
+
let V = `min-${v[0]}`, H;
|
|
125
|
+
t[47] !== O || t[48] !== v || t[49] !== y || t[50] !== f || t[51] !== s || t[52] !== V ? (H = /* @__PURE__ */ l(h, {
|
|
126
|
+
name: "min",
|
|
127
|
+
value: v[0],
|
|
128
|
+
item: s,
|
|
129
|
+
fmt: f,
|
|
130
|
+
editing: y,
|
|
131
|
+
setEditing: b,
|
|
132
|
+
commit: O,
|
|
133
|
+
current: v,
|
|
134
|
+
ariaLabel: "Minimum value"
|
|
135
|
+
}, V), t[47] = O, t[48] = v, t[49] = y, t[50] = f, t[51] = s, t[52] = V, t[53] = H) : H = t[53];
|
|
136
|
+
let U = `max-${v[1]}`, W;
|
|
137
|
+
t[54] !== O || t[55] !== v || t[56] !== y || t[57] !== f || t[58] !== s || t[59] !== U ? (W = /* @__PURE__ */ l(h, {
|
|
138
|
+
name: "max",
|
|
139
|
+
value: v[1],
|
|
140
|
+
item: s,
|
|
141
|
+
fmt: f,
|
|
142
|
+
editing: y,
|
|
143
|
+
setEditing: b,
|
|
144
|
+
commit: O,
|
|
145
|
+
current: v,
|
|
146
|
+
ariaLabel: "Maximum value"
|
|
147
|
+
}, U), t[54] = O, t[55] = v, t[56] = y, t[57] = f, t[58] = s, t[59] = U, t[60] = W) : W = t[60];
|
|
148
|
+
let G;
|
|
149
|
+
t[61] !== H || t[62] !== W ? (G = /* @__PURE__ */ u(i, {
|
|
150
|
+
sx: d.inputsRow,
|
|
151
|
+
children: [H, W]
|
|
152
|
+
}), t[61] = H, t[62] = W, t[63] = G) : G = t[63];
|
|
153
|
+
let K;
|
|
154
|
+
t[64] === s.note ? K = t[65] : (K = s.note ? /* @__PURE__ */ l(c, {
|
|
155
|
+
variant: "caption",
|
|
156
|
+
sx: d.note,
|
|
157
|
+
children: s.note
|
|
158
|
+
}) : null, t[64] = s.note, t[65] = K);
|
|
159
|
+
let q;
|
|
160
|
+
return t[66] !== B || t[67] !== G || t[68] !== K ? (q = /* @__PURE__ */ u(i, {
|
|
161
|
+
sx: d.item,
|
|
162
|
+
children: [
|
|
163
|
+
B,
|
|
164
|
+
G,
|
|
165
|
+
K
|
|
166
|
+
]
|
|
167
|
+
}), t[66] = B, t[67] = G, t[68] = K, t[69] = q) : q = t[69], q;
|
|
168
|
+
}
|
|
169
|
+
function h(e) {
|
|
170
|
+
let t = n(26), { name: i, value: a, item: o, fmt: c, editing: u, setEditing: f, commit: p, current: m, ariaLabel: h } = e, [g, _] = r(String(a)), v;
|
|
171
|
+
t[0] !== i || t[1] !== f ? (v = () => {
|
|
172
|
+
f(i);
|
|
173
|
+
}, t[0] = i, t[1] = f, t[2] = v) : v = t[2];
|
|
174
|
+
let y = v, b, x;
|
|
175
|
+
if (t[3] !== p || t[4] !== m || t[5] !== i || t[6] !== f || t[7] !== a) {
|
|
176
|
+
x = (t) => {
|
|
177
|
+
f(""), e(t.target.value);
|
|
178
|
+
}, b = (t) => {
|
|
179
|
+
t.key === "Enter" && (e(t.target.value), t.target.blur());
|
|
180
|
+
};
|
|
181
|
+
function e(e) {
|
|
182
|
+
let t = parseFloat(e), n = Number.isFinite(t) ? t : a, r = i === "min" ? [n, m[1]] : [m[0], n];
|
|
183
|
+
p(r);
|
|
184
|
+
}
|
|
185
|
+
t[3] = p, t[4] = m, t[5] = i, t[6] = f, t[7] = a, t[8] = b, t[9] = x;
|
|
186
|
+
} else b = t[8], x = t[9];
|
|
187
|
+
let S;
|
|
188
|
+
t[10] !== u || t[11] !== c || t[12] !== i || t[13] !== g ? (S = u === i ? g : c(Number(g)), t[10] = u, t[11] = c, t[12] = i, t[13] = g, t[14] = S) : S = t[14];
|
|
189
|
+
let C = S, w;
|
|
190
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (w = (e) => _(e.target.value), t[15] = w) : w = t[15];
|
|
191
|
+
let T;
|
|
192
|
+
t[16] === h ? T = t[17] : (T = { "aria-label": h }, t[16] = h, t[17] = T);
|
|
193
|
+
let E;
|
|
194
|
+
return t[18] !== y || t[19] !== b || t[20] !== C || t[21] !== x || t[22] !== o.disabled || t[23] !== i || t[24] !== T ? (E = /* @__PURE__ */ l(s, {
|
|
195
|
+
name: i,
|
|
196
|
+
value: C,
|
|
197
|
+
onChange: w,
|
|
198
|
+
onFocus: y,
|
|
199
|
+
onBlur: x,
|
|
200
|
+
onKeyDown: b,
|
|
201
|
+
disabled: o.disabled,
|
|
202
|
+
size: "small",
|
|
203
|
+
sx: d.input,
|
|
204
|
+
inputProps: T
|
|
205
|
+
}), t[18] = y, t[19] = b, t[20] = C, t[21] = x, t[22] = o.disabled, t[23] = i, t[24] = T, t[25] = E) : E = t[25], E;
|
|
206
|
+
}
|
|
207
|
+
function g(e) {
|
|
208
|
+
if (e != null) return typeof e == "boolean" ? e : [...e];
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/widgets-v2/range/range.tsx
|
|
212
|
+
var _ = (e) => ({
|
|
213
|
+
data: e.data ?? [],
|
|
214
|
+
formatter: e.formatter
|
|
215
|
+
});
|
|
216
|
+
function v(r) {
|
|
217
|
+
let i = n(5), { onChange: a, onChangeCommitted: o } = r, s = t(), c = e(s, _), u;
|
|
218
|
+
return i[0] !== a || i[1] !== o || i[2] !== c.data || i[3] !== c.formatter ? (u = /* @__PURE__ */ l(f, {
|
|
219
|
+
items: c.data,
|
|
220
|
+
formatter: c.formatter,
|
|
221
|
+
onChange: a,
|
|
222
|
+
onChangeCommitted: o
|
|
223
|
+
}), i[0] = a, i[1] = o, i[2] = c.data, i[3] = c.formatter, i[4] = u) : u = i[4], u;
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/widgets-v2/range/skeleton.tsx
|
|
227
|
+
var y = {
|
|
228
|
+
root: {
|
|
229
|
+
display: "flex",
|
|
230
|
+
flexDirection: "column",
|
|
231
|
+
gap: 3,
|
|
232
|
+
py: 1
|
|
233
|
+
},
|
|
234
|
+
item: {
|
|
235
|
+
display: "flex",
|
|
236
|
+
flexDirection: "column",
|
|
237
|
+
gap: 1.5
|
|
238
|
+
},
|
|
239
|
+
track: { height: 32 },
|
|
240
|
+
inputsRow: {
|
|
241
|
+
display: "flex",
|
|
242
|
+
gap: 2
|
|
243
|
+
},
|
|
244
|
+
input: {
|
|
245
|
+
flex: 1,
|
|
246
|
+
height: 40
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
function b(e) {
|
|
250
|
+
let t = n(2), { count: r } = e, a = r === void 0 ? 1 : r, o;
|
|
251
|
+
return t[0] === a ? o = t[1] : (o = /* @__PURE__ */ l(i, {
|
|
252
|
+
sx: y.root,
|
|
253
|
+
children: Array.from({ length: a }).map(x)
|
|
254
|
+
}), t[0] = a, t[1] = o), o;
|
|
255
|
+
}
|
|
256
|
+
function x(e, t) {
|
|
257
|
+
return /* @__PURE__ */ u(i, {
|
|
258
|
+
sx: y.item,
|
|
259
|
+
children: [/* @__PURE__ */ l(a, {
|
|
260
|
+
variant: "rectangular",
|
|
261
|
+
sx: y.track
|
|
262
|
+
}), /* @__PURE__ */ u(i, {
|
|
263
|
+
sx: y.inputsRow,
|
|
264
|
+
children: [/* @__PURE__ */ l(a, {
|
|
265
|
+
variant: "rectangular",
|
|
266
|
+
sx: y.input
|
|
267
|
+
}), /* @__PURE__ */ l(a, {
|
|
268
|
+
variant: "rectangular",
|
|
269
|
+
sx: y.input
|
|
270
|
+
})]
|
|
271
|
+
})]
|
|
272
|
+
}, `item-${t}`);
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
export { v as n, f as r, b as t };
|
|
276
|
+
|
|
277
|
+
//# sourceMappingURL=range-BCMAl5xf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-BCMAl5xf.js","names":["{\n items,\n onChange,\n onChangeCommitted,\n formatter,\n}: RangeUIProps","(n: number) => String(n)","items.map((item, i) => (\n // Composite of the row's track bounds — stable across reorders for\n // any realistic widget configuration. Falls back to a literal +\n // index when bounds collide (degenerate same-min-same-max rows).\n <RangeRow\n key={`range-${item.min}-${item.max}-${i}`}\n index={i}\n item={item}\n fmt={fmt}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />\n ))","(item, i) => (\n // Composite of the row's track bounds — stable across reorders for\n // any realistic widget configuration. Falls back to a literal +\n // index when bounds collide (degenerate same-min-same-max rows).\n <RangeRow\n key={`range-${item.min}-${item.max}-${i}`}\n index={i}\n item={item}\n fmt={fmt}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />\n )","<Box sx={styles.root}>\n {items.map((item, i) => (\n // Composite of the row's track bounds — stable across reorders for\n // any realistic widget configuration. Falls back to a literal +\n // index when bounds collide (degenerate same-min-same-max rows).\n <RangeRow\n key={`range-${item.min}-${item.max}-${i}`}\n index={i}\n item={item}\n fmt={fmt}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />\n ))}\n </Box>","{\n index,\n item,\n fmt,\n onChange,\n onChangeCommitted,\n}: RangeRowProps","item.value ?? [item.min, item.max]","max","min","value","(next: readonly [number, number]): readonly [number, number] => {\n const [lowRaw, highRaw] = next\n const low = Math.min(Math.max(lowRaw, item.min), item.max)\n const high = Math.min(Math.max(highRaw, item.min), item.max)\n return low <= high ? [low, high] : [high, low]\n }","useCallback(\n (next: readonly [number, number]): readonly [number, number] => {\n const [lowRaw, highRaw] = next\n const low = Math.min(Math.max(lowRaw, item.min), item.max)\n const high = Math.min(Math.max(highRaw, item.min), item.max)\n return low <= high ? [low, high] : [high, low]\n },\n [item.min, item.max],\n )","(next: readonly [number, number]) => {\n onChange?.(index, normalize(next))\n }","next","useCallback(\n (next: readonly [number, number]) => {\n onChange?.(index, normalize(next))\n },\n [index, normalize, onChange],\n )","(next: readonly [number, number]) => {\n onChangeCommitted?.(index, normalize(next))\n }","useCallback(\n (next: readonly [number, number]) => {\n onChangeCommitted?.(index, normalize(next))\n },\n [index, normalize, onChangeCommitted],\n )","(next: readonly [number, number]) => {\n const value = normalize(next)\n onChange?.(index, value)\n onChangeCommitted?.(index, value)\n }","useCallback(\n (next: readonly [number, number]) => {\n const value = normalize(next)\n onChange?.(index, value)\n onChangeCommitted?.(index, value)\n },\n [index, normalize, onChange, onChangeCommitted],\n )","(_: Event, raw: number | number[]) => {\n if (!Array.isArray(raw)) return\n // Hoist defaults out of the destructure: react-compiler can't safely\n // reorder MemberExpression defaults inside an array pattern.\n const low = raw[0] ?? item.min\n const high = raw[1] ?? item.max\n commit([low, high])\n }","low","high","(\n _: Event | React.SyntheticEvent,\n raw: number | number[],\n ) => {\n if (!Array.isArray(raw)) return\n const low = raw[0] ?? item.min\n const high = raw[1] ?? item.max\n commitFinal([low, high])\n }","raw","item.color ? { color: item.color } : null","color","{\n ...styles.slider,\n ...(item.color ? { color: item.color } : null),\n }","[...current]","resolveMarks(item.marks)","marks","<Box sx={styles.sliderContainer}>\n <Slider\n sx={{\n ...styles.slider,\n ...(item.color ? { color: item.color } : null),\n }}\n value={[...current]}\n min={item.min}\n max={item.max}\n step={item.step ?? 1}\n marks={resolveMarks(item.marks)}\n disabled={item.disabled}\n valueLabelDisplay='auto'\n valueLabelFormat={fmt}\n onChange={handleSlider}\n onChangeCommitted={handleSliderCommitted}\n />\n </Box>","disabled","item.step ?? 1","item.min","item.max","<BoundInput\n // Bumping the key on a fresh external value resets the local\n // editing state — matches v1's RangeItem behaviour.\n key={`min-${current[0]}`}\n name='min'\n value={current[0]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Minimum value'\n />","current[0]","`min-${current[0]}`","<BoundInput\n key={`max-${current[1]}`}\n name='max'\n value={current[1]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Maximum value'\n />","current[1]","`max-${current[1]}`","<Box sx={styles.inputsRow}>\n {/* Text-input commits (blur / Enter) are final, but also notify\n `onChange` — see `commitText` — so consumers that only wired\n `onChange` still update on a typed value. */}\n <BoundInput\n // Bumping the key on a fresh external value resets the local\n // editing state — matches v1's RangeItem behaviour.\n key={`min-${current[0]}`}\n name='min'\n value={current[0]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Minimum value'\n />\n <BoundInput\n key={`max-${current[1]}`}\n name='max'\n value={current[1]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Maximum value'\n />\n </Box>","item.note ? (\n <Typography variant='caption' sx={styles.note}>\n {item.note}\n </Typography>\n ) : null","note","<Box sx={styles.item}>\n <Box sx={styles.sliderContainer}>\n <Slider\n sx={{\n ...styles.slider,\n ...(item.color ? { color: item.color } : null),\n }}\n value={[...current]}\n min={item.min}\n max={item.max}\n step={item.step ?? 1}\n marks={resolveMarks(item.marks)}\n disabled={item.disabled}\n valueLabelDisplay='auto'\n valueLabelFormat={fmt}\n onChange={handleSlider}\n onChangeCommitted={handleSliderCommitted}\n />\n </Box>\n <Box sx={styles.inputsRow}>\n {/* Text-input commits (blur / Enter) are final, but also notify\n `onChange` — see `commitText` — so consumers that only wired\n `onChange` still update on a typed value. */}\n <BoundInput\n // Bumping the key on a fresh external value resets the local\n // editing state — matches v1's RangeItem behaviour.\n key={`min-${current[0]}`}\n name='min'\n value={current[0]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Minimum value'\n />\n <BoundInput\n key={`max-${current[1]}`}\n name='max'\n value={current[1]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Maximum value'\n />\n </Box>\n {item.note ? (\n <Typography variant='caption' sx={styles.note}>\n {item.note}\n </Typography>\n ) : null}\n </Box>","{\n name,\n value,\n item,\n fmt,\n editing,\n setEditing,\n commit,\n current,\n ariaLabel,\n}: BoundInputProps","() => {\n setEditing(name)\n }","e","editing === name ? raw : fmt(Number(raw))","(e) => setRaw(e.target.value)","{ 'aria-label': ariaLabel }","<TextField\n name={name}\n value={display}\n onChange={(e) => setRaw(e.target.value)}\n onFocus={beginEditing}\n onBlur={finishEditingAndCommit}\n onKeyDown={commitOnEnter}\n disabled={item.disabled}\n size='small'\n sx={styles.input}\n inputProps={{ 'aria-label': ariaLabel }}\n />","{ onChange, onChangeCommitted }: RangeProps","<RangeUI\n items={slice.data}\n formatter={slice.formatter}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />","data","formatter","{ count = 1 }: RangeSkeletonProps","count = 1","<Box sx={styles.root}>\n {Array.from({ length: count }).map((_, i) => (\n <Box key={`item-${i}`} sx={styles.item}>\n <Skeleton variant='rectangular' sx={styles.track} />\n <Box sx={styles.inputsRow}>\n <Skeleton variant='rectangular' sx={styles.input} />\n <Skeleton variant='rectangular' sx={styles.input} />\n </Box>\n </Box>\n ))}\n </Box>","(_, i) => (\n <Box key={`item-${i}`} sx={styles.item}>\n <Skeleton variant='rectangular' sx={styles.track} />\n <Box sx={styles.inputsRow}>\n <Skeleton variant='rectangular' sx={styles.input} />\n <Skeleton variant='rectangular' sx={styles.input} />\n </Box>\n </Box>\n )"],"sources":["../src/widgets-v2/range/style.ts","../src/widgets-v2/range/range-ui.tsx","../src/widgets-v2/range/range.tsx","../src/widgets-v2/range/skeleton.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n py: 1,\n },\n item: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1.5,\n },\n sliderContainer: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n px: 1,\n },\n slider: {\n width: '100%',\n '&.Mui-disabled': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n inputsRow: {\n display: 'flex',\n gap: 2,\n alignItems: 'center',\n },\n input: {\n flex: 1,\n '& .MuiInputBase-input': {\n textAlign: 'center',\n },\n },\n note: {\n color: 'text.secondary',\n },\n} satisfies Record<string, SxProps<Theme>>\n","import {\n useCallback,\n useState,\n type FocusEvent,\n type KeyboardEvent,\n} from 'react'\nimport { Box, Slider, TextField, Typography } from '@mui/material'\nimport type { RangeDataItem, RangeItemValue } from './types'\nimport { styles } from './style'\n\nexport interface RangeUIProps {\n items: readonly RangeDataItem[]\n /**\n * Fires on every pointer tick while a thumb is being dragged (mirrors\n * MUI `<Slider>`'s `onChange`). Use this to update local UI state —\n * not to persist expensive operations like remote queries.\n */\n onChange?: (index: number, value: RangeItemValue) => void\n /**\n * Fires once when the user *releases* a slider thumb after dragging,\n * after an arrow-key adjustment commits, or when the text inputs\n * blur / Enter. Mirrors MUI `<Slider>`'s `onChangeCommitted`. Use\n * this for side-effects you want to throttle to \"drag end\" — e.g.\n * writing the value to a source filter that triggers refetches.\n */\n onChangeCommitted?: (index: number, value: RangeItemValue) => void\n /** Number formatter for the slider tooltip and the text input display. */\n formatter?: (value: number) => string\n}\n\ntype Bound = 'min' | 'max'\n\n/**\n * Pure presentational component for the Range widget. Renders one MUI Slider\n * per item with editable min/max text inputs below — matching the Range v1\n * UX. Each item is always a two-thumb range; supply `value` to seed the\n * starting selection, otherwise it defaults to `[min, max]`.\n */\nexport function RangeUI({\n items,\n onChange,\n onChangeCommitted,\n formatter,\n}: RangeUIProps) {\n const fmt = formatter ?? ((n: number) => String(n))\n return (\n <Box sx={styles.root}>\n {items.map((item, i) => (\n // Composite of the row's track bounds — stable across reorders for\n // any realistic widget configuration. Falls back to a literal +\n // index when bounds collide (degenerate same-min-same-max rows).\n <RangeRow\n key={`range-${item.min}-${item.max}-${i}`}\n index={i}\n item={item}\n fmt={fmt}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />\n ))}\n </Box>\n )\n}\n\ninterface RangeRowProps {\n index: number\n item: RangeDataItem\n fmt: (n: number) => string\n onChange?: (index: number, value: RangeItemValue) => void\n onChangeCommitted?: (index: number, value: RangeItemValue) => void\n}\n\nfunction RangeRow({\n index,\n item,\n fmt,\n onChange,\n onChangeCommitted,\n}: RangeRowProps) {\n const current: readonly [number, number] = item.value ?? [item.min, item.max]\n const [editing, setEditing] = useState<'' | Bound>('')\n\n // Clamp inside [min, max] and keep `low <= high`. Pulled out so both the\n // live `onChange` path and the commit path share the same normalization.\n const normalize = useCallback(\n (next: readonly [number, number]): readonly [number, number] => {\n const [lowRaw, highRaw] = next\n const low = Math.min(Math.max(lowRaw, item.min), item.max)\n const high = Math.min(Math.max(highRaw, item.min), item.max)\n return low <= high ? [low, high] : [high, low]\n },\n [item.min, item.max],\n )\n\n const commit = useCallback(\n (next: readonly [number, number]) => {\n onChange?.(index, normalize(next))\n },\n [index, normalize, onChange],\n )\n\n const commitFinal = useCallback(\n (next: readonly [number, number]) => {\n onChangeCommitted?.(index, normalize(next))\n },\n [index, normalize, onChangeCommitted],\n )\n\n // A text-input commit (blur / Enter) is both a value change AND a final\n // commit, so it fires `onChange` *and* `onChangeCommitted`. Firing both\n // keeps the widget responsive for consumers that only wired `onChange`\n // (the pre-`onChangeCommitted` API) — without it, typing a value and\n // pressing Enter would silently no-op for them.\n const commitText = useCallback(\n (next: readonly [number, number]) => {\n const value = normalize(next)\n onChange?.(index, value)\n onChangeCommitted?.(index, value)\n },\n [index, normalize, onChange, onChangeCommitted],\n )\n\n const handleSlider = (_: Event, raw: number | number[]) => {\n if (!Array.isArray(raw)) return\n // Hoist defaults out of the destructure: react-compiler can't safely\n // reorder MemberExpression defaults inside an array pattern.\n const low = raw[0] ?? item.min\n const high = raw[1] ?? item.max\n commit([low, high])\n }\n\n const handleSliderCommitted = (\n _: Event | React.SyntheticEvent,\n raw: number | number[],\n ) => {\n if (!Array.isArray(raw)) return\n const low = raw[0] ?? item.min\n const high = raw[1] ?? item.max\n commitFinal([low, high])\n }\n\n return (\n <Box sx={styles.item}>\n <Box sx={styles.sliderContainer}>\n <Slider\n sx={{\n ...styles.slider,\n ...(item.color ? { color: item.color } : null),\n }}\n value={[...current]}\n min={item.min}\n max={item.max}\n step={item.step ?? 1}\n marks={resolveMarks(item.marks)}\n disabled={item.disabled}\n valueLabelDisplay='auto'\n valueLabelFormat={fmt}\n onChange={handleSlider}\n onChangeCommitted={handleSliderCommitted}\n />\n </Box>\n <Box sx={styles.inputsRow}>\n {/* Text-input commits (blur / Enter) are final, but also notify\n `onChange` — see `commitText` — so consumers that only wired\n `onChange` still update on a typed value. */}\n <BoundInput\n // Bumping the key on a fresh external value resets the local\n // editing state — matches v1's RangeItem behaviour.\n key={`min-${current[0]}`}\n name='min'\n value={current[0]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Minimum value'\n />\n <BoundInput\n key={`max-${current[1]}`}\n name='max'\n value={current[1]}\n item={item}\n fmt={fmt}\n editing={editing}\n setEditing={setEditing}\n commit={commitText}\n current={current}\n ariaLabel='Maximum value'\n />\n </Box>\n {item.note ? (\n <Typography variant='caption' sx={styles.note}>\n {item.note}\n </Typography>\n ) : null}\n </Box>\n )\n}\n\ninterface BoundInputProps {\n name: Bound\n value: number\n item: RangeDataItem\n fmt: (n: number) => string\n editing: '' | Bound\n setEditing: (next: '' | Bound) => void\n /**\n * Called when the user commits a new value (blur / Enter). Text input\n * edits never produce intermediate \"live\" values, so the consumer\n * only needs one callback — the row wires this to `commitFinal`.\n */\n commit: (next: readonly [number, number]) => void\n current: readonly [number, number]\n ariaLabel: string\n}\n\nfunction BoundInput({\n name,\n value,\n item,\n fmt,\n editing,\n setEditing,\n commit,\n current,\n ariaLabel,\n}: BoundInputProps) {\n const [raw, setRaw] = useState<string>(String(value))\n\n const beginEditing = () => {\n setEditing(name)\n }\n const finishEditingAndCommit = (e: FocusEvent<HTMLInputElement>) => {\n setEditing('')\n commitFromText(e.target.value)\n }\n const commitOnEnter = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n commitFromText((e.target as HTMLInputElement).value)\n ;(e.target as HTMLInputElement).blur()\n }\n }\n\n function commitFromText(input: string) {\n const parsed = parseFloat(input)\n const safe = Number.isFinite(parsed) ? parsed : value\n const next: readonly [number, number] =\n name === 'min' ? [safe, current[1]] : [current[0], safe]\n commit(next)\n }\n\n const display = editing === name ? raw : fmt(Number(raw))\n\n return (\n <TextField\n name={name}\n value={display}\n onChange={(e) => setRaw(e.target.value)}\n onFocus={beginEditing}\n onBlur={finishEditingAndCommit}\n onKeyDown={commitOnEnter}\n disabled={item.disabled}\n size='small'\n sx={styles.input}\n inputProps={{ 'aria-label': ariaLabel }}\n />\n )\n}\n\nfunction resolveMarks(\n marks: RangeDataItem['marks'],\n): boolean | { value: number; label?: string }[] | undefined {\n if (marks == null) return undefined\n if (typeof marks === 'boolean') return marks\n return [...marks]\n}\n","import { useWidgetId, useWidgetShallow } from '../stores'\nimport { RangeUI } from './range-ui'\nimport type { RangeItemValue, RangeWidgetData } from './types'\n\ninterface RangeSlice {\n data: RangeWidgetData\n formatter?: (value: number) => string\n}\n\nconst rangeSelector = (s: {\n data: unknown\n formatter?: (value: number) => string\n}): RangeSlice => ({\n data: (s.data ?? []) as RangeWidgetData,\n formatter: s.formatter,\n})\n\nexport interface RangeProps {\n /**\n * Fires on every pointer tick while a thumb is being dragged. Use this\n * for cheap UI updates (local state, optimistic display).\n */\n onChange?: (index: number, value: RangeItemValue) => void\n /**\n * Fires once when the user *releases* a slider thumb (or when the text\n * inputs blur / Enter, or when an arrow-key adjustment settles). Use\n * this for expensive side-effects you want throttled to drag end —\n * e.g. writing the value to a source filter that refetches widgets.\n */\n onChangeCommitted?: (index: number, value: RangeItemValue) => void\n}\n\n/**\n * Stateful Range bridge — reads `data` (post-pipeline) and `formatter` from\n * the per-widget store and forwards them to the pure {@link RangeUI}. Per\n * the destination-owned principle, value changes flow back through\n * `onChange` (per-tick) and `onChangeCommitted` (drag end) — the consumer\n * is expected to update the data prop on `<Provider>`. Use `disabled` on\n * individual `RangeDataItem`s to disable specific rows.\n */\nexport function Range({ onChange, onChangeCommitted }: RangeProps) {\n const id = useWidgetId()\n const slice = useWidgetShallow(id, rangeSelector)\n return (\n <RangeUI\n items={slice.data}\n formatter={slice.formatter}\n onChange={onChange}\n onChangeCommitted={onChangeCommitted}\n />\n )\n}\n","import { Box, Skeleton } from '@mui/material'\nimport type { SxProps, Theme } from '@mui/material'\n\nconst styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n py: 1,\n },\n item: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1.5,\n },\n track: { height: 32 },\n inputsRow: {\n display: 'flex',\n gap: 2,\n },\n input: { flex: 1, height: 40 },\n} satisfies Record<string, SxProps<Theme>>\n\nexport interface RangeSkeletonProps {\n count?: number\n}\n\n/**\n * Loading placeholder for the Range widget. Renders `count` rows, each\n * matching the slider-then-inputs layout of {@link RangeUI} so the layout\n * doesn't jump when data resolves.\n */\nexport function RangeSkeleton({ count = 1 }: RangeSkeletonProps) {\n return (\n <Box sx={styles.root}>\n {Array.from({ length: count }).map((_, i) => (\n <Box key={`item-${i}`} sx={styles.item}>\n <Skeleton variant='rectangular' sx={styles.track} />\n <Box sx={styles.inputsRow}>\n <Skeleton variant='rectangular' sx={styles.input} />\n <Skeleton variant='rectangular' sx={styles.input} />\n </Box>\n </Box>\n ))}\n </Box>\n )\n}\n"],"mappings":";;;;;;AAEA,IAAa,IAAS;CACpB,MAAM;EACJ,SAAS;EACT,eAAe;EACf,KAAK;EACL,IAAI;CACN;CACA,MAAM;EACJ,SAAS;EACT,eAAe;EACf,KAAK;CACP;CACA,iBAAiB;EACf,SAAS;EACT,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AAC,CAAC,CAAC,IAAIC,CAQlC;CACE,CAAA,GATmB,EAAA,KAAA,cADxBD;AAYJ;AAXyC,SAAA,EAAC,GAAG,GAAA;CACrC,OAAA,kBAAC,GAAD;EAAuB,IAAI,EAAO;EAAlC,UAAA,CACE,kBAAC,GAAD;GAAU,SAAQ;GAAc,IAAI,EAAO;EAAQ,CAAA,GACnD,kBAAC,GAAD;GAAK,IAAI,EAAO;GAAhB,UAAA,CACE,kBAAC,GAAD;IAAU,SAAQ;IAAc,IAAI,EAAO;GAAQ,CAAA,GACnD,kBAAC,GAAD;IAAU,SAAQ;IAAc,IAAI,EAAO;GAAQ,CAAA,CAChD;EACF,CAAA,CAAA;CANK,GAAA,QAAQ,GAMb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (n, r, o) => (o = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : o, n));
|
|
19
|
+
//#endregion
|
|
20
|
+
export { s as n, l as r, o as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as e } from "./use-widget-selector-VSPhfhNm.js";
|
|
2
|
+
import { c as t } from "react/compiler-runtime";
|
|
3
|
+
import { Box as n } from "@mui/material";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/widgets/formula/style.ts
|
|
6
|
+
var i = {
|
|
7
|
+
root: {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
gap: (e) => e.spacing(2)
|
|
11
|
+
},
|
|
12
|
+
item: { "&[data-disabled=\"true\"]": { color: (e) => e.palette.text.disabled } },
|
|
13
|
+
row: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
gap: (e) => e.spacing(1),
|
|
17
|
+
"& + &": { marginTop: (e) => e.spacing(1) }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/widgets/formula/components/row.tsx
|
|
22
|
+
function a(a) {
|
|
23
|
+
let s = t(3), c = e(a.id, o), l;
|
|
24
|
+
return s[0] !== c || s[1] !== a ? (l = c?.map((e, t) => /* @__PURE__ */ r(n, {
|
|
25
|
+
sx: i.row,
|
|
26
|
+
children: typeof a.children == "function" ? a.children({ index: t }) : a.children
|
|
27
|
+
}, `row-${t}`)), s[0] = c, s[1] = a, s[2] = l) : l = s[2], l;
|
|
28
|
+
}
|
|
29
|
+
function o(e) {
|
|
30
|
+
return e?.data;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as n, a as t };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=row-CvVGBuy_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-CvVGBuy_.js","names":["(w) => (w as FormulaWidgetState | undefined)?.data","data?.map((_, index) => {\n return (\n <Box sx={styles.row} key={`row-${index}`}>\n {typeof props.children === 'function'\n ? props.children({ index })\n : props.children}\n </Box>\n )\n })","props.children","data?.map"],"sources":["../src/widgets/formula/style.ts","../src/widgets/formula/components/row.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(2),\n },\n item: {\n '&[data-disabled=\"true\"]': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n row: {\n display: 'flex',\n alignItems: 'center',\n gap: (theme: Theme) => theme.spacing(1),\n\n '& + &': {\n marginTop: (theme: Theme) => theme.spacing(1),\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box } from '@mui/material'\nimport { styles } from '../style'\nimport type { FormulaWidgetState, RowProps } from '../types'\nimport { useWidgetSelector } from '../../stores/use-widget-selector'\n\n/**\n * Iterates over the widget's data items and renders a row for each one using render props.\n */\nexport function Row(props: RowProps) {\n const data = useWidgetSelector(\n props.id,\n (w) => (w as FormulaWidgetState | undefined)?.data,\n )\n\n return data?.map((_, index) => {\n return (\n <Box sx={styles.row} key={`row-${index}`}>\n {typeof props.children === 'function'\n ? props.children({ index })\n : props.children}\n </Box>\n )\n })\n}\n"],"mappings":";;;;;AAEA,IAAa,IAAS;CACpB,MAAM;EACJ,SAAS;EACT,eAAe;EACf,MAAM,MAAiB,EAAM,QAAQ,CAAC;CACxC;CACA,MAAM,EACJ,6BAA2B,EACzB,QAAQ,MAAiB,EAAM,QAAQ,KAAK,SAC9C,EACF;CACA,KAAK;EACH,SAAS;EACT,YAAY;EACZ,MAAM,MAAiB,EAAM,QAAQ,CAAC;EAEtC,SAAS,EACP,YAAY,MAAiB,EAAM,QAAQ,CAAC,EAC9C;CACF;AACF;;;ACdA,SAAgB,EAAI,GAAiB;eAC7B,IAAO,EACX,EAAM,IACNA,CACF,GAEOC;CAAP,OAGcC,EAAAA,OAAAA,KAAAA,EAAAA,OAAAA,KAHP,IAAA,GAAM,KAAK,GAAG,MAEjB,kBAAC,GAAD;EAAK,IAAI,EAAO;EACb,UAAA,OAAO,EAAM,YAAa,aACvB,EAAM,SAAS,EAAE,SAAM,CAAC,IACxB,EAAM;CACP,GAJqB,OAAO,GAI5B,CAER,GARMC,EAAAA,KAAAA,GAGOD,EAAAA,KAAAA,yBAHPD;AAST;AAZI,SAAA,EAAC,GAAA;CAAO,OAAA,GAAsC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { r as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./cjs-CBrZjPCj.js";
|
|
3
|
+
//#region src/widgets/echart/const.ts
|
|
4
|
+
var n = /* @__PURE__ */ e(t(), 1), r = "stacked";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/widgets/echart/utils.ts
|
|
7
|
+
function i(e, t, r) {
|
|
8
|
+
return (0, n.default)(e ?? {}, t ?? {}, { customMerge: (e) => {
|
|
9
|
+
let t = r?.(e);
|
|
10
|
+
if (t) return t;
|
|
11
|
+
if (e === "color") return (e, t) => t;
|
|
12
|
+
if (e === "axisLabel") return (e, t) => {
|
|
13
|
+
let n = {
|
|
14
|
+
...e,
|
|
15
|
+
...t
|
|
16
|
+
};
|
|
17
|
+
if (typeof e?.formatter == "function" && typeof t?.formatter == "function") {
|
|
18
|
+
let r = e.formatter, i = t.formatter;
|
|
19
|
+
n.formatter = (e) => r(e) === "" ? "" : i(e);
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
};
|
|
23
|
+
if (e === "series") return (e, t) => {
|
|
24
|
+
let r = Math.max(e?.length ?? 0, t?.length ?? 0);
|
|
25
|
+
return Array.from({ length: r }, (r, i) => {
|
|
26
|
+
let a = e?.[i] ?? {}, o = t?.[i] ?? {};
|
|
27
|
+
return (0, n.default)(a, o);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
} });
|
|
31
|
+
}
|
|
32
|
+
function a({ start: e, end: t } = {
|
|
33
|
+
start: 0,
|
|
34
|
+
end: 100
|
|
35
|
+
}, { inside: n = !0, xSlider: r = !0, ySlider: i = !1, showSliders: a = !0, xAxisLabelFormatter: s, bottomOffset: c = 0 } = {}, l) {
|
|
36
|
+
let u = l ? o(l) : {};
|
|
37
|
+
return { dataZoom: [
|
|
38
|
+
n && {
|
|
39
|
+
throttle: 0,
|
|
40
|
+
type: "inside",
|
|
41
|
+
xAxisIndex: r ? [0] : [],
|
|
42
|
+
yAxisIndex: i ? [0] : [],
|
|
43
|
+
show: !0,
|
|
44
|
+
zoomLock: !1,
|
|
45
|
+
start: e,
|
|
46
|
+
end: t
|
|
47
|
+
},
|
|
48
|
+
n && i && {
|
|
49
|
+
throttle: 0,
|
|
50
|
+
type: "inside",
|
|
51
|
+
show: !0,
|
|
52
|
+
zoomLock: !1,
|
|
53
|
+
start: e,
|
|
54
|
+
end: t,
|
|
55
|
+
orientation: "vertical"
|
|
56
|
+
},
|
|
57
|
+
r && {
|
|
58
|
+
throttle: 0,
|
|
59
|
+
type: "slider",
|
|
60
|
+
xAxisIndex: [0],
|
|
61
|
+
bottom: c,
|
|
62
|
+
height: parseInt(l?.spacing?.(4) ?? "32"),
|
|
63
|
+
show: a,
|
|
64
|
+
zoomLock: !1,
|
|
65
|
+
start: e,
|
|
66
|
+
end: t,
|
|
67
|
+
labelFormatter: s,
|
|
68
|
+
showDetail: !1,
|
|
69
|
+
...u,
|
|
70
|
+
brushSelect: !1,
|
|
71
|
+
moveHandleSize: 8,
|
|
72
|
+
handleSize: "100%",
|
|
73
|
+
handleIcon: "image://data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDkgMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9IjAuNSIgeT0iLTAuNSIgd2lkdGg9IjgiIGhlaWdodD0iMTgiIHJ4PSI0IiB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAtMSAwIDI3KSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iIzM1OEJFNyIvPgo8cmVjdCB3aWR0aD0iMyIgaGVpZ2h0PSIyIiByeD0iMSIgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMyAyMykiIGZpbGw9IiMzNThCRTciLz4KPHJlY3Qgd2lkdGg9IjMiIGhlaWdodD0iMiIgcng9IjEiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDMgMTkpIiBmaWxsPSIjMzU4QkU3Ii8+CjxyZWN0IHdpZHRoPSIzIiBoZWlnaHQ9IjIiIHJ4PSIxIiB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAtMSAzIDE1KSIgZmlsbD0iIzM1OEJFNyIvPgo8L3N2Zz4="
|
|
74
|
+
},
|
|
75
|
+
i && {
|
|
76
|
+
throttle: 0,
|
|
77
|
+
type: "slider",
|
|
78
|
+
left: parseInt(l?.spacing?.(6) ?? "48"),
|
|
79
|
+
width: parseInt(l?.spacing?.(4) ?? "32"),
|
|
80
|
+
yAxisIndex: [0],
|
|
81
|
+
show: a,
|
|
82
|
+
zoomLock: !1,
|
|
83
|
+
start: e,
|
|
84
|
+
end: t,
|
|
85
|
+
...u,
|
|
86
|
+
brushSelect: !1,
|
|
87
|
+
moveHandleSize: 8,
|
|
88
|
+
handleSize: "100%",
|
|
89
|
+
handleIcon: "image://data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDM2IDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iOCIgaGVpZ2h0PSIxOCIgcng9IjQiIHRyYW5zZm9ybT0icm90YXRlKC05MCAwLjUgMC41KSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iIzM1OEJFNyIvPgo8cmVjdCB3aWR0aD0iMyIgaGVpZ2h0PSIyIiByeD0iMSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDEzIDYpIiBmaWxsPSIjMzU4QkU3Ii8+CjxyZWN0IHdpZHRoPSIzIiBoZWlnaHQ9IjIiIHJ4PSIxIiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTcgNikiIGZpbGw9IiMzNThCRTciLz4KPHJlY3Qgd2lkdGg9IjMiIGhlaWdodD0iMiIgcng9IjEiIHRyYW5zZm9ybT0icm90YXRlKC05MCAyMSA2KSIgZmlsbD0iIzM1OEJFNyIvPgo8L3N2Zz4="
|
|
90
|
+
}
|
|
91
|
+
].filter((e) => !!e) };
|
|
92
|
+
}
|
|
93
|
+
function o(e) {
|
|
94
|
+
return {
|
|
95
|
+
fillerColor: "rgba(53, 139, 231, 0.25)",
|
|
96
|
+
borderColor: "rgba(53, 139, 231, 0.3)",
|
|
97
|
+
borderWidth: .5,
|
|
98
|
+
backgroundColor: "transparent",
|
|
99
|
+
borderRadius: 4,
|
|
100
|
+
dataBackground: {
|
|
101
|
+
lineStyle: { opacity: 0 },
|
|
102
|
+
areaStyle: {
|
|
103
|
+
opacity: 1,
|
|
104
|
+
color: e.palette.secondary.main
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
selectedDataBackground: {
|
|
108
|
+
lineStyle: { opacity: 0 },
|
|
109
|
+
areaStyle: {
|
|
110
|
+
opacity: 1,
|
|
111
|
+
color: e.palette.secondary.main
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
handleStyle: {
|
|
115
|
+
color: e.palette.common.white,
|
|
116
|
+
borderColor: "rgba(3, 111, 226, 0.08)",
|
|
117
|
+
borderWidth: 1,
|
|
118
|
+
shadowBlur: 3,
|
|
119
|
+
shadowColor: "rgba(0, 0, 0, 0.1)",
|
|
120
|
+
shadowOffsetX: 0,
|
|
121
|
+
shadowOffsetY: 1
|
|
122
|
+
},
|
|
123
|
+
textStyle: {
|
|
124
|
+
color: e.palette.black[60],
|
|
125
|
+
fontSize: parseInt(e.typography.overlineDelicate.fontSize),
|
|
126
|
+
fontFamily: e.typography.overlineDelicate.fontFamily
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function s({ brushType: e = "lineX", brushMode: t = "single", xAxisIndex: n = 0 } = {}) {
|
|
131
|
+
return { brush: {
|
|
132
|
+
toolbox: ["lineX", "clear"],
|
|
133
|
+
brushType: e,
|
|
134
|
+
brushMode: t,
|
|
135
|
+
xAxisIndex: n
|
|
136
|
+
} };
|
|
137
|
+
}
|
|
138
|
+
function c(e = r) {
|
|
139
|
+
return { stack: e };
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/widgets/echart/shared-resize-observer.ts
|
|
143
|
+
var l = /* @__PURE__ */ new Map(), u = null;
|
|
144
|
+
function d() {
|
|
145
|
+
return u ??= new ResizeObserver((e) => {
|
|
146
|
+
for (let t of e) l.get(t.target)?.();
|
|
147
|
+
}), u;
|
|
148
|
+
}
|
|
149
|
+
function f(e, t) {
|
|
150
|
+
return l.set(e, t), d().observe(e), () => {
|
|
151
|
+
l.delete(e), d().unobserve(e);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { i as a, a as i, s as n, r as o, c as r, f as t };
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=shared-resize-observer-BEiP2rQt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-resize-observer-BEiP2rQt.js","names":[],"sources":["../src/widgets/echart/const.ts","../src/widgets/echart/utils.ts","../src/widgets/echart/shared-resize-observer.ts"],"sourcesContent":["export const DEFAULT_STACK_GROUP = 'stacked'\n","import deepmerge from 'deepmerge'\nimport type { EchartOptionsProps } from './types'\nimport type { Theme } from '@mui/material'\nimport { DEFAULT_STACK_GROUP } from './const'\n\n/**\n * Deep-merges two ECharts option objects with smart handling for `color`, `axisLabel`, and `series` keys.\n *\n * @param optionA - Base ECharts options.\n * @param optionB - Override ECharts options to merge on top.\n * @param customMergeFn - Optional function returning a custom merge strategy per key.\n * @returns The merged ECharts options object.\n *\n * @remarks\n * - `color` arrays are replaced entirely (not concatenated).\n * - `axisLabel` formatters are composed so the base formatter can suppress values by returning `''`.\n * - `series` arrays are merged element-by-element rather than concatenated.\n *\n * @example\n * ```tsx\n * const option = mergeEchartWidgetConfig(props.option, {\n * series: [{ barWidth: '60%', itemStyle: { borderRadius: [4, 4, 0, 0] } }],\n * tooltip: { trigger: 'axis' },\n * })\n * ```\n */\nexport function mergeEchartWidgetConfig<T extends EchartOptionsProps>(\n optionA: T | undefined,\n optionB: T | undefined,\n customMergeFn?: (\n key: string,\n ) => ((a: unknown, b: unknown) => unknown) | undefined,\n): T {\n return deepmerge(optionA ?? {}, optionB ?? {}, {\n customMerge: (key) => {\n const externalMerge = customMergeFn?.(key)\n if (externalMerge) return externalMerge\n\n if (key === 'color') {\n return (_, b: T['color']) => b\n }\n if (key === 'axisLabel') {\n return (\n a: Record<string, unknown> | undefined,\n b: Record<string, unknown> | undefined,\n ) => {\n const merged = { ...a, ...b }\n if (\n typeof a?.formatter === 'function' &&\n typeof b?.formatter === 'function'\n ) {\n const baseFormatter = a.formatter as (value: unknown) => unknown\n const customFormatter = b.formatter as (value: unknown) => unknown\n merged.formatter = (value: unknown) => {\n const baseResult = baseFormatter(value)\n if (baseResult === '') return ''\n return customFormatter(value)\n }\n }\n return merged\n }\n }\n if (key === 'series') {\n return (a: T['series'][], b: T['series'][]) => {\n const maxLength = Math.max(a?.length ?? 0, b?.length ?? 0)\n return Array.from({ length: maxLength }, (_, index) => {\n const aItem = a?.[index] ?? {}\n const bItem = b?.[index] ?? {}\n return deepmerge(aItem, bItem as object)\n })\n }\n }\n },\n }) as T\n}\n\n/**\n * Generates ECharts `dataZoom` configuration for interactive zoom and pan on chart axes.\n *\n * @param range - Initial visible range as `{ start, end }` percentages (0-100). Defaults to full range.\n * @param options - Zoom behavior options including axis sliders, inside zoom, and formatter.\n * @param theme - Optional MUI theme for styled slider handles and backgrounds.\n * @returns An object containing the `dataZoom` array configuration.\n */\nexport function getEChartZoomConfig(\n { start, end }: { start: number; end: number } = { start: 0, end: 100 },\n {\n inside = true,\n xSlider = true,\n ySlider = false,\n showSliders = true,\n xAxisLabelFormatter,\n bottomOffset = 0,\n } = {} as {\n inside?: boolean\n xSlider?: boolean\n ySlider?: boolean\n showSliders?: boolean\n xAxisLabelFormatter?: (value: number) => string\n bottomOffset?: number\n },\n theme?: Theme,\n) {\n const zoom = true\n const sliderStyles = theme ? getEChartZoomSliderStyles(theme) : {}\n\n return {\n dataZoom: [\n inside && {\n throttle: 0,\n type: 'inside',\n xAxisIndex: xSlider ? [0] : [],\n yAxisIndex: ySlider ? [0] : [],\n show: zoom,\n zoomLock: !zoom,\n start,\n end,\n },\n inside &&\n ySlider && {\n throttle: 0,\n type: 'inside',\n show: zoom,\n zoomLock: !zoom,\n start,\n end,\n orientation: 'vertical',\n },\n xSlider && {\n throttle: 0,\n type: 'slider',\n xAxisIndex: [0],\n bottom: bottomOffset,\n height: parseInt(theme?.spacing?.(4) ?? '32'),\n show: zoom && showSliders,\n zoomLock: !zoom,\n start,\n end,\n labelFormatter: xAxisLabelFormatter,\n showDetail: false,\n ...sliderStyles,\n brushSelect: false,\n moveHandleSize: 8,\n handleSize: '100%',\n handleIcon:\n 'image://data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDkgMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9IjAuNSIgeT0iLTAuNSIgd2lkdGg9IjgiIGhlaWdodD0iMTgiIHJ4PSI0IiB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAtMSAwIDI3KSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iIzM1OEJFNyIvPgo8cmVjdCB3aWR0aD0iMyIgaGVpZ2h0PSIyIiByeD0iMSIgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMyAyMykiIGZpbGw9IiMzNThCRTciLz4KPHJlY3Qgd2lkdGg9IjMiIGhlaWdodD0iMiIgcng9IjEiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDMgMTkpIiBmaWxsPSIjMzU4QkU3Ii8+CjxyZWN0IHdpZHRoPSIzIiBoZWlnaHQ9IjIiIHJ4PSIxIiB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAtMSAzIDE1KSIgZmlsbD0iIzM1OEJFNyIvPgo8L3N2Zz4=',\n },\n ySlider && {\n throttle: 0,\n type: 'slider',\n left: parseInt(theme?.spacing?.(6) ?? '48'),\n width: parseInt(theme?.spacing?.(4) ?? '32'),\n yAxisIndex: [0],\n show: zoom && showSliders,\n zoomLock: !zoom,\n start,\n end,\n ...sliderStyles,\n brushSelect: false,\n moveHandleSize: 8,\n handleSize: '100%',\n handleIcon:\n 'image://data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDM2IDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iOCIgaGVpZ2h0PSIxOCIgcng9IjQiIHRyYW5zZm9ybT0icm90YXRlKC05MCAwLjUgMC41KSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iIzM1OEJFNyIvPgo8cmVjdCB3aWR0aD0iMyIgaGVpZ2h0PSIyIiByeD0iMSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDEzIDYpIiBmaWxsPSIjMzU4QkU3Ii8+CjxyZWN0IHdpZHRoPSIzIiBoZWlnaHQ9IjIiIHJ4PSIxIiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTcgNikiIGZpbGw9IiMzNThCRTciLz4KPHJlY3Qgd2lkdGg9IjMiIGhlaWdodD0iMiIgcng9IjEiIHRyYW5zZm9ybT0icm90YXRlKC05MCAyMSA2KSIgZmlsbD0iIzM1OEJFNyIvPgo8L3N2Zz4=',\n },\n ].filter((d) => !!d),\n }\n}\n\nfunction getEChartZoomSliderStyles(theme: Theme) {\n return {\n fillerColor: 'rgba(53, 139, 231, 0.25)',\n borderColor: 'rgba(53, 139, 231, 0.3)',\n borderWidth: 0.5,\n backgroundColor: 'transparent',\n borderRadius: 4,\n dataBackground: {\n lineStyle: {\n opacity: 0,\n },\n areaStyle: {\n opacity: 1,\n color: theme.palette.secondary.main,\n },\n },\n selectedDataBackground: {\n lineStyle: {\n opacity: 0,\n },\n areaStyle: {\n opacity: 1,\n color: theme.palette.secondary.main,\n },\n },\n handleStyle: {\n color: theme.palette.common.white,\n borderColor: 'rgba(3, 111, 226, 0.08)',\n borderWidth: 1,\n shadowBlur: 3,\n shadowColor: 'rgba(0, 0, 0, 0.1)',\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n },\n textStyle: {\n color: theme.palette.black[60],\n fontSize: parseInt(theme.typography.overlineDelicate.fontSize as string),\n fontFamily: theme.typography.overlineDelicate.fontFamily,\n },\n } as const\n}\n\n/**\n * Generates ECharts `brush` configuration for interactive data selection on charts.\n *\n * @param options - Brush options including type, mode, and target axis index.\n * @returns An object containing the `brush` configuration.\n */\nexport function getEChartBrushConfig(\n { brushType = 'lineX', brushMode = 'single', xAxisIndex = 0 } = {} as {\n brushType?: string\n brushMode?: string\n xAxisIndex?: number\n throttleType?: string\n throttleDelay?: number\n },\n) {\n return {\n brush: {\n toolbox: ['lineX', 'clear'],\n brushType,\n brushMode,\n xAxisIndex,\n },\n }\n}\n\n/**\n * Returns an ECharts `stack` configuration to group series into a stacked layout.\n *\n * @param stackGroup - The stack group identifier. Defaults to the library's default group.\n * @returns An object with the `stack` property set to the group name.\n */\nexport function getEChartStackConfig(stackGroup: string = DEFAULT_STACK_GROUP) {\n return { stack: stackGroup }\n}\n","/**\n * Shared ResizeObserver singleton for all ECharts instances.\n *\n * Instead of creating 100+ individual ResizeObserver instances (one per chart),\n * this module provides a single shared observer that efficiently handles resize\n * callbacks for all registered elements.\n */\n\ntype ResizeCallback = () => void\n\nconst callbacks = new Map<Element, ResizeCallback>()\n\nlet observer: ResizeObserver | null = null\n\nfunction getObserver(): ResizeObserver {\n observer ??= new ResizeObserver((entries) => {\n for (const entry of entries) {\n const callback = callbacks.get(entry.target)\n callback?.()\n }\n })\n return observer\n}\n\nexport function observeResize(\n element: Element,\n callback: ResizeCallback,\n): () => void {\n callbacks.set(element, callback)\n getObserver().observe(element)\n\n return () => {\n callbacks.delete(element)\n getObserver().unobserve(element)\n }\n}\n\n/** Reset the shared observer (for testing only). */\nexport function resetSharedResizeObserver(): void {\n if (observer) {\n observer.disconnect()\n observer = null\n }\n callbacks.clear()\n}\n"],"mappings":";;;mCAAa,IAAsB;;;AC0BnC,SAAgB,EACd,GACA,GACA,GAGG;CACH,QAAA,GAAO,EAAA,QAAA,CAAU,KAAW,CAAC,GAAG,KAAW,CAAC,GAAG,EAC7C,cAAc,MAAQ;EACpB,IAAM,IAAgB,IAAgB,CAAG;EACzC,IAAI,GAAe,OAAO;EAE1B,IAAI,MAAQ,SACV,QAAQ,GAAG,MAAkB;EAE/B,IAAI,MAAQ,aACV,QACE,GACA,MACG;GACH,IAAM,IAAS;IAAE,GAAG;IAAG,GAAG;GAAE;GAC5B,IACE,OAAO,GAAG,aAAc,cACxB,OAAO,GAAG,aAAc,YACxB;IACA,IAAM,IAAgB,EAAE,WAClB,IAAkB,EAAE;IAC1B,EAAO,aAAa,MACC,EAAc,CAC7B,MAAe,KAAW,KACvB,EAAgB,CAAK;GAEhC;GACA,OAAO;EACT;EAEF,IAAI,MAAQ,UACV,QAAQ,GAAkB,MAAqB;GAC7C,IAAM,IAAY,KAAK,IAAI,GAAG,UAAU,GAAG,GAAG,UAAU,CAAC;GACzD,OAAO,MAAM,K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2
|
+
import { c as t } from "react/compiler-runtime";
|
|
3
|
+
import { useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/smart-tooltip/smart-tooltip.tsx
|
|
6
|
+
var o = [];
|
|
7
|
+
function s(s) {
|
|
8
|
+
let c = t(13), { title: l, dependencies: u, timeout: d, TooltipProps: f, children: p } = s, m = u === void 0 ? o : u, h = d === void 0 ? 500 : d, g = r(null), [_, v] = i(!1), y;
|
|
9
|
+
c[0] === m ? y = c[1] : (y = JSON.stringify(m), c[0] = m, c[1] = y);
|
|
10
|
+
let b = y, x;
|
|
11
|
+
c[2] === h ? x = c[3] : (x = () => {
|
|
12
|
+
let e = () => {
|
|
13
|
+
let e = g.current;
|
|
14
|
+
e && v(e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight);
|
|
15
|
+
}, t = setTimeout(e, h), n = g.current, r = n && typeof ResizeObserver < "u" ? new ResizeObserver(e) : null;
|
|
16
|
+
return n && r?.observe(n), () => {
|
|
17
|
+
clearTimeout(t), r?.disconnect();
|
|
18
|
+
};
|
|
19
|
+
}, c[2] = h, c[3] = x);
|
|
20
|
+
let S;
|
|
21
|
+
c[4] !== b || c[5] !== h ? (S = [b, h], c[4] = b, c[5] = h, c[6] = S) : S = c[6], n(x, S);
|
|
22
|
+
let C = _ && l, w;
|
|
23
|
+
c[7] === p ? w = c[8] : (w = p({ ref: g }), c[7] = p, c[8] = w);
|
|
24
|
+
let T;
|
|
25
|
+
return c[9] !== f || c[10] !== C || c[11] !== w ? (T = /* @__PURE__ */ a(e, {
|
|
26
|
+
title: C,
|
|
27
|
+
...f,
|
|
28
|
+
children: w
|
|
29
|
+
}), c[9] = f, c[10] = C, c[11] = w, c[12] = T) : T = c[12], T;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { s as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=smart-tooltip-CwGHCqab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-tooltip-CwGHCqab.js","names":["{\n title,\n dependencies = EMPTY_DEPENDENCIES,\n timeout = 500,\n TooltipProps,\n children,\n}: {\n title: string | undefined\n dependencies?: unknown[]\n timeout?: number\n children: (props: { ref: Ref<T> }) => JSX.Element\n TooltipProps?: Partial<TooltipProps>\n}","dependencies = EMPTY_DEPENDENCIES","timeout = 500","JSON.stringify(dependencies)","() => {\n const checkOverflow = () => {\n const el = ref.current\n if (!el) return\n setIsOverflowing(\n el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight,\n )\n }\n\n // Initial measure after layout settles (fonts, flex collapse, …).\n const timerId = setTimeout(checkOverflow, timeout)\n // Re-measure when the element is resized (e.g. legend title reflows as\n // hover-faded actions collapse/expand).\n const el = ref.current\n const resizeObserver =\n el && typeof ResizeObserver !== 'undefined'\n ? new ResizeObserver(checkOverflow)\n : null\n if (el) resizeObserver?.observe(el)\n\n return () => {\n clearTimeout(timerId)\n resizeObserver?.disconnect()\n }\n }","el","[dependenciesKey, timeout]","children({ ref })","<Tooltip title={isOverflowing && title} {...TooltipProps}>\n {children({ ref })}\n </Tooltip>","isOverflowing && title"],"sources":["../src/components/smart-tooltip/smart-tooltip.tsx"],"sourcesContent":["import type { TooltipProps } from '@mui/material'\nimport { useLayoutEffect, useRef, useState, type JSX, type Ref } from 'react'\nimport { Tooltip } from '../tooltip/tooltip'\n\nconst EMPTY_DEPENDENCIES: unknown[] = []\n\n/**\n * An intelligent tooltip wrapper that automatically detects text overflow and displays a tooltip only when content is truncated.\n *\n * @remarks\n * Uses a render prop pattern. The child function receives a `ref` that must be attached to the element being monitored for overflow. Use the `dependencies` array to trigger re-evaluation when content or container size changes.\n *\n * @example\n * ```tsx\n * <SmartTooltip title=\"This is a long text that might get truncated\">\n * {({ ref }) => (\n * <Typography ref={ref} noWrap sx={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>\n * This is a long text that might get truncated\n * </Typography>\n * )}\n * </SmartTooltip>\n * ```\n */\nexport function SmartTooltip<T extends HTMLElement>({\n title,\n dependencies = EMPTY_DEPENDENCIES,\n timeout = 500,\n TooltipProps,\n children,\n}: {\n title: string | undefined\n dependencies?: unknown[]\n timeout?: number\n children: (props: { ref: Ref<T> }) => JSX.Element\n TooltipProps?: Partial<TooltipProps>\n}) {\n const ref = useRef<T>(null)\n const [isOverflowing, setIsOverflowing] = useState(false)\n // Call sites pass a fresh `dependencies={[…]}` literal each render; key by\n // value so the effect does not churn ResizeObserver on referential churn.\n const dependenciesKey = JSON.stringify(dependencies)\n\n useLayoutEffect(() => {\n const checkOverflow = () => {\n const el = ref.current\n if (!el) return\n setIsOverflowing(\n el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight,\n )\n }\n\n // Initial measure after layout settles (fonts, flex collapse, …).\n const timerId = setTimeout(checkOverflow, timeout)\n // Re-measure when the element is resized (e.g. legend title reflows as\n // hover-faded actions collapse/expand).\n const el = ref.current\n const resizeObserver =\n el && typeof ResizeObserver !== 'undefined'\n ? new ResizeObserver(checkOverflow)\n : null\n if (el) resizeObserver?.observe(el)\n\n return () => {\n clearTimeout(timerId)\n resizeObserver?.disconnect()\n }\n }, [dependenciesKey, timeout])\n\n return (\n <Tooltip title={isOverflowing && title} {...TooltipProps}>\n {children({ ref })}\n </Tooltip>\n )\n}\n"],"mappings":";;;;;AAIA,IAAM,IAAgC,CAAC;AAmBvC,SAAgB,EAAA,GAYb;gBAZiD,EAClD,UACA,cAAA,GACA,SAAA,GACA,iBACA,gBALkDA,GAElD,IAAA,MAAA,KAAA,IAAe,IAAfC,GACA,IAAA,MAAA,KAAA,IAAU,MAAVC,GAUM,IAAM,EAAU,IAAI,GACpB,CAAC,GAAe,KAAoB,EAAS,EAAK,GAGhCC;CAAe,AAAA,EAAA,OAAA,gBAAf,IAAA,KAAK,UAAU,CAAY,GAAZ,EAAA,KAAA;CAAvC,IAAM,IAAkBA,GAERC;CAU4B,AAAA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