@carto/ps-react-ui 4.19.0 → 4.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/dist/actions-DKX98LlI.js +1318 -0
  2. package/dist/actions-DKX98LlI.js.map +1 -0
  3. package/dist/actions-Dy9JVr7F.js +1004 -0
  4. package/dist/actions-Dy9JVr7F.js.map +1 -0
  5. package/dist/category-DHZscHaS.js +826 -0
  6. package/dist/category-DHZscHaS.js.map +1 -0
  7. package/dist/chart-config-BGt7wkK7.js +108 -0
  8. package/dist/chart-config-BGt7wkK7.js.map +1 -0
  9. package/dist/chat.js +1589 -1711
  10. package/dist/chat.js.map +1 -1
  11. package/dist/cjs-CBrZjPCj.js +75 -0
  12. package/dist/cjs-CBrZjPCj.js.map +1 -0
  13. package/dist/components-DDt4mOQn.js +2403 -0
  14. package/dist/components-DDt4mOQn.js.map +1 -0
  15. package/dist/components.js +5 -1841
  16. package/dist/copy-button-DaQqWVu0.js +25 -0
  17. package/dist/copy-button-DaQqWVu0.js.map +1 -0
  18. package/dist/csv-modifiers-D6HGC24b.js +26 -0
  19. package/dist/csv-modifiers-D6HGC24b.js.map +1 -0
  20. package/dist/download-BT6qBamM.js +232 -0
  21. package/dist/download-BT6qBamM.js.map +1 -0
  22. package/dist/echart-BkaV3V5G.js +133 -0
  23. package/dist/echart-BkaV3V5G.js.map +1 -0
  24. package/dist/echart-DSz2Tu0z.js +250 -0
  25. package/dist/echart-DSz2Tu0z.js.map +1 -0
  26. package/dist/formatter-wVO81tYk.js +6 -0
  27. package/dist/formatter-wVO81tYk.js.map +1 -0
  28. package/dist/formula-Bk9CBzm2.js +190 -0
  29. package/dist/formula-Bk9CBzm2.js.map +1 -0
  30. package/dist/formula-Dsru_p-g.js +285 -0
  31. package/dist/formula-Dsru_p-g.js.map +1 -0
  32. package/dist/hooks-zf5gKZYq.js +22 -0
  33. package/dist/hooks-zf5gKZYq.js.map +1 -0
  34. package/dist/legend/stores.js +2 -24
  35. package/dist/legend.js +2274 -2323
  36. package/dist/legend.js.map +1 -1
  37. package/dist/markdown-DnSJMPjQ.js +165 -0
  38. package/dist/markdown-DnSJMPjQ.js.map +1 -0
  39. package/dist/markdown-content-BzKoX3eu.js +8764 -0
  40. package/dist/markdown-content-BzKoX3eu.js.map +1 -0
  41. package/dist/range-BPWVrAsY.js +277 -0
  42. package/dist/range-BPWVrAsY.js.map +1 -0
  43. package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
  44. package/dist/row-CvVGBuy_.js +35 -0
  45. package/dist/row-CvVGBuy_.js.map +1 -0
  46. package/dist/shared-resize-observer-BEiP2rQt.js +157 -0
  47. package/dist/shared-resize-observer-BEiP2rQt.js.map +1 -0
  48. package/dist/smart-tooltip-CwGHCqab.js +34 -0
  49. package/dist/smart-tooltip-CwGHCqab.js.map +1 -0
  50. package/dist/spread-Dy8pshpN.js +149 -0
  51. package/dist/spread-Dy8pshpN.js.map +1 -0
  52. package/dist/stores-B81-IU1G.js +374 -0
  53. package/dist/stores-B81-IU1G.js.map +1 -0
  54. package/dist/stores-BVFMfgyo.js +248 -0
  55. package/dist/stores-BVFMfgyo.js.map +1 -0
  56. package/dist/styles-Y-qGBELO.js +13 -0
  57. package/dist/styles-Y-qGBELO.js.map +1 -0
  58. package/dist/table-BfTG6rrs.js +439 -0
  59. package/dist/table-BfTG6rrs.js.map +1 -0
  60. package/dist/tooltip-DJUGNZxY.js +23 -0
  61. package/dist/tooltip-DJUGNZxY.js.map +1 -0
  62. package/dist/types/chat/bubbles/chat-agent-message-markdown.d.ts +1 -1
  63. package/dist/types/chat/bubbles/chat-error-message.d.ts +1 -1
  64. package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +1 -1
  65. package/dist/types/chat/bubbles/chat-user-message.d.ts +1 -1
  66. package/dist/types/chat/containers/chat-footer.d.ts +1 -1
  67. package/dist/types/chat/containers/chat-header.d.ts +1 -1
  68. package/dist/types/chat/containers/chat-starter.d.ts +1 -1
  69. package/dist/types/chat/feedback/chat-loader.d.ts +1 -1
  70. package/dist/types/chat/feedback/chat-rating-action.d.ts +1 -1
  71. package/dist/types/chat/feedback/chat-thinking.d.ts +1 -1
  72. package/dist/types/chat/feedback/chat-tool-code-area.d.ts +1 -1
  73. package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +1 -1
  74. package/dist/types/chat/feedback/chat-tool-group.d.ts +1 -1
  75. package/dist/types/chat/feedback/chat-tool-trace.d.ts +2 -2
  76. package/dist/types/components/basemaps/group-wrapper.d.ts +1 -1
  77. package/dist/types/components/basemaps/group.d.ts +1 -1
  78. package/dist/types/components/basemaps/header.d.ts +1 -1
  79. package/dist/types/components/copy-button/copy-button.d.ts +1 -1
  80. package/dist/types/components/lasso-tool/chip.d.ts +1 -1
  81. package/dist/types/components/lasso-tool/icons.d.ts +7 -7
  82. package/dist/types/components/lasso-tool/lasso-tool.d.ts +4 -4
  83. package/dist/types/components/lasso-tool/message.d.ts +1 -1
  84. package/dist/types/components/list-data/list-data-skeleton.d.ts +1 -1
  85. package/dist/types/components/measurement-tools/icons.d.ts +3 -3
  86. package/dist/types/components/no-data-alert/no-data-alert.d.ts +1 -1
  87. package/dist/types/components/responsive-drawer/responsive-drawer.d.ts +1 -1
  88. package/dist/types/components/smart-tooltip/smart-tooltip.d.ts +1 -1
  89. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  90. package/dist/types/hooks/use-widget-ref.d.ts +2 -1
  91. package/dist/types/legend/components/legend-actions/legend-actions.d.ts +1 -1
  92. package/dist/types/legend/components/legend-category/legend-category-ui.d.ts +1 -1
  93. package/dist/types/legend/components/legend-config-select/legend-config-select.d.ts +1 -1
  94. package/dist/types/legend/components/legend-group/legend-group.d.ts +1 -1
  95. package/dist/types/legend/components/legend-group-menu/legend-group-menu-items.d.ts +4 -4
  96. package/dist/types/legend/components/legend-group-menu/legend-group-menu.d.ts +1 -1
  97. package/dist/types/legend/components/legend-icon/legend-icon-ui.d.ts +1 -1
  98. package/dist/types/legend/components/legend-item/legend-item-ui.d.ts +1 -1
  99. package/dist/types/legend/components/legend-item/legend-item.d.ts +1 -1
  100. package/dist/types/legend/components/legend-opacity/legend-opacity.d.ts +2 -2
  101. package/dist/types/legend/components/legend-overflow-menu/legend-overflow-menu.d.ts +1 -1
  102. package/dist/types/legend/components/legend-panel-menu/legend-panel-menu.d.ts +1 -1
  103. package/dist/types/legend/components/legend-proportion/legend-proportion-ui.d.ts +1 -1
  104. package/dist/types/legend/components/legend-ramp/legend-ramp-ui.d.ts +1 -1
  105. package/dist/types/legend/components/legend-row/legend-row.d.ts +1 -1
  106. package/dist/types/legend/components/legend-row-menu/legend-row-menu-items.d.ts +2 -2
  107. package/dist/types/legend/components/legend-row-menu/legend-row-menu.d.ts +1 -1
  108. package/dist/types/legend/components/legend-row-menu/legend-zoom-to.d.ts +1 -1
  109. package/dist/types/legend/components/legend-sortable/legend-sortable.d.ts +1 -1
  110. package/dist/types/legend/components/legend-swatch/legend-swatch.d.ts +1 -1
  111. package/dist/types/legend/components/legend-visibility-toggle/legend-visibility-toggle.d.ts +1 -1
  112. package/dist/types/legend/components/legend-visible-layers/legend-visible-layers.d.ts +1 -1
  113. package/dist/types/legend/index.d.ts +2 -2
  114. package/dist/types/legend/provider/legend-provider.d.ts +1 -1
  115. package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +1 -1
  116. package/dist/types/widgets/actions/change-column/change-column-icon.d.ts +1 -1
  117. package/dist/types/widgets/actions/change-column/change-column.d.ts +1 -1
  118. package/dist/types/widgets/actions/change-column/sortable-column-item.d.ts +1 -1
  119. package/dist/types/widgets/actions/download/download.d.ts +1 -1
  120. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +1 -1
  121. package/dist/types/widgets/actions/lock-selection/lock-selection.d.ts +1 -1
  122. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +1 -1
  123. package/dist/types/widgets/actions/searcher/searcher-toggle.d.ts +1 -1
  124. package/dist/types/widgets/actions/searcher/searcher.d.ts +1 -1
  125. package/dist/types/widgets/actions/stack-toggle/grouped-bar-chart-icon.d.ts +1 -1
  126. package/dist/types/widgets/actions/stack-toggle/stack-toggle.d.ts +1 -1
  127. package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +1 -1
  128. package/dist/types/widgets/bar/skeleton.d.ts +1 -1
  129. package/dist/types/widgets/category/category-ui.d.ts +1 -1
  130. package/dist/types/widgets/category/components/category-bar.d.ts +1 -1
  131. package/dist/types/widgets/category/components/category-legend.d.ts +1 -1
  132. package/dist/types/widgets/category/components/category-row-multi.d.ts +1 -1
  133. package/dist/types/widgets/category/components/category-row-other.d.ts +1 -1
  134. package/dist/types/widgets/category/components/category-row-single.d.ts +1 -1
  135. package/dist/types/widgets/category/skeleton.d.ts +1 -1
  136. package/dist/types/widgets/echart/echart-ui.d.ts +1 -1
  137. package/dist/types/widgets/echart/echart.d.ts +1 -1
  138. package/dist/types/widgets/error/error.d.ts +1 -1
  139. package/dist/types/widgets/formula/components/item.d.ts +1 -1
  140. package/dist/types/widgets/formula/components/prefix.d.ts +1 -1
  141. package/dist/types/widgets/formula/components/row.d.ts +1 -1
  142. package/dist/types/widgets/formula/components/series.d.ts +1 -1
  143. package/dist/types/widgets/formula/components/suffix.d.ts +1 -1
  144. package/dist/types/widgets/formula/components/value.d.ts +1 -1
  145. package/dist/types/widgets/formula/formula-ui.d.ts +1 -1
  146. package/dist/types/widgets/formula/skeleton.d.ts +1 -1
  147. package/dist/types/widgets/histogram/skeleton.d.ts +1 -1
  148. package/dist/types/widgets/markdown/markdown-ui.d.ts +1 -1
  149. package/dist/types/widgets/markdown/markdown.d.ts +1 -1
  150. package/dist/types/widgets/markdown/skeleton.d.ts +1 -1
  151. package/dist/types/widgets/no-data/no-data.d.ts +1 -1
  152. package/dist/types/widgets/note/note.d.ts +1 -1
  153. package/dist/types/widgets/pie/skeleton.d.ts +1 -1
  154. package/dist/types/widgets/range/components/range-item.d.ts +1 -1
  155. package/dist/types/widgets/range/range-ui.d.ts +1 -1
  156. package/dist/types/widgets/range/skeleton.d.ts +1 -1
  157. package/dist/types/widgets/scatterplot/skeleton.d.ts +1 -1
  158. package/dist/types/widgets/selection-summary/selection-summary.d.ts +1 -1
  159. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +1 -1
  160. package/dist/types/widgets/spread/components/max-value.d.ts +1 -1
  161. package/dist/types/widgets/spread/components/min-value.d.ts +1 -1
  162. package/dist/types/widgets/spread/components/separator.d.ts +1 -1
  163. package/dist/types/widgets/spread/skeleton.d.ts +1 -1
  164. package/dist/types/widgets/spread/spread-ui.d.ts +1 -1
  165. package/dist/types/widgets/subheader/subheader.d.ts +1 -1
  166. package/dist/types/widgets/table/components/cell-header.d.ts +1 -1
  167. package/dist/types/widgets/table/components/cell.d.ts +1 -1
  168. package/dist/types/widgets/table/components/pagination-actions.d.ts +1 -1
  169. package/dist/types/widgets/table/components/pagination.d.ts +1 -1
  170. package/dist/types/widgets/table/components/row.d.ts +1 -1
  171. package/dist/types/widgets/table/skeleton.d.ts +1 -1
  172. package/dist/types/widgets/table/table-ui.d.ts +2 -2
  173. package/dist/types/widgets/timeseries/skeleton.d.ts +1 -1
  174. package/dist/types/widgets/wrapper/components/actions.d.ts +1 -1
  175. package/dist/types/widgets/wrapper/components/options.d.ts +1 -1
  176. package/dist/types/widgets/wrapper/components/title.d.ts +1 -1
  177. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +1 -1
  178. package/dist/types/widgets/wrapper/wrapper.d.ts +1 -1
  179. package/dist/types/widgets-v2/actions/brush-toggle/brush-toggle.d.ts +1 -1
  180. package/dist/types/widgets-v2/actions/change-column/change-column-icon.d.ts +1 -1
  181. package/dist/types/widgets-v2/actions/change-column/change-column.d.ts +1 -1
  182. package/dist/types/widgets-v2/actions/change-column/sortable-column-item.d.ts +1 -1
  183. package/dist/types/widgets-v2/actions/download/download.d.ts +1 -1
  184. package/dist/types/widgets-v2/actions/download/icons.d.ts +3 -3
  185. package/dist/types/widgets-v2/actions/fullscreen/fullscreen.d.ts +2 -2
  186. package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +1 -1
  187. package/dist/types/widgets-v2/actions/relative-data/relative-data.d.ts +1 -1
  188. package/dist/types/widgets-v2/actions/searcher/searcher-toggle.d.ts +1 -1
  189. package/dist/types/widgets-v2/actions/searcher/searcher.d.ts +1 -1
  190. package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +1 -1
  191. package/dist/types/widgets-v2/actions/stack-toggle/stack-toggle.d.ts +1 -1
  192. package/dist/types/widgets-v2/actions/zoom-toggle/zoom-toggle.d.ts +1 -1
  193. package/dist/types/widgets-v2/bar/skeleton.d.ts +1 -1
  194. package/dist/types/widgets-v2/category/category-ui.d.ts +1 -1
  195. package/dist/types/widgets-v2/category/category.d.ts +1 -1
  196. package/dist/types/widgets-v2/category/components/category-bar-stacked.d.ts +1 -1
  197. package/dist/types/widgets-v2/category/components/category-bar.d.ts +1 -1
  198. package/dist/types/widgets-v2/category/components/category-legend.d.ts +1 -1
  199. package/dist/types/widgets-v2/category/components/category-row-multi.d.ts +1 -1
  200. package/dist/types/widgets-v2/category/components/category-row-other.d.ts +1 -1
  201. package/dist/types/widgets-v2/category/components/category-row-single.d.ts +1 -1
  202. package/dist/types/widgets-v2/category/components/category-row-stacked.d.ts +1 -1
  203. package/dist/types/widgets-v2/category/skeleton.d.ts +1 -1
  204. package/dist/types/widgets-v2/echart/echart-ui.d.ts +1 -1
  205. package/dist/types/widgets-v2/echart/echart.d.ts +1 -1
  206. package/dist/types/widgets-v2/formula/delta.d.ts +1 -1
  207. package/dist/types/widgets-v2/formula/formula-ui.d.ts +1 -1
  208. package/dist/types/widgets-v2/formula/formula.d.ts +1 -1
  209. package/dist/types/widgets-v2/formula/note.d.ts +1 -1
  210. package/dist/types/widgets-v2/formula/prefix.d.ts +1 -1
  211. package/dist/types/widgets-v2/formula/series.d.ts +1 -1
  212. package/dist/types/widgets-v2/formula/skeleton.d.ts +1 -1
  213. package/dist/types/widgets-v2/formula/suffix.d.ts +1 -1
  214. package/dist/types/widgets-v2/formula/value.d.ts +1 -1
  215. package/dist/types/widgets-v2/histogram/skeleton.d.ts +1 -1
  216. package/dist/types/widgets-v2/index.d.ts +5 -5
  217. package/dist/types/widgets-v2/markdown/markdown-content.d.ts +1 -1
  218. package/dist/types/widgets-v2/markdown/markdown-ui.d.ts +1 -1
  219. package/dist/types/widgets-v2/markdown/markdown.d.ts +1 -1
  220. package/dist/types/widgets-v2/markdown/skeleton.d.ts +1 -1
  221. package/dist/types/widgets-v2/note/widget-note.d.ts +2 -2
  222. package/dist/types/widgets-v2/pie/skeleton.d.ts +1 -1
  223. package/dist/types/widgets-v2/provider/widget-provider.d.ts +1 -1
  224. package/dist/types/widgets-v2/range/range-ui.d.ts +1 -1
  225. package/dist/types/widgets-v2/range/range.d.ts +1 -1
  226. package/dist/types/widgets-v2/range/skeleton.d.ts +1 -1
  227. package/dist/types/widgets-v2/scatterplot/skeleton.d.ts +1 -1
  228. package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +1 -1
  229. package/dist/types/widgets-v2/spread/band.d.ts +37 -0
  230. package/dist/types/widgets-v2/spread/band.test.d.ts +1 -0
  231. package/dist/types/widgets-v2/spread/index.d.ts +1 -0
  232. package/dist/types/widgets-v2/spread/separator.d.ts +1 -1
  233. package/dist/types/widgets-v2/spread/skeleton.d.ts +1 -1
  234. package/dist/types/widgets-v2/spread/spread-ui.d.ts +1 -1
  235. package/dist/types/widgets-v2/spread/spread.d.ts +1 -1
  236. package/dist/types/widgets-v2/state/widget-state.d.ts +1 -1
  237. package/dist/types/widgets-v2/subheader/subheader.d.ts +1 -1
  238. package/dist/types/widgets-v2/table/skeleton.d.ts +1 -1
  239. package/dist/types/widgets-v2/table/table-ui.d.ts +1 -1
  240. package/dist/types/widgets-v2/table/table.d.ts +1 -1
  241. package/dist/types/widgets-v2/timeseries/skeleton.d.ts +1 -1
  242. package/dist/types/widgets-v2/toolbox/toolbox.d.ts +1 -1
  243. package/dist/types/widgets-v2/wrapper/widget-actions.d.ts +2 -2
  244. package/dist/types/widgets-v2/wrapper/widget-content.d.ts +2 -2
  245. package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +1 -1
  246. package/dist/use-widget-selector-VSPhfhNm.js +12 -0
  247. package/dist/{use-widget-selector-DFl2hW0R.js.map → use-widget-selector-VSPhfhNm.js.map} +1 -1
  248. package/dist/utils-DtvTjjMq.js +58 -0
  249. package/dist/utils-DtvTjjMq.js.map +1 -0
  250. package/dist/widget-store-BFPKYm4R.js +187 -0
  251. package/dist/widget-store-BFPKYm4R.js.map +1 -0
  252. package/dist/widgets/actions.js +2 -1317
  253. package/dist/widgets/bar.js +183 -175
  254. package/dist/widgets/bar.js.map +1 -1
  255. package/dist/widgets/category.js +429 -434
  256. package/dist/widgets/category.js.map +1 -1
  257. package/dist/widgets/echart.js +3 -120
  258. package/dist/widgets/error.js +28 -38
  259. package/dist/widgets/error.js.map +1 -1
  260. package/dist/widgets/formula.js +3 -123
  261. package/dist/widgets/histogram.js +183 -202
  262. package/dist/widgets/histogram.js.map +1 -1
  263. package/dist/widgets/loader.js +63 -61
  264. package/dist/widgets/loader.js.map +1 -1
  265. package/dist/widgets/markdown.js +141 -123
  266. package/dist/widgets/markdown.js.map +1 -1
  267. package/dist/widgets/no-data.js +52 -58
  268. package/dist/widgets/no-data.js.map +1 -1
  269. package/dist/widgets/note.js +125 -122
  270. package/dist/widgets/note.js.map +1 -1
  271. package/dist/widgets/pie.js +245 -259
  272. package/dist/widgets/pie.js.map +1 -1
  273. package/dist/widgets/range.js +225 -204
  274. package/dist/widgets/range.js.map +1 -1
  275. package/dist/widgets/scatterplot.js +220 -215
  276. package/dist/widgets/scatterplot.js.map +1 -1
  277. package/dist/widgets/selection-summary.js +39 -38
  278. package/dist/widgets/selection-summary.js.map +1 -1
  279. package/dist/widgets/skeleton-loader.js +22 -23
  280. package/dist/widgets/skeleton-loader.js.map +1 -1
  281. package/dist/widgets/spread.js +150 -156
  282. package/dist/widgets/spread.js.map +1 -1
  283. package/dist/widgets/stores.js +3 -8
  284. package/dist/widgets/subheader.js +49 -50
  285. package/dist/widgets/subheader.js.map +1 -1
  286. package/dist/widgets/table.js +576 -644
  287. package/dist/widgets/table.js.map +1 -1
  288. package/dist/widgets/timeseries.js +175 -170
  289. package/dist/widgets/timeseries.js.map +1 -1
  290. package/dist/widgets/toolbar-actions.js +140 -145
  291. package/dist/widgets/toolbar-actions.js.map +1 -1
  292. package/dist/widgets/utils.js +17 -33
  293. package/dist/widgets/utils.js.map +1 -1
  294. package/dist/widgets/wrapper.js +265 -276
  295. package/dist/widgets/wrapper.js.map +1 -1
  296. package/dist/widgets-v2/actions.js +4 -51
  297. package/dist/widgets-v2/bar.js +253 -307
  298. package/dist/widgets-v2/bar.js.map +1 -1
  299. package/dist/widgets-v2/category.js +2 -98
  300. package/dist/widgets-v2/echart.js +2 -57
  301. package/dist/widgets-v2/formula.js +2 -68
  302. package/dist/widgets-v2/histogram.js +285 -350
  303. package/dist/widgets-v2/histogram.js.map +1 -1
  304. package/dist/widgets-v2/markdown.js +3 -69
  305. package/dist/widgets-v2/pie.js +363 -461
  306. package/dist/widgets-v2/pie.js.map +1 -1
  307. package/dist/widgets-v2/range.js +2 -52
  308. package/dist/widgets-v2/scatterplot.js +316 -391
  309. package/dist/widgets-v2/scatterplot.js.map +1 -1
  310. package/dist/widgets-v2/spread.js +2 -66
  311. package/dist/widgets-v2/stores.js +2 -42
  312. package/dist/widgets-v2/table.js +2 -78
  313. package/dist/widgets-v2/timeseries.js +285 -340
  314. package/dist/widgets-v2/timeseries.js.map +1 -1
  315. package/dist/widgets-v2/utils.js +2 -8
  316. package/dist/widgets-v2.js +955 -951
  317. package/dist/widgets-v2.js.map +1 -1
  318. package/dist/zoom-toggle-CA0ifG23.js +164 -0
  319. package/dist/zoom-toggle-CA0ifG23.js.map +1 -0
  320. package/package.json +4 -4
  321. package/src/hooks/use-widget-ref.ts +1 -0
  322. package/src/widgets-v2/index.ts +6 -1
  323. package/src/widgets-v2/spread/band.test.ts +46 -0
  324. package/src/widgets-v2/spread/band.ts +47 -0
  325. package/src/widgets-v2/spread/index.ts +1 -0
  326. package/dist/category-Ct2BzADB.js +0 -753
  327. package/dist/category-Ct2BzADB.js.map +0 -1
  328. package/dist/change-column-Fu1DCYQ3.js +0 -1186
  329. package/dist/change-column-Fu1DCYQ3.js.map +0 -1
  330. package/dist/cjs-D4KH3azB.js +0 -85
  331. package/dist/cjs-D4KH3azB.js.map +0 -1
  332. package/dist/components.js.map +0 -1
  333. package/dist/copy-button-DGL1tyli.js +0 -26
  334. package/dist/copy-button-DGL1tyli.js.map +0 -1
  335. package/dist/csv-item-hH_Gt7ur.js +0 -32
  336. package/dist/csv-item-hH_Gt7ur.js.map +0 -1
  337. package/dist/data-zoom-layout-D_FYdnap.js +0 -28
  338. package/dist/data-zoom-layout-D_FYdnap.js.map +0 -1
  339. package/dist/download-config-OKlLLSW_.js +0 -58
  340. package/dist/download-config-OKlLLSW_.js.map +0 -1
  341. package/dist/echart-B10dhEaM.js +0 -262
  342. package/dist/echart-B10dhEaM.js.map +0 -1
  343. package/dist/exports-Cr43OCul.js +0 -51
  344. package/dist/exports-Cr43OCul.js.map +0 -1
  345. package/dist/exports-Cx-f6m6U.js +0 -63
  346. package/dist/exports-Cx-f6m6U.js.map +0 -1
  347. package/dist/formatter-B9Bxn1k7.js +0 -6
  348. package/dist/formatter-B9Bxn1k7.js.map +0 -1
  349. package/dist/formula-DuC0NQLH.js +0 -79
  350. package/dist/formula-DuC0NQLH.js.map +0 -1
  351. package/dist/lasso-tool-YLFRgb-S.js +0 -582
  352. package/dist/lasso-tool-YLFRgb-S.js.map +0 -1
  353. package/dist/legend/stores.js.map +0 -1
  354. package/dist/legend-store-registry-p1tSwJXH.js +0 -472
  355. package/dist/legend-store-registry-p1tSwJXH.js.map +0 -1
  356. package/dist/markdown-DdqANCiN.js +0 -102
  357. package/dist/markdown-DdqANCiN.js.map +0 -1
  358. package/dist/markdown-content-Dk2DSgbf.js +0 -10287
  359. package/dist/markdown-content-Dk2DSgbf.js.map +0 -1
  360. package/dist/option-builders-DPeoyQaM.js +0 -130
  361. package/dist/option-builders-DPeoyQaM.js.map +0 -1
  362. package/dist/options-CthfUJDz.js +0 -46
  363. package/dist/options-CthfUJDz.js.map +0 -1
  364. package/dist/png-item-9dNbB37T.js +0 -57
  365. package/dist/png-item-9dNbB37T.js.map +0 -1
  366. package/dist/range-l4fNHLEg.js +0 -213
  367. package/dist/range-l4fNHLEg.js.map +0 -1
  368. package/dist/resolve-theme-color-BdojIw0K.js +0 -47
  369. package/dist/resolve-theme-color-BdojIw0K.js.map +0 -1
  370. package/dist/row-DZSP99LW.js +0 -34
  371. package/dist/row-DZSP99LW.js.map +0 -1
  372. package/dist/series-DLNHDWs0.js +0 -90
  373. package/dist/series-DLNHDWs0.js.map +0 -1
  374. package/dist/shared-resize-observer-98b1SK1e.js +0 -17
  375. package/dist/shared-resize-observer-98b1SK1e.js.map +0 -1
  376. package/dist/smart-tooltip-DFV6GD8R.js +0 -40
  377. package/dist/smart-tooltip-DFV6GD8R.js.map +0 -1
  378. package/dist/spread-4MYPOntd.js +0 -66
  379. package/dist/spread-4MYPOntd.js.map +0 -1
  380. package/dist/style-DVnT6HC1.js +0 -131
  381. package/dist/style-DVnT6HC1.js.map +0 -1
  382. package/dist/styles-cohnxh9F.js +0 -23
  383. package/dist/styles-cohnxh9F.js.map +0 -1
  384. package/dist/table-CTcLOycx.js +0 -383
  385. package/dist/table-CTcLOycx.js.map +0 -1
  386. package/dist/tooltip-BDnrRKrp.js +0 -25
  387. package/dist/tooltip-BDnrRKrp.js.map +0 -1
  388. package/dist/transforms-Cdx4fkU5.js +0 -106
  389. package/dist/transforms-Cdx4fkU5.js.map +0 -1
  390. package/dist/use-transform-DXPN3nY7.js +0 -110
  391. package/dist/use-transform-DXPN3nY7.js.map +0 -1
  392. package/dist/use-widget-ref-Ddr_SlJJ.js +0 -22
  393. package/dist/use-widget-ref-Ddr_SlJJ.js.map +0 -1
  394. package/dist/use-widget-selector-DFl2hW0R.js +0 -12
  395. package/dist/utils-BOhInag6.js +0 -170
  396. package/dist/utils-BOhInag6.js.map +0 -1
  397. package/dist/widget-context-DTGO0Yta.js +0 -13
  398. package/dist/widget-context-DTGO0Yta.js.map +0 -1
  399. package/dist/widget-store-Bw5zRUGg.js +0 -261
  400. package/dist/widget-store-Bw5zRUGg.js.map +0 -1
  401. package/dist/widget-store-registry-_W4Z4xp-.js +0 -178
  402. package/dist/widget-store-registry-_W4Z4xp-.js.map +0 -1
  403. package/dist/widgets/actions.js.map +0 -1
  404. package/dist/widgets/echart.js.map +0 -1
  405. package/dist/widgets/formula.js.map +0 -1
  406. package/dist/widgets/stores.js.map +0 -1
  407. package/dist/widgets-v2/actions.js.map +0 -1
  408. package/dist/widgets-v2/category.js.map +0 -1
  409. package/dist/widgets-v2/echart.js.map +0 -1
  410. package/dist/widgets-v2/formula.js.map +0 -1
  411. package/dist/widgets-v2/markdown.js.map +0 -1
  412. package/dist/widgets-v2/range.js.map +0 -1
  413. package/dist/widgets-v2/spread.js.map +0 -1
  414. package/dist/widgets-v2/stores.js.map +0 -1
  415. package/dist/widgets-v2/table.js.map +0 -1
  416. package/dist/widgets-v2/utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"bar.js","sources":["../../src/widgets-v2/bar/options.ts","../../src/widgets-v2/bar/skeleton.tsx","../../src/widgets-v2/bar/download.tsx"],"sourcesContent":["import type { EChartsOption } from 'echarts'\nimport * as echarts from 'echarts'\nimport type { CallbackDataParams } from 'echarts/types/dist/shared'\nimport {\n buildAxisLabelStyle,\n buildGridConfig,\n buildLegendConfig,\n createTooltipFormatter,\n createTooltipPositioner,\n niceNum,\n} from '../../widgets/utils/chart-config'\nimport { ZOOM_LAYOUT } from '../actions/zoom-toggle'\nimport type { OptionFactory } from '../echart'\nimport { mergeOptions, resolveThemeColor } from '../utils'\nimport { positionDataZoomForLegend } from '../utils/data-zoom-layout'\nimport type {\n BarEChartsOption,\n BarOptionFactoryInput,\n BarOptionsInput,\n BarWidgetData,\n} from './types'\n\n/**\n * Builds the **structural** ECharts option for a bar widget — axes, grid,\n * tooltip styling, themed legend. Intentionally data-agnostic: no series,\n * no dataset, no `legend.show` (those depend on data and are added by the\n * option factory's merge phase). This separation is what lets data-side\n * pipeline transforms (Searcher, RelativeData) drive the rendered chart —\n * the merge happens at render time inside the Echart bridge.\n *\n * Styling matches the v1 `barConfig` look-and-feel: minimal axes (only\n * min/max y-labels rendered inside the plot via `niceNum`), themed tooltip,\n * scroll legend, and CARTO color palette. The y-axis min/max + label\n * formatter and the tooltip formatter are wired here for the no-data case;\n * {@link createBarOptionFactory} re-derives them at fusion time so reactive\n * formatter changes (RelativeData) and stack templates (StackToggle) flow\n * through to the chart.\n */\nexport function barOptions({\n theme,\n formatter,\n labelFormatter,\n}: BarOptionsInput): BarEChartsOption {\n // Closure shared between yAxis min/max callbacks and the label formatter,\n // so only the rounded extents are labelled (matches v1).\n let niceMin = 0\n let niceMax = 1\n\n return {\n grid: {\n left: parseInt(theme.spacing(1)),\n top: parseInt(theme.spacing(3)),\n right: parseInt(theme.spacing(1)),\n // Default: no legend. Merger bumps this when there are >1 series.\n ...buildGridConfig(false, theme),\n containLabel: true,\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: theme.palette.grey[900],\n borderWidth: 0,\n padding: [parseInt(theme.spacing(1)), parseInt(theme.spacing(1))],\n textStyle: {\n color: theme.palette.common.white,\n fontSize: 11,\n fontFamily: theme.typography.caption.fontFamily,\n },\n axisPointer: { type: 'line' },\n position: createTooltipPositioner(theme),\n formatter: buildBarTooltipFormatter(formatter, labelFormatter),\n },\n // Legend styling baked here; `show` is toggled by the merger based on\n // series count.\n legend: {\n ...buildLegendConfig({ hasLegend: false, labelFormatter }),\n },\n axisPointer: { lineStyle: { color: theme.palette.grey[400] } },\n color: [\n theme.palette.secondary.main,\n ...Object.values(\n (theme.palette as { qualitative?: { bold?: Record<string, string> } })\n .qualitative?.bold ?? {},\n ),\n ],\n xAxis: {\n type: 'category',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n padding: [parseInt(theme.spacing(0.5)), 0, 0, 0],\n margin: 0,\n // `interval: 0` makes every category label a candidate so `hideOverlap`\n // can pack the maximum number that physically fit; the category-axis\n // default (`'auto'`) sub-samples first and shows fewer than fit.\n interval: 0,\n hideOverlap: true,\n ...(labelFormatter && {\n formatter: (v: string | number) => String(labelFormatter(v)),\n }),\n },\n },\n yAxis: {\n type: 'value',\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n show: true,\n lineStyle: { color: theme.palette.black?.[4] ?? theme.palette.divider },\n },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n margin: parseInt(theme.spacing(1)),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n inside: true,\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return formatter ? formatter(value) : String(value)\n },\n },\n },\n } as BarEChartsOption\n}\n\n/**\n * Returns the bar widget's {@link OptionFactory} — a single closure that\n * handles BOTH option-construction phases:\n *\n * - **Structural phase** (`option == null`) — builds the theme-aware\n * structural option via {@link barOptions}, optionally merging the\n * consumer-supplied `optionsOverride` on top. Called once by Provider\n * to seed `rawOptions` in the store; configTransforms (StackToggle /\n * ZoomToggle / BrushToggle) then mutate it via the pipeline middleware.\n * - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`\n * (`BarWidgetData`) into the option via the dataset API: one dataset\n * per series, each series referencing its dataset by index, encoded\n * by `name` (x) and `value` (y). Spreads any series-template fields\n * already on the incoming option (e.g. `{ stack: 'total' }` from\n * `addStack`) into every emitted series so configTransforms compose\n * end-to-end. Reactive `ctx.formatter` / `ctx.labelFormatter` drive\n * the y-axis min/max-only label and the tooltip formatter at fusion\n * time so RelativeData's percent formatter flows through without a\n * structural rebuild.\n *\n * Stable identity when the inputs don't change (consumers should wrap the\n * call in `useMemo` keyed on the same inputs).\n */\nexport function createBarOptionFactory(\n options: BarOptionFactoryInput,\n): OptionFactory {\n const { theme, formatter, labelFormatter, optionsOverride } = options\n const series = options.series\n const selection = options.selection\n const selectionSet =\n selection && selection.length > 0\n ? new Set<string | number>(selection)\n : null\n return (option, data, ctx) => {\n // Structural phase: Provider seeds rawOptions with this branch. No data\n // is read; we just emit the theme-aware base (optionally with override).\n if (option == null) {\n const structural = barOptions({ theme, formatter, labelFormatter })\n return optionsOverride\n ? (mergeOptions(\n structural as unknown as Record<string, unknown>,\n optionsOverride as Partial<Record<string, unknown>>,\n ) as EChartsOption)\n : structural\n }\n\n const seriesArr = Array.isArray(data) ? (data as BarWidgetData) : []\n if (seriesArr.length === 0) {\n return { ...option, dataset: [], series: [] }\n }\n const hasLegend = seriesArr.length > 1\n const baseLegend =\n typeof option.legend === 'object' && !Array.isArray(option.legend)\n ? option.legend\n : {}\n const baseGrid =\n typeof option.grid === 'object' && !Array.isArray(option.grid)\n ? option.grid\n : {}\n const baseTooltip =\n typeof option.tooltip === 'object' && !Array.isArray(option.tooltip)\n ? option.tooltip\n : {}\n const baseYAxis =\n typeof option.yAxis === 'object' && !Array.isArray(option.yAxis)\n ? option.yAxis\n : {}\n\n const seriesTemplates = Array.isArray(option.series) ? option.series : []\n const broadcastTemplate = seriesTemplates[0] ?? {}\n\n // Reactive (live store) formatters from ctx — distinct from the\n // closure-time `formatter` / `labelFormatter` captured for the\n // structural-build branch above. RelativeData can install a percent\n // formatter on the store after the factory was constructed; the merge\n // phase reads `ctx` to pick that up.\n const liveFormatter = ctx?.formatter\n const liveLabelFormatter = ctx?.labelFormatter\n\n // Closure shared between the yAxis min/max callbacks and the label\n // formatter, so only the rounded extents are labelled (matches v1).\n // Delegating the extent to ECharts (rather than precomputing scalars\n // from the raw data) is what keeps stacked bars inside the plot: when\n // StackToggle marks the series, ECharts feeds the *post-stack* extent\n // to these callbacks, so `niceNum` rounds the stacked total instead of\n // a single series.\n let niceMin = 0\n let niceMax = 1\n\n // Zoom slider layout: when ZoomToggle has installed `dataZoom`, push the\n // slider above the legend (if any) and reserve room in the grid below.\n const dataZoomLayout = positionDataZoomForLegend(option.dataZoom, hasLegend)\n const fallbackBottom =\n typeof baseGrid.bottom === 'number' ? baseGrid.bottom : 24\n const baseBottom = hasLegend ? 56 : fallbackBottom\n const gridBottom = dataZoomLayout\n ? baseBottom + ZOOM_LAYOUT.sliderHeight + ZOOM_LAYOUT.sliderGap\n : baseBottom\n\n // When a selection is active, dim non-selected bars by routing the\n // resolved palette color through `modifyAlpha`. Per-row `itemStyle` on\n // dataset object-rows is silently ignored when `series.encode` is in\n // play — the callback approach is the standard ECharts pattern for\n // per-data styling derived from a dataset.\n //\n // We *always* emit `itemStyle.color` (a passthrough when nothing is\n // selected), not conditionally — dropping the key between renders\n // would let ECharts' default merge keep the previous callback alive\n // and bars would stay dimmed forever after an external clear. Always\n // emitting lets normal merge swap the callback in place, no\n // `replaceMerge` and no entry-animation flash on selection on/off.\n const dimItemStyle = {\n color: (params: CallbackDataParams) => {\n const base = params.color as string\n if (!selectionSet) return base\n const datum = params.value as { name?: string | number } | undefined\n const name = datum?.name ?? params.name\n return name != null && selectionSet.has(name)\n ? base\n : echarts.color.modifyAlpha(base, 0.15)\n },\n }\n\n return {\n ...option,\n dataset: seriesArr.map((s) => ({ source: s as readonly object[] })),\n series: seriesArr.map((_, i) => {\n const template =\n (seriesTemplates[i] as object | undefined) ??\n (broadcastTemplate as object)\n // Per-series `color` override: ECharts sets `params.color` from\n // `series[i].color` when resolving styles, so the dim callback\n // above keeps working — it just dims the user's colour rather\n // than the palette default.\n const overrideColor = resolveThemeColor(theme, series?.[i]?.color)\n return {\n ...(typeof template === 'object' ? template : {}),\n type: 'bar' as const,\n datasetIndex: i,\n name: series?.[i]?.name ?? `Series ${i + 1}`,\n encode: { x: 'name', y: 'value' },\n barMaxWidth: 100,\n emphasis: { focus: 'series' },\n itemStyle: dimItemStyle,\n ...(overrideColor ? { color: overrideColor } : {}),\n }\n }),\n legend: { ...baseLegend, show: hasLegend },\n grid: {\n ...baseGrid,\n bottom: gridBottom,\n },\n ...(dataZoomLayout ? { dataZoom: dataZoomLayout } : {}),\n yAxis: {\n ...baseYAxis,\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLabel: {\n ...((baseYAxis as { axisLabel?: object }).axisLabel ?? {}),\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return liveFormatter ? liveFormatter(value) : String(value)\n },\n },\n } as EChartsOption['yAxis'],\n tooltip: {\n ...baseTooltip,\n formatter: buildBarTooltipFormatter(liveFormatter, liveLabelFormatter),\n },\n } as EChartsOption\n }\n}\n\nfunction buildBarTooltipFormatter(\n formatter: ((value: number) => string) | undefined,\n labelFormatter: ((value: string | number) => string | number) | undefined,\n) {\n return createTooltipFormatter((item) => {\n const row = item.value as { name?: string | number; value?: number }\n const raw = row?.value\n const formattedValue =\n typeof raw === 'number' && formatter ? formatter(raw) : (raw ?? '')\n const marker = typeof item.marker === 'string' ? item.marker : ''\n const seriesName = item.seriesName ? `${item.seriesName}: ` : ''\n const name = labelFormatter\n ? String(labelFormatter(item.name ?? ''))\n : (item.name ?? '')\n return { name: String(name), seriesName, marker, value: formattedValue }\n })\n}\n","import { Box, Skeleton, type SxProps, type Theme } from '@mui/material'\n\nconst styles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'column',\n gap: ({ spacing }) => spacing(1),\n height: ({ spacing }) => spacing(38),\n },\n grid: {\n display: 'flex',\n justifyContent: 'space-between',\n flex: '1 1 auto',\n alignItems: 'flex-end',\n width: '100%',\n },\n bar: {\n flex: 1,\n maxWidth: ({ spacing }) => spacing(12),\n '& + &': {\n marginLeft: ({ spacing }) => spacing(1),\n },\n },\n legend: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(2),\n height: ({ spacing }) => spacing(5),\n },\n legendItem: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(1.5),\n },\n} satisfies Record<string, SxProps<Theme>>\n\nconst BAR_HEIGHTS = ['20%', '40%', '60%', '20%', '80%'] as const\n\n/**\n * Loading state for the Bar widget. Mirrors a bar chart's silhouette — five\n * vertical bars at staggered heights anchored to the bottom, plus a legend\n * stub — so the skeleton reads as \"a bar chart\" rather than a generic list.\n */\nexport function BarSkeleton() {\n return (\n <Box sx={styles.container}>\n <Box sx={styles.grid}>\n {BAR_HEIGHTS.map((height, i) => (\n <Skeleton\n key={`bar-${i}`}\n sx={styles.bar}\n variant='rectangular'\n height={height}\n />\n ))}\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>\n )\n}\n","import {\n buildCsvDownloadItem,\n buildPngDownloadItem,\n type DownloadItem,\n} from '../actions/download'\nimport type { BarWidgetData } from './types'\n\nexport interface BarDownloadConfigArgs {\n filename: string\n getData: () => BarWidgetData\n /**\n * Optional getter for the widget's capture element (registered by\n * `Widget.State` on its success path). When provided, a PNG item is\n * prepended to the returned list. Wire it to\n * `() => getCaptureEl(id)`.\n */\n getCaptureEl?: () => HTMLElement | null\n /** PNG `pixelRatio` (default 2). */\n pngPixelRatio?: number\n /** PNG `backgroundColor` (default transparent). */\n pngBackgroundColor?: string | null\n}\n\n/**\n * Builds download items for the Bar widget. Always includes a CSV item\n * with one `name,value` block per series, separated by an empty row when\n * there are multiple. When `getCaptureEl` is supplied, also prepends a PNG\n * item that rasterises the captured element via `html2canvas`.\n */\nexport function createBarDownloadConfig(\n args: BarDownloadConfigArgs,\n): DownloadItem[] {\n const items: DownloadItem[] = []\n if (args.getCaptureEl) {\n items.push(\n buildPngDownloadItem({\n filename: args.filename,\n getCaptureEl: args.getCaptureEl,\n pixelRatio: args.pngPixelRatio,\n backgroundColor: args.pngBackgroundColor,\n }),\n )\n }\n items.push(\n buildCsvDownloadItem({\n filename: args.filename,\n getRows: () => {\n const data = args.getData()\n const rows: unknown[][] = []\n for (const [i, series] of data.entries()) {\n if (i > 0) rows.push([])\n rows.push(['name', 'value'])\n for (const d of series) rows.push([d.name, d.value])\n }\n return rows\n },\n }),\n )\n return items\n}\n"],"names":["barOptions","theme","formatter","labelFormatter","niceMin","niceMax","grid","left","parseInt","spacing","top","right","buildGridConfig","containLabel","tooltip","trigger","backgroundColor","palette","grey","borderWidth","padding","textStyle","color","common","white","fontSize","fontFamily","typography","caption","axisPointer","type","position","createTooltipPositioner","buildBarTooltipFormatter","legend","buildLegendConfig","hasLegend","lineStyle","secondary","main","Object","values","qualitative","bold","xAxis","axisLine","show","axisTick","axisLabel","buildAxisLabelStyle","margin","interval","hideOverlap","v","String","yAxis","min","extent","niceNum","max","splitLine","black","divider","showMaxLabel","showMinLabel","verticalAlign","inside","value","createBarOptionFactory","options","optionsOverride","series","selection","selectionSet","length","Set","option","data","ctx","structural","mergeOptions","seriesArr","Array","isArray","dataset","baseLegend","baseGrid","baseTooltip","baseYAxis","seriesTemplates","broadcastTemplate","liveFormatter","liveLabelFormatter","dataZoomLayout","positionDataZoomForLegend","dataZoom","fallbackBottom","bottom","baseBottom","gridBottom","ZOOM_LAYOUT","sliderHeight","sliderGap","dimItemStyle","params","base","name","has","echarts","modifyAlpha","map","s","source","_","i","template","overrideColor","resolveThemeColor","datasetIndex","encode","x","y","barMaxWidth","emphasis","focus","itemStyle","createTooltipFormatter","item","raw","formattedValue","marker","seriesName","styles","container","display","alignItems","justifyContent","flexDirection","gap","height","flex","width","bar","maxWidth","marginLeft","legendItem","BAR_HEIGHTS","BarSkeleton","$","_c","t0","Symbol","for","jsx","Box","_temp","t1","_temp2","i_0","jsxs","Skeleton","createBarDownloadConfig","args","items","getCaptureEl","push","buildPngDownloadItem","filename","pixelRatio","pngPixelRatio","pngBackgroundColor","buildCsvDownloadItem","getRows","getData","rows","entries","d"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCO,SAASA,EAAW;AAAA,EACzBC,OAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,gBAAAA;AACe,GAAqB;AAGpC,MAAIC,IAAU,GACVC,IAAU;AAEd,SAAO;AAAA,IACLC,MAAM;AAAA,MACJC,MAAMC,SAASP,EAAMQ,QAAQ,CAAC,CAAC;AAAA,MAC/BC,KAAKF,SAASP,EAAMQ,QAAQ,CAAC,CAAC;AAAA,MAC9BE,OAAOH,SAASP,EAAMQ,QAAQ,CAAC,CAAC;AAAA;AAAA,MAEhC,GAAGG,EAAgB,IAAOX,CAAK;AAAA,MAC/BY,cAAc;AAAA,IAAA;AAAA,IAEhBC,SAAS;AAAA,MACPC,SAAS;AAAA,MACTC,iBAAiBf,EAAMgB,QAAQC,KAAK,GAAG;AAAA,MACvCC,aAAa;AAAA,MACbC,SAAS,CAACZ,SAASP,EAAMQ,QAAQ,CAAC,CAAC,GAAGD,SAASP,EAAMQ,QAAQ,CAAC,CAAC,CAAC;AAAA,MAChEY,WAAW;AAAA,QACTC,OAAOrB,EAAMgB,QAAQM,OAAOC;AAAAA,QAC5BC,UAAU;AAAA,QACVC,YAAYzB,EAAM0B,WAAWC,QAAQF;AAAAA,MAAAA;AAAAA,MAEvCG,aAAa;AAAA,QAAEC,MAAM;AAAA,MAAA;AAAA,MACrBC,UAAUC,EAAwB/B,CAAK;AAAA,MACvCC,WAAW+B,EAA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GAAA;AAAA,SAeG,gBAAAC,EAACL,GAAA,EAA4B,IAAAtB,EAAMa,YACjC,UAAA;AAAA,IAAA,gBAAAQ,EAACO,KAAiB,SAAA,YAAkB,OAAA,GAAW,QAAA,GAAC;AAAA,IAChD,gBAAAP,EAACO,GAAA,EAAgB,OAAA,IAAY,QAAA,EAAA,CAAC;AAAA,EAAA,EAAA,GAFtB,UAAU9C,CAAC,EAGrB;AAAM;AAlBT,SAAAyC,GAAAhB,GAAAzB,GAAA;AAAA,SAKG,gBAAAuC,EAACO,GAAA,EAEK,IAAA5B,EAAMU,KACF,SAAA,eACAH,QAAAA,EAAAA,GAHH,OAAOzB,CAAC,EAGC;AACd;AC1BL,SAAS+C,GACdC,GACgB;AAChB,QAAMC,IAAwB,CAAA;AAC9B,SAAID,EAAKE,gBACPD,EAAME,KACJC,EAAqB;AAAA,IACnBC,UAAUL,EAAKK;AAAAA,IACfH,cAAcF,EAAKE;AAAAA,IACnBI,YAAYN,EAAKO;AAAAA,IACjBzJ,iBAAiBkJ,EAAKQ;AAAAA,EAAAA,CACvB,CACH,GAEFP,EAAME,KACJM,EAAqB;AAAA,IACnBJ,UAAUL,EAAKK;AAAAA,IACfK,SAASA,MAAM;AACb,YAAM/F,IAAOqF,EAAKW,QAAAA,GACZC,IAAoB,CAAA;AAC1B,iBAAW,CAAC5D,GAAG3C,CAAM,KAAKM,EAAKkG,WAAW;AACxC,QAAI7D,IAAI,KAAG4D,EAAKT,KAAK,CAAA,CAAE,GACvBS,EAAKT,KAAK,CAAC,QAAQ,OAAO,CAAC;AAC3B,mBAAWW,KAAKzG,EAAQuG,CAAAA,EAAKT,KAAK,CAACW,EAAEtE,MAAMsE,EAAE7G,KAAK,CAAC;AAAA,MACrD;AACA,aAAO2G;AAAAA,IACT;AAAA,EAAA,CACD,CACH,GACOX;AACT;"}
1
+ {"version":3,"file":"bar.js","names":["EChartsOption","echarts","CallbackDataParams","buildAxisLabelStyle","buildGridConfig","buildLegendConfig","createTooltipFormatter","createTooltipPositioner","niceNum","ZOOM_LAYOUT","OptionFactory","mergeOptions","resolveThemeColor","positionDataZoomForLegend","BarEChartsOption","BarOptionFactoryInput","BarOptionsInput","BarWidgetData","barOptions","theme","formatter","labelFormatter","niceMin","niceMax","grid","left","parseInt","spacing","top","right","containLabel","tooltip","trigger","backgroundColor","palette","grey","borderWidth","padding","textStyle","color","common","white","fontSize","fontFamily","typography","caption","axisPointer","type","position","buildBarTooltipFormatter","legend","hasLegend","lineStyle","secondary","main","Object","values","qualitative","bold","Record","xAxis","axisLine","show","axisTick","axisLabel","margin","interval","hideOverlap","v","String","yAxis","min","extent","max","splitLine","black","divider","showMaxLabel","showMinLabel","verticalAlign","inside","value","createBarOptionFactory","options","optionsOverride","series","selection","selectionSet","length","Set","option","data","ctx","structural","Partial","seriesArr","Array","isArray","dataset","baseLegend","baseGrid","baseTooltip","baseYAxis","seriesTemplates","broadcastTemplate","liveFormatter","liveLabelFormatter","dataZoomLayout","dataZoom","fallbackBottom","bottom","baseBottom","gridBottom","sliderHeight","sliderGap","dimItemStyle","params","base","datum","name","has","modifyAlpha","map","s","source","_","i","template","overrideColor","const","datasetIndex","encode","x","y","barMaxWidth","emphasis","focus","itemStyle","item","row","raw","formattedValue","marker","seriesName","Box","Skeleton","SxProps","Theme","styles","container","display","alignItems","justifyContent","flexDirection","gap","spacing","height","grid","flex","width","bar","maxWidth","marginLeft","legend","legendItem","Record","BAR_HEIGHTS","const","BarSkeleton","$","_c","t0","Symbol","for","map","_temp","t1","_temp2","i_0","i","buildCsvDownloadItem","buildPngDownloadItem","DownloadItem","BarWidgetData","BarDownloadConfigArgs","filename","getData","getCaptureEl","HTMLElement","pngPixelRatio","pngBackgroundColor","createBarDownloadConfig","args","items","push","pixelRatio","backgroundColor","getRows","data","rows","i","series","entries","d","name","value"],"sources":["../../src/widgets-v2/bar/options.ts","../../src/widgets-v2/bar/skeleton.tsx","../../src/widgets-v2/bar/download.tsx"],"sourcesContent":["import type { EChartsOption } from 'echarts'\nimport * as echarts from 'echarts'\nimport type { CallbackDataParams } from 'echarts/types/dist/shared'\nimport {\n buildAxisLabelStyle,\n buildGridConfig,\n buildLegendConfig,\n createTooltipFormatter,\n createTooltipPositioner,\n niceNum,\n} from '../../widgets/utils/chart-config'\nimport { ZOOM_LAYOUT } from '../actions/zoom-toggle'\nimport type { OptionFactory } from '../echart'\nimport { mergeOptions, resolveThemeColor } from '../utils'\nimport { positionDataZoomForLegend } from '../utils/data-zoom-layout'\nimport type {\n BarEChartsOption,\n BarOptionFactoryInput,\n BarOptionsInput,\n BarWidgetData,\n} from './types'\n\n/**\n * Builds the **structural** ECharts option for a bar widget — axes, grid,\n * tooltip styling, themed legend. Intentionally data-agnostic: no series,\n * no dataset, no `legend.show` (those depend on data and are added by the\n * option factory's merge phase). This separation is what lets data-side\n * pipeline transforms (Searcher, RelativeData) drive the rendered chart —\n * the merge happens at render time inside the Echart bridge.\n *\n * Styling matches the v1 `barConfig` look-and-feel: minimal axes (only\n * min/max y-labels rendered inside the plot via `niceNum`), themed tooltip,\n * scroll legend, and CARTO color palette. The y-axis min/max + label\n * formatter and the tooltip formatter are wired here for the no-data case;\n * {@link createBarOptionFactory} re-derives them at fusion time so reactive\n * formatter changes (RelativeData) and stack templates (StackToggle) flow\n * through to the chart.\n */\nexport function barOptions({\n theme,\n formatter,\n labelFormatter,\n}: BarOptionsInput): BarEChartsOption {\n // Closure shared between yAxis min/max callbacks and the label formatter,\n // so only the rounded extents are labelled (matches v1).\n let niceMin = 0\n let niceMax = 1\n\n return {\n grid: {\n left: parseInt(theme.spacing(1)),\n top: parseInt(theme.spacing(3)),\n right: parseInt(theme.spacing(1)),\n // Default: no legend. Merger bumps this when there are >1 series.\n ...buildGridConfig(false, theme),\n containLabel: true,\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: theme.palette.grey[900],\n borderWidth: 0,\n padding: [parseInt(theme.spacing(1)), parseInt(theme.spacing(1))],\n textStyle: {\n color: theme.palette.common.white,\n fontSize: 11,\n fontFamily: theme.typography.caption.fontFamily,\n },\n axisPointer: { type: 'line' },\n position: createTooltipPositioner(theme),\n formatter: buildBarTooltipFormatter(formatter, labelFormatter),\n },\n // Legend styling baked here; `show` is toggled by the merger based on\n // series count.\n legend: {\n ...buildLegendConfig({ hasLegend: false, labelFormatter }),\n },\n axisPointer: { lineStyle: { color: theme.palette.grey[400] } },\n color: [\n theme.palette.secondary.main,\n ...Object.values(\n (theme.palette as { qualitative?: { bold?: Record<string, string> } })\n .qualitative?.bold ?? {},\n ),\n ],\n xAxis: {\n type: 'category',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n padding: [parseInt(theme.spacing(0.5)), 0, 0, 0],\n margin: 0,\n // `interval: 0` makes every category label a candidate so `hideOverlap`\n // can pack the maximum number that physically fit; the category-axis\n // default (`'auto'`) sub-samples first and shows fewer than fit.\n interval: 0,\n hideOverlap: true,\n ...(labelFormatter && {\n formatter: (v: string | number) => String(labelFormatter(v)),\n }),\n },\n },\n yAxis: {\n type: 'value',\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n show: true,\n lineStyle: { color: theme.palette.black?.[4] ?? theme.palette.divider },\n },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n margin: parseInt(theme.spacing(1)),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n inside: true,\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return formatter ? formatter(value) : String(value)\n },\n },\n },\n } as BarEChartsOption\n}\n\n/**\n * Returns the bar widget's {@link OptionFactory} — a single closure that\n * handles BOTH option-construction phases:\n *\n * - **Structural phase** (`option == null`) — builds the theme-aware\n * structural option via {@link barOptions}, optionally merging the\n * consumer-supplied `optionsOverride` on top. Called once by Provider\n * to seed `rawOptions` in the store; configTransforms (StackToggle /\n * ZoomToggle / BrushToggle) then mutate it via the pipeline middleware.\n * - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`\n * (`BarWidgetData`) into the option via the dataset API: one dataset\n * per series, each series referencing its dataset by index, encoded\n * by `name` (x) and `value` (y). Spreads any series-template fields\n * already on the incoming option (e.g. `{ stack: 'total' }` from\n * `addStack`) into every emitted series so configTransforms compose\n * end-to-end. Reactive `ctx.formatter` / `ctx.labelFormatter` drive\n * the y-axis min/max-only label and the tooltip formatter at fusion\n * time so RelativeData's percent formatter flows through without a\n * structural rebuild.\n *\n * Stable identity when the inputs don't change (consumers should wrap the\n * call in `useMemo` keyed on the same inputs).\n */\nexport function createBarOptionFactory(\n options: BarOptionFactoryInput,\n): OptionFactory {\n const { theme, formatter, labelFormatter, optionsOverride } = options\n const series = options.series\n const selection = options.selection\n const selectionSet =\n selection && selection.length > 0\n ? new Set<string | number>(selection)\n : null\n return (option, data, ctx) => {\n // Structural phase: Provider seeds rawOptions with this branch. No data\n // is read; we just emit the theme-aware base (optionally with override).\n if (option == null) {\n const structural = barOptions({ theme, formatter, labelFormatter })\n return optionsOverride\n ? (mergeOptions(\n structural as unknown as Record<string, unknown>,\n optionsOverride as Partial<Record<string, unknown>>,\n ) as EChartsOption)\n : structural\n }\n\n const seriesArr = Array.isArray(data) ? (data as BarWidgetData) : []\n if (seriesArr.length === 0) {\n return { ...option, dataset: [], series: [] }\n }\n const hasLegend = seriesArr.length > 1\n const baseLegend =\n typeof option.legend === 'object' && !Array.isArray(option.legend)\n ? option.legend\n : {}\n const baseGrid =\n typeof option.grid === 'object' && !Array.isArray(option.grid)\n ? option.grid\n : {}\n const baseTooltip =\n typeof option.tooltip === 'object' && !Array.isArray(option.tooltip)\n ? option.tooltip\n : {}\n const baseYAxis =\n typeof option.yAxis === 'object' && !Array.isArray(option.yAxis)\n ? option.yAxis\n : {}\n\n const seriesTemplates = Array.isArray(option.series) ? option.series : []\n const broadcastTemplate = seriesTemplates[0] ?? {}\n\n // Reactive (live store) formatters from ctx — distinct from the\n // closure-time `formatter` / `labelFormatter` captured for the\n // structural-build branch above. RelativeData can install a percent\n // formatter on the store after the factory was constructed; the merge\n // phase reads `ctx` to pick that up.\n const liveFormatter = ctx?.formatter\n const liveLabelFormatter = ctx?.labelFormatter\n\n // Closure shared between the yAxis min/max callbacks and the label\n // formatter, so only the rounded extents are labelled (matches v1).\n // Delegating the extent to ECharts (rather than precomputing scalars\n // from the raw data) is what keeps stacked bars inside the plot: when\n // StackToggle marks the series, ECharts feeds the *post-stack* extent\n // to these callbacks, so `niceNum` rounds the stacked total instead of\n // a single series.\n let niceMin = 0\n let niceMax = 1\n\n // Zoom slider layout: when ZoomToggle has installed `dataZoom`, push the\n // slider above the legend (if any) and reserve room in the grid below.\n const dataZoomLayout = positionDataZoomForLegend(option.dataZoom, hasLegend)\n const fallbackBottom =\n typeof baseGrid.bottom === 'number' ? baseGrid.bottom : 24\n const baseBottom = hasLegend ? 56 : fallbackBottom\n const gridBottom = dataZoomLayout\n ? baseBottom + ZOOM_LAYOUT.sliderHeight + ZOOM_LAYOUT.sliderGap\n : baseBottom\n\n // When a selection is active, dim non-selected bars by routing the\n // resolved palette color through `modifyAlpha`. Per-row `itemStyle` on\n // dataset object-rows is silently ignored when `series.encode` is in\n // play — the callback approach is the standard ECharts pattern for\n // per-data styling derived from a dataset.\n //\n // We *always* emit `itemStyle.color` (a passthrough when nothing is\n // selected), not conditionally — dropping the key between renders\n // would let ECharts' default merge keep the previous callback alive\n // and bars would stay dimmed forever after an external clear. Always\n // emitting lets normal merge swap the callback in place, no\n // `replaceMerge` and no entry-animation flash on selection on/off.\n const dimItemStyle = {\n color: (params: CallbackDataParams) => {\n const base = params.color as string\n if (!selectionSet) return base\n const datum = params.value as { name?: string | number } | undefined\n const name = datum?.name ?? params.name\n return name != null && selectionSet.has(name)\n ? base\n : echarts.color.modifyAlpha(base, 0.15)\n },\n }\n\n return {\n ...option,\n dataset: seriesArr.map((s) => ({ source: s as readonly object[] })),\n series: seriesArr.map((_, i) => {\n const template =\n (seriesTemplates[i] as object | undefined) ??\n (broadcastTemplate as object)\n // Per-series `color` override: ECharts sets `params.color` from\n // `series[i].color` when resolving styles, so the dim callback\n // above keeps working — it just dims the user's colour rather\n // than the palette default.\n const overrideColor = resolveThemeColor(theme, series?.[i]?.color)\n return {\n ...(typeof template === 'object' ? template : {}),\n type: 'bar' as const,\n datasetIndex: i,\n name: series?.[i]?.name ?? `Series ${i + 1}`,\n encode: { x: 'name', y: 'value' },\n barMaxWidth: 100,\n emphasis: { focus: 'series' },\n itemStyle: dimItemStyle,\n ...(overrideColor ? { color: overrideColor } : {}),\n }\n }),\n legend: { ...baseLegend, show: hasLegend },\n grid: {\n ...baseGrid,\n bottom: gridBottom,\n },\n ...(dataZoomLayout ? { dataZoom: dataZoomLayout } : {}),\n yAxis: {\n ...baseYAxis,\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLabel: {\n ...((baseYAxis as { axisLabel?: object }).axisLabel ?? {}),\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return liveFormatter ? liveFormatter(value) : String(value)\n },\n },\n } as EChartsOption['yAxis'],\n tooltip: {\n ...baseTooltip,\n formatter: buildBarTooltipFormatter(liveFormatter, liveLabelFormatter),\n },\n } as EChartsOption\n }\n}\n\nfunction buildBarTooltipFormatter(\n formatter: ((value: number) => string) | undefined,\n labelFormatter: ((value: string | number) => string | number) | undefined,\n) {\n return createTooltipFormatter((item) => {\n const row = item.value as { name?: string | number; value?: number }\n const raw = row?.value\n const formattedValue =\n typeof raw === 'number' && formatter ? formatter(raw) : (raw ?? '')\n const marker = typeof item.marker === 'string' ? item.marker : ''\n const seriesName = item.seriesName ? `${item.seriesName}: ` : ''\n const name = labelFormatter\n ? String(labelFormatter(item.name ?? ''))\n : (item.name ?? '')\n return { name: String(name), seriesName, marker, value: formattedValue }\n })\n}\n","import { Box, Skeleton, type SxProps, type Theme } from '@mui/material'\n\nconst styles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'column',\n gap: ({ spacing }) => spacing(1),\n height: ({ spacing }) => spacing(38),\n },\n grid: {\n display: 'flex',\n justifyContent: 'space-between',\n flex: '1 1 auto',\n alignItems: 'flex-end',\n width: '100%',\n },\n bar: {\n flex: 1,\n maxWidth: ({ spacing }) => spacing(12),\n '& + &': {\n marginLeft: ({ spacing }) => spacing(1),\n },\n },\n legend: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(2),\n height: ({ spacing }) => spacing(5),\n },\n legendItem: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(1.5),\n },\n} satisfies Record<string, SxProps<Theme>>\n\nconst BAR_HEIGHTS = ['20%', '40%', '60%', '20%', '80%'] as const\n\n/**\n * Loading state for the Bar widget. Mirrors a bar chart's silhouette — five\n * vertical bars at staggered heights anchored to the bottom, plus a legend\n * stub — so the skeleton reads as \"a bar chart\" rather than a generic list.\n */\nexport function BarSkeleton() {\n return (\n <Box sx={styles.container}>\n <Box sx={styles.grid}>\n {BAR_HEIGHTS.map((height, i) => (\n <Skeleton\n key={`bar-${i}`}\n sx={styles.bar}\n variant='rectangular'\n height={height}\n />\n ))}\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>\n )\n}\n","import {\n buildCsvDownloadItem,\n buildPngDownloadItem,\n type DownloadItem,\n} from '../actions/download'\nimport type { BarWidgetData } from './types'\n\nexport interface BarDownloadConfigArgs {\n filename: string\n getData: () => BarWidgetData\n /**\n * Optional getter for the widget's capture element (registered by\n * `Widget.State` on its success path). When provided, a PNG item is\n * prepended to the returned list. Wire it to\n * `() => getCaptureEl(id)`.\n */\n getCaptureEl?: () => HTMLElement | null\n /** PNG `pixelRatio` (default 2). */\n pngPixelRatio?: number\n /** PNG `backgroundColor` (default transparent). */\n pngBackgroundColor?: string | null\n}\n\n/**\n * Builds download items for the Bar widget. Always includes a CSV item\n * with one `name,value` block per series, separated by an empty row when\n * there are multiple. When `getCaptureEl` is supplied, also prepends a PNG\n * item that rasterises the captured element via `html2canvas`.\n */\nexport function createBarDownloadConfig(\n args: BarDownloadConfigArgs,\n): DownloadItem[] {\n const items: DownloadItem[] = []\n if (args.getCaptureEl) {\n items.push(\n buildPngDownloadItem({\n filename: args.filename,\n getCaptureEl: args.getCaptureEl,\n pixelRatio: args.pngPixelRatio,\n backgroundColor: args.pngBackgroundColor,\n }),\n )\n }\n items.push(\n buildCsvDownloadItem({\n filename: args.filename,\n getRows: () => {\n const data = args.getData()\n const rows: unknown[][] = []\n for (const [i, series] of data.entries()) {\n if (i > 0) rows.push([])\n rows.push(['name', 'value'])\n for (const d of series) rows.push([d.name, d.value])\n }\n return rows\n },\n }),\n )\n return items\n}\n"],"mappings":";;;;;;;;;AAsCA,SAAgBkB,EAAW,EACzBC,UACAC,cACAC,qBACoC;CAGpC,IAAIC,IAAU,GACVC,IAAU;CAEd,OAAO;EACLC,MAAM;GACJC,MAAMC,SAASP,EAAMQ,QAAQ,CAAC,CAAC;GAC/BC,KAAKF,SAASP,EAAMQ,QAAQ,CAAC,CAAC;GAC9BE,OAAOH,SAASP,EAAMQ,QAAQ,CAAC,CAAC;GAEhC,GAAGvB,EAAgB,IAAOe,CAAK;GAC/BW,cAAc;EAChB;EACAC,SAAS;GACPC,SAAS;GACTC,iBAAiBd,EAAMe,QAAQC,KAAK;GACpCC,aAAa;GACbC,SAAS,CAACX,SAASP,EAAMQ,QAAQ,CAAC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AAA;GAAW,QAAA;EAAC,CAAA,GAChD,kBAAC,GAAD;GAAiB,OAAA;GAAY,QAAA;EAAC,CAAA,CAF5B;CAAM,GAAA,UAAUe,GAAhB;AAGE;AAlBT,SAAAJ,EAAAnB,GAAAuB,GAAA;CAAA,OAKG,kBAAC,GAAD;EAEM,IAAA/B,EAAMY;EACF,SAAA;EACAJ;CAAM,GAHT,OAAOuB,GAGE;AACd;;;AC1BZ,SAAgBY,EACdC,GACgB;CAChB,IAAMC,IAAwB,CAAA;CA0B9B,OAzBID,EAAKL,gBACPM,EAAMC,KACJb,EAAqB;EACnBI,UAAUO,EAAKP;EACfE,cAAcK,EAAKL;EACnBQ,YAAYH,EAAKH;EACjBO,iBAAiBJ,EAAKF;CACxB,CAAC,CACH,GAEFG,EAAMC,KACJd,EAAqB;EACnBK,UAAUO,EAAKP;EACfY,eAAe;GACb,IAAMC,IAAON,EAAKN,QAAQ,GACpBa,IAAoB,CAAA;GAC1B,KAAK,IAAM,CAACC,GAAGC,MAAWH,EAAKI,QAAQ,GAAG;IAExCH,AADIC,IAAI,KAAGD,EAAKL,KAAK,CAAA,CAAE,GACvBK,EAAKL,KAAK,CAAC,QAAQ,OAAO,CAAC;IAC3B,KAAK,IAAMS,KAAKF,GAAQF,EAAKL,KAAK,CAACS,EAAEC,MAAMD,EAAEE,KAAK,CAAC;GACrD;GACA,OAAON;EACT;CACF,CAAC,CACH,GACON;AACT"}
@@ -1,98 +1,2 @@
1
- import { C as N, a as P, b as $, c as z, d as G, e as L, f as M } from "../category-Ct2BzADB.js";
2
- import { jsx as m, jsxs as g } from "react/jsx-runtime";
3
- import { c as d } from "react/compiler-runtime";
4
- import { Box as c, Skeleton as p } from "@mui/material";
5
- import "react";
6
- import "@mui/icons-material";
7
- import "../lasso-tool-YLFRgb-S.js";
8
- import "../cjs-D4KH3azB.js";
9
- import "@carto/ps-utils";
10
- import "html2canvas";
11
- import { b as w } from "../png-item-9dNbB37T.js";
12
- import { b as h } from "../csv-item-hH_Gt7ur.js";
13
- const s = {
14
- root: {
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 1,
18
- py: 0.5
19
- },
20
- // Mirror the real row layout: label + value on top, bar below.
21
- row: {
22
- display: "flex",
23
- flexDirection: "column",
24
- gap: 0.5
25
- },
26
- rowHeader: {
27
- display: "flex",
28
- justifyContent: "space-between",
29
- alignItems: "center",
30
- gap: 1
31
- },
32
- // Small fixed-width shimmer pills — matches the visual density of the
33
- // real label / value cells without claiming the full row width.
34
- name: {
35
- height: 14,
36
- width: 80
37
- },
38
- value: {
39
- height: 14,
40
- width: 48
41
- }
42
- }, x = {
43
- small: 4,
44
- medium: 12
45
- }, u = ["95%", "80%", "55%", "75%", "60%"];
46
- function T(t) {
47
- const e = d(5), {
48
- rows: l,
49
- size: i
50
- } = t, a = l === void 0 ? 5 : l, n = i === void 0 ? "small" : i;
51
- let o;
52
- e[0] !== a ? (o = Array.from({
53
- length: a
54
- }), e[0] = a, e[1] = o) : o = e[1];
55
- let r;
56
- return e[2] !== n || e[3] !== o ? (r = /* @__PURE__ */ m(c, { sx: s.root, children: o.map((C, f) => /* @__PURE__ */ g(c, { sx: s.row, children: [
57
- /* @__PURE__ */ g(c, { sx: s.rowHeader, children: [
58
- /* @__PURE__ */ m(p, { variant: "rectangular", sx: s.name }),
59
- /* @__PURE__ */ m(p, { variant: "rectangular", sx: s.value })
60
- ] }),
61
- /* @__PURE__ */ m(p, { variant: "rectangular", sx: {
62
- height: x[n],
63
- width: u[f % u.length]
64
- } })
65
- ] }, `row-${f}`)) }), e[2] = n, e[3] = o, e[4] = r) : r = e[4], r;
66
- }
67
- function _(t) {
68
- const e = [];
69
- return t.getCaptureEl && e.push(w({
70
- filename: t.filename,
71
- getCaptureEl: t.getCaptureEl,
72
- pixelRatio: t.pngPixelRatio,
73
- backgroundColor: t.pngBackgroundColor
74
- })), e.push(h({
75
- filename: t.filename,
76
- getRows: () => {
77
- const l = t.getData(), i = [["series", "name", "value"]];
78
- for (const [a, n] of l.entries()) {
79
- const o = t.seriesNames?.[a] ?? `series_${a + 1}`;
80
- for (const r of n)
81
- i.push([o, r.name, r.value]);
82
- }
83
- return i;
84
- }
85
- })), e;
86
- }
87
- export {
88
- N as Category,
89
- P as CategoryBar,
90
- $ as CategoryLegend,
91
- z as CategoryRowMulti,
92
- G as CategoryRowOther,
93
- L as CategoryRowSingle,
94
- T as CategorySkeleton,
95
- M as CategoryUI,
96
- _ as createCategoryDownloadConfig
97
- };
98
- //# sourceMappingURL=category.js.map
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../category-DHZscHaS.js";
2
+ export { o as Category, r as CategoryBar, e as CategoryLegend, s as CategoryRowMulti, a as CategoryRowOther, t as CategoryRowSingle, i as CategorySkeleton, n as CategoryUI, c as createCategoryDownloadConfig };
@@ -1,57 +1,2 @@
1
- import { D as T, E as z, a as D, _ as U, o as w } from "../echart-B10dhEaM.js";
2
- import { c as C } from "react/compiler-runtime";
3
- import { useRef as R } from "react";
4
- function F(x) {
5
- const e = C(15), {
6
- selection: s,
7
- onSelectionChange: t,
8
- keyFromClick: f,
9
- keysFromBrush: h
10
- } = x;
11
- let n;
12
- e[0] !== f || e[1] !== t || e[2] !== s ? (n = (S) => {
13
- if (!t)
14
- return;
15
- const b = f(S);
16
- if (b == null)
17
- return;
18
- const a = s ?? [], p = a.indexOf(b), B = p === -1 ? [...a, b] : [...a.slice(0, p), ...a.slice(p + 1)];
19
- t(B);
20
- }, e[0] = f, e[1] = t, e[2] = s, e[3] = n) : n = e[3];
21
- const u = n;
22
- let r;
23
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = [], e[4] = r) : r = e[4];
24
- const E = R(r);
25
- let c;
26
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = (S) => {
27
- const k = S;
28
- E.current = k.batch?.[0]?.selected ?? [];
29
- }, e[5] = c) : c = e[5];
30
- const y = c;
31
- let o;
32
- e[6] !== h || e[7] !== t ? (o = () => {
33
- t && t(h(E.current));
34
- }, e[6] = h, e[7] = t, e[8] = o) : o = e[8];
35
- const m = o;
36
- let l;
37
- e[9] !== m || e[10] !== u ? (l = {
38
- click: u,
39
- brushSelected: y,
40
- brushEnd: m
41
- }, e[9] = m, e[10] = u, e[11] = l) : l = e[11];
42
- const d = l, _ = s && s.length > 0 ? s : null;
43
- let i;
44
- return e[12] !== d || e[13] !== _ ? (i = {
45
- onEvents: d,
46
- selection: _
47
- }, e[12] = d, e[13] = _, e[14] = i) : i = e[14], i;
48
- }
49
- export {
50
- T as DEFAULT_INIT_OPTS,
51
- z as Echart,
52
- D as EchartUI,
53
- U as __resetSharedResizeObserver,
54
- w as observeResize,
55
- F as useChartSelection
56
- };
57
- //# sourceMappingURL=echart.js.map
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../echart-DSz2Tu0z.js";
2
+ export { i as DEFAULT_INIT_OPTS, n as Echart, t as EchartUI, e as __resetSharedResizeObserver, r as observeResize, a as useChartSelection };
@@ -1,68 +1,2 @@
1
- import { D as P, F as E, a as R } from "../formula-DuC0NQLH.js";
2
- import { N, P as V, S as _, a as $, V as j } from "../style-DVnT6HC1.js";
3
- import { jsx as i } from "react/jsx-runtime";
4
- import { c as l } from "react/compiler-runtime";
5
- import { Box as m, Skeleton as s } from "@mui/material";
6
- import "react";
7
- import "@mui/icons-material";
8
- import "../lasso-tool-YLFRgb-S.js";
9
- import "../cjs-D4KH3azB.js";
10
- import "@carto/ps-utils";
11
- import "html2canvas";
12
- import { b as u } from "../png-item-9dNbB37T.js";
13
- import { b as f } from "../csv-item-hH_Gt7ur.js";
14
- const n = {
15
- root: {
16
- display: "flex",
17
- gap: 3,
18
- alignItems: "baseline",
19
- minHeight: 64,
20
- py: 1
21
- },
22
- block: {
23
- width: 120,
24
- height: 36
25
- }
26
- };
27
- function F(t) {
28
- const e = l(2), {
29
- count: a
30
- } = t, r = a === void 0 ? 1 : a;
31
- let o;
32
- return e[0] !== r ? (o = /* @__PURE__ */ i(m, { sx: n.root, children: Array.from({
33
- length: r
34
- }).map(p) }), e[0] = r, e[1] = o) : o = e[1], o;
35
- }
36
- function p(t, e) {
37
- return /* @__PURE__ */ i(s, { variant: "rectangular", sx: n.block }, `row-${e}`);
38
- }
39
- function S(t) {
40
- const e = [];
41
- return t.getCaptureEl && e.push(u({
42
- filename: t.filename,
43
- getCaptureEl: t.getCaptureEl,
44
- pixelRatio: t.pngPixelRatio,
45
- backgroundColor: t.pngBackgroundColor
46
- })), e.push(f({
47
- filename: t.filename,
48
- getRows: () => {
49
- const a = t.getData(), r = [["series", "prefix", "value", "suffix", "note", "delta"]];
50
- for (const o of a)
51
- r.push([o.series?.name ?? "", o.prefix ?? "", o.value, o.suffix ?? "", o.note ?? "", o.delta?.value ?? ""]);
52
- return r;
53
- }
54
- })), e;
55
- }
56
- export {
57
- P as Delta,
58
- E as Formula,
59
- F as FormulaSkeleton,
60
- R as FormulaUI,
61
- N as Note,
62
- V as Prefix,
63
- _ as Series,
64
- $ as Suffix,
65
- j as Value,
66
- S as createFormulaDownloadConfig
67
- };
68
- //# sourceMappingURL=formula.js.map
1
+ import { c as e, d as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "../formula-Dsru_p-g.js";
2
+ export { t as Delta, o as Formula, i as FormulaSkeleton, n as FormulaUI, l as Note, r as Prefix, e as Series, s as Suffix, a as Value, c as createFormulaDownloadConfig };