@carto/ps-react-ui 4.4.1 → 4.4.2

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.
Files changed (210) hide show
  1. package/dist/components.js.map +1 -1
  2. package/dist/error-CEkRPccv.js.map +1 -1
  3. package/dist/exports-Cr43OCul.js.map +1 -1
  4. package/dist/formatter-B1Xh8XDH.js +5 -0
  5. package/dist/formatter-B1Xh8XDH.js.map +1 -0
  6. package/dist/lasso-tool-BYbxrJ-7.js.map +1 -1
  7. package/dist/note-t51drNe0.js.map +1 -1
  8. package/dist/options-D9wflre6.js.map +1 -1
  9. package/dist/row-DTCV0Ocm.js.map +1 -1
  10. package/dist/series-CYNOu2Ju.js.map +1 -1
  11. package/dist/smart-tooltip-D4vwQpFf.js.map +1 -1
  12. package/dist/styles-C_8vOEep.js +167 -0
  13. package/dist/styles-C_8vOEep.js.map +1 -0
  14. package/dist/tooltip-BDnrRKrp.js.map +1 -1
  15. package/dist/types/components/basemaps/basemaps.d.ts +20 -0
  16. package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +11 -0
  17. package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +17 -0
  18. package/dist/types/components/lasso-tool/lasso-tool.d.ts +21 -0
  19. package/dist/types/components/list-data/list-data.d.ts +16 -0
  20. package/dist/types/components/measurement-tools/measurement-tools.d.ts +20 -0
  21. package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +17 -0
  22. package/dist/types/components/tooltip/tooltip.d.ts +13 -0
  23. package/dist/types/components/zoom-controls/zoom-controls.d.ts +16 -0
  24. package/dist/types/hooks/use-widget-ref.d.ts +4 -4
  25. package/dist/types/widgets/actions/download/download.d.ts +11 -0
  26. package/dist/types/widgets/actions/download/exports.d.ts +15 -0
  27. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +13 -0
  28. package/dist/types/widgets/actions/index.d.ts +1 -1
  29. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +1 -0
  30. package/dist/types/widgets/bar/config.d.ts +8 -4
  31. package/dist/types/widgets/category/category-ui.d.ts +3 -0
  32. package/dist/types/widgets/category/components/category-bar.d.ts +3 -0
  33. package/dist/types/widgets/category/components/category-legend.d.ts +3 -0
  34. package/dist/types/widgets/category/components/category-row-multi.d.ts +3 -0
  35. package/dist/types/widgets/category/components/category-row-other.d.ts +3 -0
  36. package/dist/types/widgets/category/components/category-row-single.d.ts +3 -0
  37. package/dist/types/widgets/category/config.d.ts +11 -0
  38. package/dist/types/widgets/echart/echart-ui.d.ts +7 -0
  39. package/dist/types/widgets/echart/echart.d.ts +6 -0
  40. package/dist/types/widgets/echart/options.d.ts +7 -0
  41. package/dist/types/widgets/echart/types.d.ts +1 -0
  42. package/dist/types/widgets/echart/utils.d.ts +41 -0
  43. package/dist/types/widgets/error/error.d.ts +10 -0
  44. package/dist/types/widgets/formula/components/item.d.ts +3 -0
  45. package/dist/types/widgets/formula/components/prefix.d.ts +3 -0
  46. package/dist/types/widgets/formula/components/row.d.ts +3 -0
  47. package/dist/types/widgets/formula/components/series.d.ts +3 -0
  48. package/dist/types/widgets/formula/components/suffix.d.ts +3 -0
  49. package/dist/types/widgets/formula/components/value.d.ts +3 -0
  50. package/dist/types/widgets/formula/config.d.ts +11 -0
  51. package/dist/types/widgets/formula/formula-ui.d.ts +3 -0
  52. package/dist/types/widgets/histogram/config.d.ts +8 -4
  53. package/dist/types/widgets/loader/loader.d.ts +22 -0
  54. package/dist/types/widgets/loader/utils.d.ts +26 -3
  55. package/dist/types/widgets/markdown/config.d.ts +10 -0
  56. package/dist/types/widgets/markdown/markdown-ui.d.ts +7 -0
  57. package/dist/types/widgets/markdown/markdown.d.ts +3 -0
  58. package/dist/types/widgets/note/note.d.ts +10 -0
  59. package/dist/types/widgets/pie/config.d.ts +8 -4
  60. package/dist/types/widgets/range/components/range-item.d.ts +3 -0
  61. package/dist/types/widgets/range/config.d.ts +5 -0
  62. package/dist/types/widgets/range/range-ui.d.ts +3 -0
  63. package/dist/types/widgets/scatterplot/config.d.ts +7 -3
  64. package/dist/types/widgets/selection-summary/selection-summary.d.ts +11 -0
  65. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +10 -0
  66. package/dist/types/widgets/spread/components/max-value.d.ts +3 -0
  67. package/dist/types/widgets/spread/components/min-value.d.ts +3 -0
  68. package/dist/types/widgets/spread/components/separator.d.ts +3 -0
  69. package/dist/types/widgets/spread/config.d.ts +11 -0
  70. package/dist/types/widgets/spread/spread-ui.d.ts +3 -0
  71. package/dist/types/widgets/subheader/subheader.d.ts +11 -0
  72. package/dist/types/widgets/table/config.d.ts +8 -3
  73. package/dist/types/widgets/table/hooks/use-pagination.d.ts +11 -3
  74. package/dist/types/widgets/table/hooks/use-selection.d.ts +11 -2
  75. package/dist/types/widgets/table/hooks/use-sort.d.ts +11 -3
  76. package/dist/types/widgets/timeseries/config.d.ts +8 -4
  77. package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
  78. package/dist/types/widgets/{_shared → utils}/chart-config/index.d.ts +2 -0
  79. package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.d.ts +1 -1
  80. package/dist/types/widgets/utils/formatter.d.ts +1 -0
  81. package/dist/types/widgets/utils/index.d.ts +7 -0
  82. package/dist/types/widgets/wrapper/components/actions.d.ts +3 -0
  83. package/dist/types/widgets/wrapper/components/options.d.ts +3 -0
  84. package/dist/types/widgets/wrapper/components/title.d.ts +3 -0
  85. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +14 -0
  86. package/dist/types/widgets/wrapper/wrapper.d.ts +14 -0
  87. package/dist/use-widget-ref-wtFLDFCD.js.map +1 -1
  88. package/dist/utils-BOhInag6.js.map +1 -1
  89. package/dist/widgets/actions.js +651 -628
  90. package/dist/widgets/actions.js.map +1 -1
  91. package/dist/widgets/bar.js +66 -86
  92. package/dist/widgets/bar.js.map +1 -1
  93. package/dist/widgets/category.js +21 -21
  94. package/dist/widgets/category.js.map +1 -1
  95. package/dist/widgets/echart.js.map +1 -1
  96. package/dist/widgets/formula.js +54 -54
  97. package/dist/widgets/formula.js.map +1 -1
  98. package/dist/widgets/histogram.js +45 -65
  99. package/dist/widgets/histogram.js.map +1 -1
  100. package/dist/widgets/loader.js.map +1 -1
  101. package/dist/widgets/markdown.js.map +1 -1
  102. package/dist/widgets/pie.js +122 -99
  103. package/dist/widgets/pie.js.map +1 -1
  104. package/dist/widgets/range.js +23 -22
  105. package/dist/widgets/range.js.map +1 -1
  106. package/dist/widgets/scatterplot.js +39 -59
  107. package/dist/widgets/scatterplot.js.map +1 -1
  108. package/dist/widgets/selection-summary.js.map +1 -1
  109. package/dist/widgets/skeleton-loader.js.map +1 -1
  110. package/dist/widgets/spread.js +40 -41
  111. package/dist/widgets/spread.js.map +1 -1
  112. package/dist/widgets/subheader.js.map +1 -1
  113. package/dist/widgets/table.js.map +1 -1
  114. package/dist/widgets/timeseries.js +39 -59
  115. package/dist/widgets/timeseries.js.map +1 -1
  116. package/dist/widgets/utils.js +31 -0
  117. package/dist/widgets/utils.js.map +1 -0
  118. package/dist/widgets/wrapper.js.map +1 -1
  119. package/package.json +5 -1
  120. package/src/components/basemaps/basemaps.tsx +20 -0
  121. package/src/components/geolocation-controls/geolocation-controls.tsx +11 -0
  122. package/src/components/lasso-tool/lasso-tool-inline.tsx +17 -0
  123. package/src/components/lasso-tool/lasso-tool.tsx +21 -0
  124. package/src/components/list-data/list-data.tsx +16 -0
  125. package/src/components/measurement-tools/measurement-tools.tsx +20 -0
  126. package/src/components/smart-tooltip/smart-tooltip.tsx +17 -0
  127. package/src/components/tooltip/tooltip.tsx +13 -0
  128. package/src/components/zoom-controls/zoom-controls.tsx +16 -0
  129. package/src/hooks/use-widget-ref.ts +4 -4
  130. package/src/widgets/README.md +10 -10
  131. package/src/widgets/actions/download/download.tsx +11 -0
  132. package/src/widgets/actions/download/exports.tsx +15 -0
  133. package/src/widgets/actions/fullscreen/fullscreen.tsx +13 -0
  134. package/src/widgets/actions/index.ts +1 -0
  135. package/src/widgets/actions/relative-data/relative-data.test.tsx +62 -1
  136. package/src/widgets/actions/relative-data/relative-data.tsx +62 -39
  137. package/src/widgets/bar/config.ts +12 -20
  138. package/src/widgets/bar/style.ts +1 -1
  139. package/src/widgets/category/category-ui.tsx +4 -2
  140. package/src/widgets/category/components/category-bar.tsx +3 -0
  141. package/src/widgets/category/components/category-legend.tsx +3 -0
  142. package/src/widgets/category/components/category-row-multi.tsx +3 -0
  143. package/src/widgets/category/components/category-row-other.tsx +3 -0
  144. package/src/widgets/category/components/category-row-single.tsx +3 -0
  145. package/src/widgets/category/config.ts +11 -0
  146. package/src/widgets/echart/echart-ui.tsx +7 -0
  147. package/src/widgets/echart/echart.tsx +6 -0
  148. package/src/widgets/echart/options.ts +7 -0
  149. package/src/widgets/echart/types.ts +1 -0
  150. package/src/widgets/echart/utils.ts +41 -0
  151. package/src/widgets/error/error.tsx +10 -0
  152. package/src/widgets/formula/components/item.tsx +3 -0
  153. package/src/widgets/formula/components/prefix.tsx +3 -0
  154. package/src/widgets/formula/components/row.tsx +3 -0
  155. package/src/widgets/formula/components/series.tsx +3 -0
  156. package/src/widgets/formula/components/suffix.tsx +3 -0
  157. package/src/widgets/formula/components/value.tsx +4 -2
  158. package/src/widgets/formula/config.ts +11 -0
  159. package/src/widgets/formula/formula-ui.tsx +3 -0
  160. package/src/widgets/histogram/config.ts +11 -20
  161. package/src/widgets/histogram/style.ts +1 -1
  162. package/src/widgets/loader/loader.tsx +22 -0
  163. package/src/widgets/loader/utils.ts +26 -3
  164. package/src/widgets/markdown/config.ts +10 -0
  165. package/src/widgets/markdown/markdown-ui.tsx +7 -0
  166. package/src/widgets/markdown/markdown.tsx +3 -0
  167. package/src/widgets/note/note.tsx +10 -0
  168. package/src/widgets/pie/config.ts +85 -30
  169. package/src/widgets/pie/style.ts +1 -1
  170. package/src/widgets/range/components/range-item.tsx +5 -2
  171. package/src/widgets/range/config.ts +5 -0
  172. package/src/widgets/range/range-ui.tsx +3 -0
  173. package/src/widgets/scatterplot/config.ts +11 -20
  174. package/src/widgets/scatterplot/style.ts +1 -1
  175. package/src/widgets/selection-summary/selection-summary.tsx +11 -0
  176. package/src/widgets/skeleton-loader/skeleton-loader.tsx +10 -0
  177. package/src/widgets/spread/components/max-value.tsx +4 -2
  178. package/src/widgets/spread/components/min-value.tsx +4 -2
  179. package/src/widgets/spread/components/separator.tsx +3 -0
  180. package/src/widgets/spread/config.ts +11 -0
  181. package/src/widgets/spread/spread-ui.tsx +3 -0
  182. package/src/widgets/subheader/subheader.tsx +11 -0
  183. package/src/widgets/table/config.ts +8 -3
  184. package/src/widgets/table/hooks/use-pagination.ts +11 -3
  185. package/src/widgets/table/hooks/use-selection.ts +11 -2
  186. package/src/widgets/table/hooks/use-sort.ts +11 -3
  187. package/src/widgets/timeseries/config.ts +11 -20
  188. package/src/widgets/timeseries/style.ts +1 -1
  189. package/src/widgets/utils/chart-config/download-config.ts +22 -0
  190. package/src/widgets/{_shared → utils}/chart-config/index.ts +4 -0
  191. package/src/widgets/{_shared → utils}/chart-config/option-builders.ts +1 -1
  192. package/src/widgets/utils/formatter.ts +1 -0
  193. package/src/widgets/utils/index.ts +26 -0
  194. package/src/widgets/wrapper/components/actions.tsx +3 -0
  195. package/src/widgets/wrapper/components/options.tsx +3 -0
  196. package/src/widgets/wrapper/components/title.tsx +3 -0
  197. package/src/widgets/wrapper/wrapper-ui.tsx +14 -0
  198. package/src/widgets/wrapper/wrapper.tsx +14 -0
  199. package/dist/styles-CAroD5Rc.js +0 -123
  200. package/dist/styles-CAroD5Rc.js.map +0 -1
  201. /package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +0 -0
  202. /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
  203. /package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.test.d.ts +0 -0
  204. /package/dist/types/widgets/{_shared → utils}/skeleton/index.d.ts +0 -0
  205. /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
  206. /package/src/widgets/{_shared → utils}/chart-config/config-factory.ts +0 -0
  207. /package/src/widgets/{_shared → utils}/chart-config/csv-modifiers.ts +0 -0
  208. /package/src/widgets/{_shared → utils}/chart-config/option-builders.test.ts +0 -0
  209. /package/src/widgets/{_shared → utils}/skeleton/index.ts +0 -0
  210. /package/src/widgets/{_shared → utils}/skeleton/styles.ts +0 -0
@@ -1,2 +1,24 @@
1
1
  import { WidgetLoaderProps } from './types';
2
+ /**
3
+ * Foundation component for all widgets that manages state initialization, synchronization with the widget store, and data transformation pipeline execution.
4
+ *
5
+ * @remarks
6
+ * The WidgetLoader is stateless -- it manages data flow but does not render any UI. Always wrap it with WidgetWrapper for consistent widget appearance.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <WidgetLoader
11
+ * id="sales-chart"
12
+ * type="bar"
13
+ * data={data}
14
+ * isLoading={false}
15
+ * isFetching={false}
16
+ * config={barConfig({ data })}
17
+ * >
18
+ * <WidgetWrapper id="sales-chart" title="Sales">
19
+ * <Echart id="sales-chart" />
20
+ * </WidgetWrapper>
21
+ * </WidgetLoader>
22
+ * ```
23
+ */
2
24
  export declare function WidgetLoader<T extends object = Record<string, unknown>>(props: WidgetLoaderProps<T>): import('react').ReactNode;
@@ -4,9 +4,32 @@
4
4
  */
5
5
  export type ConfigOrFn<TConfig, TData = unknown> = Partial<TConfig> | ((baseConfig: TConfig, data: TData) => Partial<TConfig>);
6
6
  /**
7
- * Resolves a config that may be either an object or a function.
8
- * If it's a function, calls it with baseConfig and data.
9
- * If it's an object (or undefined), returns it as-is.
7
+ * Resolves a widget config that may be either a partial object or a function receiving the computed base config and data. If it is a function, calls it with `baseConfig` and `data`; otherwise returns the value as-is.
8
+ *
9
+ * @param config - The config object or function to resolve.
10
+ * @param baseConfig - The computed base configuration.
11
+ * @param data - The widget data.
12
+ * @returns Resolved partial config, or undefined.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * const resolved = resolveConfig(
17
+ * (base, data) => ({ maxItems: base.maxItems + 5 }),
18
+ * baseConfig,
19
+ * widgetData,
20
+ * )
21
+ * ```
10
22
  */
11
23
  export declare function resolveConfig<TConfig, TData>(config: ConfigOrFn<TConfig, TData> | undefined, baseConfig: TConfig, data: TData): Partial<TConfig> | undefined;
24
+ /**
25
+ * Deep-merges two partial widget config objects using `deepmerge`, with arrays replaced rather than concatenated.
26
+ *
27
+ * @param options - A tuple of two partial configs to merge (base and override).
28
+ * @returns The merged config object.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * const finalConfig = mergeWidgetConfig(baseConfig, resolvedConfig)
33
+ * ```
34
+ */
12
35
  export declare function mergeWidgetConfig<T>(...options: [Partial<T> | undefined, Partial<T> | undefined]): T;
@@ -1,4 +1,14 @@
1
1
  import { DownloadItem } from '../actions';
2
2
  import { MarkdownWidgetConfig, MarkdownWidgetData } from './types';
3
+ /**
4
+ * Creates download configuration for markdown widgets, supporting CSV export of text content. Does not require `refUI` since it only exports text.
5
+ *
6
+ * @returns Array of download items for use with the Download action.
7
+ */
3
8
  export declare function markdownDownloadConfig(): DownloadItem<MarkdownWidgetData>[];
9
+ /**
10
+ * Returns the default configuration for markdown content display widgets.
11
+ *
12
+ * @returns Default markdown widget config (empty object).
13
+ */
4
14
  export declare function markdownConfig(): MarkdownWidgetConfig;
@@ -1,2 +1,9 @@
1
1
  import { MarkdownComponentProps } from './types';
2
+ /**
3
+ * Presentational component that renders a Markdown string as MUI-styled HTML using react-markdown.
4
+ *
5
+ * @remarks
6
+ * Maps Markdown elements (headings, paragraphs, links, lists) to MUI Typography and Link components.
7
+ * Custom component overrides can be passed via the `overrides` prop.
8
+ */
2
9
  export declare function MarkdownUI({ children, overrides }: MarkdownComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,5 @@
1
1
  import { MarkdownUIProps } from './types';
2
+ /**
3
+ * Stateful markdown widget component that reads content from the widget store and renders it as formatted rich text.
4
+ */
2
5
  export declare function Markdown({ id }: MarkdownUIProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,12 @@
1
1
  import { WidgetNoteProps } from './types';
2
+ /**
3
+ * Displays text content with markdown support and automatic show more/less functionality for long content. Automatically detects content exceeding 3 lines and shows an expand/collapse button.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <WidgetNote>
8
+ * {"**Important:** This data is from Q4 2024."}
9
+ * </WidgetNote>
10
+ * ```
11
+ */
2
12
  export declare function WidgetNote({ children, labels, }: WidgetNoteProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,9 @@
1
- import { PieConfig, PieWidgetConfig, PieWidgetData } from './types';
2
- import { DownloadItem } from '../actions';
3
- import { ConfigProps } from '../loader/types';
4
- export declare function pieDownloadConfig({ refUI, }: ConfigProps): DownloadItem<PieWidgetData>[];
1
+ import { PieConfig, PieWidgetConfig } from './types';
2
+ export declare const pieDownloadConfig: ({ refUI }: import('../loader').ConfigProps) => import('../actions').DownloadItem<import('../echart').EchartWidgetData>[];
3
+ /**
4
+ * Generates ECharts configuration for pie and donut chart widgets. Falls back to a horizontal bar layout when multiple data series are provided.
5
+ *
6
+ * @param props - Pie chart configuration including data and theme.
7
+ * @returns Widget config with ECharts option object.
8
+ */
5
9
  export declare function pieConfig(props: PieConfig): PieWidgetConfig;
@@ -1,2 +1,5 @@
1
1
  import { RangeItemProps } from '../types';
2
+ /**
3
+ * Renders a single range slider with editable min/max text inputs, reading its configuration from the widget store.
4
+ */
2
5
  export declare function RangeItem({ id, index }: RangeItemProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,7 @@
1
1
  import { RangeWidgetConfig } from './types';
2
+ /**
3
+ * Returns the default configuration for range (value range with labels) widgets.
4
+ *
5
+ * @returns Default range widget config.
6
+ */
2
7
  export declare function rangeConfig(): RangeWidgetConfig;
@@ -1,2 +1,5 @@
1
1
  import { RangeUIProps } from './types';
2
+ /**
3
+ * Renders a range widget with one or more interactive dual-slider controls for selecting value ranges.
4
+ */
2
5
  export declare function RangeUI(props: RangeUIProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { ScatterplotConfig, ScatterplotWidgetConfig, ScatterplotWidgetData } from './types';
2
- import { DownloadItem } from '../actions';
3
- import { ConfigProps } from '../loader/types';
4
- export declare function scatterplotDownloadConfig({ refUI, }: ConfigProps): DownloadItem<ScatterplotWidgetData>[];
2
+ export declare const scatterplotDownloadConfig: ({ refUI }: import('../loader').ConfigProps) => import('../actions').DownloadItem<ScatterplotWidgetData>[];
3
+ /**
4
+ * Generates ECharts configuration for X-Y scatter plot widgets with value axes, legend support, and CARTO qualitative color palette.
5
+ *
6
+ * @param props - Scatterplot configuration including data points and theme.
7
+ * @returns Widget config with ECharts option object.
8
+ */
5
9
  export declare function scatterplotConfig(props: ScatterplotConfig): ScatterplotWidgetConfig;
@@ -1,2 +1,13 @@
1
1
  import { WidgetSelectionSummaryProps } from './types';
2
+ /**
3
+ * Displays the count of selected items with an optional clear button. Commonly used with the LockSelection action to show selection state in widgets.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <WidgetSelectionSummary
8
+ * selections={selectedItems.length}
9
+ * onClear={() => setSelectedItems([])}
10
+ * />
11
+ * ```
12
+ */
2
13
  export declare function WidgetSelectionSummary({ selections, onClear, labels, }: WidgetSelectionSummaryProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,12 @@
1
1
  import { SkeletonLoaderProps } from './types';
2
+ /**
3
+ * Displays a skeleton loading placeholder while widget data is loading. Subscribes to widget loading state in the store and renders the provided Skeleton component or children accordingly.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <SkeletonLoader id="sales-chart" Skeleton={BarSkeleton}>
8
+ * <Bar id="sales-chart" />
9
+ * </SkeletonLoader>
10
+ * ```
11
+ */
2
12
  export declare function SkeletonLoader({ id, children, Skeleton, }: SkeletonLoaderProps): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -1,2 +1,5 @@
1
1
  import { ValueProps } from '../types';
2
+ /**
3
+ * Displays the formatted maximum value for a spread widget data item.
4
+ */
2
5
  export declare function MaxValue({ id, index, ...props }: ValueProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,5 @@
1
1
  import { ValueProps } from '../types';
2
+ /**
3
+ * Displays the formatted minimum value for a spread widget data item.
4
+ */
2
5
  export declare function MinValue({ id, index, ...props }: ValueProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,5 @@
1
1
  import { ItemProps } from '../../formula/types';
2
+ /**
3
+ * Renders a dash separator between the min and max values in a spread widget.
4
+ */
2
5
  export declare function Separator(props: Omit<ItemProps, 'children'>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,16 @@
1
1
  import { DownloadItem } from '../actions';
2
2
  import { ConfigProps } from '../loader/types';
3
3
  import { SpreadWidgetConfig, SpreadWidgetData } from './types';
4
+ /**
5
+ * Creates download configuration for spread widgets, supporting PNG (screenshot) and CSV (min/max data) exports.
6
+ *
7
+ * @param props - Configuration with `refUI` reference for PNG export.
8
+ * @returns Array of download items for use with the Download action.
9
+ */
4
10
  export declare function spreadDownloadConfig({ refUI, }: ConfigProps): DownloadItem<SpreadWidgetData>[];
11
+ /**
12
+ * Returns the default configuration for spread (min/max value range) widgets.
13
+ *
14
+ * @returns Default spread widget config with empty series.
15
+ */
5
16
  export declare function spreadConfig(): SpreadWidgetConfig;
@@ -1,2 +1,5 @@
1
1
  import { SpreadUIProps } from './types';
2
+ /**
3
+ * Renders a spread widget displaying min-max value pairs with optional prefixes, suffixes, and series indicators.
4
+ */
2
5
  export declare function SpreadUI(props: SpreadUIProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,13 @@
1
1
  import { WidgetSubHeaderProps } from './types';
2
+ /**
3
+ * Flexible two-slot layout for displaying supplementary widget information such as totals, timestamps, or controls. Uses flexbox with space-between justification.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <WidgetSubHeader
8
+ * slotLeft={<Typography variant="caption">Total: 1,234</Typography>}
9
+ * slotRight={<Typography variant="caption">Updated: 2m ago</Typography>}
10
+ * />
11
+ * ```
12
+ */
2
13
  export declare function WidgetSubHeader({ slotLeft, slotRight, sx, }: WidgetSubHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -6,11 +6,16 @@ export declare const DEFAULT_ROWS_PER_PAGE_OPTIONS: number[];
6
6
  export declare const DEFAULT_COLUMN_ID: null;
7
7
  export declare const DEFAULT_DIRECTION: SortDirection;
8
8
  /**
9
- * Default table download configuration
10
- * Supports PNG export (screenshot) and CSV export (data)
9
+ * Creates download configuration for table widgets, supporting PNG (screenshot) and CSV (data) exports. CSV output uses column keys as headers and filters out `id` fields.
10
+ *
11
+ * @param props - Configuration with `refUI` reference for PNG export.
12
+ * @returns Array of download items for use with the Download action.
11
13
  */
12
14
  export declare function tableDownloadConfig({ refUI, }: ConfigProps): TableDownloadConfig;
13
15
  /**
14
- * Default table widget configuration
16
+ * Returns the default configuration for table widgets with pagination and sorting, including column definitions and local data mode.
17
+ *
18
+ * @param columns - Array of column definitions for the table.
19
+ * @returns Default table widget config.
15
20
  */
16
21
  export declare function tableConfig(columns?: TableColumn[]): TableWidgetConfig;
@@ -26,8 +26,16 @@ export interface UsePaginationResult<T> {
26
26
  goToPreviousPage: () => void;
27
27
  }
28
28
  /**
29
- * Hook for managing table pagination
30
- * Supports both local (client-side) and remote (server-side) pagination
31
- * State is persisted in the widget store for the given widgetId
29
+ * Hook for managing table pagination with support for both local (client-side) and remote (server-side) modes.
30
+ * State is persisted in the widget store for the given widget ID.
31
+ *
32
+ * @param widgetId - The widget ID to persist pagination state under.
33
+ * @param data - The full data array (used for local pagination and total count fallback).
34
+ * @returns Pagination state and navigation helpers.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * const { page, setPage, paginatedData, totalPages } = usePagination(widgetId, data)
39
+ * ```
32
40
  */
33
41
  export declare function usePagination<T extends TableRow>(widgetId: string, data: T[]): UsePaginationResult<T>;
@@ -24,7 +24,16 @@ export interface UseSelectionResult {
24
24
  clearSelection: () => void;
25
25
  }
26
26
  /**
27
- * Hook for managing table row selection
28
- * Selection persists across pagination and is stored in the widget store
27
+ * Hook for managing table row selection with persistence across pagination.
28
+ * Selection state is stored in the widget store for the given widget ID.
29
+ *
30
+ * @param widgetId - The widget ID to persist selection state under.
31
+ * @param options - Optional configuration including an `onSelectionChange` callback.
32
+ * @returns Selection state and control functions (toggle, select, deselect, clear).
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * const { selectedIds, isAllSelected, handleSelectRow, clearSelection } = useSelection(widgetId)
37
+ * ```
29
38
  */
30
39
  export declare function useSelection(widgetId: string, options?: UseSelectionOptions): UseSelectionResult;
@@ -15,8 +15,16 @@ export interface UseSortResult<T> extends SortState {
15
15
  clearSort: () => void;
16
16
  }
17
17
  /**
18
- * Hook for managing table sorting
19
- * Supports both local (client-side) and remote (server-side) sorting
20
- * State is persisted in the widget store for the given widgetId
18
+ * Hook for managing table sorting with support for both local (client-side) and remote (server-side) modes.
19
+ * State is persisted in the widget store for the given widget ID.
20
+ *
21
+ * @param widgetId - The widget ID to persist sort state under.
22
+ * @param data - The data array to sort (for local mode).
23
+ * @returns Sort state, sorted data, and sort control functions.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * const { sortedData, sortField, sortDirection, handleSort } = useSort(widgetId, data)
28
+ * ```
21
29
  */
22
30
  export declare function useSort<T extends TableRow>(widgetId: string, data: T[]): UseSortResult<T>;
@@ -1,5 +1,9 @@
1
- import { TimeseriesConfig, TimeseriesWidgetConfig, TimeseriesWidgetData } from './types';
2
- import { DownloadItem } from '../actions';
3
- import { ConfigProps } from '../loader/types';
4
- export declare function timeseriesDownloadConfig({ refUI, }: ConfigProps): DownloadItem<TimeseriesWidgetData>[];
1
+ import { TimeseriesConfig, TimeseriesWidgetConfig } from './types';
2
+ export declare const timeseriesDownloadConfig: ({ refUI }: import('../loader').ConfigProps) => import('../actions').DownloadItem<import('../echart').EchartWidgetData>[];
3
+ /**
4
+ * Generates ECharts configuration for line and area chart widgets over time, with smooth curves, rotated axis labels, and CARTO qualitative color palette.
5
+ *
6
+ * @param props - Timeseries configuration including data and theme.
7
+ * @returns Widget config with ECharts option object.
8
+ */
5
9
  export declare function timeseriesConfig(props: TimeseriesConfig): TimeseriesWidgetConfig;
@@ -0,0 +1,3 @@
1
+ import { DownloadItem } from '../../actions';
2
+ import { ConfigProps } from '../../loader/types';
3
+ export declare function createChartDownloadConfig<TData>(csvModifier: (data: TData) => string[][]): ({ refUI }: ConfigProps) => DownloadItem<TData>[];
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Shared utilities for chart widget configuration
3
3
  */
4
+ export { defaultFormatter } from '../formatter';
4
5
  export { createChartWidgetConfig } from './config-factory';
5
6
  export type { ChartWidgetBaseConfig, CreateChartWidgetConfigParams, } from './config-factory';
6
7
  export { flattenObjectArrayToCSV, scatterplotDataToCSV } from './csv-modifiers';
7
8
  export { buildLegendConfig, buildGridConfig, createTooltipPositioner, createAxisLabelFormatter, createTooltipFormatter, applyXAxisFormatter, applyYAxisFormatter, niceNum, } from './option-builders';
9
+ export { createChartDownloadConfig } from './download-config';
@@ -1,6 +1,6 @@
1
1
  import { Theme } from '@mui/material';
2
2
  import { LegendComponentOption } from 'echarts';
3
- import { CallbackDataParams, TopLevelFormatterParams } from '../../../../node_modules/echarts/types/dist/shared';
3
+ import { CallbackDataParams, TopLevelFormatterParams } from 'echarts/types/dist/shared';
4
4
  /**
5
5
  * Shared EChart configuration builders for chart widgets
6
6
  */
@@ -0,0 +1 @@
1
+ export declare const defaultFormatter: (value: number) => string;
@@ -0,0 +1,7 @@
1
+ export { defaultFormatter } from './formatter';
2
+ export { createChartWidgetConfig } from './chart-config';
3
+ export type { ChartWidgetBaseConfig, CreateChartWidgetConfigParams, } from './chart-config';
4
+ export { flattenObjectArrayToCSV, scatterplotDataToCSV } from './chart-config';
5
+ export { buildLegendConfig, buildGridConfig, createTooltipPositioner, createAxisLabelFormatter, createTooltipFormatter, applyXAxisFormatter, applyYAxisFormatter, niceNum, } from './chart-config';
6
+ export { baseSkeletonStyles } from './skeleton';
7
+ export { createChartDownloadConfig } from './chart-config';
@@ -1,2 +1,5 @@
1
1
  import { WrapperActionsProps } from '../types';
2
+ /**
3
+ * Renders action buttons in the widget wrapper header. Each action click event is stopped from propagating to the accordion.
4
+ */
2
5
  export declare function Actions({ actions }: WrapperActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,5 @@
1
1
  import { WrapperOptionsProps } from '../types';
2
+ /**
3
+ * Renders a dropdown options menu in the widget wrapper header, triggered by a vertical ellipsis icon button.
4
+ */
2
5
  export declare function Options({ labels, options, }: WrapperOptionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { WrapperOptionsProps } from '../types';
3
+ /**
4
+ * Renders the widget title text inside the wrapper header with smart tooltip support for truncated titles.
5
+ */
3
6
  export declare function Title({ label, children, }: {
4
7
  children: ReactNode;
5
8
  label?: NonNullable<WrapperOptionsProps['labels']>['title'];
@@ -1,2 +1,16 @@
1
1
  import { WrapperUIProps } from './types';
2
+ /**
3
+ * Presentational wrapper component that renders the widget accordion UI with title, actions, options menu, and loading indicator. For uncontrolled usage without automatic widget store synchronization, use this instead of WidgetWrapper.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <WrapperUI
8
+ * id="my-widget"
9
+ * actions={[<Download key="download" id="my-widget" />]}
10
+ * onChangeCollapsed={(e, collapsed) => console.log(collapsed)}
11
+ * >
12
+ * <div>Content</div>
13
+ * </WrapperUI>
14
+ * ```
15
+ */
2
16
  export declare function WrapperUI({ children, id, actions, sx, labels, options, onChangeCollapsed, }: WrapperUIProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,16 @@
1
1
  import { WrapperProps } from './types';
2
+ /**
3
+ * Container component providing a collapsible header with title, action buttons, and options menu for widgets. Syncs collapse, disabled, and title state with the widget store.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <WidgetWrapper
8
+ * id="my-widget"
9
+ * title="Sales Overview"
10
+ * actions={[<Download key="download" id="my-widget" items={downloads} />]}
11
+ * >
12
+ * {children}
13
+ * </WidgetWrapper>
14
+ * ```
15
+ */
2
16
  export declare function WidgetWrapper({ id, title, defaultCollapsed, disabled, sx, actions, options, labels, children, onChangeCollapsed, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"use-widget-ref-wtFLDFCD.js","sources":["../src/hooks/use-widget-ref.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport { useWidgetStore } from '../widgets/stores/widget-store'\n\n/**\n * Custom hook for registering a DOM element ref with the widget store.\n * This allows other parts of the application to access the widget's DOM element.\n *\n * @param widgetId - The widget ID to register the ref under\n * @returns A ref object to attach to the DOM element\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 const setWidget = useWidgetStore((store) => store.setWidget)\n\n useEffect(() => {\n if (ref.current) {\n setWidget(widgetId, { refUI: ref, instance: instance })\n }\n }, [widgetId, setWidget])\n\n return { ref, instance }\n}\n"],"names":["useWidgetRef","widgetId","$","_c","ref","useRef","instance","setWidget","useWidgetStore","_temp","t0","t1","current","refUI","useEffect","t2","Symbol","for","store"],"mappings":";;;AAmBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAGLC,IAAYC,EAAiB,IAAI,GACjCC,IAAiBD,EAA+B,IAAI,GACpDE,IAAkBC,EAAeC,CAA0B;AAAC,MAAAC,GAAAC;AAAA,EAAAT,EAAA,CAAA,MAAAK,KAAAL,SAAAD,KAElDS,IAAAA,MAAA;AACR,IAAIN,EAAGQ,WACLL,EAAUN,GAAU;AAAA,MAAAY,OAAST;AAAAA,MAAGE,UAAAA;AAAAA,IAAAA,CAAsB;AAAA,EACvD,GACAK,IAAA,CAACV,GAAUM,CAAS,GAACL,OAAAK,GAAAL,OAAAD,GAAAC,OAAAQ,GAAAR,OAAAS,MAAAD,IAAAR,EAAA,CAAA,GAAAS,IAAAT,EAAA,CAAA,IAJxBY,EAAUJ,GAIPC,CAAqB;AAAC,MAAAI;AAAA,SAAAb,EAAA,CAAA,MAAAc,uBAAAC,IAAA,2BAAA,KAElBF,IAAA;AAAA,IAAAX,KAAAA;AAAAA,IAAAE,UAAAA;AAAAA,EAAAA,GAAiBJ,OAAAa,KAAAA,IAAAb,EAAA,CAAA,GAAjBa;AAAiB;AAbnB,SAAAN,EAAAS,GAAA;AAAA,SAKuCA,EAAKX;AAAU;"}
1
+ {"version":3,"file":"use-widget-ref-wtFLDFCD.js","sources":["../src/hooks/use-widget-ref.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport { useWidgetStore } 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 const setWidget = useWidgetStore((store) => store.setWidget)\n\n useEffect(() => {\n if (ref.current) {\n setWidget(widgetId, { refUI: ref, instance: instance })\n }\n }, [widgetId, setWidget])\n\n return { ref, instance }\n}\n"],"names":["useWidgetRef","widgetId","$","_c","ref","useRef","instance","setWidget","useWidgetStore","_temp","t0","t1","current","refUI","useEffect","t2","Symbol","for","store"],"mappings":";;;AAmBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAGLC,IAAYC,EAAiB,IAAI,GACjCC,IAAiBD,EAA+B,IAAI,GACpDE,IAAkBC,EAAeC,CAA0B;AAAC,MAAAC,GAAAC;AAAA,EAAAT,EAAA,CAAA,MAAAK,KAAAL,SAAAD,KAElDS,IAAAA,MAAA;AACR,IAAIN,EAAGQ,WACLL,EAAUN,GAAU;AAAA,MAAAY,OAAST;AAAAA,MAAGE,UAAAA;AAAAA,IAAAA,CAAsB;AAAA,EACvD,GACAK,IAAA,CAACV,GAAUM,CAAS,GAACL,OAAAK,GAAAL,OAAAD,GAAAC,OAAAQ,GAAAR,OAAAS,MAAAD,IAAAR,EAAA,CAAA,GAAAS,IAAAT,EAAA,CAAA,IAJxBY,EAAUJ,GAIPC,CAAqB;AAAC,MAAAI;AAAA,SAAAb,EAAA,CAAA,MAAAc,uBAAAC,IAAA,2BAAA,KAElBF,IAAA;AAAA,IAAAX,KAAAA;AAAAA,IAAAE,UAAAA;AAAAA,EAAAA,GAAiBJ,OAAAa,KAAAA,IAAAb,EAAA,CAAA,GAAjBa;AAAiB;AAbnB,SAAAN,EAAAS,GAAA;AAAA,SAKuCA,EAAKX;AAAU;"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils-BOhInag6.js","sources":["../src/widgets/echart/const.ts","../src/widgets/echart/utils.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\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\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\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\nexport function getEChartStackConfig(stackGroup: string = DEFAULT_STACK_GROUP) {\n return { stack: stackGroup }\n}\n"],"names":["DEFAULT_STACK_GROUP","mergeEchartWidgetConfig","optionA","optionB","customMergeFn","deepmerge","customMerge","key","externalMerge","_","b","a","merged","formatter","baseFormatter","customFormatter","value","maxLength","Math","max","length","Array","from","index","aItem","bItem","getEChartZoomConfig","start","end","inside","xSlider","ySlider","showSliders","xAxisLabelFormatter","bottomOffset","theme","sliderStyles","getEChartZoomSliderStyles","dataZoom","throttle","type","xAxisIndex","yAxisIndex","show","zoom","zoomLock","orientation","bottom","height","parseInt","spacing","labelFormatter","showDetail","brushSelect","moveHandleSize","handleSize","handleIcon","left","width","filter","d","fillerColor","borderColor","borderWidth","backgroundColor","borderRadius","dataBackground","lineStyle","opacity","areaStyle","color","palette","secondary","main","selectedDataBackground","handleStyle","common","white","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","textStyle","black","fontSize","typography","overlineDelicate","fontFamily","getEChartBrushConfig","brushType","brushMode","brush","toolbox","getEChartStackConfig","stackGroup","stack"],"mappings":";AAAO,MAAMA,IAAsB;ACK5B,SAASC,EACdC,GACAC,GACAC,GAGG;AACH,SAAOC,EAAUH,KAAW,IAAIC,KAAW,CAAA,GAAI;AAAA,IAC7CG,aAAcC,CAAAA,MAAQ;AACpB,YAAMC,IAAgBJ,IAAgBG,CAAG;AACzC,UAAIC,EAAe,QAAOA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,SAAO;AAAA,IAAE+F,OAAOD;AAAAA,EAAAA;AAClB;"}
1
+ {"version":3,"file":"utils-BOhInag6.js","sources":["../src/widgets/echart/const.ts","../src/widgets/echart/utils.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"],"names":["DEFAULT_STACK_GROUP","mergeEchartWidgetConfig","optionA","optionB","customMergeFn","deepmerge","customMerge","key","externalMerge","_","b","a","merged","formatter","baseFormatter","customFormatter","value","maxLength","Math","max","length","Array","from","index","aItem","bItem","getEChartZoomConfig","start","end","inside","xSlider","ySlider","showSliders","xAxisLabelFormatter","bottomOffset","theme","sliderStyles","getEChartZoomSliderStyles","dataZoom","throttle","type","xAxisIndex","yAxisIndex","show","zoom","zoomLock","orientation","bottom","height","parseInt","spacing","labelFormatter","showDetail","brushSelect","moveHandleSize","handleSize","handleIcon","left","width","filter","d","fillerColor","borderColor","borderWidth","backgroundColor","borderRadius","dataBackground","lineStyle","opacity","areaStyle","color","palette","secondary","main","selectedDataBackground","handleStyle","common","white","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","textStyle","black","fontSize","typography","overlineDelicate","fontFamily","getEChartBrushConfig","brushType","brushMode","brush","toolbox","getEChartStackConfig","stackGroup","stack"],"mappings":";AAAO,MAAMA,IAAsB;AC0B5B,SAASC,EACdC,GACAC,GACAC,GAGG;AACH,SAAOC,EAAUH,KAAW,IAAIC,KAAW,CAAA,GAAI;AAAA,IAC7CG,aAAcC,CAAAA,MAAQ;AACpB,YAAMC,IAAgBJ,IAAgBG,CAAG;AACzC,UAAIC,EAAe,QAAOA;AAE1B,UAAID,MAAQ;AACV,eAAO,CAACE,GAAGC,MAAkBA;AAE/B,UAAIH,MAAQ;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