@carto/ps-react-ui 4.4.1 → 4.4.3

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 (225) hide show
  1. package/dist/components.js.map +1 -1
  2. package/dist/download-config-Dqu78h2a.js +57 -0
  3. package/dist/download-config-Dqu78h2a.js.map +1 -0
  4. package/dist/error-CEkRPccv.js.map +1 -1
  5. package/dist/exports-Cr43OCul.js.map +1 -1
  6. package/dist/formatter-B9Bxn1k7.js +6 -0
  7. package/dist/formatter-B9Bxn1k7.js.map +1 -0
  8. package/dist/lasso-tool-BYbxrJ-7.js.map +1 -1
  9. package/dist/note-t51drNe0.js.map +1 -1
  10. package/dist/options-D9wflre6.js.map +1 -1
  11. package/dist/row-DTCV0Ocm.js.map +1 -1
  12. package/dist/series-CYNOu2Ju.js.map +1 -1
  13. package/dist/smart-tooltip-D4vwQpFf.js.map +1 -1
  14. package/dist/styles-Y8q7Jff3.js +118 -0
  15. package/dist/styles-Y8q7Jff3.js.map +1 -0
  16. package/dist/tooltip-BDnrRKrp.js.map +1 -1
  17. package/dist/types/components/basemaps/basemaps.d.ts +20 -0
  18. package/dist/types/components/geolocation-controls/geolocation-controls.d.ts +11 -0
  19. package/dist/types/components/lasso-tool/lasso-tool-inline.d.ts +17 -0
  20. package/dist/types/components/lasso-tool/lasso-tool.d.ts +21 -0
  21. package/dist/types/components/list-data/list-data.d.ts +16 -0
  22. package/dist/types/components/measurement-tools/measurement-tools.d.ts +20 -0
  23. package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +17 -0
  24. package/dist/types/components/tooltip/tooltip.d.ts +13 -0
  25. package/dist/types/components/zoom-controls/zoom-controls.d.ts +16 -0
  26. package/dist/types/hooks/use-widget-ref.d.ts +4 -4
  27. package/dist/types/widgets/actions/brush-toggle/types.d.ts +8 -2
  28. package/dist/types/widgets/actions/download/download.d.ts +11 -0
  29. package/dist/types/widgets/actions/download/exports.d.ts +15 -0
  30. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +13 -0
  31. package/dist/types/widgets/actions/index.d.ts +1 -1
  32. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +1 -0
  33. package/dist/types/widgets/bar/config.d.ts +8 -4
  34. package/dist/types/widgets/category/category-ui.d.ts +3 -0
  35. package/dist/types/widgets/category/components/category-bar.d.ts +3 -0
  36. package/dist/types/widgets/category/components/category-legend.d.ts +3 -0
  37. package/dist/types/widgets/category/components/category-row-multi.d.ts +5 -1
  38. package/dist/types/widgets/category/components/category-row-other.d.ts +3 -0
  39. package/dist/types/widgets/category/components/category-row-single.d.ts +5 -1
  40. package/dist/types/widgets/category/config.d.ts +11 -0
  41. package/dist/types/widgets/category/types.d.ts +1 -0
  42. package/dist/types/widgets/echart/echart-ui.d.ts +7 -0
  43. package/dist/types/widgets/echart/echart.d.ts +6 -0
  44. package/dist/types/widgets/echart/options.d.ts +7 -0
  45. package/dist/types/widgets/echart/types.d.ts +3 -0
  46. package/dist/types/widgets/echart/utils.d.ts +41 -0
  47. package/dist/types/widgets/error/error.d.ts +10 -0
  48. package/dist/types/widgets/formula/components/item.d.ts +3 -0
  49. package/dist/types/widgets/formula/components/prefix.d.ts +3 -0
  50. package/dist/types/widgets/formula/components/row.d.ts +3 -0
  51. package/dist/types/widgets/formula/components/series.d.ts +3 -0
  52. package/dist/types/widgets/formula/components/suffix.d.ts +3 -0
  53. package/dist/types/widgets/formula/components/value.d.ts +3 -0
  54. package/dist/types/widgets/formula/config.d.ts +11 -0
  55. package/dist/types/widgets/formula/formula-ui.d.ts +3 -0
  56. package/dist/types/widgets/histogram/config.d.ts +18 -2
  57. package/dist/types/widgets/histogram/index.d.ts +2 -1
  58. package/dist/types/widgets/histogram/types.d.ts +6 -3
  59. package/dist/types/widgets/loader/loader.d.ts +22 -0
  60. package/dist/types/widgets/loader/utils.d.ts +26 -3
  61. package/dist/types/widgets/markdown/config.d.ts +10 -0
  62. package/dist/types/widgets/markdown/markdown-ui.d.ts +7 -0
  63. package/dist/types/widgets/markdown/markdown.d.ts +3 -0
  64. package/dist/types/widgets/note/note.d.ts +10 -0
  65. package/dist/types/widgets/pie/config.d.ts +8 -4
  66. package/dist/types/widgets/range/components/range-item.d.ts +3 -0
  67. package/dist/types/widgets/range/config.d.ts +5 -0
  68. package/dist/types/widgets/range/range-ui.d.ts +3 -0
  69. package/dist/types/widgets/scatterplot/config.d.ts +7 -3
  70. package/dist/types/widgets/selection-summary/selection-summary.d.ts +11 -0
  71. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +10 -0
  72. package/dist/types/widgets/spread/components/max-value.d.ts +3 -0
  73. package/dist/types/widgets/spread/components/min-value.d.ts +3 -0
  74. package/dist/types/widgets/spread/components/separator.d.ts +3 -0
  75. package/dist/types/widgets/spread/config.d.ts +11 -0
  76. package/dist/types/widgets/spread/spread-ui.d.ts +3 -0
  77. package/dist/types/widgets/stores/types.d.ts +2 -0
  78. package/dist/types/widgets/subheader/subheader.d.ts +11 -0
  79. package/dist/types/widgets/table/config.d.ts +8 -3
  80. package/dist/types/widgets/table/hooks/use-pagination.d.ts +11 -3
  81. package/dist/types/widgets/table/hooks/use-selection.d.ts +11 -2
  82. package/dist/types/widgets/table/hooks/use-sort.d.ts +11 -3
  83. package/dist/types/widgets/timeseries/config.d.ts +8 -4
  84. package/dist/types/widgets/utils/chart-config/download-config.d.ts +3 -0
  85. package/dist/types/widgets/{_shared → utils}/chart-config/index.d.ts +2 -0
  86. package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.d.ts +14 -9
  87. package/dist/types/widgets/utils/formatter.d.ts +2 -0
  88. package/dist/types/widgets/utils/index.d.ts +7 -0
  89. package/dist/types/widgets/wrapper/components/actions.d.ts +3 -0
  90. package/dist/types/widgets/wrapper/components/options.d.ts +3 -0
  91. package/dist/types/widgets/wrapper/components/title.d.ts +3 -0
  92. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +14 -0
  93. package/dist/types/widgets/wrapper/wrapper.d.ts +14 -0
  94. package/dist/use-widget-ref-wtFLDFCD.js.map +1 -1
  95. package/dist/utils-BOhInag6.js.map +1 -1
  96. package/dist/widgets/actions.js +720 -681
  97. package/dist/widgets/actions.js.map +1 -1
  98. package/dist/widgets/bar.js +78 -92
  99. package/dist/widgets/bar.js.map +1 -1
  100. package/dist/widgets/category.js +206 -197
  101. package/dist/widgets/category.js.map +1 -1
  102. package/dist/widgets/echart.js.map +1 -1
  103. package/dist/widgets/formula.js +54 -54
  104. package/dist/widgets/formula.js.map +1 -1
  105. package/dist/widgets/histogram.js +106 -86
  106. package/dist/widgets/histogram.js.map +1 -1
  107. package/dist/widgets/loader.js.map +1 -1
  108. package/dist/widgets/markdown.js.map +1 -1
  109. package/dist/widgets/pie.js +147 -112
  110. package/dist/widgets/pie.js.map +1 -1
  111. package/dist/widgets/range.js +23 -22
  112. package/dist/widgets/range.js.map +1 -1
  113. package/dist/widgets/scatterplot.js +46 -60
  114. package/dist/widgets/scatterplot.js.map +1 -1
  115. package/dist/widgets/selection-summary.js.map +1 -1
  116. package/dist/widgets/skeleton-loader.js.map +1 -1
  117. package/dist/widgets/spread.js +40 -41
  118. package/dist/widgets/spread.js.map +1 -1
  119. package/dist/widgets/subheader.js.map +1 -1
  120. package/dist/widgets/table.js.map +1 -1
  121. package/dist/widgets/timeseries.js +51 -65
  122. package/dist/widgets/timeseries.js.map +1 -1
  123. package/dist/widgets/toolbar-actions.js +101 -6693
  124. package/dist/widgets/toolbar-actions.js.map +1 -1
  125. package/dist/widgets/utils.js +33 -0
  126. package/dist/widgets/utils.js.map +1 -0
  127. package/dist/widgets/wrapper.js.map +1 -1
  128. package/package.json +9 -4
  129. package/src/components/basemaps/basemaps.tsx +20 -0
  130. package/src/components/geolocation-controls/geolocation-controls.tsx +11 -0
  131. package/src/components/lasso-tool/lasso-tool-inline.tsx +17 -0
  132. package/src/components/lasso-tool/lasso-tool.tsx +21 -0
  133. package/src/components/list-data/list-data.tsx +16 -0
  134. package/src/components/measurement-tools/measurement-tools.tsx +20 -0
  135. package/src/components/smart-tooltip/smart-tooltip.tsx +17 -0
  136. package/src/components/tooltip/tooltip.tsx +13 -0
  137. package/src/components/zoom-controls/zoom-controls.tsx +16 -0
  138. package/src/hooks/use-widget-ref.ts +4 -4
  139. package/src/widgets/README.md +13 -13
  140. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +42 -47
  141. package/src/widgets/actions/brush-toggle/types.ts +8 -2
  142. package/src/widgets/actions/download/download.tsx +11 -0
  143. package/src/widgets/actions/download/exports.tsx +15 -0
  144. package/src/widgets/actions/fullscreen/fullscreen.tsx +13 -0
  145. package/src/widgets/actions/index.ts +1 -0
  146. package/src/widgets/actions/relative-data/relative-data.test.tsx +62 -1
  147. package/src/widgets/actions/relative-data/relative-data.tsx +62 -39
  148. package/src/widgets/bar/config.ts +34 -34
  149. package/src/widgets/bar/style.ts +1 -1
  150. package/src/widgets/category/category-ui.tsx +12 -2
  151. package/src/widgets/category/components/category-bar.tsx +3 -0
  152. package/src/widgets/category/components/category-legend.tsx +3 -0
  153. package/src/widgets/category/components/category-row-multi.tsx +9 -2
  154. package/src/widgets/category/components/category-row-other.tsx +3 -0
  155. package/src/widgets/category/components/category-row-single.tsx +8 -1
  156. package/src/widgets/category/config.ts +11 -0
  157. package/src/widgets/category/types.ts +1 -0
  158. package/src/widgets/echart/echart-ui.tsx +7 -0
  159. package/src/widgets/echart/echart.tsx +6 -0
  160. package/src/widgets/echart/options.ts +7 -0
  161. package/src/widgets/echart/types.ts +3 -0
  162. package/src/widgets/echart/utils.ts +41 -0
  163. package/src/widgets/error/error.tsx +10 -0
  164. package/src/widgets/formula/components/item.tsx +3 -0
  165. package/src/widgets/formula/components/prefix.tsx +3 -0
  166. package/src/widgets/formula/components/row.tsx +3 -0
  167. package/src/widgets/formula/components/series.tsx +3 -0
  168. package/src/widgets/formula/components/suffix.tsx +3 -0
  169. package/src/widgets/formula/components/value.tsx +4 -2
  170. package/src/widgets/formula/config.ts +11 -0
  171. package/src/widgets/formula/formula-ui.tsx +3 -0
  172. package/src/widgets/histogram/config.ts +93 -21
  173. package/src/widgets/histogram/index.ts +6 -1
  174. package/src/widgets/histogram/style.ts +1 -1
  175. package/src/widgets/histogram/types.ts +9 -3
  176. package/src/widgets/loader/loader.tsx +22 -0
  177. package/src/widgets/loader/utils.ts +26 -3
  178. package/src/widgets/markdown/config.ts +10 -0
  179. package/src/widgets/markdown/markdown-ui.tsx +7 -0
  180. package/src/widgets/markdown/markdown.tsx +3 -0
  181. package/src/widgets/note/note.tsx +10 -0
  182. package/src/widgets/pie/config.ts +100 -33
  183. package/src/widgets/pie/style.ts +1 -1
  184. package/src/widgets/range/components/range-item.tsx +5 -2
  185. package/src/widgets/range/config.ts +5 -0
  186. package/src/widgets/range/range-ui.tsx +3 -0
  187. package/src/widgets/scatterplot/config.ts +19 -23
  188. package/src/widgets/scatterplot/style.ts +1 -1
  189. package/src/widgets/selection-summary/selection-summary.tsx +11 -0
  190. package/src/widgets/skeleton-loader/skeleton-loader.tsx +10 -0
  191. package/src/widgets/spread/components/max-value.tsx +4 -2
  192. package/src/widgets/spread/components/min-value.tsx +4 -2
  193. package/src/widgets/spread/components/separator.tsx +3 -0
  194. package/src/widgets/spread/config.ts +11 -0
  195. package/src/widgets/spread/spread-ui.tsx +3 -0
  196. package/src/widgets/stores/types.ts +2 -0
  197. package/src/widgets/subheader/subheader.tsx +11 -0
  198. package/src/widgets/table/config.ts +8 -3
  199. package/src/widgets/table/hooks/use-pagination.ts +11 -3
  200. package/src/widgets/table/hooks/use-selection.ts +11 -2
  201. package/src/widgets/table/hooks/use-sort.ts +11 -3
  202. package/src/widgets/timeseries/config.ts +32 -33
  203. package/src/widgets/timeseries/style.ts +1 -1
  204. package/src/widgets/utils/chart-config/download-config.ts +22 -0
  205. package/src/widgets/{_shared → utils}/chart-config/index.ts +4 -0
  206. package/src/widgets/{_shared → utils}/chart-config/option-builders.ts +23 -13
  207. package/src/widgets/utils/formatter.ts +2 -0
  208. package/src/widgets/utils/index.ts +26 -0
  209. package/src/widgets/wrapper/components/actions.tsx +3 -0
  210. package/src/widgets/wrapper/components/options.tsx +3 -0
  211. package/src/widgets/wrapper/components/title.tsx +3 -0
  212. package/src/widgets/wrapper/wrapper-ui.tsx +14 -0
  213. package/src/widgets/wrapper/wrapper.tsx +14 -0
  214. package/dist/styles-CAroD5Rc.js +0 -123
  215. package/dist/styles-CAroD5Rc.js.map +0 -1
  216. /package/dist/types/widgets/{_shared → utils}/chart-config/config-factory.d.ts +0 -0
  217. /package/dist/types/widgets/{_shared → utils}/chart-config/csv-modifiers.d.ts +0 -0
  218. /package/dist/types/widgets/{_shared → utils}/chart-config/option-builders.test.d.ts +0 -0
  219. /package/dist/types/widgets/{_shared → utils}/skeleton/index.d.ts +0 -0
  220. /package/dist/types/widgets/{_shared → utils}/skeleton/styles.d.ts +0 -0
  221. /package/src/widgets/{_shared → utils}/chart-config/config-factory.ts +0 -0
  222. /package/src/widgets/{_shared → utils}/chart-config/csv-modifiers.ts +0 -0
  223. /package/src/widgets/{_shared → utils}/chart-config/option-builders.test.ts +0 -0
  224. /package/src/widgets/{_shared → utils}/skeleton/index.ts +0 -0
  225. /package/src/widgets/{_shared → utils}/skeleton/styles.ts +0 -0
@@ -13,35 +13,28 @@ import {
13
13
  buildLegendConfig,
14
14
  buildGridConfig,
15
15
  createTooltipFormatter,
16
+ createChartDownloadConfig,
16
17
  applyYAxisFormatter,
17
- } from '../_shared/chart-config'
18
- import { downloadToCSV, downloadToPNG, type DownloadItem } from '../actions'
19
- import type { ConfigProps } from '../loader/types'
18
+ applyXAxisFormatter,
19
+ } from '../utils/chart-config'
20
20
 
21
- export function timeseriesDownloadConfig({
22
- refUI,
23
- }: ConfigProps): DownloadItem<TimeseriesWidgetData>[] {
24
- return [
25
- {
26
- ...downloadToPNG,
27
- modifier: () => downloadToPNG.modifier(refUI),
28
- },
29
- {
30
- ...downloadToCSV,
31
- modifier: async (data) => {
32
- const rows = flattenObjectArrayToCSV(data)
33
- return downloadToCSV.modifier(rows)
34
- },
35
- },
36
- ]
37
- }
21
+ export const timeseriesDownloadConfig =
22
+ createChartDownloadConfig<TimeseriesWidgetData>(flattenObjectArrayToCSV)
38
23
 
24
+ /**
25
+ * Generates ECharts configuration for line and area chart widgets over time, with smooth curves, rotated axis labels, and CARTO qualitative color palette.
26
+ *
27
+ * @param props - Timeseries configuration including data and theme.
28
+ * @returns Widget config with ECharts option object.
29
+ */
39
30
  export function timeseriesConfig(
40
31
  props: TimeseriesConfig,
41
32
  ): TimeseriesWidgetConfig {
42
33
  return {
43
34
  type: 'timeseries',
44
35
  option: mergeEchartWidgetConfig(getCommonOptions(props), getOption(props)),
36
+ formatter: props.formatter,
37
+ labelFormatter: props.labelFormatter,
45
38
  }
46
39
  }
47
40
 
@@ -49,6 +42,7 @@ function getOption({
49
42
  data = [],
50
43
  theme,
51
44
  formatter,
45
+ labelFormatter,
52
46
  }: TimeseriesConfig): EchartOptionsProps {
53
47
  const hasLegend = (data?.length ?? 0) > 1
54
48
 
@@ -82,7 +76,7 @@ function getOption({
82
76
  }
83
77
 
84
78
  return {
85
- legend: buildLegendConfig(hasLegend),
79
+ legend: buildLegendConfig({ hasLegend, labelFormatter }),
86
80
  grid: {
87
81
  ...buildGridConfig(hasLegend, theme),
88
82
  outerBounds: {
@@ -91,18 +85,21 @@ function getOption({
91
85
  top: parseInt(theme.spacing(2)),
92
86
  },
93
87
  },
94
- xAxis: {
95
- type: 'category',
96
- axisTick: {
97
- alignWithLabel: true,
98
- },
99
- axisLabel: {
100
- show: true,
101
- showMaxLabel: true,
102
- showMinLabel: true,
103
- rotate: 45,
88
+ xAxis: applyXAxisFormatter(
89
+ {
90
+ type: 'category',
91
+ axisTick: {
92
+ alignWithLabel: true,
93
+ },
94
+ axisLabel: {
95
+ show: true,
96
+ showMaxLabel: true,
97
+ showMinLabel: true,
98
+ rotate: 45,
99
+ },
104
100
  },
105
- },
101
+ labelFormatter,
102
+ ),
106
103
  yAxis: applyYAxisFormatter(yAxis, formatter),
107
104
  tooltip: {
108
105
  formatter: createTooltipFormatter((item) => {
@@ -117,7 +114,9 @@ function getOption({
117
114
 
118
115
  const marker = typeof item.marker === 'string' ? item.marker : ''
119
116
  const seriesName = item.seriesName ? `${item.seriesName}: ` : ''
120
- const name = item.name ?? ''
117
+ const name = labelFormatter
118
+ ? String(labelFormatter(item.name ?? ''))
119
+ : (item.name ?? '')
121
120
 
122
121
  return { name, seriesName, marker, value: formattedValue }
123
122
  }),
@@ -1,5 +1,5 @@
1
1
  import type { SxProps, Theme } from '@mui/material'
2
- import { baseSkeletonStyles } from '../_shared/skeleton'
2
+ import { baseSkeletonStyles } from '../utils/skeleton'
3
3
 
4
4
  export const styles = {
5
5
  skeleton: {
@@ -0,0 +1,22 @@
1
+ import { downloadToCSV, downloadToPNG, type DownloadItem } from '../../actions'
2
+ import type { ConfigProps } from '../../loader/types'
3
+
4
+ export function createChartDownloadConfig<TData>(
5
+ csvModifier: (data: TData) => string[][],
6
+ ) {
7
+ return function ({ refUI }: ConfigProps): DownloadItem<TData>[] {
8
+ return [
9
+ {
10
+ ...downloadToPNG,
11
+ modifier: () => downloadToPNG.modifier(refUI),
12
+ },
13
+ {
14
+ ...downloadToCSV,
15
+ modifier: async (data) => {
16
+ const rows = csvModifier(data)
17
+ return downloadToCSV.modifier(rows)
18
+ },
19
+ },
20
+ ]
21
+ }
22
+ }
@@ -2,6 +2,8 @@
2
2
  * Shared utilities for chart widget configuration
3
3
  */
4
4
 
5
+ export { defaultFormatter, defaultLabelFormatter } from '../formatter'
6
+
5
7
  export { createChartWidgetConfig } from './config-factory'
6
8
  export type {
7
9
  ChartWidgetBaseConfig,
@@ -20,3 +22,5 @@ export {
20
22
  applyYAxisFormatter,
21
23
  niceNum,
22
24
  } from './option-builders'
25
+
26
+ export { createChartDownloadConfig } from './download-config'
@@ -3,7 +3,7 @@ import type { LegendComponentOption } from 'echarts'
3
3
  import type {
4
4
  CallbackDataParams,
5
5
  TopLevelFormatterParams,
6
- } from 'node_modules/echarts/types/dist/shared'
6
+ } from 'echarts/types/dist/shared'
7
7
 
8
8
  /**
9
9
  * Shared EChart configuration builders for chart widgets
@@ -26,10 +26,18 @@ export function niceNum(value: number): number {
26
26
  /**
27
27
  * Builds standard legend configuration for chart widgets
28
28
  *
29
- * @param hasLegend - Whether to show the legend
29
+ * @param params - Legend configuration parameters
30
+ * @param params.hasLegend - Whether to show the legend
31
+ * @param params.labelFormatter - Optional formatter for legend item names
30
32
  * @returns Legend configuration object
31
33
  */
32
- export function buildLegendConfig(hasLegend: boolean): LegendComponentOption {
34
+ export function buildLegendConfig({
35
+ hasLegend,
36
+ labelFormatter,
37
+ }: {
38
+ hasLegend: boolean
39
+ labelFormatter?: (value: string | number) => string | number
40
+ }): LegendComponentOption {
33
41
  return {
34
42
  show: hasLegend,
35
43
  icon: 'circle' as const,
@@ -37,6 +45,9 @@ export function buildLegendConfig(hasLegend: boolean): LegendComponentOption {
37
45
  bottom: 0,
38
46
  orient: 'horizontal',
39
47
  type: 'scroll',
48
+ ...(labelFormatter && {
49
+ formatter: (name: string) => String(labelFormatter(name)),
50
+ }),
40
51
  }
41
52
  }
42
53
 
@@ -101,25 +112,24 @@ export function createAxisLabelFormatter(
101
112
  }
102
113
 
103
114
  /**
104
- * Applies formatter to xAxis configuration
105
- * Only applies to single axis objects (not arrays) with type 'value'
115
+ * Applies labelFormatter to xAxis configuration
116
+ * Applies to any xAxis regardless of axis type (category, value, etc.)
106
117
  *
107
118
  * @param xAxis - Existing xAxis configuration
108
- * @param formatter - Optional formatter function from widget config
109
- * @returns Updated xAxis configuration or undefined if no changes needed
119
+ * @param labelFormatter - Optional labelFormatter function from widget config
120
+ * @returns Updated xAxis configuration
110
121
  */
111
122
  export function applyXAxisFormatter(
112
123
  xAxis: unknown,
113
- formatter?: (value: number) => string,
124
+ formatter?: (value: string | number) => string | number,
114
125
  ) {
115
- let axisFormatter = createAxisLabelFormatter(formatter)
116
-
117
126
  const xAxisIsObject = xAxis && !Array.isArray(xAxis)
118
127
  const xAxisTyped = xAxis as { type?: string; axisLabel?: unknown }
119
128
 
120
- if (!xAxisIsObject || xAxisTyped.type !== 'value') {
121
- axisFormatter = undefined
122
- }
129
+ const axisFormatter =
130
+ formatter && xAxisIsObject
131
+ ? (value: string | number) => String(formatter(value))
132
+ : undefined
123
133
 
124
134
  return {
125
135
  ...xAxisTyped,
@@ -0,0 +1,2 @@
1
+ export const defaultFormatter = (value: number) => String(value)
2
+ export const defaultLabelFormatter = (value: string | number) => value
@@ -0,0 +1,26 @@
1
+ // Formatter
2
+ export { defaultFormatter, defaultLabelFormatter } from './formatter'
3
+
4
+ // Chart configuration
5
+ export { createChartWidgetConfig } from './chart-config'
6
+ export type {
7
+ ChartWidgetBaseConfig,
8
+ CreateChartWidgetConfigParams,
9
+ } from './chart-config'
10
+ export { flattenObjectArrayToCSV, scatterplotDataToCSV } from './chart-config'
11
+ export {
12
+ buildLegendConfig,
13
+ buildGridConfig,
14
+ createTooltipPositioner,
15
+ createAxisLabelFormatter,
16
+ createTooltipFormatter,
17
+ applyXAxisFormatter,
18
+ applyYAxisFormatter,
19
+ niceNum,
20
+ } from './chart-config'
21
+
22
+ // Skeleton styles
23
+ export { baseSkeletonStyles } from './skeleton'
24
+
25
+ // Download config factory
26
+ export { createChartDownloadConfig } from './chart-config'
@@ -4,6 +4,9 @@ import { styles } from '../styles'
4
4
 
5
5
  const EMPTY_ACTIONS: NonNullable<WrapperActionsProps['actions']> = []
6
6
 
7
+ /**
8
+ * Renders action buttons in the widget wrapper header. Each action click event is stopped from propagating to the accordion.
9
+ */
7
10
  export function Actions({ actions = EMPTY_ACTIONS }: WrapperActionsProps) {
8
11
  return (
9
12
  <Box sx={styles.actions} className='widget-wrapper-actions'>
@@ -12,6 +12,9 @@ import { styles } from '../styles'
12
12
 
13
13
  const EMPTY_OPTIONS: NonNullable<WrapperOptionsProps['options']> = []
14
14
 
15
+ /**
16
+ * Renders a dropdown options menu in the widget wrapper header, triggered by a vertical ellipsis icon button.
17
+ */
15
18
  export function Options({
16
19
  labels,
17
20
  options = EMPTY_OPTIONS,
@@ -4,6 +4,9 @@ import { SmartTooltip } from '../../../components'
4
4
  import type { ReactNode } from 'react'
5
5
  import type { WrapperOptionsProps } from '../types'
6
6
 
7
+ /**
8
+ * Renders the widget title text inside the wrapper header with smart tooltip support for truncated titles.
9
+ */
7
10
  export function Title({
8
11
  label,
9
12
  children,
@@ -15,6 +15,20 @@ import { useShallow } from 'zustand/shallow'
15
15
  const EMPTY_ACTIONS: NonNullable<WrapperUIProps['actions']> = []
16
16
  const EMPTY_OPTIONS: NonNullable<WrapperUIProps['options']> = []
17
17
 
18
+ /**
19
+ * 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.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <WrapperUI
24
+ * id="my-widget"
25
+ * actions={[<Download key="download" id="my-widget" />]}
26
+ * onChangeCollapsed={(e, collapsed) => console.log(collapsed)}
27
+ * >
28
+ * <div>Content</div>
29
+ * </WrapperUI>
30
+ * ```
31
+ */
18
32
  export function WrapperUI({
19
33
  children,
20
34
  id,
@@ -3,6 +3,20 @@ import { WrapperUI } from './wrapper-ui'
3
3
  import { useWidgetStore } from '../stores/widget-store'
4
4
  import { useLayoutEffect } from 'react'
5
5
 
6
+ /**
7
+ * 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.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <WidgetWrapper
12
+ * id="my-widget"
13
+ * title="Sales Overview"
14
+ * actions={[<Download key="download" id="my-widget" items={downloads} />]}
15
+ * >
16
+ * {children}
17
+ * </WidgetWrapper>
18
+ * ```
19
+ */
6
20
  export function WidgetWrapper({
7
21
  id,
8
22
  title,
@@ -1,123 +0,0 @@
1
- function m(t) {
2
- const e = [];
3
- if (t.length > 0 && (t[0]?.length ?? 0) > 0) {
4
- const n = t?.[0]?.[0] ?? {}, i = Object.keys(n);
5
- e.push(i);
6
- }
7
- return t.forEach((n) => {
8
- n.forEach((i) => {
9
- const o = Object.values(i).map((r) => String(r));
10
- e.push(o);
11
- });
12
- }), e;
13
- }
14
- function y(t) {
15
- const e = [];
16
- return e.push(["x", "y"]), t.forEach((n) => {
17
- n.forEach((i) => {
18
- e.push([String(i[0]), String(i[1])]);
19
- });
20
- }), e;
21
- }
22
- function b(t) {
23
- if (t === 0) return 0;
24
- const e = Math.abs(t), n = Math.pow(10, Math.floor(Math.log10(e))), i = Math.ceil(e / n) * n;
25
- return t < 0 ? -i : i;
26
- }
27
- function F(t) {
28
- return {
29
- show: t,
30
- icon: "circle",
31
- left: 0,
32
- bottom: 0,
33
- orient: "horizontal",
34
- type: "scroll"
35
- };
36
- }
37
- function d(t, e) {
38
- return {
39
- ...!t && {
40
- bottom: parseInt(e.spacing(3))
41
- },
42
- ...t && {
43
- bottom: parseInt(e.spacing(7))
44
- }
45
- };
46
- }
47
- function x(t) {
48
- return function(e, n, i, o, r) {
49
- const c = {
50
- top: parseInt(t.spacing(0.5))
51
- };
52
- return r.contentSize[0] < r.viewSize[0] - e[0] ? c.left = e[0] : c.right = r.viewSize[0] - e[0], c;
53
- };
54
- }
55
- function u(t) {
56
- if (t)
57
- return (e) => t(e);
58
- }
59
- function v(t, e) {
60
- let n = u(e);
61
- const i = t && !Array.isArray(t), o = t;
62
- return (!i || o.type !== "value") && (n = void 0), {
63
- ...o,
64
- axisLabel: {
65
- ...typeof o.axisLabel == "object" && o.axisLabel ? o.axisLabel : {},
66
- formatter: n
67
- }
68
- };
69
- }
70
- function w(t) {
71
- return (e) => {
72
- const n = Array.isArray(e) ? e : [e], i = (s, a) => `<div style="margin: 0px 0 0;line-height:1;">${s ? `<div style="font-size:11px;color:#FFFFFF;font-weight:400;line-height:1; margin-bottom: 10px">${s}</div>` : ""}<div style="margin: 0;line-height:1;">${a}</div><div style="clear:both"></div></div>`, o = n.map((s) => {
73
- const {
74
- name: a,
75
- seriesName: l,
76
- marker: g,
77
- value: h
78
- } = t(s, n);
79
- return {
80
- name: a,
81
- seriesName: l,
82
- marker: g,
83
- value: h
84
- };
85
- }), r = o[0]?.name ?? "", p = r || n.length > 1 ? "margin: 10px 0 0;line-height:1;" : "margin: 0;line-height:1;", f = o.map(({
86
- seriesName: s,
87
- marker: a,
88
- value: l
89
- }) => `<div style="${p}"><div style="margin: 0px 0 0;line-height:1;">${a}${s ? `<span style="font-size:11px;color:#FFFFFF;font-weight:400;margin-left:2px;margin-right:10px">${s}</span>` : ""}<span style="float:right;margin-left:10px;font-size:11px;color:#FFFFFF;font-weight:900">${l}</span></div></div>`);
90
- return i(r, f.join(""));
91
- };
92
- }
93
- const S = {
94
- graph: {
95
- /**
96
- * Common container style for chart widget skeletons
97
- */
98
- container: {
99
- display: "flex",
100
- alignItems: "center",
101
- justifyContent: "space-between",
102
- flexDirection: "column",
103
- gap: ({
104
- spacing: t
105
- }) => t(1),
106
- height: ({
107
- spacing: t
108
- }) => t(38)
109
- }
110
- }
111
- };
112
- export {
113
- x as a,
114
- d as b,
115
- w as c,
116
- F as d,
117
- S as e,
118
- m as f,
119
- v as g,
120
- b as n,
121
- y as s
122
- };
123
- //# sourceMappingURL=styles-CAroD5Rc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles-CAroD5Rc.js","sources":["../src/widgets/_shared/chart-config/csv-modifiers.ts","../src/widgets/_shared/chart-config/option-builders.ts","../src/widgets/_shared/skeleton/styles.ts"],"sourcesContent":["/**\n * Shared CSV export modifiers for chart widgets\n */\n\n/**\n * Flattens object array data into CSV-ready rows.\n * Used by bar, pie, histogram, and timeseries widgets.\n *\n * @param data - Array of series, where each series is an array of data objects\n * @returns CSV rows with headers and values\n */\nexport function flattenObjectArrayToCSV<T extends Record<string, unknown>>(\n data: T[][],\n): string[][] {\n const rows: string[][] = []\n\n // Add headers from first data point if available\n if (data.length > 0 && (data[0]?.length ?? 0) > 0) {\n const firstDataPoint = data?.[0]?.[0] ?? {}\n const headers = Object.keys(firstDataPoint)\n rows.push(headers)\n }\n\n // Add data rows from all series\n data.forEach((series) => {\n series.forEach((dataPoint) => {\n const values = Object.values(dataPoint).map((v) => String(v))\n rows.push(values)\n })\n })\n\n return rows\n}\n\n/**\n * Creates CSV rows for scatterplot data.\n * Scatterplot uses array format [x, y] instead of objects.\n *\n * @param data - Array of series, where each series is an array of [x, y] tuples\n * @returns CSV rows with ['x', 'y'] headers\n */\nexport function scatterplotDataToCSV(data: number[][][]): string[][] {\n const rows: string[][] = []\n\n // Add headers\n rows.push(['x', 'y'])\n\n // Add data rows from all series\n data.forEach((series) => {\n series.forEach((dataPoint) => {\n rows.push([String(dataPoint[0]), String(dataPoint[1])])\n })\n })\n\n return rows\n}\n","import type { Theme } from '@mui/material'\nimport type { LegendComponentOption } from 'echarts'\nimport type {\n CallbackDataParams,\n TopLevelFormatterParams,\n} from 'node_modules/echarts/types/dist/shared'\n\n/**\n * Shared EChart configuration builders for chart widgets\n */\n\n/**\n * Rounds a value up to the nearest \"nice\" number.\n * A nice number is a multiple of 10^floor(log10(value)).\n *\n * Examples: 547 → 600, 200 → 200, 1200 → 2000, 18 → 20, 5 → 5, -547 → -500\n */\nexport function niceNum(value: number): number {\n if (value === 0) return 0\n const absValue = Math.abs(value)\n const base = Math.pow(10, Math.floor(Math.log10(absValue)))\n const rounded = Math.ceil(absValue / base) * base\n return value < 0 ? -rounded : rounded\n}\n\n/**\n * Builds standard legend configuration for chart widgets\n *\n * @param hasLegend - Whether to show the legend\n * @returns Legend configuration object\n */\nexport function buildLegendConfig(hasLegend: boolean): LegendComponentOption {\n return {\n show: hasLegend,\n icon: 'circle' as const,\n left: 0,\n bottom: 0,\n orient: 'horizontal',\n type: 'scroll',\n }\n}\n\n/**\n * Builds standard grid configuration with legend-aware spacing\n *\n * @param hasLegend - Whether the chart has a legend\n * @param theme - MUI theme for spacing\n * @param additionalConfig - Additional grid configuration to merge\n * @returns Grid configuration object\n */\nexport function buildGridConfig(hasLegend: boolean, theme: Theme) {\n return {\n ...(!hasLegend && { bottom: parseInt(theme.spacing(3)) }),\n ...(hasLegend && { bottom: parseInt(theme.spacing(7)) }),\n }\n}\n\n/**\n * Creates a tooltip position calculator that handles overflow\n * Used by bar, histogram, and scatterplot widgets\n *\n * @param theme - MUI theme for spacing\n * @returns Tooltip position function\n */\nexport function createTooltipPositioner(theme: Theme) {\n return function (\n point: [number, number],\n _params: unknown,\n _dom: unknown,\n _rect: unknown,\n size: { contentSize: [number, number]; viewSize: [number, number] },\n ) {\n const position = { top: parseInt(theme.spacing(0.5)) } as Record<\n string,\n number\n >\n\n // Position tooltip left or right based on available space\n if (size.contentSize[0] < size.viewSize[0] - point[0]) {\n position.left = point[0]\n } else {\n position.right = size.viewSize[0] - point[0]\n }\n\n return position\n }\n}\n\n/**\n * Creates an axis label formatter for ECharts\n * Used to format numeric axis labels with a widget formatter\n *\n * @param formatter - Optional formatter function from widget config\n * @returns Axis label formatter function or undefined\n */\nexport function createAxisLabelFormatter(\n formatter?: (value: number) => string,\n) {\n if (!formatter) return undefined\n return (value: number) => formatter(value)\n}\n\n/**\n * Applies formatter to xAxis configuration\n * Only applies to single axis objects (not arrays) with type 'value'\n *\n * @param xAxis - Existing xAxis configuration\n * @param formatter - Optional formatter function from widget config\n * @returns Updated xAxis configuration or undefined if no changes needed\n */\nexport function applyXAxisFormatter(\n xAxis: unknown,\n formatter?: (value: number) => string,\n) {\n let axisFormatter = createAxisLabelFormatter(formatter)\n\n const xAxisIsObject = xAxis && !Array.isArray(xAxis)\n const xAxisTyped = xAxis as { type?: string; axisLabel?: unknown }\n\n if (!xAxisIsObject || xAxisTyped.type !== 'value') {\n axisFormatter = undefined\n }\n\n return {\n ...xAxisTyped,\n axisLabel: {\n ...(typeof xAxisTyped.axisLabel === 'object' && xAxisTyped.axisLabel\n ? xAxisTyped.axisLabel\n : {}),\n formatter: axisFormatter,\n },\n }\n}\n\n/**\n * Applies formatter to yAxis configuration\n * Only applies to single axis objects (not arrays) with type 'value'\n *\n * @param yAxis - Existing yAxis configuration\n * @param formatter - Optional formatter function from widget config\n * @returns Updated yAxis configuration or undefined if no changes needed\n */\nexport function applyYAxisFormatter(\n yAxis: unknown,\n formatter?: (value: number) => string,\n) {\n let axisFormatter = createAxisLabelFormatter(formatter)\n\n const yAxisIsObject = yAxis && !Array.isArray(yAxis)\n const yAxisTyped = yAxis as { type?: string; axisLabel?: unknown }\n\n if (!yAxisIsObject || yAxisTyped.type !== 'value') {\n axisFormatter = undefined\n }\n\n return {\n ...yAxisTyped,\n axisLabel: {\n ...(typeof yAxisTyped.axisLabel === 'object' && yAxisTyped.axisLabel\n ? yAxisTyped.axisLabel\n : {}),\n formatter: axisFormatter,\n },\n }\n}\n\n/**\n * Creates a tooltip formatter for ECharts\n * Formats numeric values in tooltip using widget formatter\n * Handles both axis trigger (array) and item trigger (object) modes\n *\n * @param formatter - Optional formatter function from widget config\n * @returns Tooltip formatter function or undefined\n */\nexport function createTooltipFormatter(\n callback: (\n item: CallbackDataParams,\n items: CallbackDataParams[],\n ) => {\n name: string\n seriesName: string\n marker: string\n value: string | number\n },\n) {\n return (params: TopLevelFormatterParams) => {\n // Handle both array (axis trigger) and object (item trigger)\n const items = Array.isArray(params) ? params : [params]\n\n const tooltip = (name: string, callback: string) =>\n `<div style=\"margin: 0px 0 0;line-height:1;\">${name ? `<div style=\"font-size:11px;color:#FFFFFF;font-weight:400;line-height:1; margin-bottom: 10px\">${name}</div>` : ''}<div style=\"margin: 0;line-height:1;\">${callback}</div><div style=\"clear:both\"></div></div>`\n\n const values = items.map((item) => {\n const { name, seriesName, marker, value } = callback(item, items)\n return {\n name,\n seriesName,\n marker,\n value,\n }\n })\n\n const name = values[0]?.name ?? ''\n // Show margin if name exists or there are multiple items\n const showMargin = name || items.length > 1\n const marginStyle = showMargin\n ? 'margin: 10px 0 0;line-height:1;'\n : 'margin: 0;line-height:1;'\n\n const formattedValues = values.map(\n ({ seriesName, marker, value }) =>\n `<div style=\"${marginStyle}\"><div style=\"margin: 0px 0 0;line-height:1;\">${marker}${seriesName ? `<span style=\"font-size:11px;color:#FFFFFF;font-weight:400;margin-left:2px;margin-right:10px\">${seriesName}</span>` : ''}<span style=\"float:right;margin-left:10px;font-size:11px;color:#FFFFFF;font-weight:900\">${value}</span></div></div>`,\n )\n\n return tooltip(name, formattedValues.join(''))\n }\n}\n","import type { Theme } from '@mui/material'\n\n/**\n * Base skeleton styles shared across all chart widgets\n */\nexport const baseSkeletonStyles = {\n graph: {\n /**\n * Common container style for chart widget skeletons\n */\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'column',\n gap: ({ spacing }: Theme) => spacing(1),\n height: ({ spacing }: Theme) => spacing(38),\n },\n },\n} as const\n"],"names":["flattenObjectArrayToCSV","data","rows","length","firstDataPoint","headers","Object","keys","push","forEach","series","dataPoint","values","map","v","String","scatterplotDataToCSV","niceNum","value","absValue","Math","abs","base","pow","floor","log10","rounded","ceil","buildLegendConfig","hasLegend","show","icon","left","bottom","orient","type","buildGridConfig","theme","parseInt","spacing","createTooltipPositioner","point","_params","_dom","_rect","size","position","top","contentSize","viewSize","right","createAxisLabelFormatter","formatter","applyYAxisFormatter","yAxis","axisFormatter","yAxisIsObject","Array","isArray","yAxisTyped","undefined","axisLabel","createTooltipFormatter","callback","params","items","tooltip","name","item","seriesName","marker","marginStyle","formattedValues","join","baseSkeletonStyles","graph","container","display","alignItems","justifyContent","flexDirection","gap","height"],"mappings":"AAWO,SAASA,EACdC,GACY;AACZ,QAAMC,IAAmB,CAAA;AAGzB,MAAID,EAAKE,SAAS,MAAMF,EAAK,CAAC,GAAGE,UAAU,KAAK,GAAG;AACjD,UAAMC,IAAiBH,IAAO,CAAC,IAAI,CAAC,KAAK,CAAA,GACnCI,IAAUC,OAAOC,KAAKH,CAAc;AAC1CF,IAAAA,EAAKM,KAAKH,CAAO;AAAA,EACnB;AAGAJ,SAAAA,EAA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