@fusedashlabs/widgets 0.3.1 → 0.4.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 (342) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts +1 -0
  4. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
  5. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +12 -1
  6. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
  7. package/dist/components/chart-renderer/lib/registry.d.ts.map +1 -1
  8. package/dist/components/chart-renderer/lib/registry.js +17 -4
  9. package/dist/components/chart-renderer/lib/registry.js.map +1 -1
  10. package/dist/components/chart-renderer/lib/types.d.ts +5 -0
  11. package/dist/components/chart-renderer/lib/types.d.ts.map +1 -1
  12. package/dist/components/donut-chart/element/ui9000-donut-chart.js +1 -1
  13. package/dist/components/donut-chart/element/ui9000-donut-chart.js.map +1 -1
  14. package/dist/components/lollipop/element/styles.d.ts.map +1 -1
  15. package/dist/components/lollipop/element/styles.js +19 -1
  16. package/dist/components/lollipop/element/styles.js.map +1 -1
  17. package/dist/components/lollipop/element/ui9000-lollipop.d.ts +6 -1
  18. package/dist/components/lollipop/element/ui9000-lollipop.d.ts.map +1 -1
  19. package/dist/components/lollipop/element/ui9000-lollipop.js +68 -7
  20. package/dist/components/lollipop/element/ui9000-lollipop.js.map +1 -1
  21. package/dist/components/lollipop/index.d.ts +1 -1
  22. package/dist/components/lollipop/index.d.ts.map +1 -1
  23. package/dist/components/lollipop/index.js +2 -0
  24. package/dist/components/lollipop/index.js.map +1 -1
  25. package/dist/components/lollipop/lib/domain.d.ts +16 -1
  26. package/dist/components/lollipop/lib/domain.d.ts.map +1 -1
  27. package/dist/components/lollipop/lib/domain.js +56 -1
  28. package/dist/components/lollipop/lib/domain.js.map +1 -1
  29. package/dist/components/lollipop/lib/index.d.ts +3 -2
  30. package/dist/components/lollipop/lib/index.d.ts.map +1 -1
  31. package/dist/components/lollipop/lib/layout.d.ts +16 -0
  32. package/dist/components/lollipop/lib/layout.d.ts.map +1 -0
  33. package/dist/components/lollipop/lib/layout.js +16 -0
  34. package/dist/components/lollipop/lib/layout.js.map +1 -0
  35. package/dist/components/lollipop/lib/types.d.ts +5 -0
  36. package/dist/components/lollipop/lib/types.d.ts.map +1 -1
  37. package/dist/components/lollipop/metadata.json.d.ts +10 -0
  38. package/dist/components/lollipop/metadata.json.js +4 -1
  39. package/dist/components/lollipop/metadata.json.js.map +1 -1
  40. package/dist/components/lollipop/render/draw.d.ts +8 -1
  41. package/dist/components/lollipop/render/draw.d.ts.map +1 -1
  42. package/dist/components/lollipop/render/draw.js +155 -84
  43. package/dist/components/lollipop/render/draw.js.map +1 -1
  44. package/dist/components/map-chart/element/styles.d.ts +2 -0
  45. package/dist/components/map-chart/element/styles.d.ts.map +1 -0
  46. package/dist/components/map-chart/element/styles.js +372 -0
  47. package/dist/components/map-chart/element/styles.js.map +1 -0
  48. package/dist/components/map-chart/element/ui9000-map-chart.d.ts +54 -0
  49. package/dist/components/map-chart/element/ui9000-map-chart.d.ts.map +1 -0
  50. package/dist/components/map-chart/element/ui9000-map-chart.js +539 -0
  51. package/dist/components/map-chart/element/ui9000-map-chart.js.map +1 -0
  52. package/dist/components/map-chart/index.d.ts +5 -0
  53. package/dist/components/map-chart/index.d.ts.map +1 -0
  54. package/dist/components/map-chart/index.js +29 -0
  55. package/dist/components/map-chart/index.js.map +1 -0
  56. package/dist/components/map-chart/lib/constants.d.ts +34 -0
  57. package/dist/components/map-chart/lib/constants.d.ts.map +1 -0
  58. package/dist/components/map-chart/lib/constants.js +122 -0
  59. package/dist/components/map-chart/lib/constants.js.map +1 -0
  60. package/dist/components/map-chart/lib/domain.d.ts +12 -0
  61. package/dist/components/map-chart/lib/domain.d.ts.map +1 -0
  62. package/dist/components/map-chart/lib/domain.js +105 -0
  63. package/dist/components/map-chart/lib/domain.js.map +1 -0
  64. package/dist/components/map-chart/lib/format.d.ts +8 -0
  65. package/dist/components/map-chart/lib/format.d.ts.map +1 -0
  66. package/dist/components/map-chart/lib/format.js +45 -0
  67. package/dist/components/map-chart/lib/format.js.map +1 -0
  68. package/dist/components/map-chart/lib/geo-index.d.ts +7 -0
  69. package/dist/components/map-chart/lib/geo-index.d.ts.map +1 -0
  70. package/dist/components/map-chart/lib/geo-index.js +200 -0
  71. package/dist/components/map-chart/lib/geo-index.js.map +1 -0
  72. package/dist/components/map-chart/lib/geojson.d.ts +5 -0
  73. package/dist/components/map-chart/lib/geojson.d.ts.map +1 -0
  74. package/dist/components/map-chart/lib/geojson.js +47 -0
  75. package/dist/components/map-chart/lib/geojson.js.map +1 -0
  76. package/dist/components/map-chart/lib/index.d.ts +13 -0
  77. package/dist/components/map-chart/lib/index.d.ts.map +1 -0
  78. package/dist/components/map-chart/lib/join.d.ts +7 -0
  79. package/dist/components/map-chart/lib/join.d.ts.map +1 -0
  80. package/dist/components/map-chart/lib/join.js +156 -0
  81. package/dist/components/map-chart/lib/join.js.map +1 -0
  82. package/dist/components/map-chart/lib/legend.d.ts +45 -0
  83. package/dist/components/map-chart/lib/legend.d.ts.map +1 -0
  84. package/dist/components/map-chart/lib/legend.js +108 -0
  85. package/dist/components/map-chart/lib/legend.js.map +1 -0
  86. package/dist/components/map-chart/lib/normalize.d.ts +3 -0
  87. package/dist/components/map-chart/lib/normalize.d.ts.map +1 -0
  88. package/dist/components/map-chart/lib/normalize.js +177 -0
  89. package/dist/components/map-chart/lib/normalize.js.map +1 -0
  90. package/dist/components/map-chart/lib/pmtiles.d.ts +41 -0
  91. package/dist/components/map-chart/lib/pmtiles.d.ts.map +1 -0
  92. package/dist/components/map-chart/lib/pmtiles.js +112 -0
  93. package/dist/components/map-chart/lib/pmtiles.js.map +1 -0
  94. package/dist/components/map-chart/lib/types.d.ts +128 -0
  95. package/dist/components/map-chart/lib/types.d.ts.map +1 -0
  96. package/dist/components/map-chart/metadata.json.d.ts +83 -0
  97. package/dist/components/map-chart/metadata.json.js +42 -0
  98. package/dist/components/map-chart/metadata.json.js.map +1 -0
  99. package/dist/components/map-chart/render/draw.d.ts +24 -0
  100. package/dist/components/map-chart/render/draw.d.ts.map +1 -0
  101. package/dist/components/map-chart/render/draw.js +455 -0
  102. package/dist/components/map-chart/render/draw.js.map +1 -0
  103. package/dist/components/map-chart/render/index.d.ts +2 -0
  104. package/dist/components/map-chart/render/index.d.ts.map +1 -0
  105. package/dist/components/matrix-chart/element/styles.d.ts +2 -0
  106. package/dist/components/matrix-chart/element/styles.d.ts.map +1 -0
  107. package/dist/components/matrix-chart/element/styles.js +97 -0
  108. package/dist/components/matrix-chart/element/styles.js.map +1 -0
  109. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts +39 -0
  110. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts.map +1 -0
  111. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js +238 -0
  112. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js.map +1 -0
  113. package/dist/components/matrix-chart/index.d.ts +5 -0
  114. package/dist/components/matrix-chart/index.d.ts.map +1 -0
  115. package/dist/components/matrix-chart/index.js +20 -0
  116. package/dist/components/matrix-chart/lib/domain.d.ts +7 -0
  117. package/dist/components/matrix-chart/lib/domain.d.ts.map +1 -0
  118. package/dist/components/matrix-chart/lib/domain.js +58 -0
  119. package/dist/components/matrix-chart/lib/domain.js.map +1 -0
  120. package/dist/components/matrix-chart/lib/format.d.ts +5 -0
  121. package/dist/components/matrix-chart/lib/format.d.ts.map +1 -0
  122. package/dist/components/matrix-chart/lib/format.js +16 -0
  123. package/dist/components/matrix-chart/lib/format.js.map +1 -0
  124. package/dist/components/matrix-chart/lib/index.d.ts +5 -0
  125. package/dist/components/matrix-chart/lib/index.d.ts.map +1 -0
  126. package/dist/components/matrix-chart/lib/normalize.d.ts +5 -0
  127. package/dist/components/matrix-chart/lib/normalize.d.ts.map +1 -0
  128. package/dist/components/matrix-chart/lib/normalize.js +165 -0
  129. package/dist/components/matrix-chart/lib/normalize.js.map +1 -0
  130. package/dist/components/matrix-chart/lib/types.d.ts +33 -0
  131. package/dist/components/matrix-chart/lib/types.d.ts.map +1 -0
  132. package/dist/components/matrix-chart/metadata.json.d.ts +110 -0
  133. package/dist/components/matrix-chart/metadata.json.js +42 -0
  134. package/dist/components/matrix-chart/metadata.json.js.map +1 -0
  135. package/dist/components/matrix-chart/render/draw.d.ts +63 -0
  136. package/dist/components/matrix-chart/render/draw.d.ts.map +1 -0
  137. package/dist/components/matrix-chart/render/draw.js +225 -0
  138. package/dist/components/matrix-chart/render/draw.js.map +1 -0
  139. package/dist/components/matrix-chart/render/index.d.ts +2 -0
  140. package/dist/components/matrix-chart/render/index.d.ts.map +1 -0
  141. package/dist/components/network-graph/element/styles.d.ts.map +1 -1
  142. package/dist/components/network-graph/element/styles.js +177 -57
  143. package/dist/components/network-graph/element/styles.js.map +1 -1
  144. package/dist/components/network-graph/element/ui9000-network-graph.d.ts +4 -0
  145. package/dist/components/network-graph/element/ui9000-network-graph.d.ts.map +1 -1
  146. package/dist/components/network-graph/element/ui9000-network-graph.js +116 -39
  147. package/dist/components/network-graph/element/ui9000-network-graph.js.map +1 -1
  148. package/dist/components/network-graph/lib/domain.d.ts +2 -2
  149. package/dist/components/network-graph/lib/domain.js.map +1 -1
  150. package/dist/components/network-graph/lib/index.d.ts +1 -0
  151. package/dist/components/network-graph/lib/index.d.ts.map +1 -1
  152. package/dist/components/network-graph/lib/legend.d.ts +15 -0
  153. package/dist/components/network-graph/lib/legend.d.ts.map +1 -0
  154. package/dist/components/network-graph/lib/legend.js +35 -0
  155. package/dist/components/network-graph/lib/legend.js.map +1 -0
  156. package/dist/components/network-graph/render/draw.d.ts +4 -1
  157. package/dist/components/network-graph/render/draw.d.ts.map +1 -1
  158. package/dist/components/network-graph/render/draw.js +34 -9
  159. package/dist/components/network-graph/render/draw.js.map +1 -1
  160. package/dist/components/pie-chart/element/styles.d.ts.map +1 -1
  161. package/dist/components/pie-chart/element/styles.js +34 -1
  162. package/dist/components/pie-chart/element/styles.js.map +1 -1
  163. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts +0 -2
  164. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts.map +1 -1
  165. package/dist/components/pie-chart/element/ui9000-pie-chart.js +2 -8
  166. package/dist/components/pie-chart/element/ui9000-pie-chart.js.map +1 -1
  167. package/dist/components/pie-chart/metadata.json.d.ts +1 -7
  168. package/dist/components/pie-chart/metadata.json.js +2 -2
  169. package/dist/components/polar-area-chart/element/styles.d.ts +1 -1
  170. package/dist/components/polar-area-chart/element/styles.d.ts.map +1 -1
  171. package/dist/components/{donut-group-chart → polar-area-chart}/element/styles.js +9 -27
  172. package/dist/components/polar-area-chart/element/styles.js.map +1 -0
  173. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.d.ts.map +1 -1
  174. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js +4 -3
  175. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js.map +1 -1
  176. package/dist/components/polar-area-chart/index.d.ts +1 -1
  177. package/dist/components/polar-area-chart/index.d.ts.map +1 -1
  178. package/dist/components/polar-area-chart/index.js +2 -1
  179. package/dist/components/polar-area-chart/lib/domain.d.ts +8 -0
  180. package/dist/components/polar-area-chart/lib/domain.d.ts.map +1 -1
  181. package/dist/components/polar-area-chart/lib/domain.js +20 -0
  182. package/dist/components/polar-area-chart/lib/domain.js.map +1 -1
  183. package/dist/components/polar-area-chart/lib/index.d.ts +1 -1
  184. package/dist/components/polar-area-chart/lib/index.d.ts.map +1 -1
  185. package/dist/components/polar-area-chart/lib/normalize.d.ts.map +1 -1
  186. package/dist/components/polar-area-chart/lib/normalize.js +72 -6
  187. package/dist/components/polar-area-chart/lib/normalize.js.map +1 -1
  188. package/dist/components/polar-area-chart/lib/types.d.ts +6 -1
  189. package/dist/components/polar-area-chart/lib/types.d.ts.map +1 -1
  190. package/dist/components/polar-area-chart/metadata.json.d.ts +1 -1
  191. package/dist/components/polar-area-chart/metadata.json.js +1 -1
  192. package/dist/components/polar-area-chart/render/draw.d.ts.map +1 -1
  193. package/dist/components/polar-area-chart/render/draw.js +2 -2
  194. package/dist/components/polar-area-chart/render/draw.js.map +1 -1
  195. package/dist/components/punchcard-chart/metadata.json.d.ts +1 -1
  196. package/dist/components/punchcard-chart/metadata.json.js +1 -1
  197. package/dist/components/sankey-chart/element/styles.d.ts.map +1 -1
  198. package/dist/components/sankey-chart/element/styles.js +7 -27
  199. package/dist/components/sankey-chart/element/styles.js.map +1 -1
  200. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts +5 -5
  201. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts.map +1 -1
  202. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js +37 -35
  203. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js.map +1 -1
  204. package/dist/components/treemap-chart/element/styles.d.ts +2 -0
  205. package/dist/components/treemap-chart/element/styles.d.ts.map +1 -0
  206. package/dist/components/treemap-chart/element/styles.js +141 -0
  207. package/dist/components/treemap-chart/element/styles.js.map +1 -0
  208. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts +35 -0
  209. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts.map +1 -0
  210. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js +177 -0
  211. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js.map +1 -0
  212. package/dist/components/treemap-chart/index.d.ts +5 -0
  213. package/dist/components/treemap-chart/index.d.ts.map +1 -0
  214. package/dist/components/treemap-chart/index.js +22 -0
  215. package/dist/components/treemap-chart/index.js.map +1 -0
  216. package/dist/components/treemap-chart/lib/color.d.ts +25 -0
  217. package/dist/components/treemap-chart/lib/color.d.ts.map +1 -0
  218. package/dist/components/treemap-chart/lib/color.js +67 -0
  219. package/dist/components/treemap-chart/lib/color.js.map +1 -0
  220. package/dist/components/treemap-chart/lib/format.d.ts +7 -0
  221. package/dist/components/treemap-chart/lib/format.d.ts.map +1 -0
  222. package/dist/components/treemap-chart/lib/format.js +9 -0
  223. package/dist/components/treemap-chart/lib/format.js.map +1 -0
  224. package/dist/components/treemap-chart/lib/index.d.ts +6 -0
  225. package/dist/components/treemap-chart/lib/index.d.ts.map +1 -0
  226. package/dist/components/treemap-chart/lib/layout.d.ts +18 -0
  227. package/dist/components/treemap-chart/lib/layout.d.ts.map +1 -0
  228. package/dist/components/treemap-chart/lib/layout.js +31 -0
  229. package/dist/components/treemap-chart/lib/layout.js.map +1 -0
  230. package/dist/components/treemap-chart/lib/normalize.d.ts +4 -0
  231. package/dist/components/treemap-chart/lib/normalize.d.ts.map +1 -0
  232. package/dist/components/treemap-chart/lib/normalize.js +182 -0
  233. package/dist/components/treemap-chart/lib/normalize.js.map +1 -0
  234. package/dist/components/treemap-chart/lib/types.d.ts +63 -0
  235. package/dist/components/treemap-chart/lib/types.d.ts.map +1 -0
  236. package/dist/components/treemap-chart/metadata.json.d.ts +126 -0
  237. package/dist/components/treemap-chart/metadata.json.js +45 -0
  238. package/dist/components/treemap-chart/render/draw.d.ts +24 -0
  239. package/dist/components/treemap-chart/render/draw.d.ts.map +1 -0
  240. package/dist/components/treemap-chart/render/draw.js +124 -0
  241. package/dist/components/treemap-chart/render/draw.js.map +1 -0
  242. package/dist/components/treemap-chart/render/index.d.ts +2 -0
  243. package/dist/components/treemap-chart/render/index.d.ts.map +1 -0
  244. package/dist/element/chart-legend-render.d.ts +5 -0
  245. package/dist/element/chart-legend-render.d.ts.map +1 -1
  246. package/dist/element/chart-legend-render.js +19 -1
  247. package/dist/element/chart-legend-render.js.map +1 -1
  248. package/dist/element/chart-shell-styles.d.ts.map +1 -1
  249. package/dist/element/chart-shell-styles.js +35 -0
  250. package/dist/element/chart-shell-styles.js.map +1 -1
  251. package/dist/index.d.ts +8 -4
  252. package/dist/index.d.ts.map +1 -1
  253. package/dist/index.js +73 -39
  254. package/dist/index.js.map +1 -1
  255. package/dist/lazy/index.d.ts +4 -2
  256. package/dist/lazy/index.d.ts.map +1 -1
  257. package/dist/lazy/index.js +24 -8
  258. package/dist/lazy/index.js.map +1 -1
  259. package/dist/lazy/map-chart.d.ts +4 -0
  260. package/dist/lazy/map-chart.d.ts.map +1 -0
  261. package/dist/lazy/map-chart.js +5 -0
  262. package/dist/lazy/map-chart.js.map +1 -0
  263. package/dist/lazy/matrix-chart.d.ts +4 -0
  264. package/dist/lazy/matrix-chart.d.ts.map +1 -0
  265. package/dist/lazy/matrix-chart.js +5 -0
  266. package/dist/lazy/matrix-chart.js.map +1 -0
  267. package/dist/lazy/treemap-chart.d.ts +4 -0
  268. package/dist/lazy/treemap-chart.d.ts.map +1 -0
  269. package/dist/lazy/treemap-chart.js +5 -0
  270. package/dist/lazy/treemap-chart.js.map +1 -0
  271. package/dist/node_modules/lit-html/directive.js +28 -0
  272. package/dist/node_modules/lit-html/directive.js.map +1 -0
  273. package/dist/node_modules/lit-html/directives/style-map.js +37 -0
  274. package/dist/node_modules/lit-html/directives/style-map.js.map +1 -0
  275. package/dist/node_modules/lit-html/lit-html.js +231 -0
  276. package/dist/node_modules/lit-html/lit-html.js.map +1 -0
  277. package/dist/utils/axis-units.d.ts +15 -0
  278. package/dist/utils/axis-units.d.ts.map +1 -0
  279. package/dist/utils/axis-units.js +27 -0
  280. package/dist/utils/axis-units.js.map +1 -0
  281. package/dist/utils/chart-helpers.d.ts +4 -6
  282. package/dist/utils/chart-helpers.d.ts.map +1 -1
  283. package/dist/utils/chart-helpers.js +16 -15
  284. package/dist/utils/chart-helpers.js.map +1 -1
  285. package/dist/utils/format-text.d.ts +5 -0
  286. package/dist/utils/format-text.d.ts.map +1 -1
  287. package/dist/utils/format-text.js +7 -0
  288. package/dist/utils/format-text.js.map +1 -1
  289. package/dist/utils/fuse-palette.d.ts +12 -0
  290. package/dist/utils/fuse-palette.d.ts.map +1 -1
  291. package/dist/utils/fuse-palette.js +23 -1
  292. package/dist/utils/fuse-palette.js.map +1 -1
  293. package/dist/utils/fuse-widget.d.ts +13 -4
  294. package/dist/utils/fuse-widget.d.ts.map +1 -1
  295. package/dist/utils/fuse-widget.js.map +1 -1
  296. package/dist/utils/fusedash-visual.d.ts +65 -52
  297. package/dist/utils/fusedash-visual.d.ts.map +1 -1
  298. package/dist/utils/fusedash-visual.js +48 -29
  299. package/dist/utils/fusedash-visual.js.map +1 -1
  300. package/package.json +38 -11
  301. package/dist/components/donut-group-chart/element/styles.d.ts +0 -2
  302. package/dist/components/donut-group-chart/element/styles.d.ts.map +0 -1
  303. package/dist/components/donut-group-chart/element/styles.js.map +0 -1
  304. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts +0 -34
  305. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts.map +0 -1
  306. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js +0 -169
  307. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js.map +0 -1
  308. package/dist/components/donut-group-chart/index.d.ts +0 -5
  309. package/dist/components/donut-group-chart/index.d.ts.map +0 -1
  310. package/dist/components/donut-group-chart/index.js +0 -23
  311. package/dist/components/donut-group-chart/lib/domain.d.ts +0 -39
  312. package/dist/components/donut-group-chart/lib/domain.d.ts.map +0 -1
  313. package/dist/components/donut-group-chart/lib/domain.js +0 -51
  314. package/dist/components/donut-group-chart/lib/domain.js.map +0 -1
  315. package/dist/components/donut-group-chart/lib/format.d.ts +0 -7
  316. package/dist/components/donut-group-chart/lib/format.d.ts.map +0 -1
  317. package/dist/components/donut-group-chart/lib/format.js +0 -21
  318. package/dist/components/donut-group-chart/lib/format.js.map +0 -1
  319. package/dist/components/donut-group-chart/lib/index.d.ts +0 -5
  320. package/dist/components/donut-group-chart/lib/index.d.ts.map +0 -1
  321. package/dist/components/donut-group-chart/lib/normalize.d.ts +0 -14
  322. package/dist/components/donut-group-chart/lib/normalize.d.ts.map +0 -1
  323. package/dist/components/donut-group-chart/lib/normalize.js +0 -98
  324. package/dist/components/donut-group-chart/lib/normalize.js.map +0 -1
  325. package/dist/components/donut-group-chart/lib/types.d.ts +0 -49
  326. package/dist/components/donut-group-chart/lib/types.d.ts.map +0 -1
  327. package/dist/components/donut-group-chart/metadata.json.d.ts +0 -113
  328. package/dist/components/donut-group-chart/metadata.json.js +0 -45
  329. package/dist/components/donut-group-chart/render/draw.d.ts +0 -44
  330. package/dist/components/donut-group-chart/render/draw.d.ts.map +0 -1
  331. package/dist/components/donut-group-chart/render/draw.js +0 -194
  332. package/dist/components/donut-group-chart/render/draw.js.map +0 -1
  333. package/dist/components/donut-group-chart/render/index.d.ts +0 -2
  334. package/dist/components/donut-group-chart/render/index.d.ts.map +0 -1
  335. package/dist/components/donut-group-chart/tests/fixtures.d.ts +0 -33
  336. package/dist/components/donut-group-chart/tests/fixtures.d.ts.map +0 -1
  337. package/dist/lazy/donut-group-chart.d.ts +0 -4
  338. package/dist/lazy/donut-group-chart.d.ts.map +0 -1
  339. package/dist/lazy/donut-group-chart.js +0 -5
  340. package/dist/lazy/donut-group-chart.js.map +0 -1
  341. /package/dist/components/{donut-group-chart → matrix-chart}/index.js.map +0 -0
  342. /package/dist/components/{donut-group-chart → treemap-chart}/metadata.json.js.map +0 -0
@@ -0,0 +1,182 @@
1
+ import { resolveFormattingColor } from "../../../utils/fuse-palette.js";
2
+ import { seriesColor } from "../../../utils/fusedash-visual.js";
3
+ import { isFuseWidgetPayload, firstField, rowsOf } from "../../../utils/fuse-widget.js";
4
+ import { hasLightColor, treemapRangeColors, treemapValueRanges, treemapColorForValue } from "./color.js";
5
+ const EMPTY = { mode: "single", tiles: [], groups: [], rangeColors: [] };
6
+ function normalizeKey(raw) {
7
+ return displayLabel(raw).toLowerCase();
8
+ }
9
+ function displayLabel(raw) {
10
+ return String(raw ?? "").trim().replace(/\s+/g, " ");
11
+ }
12
+ function aggregateByCategory(rows, categoryKey, getValue) {
13
+ const byKey = /* @__PURE__ */ new Map();
14
+ for (const row of rows) {
15
+ const raw = categoryKey ? row == null ? void 0 : row[categoryKey] : "";
16
+ const key = normalizeKey(raw);
17
+ const existing = byKey.get(key);
18
+ if (existing) {
19
+ existing.value += getValue(row);
20
+ } else {
21
+ byKey.set(key, { key, label: displayLabel(raw), value: getValue(row) });
22
+ }
23
+ }
24
+ return [...byKey.values()].sort((a, b) => b.value - a.value || a.label.localeCompare(b.label));
25
+ }
26
+ function tilesFrom(entries, baseColor, paletteRange) {
27
+ const rangeColors = treemapRangeColors(baseColor);
28
+ const ranges = treemapValueRanges(
29
+ entries.map((entry) => entry.value),
30
+ paletteRange
31
+ );
32
+ const tiles = entries.map((entry) => {
33
+ const color = treemapColorForValue(entry.value, ranges, rangeColors, baseColor);
34
+ return {
35
+ key: entry.key,
36
+ label: entry.label,
37
+ value: entry.value,
38
+ color,
39
+ lightFill: hasLightColor(color)
40
+ };
41
+ });
42
+ return { tiles, rangeColors };
43
+ }
44
+ function singleBaseColor(formatting) {
45
+ return resolveFormattingColor(formatting, "default", (formatting == null ? void 0 : formatting.length) ?? 1);
46
+ }
47
+ function groupBaseColor(formatting, groupLabel) {
48
+ if (!(formatting == null ? void 0 : formatting.length) || !groupLabel) {
49
+ return resolveFormattingColor([{ key: "default", color: "1" }], "default", 1);
50
+ }
51
+ const matched = formatting.filter((entry) => String(entry.key) === groupLabel);
52
+ if (!matched.length) return resolveFormattingColor(void 0, "default", 1);
53
+ return resolveFormattingColor(matched, String(matched[0].key ?? "default"), 1);
54
+ }
55
+ function toNumber(value) {
56
+ const n = Number(value);
57
+ return Number.isFinite(n) ? n : 0;
58
+ }
59
+ function fromFuseWidget(widget) {
60
+ var _a;
61
+ const categoryField = firstField(widget.groupBy ?? void 0) ?? firstField(widget.xAxe ?? void 0);
62
+ const valueField = firstField(widget.metric ?? void 0) ?? firstField(widget.yAxe ?? void 0);
63
+ const rawSubgroup = widget.subgroup ? String(widget.subgroup) : void 0;
64
+ const subgroupField = rawSubgroup && rawSubgroup !== categoryField ? rawSubgroup : void 0;
65
+ const rows = rowsOf(widget);
66
+ const getValue = (row) => valueField ? toNumber(row == null ? void 0 : row[valueField]) : 0;
67
+ const axisDetails = widget.axisDetails ?? void 0;
68
+ const paletteRange = (_a = widget.palette) == null ? void 0 : _a.range;
69
+ if (!subgroupField) {
70
+ const entries = categoryField ? aggregateByCategory(rows, categoryField, getValue) : (
71
+ // Without a category dimension the client keeps the raw per-row nodes.
72
+ rows.map((row, i) => ({ key: String(i), label: "", value: getValue(row) }))
73
+ );
74
+ const { tiles, rangeColors } = tilesFrom(entries, singleBaseColor(widget.formatting), paletteRange);
75
+ return {
76
+ mode: "single",
77
+ tiles,
78
+ groups: [],
79
+ rangeColors,
80
+ categoryField,
81
+ valueField,
82
+ axisDetails
83
+ };
84
+ }
85
+ const grouped = /* @__PURE__ */ new Map();
86
+ for (const row of rows) {
87
+ if (!categoryField) continue;
88
+ const label = displayLabel(row == null ? void 0 : row[categoryField]);
89
+ if (!label) continue;
90
+ const key = label.toLowerCase();
91
+ const bucket = grouped.get(key);
92
+ if (bucket) bucket.rows.push(row);
93
+ else grouped.set(key, { label, rows: [row] });
94
+ }
95
+ const groups = [...grouped.entries()].sort(([, a], [, b]) => a.label.localeCompare(b.label)).map(([key, { label, rows: groupRows }]) => ({
96
+ key,
97
+ label,
98
+ tiles: tilesFrom(
99
+ aggregateByCategory(groupRows, subgroupField, getValue),
100
+ groupBaseColor(widget.formatting, label),
101
+ paletteRange
102
+ ).tiles
103
+ }));
104
+ return {
105
+ mode: "grouped",
106
+ tiles: [],
107
+ groups,
108
+ rangeColors: [],
109
+ categoryField,
110
+ valueField,
111
+ subgroupField,
112
+ axisDetails
113
+ };
114
+ }
115
+ function fromLabelValue(rows) {
116
+ const entries = rows.map((row) => ({
117
+ key: normalizeKey(row.label),
118
+ label: displayLabel(row.label),
119
+ value: Number(row.value)
120
+ })).filter((row) => Number.isFinite(row.value));
121
+ if (!entries.length) return EMPTY;
122
+ const { tiles, rangeColors } = tilesFrom(
123
+ entries.sort((a, b) => b.value - a.value || a.label.localeCompare(b.label)),
124
+ singleBaseColor(void 0)
125
+ );
126
+ const overrides = new Map(
127
+ rows.filter((row) => row.color).map((row) => [normalizeKey(row.label), row.color])
128
+ );
129
+ return {
130
+ mode: "single",
131
+ tiles: tiles.map((tile) => {
132
+ const override = overrides.get(tile.key);
133
+ return override ? { ...tile, color: override, lightFill: hasLightColor(override) } : tile;
134
+ }),
135
+ groups: [],
136
+ rangeColors
137
+ };
138
+ }
139
+ function fromPoints(points) {
140
+ return fromLabelValue(points.map((point) => ({ label: String(point.x), value: Number(point.y) })));
141
+ }
142
+ function fromSeries(series) {
143
+ const groups = series.map((entry, index) => {
144
+ const label = entry.name ?? entry.id;
145
+ const entries = aggregateByCategory(
146
+ entry.points ?? [],
147
+ "x",
148
+ (row) => toNumber(row.y)
149
+ );
150
+ return {
151
+ key: normalizeKey(label),
152
+ label: displayLabel(label),
153
+ tiles: tilesFrom(entries, entry.color ?? seriesColor(index)).tiles
154
+ };
155
+ }).filter((group) => group.tiles.length > 0);
156
+ if (!groups.length) return EMPTY;
157
+ return { mode: "grouped", tiles: [], groups, rangeColors: [] };
158
+ }
159
+ function isLabelValueArray(input) {
160
+ if (!Array.isArray(input) || !input.length) return false;
161
+ const first = input[0];
162
+ return first != null && typeof first === "object" && "label" in first && "value" in first;
163
+ }
164
+ function normalizeTreemapData(input) {
165
+ if (!input) return EMPTY;
166
+ if (Array.isArray(input)) {
167
+ return isLabelValueArray(input) ? fromLabelValue(input) : EMPTY;
168
+ }
169
+ if (isFuseWidgetPayload(input)) return fromFuseWidget(input);
170
+ const shorthand = input;
171
+ if (Array.isArray(shorthand.series) && shorthand.series.length) {
172
+ return fromSeries(shorthand.series);
173
+ }
174
+ if (Array.isArray(shorthand.points) && shorthand.points.length) {
175
+ return fromPoints(shorthand.points);
176
+ }
177
+ return EMPTY;
178
+ }
179
+ export {
180
+ normalizeTreemapData
181
+ };
182
+ //# sourceMappingURL=normalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.js","sources":["../../../../src/components/treemap-chart/lib/normalize.ts"],"sourcesContent":["import { resolveFormattingColor, type FuseFormattingEntry } from '../../../utils/fuse-palette.js';\nimport { seriesColor } from '../../../utils/fusedash-visual.js';\nimport {\n firstField,\n isFuseWidgetPayload,\n rowsOf,\n type FuseWidgetLike,\n} from '../../../utils/fuse-widget.js';\nimport {\n hasLightColor,\n treemapColorForValue,\n treemapRangeColors,\n treemapValueRanges,\n} from './color.js';\nimport type {\n TreemapChartData,\n TreemapGroupCard,\n TreemapLabelValue,\n TreemapModel,\n TreemapPoint,\n TreemapSeries,\n TreemapTile,\n} from './types.js';\n\ntype RawRow = Record<string, unknown>;\n\nconst EMPTY: TreemapModel = { mode: 'single', tiles: [], groups: [], rangeColors: [] };\n\n/** Client `normalizeCategoryKey` — case- and whitespace-insensitive group key. */\nfunction normalizeKey(raw: unknown): string {\n return displayLabel(raw).toLowerCase();\n}\n\n/** First-seen trimmed spelling, kept for display (client `aggregateByCategory`). */\nfunction displayLabel(raw: unknown): string {\n return String(raw ?? '')\n .trim()\n .replace(/\\s+/g, ' ');\n}\n\ntype Aggregate = { key: string; label: string; value: number };\n\n/**\n * Mirrors client `aggregateByCategory`: one entry per normalized category with\n * the metric summed, sorted by value desc then label asc so the layout is\n * stable whatever order the payload arrives in (FUS-3836 / FUS-3868).\n */\nfunction aggregateByCategory(\n rows: RawRow[],\n categoryKey: string | undefined,\n getValue: (row: RawRow) => number,\n): Aggregate[] {\n const byKey = new Map<string, Aggregate>();\n for (const row of rows) {\n const raw = categoryKey ? row?.[categoryKey] : '';\n const key = normalizeKey(raw);\n const existing = byKey.get(key);\n if (existing) {\n existing.value += getValue(row);\n } else {\n byKey.set(key, { key, label: displayLabel(raw), value: getValue(row) });\n }\n }\n return [...byKey.values()].sort((a, b) => b.value - a.value || a.label.localeCompare(b.label));\n}\n\n/** Paint one set of leaves with the seven magnitude bands of `baseColor`. */\nfunction tilesFrom(\n entries: Aggregate[],\n baseColor: string,\n paletteRange?: number[] | null,\n): { tiles: TreemapTile[]; rangeColors: string[] } {\n const rangeColors = treemapRangeColors(baseColor);\n const ranges = treemapValueRanges(\n entries.map((entry) => entry.value),\n paletteRange,\n );\n const tiles = entries.map((entry) => {\n const color = treemapColorForValue(entry.value, ranges, rangeColors, baseColor);\n return {\n key: entry.key,\n label: entry.label,\n value: entry.value,\n color,\n lightFill: hasLightColor(color),\n };\n });\n return { tiles, rangeColors };\n}\n\n/**\n * Client `TreemapSingle` reads the widget's own formatting and asks for the\n * `default` key, so a single-dimension treemap always ramps one palette color.\n */\nfunction singleBaseColor(formatting: FuseFormattingEntry[] | null | undefined): string {\n return resolveFormattingColor(formatting, 'default', formatting?.length ?? 1);\n}\n\n/**\n * Client `getFormattingByGroupName` narrows formatting to the entry matching the\n * group, so each card ramps its own qualitative color. A group with no matching\n * entry falls back to the default palette color (the client's own fallback there\n * is a raw blue, which reads as a rendering bug in chat).\n */\nfunction groupBaseColor(\n formatting: FuseFormattingEntry[] | null | undefined,\n groupLabel: string,\n): string {\n if (!formatting?.length || !groupLabel) {\n return resolveFormattingColor([{ key: 'default', color: '1' }], 'default', 1);\n }\n const matched = formatting.filter((entry) => String(entry.key) === groupLabel);\n if (!matched.length) return resolveFormattingColor(undefined, 'default', 1);\n return resolveFormattingColor(matched, String(matched[0].key ?? 'default'), 1);\n}\n\nfunction toNumber(value: unknown): number {\n const n = Number(value);\n return Number.isFinite(n) ? n : 0;\n}\n\nfunction fromFuseWidget(widget: FuseWidgetLike): TreemapModel {\n const categoryField = firstField(widget.groupBy ?? undefined) ?? firstField(widget.xAxe ?? undefined);\n const valueField = firstField(widget.metric ?? undefined) ?? firstField(widget.yAxe ?? undefined);\n const rawSubgroup = widget.subgroup ? String(widget.subgroup) : undefined;\n // Grouped only makes sense with a *second*, distinct dimension to nest —\n // otherwise the area-by-value encoding is lost to equal-height bands (FUS-3868).\n const subgroupField =\n rawSubgroup && rawSubgroup !== categoryField ? rawSubgroup : undefined;\n\n const rows = rowsOf(widget);\n const getValue = (row: RawRow) => (valueField ? toNumber(row?.[valueField]) : 0);\n const axisDetails = widget.axisDetails ?? undefined;\n const paletteRange = widget.palette?.range;\n\n if (!subgroupField) {\n const entries = categoryField\n ? aggregateByCategory(rows, categoryField, getValue)\n : // Without a category dimension the client keeps the raw per-row nodes.\n rows.map((row, i) => ({ key: String(i), label: '', value: getValue(row) }));\n const { tiles, rangeColors } = tilesFrom(entries, singleBaseColor(widget.formatting), paletteRange);\n return {\n mode: 'single',\n tiles,\n groups: [],\n rangeColors,\n categoryField,\n valueField,\n axisDetails,\n };\n }\n\n const grouped = new Map<string, { label: string; rows: RawRow[] }>();\n for (const row of rows) {\n if (!categoryField) continue;\n const label = displayLabel(row?.[categoryField]);\n if (!label) continue;\n const key = label.toLowerCase();\n const bucket = grouped.get(key);\n if (bucket) bucket.rows.push(row);\n else grouped.set(key, { label, rows: [row] });\n }\n\n const groups: TreemapGroupCard[] = [...grouped.entries()]\n .sort(([, a], [, b]) => a.label.localeCompare(b.label))\n .map(([key, { label, rows: groupRows }]) => ({\n key,\n label,\n tiles: tilesFrom(\n aggregateByCategory(groupRows, subgroupField, getValue),\n groupBaseColor(widget.formatting, label),\n paletteRange,\n ).tiles,\n }));\n\n return {\n mode: 'grouped',\n tiles: [],\n groups,\n rangeColors: [],\n categoryField,\n valueField,\n subgroupField,\n axisDetails,\n };\n}\n\nfunction fromLabelValue(rows: TreemapLabelValue[]): TreemapModel {\n const entries = rows\n .map((row) => ({\n key: normalizeKey(row.label),\n label: displayLabel(row.label),\n value: Number(row.value),\n }))\n .filter((row) => Number.isFinite(row.value));\n if (!entries.length) return EMPTY;\n\n const { tiles, rangeColors } = tilesFrom(\n entries.sort((a, b) => b.value - a.value || a.label.localeCompare(b.label)),\n singleBaseColor(undefined),\n );\n // An explicit per-row color wins over the magnitude band.\n const overrides = new Map(\n rows\n .filter((row) => row.color)\n .map((row) => [normalizeKey(row.label), row.color as string]),\n );\n return {\n mode: 'single',\n tiles: tiles.map((tile) => {\n const override = overrides.get(tile.key);\n return override ? { ...tile, color: override, lightFill: hasLightColor(override) } : tile;\n }),\n groups: [],\n rangeColors,\n };\n}\n\nfunction fromPoints(points: TreemapPoint[]): TreemapModel {\n return fromLabelValue(points.map((point) => ({ label: String(point.x), value: Number(point.y) })));\n}\n\nfunction fromSeries(series: TreemapSeries[]): TreemapModel {\n const groups = series\n .map((entry, index): TreemapGroupCard => {\n const label = entry.name ?? entry.id;\n const entries = aggregateByCategory(\n (entry.points ?? []) as unknown as RawRow[],\n 'x',\n (row) => toNumber(row.y),\n );\n return {\n key: normalizeKey(label),\n label: displayLabel(label),\n tiles: tilesFrom(entries, entry.color ?? seriesColor(index)).tiles,\n };\n })\n .filter((group) => group.tiles.length > 0);\n\n if (!groups.length) return EMPTY;\n return { mode: 'grouped', tiles: [], groups, rangeColors: [] };\n}\n\nfunction isLabelValueArray(input: unknown): input is TreemapLabelValue[] {\n if (!Array.isArray(input) || !input.length) return false;\n const first = input[0] as RawRow;\n return first != null && typeof first === 'object' && 'label' in first && 'value' in first;\n}\n\n/** Normalize chat payloads and FuseDash widget mocks into treemap leaves. */\nexport function normalizeTreemapData(input: TreemapChartData): TreemapModel {\n if (!input) return EMPTY;\n\n if (Array.isArray(input)) {\n return isLabelValueArray(input) ? fromLabelValue(input) : EMPTY;\n }\n\n if (isFuseWidgetPayload(input)) return fromFuseWidget(input);\n\n const shorthand = input as { points?: TreemapPoint[]; series?: TreemapSeries[] };\n if (Array.isArray(shorthand.series) && shorthand.series.length) {\n return fromSeries(shorthand.series);\n }\n if (Array.isArray(shorthand.points) && shorthand.points.length) {\n return fromPoints(shorthand.points);\n }\n\n return EMPTY;\n}\n"],"names":[],"mappings":";;;;AA0BA,MAAM,QAAsB,EAAE,MAAM,UAAU,OAAO,CAAA,GAAI,QAAQ,CAAA,GAAI,aAAa,GAAC;AAGnF,SAAS,aAAa,KAAsB;AAC1C,SAAO,aAAa,GAAG,EAAE,YA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C7D;AAEA,SAAS,kBAAkB,OAA8C;AACvE,MAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,MAAM,OAAQ,QAAO;AACnD,QAAM,QAAQ,MAAM,CAAC;AACrB,SAAO,SAAS,QAAQ,OAAO,UAAU,YAAY,WAAW,SAAS,WAAW;AACtF;AAGO,SAAS,qBAAqB,OAAuC;AAC1E,MAAI,CAAC,MAAO,QAAO;AAEnB,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,kBAAkB,KAAK,IAAI,eAAe,KAAK,IAAI;AAAA,EAC5D;AAEA,MAAI,oBAAoB,KAAK,EAAG,QAAO,eAAe,KAAK;AAE3D,QAAM,YAAY;AAClB,MAAI,MAAM,QAAQ,UAAU,MAAM,KAAK,UAAU,OAAO,QAAQ;AAC9D,WAAO,WAAW,UAAU,MAAM;AAAA,EACpC;AACA,MAAI,MAAM,QAAQ,UAAU,MAAM,KAAK,UAAU,OAAO,QAAQ;AAC9D,WAAO,WAAW,UAAU,MAAM;AAAA,EACpC;AAEA,SAAO;AACT;"}
@@ -0,0 +1,63 @@
1
+ import { FuseAxisDetail, FuseWidgetLike } from '../../../utils/fuse-widget.js';
2
+ /**
3
+ * FuseDash routes on a *second* dimension: `subgroup` distinct from
4
+ * `groupBy[0]` renders one card per group (`TreemapGroup`), anything else
5
+ * renders a single area-proportional treemap (`TreemapSingle`). See FUS-3868.
6
+ */
7
+ export type TreemapMode = 'single' | 'grouped';
8
+ /** One leaf rectangle — area encodes `value`, fill encodes its magnitude band. */
9
+ export interface TreemapTile {
10
+ /** Case/whitespace-normalized grouping key */
11
+ key: string;
12
+ /** Display label (first-seen trimmed spelling) */
13
+ label: string;
14
+ value: number;
15
+ color: string;
16
+ /** True when `color` is bright enough to need dark text (client `hasLightColor`) */
17
+ lightFill: boolean;
18
+ }
19
+ /** One card of the grouped treemap: a group header plus its subgroup tiles. */
20
+ export interface TreemapGroupCard {
21
+ key: string;
22
+ label: string;
23
+ tiles: TreemapTile[];
24
+ }
25
+ export interface TreemapModel {
26
+ mode: TreemapMode;
27
+ /** Single mode leaves; empty in grouped mode */
28
+ tiles: TreemapTile[];
29
+ /** Grouped mode cards; empty in single mode */
30
+ groups: TreemapGroupCard[];
31
+ /** Sequential band colors, low → high — the palette legend in single mode */
32
+ rangeColors: string[];
33
+ /** FuseDash `groupBy[0] ?? xAxe[0]` — the category dimension */
34
+ categoryField?: string;
35
+ /** FuseDash `metric[0] ?? yAxe[0]` — the measured column */
36
+ valueField?: string;
37
+ /** FuseDash `subgroup` — the nested dimension, and each card's caption */
38
+ subgroupField?: string;
39
+ axisDetails?: Record<string, FuseAxisDetail>;
40
+ }
41
+ /** Chat shorthand: one tile per point. */
42
+ export interface TreemapPoint {
43
+ x: string;
44
+ y: number;
45
+ }
46
+ /** Chat shorthand: one card per series, one tile per point. */
47
+ export interface TreemapSeries {
48
+ id: string;
49
+ name?: string;
50
+ color?: string;
51
+ points: TreemapPoint[];
52
+ }
53
+ export type TreemapLabelValue = {
54
+ label: string;
55
+ value: number;
56
+ color?: string;
57
+ };
58
+ export type TreemapChartData = TreemapLabelValue[] | {
59
+ points: TreemapPoint[];
60
+ } | {
61
+ series: TreemapSeries[];
62
+ } | FuseWidgetLike | null | undefined;
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpF;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/C,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;I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AS,CAAC"}
@@ -0,0 +1,126 @@
1
+ declare const _default: {
2
+ "id": "treemap-chart",
3
+ "tag": "ui9000-treemap-chart",
4
+ "title": "Treemap",
5
+ "description": "Chat-optimized treemap rewritten in D3 (Visx → D3). One area-proportional `treemapBinary` layout when the widget has a single category dimension, or the FuseDash card mosaic with a nested treemap per group when `subgroup` adds a second dimension. Tiles are colored by magnitude across seven shades of the group color. No Redux.",
6
+ "chartTypeKeys": ["treemapChart"],
7
+ "chartTypeMap": {
8
+ "treemapChart": { "showLegend": true, "showTooltip": true }
9
+ },
10
+ "source": "client/libs/shared/components/src/Widgets/Treemap/",
11
+ "stack": "d3",
12
+ "lazyImport": "@fusedashlabs/widgets/lazy/treemap-chart",
13
+ "entry": "@fusedashlabs/widgets/treemap-chart",
14
+ "usageConditions": {
15
+ "host": "mcp-chat",
16
+ "notFor": "fusedash-editor",
17
+ "mapsExcluded": true,
18
+ "context": "theme, scale, styleId and mode come from WidgetContext CSS custom properties, not props"
19
+ },
20
+ "allowedActions": ["hover", "resize"],
21
+ "propsSchema": {
22
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
23
+ "type": "object",
24
+ "properties": {
25
+ "data": {
26
+ "oneOf": [
27
+ {
28
+ "type": "array",
29
+ "description": "Chat shorthand — one tile per row, area proportional to `value`.",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["label", "value"],
33
+ "properties": {
34
+ "label": { "type": "string" },
35
+ "value": { "type": "number" },
36
+ "color": { "type": "string" }
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "points": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "required": ["x", "y"],
48
+ "properties": {
49
+ "x": { "type": "string" },
50
+ "y": { "type": "number" }
51
+ }
52
+ }
53
+ },
54
+ "series": {
55
+ "type": "array",
56
+ "description": "One card per series — the grouped treemap.",
57
+ "items": {
58
+ "type": "object",
59
+ "required": ["id", "points"],
60
+ "properties": {
61
+ "id": { "type": "string" },
62
+ "name": { "type": "string" },
63
+ "color": { "type": "string" },
64
+ "points": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "required": ["x", "y"],
69
+ "properties": {
70
+ "x": { "type": "string" },
71
+ "y": { "type": "number" }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ },
80
+ {
81
+ "type": "object",
82
+ "description": "FuseDash WidgetItem — `data` rows plus `groupBy` / `subgroup` / `metric` / `yAxe` / `formatting`.",
83
+ "required": ["data"],
84
+ "properties": {
85
+ "name": { "type": "string" },
86
+ "data": { "type": "array", "items": { "type": "object" } },
87
+ "xAxe": { "type": "array", "items": { "type": "string" } },
88
+ "yAxe": { "type": "array", "items": { "type": "string" } },
89
+ "groupBy": { "type": "array", "items": { "type": "string" } },
90
+ "metric": { "type": "array", "items": { "type": "string" } },
91
+ "subgroup": {
92
+ "type": "string",
93
+ "description": "Second dimension; when set and distinct from `groupBy[0]` the chart renders one card per group."
94
+ },
95
+ "formatting": { "type": "array", "items": { "type": "object" } },
96
+ "palette": {
97
+ "type": "object",
98
+ "properties": {
99
+ "range": {
100
+ "type": "array",
101
+ "items": { "type": "number" },
102
+ "description": "Pins the color break points instead of deriving them from the values."
103
+ }
104
+ }
105
+ },
106
+ "uniqueValues": { "type": "object" },
107
+ "axisDetails": { "type": "object" }
108
+ }
109
+ }
110
+ ]
111
+ },
112
+ "chartTitle": { "type": "string" },
113
+ "showHeader": { "type": "boolean", "default": true },
114
+ "showLegend": {
115
+ "type": "boolean",
116
+ "default": true,
117
+ "description": "Low→High palette strip; single-dimension treemaps only."
118
+ },
119
+ "showTooltip": { "type": "boolean", "default": true }
120
+ },
121
+ "required": ["data"]
122
+ }
123
+ }
124
+ ;
125
+
126
+ export default _default;
@@ -0,0 +1,45 @@
1
+ const id = "treemap-chart";
2
+ const tag = "ui9000-treemap-chart";
3
+ const title = "Treemap";
4
+ const description = "Chat-optimized treemap rewritten in D3 (Visx → D3). One area-proportional `treemapBinary` layout when the widget has a single category dimension, or the FuseDash card mosaic with a nested treemap per group when `subgroup` adds a second dimension. Tiles are colored by magnitude across seven shades of the group color. No Redux.";
5
+ const chartTypeKeys = ["treemapChart"];
6
+ const chartTypeMap = { "treemapChart": { "showLegend": true, "showTooltip": true } };
7
+ const source = "client/libs/shared/components/src/Widgets/Treemap/";
8
+ const stack = "d3";
9
+ const lazyImport = "@fusedashlabs/widgets/lazy/treemap-chart";
10
+ const entry = "@fusedashlabs/widgets/treemap-chart";
11
+ const usageConditions = { "host": "mcp-chat", "notFor": "fusedash-editor", "mapsExcluded": true, "context": "theme, scale, styleId and mode come from WidgetContext CSS custom properties, not props" };
12
+ const allowedActions = ["hover", "resize"];
13
+ const propsSchema = { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "oneOf": [{ "type": "array", "description": "Chat shorthand — one tile per row, area proportional to `value`.", "items": { "type": "object", "required": ["label", "value"], "properties": { "label": { "type": "string" }, "value": { "type": "number" }, "color": { "type": "string" } } } }, { "type": "object", "properties": { "points": { "type": "array", "items": { "type": "object", "required": ["x", "y"], "properties": { "x": { "type": "string" }, "y": { "type": "number" } } } }, "series": { "type": "array", "description": "One card per series — the grouped treemap.", "items": { "type": "object", "required": ["id", "points"], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "points": { "type": "array", "items": { "type": "object", "required": ["x", "y"], "properties": { "x": { "type": "string" }, "y": { "type": "number" } } } } } } } } }, { "type": "object", "description": "FuseDash WidgetItem — `data` rows plus `groupBy` / `subgroup` / `metric` / `yAxe` / `formatting`.", "required": ["data"], "properties": { "name": { "type": "string" }, "data": { "type": "array", "items": { "type": "object" } }, "xAxe": { "type": "array", "items": { "type": "string" } }, "yAxe": { "type": "array", "items": { "type": "string" } }, "groupBy": { "type": "array", "items": { "type": "string" } }, "metric": { "type": "array", "items": { "type": "string" } }, "subgroup": { "type": "string", "description": "Second dimension; when set and distinct from `groupBy[0]` the chart renders one card per group." }, "formatting": { "type": "array", "items": { "type": "object" } }, "palette": { "type": "object", "properties": { "range": { "type": "array", "items": { "type": "number" }, "description": "Pins the color break points instead of deriving them from the values." } } }, "uniqueValues": { "type": "object" }, "axisDetails": { "type": "object" } } }] }, "chartTitle": { "type": "string" }, "showHeader": { "type": "boolean", "default": true }, "showLegend": { "type": "boolean", "default": true, "description": "Low→High palette strip; single-dimension treemaps only." }, "showTooltip": { "type": "boolean", "default": true } }, "required": ["data"] };
14
+ const treemapMeta = {
15
+ id,
16
+ tag,
17
+ title,
18
+ description,
19
+ chartTypeKeys,
20
+ chartTypeMap,
21
+ source,
22
+ stack,
23
+ lazyImport,
24
+ entry,
25
+ usageConditions,
26
+ allowedActions,
27
+ propsSchema
28
+ };
29
+ export {
30
+ allowedActions,
31
+ chartTypeKeys,
32
+ chartTypeMap,
33
+ treemapMeta as default,
34
+ description,
35
+ entry,
36
+ id,
37
+ lazyImport,
38
+ propsSchema,
39
+ source,
40
+ stack,
41
+ tag,
42
+ title,
43
+ usageConditions
44
+ };
45
+ //# sourceMappingURL=metadata.json.js.map
@@ -0,0 +1,24 @@
1
+ import { WidgetTheme } from '../../../types/index.js';
2
+ import { TreemapGroupCard, TreemapModel, TreemapTile } from '../lib/types.js';
3
+ export interface TreemapHoverPayload {
4
+ tile: TreemapTile;
5
+ /** The card the tile belongs to, in grouped mode */
6
+ group?: TreemapGroupCard;
7
+ event: MouseEvent;
8
+ }
9
+ export interface RenderTreemapChartOptions {
10
+ model: TreemapModel;
11
+ width: number;
12
+ height: number;
13
+ theme: WidgetTheme;
14
+ showTooltip?: boolean;
15
+ onHover?: (payload: TreemapHoverPayload) => void;
16
+ onLeave?: () => void;
17
+ }
18
+ /**
19
+ * FuseDash Treemap — D3 rewrite of the Visx `TreemapSingle` / `TreemapGroup`.
20
+ * Single mode is one area-proportional `treemapBinary` layout; grouped mode is
21
+ * the client's card mosaic with a nested treemap per group.
22
+ */
23
+ export declare function renderTreemapChart(container: HTMLElement, options: RenderTreemapChartOptions): void;
24
+ //# sourceMappingURL=draw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/render/draw.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAsLD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAyDN"}
@@ -0,0 +1,124 @@
1
+ import { hierarchy, treemap, treemapBinary } from "d3-hierarchy";
2
+ import { select } from "d3-selection";
3
+ import { FD } from "../../../utils/fusedash-visual.js";
4
+ import { formatTreemapValue } from "../lib/format.js";
5
+ import { treemapGridTemplate } from "../lib/layout.js";
6
+ function gradientIds(svg, colors, prefix) {
7
+ const defs = svg.append("defs");
8
+ const ids = /* @__PURE__ */ new Map();
9
+ let index = 0;
10
+ for (const color of new Set(colors)) {
11
+ const id = `${prefix}-fill-${index++}`;
12
+ const gradient = defs.append("linearGradient").attr("id", id).attr("x1", "0").attr("y1", "0").attr("x2", "0").attr("y2", "1");
13
+ gradient.append("stop").attr("offset", "0%").attr("stop-color", color).attr("stop-opacity", 1);
14
+ gradient.append("stop").attr("offset", "100%").attr("stop-color", color).attr("stop-opacity", FD.treemapGradientBottomOpacity);
15
+ ids.set(color, id);
16
+ }
17
+ return ids;
18
+ }
19
+ function appendStripes(parent, width, height, clipId) {
20
+ const count = Math.floor(height / FD.treemapStripeSpacing);
21
+ if (count <= 0) return;
22
+ const clip = parent.append("clipPath").attr("id", clipId);
23
+ clip.append("rect").attr("width", width).attr("height", height).attr("rx", FD.treemapTileRadius).attr("ry", FD.treemapTileRadius);
24
+ const stripes = parent.append("g").attr("clip-path", `url(#${clipId})`);
25
+ for (let i = 0; i < count; i++) {
26
+ const y = Math.round((i + 1) * FD.treemapStripeSpacing) + 0.5;
27
+ const progress = y / height;
28
+ const opacity = Math.max(0, FD.treemapStripeOpacity * (1 - progress * FD.treemapStripeFalloff));
29
+ stripes.append("line").attr("x1", 0).attr("x2", width).attr("y1", y).attr("y2", y).attr("stroke", FD.treemapStripeColor).attr("stroke-opacity", opacity).attr("stroke-width", 1).attr("shape-rendering", "crispEdges");
30
+ }
31
+ }
32
+ function appendLabel(parent, tile, width, height, mode) {
33
+ if (width <= FD.treemapMinLabelWidth || height <= FD.treemapMinLabelHeight) return;
34
+ const box = parent.append("foreignObject").attr("width", width).attr("height", height).append("xhtml:div").attr("class", "tile-label").style("color", tile.lightFill ? FD.treemapLabelOnLight : FD.treemapLabelOnDark);
35
+ box.append("xhtml:span").attr("class", "tile-name").text(tile.label);
36
+ if (height > FD.treemapMinValueHeight && tile.value) {
37
+ box.append("xhtml:span").attr("class", "tile-value").text(formatTreemapValue(tile.value, mode));
38
+ }
39
+ }
40
+ function drawTiles(host, tiles, width, height, options, layer, prefix, group) {
41
+ if (!tiles.length || width <= 0 || height <= 0) return;
42
+ const root = hierarchy({ children: tiles.map((tile) => ({ tile })) }).sum((d) => {
43
+ var _a;
44
+ return ((_a = d.tile) == null ? void 0 : _a.value) ?? 0;
45
+ }).sort((a, b) => (b.value ?? 0) - (a.value ?? 0));
46
+ const layout = treemap().tile(treemapBinary).size([width, height]).paddingInner(FD.treemapPaddingInner).round(true)(root);
47
+ const svg = select(host).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
48
+ const fills = gradientIds(
49
+ svg,
50
+ tiles.map((tile) => tile.color),
51
+ prefix
52
+ );
53
+ layout.leaves().forEach((leaf, index) => {
54
+ const tile = leaf.data.tile;
55
+ if (!tile) return;
56
+ const tileWidth = leaf.x1 - leaf.x0;
57
+ const tileHeight = leaf.y1 - leaf.y0;
58
+ if (tileWidth <= 0 || tileHeight <= 0) return;
59
+ const node = svg.append("g").attr("class", "treemap-tile").attr("transform", `translate(${leaf.x0}, ${leaf.y0})`);
60
+ node.append("rect").attr("width", tileWidth).attr("height", tileHeight).attr("rx", FD.treemapTileRadius).attr("ry", FD.treemapTileRadius).attr("fill", `url(#${fills.get(tile.color)})`);
61
+ appendStripes(node, tileWidth, tileHeight, `${prefix}-clip-${index}`);
62
+ appendLabel(node, tile, tileWidth, tileHeight, options.model.mode);
63
+ layer.nodes.push(node.node());
64
+ if (options.showTooltip && options.onHover) {
65
+ const dim = (hovered) => {
66
+ for (const other of layer.nodes) {
67
+ other.style.opacity = hovered == null || other === hovered ? "1" : String(FD.treemapDimOpacity);
68
+ }
69
+ };
70
+ node.style("cursor", "pointer").on("mouseenter", (event) => {
71
+ var _a;
72
+ dim(node.node());
73
+ (_a = options.onHover) == null ? void 0 : _a.call(options, { tile, group, event });
74
+ }).on("mousemove", (event) => {
75
+ var _a;
76
+ (_a = options.onHover) == null ? void 0 : _a.call(options, { tile, group, event });
77
+ }).on("mouseleave", () => {
78
+ var _a;
79
+ dim(null);
80
+ (_a = options.onLeave) == null ? void 0 : _a.call(options);
81
+ });
82
+ }
83
+ });
84
+ }
85
+ function renderTreemapChart(container, options) {
86
+ const { model, width, height, theme } = options;
87
+ container.replaceChildren();
88
+ if (width <= 0 || height <= 0) return;
89
+ const layer = { nodes: [] };
90
+ if (model.mode === "single") {
91
+ drawTiles(container, model.tiles, width, height, options, layer, "tm");
92
+ return;
93
+ }
94
+ const template = treemapGridTemplate(model.groups.length);
95
+ const grid = select(container).append("div").attr("class", "treemap-groups");
96
+ grid.style("grid-template-areas", template.areas).style("grid-template-rows", template.rows);
97
+ const plots = [];
98
+ model.groups.forEach((group, index) => {
99
+ const card = grid.append("div").attr("class", "treemap-card").style("grid-area", `_${index + 1}`);
100
+ const header = card.append("div").attr("class", "treemap-card-header");
101
+ header.append("span").attr("class", "treemap-card-title").attr("title", group.label).style("color", theme.text).text(group.label);
102
+ if (model.subgroupField) {
103
+ header.append("span").attr("class", "treemap-card-subtitle").attr("title", model.subgroupField).style("color", theme.textMuted).text(model.subgroupField);
104
+ }
105
+ const host = card.append("div").attr("class", "treemap-card-plot").node();
106
+ plots.push({ host, group, index });
107
+ });
108
+ for (const { host, group, index } of plots) {
109
+ drawTiles(
110
+ host,
111
+ group.tiles,
112
+ host.clientWidth,
113
+ host.clientHeight,
114
+ options,
115
+ layer,
116
+ `tm-${index}`,
117
+ group
118
+ );
119
+ }
120
+ }
121
+ export {
122
+ renderTreemapChart
123
+ };
124
+ //# sourceMappingURL=draw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draw.js","sources":["../../../../src/components/treemap-chart/render/draw.ts"],"sourcesContent":["import { hierarchy, treemap, treemapBinary } from 'd3-hierarchy';\nimport { select, type Selection } from 'd3-selection';\n\nimport type { WidgetTheme } from '../../../types/index.js';\nimport { FD } from '../../../utils/fusedash-visual.js';\nimport { formatTreemapValue } from '../lib/format.js';\nimport { treemapGridTemplate } from '../lib/layout.js';\nimport type { TreemapGroupCard, TreemapModel, TreemapTile } from '../lib/types.js';\n\nexport interface TreemapHoverPayload {\n tile: TreemapTile;\n /** The card the tile belongs to, in grouped mode */\n group?: TreemapGroupCard;\n event: MouseEvent;\n}\n\nexport interface RenderTreemapChartOptions {\n model: TreemapModel;\n width: number;\n height: number;\n theme: WidgetTheme;\n showTooltip?: boolean;\n onHover?: (payload: TreemapHoverPayload) => void;\n onLeave?: () => void;\n}\n\ntype HierarchyDatum = { tile?: TreemapTile; children?: HierarchyDatum[] };\n\ninterface TileLayer {\n /** Every tile group drawn for this widget — hover dims all but one */\n nodes: SVGGElement[];\n}\n\n/** One vertical gradient per distinct band color, shared by every tile using it. */\nfunction gradientIds(\n svg: Selection<SVGSVGElement, unknown, null, undefined>,\n colors: string[],\n prefix: string,\n): Map<string, string> {\n const defs = svg.append('defs');\n const ids = new Map<string, string>();\n let index = 0;\n for (const color of new Set(colors)) {\n const id = `${prefix}-fill-${index++}`;\n const gradient = defs\n .append('linearGradient')\n .attr('id', id)\n .attr('x1', '0')\n .attr('y1', '0')\n .attr('x2', '0')\n .attr('y2', '1');\n gradient.append('stop').attr('offset', '0%').attr('stop-color', color).attr('stop-opacity', 1);\n gradient\n .append('stop')\n .attr('offset', '100%')\n .attr('stop-color', color)\n .attr('stop-opacity', FD.treemapGradientBottomOpacity);\n ids.set(color, id);\n }\n return ids;\n}\n\n/** White scanlines fading toward the bottom, clipped to the rounded tile. */\nfunction appendStripes(\n parent: Selection<SVGGElement, unknown, null, undefined>,\n width: number,\n height: number,\n clipId: string,\n): void {\n const count = Math.floor(height / FD.treemapStripeSpacing);\n if (count <= 0) return;\n\n const clip = parent.append('clipPath').attr('id', clipId);\n clip\n .append('rect')\n .attr('width', width)\n .attr('height', height)\n .attr('rx', FD.treemapTileRadius)\n .attr('ry', FD.treemapTileRadius);\n\n const stripes = parent.append('g').attr('clip-path', `url(#${clipId})`);\n for (let i = 0; i < count; i++) {\n const y = Math.round((i + 1) * FD.treemapStripeSpacing) + 0.5;\n const progress = y / height;\n const opacity = Math.max(0, FD.treemapStripeOpacity * (1 - progress * FD.treemapStripeFalloff));\n stripes\n .append('line')\n .attr('x1', 0)\n .attr('x2', width)\n .attr('y1', y)\n .attr('y2', y)\n .attr('stroke', FD.treemapStripeColor)\n .attr('stroke-opacity', opacity)\n .attr('stroke-width', 1)\n .attr('shape-rendering', 'crispEdges');\n }\n}\n\n/** Name (+ value on taller tiles) as HTML so long labels ellipsize like the client. */\nfunction appendLabel(\n parent: Selection<SVGGElement, unknown, null, undefined>,\n tile: TreemapTile,\n width: number,\n height: number,\n mode: TreemapModel['mode'],\n): void {\n if (width <= FD.treemapMinLabelWidth || height <= FD.treemapMinLabelHeight) return;\n\n const box = parent\n .append('foreignObject')\n .attr('width', width)\n .attr('height', height)\n .append('xhtml:div')\n .attr('class', 'tile-label')\n .style('color', tile.lightFill ? FD.treemapLabelOnLight : FD.treemapLabelOnDark);\n\n box.append('xhtml:span').attr('class', 'tile-name').text(tile.label);\n\n if (height > FD.treemapMinValueHeight && tile.value) {\n box.append('xhtml:span').attr('class', 'tile-value').text(formatTreemapValue(tile.value, mode));\n }\n}\n\nfunction drawTiles(\n host: HTMLElement,\n tiles: TreemapTile[],\n width: number,\n height: number,\n options: RenderTreemapChartOptions,\n layer: TileLayer,\n prefix: string,\n group?: TreemapGroupCard,\n): void {\n if (!tiles.length || width <= 0 || height <= 0) return;\n\n const root = hierarchy<HierarchyDatum>({ children: tiles.map((tile) => ({ tile })) })\n .sum((d) => d.tile?.value ?? 0)\n .sort((a, b) => (b.value ?? 0) - (a.value ?? 0));\n\n const layout = treemap<HierarchyDatum>()\n .tile(treemapBinary)\n .size([width, height])\n .paddingInner(FD.treemapPaddingInner)\n .round(true)(root);\n\n const svg = select(host)\n .append('svg')\n .attr('width', width)\n .attr('height', height)\n .attr('viewBox', `0 0 ${width} ${height}`);\n\n const fills = gradientIds(\n svg,\n tiles.map((tile) => tile.color),\n prefix,\n );\n\n layout.leaves().forEach((leaf, index) => {\n const tile = leaf.data.tile;\n if (!tile) return;\n const tileWidth = leaf.x1 - leaf.x0;\n const tileHeight = leaf.y1 - leaf.y0;\n if (tileWidth <= 0 || tileHeight <= 0) return;\n\n const node = svg\n .append('g')\n .attr('class', 'treemap-tile')\n .attr('transform', `translate(${leaf.x0}, ${leaf.y0})`);\n\n node\n .append('rect')\n .attr('width', tileWidth)\n .attr('height', tileHeight)\n .attr('rx', FD.treemapTileRadius)\n .attr('ry', FD.treemapTileRadius)\n .attr('fill', `url(#${fills.get(tile.color)})`);\n\n appendStripes(node, tileWidth, tileHeight, `${prefix}-clip-${index}`);\n appendLabel(node, tile, tileWidth, tileHeight, options.model.mode);\n\n layer.nodes.push(node.node() as SVGGElement);\n\n if (options.showTooltip && options.onHover) {\n const dim = (hovered: SVGGElement | null) => {\n for (const other of layer.nodes) {\n other.style.opacity =\n hovered == null || other === hovered ? '1' : String(FD.treemapDimOpacity);\n }\n };\n node\n .style('cursor', 'pointer')\n .on('mouseenter', (event: MouseEvent) => {\n dim(node.node() as SVGGElement);\n options.onHover?.({ tile, group, event });\n })\n .on('mousemove', (event: MouseEvent) => {\n options.onHover?.({ tile, group, event });\n })\n .on('mouseleave', () => {\n dim(null);\n options.onLeave?.();\n });\n }\n });\n}\n\n/**\n * FuseDash Treemap — D3 rewrite of the Visx `TreemapSingle` / `TreemapGroup`.\n * Single mode is one area-proportional `treemapBinary` layout; grouped mode is\n * the client's card mosaic with a nested treemap per group.\n */\nexport function renderTreemapChart(\n container: HTMLElement,\n options: RenderTreemapChartOptions,\n): void {\n const { model, width, height, theme } = options;\n container.replaceChildren();\n if (width <= 0 || height <= 0) return;\n\n const layer: TileLayer = { nodes: [] };\n\n if (model.mode === 'single') {\n drawTiles(container, model.tiles, width, height, options, layer, 'tm');\n return;\n }\n\n const template = treemapGridTemplate(model.groups.length);\n const grid = select(container).append('div').attr('class', 'treemap-groups');\n grid.style('grid-template-areas', template.areas).style('grid-template-rows', template.rows);\n\n const plots: Array<{ host: HTMLElement; group: TreemapGroupCard; index: number }> = [];\n\n model.groups.forEach((group, index) => {\n const card = grid\n .append('div')\n .attr('class', 'treemap-card')\n .style('grid-area', `_${index + 1}`);\n\n const header = card.append('div').attr('class', 'treemap-card-header');\n header\n .append('span')\n .attr('class', 'treemap-card-title')\n .attr('title', group.label)\n .style('color', theme.text)\n .text(group.label);\n if (model.subgroupField) {\n header\n .append('span')\n .attr('class', 'treemap-card-subtitle')\n .attr('title', model.subgroupField)\n .style('color', theme.textMuted)\n .text(model.subgroupField);\n }\n\n const host = card.append('div').attr('class', 'treemap-card-plot').node() as HTMLElement;\n plots.push({ host, group, index });\n });\n\n // One layout flush, then each card draws into the box the grid gave it.\n for (const { host, group, index } of plots) {\n drawTiles(\n host,\n group.tiles,\n host.clientWidth,\n host.clientHeight,\n options,\n layer,\n `tm-${index}`,\n group,\n );\n }\n}\n"],"names":[],"mappings":";;;;;AAkCA,SAAS,YACP,KACA,QACA,QACqB;AACrB,QAAM,OAAO,IAAI,OAAO,MAAM;AAC9B,QAAM,0BAAU,IAAA;AAChB,MAAI,QAAQ;AACZ,aAAW,SAAS,IAAI,IAAI,MAAM,GAAG;AACnC,UAAM,KAAK,GAAG,MAAM,SAAS,OAAO;AACpC,UAAM,WAAW,KACd,OAAO,gBAAgB,EACvB,KAAK,MAAM,EAAE,EACb,KAAK,MAAM,GAAG,EACd,KAAK,MAAM,GAAG,EACd,KAAK,MAAM,GAAG,EACd,KAAK,MAAM,GAAG;AACjB,aAAS,OAAO,MAAM,EAAE,KAAK,UAAU,IAAI,EAAE,KAAK,cAAc,KAAK,EAAE,KAAK,gBAAgB,CAAC;AAC7F,aACG,OAAO,MAAM,EACb,KAAK,UAAU,MAAM,EACrB,KAAK,cAAc,KAAK,EACxB,KAAK,gBAAgB,GAAG,4BAA4B;AACvD,QAAI,IAAI,OAAO,EAAE;AAAA,EACnB;AACA,SAAO;AACT;AAGA,SAAS,cACP,QACA,OACA,QACA,QACM;AACN,QAAM,QAAQ,KAAK,MAAM,SAAS,GAAG,oBAAoB;AACzD,MAAI,SAAS,EAAG;AAEhB,QAAM,OAAO,OAAO,OAAO,UAAU,EAAE,KAAK,MAAM,MAAM;AACxD,OACG,OAAO,MAAM,EACb,KAAK,SAAS,KAAK,EACnB,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