@carto/ps-react-ui 5.1.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1136) hide show
  1. package/dist/{actions-BjPfCLG9.js → actions-KsX1xdDM.js} +28 -28
  2. package/dist/actions-KsX1xdDM.js.map +1 -0
  3. package/dist/category-CsdDqDzo.js +833 -0
  4. package/dist/category-CsdDqDzo.js.map +1 -0
  5. package/dist/chat.js +548 -526
  6. package/dist/chat.js.map +1 -1
  7. package/dist/{components-FED-ArwH.js → components-CTUpdQuj.js} +1526 -1782
  8. package/dist/components-CTUpdQuj.js.map +1 -0
  9. package/dist/components.js +4 -5
  10. package/dist/{download-DdaK3qgC.js → download-Vlzn2jzb.js} +12 -12
  11. package/dist/download-Vlzn2jzb.js.map +1 -0
  12. package/dist/{echart-CRihbmRv.js → echart-DjcbtKgi.js} +7 -7
  13. package/dist/echart-DjcbtKgi.js.map +1 -0
  14. package/dist/formula-CdHWtepq.js +282 -0
  15. package/dist/formula-CdHWtepq.js.map +1 -0
  16. package/dist/legend.js +261 -256
  17. package/dist/legend.js.map +1 -1
  18. package/dist/{markdown-2dfL6Cmb.js → markdown-CY-67NRE.js} +8 -8
  19. package/dist/markdown-CY-67NRE.js.map +1 -0
  20. package/dist/{markdown-content-BWUqwx9F.js → markdown-content-kYNLOX0T.js} +2 -2
  21. package/dist/markdown-content-kYNLOX0T.js.map +1 -0
  22. package/dist/{chart-config-B_fdIcD3.js → option-builders-DQivvvbb.js} +10 -56
  23. package/dist/option-builders-DQivvvbb.js.map +1 -0
  24. package/dist/{range-BCMAl5xf.js → range-DHQSsl2_.js} +8 -8
  25. package/dist/range-DHQSsl2_.js.map +1 -0
  26. package/dist/smart-tooltip-Dc_rHhyI.js +51 -0
  27. package/dist/smart-tooltip-Dc_rHhyI.js.map +1 -0
  28. package/dist/{spread-Ccpg9fi0.js → spread-DuM5oTI1.js} +10 -10
  29. package/dist/spread-DuM5oTI1.js.map +1 -0
  30. package/dist/{stores-tiFePP0A.js → stores-B8CHbgw-.js} +11 -11
  31. package/dist/stores-B8CHbgw-.js.map +1 -0
  32. package/dist/stores-mad-9yFn.js.map +1 -1
  33. package/dist/styles-BCEBm7xh.js +146 -0
  34. package/dist/styles-BCEBm7xh.js.map +1 -0
  35. package/dist/{table-Bx9Uj3U0.js → table-BE4uO9pp.js} +14 -14
  36. package/dist/table-BE4uO9pp.js.map +1 -0
  37. package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +1 -1
  38. package/dist/types/chat/types.d.ts +5 -2
  39. package/dist/types/components/index.d.ts +1 -3
  40. package/dist/types/components/lasso-tool/geometry-toolbar.d.ts +1 -1
  41. package/dist/types/components/lasso-tool/toolbar/context.d.ts +1 -1
  42. package/dist/types/components/types.d.ts +15 -0
  43. package/dist/types/legend/components/legend-actions/legend-actions.d.ts +2 -2
  44. package/dist/types/legend/components/legend-swatch/legend-swatch.d.ts +2 -1
  45. package/dist/types/legend/index.d.ts +1 -1
  46. package/dist/types/legend/provider/legend-provider.d.ts +2 -2
  47. package/dist/types/migration/v4/classes.d.ts +16 -0
  48. package/dist/types/migration/v4/icons.d.ts +31 -0
  49. package/dist/types/migration/v4/index.d.ts +17 -0
  50. package/dist/types/migration/v4/rules.d.ts +42 -0
  51. package/dist/types/migration/v4/transform.d.ts +4 -0
  52. package/dist/types/migration/v4/transforms/helpers.d.ts +97 -0
  53. package/dist/types/migration/v4/transforms/meridian-5.d.ts +22 -0
  54. package/dist/types/migration/v4/transforms/ps-react-ui.d.ts +20 -0
  55. package/dist/types/migration/v4/transforms/v5-v6.d.ts +27 -0
  56. package/dist/types/migration/v4/transforms/v6-v7.d.ts +54 -0
  57. package/dist/types/migration/v4/transforms/v7-v9-dom.d.ts +63 -0
  58. package/dist/types/migration/v4/transforms/v7-v9-props.d.ts +64 -0
  59. package/dist/types/migration/v4/widgets-v1.d.ts +12 -0
  60. package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +51 -24
  61. package/dist/types/widgets/actions/brush-toggle/style.d.ts +7 -16
  62. package/dist/types/widgets/actions/change-column/change-column-icon.d.ts +2 -1
  63. package/dist/types/widgets/actions/change-column/change-column.d.ts +26 -17
  64. package/dist/types/widgets/actions/change-column/sortable-column-item.d.ts +10 -5
  65. package/dist/types/widgets/actions/change-column/types.d.ts +9 -18
  66. package/dist/types/widgets/actions/download/download.d.ts +18 -13
  67. package/dist/types/widgets/actions/download/exports.d.ts +33 -17
  68. package/dist/types/{widgets-v2 → widgets}/actions/download/png-item.d.ts +1 -1
  69. package/dist/types/widgets/actions/download/types.d.ts +30 -16
  70. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +73 -10
  71. package/dist/types/widgets/actions/fullscreen/types.d.ts +13 -20
  72. package/dist/types/widgets/actions/index.d.ts +10 -20
  73. package/dist/types/widgets/actions/lock-selection/lock-selection.d.ts +54 -16
  74. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +36 -21
  75. package/dist/types/{widgets-v2 → widgets}/actions/relative-data/transforms.d.ts +2 -2
  76. package/dist/types/widgets/actions/searcher/searcher-toggle.d.ts +21 -16
  77. package/dist/types/widgets/actions/searcher/searcher.d.ts +9 -19
  78. package/dist/types/widgets/actions/stack-toggle/stack-toggle.d.ts +10 -17
  79. package/dist/types/widgets/actions/zoom-toggle/style.d.ts +7 -8
  80. package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +31 -22
  81. package/dist/types/widgets/bar/index.d.ts +3 -2
  82. package/dist/types/widgets/bar/skeleton.d.ts +5 -0
  83. package/dist/types/widgets/bar/types.d.ts +46 -9
  84. package/dist/types/widgets/category/category-ui.d.ts +86 -3
  85. package/dist/types/{widgets-v2 → widgets}/category/components/category-bar-stacked.d.ts +2 -1
  86. package/dist/types/widgets/category/components/category-bar.d.ts +18 -4
  87. package/dist/types/widgets/category/components/category-legend.d.ts +30 -4
  88. package/dist/types/widgets/category/components/category-row-multi.d.ts +27 -10
  89. package/dist/types/widgets/category/components/category-row-other.d.ts +19 -2
  90. package/dist/types/widgets/category/components/category-row-single.d.ts +23 -9
  91. package/dist/types/{widgets-v2 → widgets}/category/components/category-row-stacked.d.ts +2 -1
  92. package/dist/types/widgets/category/index.d.ts +10 -14
  93. package/dist/types/widgets/category/skeleton.d.ts +11 -1
  94. package/dist/types/widgets/category/style.d.ts +155 -83
  95. package/dist/types/widgets/category/types.d.ts +49 -29
  96. package/dist/types/widgets/echart/echart-ui.d.ts +44 -9
  97. package/dist/types/widgets/echart/echart.d.ts +80 -5
  98. package/dist/types/widgets/echart/index.d.ts +4 -5
  99. package/dist/types/widgets/echart/shared-resize-observer.d.ts +2 -9
  100. package/dist/types/widgets/formula/formula-ui.d.ts +18 -3
  101. package/dist/types/widgets/formula/index.d.ts +11 -11
  102. package/dist/types/{widgets-v2 → widgets}/formula/series.d.ts +2 -1
  103. package/dist/types/widgets/formula/skeleton.d.ts +4 -1
  104. package/dist/types/widgets/formula/style.d.ts +20 -12
  105. package/dist/types/widgets/formula/types.d.ts +41 -39
  106. package/dist/types/{widgets-v2 → widgets}/formula/value.d.ts +2 -1
  107. package/dist/types/widgets/histogram/index.d.ts +5 -4
  108. package/dist/types/widgets/histogram/skeleton.d.ts +9 -1
  109. package/dist/types/widgets/histogram/types.d.ts +60 -12
  110. package/dist/types/{widgets-v2 → widgets}/index.d.ts +2 -2
  111. package/dist/types/widgets/markdown/index.d.ts +5 -4
  112. package/dist/types/widgets/markdown/markdown-ui.d.ts +10 -7
  113. package/dist/types/widgets/markdown/markdown.d.ts +4 -3
  114. package/dist/types/widgets/markdown/skeleton.d.ts +4 -1
  115. package/dist/types/widgets/markdown/style.d.ts +61 -2
  116. package/dist/types/widgets/markdown/types.d.ts +2 -16
  117. package/dist/types/widgets/note/style.d.ts +14 -16
  118. package/dist/types/widgets/pie/index.d.ts +4 -3
  119. package/dist/types/widgets/pie/skeleton.d.ts +13 -1
  120. package/dist/types/widgets/pie/types.d.ts +57 -9
  121. package/dist/types/widgets/range/index.d.ts +4 -6
  122. package/dist/types/widgets/range/range-ui.d.ts +25 -3
  123. package/dist/types/widgets/range/skeleton.d.ts +9 -1
  124. package/dist/types/widgets/range/style.d.ts +40 -2
  125. package/dist/types/widgets/range/types.d.ts +26 -22
  126. package/dist/types/widgets/scatterplot/index.d.ts +5 -3
  127. package/dist/types/widgets/scatterplot/skeleton.d.ts +12 -1
  128. package/dist/types/widgets/scatterplot/types.d.ts +54 -9
  129. package/dist/types/widgets/selection-summary/selection-summary.d.ts +26 -10
  130. package/dist/types/widgets/selection-summary/style.d.ts +32 -3
  131. package/dist/types/widgets/spread/index.d.ts +7 -9
  132. package/dist/types/widgets/spread/skeleton.d.ts +9 -1
  133. package/dist/types/widgets/spread/spread-ui.d.ts +16 -3
  134. package/dist/types/widgets/spread/types.d.ts +20 -35
  135. package/dist/types/widgets/stores/index.d.ts +8 -3
  136. package/dist/types/widgets/stores/types.d.ts +45 -172
  137. package/dist/types/widgets/subheader/style.d.ts +5 -14
  138. package/dist/types/widgets/subheader/subheader.d.ts +9 -11
  139. package/dist/types/widgets/table/helpers.d.ts +28 -34
  140. package/dist/types/widgets/table/index.d.ts +8 -17
  141. package/dist/types/widgets/table/skeleton.d.ts +17 -5
  142. package/dist/types/widgets/table/style.d.ts +21 -14
  143. package/dist/types/widgets/table/table-ui.d.ts +41 -29
  144. package/dist/types/widgets/table/types.d.ts +34 -182
  145. package/dist/types/widgets/timeseries/index.d.ts +4 -2
  146. package/dist/types/widgets/timeseries/skeleton.d.ts +7 -0
  147. package/dist/types/widgets/timeseries/types.d.ts +60 -9
  148. package/dist/types/{widgets-v2 → widgets}/types.d.ts +7 -6
  149. package/dist/types/widgets/utils/index.d.ts +3 -7
  150. package/dist/types/widgets/wrapper/index.d.ts +4 -6
  151. package/dist/{utils-Dr6gf3vD.js → utils-BStJWhZN.js} +5 -5
  152. package/dist/utils-BStJWhZN.js.map +1 -0
  153. package/dist/widgets/actions.js +4 -2
  154. package/dist/widgets/bar.js +202 -132
  155. package/dist/widgets/bar.js.map +1 -1
  156. package/dist/widgets/category.js +2 -450
  157. package/dist/widgets/echart.js +2 -3
  158. package/dist/widgets/formula.js +2 -3
  159. package/dist/widgets/histogram.js +263 -160
  160. package/dist/widgets/histogram.js.map +1 -1
  161. package/dist/widgets/markdown.js +3 -148
  162. package/dist/widgets/pie.js +317 -197
  163. package/dist/widgets/pie.js.map +1 -1
  164. package/dist/widgets/range.js +2 -233
  165. package/dist/widgets/scatterplot.js +300 -196
  166. package/dist/widgets/scatterplot.js.map +1 -1
  167. package/dist/widgets/spread.js +2 -158
  168. package/dist/widgets/stores.js +2 -3
  169. package/dist/widgets/table.js +2 -599
  170. package/dist/widgets/timeseries.js +250 -136
  171. package/dist/widgets/timeseries.js.map +1 -1
  172. package/dist/widgets/utils.js +2 -18
  173. package/dist/{widgets-v2.js → widgets.js} +63 -57
  174. package/dist/widgets.js.map +1 -0
  175. package/dist/{zoom-toggle-IsF8BnAp.js → zoom-toggle-D_VuA01l.js} +5 -5
  176. package/dist/zoom-toggle-D_VuA01l.js.map +1 -0
  177. package/package.json +45 -131
  178. package/src/chat/bubbles/chat-agent-message-markdown.tsx +1 -1
  179. package/src/chat/bubbles/chat-error-message.tsx +9 -3
  180. package/src/chat/bubbles/chat-suggestion-button.tsx +8 -3
  181. package/src/chat/containers/chat-footer.tsx +6 -2
  182. package/src/chat/containers/chat-starter.tsx +6 -4
  183. package/src/chat/feedback/chat-tool-full-view-dialog.tsx +3 -1
  184. package/src/chat/feedback/chat-tool-group.test.tsx +1 -1
  185. package/src/chat/feedback/chat-tool-group.tsx +40 -9
  186. package/src/chat/feedback/chat-tool-trace.tsx +55 -19
  187. package/src/chat/types.ts +5 -2
  188. package/src/components/basemaps/header.tsx +6 -1
  189. package/src/components/index.ts +2 -3
  190. package/src/components/lasso-tool/geometry-toolbar.tsx +1 -1
  191. package/src/components/lasso-tool/lasso-tool-inline.tsx +12 -4
  192. package/src/components/lasso-tool/lasso-tool.tsx +26 -15
  193. package/src/components/lasso-tool/layer-filters.tsx +36 -11
  194. package/src/components/lasso-tool/options-sections.test.tsx +13 -2
  195. package/src/components/lasso-tool/options-sections.tsx +17 -7
  196. package/src/components/lasso-tool/toolbar/connected.tsx +1 -1
  197. package/src/components/lasso-tool/toolbar/context.tsx +1 -1
  198. package/src/components/measurement-tools/measurement-tools.tsx +28 -13
  199. package/src/components/no-data-alert/no-data-alert.tsx +12 -2
  200. package/src/components/responsive-drawer/responsive-drawer.tsx +0 -1
  201. package/src/components/types.ts +17 -0
  202. package/src/components/zoom-controls/zoom-controls.tsx +3 -1
  203. package/src/legend/components/legend-actions/legend-actions.tsx +2 -2
  204. package/src/legend/components/legend-category/legend-category-ui.tsx +7 -3
  205. package/src/legend/components/legend-config-select/legend-config-select.tsx +6 -2
  206. package/src/legend/components/legend-group/legend-group.tsx +6 -2
  207. package/src/legend/components/legend-group/styles.ts +1 -1
  208. package/src/legend/components/legend-icon/legend-icon-ui.tsx +7 -3
  209. package/src/legend/components/legend-opacity/legend-opacity.tsx +9 -3
  210. package/src/legend/components/legend-proportion/legend-proportion-ui.tsx +19 -3
  211. package/src/legend/components/legend-ramp/legend-ramp-ui.tsx +31 -7
  212. package/src/legend/components/legend-row/legend-row.tsx +2 -2
  213. package/src/legend/components/legend-row/styles.ts +1 -1
  214. package/src/legend/components/legend-sortable/legend-sortable.tsx +7 -3
  215. package/src/legend/components/legend-swatch/legend-swatch.tsx +2 -1
  216. package/src/legend/components/legend-visible-layers/legend-visible-layers.tsx +18 -9
  217. package/src/legend/index.ts +1 -1
  218. package/src/legend/provider/legend-provider.tsx +2 -2
  219. package/src/legend/stores/legend-store-registry.ts +1 -1
  220. package/src/migration/v4/classes.ts +56 -0
  221. package/src/migration/v4/icons.ts +56 -0
  222. package/src/migration/v4/index.ts +17 -0
  223. package/src/migration/v4/migration.test.ts +772 -0
  224. package/src/migration/v4/rules.ts +444 -0
  225. package/src/migration/v4/transform.ts +92 -0
  226. package/src/migration/v4/transforms/helpers.ts +369 -0
  227. package/src/migration/v4/transforms/meridian-5.ts +163 -0
  228. package/src/migration/v4/transforms/ps-react-ui.ts +99 -0
  229. package/src/migration/v4/transforms/v5-v6.ts +161 -0
  230. package/src/migration/v4/transforms/v6-v7.ts +342 -0
  231. package/src/migration/v4/transforms/v7-v9-dom.ts +403 -0
  232. package/src/migration/v4/transforms/v7-v9-props.ts +529 -0
  233. package/src/migration/v4/widgets-v1.ts +199 -0
  234. package/src/{widgets-v2 → widgets}/PERFORMANCE.md +5 -5
  235. package/src/widgets/actions/brush-toggle/brush-toggle.test.tsx +144 -172
  236. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +129 -108
  237. package/src/widgets/actions/brush-toggle/style.ts +5 -40
  238. package/src/widgets/actions/change-column/change-column-icon.tsx +14 -10
  239. package/src/widgets/actions/change-column/change-column.test.tsx +57 -288
  240. package/src/widgets/actions/change-column/change-column.tsx +116 -145
  241. package/src/widgets/actions/change-column/sortable-column-item.tsx +29 -17
  242. package/src/widgets/actions/change-column/types.ts +9 -18
  243. package/src/widgets/actions/download/download.test.tsx +290 -289
  244. package/src/widgets/actions/download/download.tsx +101 -89
  245. package/src/widgets/actions/download/exports.test.tsx +157 -247
  246. package/src/{widgets-v2 → widgets}/actions/download/exports.ts +1 -1
  247. package/src/{widgets-v2 → widgets}/actions/download/png-item.tsx +2 -2
  248. package/src/widgets/actions/download/types.ts +26 -15
  249. package/src/widgets/actions/fullscreen/fullscreen.test.tsx +164 -221
  250. package/src/widgets/actions/fullscreen/fullscreen.tsx +277 -72
  251. package/src/widgets/actions/fullscreen/types.ts +14 -31
  252. package/src/widgets/actions/index.ts +90 -68
  253. package/src/widgets/actions/lock-selection/lock-selection.test.tsx +259 -156
  254. package/src/widgets/actions/lock-selection/lock-selection.tsx +162 -102
  255. package/src/widgets/actions/relative-data/relative-data.test.tsx +65 -536
  256. package/src/widgets/actions/relative-data/relative-data.tsx +82 -163
  257. package/src/{widgets-v2 → widgets}/actions/relative-data/transforms.ts +2 -2
  258. package/src/widgets/actions/searcher/searcher-toggle.tsx +75 -56
  259. package/src/widgets/actions/searcher/searcher.tsx +85 -168
  260. package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +49 -402
  261. package/src/widgets/actions/stack-toggle/stack-toggle.tsx +39 -114
  262. package/src/widgets/actions/zoom-toggle/style.ts +5 -8
  263. package/src/widgets/actions/zoom-toggle/zoom-toggle.test.tsx +88 -303
  264. package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +87 -199
  265. package/src/widgets/bar/index.ts +6 -5
  266. package/src/{widgets-v2 → widgets}/bar/options.ts +1 -1
  267. package/src/widgets/bar/skeleton.tsx +61 -52
  268. package/src/widgets/bar/types.ts +46 -11
  269. package/src/widgets/category/category-ui.test.tsx +846 -317
  270. package/src/widgets/category/category-ui.tsx +444 -127
  271. package/src/{widgets-v2 → widgets}/category/components/category-bar-stacked.tsx +2 -1
  272. package/src/widgets/category/components/category-bar.tsx +31 -12
  273. package/src/{widgets-v2 → widgets}/category/components/category-legend.test.tsx +7 -3
  274. package/src/widgets/category/components/category-legend.tsx +68 -18
  275. package/src/widgets/category/components/category-row-multi.tsx +66 -36
  276. package/src/widgets/category/components/category-row-other.tsx +63 -5
  277. package/src/widgets/category/components/category-row-single.tsx +48 -25
  278. package/src/{widgets-v2 → widgets}/category/components/category-row-stacked.tsx +2 -1
  279. package/src/widgets/category/index.ts +25 -22
  280. package/src/widgets/category/skeleton.tsx +60 -10
  281. package/src/widgets/category/style.ts +267 -72
  282. package/src/widgets/category/types.ts +52 -32
  283. package/src/widgets/echart/echart-ui.test.tsx +250 -446
  284. package/src/widgets/echart/echart-ui.tsx +210 -52
  285. package/src/widgets/echart/echart.test.tsx +203 -518
  286. package/src/widgets/echart/echart.tsx +195 -52
  287. package/src/widgets/echart/index.ts +21 -15
  288. package/src/widgets/echart/shared-resize-observer.ts +30 -19
  289. package/src/widgets/formula/formula-ui.test.tsx +68 -376
  290. package/src/widgets/formula/formula-ui.tsx +58 -22
  291. package/src/widgets/formula/index.ts +14 -21
  292. package/src/{widgets-v2 → widgets}/formula/note.tsx +8 -2
  293. package/src/{widgets-v2 → widgets}/formula/series.tsx +8 -25
  294. package/src/widgets/formula/skeleton.tsx +21 -4
  295. package/src/widgets/formula/style.ts +20 -12
  296. package/src/widgets/formula/types.ts +44 -45
  297. package/src/{widgets-v2 → widgets}/formula/value.tsx +2 -1
  298. package/src/widgets/histogram/index.ts +10 -10
  299. package/src/{widgets-v2 → widgets}/histogram/options.ts +1 -1
  300. package/src/widgets/histogram/skeleton.tsx +63 -45
  301. package/src/widgets/histogram/types.ts +59 -18
  302. package/src/{widgets-v2 → widgets}/index.ts +3 -3
  303. package/src/widgets/markdown/index.ts +5 -13
  304. package/src/widgets/markdown/markdown-ui.test.tsx +53 -319
  305. package/src/widgets/markdown/markdown-ui.tsx +43 -47
  306. package/src/widgets/markdown/markdown.tsx +12 -15
  307. package/src/widgets/markdown/skeleton.tsx +26 -6
  308. package/src/widgets/markdown/style.ts +48 -23
  309. package/src/widgets/markdown/types.ts +2 -26
  310. package/src/widgets/note/style.ts +14 -17
  311. package/src/{widgets-v2 → widgets}/note/widget-note.tsx +15 -2
  312. package/src/widgets/pie/index.ts +7 -5
  313. package/src/{widgets-v2 → widgets}/pie/options.ts +1 -1
  314. package/src/widgets/pie/skeleton.tsx +84 -60
  315. package/src/widgets/pie/types.ts +57 -11
  316. package/src/widgets/range/index.ts +4 -16
  317. package/src/widgets/range/range-ui.test.tsx +115 -182
  318. package/src/widgets/range/range-ui.tsx +274 -8
  319. package/src/widgets/range/skeleton.tsx +41 -8
  320. package/src/widgets/range/style.ts +16 -12
  321. package/src/widgets/range/types.ts +26 -28
  322. package/src/widgets/scatterplot/index.ts +11 -5
  323. package/src/{widgets-v2 → widgets}/scatterplot/options.ts +1 -1
  324. package/src/widgets/scatterplot/skeleton.tsx +76 -51
  325. package/src/widgets/scatterplot/types.ts +54 -12
  326. package/src/widgets/selection-summary/selection-summary.tsx +64 -39
  327. package/src/widgets/selection-summary/style.ts +30 -2
  328. package/src/widgets/spread/index.ts +11 -23
  329. package/src/widgets/spread/skeleton.tsx +32 -4
  330. package/src/widgets/spread/spread-ui.test.tsx +98 -358
  331. package/src/widgets/spread/spread-ui.tsx +44 -24
  332. package/src/widgets/spread/types.ts +21 -41
  333. package/src/{widgets-v2 → widgets}/state/widget-state.tsx +13 -3
  334. package/src/widgets/stores/index.ts +46 -10
  335. package/src/{widgets-v2 → widgets}/stores/transforms.ts +1 -1
  336. package/src/widgets/stores/types.ts +42 -181
  337. package/src/{widgets-v2 → widgets}/stores/use-transform.ts +1 -1
  338. package/src/{widgets-v2 → widgets}/stores/widget-store-registry.ts +2 -2
  339. package/src/widgets/subheader/style.ts +5 -13
  340. package/src/widgets/subheader/subheader.test.tsx +22 -37
  341. package/src/widgets/subheader/subheader.tsx +11 -30
  342. package/src/widgets/table/helpers.test.ts +197 -208
  343. package/src/widgets/table/helpers.ts +108 -84
  344. package/src/widgets/table/index.ts +23 -54
  345. package/src/widgets/table/skeleton.tsx +38 -21
  346. package/src/widgets/table/style.ts +23 -14
  347. package/src/widgets/table/table-ui.tsx +348 -44
  348. package/src/widgets/table/types.ts +37 -205
  349. package/src/{widgets-v2 → widgets}/test-utils.ts +1 -1
  350. package/src/widgets/timeseries/index.ts +8 -5
  351. package/src/{widgets-v2 → widgets}/timeseries/options.ts +1 -1
  352. package/src/widgets/timeseries/skeleton.tsx +67 -46
  353. package/src/widgets/timeseries/types.ts +60 -12
  354. package/src/{widgets-v2 → widgets}/types.ts +8 -6
  355. package/src/widgets/utils/index.ts +3 -26
  356. package/src/widgets/wrapper/index.ts +14 -16
  357. package/src/{widgets-v2 → widgets}/wrapper/widget-wrapper.tsx +6 -2
  358. package/dist/actions-BjPfCLG9.js.map +0 -1
  359. package/dist/actions-CGJD6q0t.js +0 -1318
  360. package/dist/actions-CGJD6q0t.js.map +0 -1
  361. package/dist/category-DGUDabsi.js +0 -829
  362. package/dist/category-DGUDabsi.js.map +0 -1
  363. package/dist/chart-config-B_fdIcD3.js.map +0 -1
  364. package/dist/cjs-CBrZjPCj.js +0 -75
  365. package/dist/cjs-CBrZjPCj.js.map +0 -1
  366. package/dist/components-FED-ArwH.js.map +0 -1
  367. package/dist/copy-button-TTlZONkX.js +0 -34
  368. package/dist/copy-button-TTlZONkX.js.map +0 -1
  369. package/dist/csv-modifiers-D6HGC24b.js +0 -26
  370. package/dist/csv-modifiers-D6HGC24b.js.map +0 -1
  371. package/dist/download-DdaK3qgC.js.map +0 -1
  372. package/dist/echart-BkaV3V5G.js +0 -133
  373. package/dist/echart-BkaV3V5G.js.map +0 -1
  374. package/dist/echart-CRihbmRv.js.map +0 -1
  375. package/dist/formatter-wVO81tYk.js +0 -6
  376. package/dist/formatter-wVO81tYk.js.map +0 -1
  377. package/dist/formula-YfZmmuYX.js +0 -190
  378. package/dist/formula-YfZmmuYX.js.map +0 -1
  379. package/dist/formula-noJzQwKo.js +0 -285
  380. package/dist/formula-noJzQwKo.js.map +0 -1
  381. package/dist/hooks-zf5gKZYq.js +0 -22
  382. package/dist/hooks-zf5gKZYq.js.map +0 -1
  383. package/dist/markdown-2dfL6Cmb.js.map +0 -1
  384. package/dist/markdown-content-BWUqwx9F.js.map +0 -1
  385. package/dist/range-BCMAl5xf.js.map +0 -1
  386. package/dist/row-CvVGBuy_.js +0 -35
  387. package/dist/row-CvVGBuy_.js.map +0 -1
  388. package/dist/shared-resize-observer-BEiP2rQt.js +0 -157
  389. package/dist/shared-resize-observer-BEiP2rQt.js.map +0 -1
  390. package/dist/smart-tooltip-CwGHCqab.js +0 -34
  391. package/dist/smart-tooltip-CwGHCqab.js.map +0 -1
  392. package/dist/spread-Ccpg9fi0.js.map +0 -1
  393. package/dist/stores-tiFePP0A.js.map +0 -1
  394. package/dist/styles-Y-qGBELO.js +0 -13
  395. package/dist/styles-Y-qGBELO.js.map +0 -1
  396. package/dist/table-Bx9Uj3U0.js.map +0 -1
  397. package/dist/tooltip-DJUGNZxY.js +0 -23
  398. package/dist/tooltip-DJUGNZxY.js.map +0 -1
  399. package/dist/types/components/list-data/list-data-skeleton.d.ts +0 -5
  400. package/dist/types/components/list-data/list-data.d.ts +0 -19
  401. package/dist/types/components/list-data/styles.d.ts +0 -34
  402. package/dist/types/components/list-data/types.d.ts +0 -23
  403. package/dist/types/hooks/index.d.ts +0 -1
  404. package/dist/types/hooks/use-skeleton.d.ts +0 -1
  405. package/dist/types/hooks/use-widget-ref.d.ts +0 -21
  406. package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +0 -24
  407. package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +0 -19
  408. package/dist/types/widgets/actions/brush-toggle/types.d.ts +0 -73
  409. package/dist/types/widgets/actions/fullscreen/styles.d.ts +0 -16
  410. package/dist/types/widgets/actions/lock-selection/types.d.ts +0 -38
  411. package/dist/types/widgets/actions/relative-data/types.d.ts +0 -29
  412. package/dist/types/widgets/actions/relative-data/utils.d.ts +0 -9
  413. package/dist/types/widgets/actions/searcher/types.d.ts +0 -64
  414. package/dist/types/widgets/actions/shared/styles.d.ts +0 -11
  415. package/dist/types/widgets/actions/stack-toggle/grouped-bar-chart-icon.d.ts +0 -1
  416. package/dist/types/widgets/actions/stack-toggle/types.d.ts +0 -25
  417. package/dist/types/widgets/actions/zoom-toggle/types.d.ts +0 -41
  418. package/dist/types/widgets/bar/config.d.ts +0 -9
  419. package/dist/types/widgets/bar/style.d.ts +0 -37
  420. package/dist/types/widgets/category/config.d.ts +0 -20
  421. package/dist/types/widgets/echart/const.d.ts +0 -1
  422. package/dist/types/widgets/echart/options.d.ts +0 -9
  423. package/dist/types/widgets/echart/types.d.ts +0 -38
  424. package/dist/types/widgets/echart/utils.d.ts +0 -128
  425. package/dist/types/widgets/error/error.d.ts +0 -12
  426. package/dist/types/widgets/error/index.d.ts +0 -2
  427. package/dist/types/widgets/error/types.d.ts +0 -20
  428. package/dist/types/widgets/formula/components/item.d.ts +0 -5
  429. package/dist/types/widgets/formula/components/prefix.d.ts +0 -5
  430. package/dist/types/widgets/formula/components/row.d.ts +0 -5
  431. package/dist/types/widgets/formula/components/series.d.ts +0 -5
  432. package/dist/types/widgets/formula/components/suffix.d.ts +0 -5
  433. package/dist/types/widgets/formula/components/value.d.ts +0 -5
  434. package/dist/types/widgets/formula/config.d.ts +0 -15
  435. package/dist/types/widgets/formula/serializer.d.ts +0 -16
  436. package/dist/types/widgets/histogram/config.d.ts +0 -21
  437. package/dist/types/widgets/histogram/style.d.ts +0 -15
  438. package/dist/types/widgets/loader/index.d.ts +0 -3
  439. package/dist/types/widgets/loader/loader.d.ts +0 -24
  440. package/dist/types/widgets/loader/types.d.ts +0 -9
  441. package/dist/types/widgets/loader/utils.d.ts +0 -35
  442. package/dist/types/widgets/markdown/config.d.ts +0 -14
  443. package/dist/types/widgets/no-data/index.d.ts +0 -2
  444. package/dist/types/widgets/no-data/no-data.d.ts +0 -36
  445. package/dist/types/widgets/no-data/style.d.ts +0 -6
  446. package/dist/types/widgets/no-data/types.d.ts +0 -71
  447. package/dist/types/widgets/note/index.d.ts +0 -2
  448. package/dist/types/widgets/note/note.d.ts +0 -12
  449. package/dist/types/widgets/note/types.d.ts +0 -8
  450. package/dist/types/widgets/pie/config.d.ts +0 -9
  451. package/dist/types/widgets/pie/style.d.ts +0 -15
  452. package/dist/types/widgets/range/components/range-item.d.ts +0 -5
  453. package/dist/types/widgets/range/config.d.ts +0 -7
  454. package/dist/types/widgets/range/serializer.d.ts +0 -16
  455. package/dist/types/widgets/scatterplot/config.d.ts +0 -9
  456. package/dist/types/widgets/scatterplot/style.d.ts +0 -24
  457. package/dist/types/widgets/selection-summary/index.d.ts +0 -2
  458. package/dist/types/widgets/selection-summary/types.d.ts +0 -13
  459. package/dist/types/widgets/skeleton-loader/index.d.ts +0 -2
  460. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +0 -12
  461. package/dist/types/widgets/skeleton-loader/types.d.ts +0 -7
  462. package/dist/types/widgets/spread/components/max-value.d.ts +0 -5
  463. package/dist/types/widgets/spread/components/min-value.d.ts +0 -5
  464. package/dist/types/widgets/spread/components/separator.d.ts +0 -5
  465. package/dist/types/widgets/spread/config.d.ts +0 -16
  466. package/dist/types/widgets/spread/style.d.ts +0 -21
  467. package/dist/types/widgets/stores/use-widget-selector.d.ts +0 -35
  468. package/dist/types/widgets/stores/widget-store.d.ts +0 -60
  469. package/dist/types/widgets/subheader/index.d.ts +0 -2
  470. package/dist/types/widgets/subheader/types.d.ts +0 -10
  471. package/dist/types/widgets/table/components/cell-header.d.ts +0 -5
  472. package/dist/types/widgets/table/components/cell.d.ts +0 -18
  473. package/dist/types/widgets/table/components/pagination-actions.d.ts +0 -5
  474. package/dist/types/widgets/table/components/pagination.d.ts +0 -5
  475. package/dist/types/widgets/table/components/row.d.ts +0 -5
  476. package/dist/types/widgets/table/config.d.ts +0 -21
  477. package/dist/types/widgets/table/hooks/use-pagination.d.ts +0 -41
  478. package/dist/types/widgets/table/hooks/use-selection.d.ts +0 -39
  479. package/dist/types/widgets/table/hooks/use-sort.d.ts +0 -30
  480. package/dist/types/widgets/table/serializer.d.ts +0 -16
  481. package/dist/types/widgets/timeseries/config.d.ts +0 -9
  482. package/dist/types/widgets/timeseries/style.d.ts +0 -38
  483. package/dist/types/widgets/toolbar-actions/index.d.ts +0 -2
  484. package/dist/types/widgets/toolbar-actions/styles.d.ts +0 -37
  485. package/dist/types/widgets/toolbar-actions/toolbar-actions.d.ts +0 -17
  486. package/dist/types/widgets/toolbar-actions/types.d.ts +0 -52
  487. package/dist/types/widgets/utils/chart-config/config-factory.d.ts +0 -38
  488. package/dist/types/widgets/utils/chart-config/csv-modifiers.d.ts +0 -19
  489. package/dist/types/widgets/utils/chart-config/download-config.d.ts +0 -3
  490. package/dist/types/widgets/utils/chart-config/index.d.ts +0 -9
  491. package/dist/types/widgets/utils/formatter.d.ts +0 -2
  492. package/dist/types/widgets/utils/skeleton/index.d.ts +0 -4
  493. package/dist/types/widgets/utils/skeleton/styles.d.ts +0 -19
  494. package/dist/types/widgets/wrapper/components/actions.d.ts +0 -5
  495. package/dist/types/widgets/wrapper/components/options.d.ts +0 -5
  496. package/dist/types/widgets/wrapper/components/title.d.ts +0 -9
  497. package/dist/types/widgets/wrapper/styles.d.ts +0 -89
  498. package/dist/types/widgets/wrapper/types.d.ts +0 -37
  499. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +0 -16
  500. package/dist/types/widgets/wrapper/wrapper.d.ts +0 -16
  501. package/dist/types/widgets-v2/actions/brush-toggle/brush-toggle.d.ts +0 -56
  502. package/dist/types/widgets-v2/actions/change-column/change-column-icon.d.ts +0 -2
  503. package/dist/types/widgets-v2/actions/change-column/change-column.d.ts +0 -29
  504. package/dist/types/widgets-v2/actions/change-column/sortable-column-item.d.ts +0 -14
  505. package/dist/types/widgets-v2/actions/change-column/types.d.ts +0 -10
  506. package/dist/types/widgets-v2/actions/download/download.d.ts +0 -18
  507. package/dist/types/widgets-v2/actions/download/exports.d.ts +0 -37
  508. package/dist/types/widgets-v2/actions/download/types.d.ts +0 -35
  509. package/dist/types/widgets-v2/actions/fullscreen/fullscreen.d.ts +0 -78
  510. package/dist/types/widgets-v2/actions/fullscreen/types.d.ts +0 -14
  511. package/dist/types/widgets-v2/actions/index.d.ts +0 -10
  512. package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +0 -57
  513. package/dist/types/widgets-v2/actions/relative-data/relative-data.d.ts +0 -39
  514. package/dist/types/widgets-v2/actions/searcher/searcher-toggle.d.ts +0 -23
  515. package/dist/types/widgets-v2/actions/searcher/searcher.d.ts +0 -11
  516. package/dist/types/widgets-v2/actions/stack-toggle/stack-toggle.d.ts +0 -10
  517. package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +0 -12
  518. package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +0 -12
  519. package/dist/types/widgets-v2/actions/zoom-toggle/zoom-toggle.d.ts +0 -35
  520. package/dist/types/widgets-v2/bar/index.d.ts +0 -4
  521. package/dist/types/widgets-v2/bar/skeleton.d.ts +0 -6
  522. package/dist/types/widgets-v2/bar/types.d.ts +0 -46
  523. package/dist/types/widgets-v2/category/category-ui.d.ts +0 -88
  524. package/dist/types/widgets-v2/category/components/category-bar.d.ts +0 -23
  525. package/dist/types/widgets-v2/category/components/category-legend.d.ts +0 -34
  526. package/dist/types/widgets-v2/category/components/category-row-multi.d.ts +0 -31
  527. package/dist/types/widgets-v2/category/components/category-row-other.d.ts +0 -26
  528. package/dist/types/widgets-v2/category/components/category-row-single.d.ts +0 -28
  529. package/dist/types/widgets-v2/category/index.d.ts +0 -10
  530. package/dist/types/widgets-v2/category/skeleton.d.ts +0 -11
  531. package/dist/types/widgets-v2/category/style.d.ts +0 -193
  532. package/dist/types/widgets-v2/category/types.d.ts +0 -55
  533. package/dist/types/widgets-v2/echart/echart-ui.d.ts +0 -44
  534. package/dist/types/widgets-v2/echart/echart.d.ts +0 -83
  535. package/dist/types/widgets-v2/echart/index.d.ts +0 -4
  536. package/dist/types/widgets-v2/echart/shared-resize-observer.d.ts +0 -5
  537. package/dist/types/widgets-v2/formula/formula-ui.d.ts +0 -20
  538. package/dist/types/widgets-v2/formula/index.d.ts +0 -11
  539. package/dist/types/widgets-v2/formula/skeleton.d.ts +0 -4
  540. package/dist/types/widgets-v2/formula/style.d.ts +0 -29
  541. package/dist/types/widgets-v2/formula/types.d.ts +0 -43
  542. package/dist/types/widgets-v2/histogram/index.d.ts +0 -5
  543. package/dist/types/widgets-v2/histogram/skeleton.d.ts +0 -9
  544. package/dist/types/widgets-v2/histogram/types.d.ts +0 -60
  545. package/dist/types/widgets-v2/markdown/index.d.ts +0 -6
  546. package/dist/types/widgets-v2/markdown/markdown-ui.d.ts +0 -12
  547. package/dist/types/widgets-v2/markdown/markdown.d.ts +0 -6
  548. package/dist/types/widgets-v2/markdown/skeleton.d.ts +0 -4
  549. package/dist/types/widgets-v2/markdown/style.d.ts +0 -61
  550. package/dist/types/widgets-v2/markdown/types.d.ts +0 -4
  551. package/dist/types/widgets-v2/note/style.d.ts +0 -26
  552. package/dist/types/widgets-v2/pie/index.d.ts +0 -4
  553. package/dist/types/widgets-v2/pie/skeleton.d.ts +0 -13
  554. package/dist/types/widgets-v2/pie/types.d.ts +0 -57
  555. package/dist/types/widgets-v2/range/index.d.ts +0 -4
  556. package/dist/types/widgets-v2/range/range-ui.d.ts +0 -27
  557. package/dist/types/widgets-v2/range/skeleton.d.ts +0 -9
  558. package/dist/types/widgets-v2/range/style.d.ts +0 -40
  559. package/dist/types/widgets-v2/range/types.d.ts +0 -37
  560. package/dist/types/widgets-v2/scatterplot/index.d.ts +0 -5
  561. package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +0 -12
  562. package/dist/types/widgets-v2/scatterplot/types.d.ts +0 -54
  563. package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +0 -29
  564. package/dist/types/widgets-v2/selection-summary/style.d.ts +0 -38
  565. package/dist/types/widgets-v2/spread/index.d.ts +0 -7
  566. package/dist/types/widgets-v2/spread/skeleton.d.ts +0 -9
  567. package/dist/types/widgets-v2/spread/spread-ui.d.ts +0 -18
  568. package/dist/types/widgets-v2/spread/types.d.ts +0 -25
  569. package/dist/types/widgets-v2/stores/index.d.ts +0 -8
  570. package/dist/types/widgets-v2/stores/types.d.ts +0 -55
  571. package/dist/types/widgets-v2/subheader/style.d.ts +0 -10
  572. package/dist/types/widgets-v2/subheader/subheader.d.ts +0 -11
  573. package/dist/types/widgets-v2/table/helpers.d.ts +0 -32
  574. package/dist/types/widgets-v2/table/index.d.ts +0 -8
  575. package/dist/types/widgets-v2/table/skeleton.d.ts +0 -22
  576. package/dist/types/widgets-v2/table/style.d.ts +0 -40
  577. package/dist/types/widgets-v2/table/table-ui.d.ts +0 -44
  578. package/dist/types/widgets-v2/table/types.d.ts +0 -48
  579. package/dist/types/widgets-v2/timeseries/index.d.ts +0 -5
  580. package/dist/types/widgets-v2/timeseries/skeleton.d.ts +0 -8
  581. package/dist/types/widgets-v2/timeseries/types.d.ts +0 -60
  582. package/dist/types/widgets-v2/utils/index.d.ts +0 -3
  583. package/dist/types/widgets-v2/wrapper/index.d.ts +0 -4
  584. package/dist/use-widget-selector-VSPhfhNm.js +0 -12
  585. package/dist/use-widget-selector-VSPhfhNm.js.map +0 -1
  586. package/dist/utils-Dr6gf3vD.js.map +0 -1
  587. package/dist/widget-store-BFPKYm4R.js +0 -187
  588. package/dist/widget-store-BFPKYm4R.js.map +0 -1
  589. package/dist/widgets/category.js.map +0 -1
  590. package/dist/widgets/error.js +0 -30
  591. package/dist/widgets/error.js.map +0 -1
  592. package/dist/widgets/loader.js +0 -66
  593. package/dist/widgets/loader.js.map +0 -1
  594. package/dist/widgets/markdown.js.map +0 -1
  595. package/dist/widgets/no-data.js +0 -55
  596. package/dist/widgets/no-data.js.map +0 -1
  597. package/dist/widgets/note.js +0 -127
  598. package/dist/widgets/note.js.map +0 -1
  599. package/dist/widgets/range.js.map +0 -1
  600. package/dist/widgets/selection-summary.js +0 -41
  601. package/dist/widgets/selection-summary.js.map +0 -1
  602. package/dist/widgets/skeleton-loader.js +0 -24
  603. package/dist/widgets/skeleton-loader.js.map +0 -1
  604. package/dist/widgets/spread.js.map +0 -1
  605. package/dist/widgets/subheader.js +0 -51
  606. package/dist/widgets/subheader.js.map +0 -1
  607. package/dist/widgets/table.js.map +0 -1
  608. package/dist/widgets/toolbar-actions.js +0 -145
  609. package/dist/widgets/toolbar-actions.js.map +0 -1
  610. package/dist/widgets/utils.js.map +0 -1
  611. package/dist/widgets/wrapper.js +0 -273
  612. package/dist/widgets/wrapper.js.map +0 -1
  613. package/dist/widgets-v2/actions.js +0 -4
  614. package/dist/widgets-v2/bar.js +0 -260
  615. package/dist/widgets-v2/bar.js.map +0 -1
  616. package/dist/widgets-v2/category.js +0 -2
  617. package/dist/widgets-v2/echart.js +0 -2
  618. package/dist/widgets-v2/formula.js +0 -2
  619. package/dist/widgets-v2/histogram.js +0 -297
  620. package/dist/widgets-v2/histogram.js.map +0 -1
  621. package/dist/widgets-v2/markdown.js +0 -3
  622. package/dist/widgets-v2/pie.js +0 -373
  623. package/dist/widgets-v2/pie.js.map +0 -1
  624. package/dist/widgets-v2/range.js +0 -2
  625. package/dist/widgets-v2/scatterplot.js +0 -330
  626. package/dist/widgets-v2/scatterplot.js.map +0 -1
  627. package/dist/widgets-v2/spread.js +0 -2
  628. package/dist/widgets-v2/stores.js +0 -2
  629. package/dist/widgets-v2/table.js +0 -2
  630. package/dist/widgets-v2/timeseries.js +0 -294
  631. package/dist/widgets-v2/timeseries.js.map +0 -1
  632. package/dist/widgets-v2/utils.js +0 -2
  633. package/dist/widgets-v2.js.map +0 -1
  634. package/dist/zoom-toggle-IsF8BnAp.js.map +0 -1
  635. package/src/components/list-data/list-data-skeleton.test.tsx +0 -10
  636. package/src/components/list-data/list-data-skeleton.tsx +0 -40
  637. package/src/components/list-data/list-data.test.tsx +0 -167
  638. package/src/components/list-data/list-data.tsx +0 -124
  639. package/src/components/list-data/styles.ts +0 -37
  640. package/src/components/list-data/types.ts +0 -25
  641. package/src/hooks/index.ts +0 -1
  642. package/src/hooks/use-skeleton.test.tsx +0 -32
  643. package/src/hooks/use-skeleton.ts +0 -19
  644. package/src/hooks/use-widget-ref.ts +0 -34
  645. package/src/widgets/README.md +0 -277
  646. package/src/widgets/actions/brush-toggle/brush-overlay.test.tsx +0 -465
  647. package/src/widgets/actions/brush-toggle/brush-overlay.tsx +0 -408
  648. package/src/widgets/actions/brush-toggle/hit-test.test.ts +0 -65
  649. package/src/widgets/actions/brush-toggle/hit-test.ts +0 -45
  650. package/src/widgets/actions/brush-toggle/types.ts +0 -78
  651. package/src/widgets/actions/change-column/change-column-dnd.test.tsx +0 -193
  652. package/src/widgets/actions/change-column/sortable-column-item.test.tsx +0 -124
  653. package/src/widgets/actions/download/exports.tsx +0 -118
  654. package/src/widgets/actions/fullscreen/styles.ts +0 -17
  655. package/src/widgets/actions/lock-selection/types.ts +0 -43
  656. package/src/widgets/actions/relative-data/types.ts +0 -33
  657. package/src/widgets/actions/relative-data/utils.test.ts +0 -223
  658. package/src/widgets/actions/relative-data/utils.ts +0 -58
  659. package/src/widgets/actions/searcher/searcher-toggle.test.tsx +0 -354
  660. package/src/widgets/actions/searcher/types.ts +0 -72
  661. package/src/widgets/actions/shared/styles.ts +0 -12
  662. package/src/widgets/actions/stack-toggle/grouped-bar-chart-icon.tsx +0 -14
  663. package/src/widgets/actions/stack-toggle/types.ts +0 -29
  664. package/src/widgets/actions/zoom-toggle/types.ts +0 -44
  665. package/src/widgets/bar/config.ts +0 -140
  666. package/src/widgets/bar/style.ts +0 -33
  667. package/src/widgets/category/components/category-rows.test.tsx +0 -213
  668. package/src/widgets/category/config.ts +0 -86
  669. package/src/widgets/echart/const.ts +0 -1
  670. package/src/widgets/echart/options.ts +0 -57
  671. package/src/widgets/echart/types.ts +0 -45
  672. package/src/widgets/echart/utils.test.ts +0 -277
  673. package/src/widgets/echart/utils.ts +0 -244
  674. package/src/widgets/error/error.test.tsx +0 -331
  675. package/src/widgets/error/error.tsx +0 -51
  676. package/src/widgets/error/index.ts +0 -2
  677. package/src/widgets/error/types.ts +0 -24
  678. package/src/widgets/formula/components/item.test.tsx +0 -249
  679. package/src/widgets/formula/components/item.tsx +0 -21
  680. package/src/widgets/formula/components/prefix.test.tsx +0 -341
  681. package/src/widgets/formula/components/prefix.tsx +0 -19
  682. package/src/widgets/formula/components/row.test.tsx +0 -364
  683. package/src/widgets/formula/components/row.tsx +0 -24
  684. package/src/widgets/formula/components/series.tsx +0 -35
  685. package/src/widgets/formula/components/suffix.test.tsx +0 -383
  686. package/src/widgets/formula/components/suffix.tsx +0 -29
  687. package/src/widgets/formula/components/value.test.tsx +0 -329
  688. package/src/widgets/formula/components/value.tsx +0 -24
  689. package/src/widgets/formula/config.test.ts +0 -37
  690. package/src/widgets/formula/config.ts +0 -38
  691. package/src/widgets/formula/serializer.test.tsx +0 -144
  692. package/src/widgets/formula/serializer.ts +0 -28
  693. package/src/widgets/histogram/config.ts +0 -230
  694. package/src/widgets/histogram/style.ts +0 -8
  695. package/src/widgets/loader/index.ts +0 -4
  696. package/src/widgets/loader/loader.tsx +0 -92
  697. package/src/widgets/loader/types.ts +0 -13
  698. package/src/widgets/loader/utils.test.ts +0 -112
  699. package/src/widgets/loader/utils.ts +0 -57
  700. package/src/widgets/markdown/config.ts +0 -28
  701. package/src/widgets/no-data/index.ts +0 -2
  702. package/src/widgets/no-data/no-data.test.tsx +0 -497
  703. package/src/widgets/no-data/no-data.tsx +0 -112
  704. package/src/widgets/no-data/style.ts +0 -18
  705. package/src/widgets/no-data/types.ts +0 -76
  706. package/src/widgets/note/index.ts +0 -2
  707. package/src/widgets/note/note.test.tsx +0 -391
  708. package/src/widgets/note/note.tsx +0 -124
  709. package/src/widgets/note/types.ts +0 -9
  710. package/src/widgets/pie/config.ts +0 -245
  711. package/src/widgets/pie/style.ts +0 -8
  712. package/src/widgets/range/components/range-item.test.tsx +0 -243
  713. package/src/widgets/range/components/range-item.tsx +0 -214
  714. package/src/widgets/range/config.ts +0 -10
  715. package/src/widgets/range/serializer.test.ts +0 -70
  716. package/src/widgets/range/serializer.ts +0 -27
  717. package/src/widgets/scatterplot/config.ts +0 -136
  718. package/src/widgets/scatterplot/style.ts +0 -21
  719. package/src/widgets/selection-summary/index.ts +0 -6
  720. package/src/widgets/selection-summary/types.ts +0 -14
  721. package/src/widgets/skeleton-loader/index.ts +0 -2
  722. package/src/widgets/skeleton-loader/skeleton-loader.test.tsx +0 -139
  723. package/src/widgets/skeleton-loader/skeleton-loader.tsx +0 -35
  724. package/src/widgets/skeleton-loader/types.ts +0 -8
  725. package/src/widgets/spread/components/max-value.tsx +0 -29
  726. package/src/widgets/spread/components/min-value.tsx +0 -29
  727. package/src/widgets/spread/components/separator.tsx +0 -9
  728. package/src/widgets/spread/config.ts +0 -39
  729. package/src/widgets/spread/style.ts +0 -22
  730. package/src/widgets/stores/use-widget-selector.ts +0 -47
  731. package/src/widgets/stores/widget-store-branches.test.ts +0 -275
  732. package/src/widgets/stores/widget-store-performance.test.ts +0 -750
  733. package/src/widgets/stores/widget-store.test.ts +0 -942
  734. package/src/widgets/stores/widget-store.ts +0 -484
  735. package/src/widgets/subheader/index.ts +0 -3
  736. package/src/widgets/subheader/types.ts +0 -11
  737. package/src/widgets/table/components/cell-header.tsx +0 -58
  738. package/src/widgets/table/components/cell.tsx +0 -82
  739. package/src/widgets/table/components/pagination-actions.tsx +0 -67
  740. package/src/widgets/table/components/pagination.tsx +0 -41
  741. package/src/widgets/table/components/row.tsx +0 -65
  742. package/src/widgets/table/config.test.ts +0 -65
  743. package/src/widgets/table/config.ts +0 -75
  744. package/src/widgets/table/hooks/use-pagination.test.ts +0 -294
  745. package/src/widgets/table/hooks/use-pagination.ts +0 -148
  746. package/src/widgets/table/hooks/use-selection.test.ts +0 -504
  747. package/src/widgets/table/hooks/use-selection.ts +0 -194
  748. package/src/widgets/table/hooks/use-sort.test.ts +0 -296
  749. package/src/widgets/table/hooks/use-sort.ts +0 -131
  750. package/src/widgets/table/serializer.ts +0 -54
  751. package/src/widgets/timeseries/config.ts +0 -136
  752. package/src/widgets/timeseries/style.ts +0 -36
  753. package/src/widgets/toolbar-actions/index.ts +0 -6
  754. package/src/widgets/toolbar-actions/styles.ts +0 -38
  755. package/src/widgets/toolbar-actions/toolbar-actions.test.tsx +0 -691
  756. package/src/widgets/toolbar-actions/toolbar-actions.tsx +0 -145
  757. package/src/widgets/toolbar-actions/types.ts +0 -60
  758. package/src/widgets/utils/chart-config/config-factory.ts +0 -67
  759. package/src/widgets/utils/chart-config/csv-modifiers.ts +0 -56
  760. package/src/widgets/utils/chart-config/download-config.ts +0 -22
  761. package/src/widgets/utils/chart-config/index.ts +0 -29
  762. package/src/widgets/utils/formatter.ts +0 -2
  763. package/src/widgets/utils/skeleton/index.ts +0 -5
  764. package/src/widgets/utils/skeleton/styles.ts +0 -20
  765. package/src/widgets/wrapper/components/actions.test.tsx +0 -105
  766. package/src/widgets/wrapper/components/actions.tsx +0 -35
  767. package/src/widgets/wrapper/components/options.test.tsx +0 -331
  768. package/src/widgets/wrapper/components/options.tsx +0 -81
  769. package/src/widgets/wrapper/components/title.test.tsx +0 -126
  770. package/src/widgets/wrapper/components/title.tsx +0 -35
  771. package/src/widgets/wrapper/styles.ts +0 -98
  772. package/src/widgets/wrapper/types.ts +0 -55
  773. package/src/widgets/wrapper/wrapper-ui.test.tsx +0 -232
  774. package/src/widgets/wrapper/wrapper-ui.tsx +0 -72
  775. package/src/widgets/wrapper/wrapper.test.tsx +0 -365
  776. package/src/widgets/wrapper/wrapper.tsx +0 -60
  777. package/src/widgets-v2/actions/brush-toggle/brush-toggle.test.tsx +0 -180
  778. package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +0 -154
  779. package/src/widgets-v2/actions/change-column/change-column-icon.tsx +0 -14
  780. package/src/widgets-v2/actions/change-column/change-column.test.tsx +0 -59
  781. package/src/widgets-v2/actions/change-column/change-column.tsx +0 -189
  782. package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +0 -63
  783. package/src/widgets-v2/actions/change-column/types.ts +0 -11
  784. package/src/widgets-v2/actions/download/download.test.tsx +0 -327
  785. package/src/widgets-v2/actions/download/download.tsx +0 -144
  786. package/src/widgets-v2/actions/download/exports.test.tsx +0 -198
  787. package/src/widgets-v2/actions/download/types.ts +0 -32
  788. package/src/widgets-v2/actions/fullscreen/fullscreen.test.tsx +0 -212
  789. package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +0 -301
  790. package/src/widgets-v2/actions/fullscreen/types.ts +0 -15
  791. package/src/widgets-v2/actions/index.ts +0 -95
  792. package/src/widgets-v2/actions/lock-selection/lock-selection.test.tsx +0 -301
  793. package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +0 -188
  794. package/src/widgets-v2/actions/relative-data/relative-data.test.tsx +0 -71
  795. package/src/widgets-v2/actions/relative-data/relative-data.tsx +0 -107
  796. package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +0 -91
  797. package/src/widgets-v2/actions/searcher/searcher.tsx +0 -111
  798. package/src/widgets-v2/actions/stack-toggle/stack-toggle.test.tsx +0 -61
  799. package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +0 -54
  800. package/src/widgets-v2/actions/stack-toggle/style.ts +0 -11
  801. package/src/widgets-v2/actions/zoom-toggle/style.ts +0 -11
  802. package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.test.tsx +0 -107
  803. package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +0 -106
  804. package/src/widgets-v2/bar/index.ts +0 -10
  805. package/src/widgets-v2/bar/skeleton.tsx +0 -69
  806. package/src/widgets-v2/bar/types.ts +0 -51
  807. package/src/widgets-v2/category/category-ui.test.tsx +0 -909
  808. package/src/widgets-v2/category/category-ui.tsx +0 -479
  809. package/src/widgets-v2/category/components/category-bar.tsx +0 -49
  810. package/src/widgets-v2/category/components/category-legend.tsx +0 -82
  811. package/src/widgets-v2/category/components/category-row-multi.tsx +0 -86
  812. package/src/widgets-v2/category/components/category-row-other.tsx +0 -84
  813. package/src/widgets-v2/category/components/category-row-single.tsx +0 -76
  814. package/src/widgets-v2/category/index.ts +0 -32
  815. package/src/widgets-v2/category/skeleton.tsx +0 -74
  816. package/src/widgets-v2/category/style.ts +0 -329
  817. package/src/widgets-v2/category/types.ts +0 -61
  818. package/src/widgets-v2/echart/echart-ui.test.tsx +0 -330
  819. package/src/widgets-v2/echart/echart-ui.tsx +0 -236
  820. package/src/widgets-v2/echart/echart.test.tsx +0 -229
  821. package/src/widgets-v2/echart/echart.tsx +0 -209
  822. package/src/widgets-v2/echart/index.ts +0 -22
  823. package/src/widgets-v2/echart/shared-resize-observer.ts +0 -56
  824. package/src/widgets-v2/formula/formula-ui.test.tsx +0 -91
  825. package/src/widgets-v2/formula/formula-ui.tsx +0 -66
  826. package/src/widgets-v2/formula/index.ts +0 -17
  827. package/src/widgets-v2/formula/skeleton.tsx +0 -27
  828. package/src/widgets-v2/formula/style.ts +0 -31
  829. package/src/widgets-v2/formula/types.ts +0 -48
  830. package/src/widgets-v2/histogram/index.ts +0 -13
  831. package/src/widgets-v2/histogram/skeleton.tsx +0 -70
  832. package/src/widgets-v2/histogram/types.ts +0 -64
  833. package/src/widgets-v2/markdown/index.ts +0 -6
  834. package/src/widgets-v2/markdown/markdown-ui.test.tsx +0 -75
  835. package/src/widgets-v2/markdown/markdown-ui.tsx +0 -55
  836. package/src/widgets-v2/markdown/markdown.tsx +0 -17
  837. package/src/widgets-v2/markdown/skeleton.tsx +0 -32
  838. package/src/widgets-v2/markdown/style.ts +0 -53
  839. package/src/widgets-v2/markdown/types.ts +0 -4
  840. package/src/widgets-v2/note/style.ts +0 -26
  841. package/src/widgets-v2/pie/index.ts +0 -10
  842. package/src/widgets-v2/pie/skeleton.tsx +0 -94
  843. package/src/widgets-v2/pie/types.ts +0 -62
  844. package/src/widgets-v2/range/index.ts +0 -4
  845. package/src/widgets-v2/range/range-ui.test.tsx +0 -136
  846. package/src/widgets-v2/range/range-ui.tsx +0 -278
  847. package/src/widgets-v2/range/skeleton.tsx +0 -47
  848. package/src/widgets-v2/range/style.ts +0 -41
  849. package/src/widgets-v2/range/types.ts +0 -37
  850. package/src/widgets-v2/scatterplot/index.ts +0 -14
  851. package/src/widgets-v2/scatterplot/skeleton.tsx +0 -84
  852. package/src/widgets-v2/scatterplot/types.ts +0 -59
  853. package/src/widgets-v2/selection-summary/selection-summary.tsx +0 -82
  854. package/src/widgets-v2/selection-summary/style.ts +0 -38
  855. package/src/widgets-v2/spread/index.ts +0 -11
  856. package/src/widgets-v2/spread/skeleton.tsx +0 -38
  857. package/src/widgets-v2/spread/spread-ui.test.tsx +0 -108
  858. package/src/widgets-v2/spread/spread-ui.tsx +0 -52
  859. package/src/widgets-v2/spread/types.ts +0 -27
  860. package/src/widgets-v2/stores/index.ts +0 -49
  861. package/src/widgets-v2/stores/types.ts +0 -64
  862. package/src/widgets-v2/subheader/style.ts +0 -12
  863. package/src/widgets-v2/subheader/subheader.test.tsx +0 -30
  864. package/src/widgets-v2/subheader/subheader.tsx +0 -16
  865. package/src/widgets-v2/table/helpers.test.ts +0 -233
  866. package/src/widgets-v2/table/helpers.ts +0 -131
  867. package/src/widgets-v2/table/index.ts +0 -24
  868. package/src/widgets-v2/table/skeleton.tsx +0 -65
  869. package/src/widgets-v2/table/style.ts +0 -43
  870. package/src/widgets-v2/table/table-ui.tsx +0 -364
  871. package/src/widgets-v2/table/types.ts +0 -55
  872. package/src/widgets-v2/timeseries/index.ts +0 -11
  873. package/src/widgets-v2/timeseries/skeleton.tsx +0 -76
  874. package/src/widgets-v2/timeseries/types.ts +0 -65
  875. package/src/widgets-v2/utils/index.ts +0 -3
  876. package/src/widgets-v2/wrapper/index.ts +0 -14
  877. /package/dist/types/{widgets-v2 → widgets}/actions/brush-toggle/index.d.ts +0 -0
  878. /package/dist/types/{widgets-v2 → widgets}/actions/brush-toggle/labels.d.ts +0 -0
  879. /package/dist/types/{widgets-v2 → widgets}/actions/brush-toggle/transforms.d.ts +0 -0
  880. /package/dist/types/{widgets-v2 → widgets}/actions/change-column/index.d.ts +0 -0
  881. /package/dist/types/{widgets-v2 → widgets}/actions/change-column/labels.d.ts +0 -0
  882. /package/dist/types/{widgets-v2 → widgets}/actions/change-column/style.d.ts +0 -0
  883. /package/dist/types/{widgets-v2 → widgets}/actions/download/constants.d.ts +0 -0
  884. /package/dist/types/{widgets-v2 → widgets}/actions/download/csv-item.d.ts +0 -0
  885. /package/dist/types/{widgets-v2 → widgets}/actions/download/icons.d.ts +0 -0
  886. /package/dist/types/{widgets-v2 → widgets}/actions/download/index.d.ts +0 -0
  887. /package/dist/types/{widgets-v2 → widgets}/actions/download/labels.d.ts +0 -0
  888. /package/dist/types/{widgets-v2 → widgets}/actions/download/style.d.ts +0 -0
  889. /package/dist/types/{widgets-v2 → widgets}/actions/fullscreen/index.d.ts +0 -0
  890. /package/dist/types/{widgets-v2 → widgets}/actions/fullscreen/labels.d.ts +0 -0
  891. /package/dist/types/{widgets-v2 → widgets}/actions/fullscreen/style.d.ts +0 -0
  892. /package/dist/types/{widgets-v2 → widgets}/actions/lock-selection/index.d.ts +0 -0
  893. /package/dist/types/{widgets-v2 → widgets}/actions/lock-selection/labels.d.ts +0 -0
  894. /package/dist/types/{widgets-v2/actions/brush-toggle → widgets/actions/lock-selection}/style.d.ts +0 -0
  895. /package/dist/types/{widgets-v2 → widgets}/actions/lock-selection/transforms.d.ts +0 -0
  896. /package/dist/types/{widgets-v2 → widgets}/actions/relative-data/index.d.ts +0 -0
  897. /package/dist/types/{widgets-v2 → widgets}/actions/relative-data/labels.d.ts +0 -0
  898. /package/dist/types/{widgets-v2/actions/lock-selection → widgets/actions/relative-data}/style.d.ts +0 -0
  899. /package/dist/types/{widgets-v2 → widgets}/actions/searcher/filter.d.ts +0 -0
  900. /package/dist/types/{widgets-v2 → widgets}/actions/searcher/index.d.ts +0 -0
  901. /package/dist/types/{widgets-v2 → widgets}/actions/searcher/labels.d.ts +0 -0
  902. /package/dist/types/{widgets-v2 → widgets}/actions/searcher/style.d.ts +0 -0
  903. /package/dist/types/{widgets-v2 → widgets}/actions/show-all/index.d.ts +0 -0
  904. /package/dist/types/{widgets-v2 → widgets}/actions/show-all/labels.d.ts +0 -0
  905. /package/dist/types/{widgets-v2 → widgets}/actions/show-all/show-all.d.ts +0 -0
  906. /package/dist/types/{widgets-v2 → widgets}/actions/show-all/style.d.ts +0 -0
  907. /package/dist/types/{widgets-v2 → widgets}/actions/stack-toggle/index.d.ts +0 -0
  908. /package/dist/types/{widgets-v2 → widgets}/actions/stack-toggle/labels.d.ts +0 -0
  909. /package/dist/types/{widgets-v2/actions/relative-data → widgets/actions/stack-toggle}/style.d.ts +0 -0
  910. /package/dist/types/{widgets-v2 → widgets}/actions/stack-toggle/transforms.d.ts +0 -0
  911. /package/dist/types/{widgets-v2 → widgets}/actions/zoom-toggle/index.d.ts +0 -0
  912. /package/dist/types/{widgets-v2 → widgets}/actions/zoom-toggle/labels.d.ts +0 -0
  913. /package/dist/types/{widgets-v2 → widgets}/actions/zoom-toggle/transforms.d.ts +0 -0
  914. /package/dist/types/{widgets-v2 → widgets}/bar/download.d.ts +0 -0
  915. /package/dist/types/{widgets-v2 → widgets}/bar/options.d.ts +0 -0
  916. /package/dist/types/{widgets-v2 → widgets}/category/category.d.ts +0 -0
  917. /package/dist/types/{widgets-v2 → widgets}/category/download.d.ts +0 -0
  918. /package/dist/types/{widgets-v2 → widgets}/echart/edge-label-clamp.d.ts +0 -0
  919. /package/dist/types/{widgets-v2 → widgets}/echart/style.d.ts +0 -0
  920. /package/dist/types/{widgets-v2 → widgets}/echart/use-chart-selection.d.ts +0 -0
  921. /package/dist/types/{widgets-v2 → widgets}/formula/delta.d.ts +0 -0
  922. /package/dist/types/{widgets-v2 → widgets}/formula/download.d.ts +0 -0
  923. /package/dist/types/{widgets-v2 → widgets}/formula/formula.d.ts +0 -0
  924. /package/dist/types/{widgets-v2 → widgets}/formula/note.d.ts +0 -0
  925. /package/dist/types/{widgets-v2 → widgets}/formula/prefix.d.ts +0 -0
  926. /package/dist/types/{widgets-v2 → widgets}/formula/suffix.d.ts +0 -0
  927. /package/dist/types/{widgets-v2 → widgets}/histogram/download.d.ts +0 -0
  928. /package/dist/types/{widgets-v2 → widgets}/histogram/options.d.ts +0 -0
  929. /package/dist/types/{widgets-v2 → widgets}/histogram/transforms.d.ts +0 -0
  930. /package/dist/types/{widgets-v2 → widgets}/markdown/download.d.ts +0 -0
  931. /package/dist/types/{widgets-v2 → widgets}/markdown/markdown-content.d.ts +0 -0
  932. /package/dist/types/{widgets-v2 → widgets}/note/labels.d.ts +0 -0
  933. /package/dist/types/{widgets-v2 → widgets}/note/widget-note.d.ts +0 -0
  934. /package/dist/types/{widgets-v2 → widgets}/pie/download.d.ts +0 -0
  935. /package/dist/types/{widgets-v2 → widgets}/pie/options.d.ts +0 -0
  936. /package/dist/types/{widgets-v2 → widgets}/provider/widget-provider.d.ts +0 -0
  937. /package/dist/types/{widgets-v2 → widgets}/range/range.d.ts +0 -0
  938. /package/dist/types/{widgets-v2 → widgets}/scatterplot/download.d.ts +0 -0
  939. /package/dist/types/{widgets-v2 → widgets}/scatterplot/options.d.ts +0 -0
  940. /package/dist/types/{widgets-v2 → widgets}/scatterplot/transforms.d.ts +0 -0
  941. /package/dist/types/{widgets-v2 → widgets}/selection-summary/labels.d.ts +0 -0
  942. /package/dist/types/{widgets-v2 → widgets}/spread/band.d.ts +0 -0
  943. /package/dist/types/{widgets-v2 → widgets}/spread/download.d.ts +0 -0
  944. /package/dist/types/{widgets-v2 → widgets}/spread/separator.d.ts +0 -0
  945. /package/dist/types/{widgets-v2 → widgets}/spread/spread.d.ts +0 -0
  946. /package/dist/types/{widgets-v2 → widgets}/state/labels.d.ts +0 -0
  947. /package/dist/types/{widgets-v2 → widgets}/state/style.d.ts +0 -0
  948. /package/dist/types/{widgets-v2 → widgets}/state/widget-state.d.ts +0 -0
  949. /package/dist/types/{widgets-v2 → widgets}/stores/pipeline-middleware.d.ts +0 -0
  950. /package/dist/types/{widgets-v2 → widgets}/stores/transforms.d.ts +0 -0
  951. /package/dist/types/{widgets-v2 → widgets}/stores/use-echart-instance.d.ts +0 -0
  952. /package/dist/types/{widgets-v2 → widgets}/stores/use-transform-enabled.d.ts +0 -0
  953. /package/dist/types/{widgets-v2 → widgets}/stores/use-transform.d.ts +0 -0
  954. /package/dist/types/{widgets-v2 → widgets}/stores/widget-context.d.ts +0 -0
  955. /package/dist/types/{widgets-v2 → widgets}/stores/widget-store-registry.d.ts +0 -0
  956. /package/dist/types/{widgets-v2 → widgets}/table/download.d.ts +0 -0
  957. /package/dist/types/{widgets-v2 → widgets}/table/labels.d.ts +0 -0
  958. /package/dist/types/{widgets-v2 → widgets}/table/table.d.ts +0 -0
  959. /package/dist/types/{widgets-v2 → widgets}/table/transforms.d.ts +0 -0
  960. /package/dist/types/{widgets-v2 → widgets}/timeseries/download.d.ts +0 -0
  961. /package/dist/types/{widgets-v2 → widgets}/timeseries/options.d.ts +0 -0
  962. /package/dist/types/{widgets-v2 → widgets}/timeseries/transforms.d.ts +0 -0
  963. /package/dist/types/{widgets-v2 → widgets}/toolbox/labels.d.ts +0 -0
  964. /package/dist/types/{widgets-v2 → widgets}/toolbox/style.d.ts +0 -0
  965. /package/dist/types/{widgets-v2 → widgets}/toolbox/toolbox.d.ts +0 -0
  966. /package/dist/types/{widgets-v2 → widgets}/utils/data-zoom-layout.d.ts +0 -0
  967. /package/dist/types/{widgets-v2 → widgets}/utils/merge-options.d.ts +0 -0
  968. /package/dist/types/widgets/utils/{chart-config/option-builders.d.ts → option-builders.d.ts} +0 -0
  969. /package/dist/types/{widgets-v2 → widgets}/utils/resolve-theme-color.d.ts +0 -0
  970. /package/dist/types/{widgets-v2 → widgets}/wrapper/labels.d.ts +0 -0
  971. /package/dist/types/{widgets-v2 → widgets}/wrapper/style.d.ts +0 -0
  972. /package/dist/types/{widgets-v2 → widgets}/wrapper/widget-actions.d.ts +0 -0
  973. /package/dist/types/{widgets-v2 → widgets}/wrapper/widget-content.d.ts +0 -0
  974. /package/dist/types/{widgets-v2 → widgets}/wrapper/widget-wrapper.d.ts +0 -0
  975. /package/src/{widgets-v2 → widgets}/actions/brush-toggle/index.ts +0 -0
  976. /package/src/{widgets-v2 → widgets}/actions/brush-toggle/labels.ts +0 -0
  977. /package/src/{widgets-v2 → widgets}/actions/brush-toggle/transforms.test.ts +0 -0
  978. /package/src/{widgets-v2 → widgets}/actions/brush-toggle/transforms.ts +0 -0
  979. /package/src/{widgets-v2 → widgets}/actions/change-column/index.ts +0 -0
  980. /package/src/{widgets-v2 → widgets}/actions/change-column/labels.ts +0 -0
  981. /package/src/{widgets-v2 → widgets}/actions/change-column/style.ts +0 -0
  982. /package/src/{widgets-v2 → widgets}/actions/download/constants.ts +0 -0
  983. /package/src/{widgets-v2 → widgets}/actions/download/csv-item.test.tsx +0 -0
  984. /package/src/{widgets-v2 → widgets}/actions/download/csv-item.tsx +0 -0
  985. /package/src/{widgets-v2 → widgets}/actions/download/icons.tsx +0 -0
  986. /package/src/{widgets-v2 → widgets}/actions/download/index.ts +0 -0
  987. /package/src/{widgets-v2 → widgets}/actions/download/labels.ts +0 -0
  988. /package/src/{widgets-v2 → widgets}/actions/download/png-item.test.tsx +0 -0
  989. /package/src/{widgets-v2 → widgets}/actions/download/style.ts +0 -0
  990. /package/src/{widgets-v2 → widgets}/actions/fullscreen/index.ts +0 -0
  991. /package/src/{widgets-v2 → widgets}/actions/fullscreen/labels.ts +0 -0
  992. /package/src/{widgets-v2 → widgets}/actions/fullscreen/style.ts +0 -0
  993. /package/src/{widgets-v2 → widgets}/actions/lock-selection/index.ts +0 -0
  994. /package/src/{widgets-v2 → widgets}/actions/lock-selection/labels.ts +0 -0
  995. /package/src/{widgets-v2/actions/brush-toggle → widgets/actions/lock-selection}/style.ts +0 -0
  996. /package/src/{widgets-v2 → widgets}/actions/lock-selection/transforms.ts +0 -0
  997. /package/src/{widgets-v2 → widgets}/actions/relative-data/index.ts +0 -0
  998. /package/src/{widgets-v2 → widgets}/actions/relative-data/labels.ts +0 -0
  999. /package/src/{widgets-v2/actions/lock-selection → widgets/actions/relative-data}/style.ts +0 -0
  1000. /package/src/{widgets-v2 → widgets}/actions/relative-data/transforms.test.ts +0 -0
  1001. /package/src/{widgets-v2 → widgets}/actions/searcher/filter.ts +0 -0
  1002. /package/src/{widgets-v2 → widgets}/actions/searcher/index.ts +0 -0
  1003. /package/src/{widgets-v2 → widgets}/actions/searcher/labels.ts +0 -0
  1004. /package/src/{widgets-v2 → widgets}/actions/searcher/searcher.test.tsx +0 -0
  1005. /package/src/{widgets-v2 → widgets}/actions/searcher/style.ts +0 -0
  1006. /package/src/{widgets-v2 → widgets}/actions/show-all/index.ts +0 -0
  1007. /package/src/{widgets-v2 → widgets}/actions/show-all/labels.ts +0 -0
  1008. /package/src/{widgets-v2 → widgets}/actions/show-all/show-all.test.tsx +0 -0
  1009. /package/src/{widgets-v2 → widgets}/actions/show-all/show-all.tsx +0 -0
  1010. /package/src/{widgets-v2 → widgets}/actions/show-all/style.ts +0 -0
  1011. /package/src/{widgets-v2 → widgets}/actions/stack-toggle/index.ts +0 -0
  1012. /package/src/{widgets-v2 → widgets}/actions/stack-toggle/labels.ts +0 -0
  1013. /package/src/{widgets-v2/actions/relative-data → widgets/actions/stack-toggle}/style.ts +0 -0
  1014. /package/src/{widgets-v2 → widgets}/actions/stack-toggle/transforms.test.ts +0 -0
  1015. /package/src/{widgets-v2 → widgets}/actions/stack-toggle/transforms.ts +0 -0
  1016. /package/src/{widgets-v2 → widgets}/actions/zoom-toggle/index.ts +0 -0
  1017. /package/src/{widgets-v2 → widgets}/actions/zoom-toggle/labels.ts +0 -0
  1018. /package/src/{widgets-v2 → widgets}/actions/zoom-toggle/transforms.test.ts +0 -0
  1019. /package/src/{widgets-v2 → widgets}/actions/zoom-toggle/transforms.ts +0 -0
  1020. /package/src/{widgets-v2 → widgets}/bar/download.test.tsx +0 -0
  1021. /package/src/{widgets-v2 → widgets}/bar/download.tsx +0 -0
  1022. /package/src/{widgets-v2 → widgets}/bar/options.test.ts +0 -0
  1023. /package/src/{widgets-v2 → widgets}/bar/skeleton.test.tsx +0 -0
  1024. /package/src/{widgets-v2 → widgets}/category/category.relative-data.test.tsx +0 -0
  1025. /package/src/{widgets-v2 → widgets}/category/category.stack-toggle.test.tsx +0 -0
  1026. /package/src/{widgets-v2 → widgets}/category/category.test.tsx +0 -0
  1027. /package/src/{widgets-v2 → widgets}/category/category.tsx +0 -0
  1028. /package/src/{widgets-v2 → widgets}/category/components/category-bar-stacked.test.tsx +0 -0
  1029. /package/src/{widgets-v2 → widgets}/category/components/category-bar.test.tsx +0 -0
  1030. /package/src/{widgets-v2 → widgets}/category/components/category-row-other.test.tsx +0 -0
  1031. /package/src/{widgets-v2 → widgets}/category/components/category-row-stacked.test.tsx +0 -0
  1032. /package/src/{widgets-v2 → widgets}/category/download.test.ts +0 -0
  1033. /package/src/{widgets-v2 → widgets}/category/download.ts +0 -0
  1034. /package/src/{widgets-v2 → widgets}/category/skeleton.test.tsx +0 -0
  1035. /package/src/{widgets-v2 → widgets}/echart/edge-label-clamp.test.ts +0 -0
  1036. /package/src/{widgets-v2 → widgets}/echart/edge-label-clamp.ts +0 -0
  1037. /package/src/{widgets-v2 → widgets}/echart/shared-resize-observer.test.ts +0 -0
  1038. /package/src/{widgets-v2 → widgets}/echart/style.ts +0 -0
  1039. /package/src/{widgets-v2 → widgets}/echart/use-chart-selection.test.tsx +0 -0
  1040. /package/src/{widgets-v2 → widgets}/echart/use-chart-selection.ts +0 -0
  1041. /package/src/{widgets-v2 → widgets}/formula/delta.tsx +0 -0
  1042. /package/src/{widgets-v2 → widgets}/formula/download.test.tsx +0 -0
  1043. /package/src/{widgets-v2 → widgets}/formula/download.tsx +0 -0
  1044. /package/src/{widgets-v2 → widgets}/formula/formula.test.tsx +0 -0
  1045. /package/src/{widgets-v2 → widgets}/formula/formula.tsx +0 -0
  1046. /package/src/{widgets-v2 → widgets}/formula/prefix.tsx +0 -0
  1047. /package/src/{widgets-v2 → widgets}/formula/skeleton.test.tsx +0 -0
  1048. /package/src/{widgets-v2 → widgets}/formula/subcomponents.test.tsx +0 -0
  1049. /package/src/{widgets-v2 → widgets}/formula/suffix.tsx +0 -0
  1050. /package/src/{widgets-v2 → widgets}/histogram/download.test.ts +0 -0
  1051. /package/src/{widgets-v2 → widgets}/histogram/download.ts +0 -0
  1052. /package/src/{widgets-v2 → widgets}/histogram/options.test.ts +0 -0
  1053. /package/src/{widgets-v2 → widgets}/histogram/skeleton.test.tsx +0 -0
  1054. /package/src/{widgets-v2 → widgets}/histogram/transforms.test.ts +0 -0
  1055. /package/src/{widgets-v2 → widgets}/histogram/transforms.ts +0 -0
  1056. /package/src/{widgets-v2 → widgets}/markdown/download.test.ts +0 -0
  1057. /package/src/{widgets-v2 → widgets}/markdown/download.tsx +0 -0
  1058. /package/src/{widgets-v2 → widgets}/markdown/markdown-content.test.tsx +0 -0
  1059. /package/src/{widgets-v2 → widgets}/markdown/markdown-content.tsx +0 -0
  1060. /package/src/{widgets-v2 → widgets}/markdown/markdown.test.tsx +0 -0
  1061. /package/src/{widgets-v2 → widgets}/markdown/skeleton.test.tsx +0 -0
  1062. /package/src/{widgets-v2 → widgets}/note/labels.ts +0 -0
  1063. /package/src/{widgets-v2 → widgets}/note/widget-note.test.tsx +0 -0
  1064. /package/src/{widgets-v2 → widgets}/pie/download.test.ts +0 -0
  1065. /package/src/{widgets-v2 → widgets}/pie/download.ts +0 -0
  1066. /package/src/{widgets-v2 → widgets}/pie/options.test.ts +0 -0
  1067. /package/src/{widgets-v2 → widgets}/pie/skeleton.test.tsx +0 -0
  1068. /package/src/{widgets-v2 → widgets}/provider/widget-provider.test.tsx +0 -0
  1069. /package/src/{widgets-v2 → widgets}/provider/widget-provider.tsx +0 -0
  1070. /package/src/{widgets-v2 → widgets}/range/range.test.tsx +0 -0
  1071. /package/src/{widgets-v2 → widgets}/range/range.tsx +0 -0
  1072. /package/src/{widgets-v2 → widgets}/range/skeleton.test.tsx +0 -0
  1073. /package/src/{widgets-v2 → widgets}/scatterplot/download.test.ts +0 -0
  1074. /package/src/{widgets-v2 → widgets}/scatterplot/download.ts +0 -0
  1075. /package/src/{widgets-v2 → widgets}/scatterplot/options.test.ts +0 -0
  1076. /package/src/{widgets-v2 → widgets}/scatterplot/skeleton.test.tsx +0 -0
  1077. /package/src/{widgets-v2 → widgets}/scatterplot/transforms.test.ts +0 -0
  1078. /package/src/{widgets-v2 → widgets}/scatterplot/transforms.ts +0 -0
  1079. /package/src/{widgets-v2 → widgets}/selection-summary/labels.ts +0 -0
  1080. /package/src/{widgets-v2 → widgets}/selection-summary/selection-summary.test.tsx +0 -0
  1081. /package/src/{widgets-v2 → widgets}/spread/band.test.ts +0 -0
  1082. /package/src/{widgets-v2 → widgets}/spread/band.ts +0 -0
  1083. /package/src/{widgets-v2 → widgets}/spread/download.test.ts +0 -0
  1084. /package/src/{widgets-v2 → widgets}/spread/download.ts +0 -0
  1085. /package/src/{widgets-v2 → widgets}/spread/separator.tsx +0 -0
  1086. /package/src/{widgets-v2 → widgets}/spread/skeleton.test.tsx +0 -0
  1087. /package/src/{widgets-v2 → widgets}/spread/spread.test.tsx +0 -0
  1088. /package/src/{widgets-v2 → widgets}/spread/spread.tsx +0 -0
  1089. /package/src/{widgets-v2 → widgets}/state/labels.test.ts +0 -0
  1090. /package/src/{widgets-v2 → widgets}/state/labels.ts +0 -0
  1091. /package/src/{widgets-v2 → widgets}/state/style.ts +0 -0
  1092. /package/src/{widgets-v2 → widgets}/state/widget-state.test.tsx +0 -0
  1093. /package/src/{widgets-v2 → widgets}/stores/pipeline-middleware.test.ts +0 -0
  1094. /package/src/{widgets-v2 → widgets}/stores/pipeline-middleware.ts +0 -0
  1095. /package/src/{widgets-v2 → widgets}/stores/transforms.test.ts +0 -0
  1096. /package/src/{widgets-v2 → widgets}/stores/use-echart-instance.test.tsx +0 -0
  1097. /package/src/{widgets-v2 → widgets}/stores/use-echart-instance.ts +0 -0
  1098. /package/src/{widgets-v2 → widgets}/stores/use-transform-enabled.test.tsx +0 -0
  1099. /package/src/{widgets-v2 → widgets}/stores/use-transform-enabled.ts +0 -0
  1100. /package/src/{widgets-v2 → widgets}/stores/use-transform.test.tsx +0 -0
  1101. /package/src/{widgets-v2 → widgets}/stores/widget-context.test.tsx +0 -0
  1102. /package/src/{widgets-v2 → widgets}/stores/widget-context.ts +0 -0
  1103. /package/src/{widgets-v2 → widgets}/stores/widget-store-registry.test.ts +0 -0
  1104. /package/src/{widgets-v2 → widgets}/table/download.test.ts +0 -0
  1105. /package/src/{widgets-v2 → widgets}/table/download.ts +0 -0
  1106. /package/src/{widgets-v2 → widgets}/table/labels.tsx +0 -0
  1107. /package/src/{widgets-v2 → widgets}/table/skeleton.test.tsx +0 -0
  1108. /package/src/{widgets-v2 → widgets}/table/table-ui.test.tsx +0 -0
  1109. /package/src/{widgets-v2 → widgets}/table/table.test.tsx +0 -0
  1110. /package/src/{widgets-v2 → widgets}/table/table.tsx +0 -0
  1111. /package/src/{widgets-v2 → widgets}/table/transforms.test.ts +0 -0
  1112. /package/src/{widgets-v2 → widgets}/table/transforms.ts +0 -0
  1113. /package/src/{widgets-v2 → widgets}/timeseries/download.test.ts +0 -0
  1114. /package/src/{widgets-v2 → widgets}/timeseries/download.ts +0 -0
  1115. /package/src/{widgets-v2 → widgets}/timeseries/options.test.ts +0 -0
  1116. /package/src/{widgets-v2 → widgets}/timeseries/skeleton.test.tsx +0 -0
  1117. /package/src/{widgets-v2 → widgets}/timeseries/transforms.test.ts +0 -0
  1118. /package/src/{widgets-v2 → widgets}/timeseries/transforms.ts +0 -0
  1119. /package/src/{widgets-v2 → widgets}/toolbox/labels.ts +0 -0
  1120. /package/src/{widgets-v2 → widgets}/toolbox/style.ts +0 -0
  1121. /package/src/{widgets-v2 → widgets}/toolbox/toolbox.test.tsx +0 -0
  1122. /package/src/{widgets-v2 → widgets}/toolbox/toolbox.tsx +0 -0
  1123. /package/src/{widgets-v2 → widgets}/utils/data-zoom-layout.ts +0 -0
  1124. /package/src/{widgets-v2 → widgets}/utils/merge-options.test.ts +0 -0
  1125. /package/src/{widgets-v2 → widgets}/utils/merge-options.ts +0 -0
  1126. /package/src/widgets/utils/{chart-config/option-builders.test.ts → option-builders.test.ts} +0 -0
  1127. /package/src/widgets/utils/{chart-config/option-builders.ts → option-builders.ts} +0 -0
  1128. /package/src/{widgets-v2 → widgets}/utils/resolve-theme-color.test.ts +0 -0
  1129. /package/src/{widgets-v2 → widgets}/utils/resolve-theme-color.ts +0 -0
  1130. /package/src/{widgets-v2 → widgets}/wrapper/labels.ts +0 -0
  1131. /package/src/{widgets-v2 → widgets}/wrapper/style.ts +0 -0
  1132. /package/src/{widgets-v2 → widgets}/wrapper/widget-actions.test.tsx +0 -0
  1133. /package/src/{widgets-v2 → widgets}/wrapper/widget-actions.tsx +0 -0
  1134. /package/src/{widgets-v2 → widgets}/wrapper/widget-content.test.tsx +0 -0
  1135. /package/src/{widgets-v2 → widgets}/wrapper/widget-content.tsx +0 -0
  1136. /package/src/{widgets-v2 → widgets}/wrapper/widget-wrapper.test.tsx +0 -0
@@ -1,229 +0,0 @@
1
- import { useEffect } from 'react'
2
- import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
3
- import { act, render } from '@testing-library/react'
4
- import type * as echarts from 'echarts'
5
- import { Provider } from '../provider/widget-provider'
6
- import { Echart } from './echart'
7
- import type { OptionFactory } from './echart'
8
- import {
9
- clearAllWidgetStores,
10
- getEchartInstance,
11
- getWidgetStore,
12
- } from '../stores'
13
-
14
- // Capture the option that EchartUI receives, since we don't render real ECharts in tests.
15
- const captured: {
16
- option: echarts.EChartsOption | null
17
- replaceMerge: readonly string[] | null
18
- setOptions: number
19
- } = {
20
- option: null,
21
- replaceMerge: null,
22
- setOptions: 0,
23
- }
24
-
25
- vi.mock('./echart-ui', () => ({
26
- EchartUI: ({
27
- option,
28
- replaceMerge,
29
- onInstance,
30
- }: {
31
- option: echarts.EChartsOption
32
- replaceMerge: readonly string[]
33
- onInstance?: (chart: echarts.ECharts | null) => void
34
- }) => {
35
- captured.option = option
36
- captured.replaceMerge = replaceMerge
37
- captured.setOptions++
38
- // Mimic the real bridge: publish a fake instance on mount, clear on
39
- // unmount. Cast through unknown so the test doesn't depend on the full
40
- // ECharts surface.
41
- useEffect(() => {
42
- const fake = { __mock: true } as unknown as echarts.ECharts
43
- onInstance?.(fake)
44
- return () => onInstance?.(null)
45
- }, [onInstance])
46
- return null
47
- },
48
- DEFAULT_INIT_OPTS: { renderer: 'svg' },
49
- }))
50
-
51
- beforeEach(() => {
52
- clearAllWidgetStores()
53
- captured.option = null
54
- captured.replaceMerge = null
55
- captured.setOptions = 0
56
- })
57
- afterEach(() => clearAllWidgetStores())
58
-
59
- // Helper: build an OptionFactory whose structural branch returns `structural`
60
- // and whose merge branch passes the post-config-transforms option through
61
- // `mergeData(option, data, ctx)`.
62
- const makeFactory = (
63
- structural: echarts.EChartsOption,
64
- mergeData: (
65
- option: echarts.EChartsOption,
66
- data: unknown,
67
- ) => echarts.EChartsOption,
68
- ): OptionFactory => {
69
- return (option, data) => {
70
- if (option == null) return structural
71
- return mergeData(option, data)
72
- }
73
- }
74
-
75
- describe('<Echart> bridge — owns the option factory directly', () => {
76
- it('forwards the structural option to EchartUI synchronously on first render', () => {
77
- const factory = makeFactory(
78
- { xAxis: { type: 'category' } } as echarts.EChartsOption,
79
- // Merge branch: return the option as-is so the structural option
80
- // flows through to ECharts unchanged.
81
- (option) => option,
82
- )
83
- render(
84
- <Provider id='e1' data={[]}>
85
- <Echart optionFactory={factory} />
86
- </Provider>,
87
- )
88
- expect(captured.option).toEqual({ xAxis: { type: 'category' } })
89
- // No `rawOptions` on the store — the option pipeline is Echart-local now.
90
- expect(
91
- (getWidgetStore('e1').getState() as unknown as { rawOptions?: unknown })
92
- .rawOptions,
93
- ).toBeUndefined()
94
- })
95
-
96
- it('fuses state.data into the option via the factory merge branch (dataset)', () => {
97
- const factory = makeFactory(
98
- { xAxis: { type: 'category' } } as echarts.EChartsOption,
99
- (option, data) =>
100
- ({
101
- ...option,
102
- dataset: Array.isArray(data)
103
- ? (data as { name: string; value: number }[][]).map((source) => ({
104
- source,
105
- }))
106
- : [],
107
- }) as echarts.EChartsOption,
108
- )
109
- render(
110
- <Provider id='e2' data={[[{ name: 'A', value: 1 }]]}>
111
- <Echart optionFactory={factory} />
112
- </Provider>,
113
- )
114
- const captured2 = captured.option as { dataset: { source: unknown }[] }
115
- expect(captured2.dataset).toHaveLength(1)
116
- expect(captured2.dataset[0]?.source).toEqual([{ name: 'A', value: 1 }])
117
- })
118
-
119
- it('updates the option when a data transform changes state.data (no re-init)', () => {
120
- interface Row {
121
- name: string
122
- value: number
123
- }
124
- const factory = makeFactory(
125
- { xAxis: { type: 'category' } } as echarts.EChartsOption,
126
- (option, data) =>
127
- ({
128
- ...option,
129
- // Mark each dataset with the record count so changes are observable.
130
- dataset: Array.isArray(data)
131
- ? (data as Row[][]).map((s) => ({
132
- source: s,
133
- id: `len:${s.length}`,
134
- }))
135
- : [],
136
- }) as echarts.EChartsOption,
137
- )
138
- render(
139
- <Provider
140
- id='e3'
141
- data={[
142
- [
143
- { name: 'A', value: 1 },
144
- { name: 'B', value: 2 },
145
- { name: 'C', value: 3 },
146
- ],
147
- ]}
148
- >
149
- <Echart optionFactory={factory} />
150
- </Provider>,
151
- )
152
-
153
- // Before transform: 3 records.
154
- let dataset = (captured.option as { dataset: { id: string }[] }).dataset
155
- expect(dataset[0]?.id).toBe('len:3')
156
-
157
- // Register a data transform that filters out half the records.
158
- act(() => {
159
- getWidgetStore('e3').setState({
160
- dataTransforms: [
161
- {
162
- id: 'cut',
163
- type: 'data',
164
- order: 1,
165
- enabled: true,
166
- fn: (input) => {
167
- const arr = input as { name: string; value: number }[][]
168
- return arr.map((s) => s.slice(0, 1))
169
- },
170
- },
171
- ],
172
- })
173
- })
174
-
175
- // Bridge should have re-rendered with post-pipeline data: 1 record.
176
- dataset = (captured.option as { dataset: { id: string }[] }).dataset
177
- expect(dataset[0]?.id).toBe('len:1')
178
- })
179
-
180
- it('applies configTransforms to the rendered option and forwards replaceMerge', () => {
181
- const factory = makeFactory(
182
- { xAxis: { type: 'category' } } as echarts.EChartsOption,
183
- (option) => option,
184
- )
185
- render(
186
- <Provider id='e-cfg' data={[]}>
187
- <Echart optionFactory={factory} />
188
- </Provider>,
189
- )
190
-
191
- // Before transform: untouched structural; replaceMerge is the default.
192
- expect(captured.option).toEqual({ xAxis: { type: 'category' } })
193
- expect(captured.replaceMerge).toEqual(['toolbox'])
194
-
195
- // Register a config transform that stamps a field onto the option and
196
- // contributes a `replaceMergeKeys` entry.
197
- act(() => {
198
- getWidgetStore('e-cfg').setState({
199
- configTransforms: [
200
- {
201
- id: 'stamp',
202
- type: 'config',
203
- order: 1,
204
- enabled: true,
205
- replaceMergeKeys: ['stamp'],
206
- fn: (o) => ({ ...(o as object), stamp: true }),
207
- },
208
- ],
209
- })
210
- })
211
-
212
- // After transform: option carries the mutation, replaceMerge is
213
- // deduped+sorted with the default and the transform's keys.
214
- expect((captured.option as { stamp?: boolean }).stamp).toBe(true)
215
- expect(captured.replaceMerge).toEqual(['stamp', 'toolbox'])
216
- })
217
-
218
- it('publishes the live ECharts instance to the per-id registry on mount and clears on unmount', () => {
219
- const factory = makeFactory({} as echarts.EChartsOption, (option) => option)
220
- const { unmount } = render(
221
- <Provider id='e-instance' data={[]}>
222
- <Echart optionFactory={factory} />
223
- </Provider>,
224
- )
225
- expect(getEchartInstance('e-instance')).not.toBeNull()
226
- unmount()
227
- expect(getEchartInstance('e-instance')).toBeNull()
228
- })
229
- })
@@ -1,209 +0,0 @@
1
- import { useCallback, useMemo } from 'react'
2
- import type { SxProps, Theme } from '@mui/material'
3
- import type * as echarts from 'echarts'
4
- import {
5
- applyTransforms,
6
- setEchartInstance,
7
- useWidgetId,
8
- useWidgetShallow,
9
- type Transform,
10
- } from '../stores'
11
- import { EchartUI, type EchartsEventHandler } from './echart-ui'
12
-
13
- /**
14
- * Default ECharts `replaceMerge` keys for every widget. `dataZoom` and
15
- * `brush` are omitted so ZoomToggle / BrushToggle's user-driven runtime
16
- * state (slider range, brushed areas in `multiple` mode) survives unrelated
17
- * re-renders. `series` and `dataset` are also omitted: EchartUI fingerprints
18
- * them per-render and adds them to `replaceMerge` only when their shape
19
- * actually changes, keeping ECharts' per-series runtime state alive when
20
- * only callback-style fields differ.
21
- *
22
- * Lives in this module (not the generic store) because it's an ECharts
23
- * concept. Module-private — callers should not need it.
24
- */
25
- const DEFAULT_REPLACE_MERGE: readonly string[] = ['toolbox']
26
-
27
- /**
28
- * Reactive context passed to every {@link OptionFactory} call so the
29
- * factory can rebuild render-time pieces (axis label / tooltip formatters)
30
- * from the live store. Drives RelativeData / consumer-formatter changes
31
- * through to the chart without rebuilding the structural option.
32
- */
33
- export interface OptionFactoryContext {
34
- formatter?: (value: number) => string
35
- labelFormatter?: (value: string | number) => string | number
36
- }
37
-
38
- /**
39
- * The per-widget option factory — a single callable that owns BOTH phases
40
- * of option construction:
41
- *
42
- * - **Structural phase** — when `option == null`, return the theme-aware
43
- * structural option (tooltip / legend / color palette / series
44
- * template, optionally merged with a consumer-supplied `optionsOverride`).
45
- * No data is read. `<Widget.Echart>` calls the factory with
46
- * `(undefined, undefined)` synchronously during render to derive the
47
- * structural base; `configTransforms` (Stack/Zoom/Brush) then mutate it
48
- * in the same render pass.
49
- * - **Merge phase** — when `option` is defined, fuse `data` into the
50
- * post-configTransforms option at fusion time. `<Widget.Echart>` calls
51
- * the factory with `(transformed, data, ctx)` on every render.
52
- *
53
- * The two phases share a closure (the factory creator captures `theme`,
54
- * `formatter`, `labelFormatter`, `seriesNames`, `selection`, `optionsOverride`,
55
- * …), so structural and merge agree on the same widget configuration.
56
- *
57
- * The third arg `ctx` carries the **live** store-side formatters at the
58
- * call site — distinct from the closure-time formatters because actions
59
- * like RelativeData can install a percent formatter on the store after
60
- * the factory was constructed. The merge phase reads from `ctx`; the
61
- * structural phase typically uses the closure-time values.
62
- */
63
- export type OptionFactory = (
64
- option: echarts.EChartsOption | undefined,
65
- data: unknown,
66
- ctx?: OptionFactoryContext,
67
- ) => echarts.EChartsOption
68
-
69
- export interface EchartProps {
70
- /**
71
- * The per-widget {@link OptionFactory}. Required — `<Widget.Echart>`
72
- * derives the structural option from it (so configTransforms have a base
73
- * to mutate) and fuses `state.data` into the post-pipeline option at
74
- * render time. Wrap the factory creator in `useMemo` so its identity is
75
- * stable across renders.
76
- */
77
- optionFactory: OptionFactory
78
- onEvents?: Record<string, EchartsEventHandler>
79
- init?: echarts.EChartsInitOpts
80
- className?: string
81
- /**
82
- * Styles for the chart container — this is where its height comes from.
83
- * `min-height` defaults to the card height (304px) and `flex: 1` lets the
84
- * chart fill a taller parent; override either here, e.g.
85
- * `sx={{ minHeight: 400 }}` for a taller card.
86
- */
87
- sx?: SxProps<Theme>
88
- }
89
-
90
- interface EchartSlice {
91
- data: unknown
92
- configTransforms: readonly Transform[]
93
- formatter?: (value: number) => string
94
- labelFormatter?: (value: string | number) => string | number
95
- }
96
-
97
- const echartSelector = (s: {
98
- data: unknown
99
- configTransforms: readonly Transform[]
100
- formatter?: (value: number) => string
101
- labelFormatter?: (value: string | number) => string | number
102
- }): EchartSlice => ({
103
- data: s.data,
104
- configTransforms: s.configTransforms,
105
- formatter: s.formatter,
106
- labelFormatter: s.labelFormatter,
107
- })
108
-
109
- /**
110
- * Stateful Echart bridge — owns the entire ECharts coupling. The whole
111
- * option pipeline lives here, not in the store:
112
- *
113
- * 1. **Structural** — `optionFactory(undefined, undefined)` produces the
114
- * theme-aware base. Memoized on the factory identity, so the consumer's
115
- * `useMemo` ID gates the rebuild.
116
- * 2. **Transformed** — `applyTransforms(structural, configTransforms)`
117
- * applies any registered configTransforms (Stack/Zoom/Brush) over the
118
- * structural base. Memoized on `[structural, configTransforms]`.
119
- * 3. **`replaceMerge`** — derived from the enabled configTransforms'
120
- * `replaceMergeKeys`, deduped and sorted, seeded with
121
- * {@link DEFAULT_REPLACE_MERGE}. Memoized on `[configTransforms]` so
122
- * ECharts sees a stable array reference across non-transform changes.
123
- * 4. **Merge** — `optionFactory(transformed, data, ctx)` fuses post-
124
- * pipeline data into the option. Reactive `ctx` carries the live store
125
- * formatters so RelativeData's percent formatter flows through without
126
- * a structural rebuild.
127
- *
128
- * The `<Widget.Provider>` doesn't know about the factory at all: it stays
129
- * a renderer-agnostic shell. The `ProviderProps` surface has no ECharts
130
- * coupling, so non-Echart widgets don't transitively import the type.
131
- */
132
- export function Echart({
133
- optionFactory,
134
- onEvents,
135
- init,
136
- className,
137
- sx,
138
- }: EchartProps) {
139
- const id = useWidgetId()
140
- const slice = useWidgetShallow(id, echartSelector)
141
-
142
- // Publish the live ECharts instance to the per-id registry so actions
143
- // (e.g. `ZoomToggle`'s disable handler) can reach it imperatively. The
144
- // callback identity is stable across renders (only `id` is in deps), so
145
- // EchartUI's init effect doesn't see a fresh `onInstance` and re-init.
146
- const onInstance = useCallback(
147
- (chart: echarts.ECharts | null) => setEchartInstance(id, chart),
148
- [id],
149
- )
150
-
151
- // Destructure so React Compiler sees specific deps instead of inferring
152
- // the whole `slice` object. `useWidgetShallow` already shallow-compares
153
- // the slice, so per-field deps drive each memo exactly when its inputs
154
- // change.
155
- const {
156
- data: sliceData,
157
- configTransforms,
158
- formatter: sliceFormatter,
159
- labelFormatter: sliceLabelFormatter,
160
- } = slice
161
-
162
- const structural = useMemo(
163
- () => optionFactory(undefined, undefined),
164
- [optionFactory],
165
- )
166
-
167
- const transformed = useMemo(
168
- () =>
169
- applyTransforms(structural, configTransforms) as echarts.EChartsOption,
170
- [structural, configTransforms],
171
- )
172
-
173
- const replaceMerge = useMemo(() => {
174
- const keys = new Set<string>(DEFAULT_REPLACE_MERGE)
175
- for (const xf of configTransforms) {
176
- if (xf.enabled && xf.replaceMergeKeys?.length) {
177
- for (const k of xf.replaceMergeKeys) keys.add(k)
178
- }
179
- }
180
- return Array.from(keys).sort()
181
- }, [configTransforms])
182
-
183
- const option = useMemo(
184
- () =>
185
- optionFactory(transformed, sliceData, {
186
- formatter: sliceFormatter,
187
- labelFormatter: sliceLabelFormatter,
188
- }),
189
- [
190
- optionFactory,
191
- transformed,
192
- sliceData,
193
- sliceFormatter,
194
- sliceLabelFormatter,
195
- ],
196
- )
197
-
198
- return (
199
- <EchartUI
200
- option={option}
201
- replaceMerge={replaceMerge}
202
- onEvents={onEvents}
203
- init={init}
204
- onInstance={onInstance}
205
- className={className}
206
- sx={sx}
207
- />
208
- )
209
- }
@@ -1,22 +0,0 @@
1
- export {
2
- EchartUI,
3
- DEFAULT_INIT_OPTS,
4
- type EchartUIProps,
5
- type EchartsEventHandler,
6
- } from './echart-ui'
7
- export {
8
- Echart,
9
- type EchartProps,
10
- type OptionFactory,
11
- type OptionFactoryContext,
12
- } from './echart'
13
- export {
14
- useChartSelection,
15
- type SelectionKey,
16
- type UseChartSelectionOptions,
17
- type ChartSelectionWiring,
18
- } from './use-chart-selection'
19
- export {
20
- observeResize,
21
- __resetSharedResizeObserver,
22
- } from './shared-resize-observer'
@@ -1,56 +0,0 @@
1
- type ResizeCallback = () => void
2
-
3
- const callbacks = new Map<Element, ResizeCallback>()
4
- let observer: ResizeObserver | null = null
5
-
6
- /**
7
- * Returns the singleton ResizeObserver, lazily constructing it on first use.
8
- * Returns `null` when `ResizeObserver` is not available in the global scope
9
- * (SSR, very old browsers, or tests that intentionally remove it).
10
- */
11
- function getObserver(): ResizeObserver | null {
12
- if (typeof ResizeObserver === 'undefined') return null
13
- observer ??= new ResizeObserver((entries) => {
14
- for (const entry of entries) {
15
- const callback = callbacks.get(entry.target)
16
- callback?.()
17
- }
18
- })
19
- return observer
20
- }
21
-
22
- const NOOP_CLEANUP = (): void => undefined
23
-
24
- export function observeResize(
25
- element: Element,
26
- callback: ResizeCallback,
27
- ): () => void {
28
- const ro = getObserver()
29
- // Gracefully degrade when no ResizeObserver is available — consumers
30
- // still see one initial measure() pass via their own effect; we just
31
- // skip the subsequent resize-driven re-measures.
32
- if (!ro) return NOOP_CLEANUP
33
- callbacks.set(element, callback)
34
- ro.observe(element)
35
- return () => {
36
- callbacks.delete(element)
37
- if (observer) {
38
- observer.unobserve(element)
39
- // Disconnect the singleton once the last subscriber leaves so the
40
- // observer doesn't outlive its consumers in SSR teardown / micro-
41
- // frontend unmount scenarios. A subsequent observeResize() will
42
- // lazily re-create it via getObserver().
43
- if (callbacks.size === 0) {
44
- observer.disconnect()
45
- observer = null
46
- }
47
- }
48
- }
49
- }
50
-
51
- /** @internal — for tests only. */
52
- export function __resetSharedResizeObserver(): void {
53
- if (observer) observer.disconnect()
54
- callbacks.clear()
55
- observer = null
56
- }
@@ -1,91 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { render, screen } from '@testing-library/react'
3
- import { FormulaUI } from './formula-ui'
4
-
5
- describe('<FormulaUI>', () => {
6
- it('renders a single KPI value', () => {
7
- render(<FormulaUI items={[{ value: 1234 }]} />)
8
- expect(screen.getByText('1234')).toBeTruthy()
9
- })
10
-
11
- it('applies a formatter to the value', () => {
12
- render(
13
- <FormulaUI
14
- items={[{ value: 1234 }]}
15
- formatter={(n) => `$${n.toLocaleString('en-US')}`}
16
- />,
17
- )
18
- expect(screen.getByText('$1,234')).toBeTruthy()
19
- })
20
-
21
- it('renders prefix and suffix when provided', () => {
22
- render(<FormulaUI items={[{ value: 99, prefix: 'USD', suffix: '/mo' }]} />)
23
- expect(screen.getByText('USD')).toBeTruthy()
24
- expect(screen.getByText('99')).toBeTruthy()
25
- expect(screen.getByText('/mo')).toBeTruthy()
26
- })
27
-
28
- it('renders multiple items side-by-side', () => {
29
- render(
30
- <FormulaUI
31
- items={[
32
- { value: 100, suffix: 'rev' },
33
- { value: 25, suffix: 'cogs' },
34
- { value: 75, suffix: 'gp' },
35
- ]}
36
- />,
37
- )
38
- expect(screen.getByText('100')).toBeTruthy()
39
- expect(screen.getByText('25')).toBeTruthy()
40
- expect(screen.getByText('75')).toBeTruthy()
41
- })
42
-
43
- it('renders nothing visible when items is empty', () => {
44
- const { container } = render(<FormulaUI items={[]} />)
45
- // Root <Box> exists, but it has no item children.
46
- expect(container.querySelectorAll('[role]').length).toBe(0)
47
- })
48
-
49
- it('renders a series avatar with the first letter of the name', () => {
50
- render(
51
- <FormulaUI
52
- items={[{ value: 1, series: { name: 'Revenue', color: '#1E5BB5' } }]}
53
- />,
54
- )
55
- expect(screen.getByLabelText('Revenue').textContent).toBe('R')
56
- })
57
-
58
- it('renders the note when provided', () => {
59
- render(<FormulaUI items={[{ value: 1, note: 'Last 7 days' }]} />)
60
- expect(screen.getByText('Last 7 days')).toBeTruthy()
61
- })
62
-
63
- it('renders a delta chip with severity-based styling', () => {
64
- const { container } = render(
65
- <FormulaUI items={[{ value: 1, delta: { value: -0.123 } }]} />,
66
- )
67
- // MUI's `severity='error'` → `MuiChip-colorError` class.
68
- expect(container.querySelector('.MuiChip-colorError')).toBeTruthy()
69
- })
70
-
71
- it('uses the explicit delta label when provided', () => {
72
- render(
73
- <FormulaUI
74
- items={[
75
- {
76
- value: 1,
77
- delta: { value: 0.05, label: 'better than yesterday' },
78
- },
79
- ]}
80
- />,
81
- )
82
- expect(screen.getByText('better than yesterday')).toBeTruthy()
83
- })
84
-
85
- it('omits avatar / note / delta when fields are absent', () => {
86
- const { container } = render(<FormulaUI items={[{ value: 42 }]} />)
87
- expect(container.querySelector('[role="img"]')).toBeNull()
88
- expect(container.querySelector('.MuiChip-root')).toBeNull()
89
- expect(container.querySelector('p')).toBeNull()
90
- })
91
- })
@@ -1,66 +0,0 @@
1
- import { Box } from '@mui/material'
2
- import type { Ref } from 'react'
3
- import type { FormulaDataItem } from './types'
4
- import { Delta } from './delta'
5
- import { Note } from './note'
6
- import { Prefix } from './prefix'
7
- import { Series } from './series'
8
- import { Suffix } from './suffix'
9
- import { Value } from './value'
10
- import { styles } from './style'
11
-
12
- export interface FormulaUIProps {
13
- items: readonly FormulaDataItem[]
14
- /** Number formatter — applied to each item's `value`. */
15
- formatter?: (value: number) => string
16
- /** Forwarded to the root `<Box>` so consumers can capture the DOM (PNG export). */
17
- ref?: Ref<HTMLDivElement>
18
- }
19
-
20
- /**
21
- * Pure presentational component for the Formula widget. Each item renders as
22
- * a row containing (in order): optional `Series` avatar, a body with
23
- * `[prefix] value [suffix]` plus optional `Note`, and an optional `Delta`
24
- * chip pushed to the right edge.
25
- *
26
- * For fully custom layouts, compose {@link Series}, {@link Prefix},
27
- * {@link Value}, {@link Suffix}, {@link Note}, and {@link Delta} directly
28
- * instead of passing `items`.
29
- */
30
- export function FormulaUI({ items, formatter, ref }: FormulaUIProps) {
31
- return (
32
- <Box ref={ref} sx={styles.root}>
33
- {items.map((item, i) => (
34
- // Series name is the closest stable id; fall back to the literal
35
- // value (numeric KPIs rarely repeat with the same prefix/suffix).
36
- <Box
37
- key={`formula-${item.series?.name ?? `${item.prefix ?? ''}${item.value}${item.suffix ?? ''}`}-${i}`}
38
- sx={styles.row}
39
- >
40
- {item.series ? (
41
- <Series name={item.series.name} color={item.series.color} />
42
- ) : null}
43
- <Box sx={styles.body}>
44
- <Box sx={styles.valueRow}>
45
- {item.prefix ? <Prefix>{item.prefix}</Prefix> : null}
46
- <Value color={item.color}>
47
- {formatter ? formatter(item.value) : String(item.value)}
48
- </Value>
49
- {item.suffix ? <Suffix>{item.suffix}</Suffix> : null}
50
- </Box>
51
- {item.note ? <Note>{item.note}</Note> : null}
52
- </Box>
53
- {item.delta ? (
54
- <Box sx={styles.delta}>
55
- <Delta
56
- value={item.delta.value}
57
- label={item.delta.label}
58
- severity={item.delta.severity}
59
- />
60
- </Box>
61
- ) : null}
62
- </Box>
63
- ))}
64
- </Box>
65
- )
66
- }
@@ -1,17 +0,0 @@
1
- export { Formula } from './formula'
2
- export { FormulaUI, type FormulaUIProps } from './formula-ui'
3
- export { Prefix, type PrefixProps } from './prefix'
4
- export { Suffix, type SuffixProps } from './suffix'
5
- export { Value, type ValueProps } from './value'
6
- export { Series, type SeriesProps } from './series'
7
- export { Note, type NoteProps } from './note'
8
- export { Delta, type DeltaProps } from './delta'
9
- export { FormulaSkeleton, type FormulaSkeletonProps } from './skeleton'
10
- export { createFormulaDownloadConfig } from './download'
11
- export type {
12
- FormulaDataItem,
13
- FormulaWidgetData,
14
- FormulaSeries,
15
- FormulaDelta,
16
- DeltaSeverity,
17
- } from './types'