@carto/ps-react-ui 4.19.0 → 4.20.1
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-DKX98LlI.js +1318 -0
- package/dist/actions-DKX98LlI.js.map +1 -0
- package/dist/actions-Dy9JVr7F.js +1004 -0
- package/dist/actions-Dy9JVr7F.js.map +1 -0
- package/dist/category-DHZscHaS.js +826 -0
- package/dist/category-DHZscHaS.js.map +1 -0
- package/dist/chart-config-BGt7wkK7.js +108 -0
- package/dist/chart-config-BGt7wkK7.js.map +1 -0
- package/dist/chat.js +1589 -1711
- package/dist/chat.js.map +1 -1
- package/dist/cjs-CBrZjPCj.js +75 -0
- package/dist/cjs-CBrZjPCj.js.map +1 -0
- package/dist/components-DDt4mOQn.js +2403 -0
- package/dist/components-DDt4mOQn.js.map +1 -0
- package/dist/components.js +5 -1841
- package/dist/copy-button-DaQqWVu0.js +25 -0
- package/dist/copy-button-DaQqWVu0.js.map +1 -0
- package/dist/csv-modifiers-D6HGC24b.js +26 -0
- package/dist/csv-modifiers-D6HGC24b.js.map +1 -0
- package/dist/download-BT6qBamM.js +232 -0
- package/dist/download-BT6qBamM.js.map +1 -0
- package/dist/echart-BkaV3V5G.js +133 -0
- package/dist/echart-BkaV3V5G.js.map +1 -0
- package/dist/echart-DSz2Tu0z.js +250 -0
- package/dist/echart-DSz2Tu0z.js.map +1 -0
- package/dist/formatter-wVO81tYk.js +6 -0
- package/dist/formatter-wVO81tYk.js.map +1 -0
- package/dist/formula-Bk9CBzm2.js +190 -0
- package/dist/formula-Bk9CBzm2.js.map +1 -0
- package/dist/formula-Dsru_p-g.js +285 -0
- package/dist/formula-Dsru_p-g.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 -24
- package/dist/legend.js +2274 -2323
- package/dist/legend.js.map +1 -1
- package/dist/markdown-DnSJMPjQ.js +165 -0
- package/dist/markdown-DnSJMPjQ.js.map +1 -0
- package/dist/markdown-content-BzKoX3eu.js +8764 -0
- package/dist/markdown-content-BzKoX3eu.js.map +1 -0
- package/dist/range-BPWVrAsY.js +277 -0
- package/dist/range-BPWVrAsY.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-Dy8pshpN.js +149 -0
- package/dist/spread-Dy8pshpN.js.map +1 -0
- package/dist/stores-B81-IU1G.js +374 -0
- package/dist/stores-B81-IU1G.js.map +1 -0
- package/dist/stores-BVFMfgyo.js +248 -0
- package/dist/stores-BVFMfgyo.js.map +1 -0
- package/dist/styles-Y-qGBELO.js +13 -0
- package/dist/styles-Y-qGBELO.js.map +1 -0
- package/dist/table-BfTG6rrs.js +439 -0
- package/dist/table-BfTG6rrs.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 +1 -1
- package/dist/types/chat/bubbles/chat-error-message.d.ts +1 -1
- package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +1 -1
- package/dist/types/chat/bubbles/chat-user-message.d.ts +1 -1
- package/dist/types/chat/containers/chat-footer.d.ts +1 -1
- package/dist/types/chat/containers/chat-header.d.ts +1 -1
- package/dist/types/chat/containers/chat-starter.d.ts +1 -1
- package/dist/types/chat/feedback/chat-loader.d.ts +1 -1
- package/dist/types/chat/feedback/chat-rating-action.d.ts +1 -1
- package/dist/types/chat/feedback/chat-thinking.d.ts +1 -1
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +1 -1
- package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +1 -1
- package/dist/types/chat/feedback/chat-tool-group.d.ts +1 -1
- package/dist/types/chat/feedback/chat-tool-trace.d.ts +2 -2
- package/dist/types/components/basemaps/group-wrapper.d.ts +1 -1
- package/dist/types/components/basemaps/group.d.ts +1 -1
- package/dist/types/components/basemaps/header.d.ts +1 -1
- package/dist/types/components/copy-button/copy-button.d.ts +1 -1
- package/dist/types/components/lasso-tool/chip.d.ts +1 -1
- package/dist/types/components/lasso-tool/icons.d.ts +7 -7
- package/dist/types/components/lasso-tool/lasso-tool.d.ts +4 -4
- package/dist/types/components/lasso-tool/message.d.ts +1 -1
- package/dist/types/components/list-data/list-data-skeleton.d.ts +1 -1
- package/dist/types/components/measurement-tools/icons.d.ts +3 -3
- package/dist/types/components/no-data-alert/no-data-alert.d.ts +1 -1
- package/dist/types/components/responsive-drawer/responsive-drawer.d.ts +1 -1
- package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/hooks/use-widget-ref.d.ts +2 -1
- package/dist/types/legend/components/legend-actions/legend-actions.d.ts +1 -1
- package/dist/types/legend/components/legend-category/legend-category-ui.d.ts +1 -1
- package/dist/types/legend/components/legend-config-select/legend-config-select.d.ts +1 -1
- package/dist/types/legend/components/legend-group/legend-group.d.ts +1 -1
- package/dist/types/legend/components/legend-group-menu/legend-group-menu-items.d.ts +4 -4
- package/dist/types/legend/components/legend-group-menu/legend-group-menu.d.ts +1 -1
- package/dist/types/legend/components/legend-icon/legend-icon-ui.d.ts +1 -1
- package/dist/types/legend/components/legend-item/legend-item-ui.d.ts +1 -1
- package/dist/types/legend/components/legend-item/legend-item.d.ts +1 -1
- package/dist/types/legend/components/legend-opacity/legend-opacity.d.ts +2 -2
- package/dist/types/legend/components/legend-overflow-menu/legend-overflow-menu.d.ts +1 -1
- package/dist/types/legend/components/legend-panel-menu/legend-panel-menu.d.ts +1 -1
- package/dist/types/legend/components/legend-proportion/legend-proportion-ui.d.ts +1 -1
- package/dist/types/legend/components/legend-ramp/legend-ramp-ui.d.ts +1 -1
- package/dist/types/legend/components/legend-row/legend-row.d.ts +1 -1
- package/dist/types/legend/components/legend-row-menu/legend-row-menu-items.d.ts +2 -2
- package/dist/types/legend/components/legend-row-menu/legend-row-menu.d.ts +1 -1
- package/dist/types/legend/components/legend-row-menu/legend-zoom-to.d.ts +1 -1
- package/dist/types/legend/components/legend-sortable/legend-sortable.d.ts +1 -1
- package/dist/types/legend/components/legend-swatch/legend-swatch.d.ts +1 -1
- package/dist/types/legend/components/legend-visibility-toggle/legend-visibility-toggle.d.ts +1 -1
- package/dist/types/legend/components/legend-visible-layers/legend-visible-layers.d.ts +1 -1
- package/dist/types/legend/index.d.ts +2 -2
- package/dist/types/legend/provider/legend-provider.d.ts +1 -1
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +1 -1
- 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 +1 -1
- package/dist/types/widgets/actions/change-column/sortable-column-item.d.ts +1 -1
- package/dist/types/widgets/actions/download/download.d.ts +1 -1
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +1 -1
- package/dist/types/widgets/actions/lock-selection/lock-selection.d.ts +1 -1
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +1 -1
- package/dist/types/widgets/actions/searcher/searcher-toggle.d.ts +1 -1
- package/dist/types/widgets/actions/searcher/searcher.d.ts +1 -1
- 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 +1 -1
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +1 -1
- package/dist/types/widgets/bar/skeleton.d.ts +1 -1
- package/dist/types/widgets/category/category-ui.d.ts +1 -1
- package/dist/types/widgets/category/components/category-bar.d.ts +1 -1
- package/dist/types/widgets/category/components/category-legend.d.ts +1 -1
- package/dist/types/widgets/category/components/category-row-multi.d.ts +1 -1
- package/dist/types/widgets/category/components/category-row-other.d.ts +1 -1
- package/dist/types/widgets/category/components/category-row-single.d.ts +1 -1
- package/dist/types/widgets/category/skeleton.d.ts +1 -1
- package/dist/types/widgets/echart/echart-ui.d.ts +1 -1
- package/dist/types/widgets/echart/echart.d.ts +1 -1
- package/dist/types/widgets/error/error.d.ts +1 -1
- package/dist/types/widgets/formula/components/item.d.ts +1 -1
- package/dist/types/widgets/formula/components/prefix.d.ts +1 -1
- package/dist/types/widgets/formula/components/row.d.ts +1 -1
- package/dist/types/widgets/formula/components/series.d.ts +1 -1
- package/dist/types/widgets/formula/components/suffix.d.ts +1 -1
- package/dist/types/widgets/formula/components/value.d.ts +1 -1
- package/dist/types/widgets/formula/formula-ui.d.ts +1 -1
- package/dist/types/widgets/formula/skeleton.d.ts +1 -1
- package/dist/types/widgets/histogram/skeleton.d.ts +1 -1
- package/dist/types/widgets/markdown/markdown-ui.d.ts +1 -1
- package/dist/types/widgets/markdown/markdown.d.ts +1 -1
- package/dist/types/widgets/markdown/skeleton.d.ts +1 -1
- package/dist/types/widgets/no-data/no-data.d.ts +1 -1
- package/dist/types/widgets/note/note.d.ts +1 -1
- package/dist/types/widgets/pie/skeleton.d.ts +1 -1
- package/dist/types/widgets/range/components/range-item.d.ts +1 -1
- package/dist/types/widgets/range/range-ui.d.ts +1 -1
- package/dist/types/widgets/range/skeleton.d.ts +1 -1
- package/dist/types/widgets/scatterplot/skeleton.d.ts +1 -1
- package/dist/types/widgets/selection-summary/selection-summary.d.ts +1 -1
- package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +1 -1
- package/dist/types/widgets/spread/components/max-value.d.ts +1 -1
- package/dist/types/widgets/spread/components/min-value.d.ts +1 -1
- package/dist/types/widgets/spread/components/separator.d.ts +1 -1
- package/dist/types/widgets/spread/skeleton.d.ts +1 -1
- package/dist/types/widgets/spread/spread-ui.d.ts +1 -1
- package/dist/types/widgets/subheader/subheader.d.ts +1 -1
- package/dist/types/widgets/table/components/cell-header.d.ts +1 -1
- package/dist/types/widgets/table/components/cell.d.ts +1 -1
- package/dist/types/widgets/table/components/pagination-actions.d.ts +1 -1
- package/dist/types/widgets/table/components/pagination.d.ts +1 -1
- package/dist/types/widgets/table/components/row.d.ts +1 -1
- package/dist/types/widgets/table/skeleton.d.ts +1 -1
- package/dist/types/widgets/table/table-ui.d.ts +2 -2
- package/dist/types/widgets/timeseries/skeleton.d.ts +1 -1
- package/dist/types/widgets/wrapper/components/actions.d.ts +1 -1
- package/dist/types/widgets/wrapper/components/options.d.ts +1 -1
- package/dist/types/widgets/wrapper/components/title.d.ts +1 -1
- package/dist/types/widgets/wrapper/wrapper-ui.d.ts +1 -1
- package/dist/types/widgets/wrapper/wrapper.d.ts +1 -1
- package/dist/types/widgets-v2/actions/brush-toggle/brush-toggle.d.ts +1 -1
- package/dist/types/widgets-v2/actions/change-column/change-column-icon.d.ts +1 -1
- package/dist/types/widgets-v2/actions/change-column/change-column.d.ts +1 -1
- package/dist/types/widgets-v2/actions/change-column/sortable-column-item.d.ts +1 -1
- package/dist/types/widgets-v2/actions/download/download.d.ts +1 -1
- package/dist/types/widgets-v2/actions/download/icons.d.ts +3 -3
- package/dist/types/widgets-v2/actions/fullscreen/fullscreen.d.ts +2 -2
- package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +1 -1
- package/dist/types/widgets-v2/actions/relative-data/relative-data.d.ts +1 -1
- package/dist/types/widgets-v2/actions/searcher/searcher-toggle.d.ts +1 -1
- package/dist/types/widgets-v2/actions/searcher/searcher.d.ts +1 -1
- package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +1 -1
- package/dist/types/widgets-v2/actions/stack-toggle/stack-toggle.d.ts +1 -1
- package/dist/types/widgets-v2/actions/zoom-toggle/zoom-toggle.d.ts +1 -1
- package/dist/types/widgets-v2/bar/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/category/category-ui.d.ts +1 -1
- package/dist/types/widgets-v2/category/category.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-bar-stacked.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-bar.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-legend.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-row-multi.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-row-single.d.ts +1 -1
- package/dist/types/widgets-v2/category/components/category-row-stacked.d.ts +1 -1
- package/dist/types/widgets-v2/category/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/echart/echart-ui.d.ts +1 -1
- package/dist/types/widgets-v2/echart/echart.d.ts +1 -1
- package/dist/types/widgets-v2/formula/delta.d.ts +1 -1
- package/dist/types/widgets-v2/formula/formula-ui.d.ts +1 -1
- package/dist/types/widgets-v2/formula/formula.d.ts +1 -1
- package/dist/types/widgets-v2/formula/note.d.ts +1 -1
- package/dist/types/widgets-v2/formula/prefix.d.ts +1 -1
- package/dist/types/widgets-v2/formula/series.d.ts +1 -1
- package/dist/types/widgets-v2/formula/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/formula/suffix.d.ts +1 -1
- package/dist/types/widgets-v2/formula/value.d.ts +1 -1
- package/dist/types/widgets-v2/histogram/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/index.d.ts +5 -5
- package/dist/types/widgets-v2/markdown/markdown-content.d.ts +1 -1
- package/dist/types/widgets-v2/markdown/markdown-ui.d.ts +1 -1
- package/dist/types/widgets-v2/markdown/markdown.d.ts +1 -1
- package/dist/types/widgets-v2/markdown/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/note/widget-note.d.ts +2 -2
- package/dist/types/widgets-v2/pie/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/provider/widget-provider.d.ts +1 -1
- package/dist/types/widgets-v2/range/range-ui.d.ts +1 -1
- package/dist/types/widgets-v2/range/range.d.ts +1 -1
- package/dist/types/widgets-v2/range/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +1 -1
- package/dist/types/widgets-v2/spread/band.d.ts +37 -0
- package/dist/types/widgets-v2/spread/band.test.d.ts +1 -0
- package/dist/types/widgets-v2/spread/index.d.ts +1 -0
- package/dist/types/widgets-v2/spread/separator.d.ts +1 -1
- package/dist/types/widgets-v2/spread/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/spread/spread-ui.d.ts +1 -1
- package/dist/types/widgets-v2/spread/spread.d.ts +1 -1
- package/dist/types/widgets-v2/state/widget-state.d.ts +1 -1
- package/dist/types/widgets-v2/subheader/subheader.d.ts +1 -1
- package/dist/types/widgets-v2/table/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/table/table-ui.d.ts +1 -1
- package/dist/types/widgets-v2/table/table.d.ts +1 -1
- package/dist/types/widgets-v2/timeseries/skeleton.d.ts +1 -1
- package/dist/types/widgets-v2/toolbox/toolbox.d.ts +1 -1
- package/dist/types/widgets-v2/wrapper/widget-actions.d.ts +2 -2
- package/dist/types/widgets-v2/wrapper/widget-content.d.ts +2 -2
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +1 -1
- package/dist/use-widget-selector-VSPhfhNm.js +12 -0
- package/dist/{use-widget-selector-DFl2hW0R.js.map → use-widget-selector-VSPhfhNm.js.map} +1 -1
- package/dist/utils-DtvTjjMq.js +58 -0
- package/dist/utils-DtvTjjMq.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 -1317
- package/dist/widgets/bar.js +183 -175
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +429 -434
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +3 -120
- package/dist/widgets/error.js +28 -38
- package/dist/widgets/error.js.map +1 -1
- package/dist/widgets/formula.js +3 -123
- package/dist/widgets/histogram.js +183 -202
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +63 -61
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/markdown.js +141 -123
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/no-data.js +52 -58
- package/dist/widgets/no-data.js.map +1 -1
- package/dist/widgets/note.js +125 -122
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +245 -259
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +225 -204
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +220 -215
- 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 +22 -23
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +150 -156
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +3 -8
- package/dist/widgets/subheader.js +49 -50
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +576 -644
- 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 +140 -145
- package/dist/widgets/toolbar-actions.js.map +1 -1
- package/dist/widgets/utils.js +17 -33
- package/dist/widgets/utils.js.map +1 -1
- package/dist/widgets/wrapper.js +265 -276
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +4 -51
- package/dist/widgets-v2/bar.js +253 -307
- package/dist/widgets-v2/bar.js.map +1 -1
- package/dist/widgets-v2/category.js +2 -98
- package/dist/widgets-v2/echart.js +2 -57
- package/dist/widgets-v2/formula.js +2 -68
- package/dist/widgets-v2/histogram.js +285 -350
- package/dist/widgets-v2/histogram.js.map +1 -1
- package/dist/widgets-v2/markdown.js +3 -69
- package/dist/widgets-v2/pie.js +363 -461
- package/dist/widgets-v2/pie.js.map +1 -1
- package/dist/widgets-v2/range.js +2 -52
- package/dist/widgets-v2/scatterplot.js +316 -391
- package/dist/widgets-v2/scatterplot.js.map +1 -1
- package/dist/widgets-v2/spread.js +2 -66
- package/dist/widgets-v2/stores.js +2 -42
- package/dist/widgets-v2/table.js +2 -78
- package/dist/widgets-v2/timeseries.js +285 -340
- package/dist/widgets-v2/timeseries.js.map +1 -1
- package/dist/widgets-v2/utils.js +2 -8
- package/dist/widgets-v2.js +955 -951
- package/dist/widgets-v2.js.map +1 -1
- package/dist/zoom-toggle-CA0ifG23.js +164 -0
- package/dist/zoom-toggle-CA0ifG23.js.map +1 -0
- package/package.json +4 -4
- package/src/hooks/use-widget-ref.ts +1 -0
- package/src/widgets-v2/index.ts +6 -1
- package/src/widgets-v2/spread/band.test.ts +46 -0
- package/src/widgets-v2/spread/band.ts +47 -0
- package/src/widgets-v2/spread/index.ts +1 -0
- package/dist/category-Ct2BzADB.js +0 -753
- package/dist/category-Ct2BzADB.js.map +0 -1
- package/dist/change-column-Fu1DCYQ3.js +0 -1186
- package/dist/change-column-Fu1DCYQ3.js.map +0 -1
- package/dist/cjs-D4KH3azB.js +0 -85
- package/dist/cjs-D4KH3azB.js.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/copy-button-DGL1tyli.js +0 -26
- package/dist/copy-button-DGL1tyli.js.map +0 -1
- package/dist/csv-item-hH_Gt7ur.js +0 -32
- package/dist/csv-item-hH_Gt7ur.js.map +0 -1
- package/dist/data-zoom-layout-D_FYdnap.js +0 -28
- package/dist/data-zoom-layout-D_FYdnap.js.map +0 -1
- package/dist/download-config-OKlLLSW_.js +0 -58
- package/dist/download-config-OKlLLSW_.js.map +0 -1
- package/dist/echart-B10dhEaM.js +0 -262
- package/dist/echart-B10dhEaM.js.map +0 -1
- package/dist/exports-Cr43OCul.js +0 -51
- package/dist/exports-Cr43OCul.js.map +0 -1
- package/dist/exports-Cx-f6m6U.js +0 -63
- package/dist/exports-Cx-f6m6U.js.map +0 -1
- package/dist/formatter-B9Bxn1k7.js +0 -6
- package/dist/formatter-B9Bxn1k7.js.map +0 -1
- package/dist/formula-DuC0NQLH.js +0 -79
- package/dist/formula-DuC0NQLH.js.map +0 -1
- package/dist/lasso-tool-YLFRgb-S.js +0 -582
- package/dist/lasso-tool-YLFRgb-S.js.map +0 -1
- package/dist/legend/stores.js.map +0 -1
- package/dist/legend-store-registry-p1tSwJXH.js +0 -472
- package/dist/legend-store-registry-p1tSwJXH.js.map +0 -1
- package/dist/markdown-DdqANCiN.js +0 -102
- package/dist/markdown-DdqANCiN.js.map +0 -1
- package/dist/markdown-content-Dk2DSgbf.js +0 -10287
- package/dist/markdown-content-Dk2DSgbf.js.map +0 -1
- package/dist/option-builders-DPeoyQaM.js +0 -130
- package/dist/option-builders-DPeoyQaM.js.map +0 -1
- package/dist/options-CthfUJDz.js +0 -46
- package/dist/options-CthfUJDz.js.map +0 -1
- package/dist/png-item-9dNbB37T.js +0 -57
- package/dist/png-item-9dNbB37T.js.map +0 -1
- package/dist/range-l4fNHLEg.js +0 -213
- package/dist/range-l4fNHLEg.js.map +0 -1
- package/dist/resolve-theme-color-BdojIw0K.js +0 -47
- package/dist/resolve-theme-color-BdojIw0K.js.map +0 -1
- package/dist/row-DZSP99LW.js +0 -34
- package/dist/row-DZSP99LW.js.map +0 -1
- package/dist/series-DLNHDWs0.js +0 -90
- package/dist/series-DLNHDWs0.js.map +0 -1
- package/dist/shared-resize-observer-98b1SK1e.js +0 -17
- package/dist/shared-resize-observer-98b1SK1e.js.map +0 -1
- package/dist/smart-tooltip-DFV6GD8R.js +0 -40
- package/dist/smart-tooltip-DFV6GD8R.js.map +0 -1
- package/dist/spread-4MYPOntd.js +0 -66
- package/dist/spread-4MYPOntd.js.map +0 -1
- package/dist/style-DVnT6HC1.js +0 -131
- package/dist/style-DVnT6HC1.js.map +0 -1
- package/dist/styles-cohnxh9F.js +0 -23
- package/dist/styles-cohnxh9F.js.map +0 -1
- package/dist/table-CTcLOycx.js +0 -383
- package/dist/table-CTcLOycx.js.map +0 -1
- package/dist/tooltip-BDnrRKrp.js +0 -25
- package/dist/tooltip-BDnrRKrp.js.map +0 -1
- package/dist/transforms-Cdx4fkU5.js +0 -106
- package/dist/transforms-Cdx4fkU5.js.map +0 -1
- package/dist/use-transform-DXPN3nY7.js +0 -110
- package/dist/use-transform-DXPN3nY7.js.map +0 -1
- package/dist/use-widget-ref-Ddr_SlJJ.js +0 -22
- package/dist/use-widget-ref-Ddr_SlJJ.js.map +0 -1
- package/dist/use-widget-selector-DFl2hW0R.js +0 -12
- package/dist/utils-BOhInag6.js +0 -170
- package/dist/utils-BOhInag6.js.map +0 -1
- package/dist/widget-context-DTGO0Yta.js +0 -13
- package/dist/widget-context-DTGO0Yta.js.map +0 -1
- package/dist/widget-store-Bw5zRUGg.js +0 -261
- package/dist/widget-store-Bw5zRUGg.js.map +0 -1
- package/dist/widget-store-registry-_W4Z4xp-.js +0 -178
- package/dist/widget-store-registry-_W4Z4xp-.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/stores.js.map +0 -1
- package/dist/widgets-v2/actions.js.map +0 -1
- package/dist/widgets-v2/category.js.map +0 -1
- package/dist/widgets-v2/echart.js.map +0 -1
- package/dist/widgets-v2/formula.js.map +0 -1
- package/dist/widgets-v2/markdown.js.map +0 -1
- package/dist/widgets-v2/range.js.map +0 -1
- package/dist/widgets-v2/spread.js.map +0 -1
- package/dist/widgets-v2/stores.js.map +0 -1
- package/dist/widgets-v2/table.js.map +0 -1
- package/dist/widgets-v2/utils.js.map +0 -1
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { C as e, T as t } from "./stores-BVFMfgyo.js";
|
|
2
|
+
import { n, t as r } from "./download-BT6qBamM.js";
|
|
3
|
+
import { c as i } from "react/compiler-runtime";
|
|
4
|
+
import { Avatar as a, Box as o, Chip as s, Skeleton as c, Typography as l } from "@mui/material";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
//#region src/widgets-v2/formula/delta.tsx
|
|
7
|
+
var f = new Intl.NumberFormat(void 0, {
|
|
8
|
+
style: "percent",
|
|
9
|
+
signDisplay: "always",
|
|
10
|
+
maximumFractionDigits: 1
|
|
11
|
+
}), p = {
|
|
12
|
+
positive: "success",
|
|
13
|
+
negative: "error",
|
|
14
|
+
neutral: "default"
|
|
15
|
+
};
|
|
16
|
+
function m(e) {
|
|
17
|
+
let t = i(9), { value: n, label: r, severity: a, format: o, ChipProps: c } = e, l = a ?? h(n), d;
|
|
18
|
+
t[0] !== o || t[1] !== r || t[2] !== n ? (d = r ?? (o ? o(n) : f.format(n)), t[0] = o, t[1] = r, t[2] = n, t[3] = d) : d = t[3];
|
|
19
|
+
let m = d, g = p[l], _;
|
|
20
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (_ = { fontWeight: 600 }, t[4] = _) : _ = t[4];
|
|
21
|
+
let v;
|
|
22
|
+
return t[5] !== c || t[6] !== g || t[7] !== m ? (v = /* @__PURE__ */ u(s, {
|
|
23
|
+
size: "small",
|
|
24
|
+
color: g,
|
|
25
|
+
label: m,
|
|
26
|
+
sx: _,
|
|
27
|
+
...c
|
|
28
|
+
}), t[5] = c, t[6] = g, t[7] = m, t[8] = v) : v = t[8], v;
|
|
29
|
+
}
|
|
30
|
+
function h(e) {
|
|
31
|
+
return e > 0 ? "positive" : e < 0 ? "negative" : "neutral";
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/widgets-v2/formula/note.tsx
|
|
35
|
+
function g(e) {
|
|
36
|
+
let t = i(4), { children: n, TypographyProps: r } = e, a;
|
|
37
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { m: 0 }, t[0] = a) : a = t[0];
|
|
38
|
+
let o;
|
|
39
|
+
return t[1] !== r || t[2] !== n ? (o = /* @__PURE__ */ u(l, {
|
|
40
|
+
variant: "caption",
|
|
41
|
+
component: "p",
|
|
42
|
+
color: "text.secondary",
|
|
43
|
+
sx: a,
|
|
44
|
+
...r,
|
|
45
|
+
children: n
|
|
46
|
+
}), t[1] = r, t[2] = n, t[3] = o) : o = t[3], o;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/widgets-v2/formula/prefix.tsx
|
|
50
|
+
function _(e) {
|
|
51
|
+
let t = i(4), { children: n, TypographyProps: r } = e, a;
|
|
52
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = {
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
color: "text.secondary",
|
|
55
|
+
lineHeight: 1
|
|
56
|
+
}, t[0] = a) : a = t[0];
|
|
57
|
+
let o;
|
|
58
|
+
return t[1] !== r || t[2] !== n ? (o = /* @__PURE__ */ u(l, {
|
|
59
|
+
variant: "h5",
|
|
60
|
+
component: "span",
|
|
61
|
+
sx: a,
|
|
62
|
+
...r,
|
|
63
|
+
children: n
|
|
64
|
+
}), t[1] = r, t[2] = n, t[3] = o) : o = t[3], o;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/widgets-v2/formula/series.tsx
|
|
68
|
+
function v(e) {
|
|
69
|
+
let t = i(14), { name: n, color: r, size: o, AvatarProps: s } = e, c = o === void 0 ? 24 : o, l;
|
|
70
|
+
t[0] === n ? l = t[1] : (l = n.charAt(0).toUpperCase(), t[0] = n, t[1] = l);
|
|
71
|
+
let d = l, f = c * .5, p = r ?? "action.disabledBackground", m;
|
|
72
|
+
t[2] === r ? m = t[3] : (m = r ? (e) => e.palette.getContrastText(y(e, r)) : "text.primary", t[2] = r, t[3] = m);
|
|
73
|
+
let h;
|
|
74
|
+
t[4] !== c || t[5] !== f || t[6] !== p || t[7] !== m ? (h = {
|
|
75
|
+
width: c,
|
|
76
|
+
height: c,
|
|
77
|
+
fontSize: f,
|
|
78
|
+
fontWeight: 600,
|
|
79
|
+
bgcolor: p,
|
|
80
|
+
color: m
|
|
81
|
+
}, t[4] = c, t[5] = f, t[6] = p, t[7] = m, t[8] = h) : h = t[8];
|
|
82
|
+
let g;
|
|
83
|
+
return t[9] !== s || t[10] !== d || t[11] !== n || t[12] !== h ? (g = /* @__PURE__ */ u(a, {
|
|
84
|
+
"aria-label": n,
|
|
85
|
+
sx: h,
|
|
86
|
+
...s,
|
|
87
|
+
children: d
|
|
88
|
+
}), t[9] = s, t[10] = d, t[11] = n, t[12] = h, t[13] = g) : g = t[13], g;
|
|
89
|
+
}
|
|
90
|
+
function y(e, t) {
|
|
91
|
+
if (!t.includes(".")) return t;
|
|
92
|
+
let n = t.split("."), r = e.palette;
|
|
93
|
+
for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
|
|
94
|
+
else return t;
|
|
95
|
+
return typeof r == "string" ? r : t;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/widgets-v2/formula/suffix.tsx
|
|
99
|
+
function b(e) {
|
|
100
|
+
let t = i(4), { children: n, TypographyProps: r } = e, a;
|
|
101
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = {
|
|
102
|
+
fontWeight: 600,
|
|
103
|
+
color: "text.secondary",
|
|
104
|
+
lineHeight: 1
|
|
105
|
+
}, t[0] = a) : a = t[0];
|
|
106
|
+
let o;
|
|
107
|
+
return t[1] !== r || t[2] !== n ? (o = /* @__PURE__ */ u(l, {
|
|
108
|
+
variant: "h5",
|
|
109
|
+
component: "span",
|
|
110
|
+
sx: a,
|
|
111
|
+
...r,
|
|
112
|
+
children: n
|
|
113
|
+
}), t[1] = r, t[2] = n, t[3] = o) : o = t[3], o;
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/widgets-v2/formula/value.tsx
|
|
117
|
+
function x(e) {
|
|
118
|
+
let t = i(6), { children: n, color: r, TypographyProps: a } = e, o = r ?? "text.primary", s;
|
|
119
|
+
t[0] === o ? s = t[1] : (s = {
|
|
120
|
+
fontWeight: 600,
|
|
121
|
+
color: o,
|
|
122
|
+
lineHeight: 1
|
|
123
|
+
}, t[0] = o, t[1] = s);
|
|
124
|
+
let c;
|
|
125
|
+
return t[2] !== a || t[3] !== n || t[4] !== s ? (c = /* @__PURE__ */ u(l, {
|
|
126
|
+
variant: "h5",
|
|
127
|
+
component: "span",
|
|
128
|
+
sx: s,
|
|
129
|
+
...a,
|
|
130
|
+
children: n
|
|
131
|
+
}), t[2] = a, t[3] = n, t[4] = s, t[5] = c) : c = t[5], c;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/widgets-v2/formula/style.ts
|
|
135
|
+
var S = {
|
|
136
|
+
root: {
|
|
137
|
+
display: "flex",
|
|
138
|
+
flexDirection: "column",
|
|
139
|
+
gap: 2,
|
|
140
|
+
alignItems: "stretch"
|
|
141
|
+
},
|
|
142
|
+
row: {
|
|
143
|
+
display: "flex",
|
|
144
|
+
alignItems: "flex-start",
|
|
145
|
+
gap: 1.5
|
|
146
|
+
},
|
|
147
|
+
body: {
|
|
148
|
+
flex: 1,
|
|
149
|
+
minWidth: 0,
|
|
150
|
+
display: "flex",
|
|
151
|
+
flexDirection: "column",
|
|
152
|
+
gap: .25
|
|
153
|
+
},
|
|
154
|
+
valueRow: {
|
|
155
|
+
display: "inline-flex",
|
|
156
|
+
alignItems: "baseline",
|
|
157
|
+
gap: .25
|
|
158
|
+
},
|
|
159
|
+
delta: {
|
|
160
|
+
alignSelf: "center",
|
|
161
|
+
flexShrink: 0
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/widgets-v2/formula/formula-ui.tsx
|
|
166
|
+
function C(e) {
|
|
167
|
+
let t = i(8), { items: n, formatter: r, ref: a } = e, s;
|
|
168
|
+
if (t[0] !== r || t[1] !== n) {
|
|
169
|
+
let e;
|
|
170
|
+
t[3] === r ? e = t[4] : (e = (e, t) => /* @__PURE__ */ d(o, {
|
|
171
|
+
sx: S.row,
|
|
172
|
+
children: [
|
|
173
|
+
e.series ? /* @__PURE__ */ u(v, {
|
|
174
|
+
name: e.series.name,
|
|
175
|
+
color: e.series.color
|
|
176
|
+
}) : null,
|
|
177
|
+
/* @__PURE__ */ d(o, {
|
|
178
|
+
sx: S.body,
|
|
179
|
+
children: [/* @__PURE__ */ d(o, {
|
|
180
|
+
sx: S.valueRow,
|
|
181
|
+
children: [
|
|
182
|
+
e.prefix ? /* @__PURE__ */ u(_, { children: e.prefix }) : null,
|
|
183
|
+
/* @__PURE__ */ u(x, {
|
|
184
|
+
color: e.color,
|
|
185
|
+
children: r ? r(e.value) : String(e.value)
|
|
186
|
+
}),
|
|
187
|
+
e.suffix ? /* @__PURE__ */ u(b, { children: e.suffix }) : null
|
|
188
|
+
]
|
|
189
|
+
}), e.note ? /* @__PURE__ */ u(g, { children: e.note }) : null]
|
|
190
|
+
}),
|
|
191
|
+
e.delta ? /* @__PURE__ */ u(o, {
|
|
192
|
+
sx: S.delta,
|
|
193
|
+
children: /* @__PURE__ */ u(m, {
|
|
194
|
+
value: e.delta.value,
|
|
195
|
+
label: e.delta.label,
|
|
196
|
+
severity: e.delta.severity
|
|
197
|
+
})
|
|
198
|
+
}) : null
|
|
199
|
+
]
|
|
200
|
+
}, `formula-${e.series?.name ?? `${e.prefix ?? ""}${e.value}${e.suffix ?? ""}`}-${t}`), t[3] = r, t[4] = e), s = n.map(e), t[0] = r, t[1] = n, t[2] = s;
|
|
201
|
+
} else s = t[2];
|
|
202
|
+
let c;
|
|
203
|
+
return t[5] !== a || t[6] !== s ? (c = /* @__PURE__ */ u(o, {
|
|
204
|
+
ref: a,
|
|
205
|
+
sx: S.root,
|
|
206
|
+
children: s
|
|
207
|
+
}), t[5] = a, t[6] = s, t[7] = c) : c = t[7], c;
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/widgets-v2/formula/formula.tsx
|
|
211
|
+
var w = Object.freeze([]), T = (e) => ({
|
|
212
|
+
data: e.data ?? w,
|
|
213
|
+
formatter: e.formatter
|
|
214
|
+
});
|
|
215
|
+
function E() {
|
|
216
|
+
let n = i(3), r = t(), a = e(r, T), o;
|
|
217
|
+
return n[0] !== a.data || n[1] !== a.formatter ? (o = /* @__PURE__ */ u(C, {
|
|
218
|
+
items: a.data,
|
|
219
|
+
formatter: a.formatter
|
|
220
|
+
}), n[0] = a.data, n[1] = a.formatter, n[2] = o) : o = n[2], o;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/widgets-v2/formula/skeleton.tsx
|
|
224
|
+
var D = {
|
|
225
|
+
root: {
|
|
226
|
+
display: "flex",
|
|
227
|
+
gap: 3,
|
|
228
|
+
alignItems: "baseline",
|
|
229
|
+
minHeight: 64,
|
|
230
|
+
py: 1
|
|
231
|
+
},
|
|
232
|
+
block: {
|
|
233
|
+
width: 120,
|
|
234
|
+
height: 36
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
function O(e) {
|
|
238
|
+
let t = i(2), { count: n } = e, r = n === void 0 ? 1 : n, a;
|
|
239
|
+
return t[0] === r ? a = t[1] : (a = /* @__PURE__ */ u(o, {
|
|
240
|
+
sx: D.root,
|
|
241
|
+
children: Array.from({ length: r }).map(k)
|
|
242
|
+
}), t[0] = r, t[1] = a), a;
|
|
243
|
+
}
|
|
244
|
+
function k(e, t) {
|
|
245
|
+
return /* @__PURE__ */ u(c, {
|
|
246
|
+
variant: "rectangular",
|
|
247
|
+
sx: D.block
|
|
248
|
+
}, `row-${t}`);
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/widgets-v2/formula/download.tsx
|
|
252
|
+
function A(e) {
|
|
253
|
+
let t = [];
|
|
254
|
+
return e.getCaptureEl && t.push(n({
|
|
255
|
+
filename: e.filename,
|
|
256
|
+
getCaptureEl: e.getCaptureEl,
|
|
257
|
+
pixelRatio: e.pngPixelRatio,
|
|
258
|
+
backgroundColor: e.pngBackgroundColor
|
|
259
|
+
})), t.push(r({
|
|
260
|
+
filename: e.filename,
|
|
261
|
+
getRows: () => {
|
|
262
|
+
let t = e.getData(), n = [[
|
|
263
|
+
"series",
|
|
264
|
+
"prefix",
|
|
265
|
+
"value",
|
|
266
|
+
"suffix",
|
|
267
|
+
"note",
|
|
268
|
+
"delta"
|
|
269
|
+
]];
|
|
270
|
+
for (let e of t) n.push([
|
|
271
|
+
e.series?.name ?? "",
|
|
272
|
+
e.prefix ?? "",
|
|
273
|
+
e.value,
|
|
274
|
+
e.suffix ?? "",
|
|
275
|
+
e.note ?? "",
|
|
276
|
+
e.delta?.value ?? ""
|
|
277
|
+
]);
|
|
278
|
+
return n;
|
|
279
|
+
}
|
|
280
|
+
})), t;
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
export { S as a, v as c, m as d, C as i, _ as l, O as n, x as o, E as r, b as s, A as t, g as u };
|
|
284
|
+
|
|
285
|
+
//# sourceMappingURL=formula-Dsru_p-g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formula-Dsru_p-g.js","names":["Chip","ChipProps","DeltaSeverity","DeltaProps","value","label","severity","format","defaultPercentFormatter","Intl","NumberFormat","undefined","style","signDisplay","maximumFractionDigits","SEVERITY_TO_COLOR","Record","positive","negative","neutral","Delta","t0","$","_c","chipProps","resolvedSeverity","inferSeverity","t1","text","t2","t3","Symbol","for","fontWeight","t4","Typography","TypographyProps","ReactNode","NoteProps","children","Note","t0","$","_c","t1","Symbol","for","m","t2","Typography","TypographyProps","ReactNode","PrefixProps","children","Prefix","t0","$","_c","t1","Symbol","for","fontWeight","color","lineHeight","t2","Avatar","AvatarProps","Theme","SeriesProps","name","color","size","Series","t0","$","_c","t1","avatarProps","undefined","t2","charAt","toUpperCase","letter","t3","t4","t5","theme","palette","getContrastText","toCssColor","t6","width","height","fontSize","fontWeight","bgcolor","t7","value","includes","parts","split","cur","p","Record","Typography","TypographyProps","ReactNode","SuffixProps","children","Suffix","t0","$","_c","t1","Symbol","for","fontWeight","color","lineHeight","t2","Typography","TypographyProps","ReactNode","ValueProps","children","color","Value","t0","$","_c","t1","t2","fontWeight","lineHeight","t3","SxProps","Theme","styles","root","display","flexDirection","gap","alignItems","row","body","flex","minWidth","valueRow","delta","alignSelf","flexShrink","Record","Box","Ref","FormulaDataItem","Delta","Note","Prefix","Series","Suffix","Value","styles","FormulaUIProps","items","formatter","value","ref","HTMLDivElement","FormulaUI","t0","$","_c","t1","t2","item","i","series","name","prefix","suffix","row","color","body","valueRow","String","note","delta","label","severity","map","root","useWidgetId","useWidgetShallow","FormulaUI","FormulaWidgetData","FormulaSlice","data","formatter","value","EMPTY_DATA","Object","freeze","formulaSelector","s","Formula","$","_c","id","slice","t0","Box","Skeleton","SxProps","Theme","styles","root","display","gap","alignItems","minHeight","py","block","width","height","Record","FormulaSkeletonProps","count","FormulaSkeleton","t0","$","_c","t1","undefined","t2","Array","from","length","map","_temp","_","i","buildCsvDownloadItem","buildPngDownloadItem","DownloadItem","FormulaWidgetData","FormulaDownloadConfigArgs","filename","getData","getCaptureEl","HTMLElement","pngPixelRatio","pngBackgroundColor","createFormulaDownloadConfig","args","items","push","pixelRatio","backgroundColor","getRows","data","rows","d","series","name","prefix","value","suffix","note","delta"],"sources":["../src/widgets-v2/formula/delta.tsx","../src/widgets-v2/formula/note.tsx","../src/widgets-v2/formula/prefix.tsx","../src/widgets-v2/formula/series.tsx","../src/widgets-v2/formula/suffix.tsx","../src/widgets-v2/formula/value.tsx","../src/widgets-v2/formula/style.ts","../src/widgets-v2/formula/formula-ui.tsx","../src/widgets-v2/formula/formula.tsx","../src/widgets-v2/formula/skeleton.tsx","../src/widgets-v2/formula/download.tsx"],"sourcesContent":["import { Chip, type ChipProps } from '@mui/material'\nimport type { DeltaSeverity } from './types'\n\nexport interface DeltaProps {\n /** Numeric magnitude. Used for the default percent label and severity inference. */\n value: number\n /** Pre-formatted label override; skips the default percent formatter. */\n label?: string\n /**\n * Visual treatment. When omitted it's derived from the sign of `value`:\n * `>0 → 'positive'`, `<0 → 'negative'`, `=0 → 'neutral'`.\n */\n severity?: DeltaSeverity\n /** Override the default `Intl.NumberFormat({style:'percent'})` formatter. */\n format?: (value: number) => string\n ChipProps?: ChipProps\n}\n\nconst defaultPercentFormatter = new Intl.NumberFormat(undefined, {\n style: 'percent',\n signDisplay: 'always',\n maximumFractionDigits: 1,\n})\n\nconst SEVERITY_TO_COLOR: Record<DeltaSeverity, ChipProps['color']> = {\n positive: 'success',\n negative: 'error',\n neutral: 'default',\n}\n\n/**\n * Comparative delta rendered as a small filled chip. Colour is driven by\n * `severity` (or the sign of `value`); content is `label`, the result of\n * `format(value)`, or the default percent format.\n */\nexport function Delta({\n value,\n label,\n severity,\n format,\n ChipProps: chipProps,\n}: DeltaProps) {\n const resolvedSeverity = severity ?? inferSeverity(value)\n const text =\n label ?? (format ? format(value) : defaultPercentFormatter.format(value))\n return (\n <Chip\n size='small'\n color={SEVERITY_TO_COLOR[resolvedSeverity]}\n label={text}\n sx={{ fontWeight: 600 }}\n {...chipProps}\n />\n )\n}\n\nfunction inferSeverity(value: number): DeltaSeverity {\n if (value > 0) return 'positive'\n if (value < 0) return 'negative'\n return 'neutral'\n}\n","import { Typography, type TypographyProps } from '@mui/material'\nimport type { ReactNode } from 'react'\n\nexport interface NoteProps {\n children: ReactNode\n TypographyProps?: TypographyProps\n}\n\n/**\n * Small subdued caption rendered below a Formula value. Use for short\n * descriptive text (e.g. \"Last 7 days\", \"Excludes refunds\").\n */\nexport function Note({ children, TypographyProps }: NoteProps) {\n return (\n <Typography\n variant='caption'\n component='p'\n color='text.secondary'\n sx={{ m: 0 }}\n {...TypographyProps}\n >\n {children}\n </Typography>\n )\n}\n","import { Typography, type TypographyProps } from '@mui/material'\nimport type { ReactNode } from 'react'\n\nexport interface PrefixProps {\n children: ReactNode\n TypographyProps?: TypographyProps\n}\n\n/**\n * Prefix slot for a Formula KPI — large, bold, muted (`text.secondary`).\n * Composable building block for custom formula layouts; the canonical\n * {@link FormulaUI} renders one of these per item when `prefix` is set.\n */\nexport function Prefix({ children, TypographyProps }: PrefixProps) {\n return (\n <Typography\n variant='h5'\n component='span'\n sx={{ fontWeight: 600, color: 'text.secondary', lineHeight: 1 }}\n {...TypographyProps}\n >\n {children}\n </Typography>\n )\n}\n","import { Avatar, type AvatarProps, type Theme } from '@mui/material'\n\nexport interface SeriesProps {\n /** Used for the avatar's first-letter glyph and as accessible label. */\n name: string\n /** Avatar background colour (any MUI palette path or CSS colour). */\n color?: string\n /** Diameter in px. Default `24`. */\n size?: number\n AvatarProps?: AvatarProps\n}\n\n/**\n * Series indicator — circular avatar showing the first letter of `name`.\n * Background colour is `color` (consumer-supplied) or a neutral disabled\n * colour, with text colour computed for contrast against it.\n */\nexport function Series({\n name,\n color,\n size = 24,\n AvatarProps: avatarProps,\n}: SeriesProps) {\n const letter = name.charAt(0).toUpperCase()\n return (\n <Avatar\n aria-label={name}\n sx={{\n width: size,\n height: size,\n fontSize: size * 0.5,\n fontWeight: 600,\n bgcolor: color ?? 'action.disabledBackground',\n color: color\n ? (theme: Theme) =>\n theme.palette.getContrastText(toCssColor(theme, color))\n : 'text.primary',\n }}\n {...avatarProps}\n >\n {letter}\n </Avatar>\n )\n}\n\n/**\n * Resolve a palette path (e.g. `\"primary.main\"`) to a hex/rgb string so that\n * `getContrastText` — which doesn't accept dotted paths — produces a sensible\n * text colour. Non-palette strings (raw `#hex`, `rgb(...)`) pass through.\n */\nfunction toCssColor(theme: Theme, value: string): string {\n if (!value.includes('.')) return value\n const parts = value.split('.')\n let cur: unknown = theme.palette\n for (const p of parts) {\n if (\n cur &&\n typeof cur === 'object' &&\n p in (cur as Record<string, unknown>)\n ) {\n cur = (cur as Record<string, unknown>)[p]\n } else {\n return value\n }\n }\n return typeof cur === 'string' ? cur : value\n}\n","import { Typography, type TypographyProps } from '@mui/material'\nimport type { ReactNode } from 'react'\n\nexport interface SuffixProps {\n children: ReactNode\n TypographyProps?: TypographyProps\n}\n\n/**\n * Suffix slot for a Formula KPI — large, bold, muted (`text.secondary`).\n * Composable building block for custom formula layouts; the canonical\n * {@link FormulaUI} renders one of these per item when `suffix` is set.\n */\nexport function Suffix({ children, TypographyProps }: SuffixProps) {\n return (\n <Typography\n variant='h5'\n component='span'\n sx={{ fontWeight: 600, color: 'text.secondary', lineHeight: 1 }}\n {...TypographyProps}\n >\n {children}\n </Typography>\n )\n}\n","import { Typography, type TypographyProps } from '@mui/material'\nimport type { ReactNode } from 'react'\n\nexport interface ValueProps {\n children: ReactNode\n /** Override the default `text.primary` color — useful for sparkline tints. */\n color?: string\n TypographyProps?: TypographyProps\n}\n\n/**\n * Value slot for a Formula KPI — large, bold, primary text color. Composable\n * building block for custom formula layouts; the canonical {@link FormulaUI}\n * renders one of these per item.\n */\nexport function Value({ children, color, TypographyProps }: ValueProps) {\n return (\n <Typography\n variant='h5'\n component='span'\n sx={{\n fontWeight: 600,\n color: color ?? 'text.primary',\n lineHeight: 1,\n }}\n {...TypographyProps}\n >\n {children}\n </Typography>\n )\n}\n","import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n alignItems: 'stretch',\n },\n row: {\n display: 'flex',\n alignItems: 'flex-start',\n gap: 1.5,\n },\n body: {\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n gap: 0.25,\n },\n valueRow: {\n display: 'inline-flex',\n alignItems: 'baseline',\n gap: 0.25,\n },\n delta: {\n alignSelf: 'center',\n flexShrink: 0,\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box } from '@mui/material'\nimport type { Ref } from 'react'\nimport type { FormulaDataItem } from './types'\nimport { Delta } from './delta'\nimport { Note } from './note'\nimport { Prefix } from './prefix'\nimport { Series } from './series'\nimport { Suffix } from './suffix'\nimport { Value } from './value'\nimport { styles } from './style'\n\nexport interface FormulaUIProps {\n items: readonly FormulaDataItem[]\n /** Number formatter — applied to each item's `value`. */\n formatter?: (value: number) => string\n /** Forwarded to the root `<Box>` so consumers can capture the DOM (PNG export). */\n ref?: Ref<HTMLDivElement>\n}\n\n/**\n * Pure presentational component for the Formula widget. Each item renders as\n * a row containing (in order): optional `Series` avatar, a body with\n * `[prefix] value [suffix]` plus optional `Note`, and an optional `Delta`\n * chip pushed to the right edge.\n *\n * For fully custom layouts, compose {@link Series}, {@link Prefix},\n * {@link Value}, {@link Suffix}, {@link Note}, and {@link Delta} directly\n * instead of passing `items`.\n */\nexport function FormulaUI({ items, formatter, ref }: FormulaUIProps) {\n return (\n <Box ref={ref} sx={styles.root}>\n {items.map((item, i) => (\n // Series name is the closest stable id; fall back to the literal\n // value (numeric KPIs rarely repeat with the same prefix/suffix).\n <Box\n key={`formula-${item.series?.name ?? `${item.prefix ?? ''}${item.value}${item.suffix ?? ''}`}-${i}`}\n sx={styles.row}\n >\n {item.series ? (\n <Series name={item.series.name} color={item.series.color} />\n ) : null}\n <Box sx={styles.body}>\n <Box sx={styles.valueRow}>\n {item.prefix ? <Prefix>{item.prefix}</Prefix> : null}\n <Value color={item.color}>\n {formatter ? formatter(item.value) : String(item.value)}\n </Value>\n {item.suffix ? <Suffix>{item.suffix}</Suffix> : null}\n </Box>\n {item.note ? <Note>{item.note}</Note> : null}\n </Box>\n {item.delta ? (\n <Box sx={styles.delta}>\n <Delta\n value={item.delta.value}\n label={item.delta.label}\n severity={item.delta.severity}\n />\n </Box>\n ) : null}\n </Box>\n ))}\n </Box>\n )\n}\n","import { useWidgetId, useWidgetShallow } from '../stores'\nimport { FormulaUI } from './formula-ui'\nimport type { FormulaWidgetData } from './types'\n\ninterface FormulaSlice {\n data: FormulaWidgetData\n formatter?: (value: number) => string\n}\n\n// Stable empty-data sentinel — keeps the slice's `data` reference stable\n// when the underlying store value is null/undefined so the shallow-equality\n// gate in `useWidgetShallow` doesn't re-render every commit.\nconst EMPTY_DATA: FormulaWidgetData = Object.freeze([]) as FormulaWidgetData\n\nconst formulaSelector = (s: {\n data: unknown\n formatter?: (value: number) => string\n}): FormulaSlice => ({\n data: (s.data ?? EMPTY_DATA) as FormulaWidgetData,\n formatter: s.formatter,\n})\n\n/**\n * Stateful Formula bridge — reads `data` (post-pipeline) and `formatter` from\n * the per-widget store and forwards them to the pure {@link FormulaUI}. Sits\n * inside `<Widget.Provider>`. Demonstrates that the composition shell\n * (Provider, Wrapper, State) doesn't care whether the rendered child is\n * ECharts (Bar) or a custom DOM tree (Formula).\n */\nexport function Formula() {\n const id = useWidgetId()\n const slice = useWidgetShallow(id, formulaSelector)\n return <FormulaUI items={slice.data} formatter={slice.formatter} />\n}\n","import { Box, Skeleton } from '@mui/material'\nimport type { SxProps, Theme } from '@mui/material'\n\nconst styles = {\n root: {\n display: 'flex',\n gap: 3,\n alignItems: 'baseline',\n minHeight: 64,\n py: 1,\n },\n block: { width: 120, height: 36 },\n} satisfies Record<string, SxProps<Theme>>\n\nexport interface FormulaSkeletonProps {\n count?: number\n}\n\nexport function FormulaSkeleton({ count = 1 }: FormulaSkeletonProps) {\n return (\n <Box sx={styles.root}>\n {Array.from({ length: count }).map((_, i) => (\n <Skeleton key={`row-${i}`} variant='rectangular' sx={styles.block} />\n ))}\n </Box>\n )\n}\n","import {\n buildCsvDownloadItem,\n buildPngDownloadItem,\n type DownloadItem,\n} from '../actions/download'\nimport type { FormulaWidgetData } from './types'\n\nexport interface FormulaDownloadConfigArgs {\n filename: string\n getData: () => FormulaWidgetData\n /**\n * Optional getter for the widget's capture element (registered by\n * `Widget.State`). When provided, a PNG item is prepended.\n */\n getCaptureEl?: () => HTMLElement | null\n pngPixelRatio?: number\n pngBackgroundColor?: string | null\n}\n\n/**\n * Builds download items for the Formula widget. Always includes a CSV item\n * with one row per KPI (`prefix`, `value`, `suffix`, `note`, `delta`).\n * When `getCaptureEl` is supplied, prepends a PNG item that rasterises the\n * captured element via `html2canvas`.\n */\nexport function createFormulaDownloadConfig(\n args: FormulaDownloadConfigArgs,\n): DownloadItem[] {\n const items: DownloadItem[] = []\n if (args.getCaptureEl) {\n items.push(\n buildPngDownloadItem({\n filename: args.filename,\n getCaptureEl: args.getCaptureEl,\n pixelRatio: args.pngPixelRatio,\n backgroundColor: args.pngBackgroundColor,\n }),\n )\n }\n items.push(\n buildCsvDownloadItem({\n filename: args.filename,\n getRows: () => {\n const data = args.getData()\n const rows: unknown[][] = [\n ['series', 'prefix', 'value', 'suffix', 'note', 'delta'],\n ]\n for (const d of data) {\n rows.push([\n d.series?.name ?? '',\n d.prefix ?? '',\n d.value,\n d.suffix ?? '',\n d.note ?? '',\n d.delta?.value ?? '',\n ])\n }\n return rows\n },\n }),\n )\n return items\n}\n"],"mappings":";;;;;;AAkBA,IAAMQ,IAA0B,IAAIC,KAAKC,aAAaC,KAAAA,GAAW;CAC/DC,OAAO;CACPC,aAAa;CACbC,uBAAuB;AACzB,CAAC,GAEKC,IAA+D;CACnEE,UAAU;CACVC,UAAU;CACVC,SAAS;AACX;AAOA,SAAOC,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,CAAA,GAAe,EAAAnB,UAAAC,UAAAC,aAAAC,WAAAN,WAAAuB,MAAAH,GAOpBI,IAAyBnB,KAAYoB,EAActB,CAAK,GAACuB;CAAA,AAAAL,EAAA,OAAAf,KAAAe,EAAA,OAAAjB,KAAAiB,EAAA,OAAAlB,KAEvDuB,IAAAtB,MAAUE,IAASA,EAAOH,CAA6C,IAApCI,EAAuBD,OAAQH,CAAK,IAAEkB,EAAA,KAAAf,GAAAe,EAAA,KAAAjB,GAAAiB,EAAA,KAAAlB,GAAAkB,EAAA,KAAAK,KAAAA,IAAAL,EAAA;CAD3E,IAAAM,IACED,GAISE,IAAAd,EAAkBU,IAAiBK;CAAA,AAAAR,EAAA,OAAAS,OAAAC,IAAA,2BAAA,KAEtCF,IAAA,EAAAG,YAAc,IAAI,GAACX,EAAA,KAAAQ,KAAAA,IAAAR,EAAA;CAAA,IAAAY;CAEvB,OAFuBZ,EAAA,OAAAE,KAAAF,EAAA,O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IAAQ;GAAO,CAAC;GAE1D,KAAK,IAAMC,KAAKF,GACdC,EAAKL,KAAK;IACRM,EAAEC,QAAQC,QAAQ;IAClBF,EAAEG,UAAU;IACZH,EAAEI;IACFJ,EAAEK,UAAU;IACZL,EAAEM,QAAQ;IACVN,EAAEO,OAAOH,SAAS;GAAE,CACrB;GAEH,OAAOL;EACT;CACF,CAAC,CACH,GACON;AACT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { n as e } from "./widget-store-BFPKYm4R.js";
|
|
2
|
+
import { c as t } from "react/compiler-runtime";
|
|
3
|
+
import { useEffect as n, useRef as r } from "react";
|
|
4
|
+
//#region src/hooks/use-widget-ref.ts
|
|
5
|
+
function i(i) {
|
|
6
|
+
let a = t(4), o = r(null), s = r(null), c, l;
|
|
7
|
+
a[0] === i ? (c = a[1], l = a[2]) : (c = () => {
|
|
8
|
+
o.current && e.setWidget(i, {
|
|
9
|
+
refUI: o,
|
|
10
|
+
instance: s
|
|
11
|
+
});
|
|
12
|
+
}, l = [i], a[0] = i, a[1] = c, a[2] = l), n(c, l);
|
|
13
|
+
let u;
|
|
14
|
+
return a[3] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
15
|
+
ref: o,
|
|
16
|
+
instance: s
|
|
17
|
+
}, a[3] = u) : u = a[3], u;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=hooks-zf5gKZYq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-zf5gKZYq.js","names":["useEffect","useRef","echarts","widgetStoreActions","useWidgetRef","widgetId","$","_c","ref","instance","t0","t1","current","setWidget","refUI","t2","Symbol","for"],"sources":["../src/hooks/use-widget-ref.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport type * as echarts from 'echarts'\nimport { widgetStoreActions } from '../widgets/stores/widget-store'\n\n/**\n * Registers a DOM element ref and an ECharts instance ref with the widget store.\n * This allows other parts of the application (e.g., screenshot export) to access the widget's DOM element.\n *\n * @param widgetId - The widget ID to register the refs under.\n * @returns An object with `ref` (DOM element) and `instance` (ECharts instance) refs.\n *\n * @example\n * ```tsx\n * function MyWidget({ id }: { id: string }) {\n * const { ref } = useWidgetRef<HTMLDivElement>(id)\n *\n * return <div ref={ref}>Widget content</div>\n * }\n * ```\n */\nexport function useWidgetRef<T extends HTMLElement = HTMLElement>(\n widgetId: string,\n) {\n const ref = useRef<T | null>(null)\n const instance = useRef<echarts.ECharts | null>(null)\n\n useEffect(() => {\n if (ref.current) {\n widgetStoreActions.setWidget(widgetId, { refUI: ref, instance: instance })\n }\n }, [widgetId])\n\n return { ref, instance }\n}\n"],"mappings":";;;;AAoBA,SAAOI,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,CAAA,GAGLC,IAAYP,EAAiB,IAAI,GACjCQ,IAAiBR,EAA+B,IAAI,GAACS,GAAAC;CAErDX,AAFqDM,EAAA,OAAAD,KAMxCK,IAAAJ,EAAA,IAAAK,IAAAL,EAAA,OAJHI,UAAA;EACR,AAAIF,EAAGI,WACLT,EAAkBU,UAAWR,GAAU;GAAAS,OAASN;GAAGC;EAAqB,CAAC;CAC1E,GACAE,IAAA,CAACN,CAAQ,GAACC,EAAA,KAAAD,GAAAC,EAAA,KAAAI,GAAAJ,EAAA,KAAAK,IAJbX,EAAUU,GAIPC,CAAU;CAAC,IAAAI;CAEU,OAFVT,EAAA,OAAAU,OAAAC,IAAA,2BAAA,KAEPF,IAAA;EAAAP;EAAAC;CAAgB,GAACH,EAAA,KAAAS,KAAAA,IAAAT,EAAA,IAAjBS;AAAiB"}
|
package/dist/legend/stores.js
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
r as LegendContext,
|
|
4
|
-
a as clearAllLegendStores,
|
|
5
|
-
t as createLegendStore,
|
|
6
|
-
l as deleteLegendStore,
|
|
7
|
-
o as getLegendStore,
|
|
8
|
-
d as hasLegendStore,
|
|
9
|
-
L as registerLegendStore,
|
|
10
|
-
g as selectAllGroupsCollapsed,
|
|
11
|
-
n as selectGroupVisibility,
|
|
12
|
-
c as selectHasGroups,
|
|
13
|
-
u as selectLayerCollapsible,
|
|
14
|
-
i as selectLayersByGroup,
|
|
15
|
-
p as selectOrderedGroups,
|
|
16
|
-
S as selectOrderedLayers,
|
|
17
|
-
y as selectVisibleLayersGrouped,
|
|
18
|
-
G as setLegendStoreEntry,
|
|
19
|
-
b as unregisterLegendStore,
|
|
20
|
-
h as useLegendId,
|
|
21
|
-
C as useLegendShallow,
|
|
22
|
-
f as useLegendStore
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=stores.js.map
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "../stores-B81-IU1G.js";
|
|
2
|
+
export { y as LegendContext, g as clearAllLegendStores, d as createLegendStore, m as deleteLegendStore, c as getLegendStore, t as hasLegendStore, f as registerLegendStore, i as selectAllGroupsCollapsed, a as selectGroupVisibility, p as selectHasGroups, u as selectLayerCollapsible, s as selectLayersByGroup, o as selectOrderedGroups, e as selectOrderedLayers, v as selectVisibleLayersGrouped, h as setLegendStoreEntry, r as unregisterLegendStore, n as useLegendId, l as useLegendShallow, _ as useLegendStore };
|