@unovis/ts 1.1.1-beta.6 → 1.1.1-beta.7

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 (710) hide show
  1. package/declaration.d.ts +1 -0
  2. package/index.ts +1 -0
  3. package/licences.txt +43 -0
  4. package/maps.ts +1 -0
  5. package/package.json +1 -1
  6. package/rollup.config.js +71 -0
  7. package/rules/ts-getter-setter.js +35 -0
  8. package/src/components/area/config.ts +29 -0
  9. package/src/components/area/index.ts +133 -0
  10. package/{components/area/style.js → src/components/area/style.ts} +9 -10
  11. package/src/components/area/types.ts +2 -0
  12. package/src/components/axis/config.ts +76 -0
  13. package/src/components/axis/index.ts +363 -0
  14. package/{components/axis/style.js → src/components/axis/style.ts} +27 -22
  15. package/src/components/axis/types.ts +4 -0
  16. package/src/components/brush/config.ts +51 -0
  17. package/src/components/brush/index.ts +233 -0
  18. package/{components/brush/style.js → src/components/brush/style.ts} +15 -14
  19. package/src/components/brush/types.ts +8 -0
  20. package/src/components/bullet-legend/config.ts +38 -0
  21. package/src/components/bullet-legend/index.ts +104 -0
  22. package/{components/bullet-legend/style.js → src/components/bullet-legend/style.ts} +18 -16
  23. package/src/components/bullet-legend/types.ts +7 -0
  24. package/src/components/chord-diagram/config.ts +53 -0
  25. package/src/components/chord-diagram/index.ts +401 -0
  26. package/src/components/chord-diagram/modules/label.ts +155 -0
  27. package/src/components/chord-diagram/modules/link.ts +91 -0
  28. package/src/components/chord-diagram/modules/node.ts +80 -0
  29. package/{components/chord-diagram/style.js → src/components/chord-diagram/style.ts} +39 -30
  30. package/src/components/chord-diagram/types.ts +68 -0
  31. package/src/components/crosshair/config.ts +48 -0
  32. package/src/components/crosshair/index.ts +220 -0
  33. package/{components/crosshair/style.js → src/components/crosshair/style.ts} +12 -12
  34. package/src/components/crosshair/types.ts +15 -0
  35. package/src/components/donut/config.ts +65 -0
  36. package/src/components/donut/index.ts +148 -0
  37. package/src/components/donut/modules/arc.ts +86 -0
  38. package/{components/donut/style.js → src/components/donut/style.ts} +20 -18
  39. package/src/components/donut/types.ts +17 -0
  40. package/src/components/flow-legend/config.ts +31 -0
  41. package/src/components/flow-legend/index.ts +103 -0
  42. package/{components/flow-legend/style.js → src/components/flow-legend/style.ts} +25 -21
  43. package/src/components/flow-legend/types.ts +10 -0
  44. package/src/components/free-brush/config.ts +54 -0
  45. package/src/components/free-brush/index.ts +207 -0
  46. package/{components/free-brush/style.js → src/components/free-brush/style.ts} +12 -12
  47. package/src/components/free-brush/types.ts +8 -0
  48. package/src/components/graph/config.ts +280 -0
  49. package/src/components/graph/index.ts +809 -0
  50. package/src/components/graph/modules/layout-helpers.ts +96 -0
  51. package/src/components/graph/modules/layout.ts +502 -0
  52. package/src/components/graph/modules/link/helper.ts +105 -0
  53. package/src/components/graph/modules/link/index.ts +302 -0
  54. package/{components/graph/modules/link/style.js → src/components/graph/modules/link/style.ts} +45 -34
  55. package/src/components/graph/modules/node/helper.ts +162 -0
  56. package/src/components/graph/modules/node/index.ts +343 -0
  57. package/{components/graph/modules/node/style.js → src/components/graph/modules/node/style.ts} +72 -52
  58. package/src/components/graph/modules/panel/helper.ts +160 -0
  59. package/src/components/graph/modules/panel/index.ts +137 -0
  60. package/{components/graph/modules/panel/style.js → src/components/graph/modules/panel/style.ts} +42 -32
  61. package/src/components/graph/modules/shape.ts +108 -0
  62. package/src/components/graph/modules/zoom-levels.ts +6 -0
  63. package/src/components/graph/style.ts +72 -0
  64. package/src/components/graph/types.ts +152 -0
  65. package/src/components/grouped-bar/config.ts +40 -0
  66. package/src/components/grouped-bar/index.ts +325 -0
  67. package/{components/grouped-bar/style.js → src/components/grouped-bar/style.ts} +15 -14
  68. package/src/components/leaflet-flow-map/config.ts +60 -0
  69. package/src/components/leaflet-flow-map/index.ts +279 -0
  70. package/src/components/leaflet-flow-map/renderer-utils.ts +14 -0
  71. package/src/components/leaflet-flow-map/renderer.ts +146 -0
  72. package/{components/leaflet-flow-map/shaders.js → src/components/leaflet-flow-map/shaders.ts} +4 -7
  73. package/src/components/leaflet-flow-map/types.ts +18 -0
  74. package/src/components/leaflet-map/config.ts +234 -0
  75. package/src/components/leaflet-map/index.ts +808 -0
  76. package/src/components/leaflet-map/leaflet.css +625 -0
  77. package/src/components/leaflet-map/modules/clusterBackground.ts +34 -0
  78. package/src/components/leaflet-map/modules/donut.ts +37 -0
  79. package/src/components/leaflet-map/modules/map.ts +178 -0
  80. package/src/components/leaflet-map/modules/node.ts +208 -0
  81. package/src/components/leaflet-map/modules/selectionRing.ts +63 -0
  82. package/src/components/leaflet-map/modules/utils.ts +290 -0
  83. package/{components → src/components}/leaflet-map/renderer/leaflet-maplibre-gl.js +76 -78
  84. package/src/components/leaflet-map/renderer/map-style.ts +24 -0
  85. package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json +35 -0
  86. package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json +35 -0
  87. package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json +2185 -0
  88. package/src/components/leaflet-map/renderer/mapboxgl-layer.ts +43 -0
  89. package/src/components/leaflet-map/renderer/mapboxgl-utils.ts +40 -0
  90. package/{components → src/components}/leaflet-map/renderer/maplibre-gl.css.js +2 -4
  91. package/src/components/leaflet-map/style.ts +217 -0
  92. package/src/components/leaflet-map/types.ts +75 -0
  93. package/src/components/line/config.ts +34 -0
  94. package/src/components/line/index.ts +188 -0
  95. package/{components/line/style.js → src/components/line/style.ts} +18 -16
  96. package/src/components/line/types.ts +3 -0
  97. package/src/components/nested-donut/config.ts +75 -0
  98. package/src/components/nested-donut/index.ts +176 -0
  99. package/src/components/nested-donut/modules/arc.ts +78 -0
  100. package/src/components/nested-donut/modules/label.ts +63 -0
  101. package/src/components/nested-donut/style.ts +82 -0
  102. package/src/components/nested-donut/types.ts +29 -0
  103. package/src/components/sankey/config.ts +195 -0
  104. package/src/components/sankey/index.ts +387 -0
  105. package/src/components/sankey/modules/label.ts +228 -0
  106. package/src/components/sankey/modules/link.ts +141 -0
  107. package/src/components/sankey/modules/node.ts +221 -0
  108. package/{components/sankey/style.js → src/components/sankey/style.ts} +60 -44
  109. package/src/components/sankey/types.ts +95 -0
  110. package/src/components/scatter/config.ts +49 -0
  111. package/src/components/scatter/index.ts +220 -0
  112. package/src/components/scatter/modules/point.ts +123 -0
  113. package/src/components/scatter/modules/utils.ts +150 -0
  114. package/{components/scatter/style.js → src/components/scatter/style.ts} +15 -14
  115. package/src/components/scatter/types.ts +21 -0
  116. package/src/components/stacked-bar/config.ts +42 -0
  117. package/src/components/stacked-bar/index.ts +267 -0
  118. package/{components/stacked-bar/style.js → src/components/stacked-bar/style.ts} +15 -14
  119. package/src/components/stacked-bar/types.ts +5 -0
  120. package/src/components/timeline/config.ts +49 -0
  121. package/src/components/timeline/index.ts +302 -0
  122. package/{components/timeline/style.js → src/components/timeline/style.ts} +39 -30
  123. package/src/components/tooltip/config.ts +69 -0
  124. package/src/components/tooltip/index.ts +220 -0
  125. package/{components → src/components}/tooltip/style.js +11 -14
  126. package/src/components/topojson-map/config.ts +124 -0
  127. package/src/components/topojson-map/index.ts +436 -0
  128. package/{components/topojson-map/style.js → src/components/topojson-map/style.ts} +33 -26
  129. package/src/components/topojson-map/types.ts +123 -0
  130. package/src/components/topojson-map/utils.ts +29 -0
  131. package/src/components/vis-controls/config.ts +16 -0
  132. package/src/components/vis-controls/index.ts +68 -0
  133. package/{components/vis-controls/style.js → src/components/vis-controls/style.ts} +34 -27
  134. package/src/components/vis-controls/types.ts +14 -0
  135. package/src/components/xy-labels/config.ts +56 -0
  136. package/src/components/xy-labels/index.ts +109 -0
  137. package/src/components/xy-labels/modules/label.ts +140 -0
  138. package/{components/xy-labels/style.js → src/components/xy-labels/style.ts} +15 -14
  139. package/src/components/xy-labels/types.ts +26 -0
  140. package/src/components.ts +56 -0
  141. package/src/containers/single-container/config.ts +15 -0
  142. package/src/containers/single-container/index.ts +150 -0
  143. package/src/containers/xy-container/config.ts +112 -0
  144. package/src/containers/xy-container/index.ts +407 -0
  145. package/src/containers.ts +6 -0
  146. package/src/core/component/config.ts +61 -0
  147. package/src/core/component/index.ts +154 -0
  148. package/src/core/component/types.ts +9 -0
  149. package/src/core/config/index.ts +12 -0
  150. package/src/core/container/config.ts +56 -0
  151. package/src/core/container/index.ts +136 -0
  152. package/src/core/xy-component/config.ts +46 -0
  153. package/src/core/xy-component/index.ts +90 -0
  154. package/src/data-models/core.ts +15 -0
  155. package/src/data-models/graph.ts +138 -0
  156. package/src/data-models/map-graph.ts +72 -0
  157. package/src/data-models/map.ts +18 -0
  158. package/src/data-models/series.ts +16 -0
  159. package/src/index.ts +7 -0
  160. package/src/maps/china-provinces.json +1 -0
  161. package/src/maps/fr-regions.json +1 -0
  162. package/src/maps/germany-regions.json +1 -0
  163. package/src/maps/ind-regions.json +1 -0
  164. package/src/maps/uk-regions.json +1 -0
  165. package/src/maps/us-counties.json +1 -0
  166. package/src/maps/us-states.json +1 -0
  167. package/src/maps/world-110m-alpha.json +1 -0
  168. package/src/maps/world-simple.json +1 -0
  169. package/src/maps/world-simplest.json +1 -0
  170. package/src/maps.ts +34 -0
  171. package/src/styles/colors.ts +28 -0
  172. package/src/styles/index.ts +38 -0
  173. package/{styles/sizes.js → src/styles/sizes.ts} +6 -8
  174. package/src/types/accessor.ts +5 -0
  175. package/src/types/component.ts +15 -0
  176. package/src/types/curve.ts +62 -0
  177. package/src/types/data.ts +5 -0
  178. package/src/types/direction.ts +6 -0
  179. package/src/types/graph.ts +40 -0
  180. package/src/types/map.ts +5 -0
  181. package/src/types/misc.ts +10 -0
  182. package/src/types/position.ts +23 -0
  183. package/src/types/scale.ts +47 -0
  184. package/src/types/shape.ts +7 -0
  185. package/src/types/spacing.ts +6 -0
  186. package/src/types/svg.ts +32 -0
  187. package/src/types/symbol.ts +21 -0
  188. package/src/types/text.ts +71 -0
  189. package/src/types.ts +31 -0
  190. package/src/utils/color.ts +41 -0
  191. package/src/utils/d3.ts +15 -0
  192. package/src/utils/data.ts +328 -0
  193. package/src/utils/html.ts +13 -0
  194. package/src/utils/map.ts +29 -0
  195. package/src/utils/misc.ts +54 -0
  196. package/src/utils/path.ts +196 -0
  197. package/src/utils/scale.ts +1 -0
  198. package/src/utils/style.ts +37 -0
  199. package/src/utils/svg.ts +49 -0
  200. package/src/utils/text.ts +529 -0
  201. package/src/utils/type.ts +9 -0
  202. package/tsconfig.json +29 -0
  203. package/components/area/config.d.ts +0 -25
  204. package/components/area/config.js +0 -16
  205. package/components/area/config.js.map +0 -1
  206. package/components/area/index.d.ts +0 -19
  207. package/components/area/index.js +0 -102
  208. package/components/area/index.js.map +0 -1
  209. package/components/area/style.d.ts +0 -3
  210. package/components/area/style.js.map +0 -1
  211. package/components/area/types.d.ts +0 -6
  212. package/components/axis/config.d.ts +0 -71
  213. package/components/axis/config.js +0 -32
  214. package/components/axis/config.js.map +0 -1
  215. package/components/axis/index.d.ts +0 -44
  216. package/components/axis/index.js +0 -305
  217. package/components/axis/index.js.map +0 -1
  218. package/components/axis/style.d.ts +0 -9
  219. package/components/axis/style.js.map +0 -1
  220. package/components/axis/types.d.ts +0 -4
  221. package/components/axis/types.js +0 -8
  222. package/components/axis/types.js.map +0 -1
  223. package/components/brush/config.d.ts +0 -42
  224. package/components/brush/config.js +0 -24
  225. package/components/brush/config.js.map +0 -1
  226. package/components/brush/index.d.ts +0 -28
  227. package/components/brush/index.js +0 -199
  228. package/components/brush/index.js.map +0 -1
  229. package/components/brush/style.d.ts +0 -5
  230. package/components/brush/style.js.map +0 -1
  231. package/components/brush/types.d.ts +0 -7
  232. package/components/brush/types.js +0 -8
  233. package/components/brush/types.js.map +0 -1
  234. package/components/bullet-legend/config.d.ts +0 -34
  235. package/components/bullet-legend/config.js +0 -16
  236. package/components/bullet-legend/config.js.map +0 -1
  237. package/components/bullet-legend/index.d.ts +0 -19
  238. package/components/bullet-legend/index.js +0 -79
  239. package/components/bullet-legend/index.js.map +0 -1
  240. package/components/bullet-legend/style.d.ts +0 -6
  241. package/components/bullet-legend/style.js.map +0 -1
  242. package/components/bullet-legend/types.d.ts +0 -7
  243. package/components/bullet-legend/types.js +0 -2
  244. package/components/bullet-legend/types.js.map +0 -1
  245. package/components/chord-diagram/config.d.ts +0 -44
  246. package/components/chord-diagram/config.js +0 -25
  247. package/components/chord-diagram/config.js.map +0 -1
  248. package/components/chord-diagram/index.d.ts +0 -42
  249. package/components/chord-diagram/index.js +0 -305
  250. package/components/chord-diagram/index.js.map +0 -1
  251. package/components/chord-diagram/modules/label.d.ts +0 -8
  252. package/components/chord-diagram/modules/label.js +0 -115
  253. package/components/chord-diagram/modules/label.js.map +0 -1
  254. package/components/chord-diagram/modules/link.d.ts +0 -21
  255. package/components/chord-diagram/modules/link.js +0 -63
  256. package/components/chord-diagram/modules/link.js.map +0 -1
  257. package/components/chord-diagram/modules/node.d.ts +0 -17
  258. package/components/chord-diagram/modules/node.js +0 -52
  259. package/components/chord-diagram/modules/node.js.map +0 -1
  260. package/components/chord-diagram/style.d.ts +0 -13
  261. package/components/chord-diagram/style.js.map +0 -1
  262. package/components/chord-diagram/types.d.ts +0 -58
  263. package/components/chord-diagram/types.js +0 -8
  264. package/components/chord-diagram/types.js.map +0 -1
  265. package/components/crosshair/config.d.ts +0 -43
  266. package/components/crosshair/config.js +0 -19
  267. package/components/crosshair/config.js.map +0 -1
  268. package/components/crosshair/index.d.ts +0 -35
  269. package/components/crosshair/index.js +0 -183
  270. package/components/crosshair/index.js.map +0 -1
  271. package/components/crosshair/style.d.ts +0 -4
  272. package/components/crosshair/style.js.map +0 -1
  273. package/components/crosshair/types.d.ts +0 -13
  274. package/components/crosshair/types.js +0 -2
  275. package/components/crosshair/types.js.map +0 -1
  276. package/components/donut/config.d.ts +0 -59
  277. package/components/donut/config.js +0 -28
  278. package/components/donut/config.js.map +0 -1
  279. package/components/donut/index.d.ts +0 -21
  280. package/components/donut/index.js +0 -107
  281. package/components/donut/index.js.map +0 -1
  282. package/components/donut/modules/arc.d.ts +0 -10
  283. package/components/donut/modules/arc.js +0 -59
  284. package/components/donut/modules/arc.js.map +0 -1
  285. package/components/donut/style.d.ts +0 -7
  286. package/components/donut/style.js.map +0 -1
  287. package/components/donut/types.d.ts +0 -20
  288. package/components/flow-legend/config.d.ts +0 -29
  289. package/components/flow-legend/config.js +0 -18
  290. package/components/flow-legend/config.js.map +0 -1
  291. package/components/flow-legend/index.d.ts +0 -16
  292. package/components/flow-legend/index.js +0 -75
  293. package/components/flow-legend/index.js.map +0 -1
  294. package/components/flow-legend/style.d.ts +0 -8
  295. package/components/flow-legend/style.js.map +0 -1
  296. package/components/flow-legend/types.d.ts +0 -9
  297. package/components/flow-legend/types.js +0 -8
  298. package/components/flow-legend/types.js.map +0 -1
  299. package/components/free-brush/config.d.ts +0 -45
  300. package/components/free-brush/config.js +0 -24
  301. package/components/free-brush/config.js.map +0 -1
  302. package/components/free-brush/index.d.ts +0 -20
  303. package/components/free-brush/index.js +0 -192
  304. package/components/free-brush/index.js.map +0 -1
  305. package/components/free-brush/style.d.ts +0 -4
  306. package/components/free-brush/style.js.map +0 -1
  307. package/components/free-brush/types.d.ts +0 -7
  308. package/components/free-brush/types.js +0 -9
  309. package/components/free-brush/types.js.map +0 -1
  310. package/components/graph/config.d.ts +0 -238
  311. package/components/graph/config.js +0 -84
  312. package/components/graph/config.js.map +0 -1
  313. package/components/graph/index.d.ts +0 -126
  314. package/components/graph/index.js +0 -656
  315. package/components/graph/index.js.map +0 -1
  316. package/components/graph/modules/layout-helpers.d.ts +0 -21
  317. package/components/graph/modules/layout-helpers.js +0 -69
  318. package/components/graph/modules/layout-helpers.js.map +0 -1
  319. package/components/graph/modules/layout.d.ts +0 -10
  320. package/components/graph/modules/layout.js +0 -399
  321. package/components/graph/modules/layout.js.map +0 -1
  322. package/components/graph/modules/link/helper.d.ts +0 -25
  323. package/components/graph/modules/link/helper.js +0 -74
  324. package/components/graph/modules/link/helper.js.map +0 -1
  325. package/components/graph/modules/link/index.d.ts +0 -11
  326. package/components/graph/modules/link/index.js +0 -212
  327. package/components/graph/modules/link/index.js.map +0 -1
  328. package/components/graph/modules/link/style.d.ts +0 -15
  329. package/components/graph/modules/link/style.js.map +0 -1
  330. package/components/graph/modules/node/helper.d.ts +0 -21
  331. package/components/graph/modules/node/helper.js +0 -126
  332. package/components/graph/modules/node/helper.js.map +0 -1
  333. package/components/graph/modules/node/index.d.ts +0 -11
  334. package/components/graph/modules/node/index.js +0 -252
  335. package/components/graph/modules/node/index.js.map +0 -1
  336. package/components/graph/modules/node/style.d.ts +0 -24
  337. package/components/graph/modules/node/style.js.map +0 -1
  338. package/components/graph/modules/panel/helper.d.ts +0 -18
  339. package/components/graph/modules/panel/helper.js +0 -111
  340. package/components/graph/modules/panel/helper.js.map +0 -1
  341. package/components/graph/modules/panel/index.d.ts +0 -7
  342. package/components/graph/modules/panel/index.js +0 -98
  343. package/components/graph/modules/panel/index.js.map +0 -1
  344. package/components/graph/modules/panel/style.d.ts +0 -14
  345. package/components/graph/modules/panel/style.js.map +0 -1
  346. package/components/graph/modules/shape.d.ts +0 -6
  347. package/components/graph/modules/shape.js +0 -80
  348. package/components/graph/modules/shape.js.map +0 -1
  349. package/components/graph/modules/zoom-levels.d.ts +0 -6
  350. package/components/graph/modules/zoom-levels.js +0 -10
  351. package/components/graph/modules/zoom-levels.js.map +0 -1
  352. package/components/graph/style.d.ts +0 -6
  353. package/components/graph/style.js +0 -66
  354. package/components/graph/style.js.map +0 -1
  355. package/components/graph/types.d.ts +0 -125
  356. package/components/graph/types.js +0 -30
  357. package/components/graph/types.js.map +0 -1
  358. package/components/grouped-bar/config.d.ts +0 -36
  359. package/components/grouped-bar/config.js +0 -20
  360. package/components/grouped-bar/config.js.map +0 -1
  361. package/components/grouped-bar/index.d.ts +0 -32
  362. package/components/grouped-bar/index.js +0 -249
  363. package/components/grouped-bar/index.js.map +0 -1
  364. package/components/grouped-bar/style.d.ts +0 -5
  365. package/components/grouped-bar/style.js.map +0 -1
  366. package/components/leaflet-flow-map/config.d.ts +0 -46
  367. package/components/leaflet-flow-map/config.js +0 -25
  368. package/components/leaflet-flow-map/config.js.map +0 -1
  369. package/components/leaflet-flow-map/index.d.ts +0 -52
  370. package/components/leaflet-flow-map/index.js +0 -220
  371. package/components/leaflet-flow-map/index.js.map +0 -1
  372. package/components/leaflet-flow-map/renderer-utils.d.ts +0 -5
  373. package/components/leaflet-flow-map/renderer-utils.js +0 -15
  374. package/components/leaflet-flow-map/renderer-utils.js.map +0 -1
  375. package/components/leaflet-flow-map/renderer.d.ts +0 -26
  376. package/components/leaflet-flow-map/renderer.js +0 -117
  377. package/components/leaflet-flow-map/renderer.js.map +0 -1
  378. package/components/leaflet-flow-map/shaders.d.ts +0 -2
  379. package/components/leaflet-flow-map/shaders.js.map +0 -1
  380. package/components/leaflet-flow-map/types.d.ts +0 -23
  381. package/components/leaflet-map/config.d.ts +0 -193
  382. package/components/leaflet-map/config.js +0 -71
  383. package/components/leaflet-map/config.js.map +0 -1
  384. package/components/leaflet-map/index.d.ts +0 -130
  385. package/components/leaflet-map/index.js +0 -690
  386. package/components/leaflet-map/index.js.map +0 -1
  387. package/components/leaflet-map/leaflet.css.js +0 -5
  388. package/components/leaflet-map/leaflet.css.js.map +0 -1
  389. package/components/leaflet-map/modules/clusterBackground.d.ts +0 -5
  390. package/components/leaflet-map/modules/clusterBackground.js +0 -27
  391. package/components/leaflet-map/modules/clusterBackground.js.map +0 -1
  392. package/components/leaflet-map/modules/donut.d.ts +0 -3
  393. package/components/leaflet-map/modules/donut.js +0 -25
  394. package/components/leaflet-map/modules/donut.js.map +0 -1
  395. package/components/leaflet-map/modules/map.d.ts +0 -14
  396. package/components/leaflet-map/modules/map.js +0 -154
  397. package/components/leaflet-map/modules/map.js.map +0 -1
  398. package/components/leaflet-map/modules/node.d.ts +0 -9
  399. package/components/leaflet-map/modules/node.js +0 -162
  400. package/components/leaflet-map/modules/node.js.map +0 -1
  401. package/components/leaflet-map/modules/selectionRing.d.ts +0 -7
  402. package/components/leaflet-map/modules/selectionRing.js +0 -41
  403. package/components/leaflet-map/modules/selectionRing.js.map +0 -1
  404. package/components/leaflet-map/modules/utils.d.ts +0 -50
  405. package/components/leaflet-map/modules/utils.js +0 -210
  406. package/components/leaflet-map/modules/utils.js.map +0 -1
  407. package/components/leaflet-map/renderer/leaflet-maplibre-gl.js.map +0 -1
  408. package/components/leaflet-map/renderer/map-style.d.ts +0 -4
  409. package/components/leaflet-map/renderer/map-style.js +0 -15
  410. package/components/leaflet-map/renderer/map-style.js.map +0 -1
  411. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js +0 -40
  412. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js.map +0 -1
  413. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js +0 -40
  414. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js.map +0 -1
  415. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js +0 -4981
  416. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js.map +0 -1
  417. package/components/leaflet-map/renderer/mapboxgl-layer.d.ts +0 -8
  418. package/components/leaflet-map/renderer/mapboxgl-layer.js +0 -27
  419. package/components/leaflet-map/renderer/mapboxgl-layer.js.map +0 -1
  420. package/components/leaflet-map/renderer/mapboxgl-utils.d.ts +0 -4
  421. package/components/leaflet-map/renderer/mapboxgl-utils.js +0 -39
  422. package/components/leaflet-map/renderer/mapboxgl-utils.js.map +0 -1
  423. package/components/leaflet-map/renderer/maplibre-gl.css.js.map +0 -1
  424. package/components/leaflet-map/style.d.ts +0 -52
  425. package/components/leaflet-map/style.js +0 -183
  426. package/components/leaflet-map/style.js.map +0 -1
  427. package/components/leaflet-map/types.d.ts +0 -75
  428. package/components/leaflet-map/types.js +0 -15
  429. package/components/leaflet-map/types.js.map +0 -1
  430. package/components/line/config.d.ts +0 -30
  431. package/components/line/config.js +0 -17
  432. package/components/line/config.js.map +0 -1
  433. package/components/line/index.d.ts +0 -27
  434. package/components/line/index.js +0 -152
  435. package/components/line/index.js.map +0 -1
  436. package/components/line/style.d.ts +0 -6
  437. package/components/line/style.js.map +0 -1
  438. package/components/line/types.d.ts +0 -12
  439. package/components/nested-donut/config.d.ts +0 -59
  440. package/components/nested-donut/config.js +0 -19
  441. package/components/nested-donut/config.js.map +0 -1
  442. package/components/nested-donut/index.d.ts +0 -38
  443. package/components/nested-donut/index.js +0 -133
  444. package/components/nested-donut/index.js.map +0 -1
  445. package/components/nested-donut/modules/arc.d.ts +0 -17
  446. package/components/nested-donut/modules/arc.js +0 -50
  447. package/components/nested-donut/modules/arc.js.map +0 -1
  448. package/components/nested-donut/modules/label.d.ts +0 -7
  449. package/components/nested-donut/modules/label.js +0 -34
  450. package/components/nested-donut/modules/label.js.map +0 -1
  451. package/components/nested-donut/style.d.ts +0 -26
  452. package/components/nested-donut/style.js +0 -70
  453. package/components/nested-donut/style.js.map +0 -1
  454. package/components/nested-donut/types.d.ts +0 -24
  455. package/components/nested-donut/types.js +0 -11
  456. package/components/nested-donut/types.js.map +0 -1
  457. package/components/sankey/config.d.ts +0 -162
  458. package/components/sankey/config.js +0 -65
  459. package/components/sankey/config.js.map +0 -1
  460. package/components/sankey/index.d.ts +0 -59
  461. package/components/sankey/index.js +0 -306
  462. package/components/sankey/index.js.map +0 -1
  463. package/components/sankey/modules/label.d.ts +0 -23
  464. package/components/sankey/modules/label.js +0 -168
  465. package/components/sankey/modules/label.js.map +0 -1
  466. package/components/sankey/modules/link.d.ts +0 -14
  467. package/components/sankey/modules/link.js +0 -108
  468. package/components/sankey/modules/link.js.map +0 -1
  469. package/components/sankey/modules/node.d.ts +0 -10
  470. package/components/sankey/modules/node.js +0 -156
  471. package/components/sankey/modules/node.js.map +0 -1
  472. package/components/sankey/style.d.ts +0 -20
  473. package/components/sankey/style.js.map +0 -1
  474. package/components/sankey/types.d.ts +0 -84
  475. package/components/sankey/types.js +0 -34
  476. package/components/sankey/types.js.map +0 -1
  477. package/components/scatter/config.d.ts +0 -44
  478. package/components/scatter/config.js +0 -23
  479. package/components/scatter/config.js.map +0 -1
  480. package/components/scatter/index.d.ts +0 -28
  481. package/components/scatter/index.js +0 -167
  482. package/components/scatter/index.js.map +0 -1
  483. package/components/scatter/modules/point.d.ts +0 -7
  484. package/components/scatter/modules/point.js +0 -86
  485. package/components/scatter/modules/point.js.map +0 -1
  486. package/components/scatter/modules/utils.d.ts +0 -11
  487. package/components/scatter/modules/utils.js +0 -112
  488. package/components/scatter/modules/utils.js.map +0 -1
  489. package/components/scatter/style.d.ts +0 -5
  490. package/components/scatter/style.js.map +0 -1
  491. package/components/scatter/types.d.ts +0 -19
  492. package/components/stacked-bar/config.d.ts +0 -38
  493. package/components/stacked-bar/config.js +0 -20
  494. package/components/stacked-bar/config.js.map +0 -1
  495. package/components/stacked-bar/index.d.ts +0 -28
  496. package/components/stacked-bar/index.js +0 -208
  497. package/components/stacked-bar/index.js.map +0 -1
  498. package/components/stacked-bar/style.d.ts +0 -5
  499. package/components/stacked-bar/style.js.map +0 -1
  500. package/components/stacked-bar/types.d.ts +0 -5
  501. package/components/timeline/config.d.ts +0 -43
  502. package/components/timeline/config.js +0 -24
  503. package/components/timeline/config.js.map +0 -1
  504. package/components/timeline/index.d.ts +0 -41
  505. package/components/timeline/index.js +0 -244
  506. package/components/timeline/index.js.map +0 -1
  507. package/components/timeline/style.d.ts +0 -13
  508. package/components/timeline/style.js.map +0 -1
  509. package/components/tooltip/config.d.ts +0 -68
  510. package/components/tooltip/config.js +0 -20
  511. package/components/tooltip/config.js.map +0 -1
  512. package/components/tooltip/index.d.ts +0 -36
  513. package/components/tooltip/index.js +0 -184
  514. package/components/tooltip/index.js.map +0 -1
  515. package/components/tooltip/style.js.map +0 -1
  516. package/components/topojson-map/config.d.ts +0 -99
  517. package/components/topojson-map/config.js +0 -42
  518. package/components/topojson-map/config.js.map +0 -1
  519. package/components/topojson-map/index.d.ts +0 -52
  520. package/components/topojson-map/index.js +0 -355
  521. package/components/topojson-map/index.js.map +0 -1
  522. package/components/topojson-map/style.d.ts +0 -11
  523. package/components/topojson-map/style.js.map +0 -1
  524. package/components/topojson-map/types.d.ts +0 -78
  525. package/components/topojson-map/types.js +0 -80
  526. package/components/topojson-map/types.js.map +0 -1
  527. package/components/topojson-map/utils.d.ts +0 -3
  528. package/components/topojson-map/utils.js +0 -30
  529. package/components/topojson-map/utils.js.map +0 -1
  530. package/components/vis-controls/config.d.ts +0 -12
  531. package/components/vis-controls/config.js +0 -13
  532. package/components/vis-controls/config.js.map +0 -1
  533. package/components/vis-controls/index.d.ts +0 -14
  534. package/components/vis-controls/index.js +0 -52
  535. package/components/vis-controls/index.js.map +0 -1
  536. package/components/vis-controls/style.d.ts +0 -11
  537. package/components/vis-controls/style.js.map +0 -1
  538. package/components/vis-controls/types.d.ts +0 -13
  539. package/components/vis-controls/types.js +0 -8
  540. package/components/vis-controls/types.js.map +0 -1
  541. package/components/xy-labels/config.d.ts +0 -48
  542. package/components/xy-labels/config.js +0 -25
  543. package/components/xy-labels/config.js.map +0 -1
  544. package/components/xy-labels/index.d.ts +0 -15
  545. package/components/xy-labels/index.js +0 -87
  546. package/components/xy-labels/index.js.map +0 -1
  547. package/components/xy-labels/modules/label.d.ts +0 -9
  548. package/components/xy-labels/modules/label.js +0 -107
  549. package/components/xy-labels/modules/label.js.map +0 -1
  550. package/components/xy-labels/style.d.ts +0 -5
  551. package/components/xy-labels/style.js.map +0 -1
  552. package/components/xy-labels/types.d.ts +0 -23
  553. package/components/xy-labels/types.js +0 -9
  554. package/components/xy-labels/types.js.map +0 -1
  555. package/components.d.ts +0 -51
  556. package/components.js +0 -29
  557. package/components.js.map +0 -1
  558. package/containers/single-container/config.d.ts +0 -12
  559. package/containers/single-container/config.js +0 -12
  560. package/containers/single-container/config.js.map +0 -1
  561. package/containers/single-container/index.d.ts +0 -19
  562. package/containers/single-container/index.js +0 -128
  563. package/containers/single-container/index.js.map +0 -1
  564. package/containers/xy-container/config.d.ts +0 -99
  565. package/containers/xy-container/config.js +0 -30
  566. package/containers/xy-container/config.js.map +0 -1
  567. package/containers/xy-container/index.d.ts +0 -34
  568. package/containers/xy-container/index.js +0 -330
  569. package/containers/xy-container/index.js.map +0 -1
  570. package/containers.d.ts +0 -6
  571. package/containers.js +0 -4
  572. package/containers.js.map +0 -1
  573. package/core/component/config.d.ts +0 -58
  574. package/core/component/config.js +0 -14
  575. package/core/component/config.js.map +0 -1
  576. package/core/component/index.d.ts +0 -43
  577. package/core/component/index.js +0 -118
  578. package/core/component/index.js.map +0 -1
  579. package/core/component/types.d.ts +0 -2
  580. package/core/component/types.js +0 -2
  581. package/core/component/types.js.map +0 -1
  582. package/core/config/index.d.ts +0 -3
  583. package/core/config/index.js +0 -16
  584. package/core/config/index.js.map +0 -1
  585. package/core/container/config.d.ts +0 -48
  586. package/core/container/config.js +0 -29
  587. package/core/container/config.js.map +0 -1
  588. package/core/container/index.d.ts +0 -26
  589. package/core/container/index.js +0 -105
  590. package/core/container/index.js.map +0 -1
  591. package/core/xy-component/config.d.ts +0 -38
  592. package/core/xy-component/config.js +0 -20
  593. package/core/xy-component/config.js.map +0 -1
  594. package/core/xy-component/index.d.ts +0 -27
  595. package/core/xy-component/index.js +0 -74
  596. package/core/xy-component/index.js.map +0 -1
  597. package/data-models/core.d.ts +0 -6
  598. package/data-models/core.js +0 -14
  599. package/data-models/core.js.map +0 -1
  600. package/data-models/graph.d.ts +0 -24
  601. package/data-models/graph.js +0 -107
  602. package/data-models/graph.js.map +0 -1
  603. package/data-models/map-graph.d.ts +0 -21
  604. package/data-models/map-graph.js +0 -62
  605. package/data-models/map-graph.js.map +0 -1
  606. package/data-models/map.d.ts +0 -5
  607. package/data-models/map.js +0 -12
  608. package/data-models/map.js.map +0 -1
  609. package/data-models/series.d.ts +0 -6
  610. package/data-models/series.js +0 -19
  611. package/data-models/series.js.map +0 -1
  612. package/index.d.ts +0 -7
  613. package/index.js +0 -55
  614. package/index.js.map +0 -1
  615. package/maps/china-provinces.json.js +0 -140373
  616. package/maps/fr-regions.json.js +0 -14162
  617. package/maps/germany-regions.json.js +0 -35760
  618. package/maps/ind-regions.json.js +0 -290584
  619. package/maps/uk-regions.json.js +0 -96233
  620. package/maps/us-counties.json.js +0 -206318
  621. package/maps/us-states.json.js +0 -16345
  622. package/maps/world-110m-alpha.json.js +0 -251366
  623. package/maps/world-simple.json.js +0 -89428
  624. package/maps/world-simplest.json.js +0 -28175
  625. package/maps.d.ts +0 -60
  626. package/maps.js +0 -23
  627. package/styles/colors.d.ts +0 -7
  628. package/styles/colors.js +0 -24
  629. package/styles/colors.js.map +0 -1
  630. package/styles/index.d.ts +0 -7
  631. package/styles/index.js +0 -38
  632. package/styles/index.js.map +0 -1
  633. package/styles/sizes.d.ts +0 -2
  634. package/styles/sizes.js.map +0 -1
  635. package/types/accessor.d.ts +0 -5
  636. package/types/accessor.js +0 -2
  637. package/types/accessor.js.map +0 -1
  638. package/types/component.d.ts +0 -13
  639. package/types/component.js +0 -14
  640. package/types/component.js.map +0 -1
  641. package/types/curve.d.ts +0 -40
  642. package/types/curve.js +0 -46
  643. package/types/curve.js.map +0 -1
  644. package/types/data.d.ts +0 -7
  645. package/types/data.js +0 -2
  646. package/types/data.js.map +0 -1
  647. package/types/direction.d.ts +0 -6
  648. package/types/direction.js +0 -10
  649. package/types/direction.js.map +0 -1
  650. package/types/graph.d.ts +0 -35
  651. package/types/graph.js +0 -2
  652. package/types/graph.js.map +0 -1
  653. package/types/map.d.ts +0 -4
  654. package/types/map.js +0 -2
  655. package/types/map.js.map +0 -1
  656. package/types/misc.d.ts +0 -8
  657. package/types/position.d.ts +0 -20
  658. package/types/position.js +0 -27
  659. package/types/position.js.map +0 -1
  660. package/types/scale.d.ts +0 -23
  661. package/types/scale.js +0 -27
  662. package/types/scale.js.map +0 -1
  663. package/types/shape.d.ts +0 -7
  664. package/types/shape.js +0 -11
  665. package/types/shape.js.map +0 -1
  666. package/types/spacing.d.ts +0 -6
  667. package/types/spacing.js +0 -2
  668. package/types/spacing.js.map +0 -1
  669. package/types/svg.d.ts +0 -18
  670. package/types/svg.js +0 -22
  671. package/types/svg.js.map +0 -1
  672. package/types/symbol.d.ts +0 -18
  673. package/types/symbol.js +0 -24
  674. package/types/symbol.js.map +0 -1
  675. package/types/text.d.ts +0 -47
  676. package/types/text.js +0 -26
  677. package/types/text.js.map +0 -1
  678. package/types.d.ts +0 -27
  679. package/types.js +0 -30
  680. package/types.js.map +0 -1
  681. package/utils/color.d.ts +0 -10
  682. package/utils/color.js +0 -32
  683. package/utils/color.js.map +0 -1
  684. package/utils/d3.d.ts +0 -3
  685. package/utils/d3.js +0 -16
  686. package/utils/d3.js.map +0 -1
  687. package/utils/data.d.ts +0 -45
  688. package/utils/data.js +0 -274
  689. package/utils/data.js.map +0 -1
  690. package/utils/html.d.ts +0 -1
  691. package/utils/html.js +0 -16
  692. package/utils/html.js.map +0 -1
  693. package/utils/map.d.ts +0 -2
  694. package/utils/map.js +0 -20
  695. package/utils/map.js.map +0 -1
  696. package/utils/misc.d.ts +0 -9
  697. package/utils/misc.js +0 -47
  698. package/utils/misc.js.map +0 -1
  699. package/utils/path.d.ts +0 -23
  700. package/utils/path.js +0 -144
  701. package/utils/path.js.map +0 -1
  702. package/utils/scale.d.ts +0 -1
  703. package/utils/style.d.ts +0 -6
  704. package/utils/style.js +0 -24
  705. package/utils/style.js.map +0 -1
  706. package/utils/svg.d.ts +0 -3
  707. package/utils/text.d.ts +0 -139
  708. package/utils/text.js +0 -443
  709. package/utils/text.js.map +0 -1
  710. package/utils/type.d.ts +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/containers/xy-container/config.ts"],"sourcesContent":["// Core\nimport { XYComponentCore } from 'core/xy-component'\nimport { ContainerConfig, ContainerConfigInterface } from 'core/container/config'\nimport { Tooltip } from 'components/tooltip'\n\n// Components\nimport { Axis } from 'components/axis'\nimport { Crosshair } from 'components/crosshair'\n\n// Types\nimport { ContinuousScale } from 'types/scale'\nimport { Direction } from 'types/direction'\n\nexport interface XYContainerConfigInterface<Datum> extends ContainerConfigInterface {\n /** An array of visualization components. Default: `[]` */\n components?: XYComponentCore<Datum>[];\n\n /** Scale for X dimension, e.g. Scale.scaleLinear().\n * If set, this value will override the components' xScale and they will have a single shared xScale instance.\n * By default the components have their own scale instances but their `domain` and `range` values are synchronized.\n * Default: `undefined` */\n xScale?: ContinuousScale;\n /** Scale domain (data extent) for X dimension. By default this value is calculated automatically based on data. */\n xDomain?: [number | undefined, number | undefined];\n /** Constraint the minimum value of the X scale domain. Useful when the data is plotted along the X axis.\n * For example, imagine that you have a chart with dynamic data that has negative values. When values are small\n * (let's say in the range of [-0.01, 0]), you might still want the chart to display some meaningful value range (e.g. [-1, 0]). That can\n * be achieved by setting `xDomainMinConstraint` to `[undefined, -1]`. In addition to that, if you want to cut off the\n * values that are too low (let's say lower than -100), you can set the constraint to `[-100, -1]`\n * Default: `undefined` */\n xDomainMinConstraint?: [number | undefined, number | undefined];\n /** Constraint the minimum value of the X scale domain. Useful when the data is plotted along the X axis.\n * For example, imagine that you have a chart with dynamic data. When values are small\n * (let's say < 0.01), you might still want the chart to display some meaningful value range (e.g. [0, 1]). That can\n * be achieved by setting `xDomainMaxConstraint` to `[1, undefined]`. In addition to that, if you want to cut off the\n * values that are too high (let's say higher than 100), you can set the constraint to `[1, 100]`\n * Default: `undefined` */\n xDomainMaxConstraint?: [number | undefined, number | undefined];\n /** Force set the X scale range (in the screen space). By default the range is calculated automatically based on the\n * chart's set up */\n xRange?: [number, number];\n\n /** Scale for Y dimension, e.g. Scale.scaleLinear().\n * If set, this value will override the components' yScale and they will have a single shared yScale instance.\n * By default the components have their own scale instances but their `domain` and `range` values are synchronized.\n * Default: `undefined` */\n yScale?: ContinuousScale;\n /** Scale domain (data extent) for Y dimension. By default this value is calculated automatically based on data. */\n yDomain?: [number | undefined, number | undefined];\n /** Constraint the minimum value of the Y scale domain.\n * For example, imagine that you have a chart with dynamic data that has negative values. When values are small\n * (let's say in the range of [-0.01, 0]), you might still want the chart to display some meaningful value range (e.g. [-1, 0]). That can\n * be achieved by setting `yDomainMinConstraint` to `[undefined, -1]`. In addition to that, if you want to cut off the\n * values that are too low (let's say lower than -100), you can set the constraint to `[-100, -1]`\n * Default: `undefined` */\n yDomainMinConstraint?: [number | undefined, number | undefined];\n /** Constraint the minimum value of the Y scale domain.\n * For example, imagine that you have a chart with dynamic data. When values are small\n * (let's say < 0.01), you might still want the chart to display some meaningful value range (e.g. [0, 1]). That can\n * be achieved by setting `yDomainMaxConstraint` to `[1, undefined]`. In addition to that, if you want to cut off the\n * values that are too high (let's say higher than 100), you can set the constraint to `[1, 100]`\n * Default: `undefined` */\n yDomainMaxConstraint?: [number | undefined, number | undefined];\n /** Force set the Y scale range (in the screen space). By default the range is calculated automatically based on the\n * chart's set up */\n yRange?: [number, number];\n /** Y Axis direction. Default: `Direction.North` */\n yDirection?: Direction.South | Direction.North | string;\n\n /** X Axis component instance. Default: `undefined` */\n xAxis?: Axis<Datum>;\n /** Y Axis component instance. Default: `undefined` */\n yAxis?: Axis<Datum>;\n /** Enables automatic calculation of chart margins based on the size of the axes. Default: `true` */\n autoMargin?: boolean;\n /** Tooltip component. Default: `undefined` */\n tooltip?: Tooltip | undefined;\n /** Crosshair component. Default: `undefined` */\n crosshair?: Crosshair<Datum> | undefined;\n /** Prevents the chart domain from being empty (when domain's min and max values are equal).\n * That usually happens when all the data values are the same.\n * Setting to `true` will automatically extend the domain by `+1` when needed.\n * Default: `true` */\n preventEmptyDomain?: boolean;\n /** Sets the Y scale domain based on the current X scale domain (not the whole dataset). Default: `false` */\n scaleByDomain?: boolean;\n}\n\nexport class XYContainerConfig<Datum> extends ContainerConfig implements XYContainerConfigInterface<Datum> {\n components = []\n tooltip: Tooltip = undefined\n crosshair: Crosshair<Datum> = undefined\n xAxis: Axis<Datum> = undefined\n yAxis: Axis<Datum> = undefined\n autoMargin = true\n\n xScale = undefined\n xDomain = undefined\n xDomainMinConstraint = undefined\n xDomainMaxConstraint = undefined\n xRange = undefined\n\n yScale = undefined\n yDomain = undefined\n yDomainMinConstraint = undefined\n yDomainMaxConstraint = undefined\n yRange = undefined\n yDirection = Direction.North\n\n preventEmptyDomain = true\n scaleByDomain = false\n}\n"],"names":[],"mappings":";;;AAwFM,MAAO,iBAAyB,SAAQ,eAAe,CAAA;AAA7D,IAAA,WAAA,GAAA;;QACE,IAAU,CAAA,UAAA,GAAG,EAAE,CAAA;QACf,IAAO,CAAA,OAAA,GAAY,SAAS,CAAA;QAC5B,IAAS,CAAA,SAAA,GAAqB,SAAS,CAAA;QACvC,IAAK,CAAA,KAAA,GAAgB,SAAS,CAAA;QAC9B,IAAK,CAAA,KAAA,GAAgB,SAAS,CAAA;QAC9B,IAAU,CAAA,UAAA,GAAG,IAAI,CAAA;QAEjB,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;QAClB,IAAO,CAAA,OAAA,GAAG,SAAS,CAAA;QACnB,IAAoB,CAAA,oBAAA,GAAG,SAAS,CAAA;QAChC,IAAoB,CAAA,oBAAA,GAAG,SAAS,CAAA;QAChC,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;QAElB,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;QAClB,IAAO,CAAA,OAAA,GAAG,SAAS,CAAA;QACnB,IAAoB,CAAA,oBAAA,GAAG,SAAS,CAAA;QAChC,IAAoB,CAAA,oBAAA,GAAG,SAAS,CAAA;QAChC,IAAM,CAAA,MAAA,GAAG,SAAS,CAAA;AAClB,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAC,KAAK,CAAA;QAE5B,IAAkB,CAAA,kBAAA,GAAG,IAAI,CAAA;QACzB,IAAa,CAAA,aAAA,GAAG,KAAK,CAAA;KACtB;AAAA;;;;"}
@@ -1,34 +0,0 @@
1
- import "../../styles/index";
2
- import { ContainerCore } from "../../core/container";
3
- import { XYComponentCore } from "../../core/xy-component";
4
- import { XYComponentConfigInterface } from "../../core/xy-component/config";
5
- import { CoreDataModel } from "../../data-models/core";
6
- import { XYContainerConfig, XYContainerConfigInterface } from './config';
7
- import { AreaConfigInterface, BrushConfigInterface, LineConfigInterface, ScatterConfigInterface, StackedBarConfigInterface, TimelineConfigInterface } from '../../components';
8
- export declare type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum> | StackedBarConfigInterface<Datum> | LineConfigInterface<Datum> | ScatterConfigInterface<Datum> | BrushConfigInterface<Datum> | TimelineConfigInterface<Datum> | AreaConfigInterface<Datum>;
9
- export declare class XYContainer<Datum> extends ContainerCore {
10
- config: XYContainerConfig<Datum>;
11
- datamodel: CoreDataModel<Datum[]>;
12
- private _svgDefs;
13
- private _clipPath;
14
- private _clipPathId;
15
- private _axisMargin;
16
- private _firstRender;
17
- constructor(element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]);
18
- get components(): XYComponentCore<Datum>[];
19
- get width(): number;
20
- get height(): number;
21
- setData(data: Datum[], preventRender?: boolean): void;
22
- updateContainer(containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void;
23
- updateComponents(componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void;
24
- update(containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void;
25
- _render(customDuration?: number): void;
26
- updateScales<T extends XYComponentCore<Datum>>(...components: T[]): void;
27
- _setScales<T extends XYComponentCore<Datum>>(...components: T[]): void;
28
- _updateScalesDomain<T extends XYComponentCore<Datum>>(...components: T[]): void;
29
- _updateScalesRange<T extends XYComponentCore<Datum>>(...components: T[]): void;
30
- _renderAxes(duration: number): void;
31
- _setAutoMargin(): void;
32
- private _getMargin;
33
- destroy(): void;
34
- }
@@ -1,330 +0,0 @@
1
- import { css } from '@emotion/css';
2
- import { extent, merge } from 'd3-array';
3
- import '../../styles/index.js';
4
- import { ContainerCore } from '../../core/container/index.js';
5
- import { CoreDataModel } from '../../data-models/core.js';
6
- import { AxisType } from '../../components/axis/types.js';
7
- import { ScaleDimension } from '../../types/scale.js';
8
- import { Direction } from '../../types/direction.js';
9
- import { clamp, flatten, clean } from '../../utils/data.js';
10
- import { guid } from '../../utils/misc.js';
11
- import { XYContainerConfig } from './config.js';
12
-
13
- class XYContainer extends ContainerCore {
14
- constructor(element, config, data) {
15
- var _a, _b;
16
- super(element);
17
- this.config = new XYContainerConfig();
18
- this.datamodel = new CoreDataModel();
19
- this._clipPathId = guid();
20
- this._axisMargin = { top: 0, bottom: 0, left: 0, right: 0 };
21
- this._firstRender = true;
22
- this._clipPath = this.svg.append('clipPath')
23
- .attr('id', this._clipPathId);
24
- this._clipPath.append('rect');
25
- // When the base tag is specified on the HTML head,
26
- // Safari fails to find the corresponding filter URL.
27
- // We have to provide tull url in order to fix that
28
- const highlightFilterId = 'saturate';
29
- const baseUrl = window.location.href.replace(window.location.hash, '');
30
- this.svg.attr('class', css `
31
- --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable
32
- `);
33
- this._svgDefs = this.svg.append('defs');
34
- this._svgDefs.append('filter')
35
- .attr('id', highlightFilterId)
36
- .attr('filterUnits', 'objectBoundingBox')
37
- .html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>');
38
- if (config) {
39
- this.updateContainer(config, true);
40
- }
41
- if (data) {
42
- this.setData(data, true);
43
- }
44
- // Render if components are present and have data
45
- if ((_a = this.components) === null || _a === void 0 ? void 0 : _a.some(c => c.datamodel.data)) {
46
- this.render();
47
- }
48
- // Force re-render axes when fonts are loaded
49
- (_b = document.fonts) === null || _b === void 0 ? void 0 : _b.ready.then(() => {
50
- if (!this._firstRender)
51
- this._renderAxes(0);
52
- });
53
- }
54
- get components() {
55
- return this.config.components;
56
- }
57
- // Overriding ContainerCore default get width method to work with axis auto margin
58
- get width() {
59
- const margin = this._getMargin();
60
- return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY);
61
- }
62
- // Overriding ContainerCore default get height method to work with axis auto margin
63
- get height() {
64
- const margin = this._getMargin();
65
- return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY);
66
- }
67
- setData(data, preventRender) {
68
- var _a, _b, _c, _d;
69
- const { components, config } = this;
70
- if (!data)
71
- return;
72
- this.datamodel.data = data;
73
- components.forEach((c) => {
74
- c.setData(data);
75
- });
76
- (_a = config.crosshair) === null || _a === void 0 ? void 0 : _a.setData(data);
77
- (_b = config.xAxis) === null || _b === void 0 ? void 0 : _b.setData(data);
78
- (_c = config.yAxis) === null || _c === void 0 ? void 0 : _c.setData(data);
79
- (_d = config.tooltip) === null || _d === void 0 ? void 0 : _d.hide();
80
- if (!preventRender)
81
- this.render();
82
- }
83
- updateContainer(containerConfig, preventRender) {
84
- super.updateContainer(containerConfig);
85
- this.removeAllChildren();
86
- // If there were any new components added we need to pass them data
87
- this.setData(this.datamodel.data, true);
88
- // Set up the axes
89
- if (containerConfig.xAxis) {
90
- this.config.xAxis.config.type = AxisType.X;
91
- this.element.appendChild(containerConfig.xAxis.element);
92
- }
93
- if (containerConfig.yAxis) {
94
- this.config.yAxis.config.type = AxisType.Y;
95
- this.element.appendChild(containerConfig.yAxis.element);
96
- }
97
- // Re-insert elements to the DOM
98
- for (const c of this.components) {
99
- this.element.appendChild(c.element);
100
- }
101
- // Set up the tooltip
102
- const tooltip = containerConfig.tooltip;
103
- if (tooltip) {
104
- if (!tooltip.hasContainer())
105
- tooltip.setContainer(this._container);
106
- tooltip.setComponents(this.components);
107
- }
108
- // Set up the crosshair
109
- const crosshair = containerConfig.crosshair;
110
- if (crosshair) {
111
- crosshair.setContainer(this.svg);
112
- crosshair.tooltip = tooltip;
113
- this.element.appendChild(crosshair.element);
114
- }
115
- // Clipping path
116
- this.element.appendChild(this._clipPath.node());
117
- // Defs
118
- this.element.appendChild(this._svgDefs.node());
119
- // Rendering
120
- if (!preventRender)
121
- this.render();
122
- }
123
- updateComponents(componentConfigs, preventRender) {
124
- const { config } = this;
125
- this.components.forEach((c, i) => {
126
- const componentConfig = componentConfigs[i];
127
- if (componentConfig) {
128
- c.setConfig(componentConfigs[i]);
129
- }
130
- });
131
- this.updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair);
132
- if (!preventRender)
133
- this.render();
134
- }
135
- update(containerConfig, componentConfigs, data) {
136
- if (data)
137
- this.datamodel.data = data; // Just updating the data model because the `updateContainer` method has the `setData` step inside
138
- if (containerConfig)
139
- this.updateContainer(containerConfig, true);
140
- if (componentConfigs)
141
- this.updateComponents(componentConfigs, true);
142
- this.render();
143
- }
144
- _render(customDuration) {
145
- var _a, _b, _c;
146
- const { config } = this;
147
- super._render();
148
- // Calculate extra margin required to fit the axes
149
- if (config.autoMargin) {
150
- this._setAutoMargin();
151
- }
152
- // Get chart total margin after auto margin calculations
153
- const margin = this._getMargin();
154
- // Update Scales of all the components at once to calculate required paddings and sync them
155
- this.updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair);
156
- // Render components
157
- for (const c of this.components) {
158
- c.g.attr('transform', `translate(${margin.left},${margin.top})`)
159
- .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)
160
- .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null);
161
- c.render(customDuration);
162
- }
163
- this._renderAxes(this._firstRender ? 0 : customDuration);
164
- // Clip Rect
165
- // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)
166
- const clipPathExtension = 2;
167
- this._clipPath.select('rect')
168
- .attr('x', -clipPathExtension)
169
- .attr('y', -clipPathExtension)
170
- .attr('width', this.width + 2 * clipPathExtension)
171
- .attr('height', this.height + 2 * clipPathExtension);
172
- // Tooltip
173
- (_a = config.tooltip) === null || _a === void 0 ? void 0 : _a.update(); // Re-bind events
174
- // Crosshair
175
- const crosshair = config.crosshair;
176
- if (crosshair) {
177
- // Pass accessors
178
- const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y);
179
- const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y);
180
- // eslint-disable-next-line dot-notation
181
- const baselineAccessor = (_b = this.components.find(c => c.config['baseline'])) === null || _b === void 0 ? void 0 : _b.config['baseline'];
182
- crosshair.accessors = {
183
- x: (_c = this.components[0]) === null || _c === void 0 ? void 0 : _c.config.x,
184
- y: flatten(yAccessors),
185
- yStacked: flatten(yStackedAccessors),
186
- baseline: baselineAccessor,
187
- };
188
- crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)
189
- .style('clip-path', `url(#${this._clipPathId})`)
190
- .style('-webkit-clip-path', `url(#${this._clipPathId})`);
191
- crosshair.hide();
192
- }
193
- this._firstRender = false;
194
- }
195
- updateScales(...components) {
196
- const c = clean(components || this.components);
197
- this._setScales(...c);
198
- this._updateScalesDomain(...c);
199
- this._updateScalesRange(...c);
200
- }
201
- _setScales(...components) {
202
- const { config } = this;
203
- if (!components)
204
- return;
205
- // Set the X and Y scales
206
- if (config.xScale)
207
- components.forEach(c => c.setScale(ScaleDimension.X, config.xScale));
208
- if (config.yScale)
209
- components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale));
210
- }
211
- _updateScalesDomain(...components) {
212
- const { config } = this;
213
- if (!components)
214
- return;
215
- // Loop over all the dimensions
216
- Object.values(ScaleDimension).forEach((dimension) => {
217
- var _a, _b, _c, _d, _e, _f, _g, _h;
218
- const [min, max] = extent(merge(components
219
- .filter(c => !c.config.excludeFromDomainCalculation)
220
- .map(c => c.getDataExtent(dimension, config.scaleByDomain)))); // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that
221
- const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain;
222
- const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint;
223
- const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint;
224
- const domainMin = (_b = (_a = configuredDomain === null || configuredDomain === void 0 ? void 0 : configuredDomain[0]) !== null && _a !== void 0 ? _a : min) !== null && _b !== void 0 ? _b : 0;
225
- const domainMax = (_d = (_c = configuredDomain === null || configuredDomain === void 0 ? void 0 : configuredDomain[1]) !== null && _c !== void 0 ? _c : max) !== null && _d !== void 0 ? _d : 1;
226
- const domain = [
227
- clamp(domainMin, (_e = configuredDomainMinConstraint === null || configuredDomainMinConstraint === void 0 ? void 0 : configuredDomainMinConstraint[0]) !== null && _e !== void 0 ? _e : Number.NEGATIVE_INFINITY, (_f = configuredDomainMinConstraint === null || configuredDomainMinConstraint === void 0 ? void 0 : configuredDomainMinConstraint[1]) !== null && _f !== void 0 ? _f : Number.POSITIVE_INFINITY),
228
- clamp(domainMax, (_g = configuredDomainMaxConstraint === null || configuredDomainMaxConstraint === void 0 ? void 0 : configuredDomainMaxConstraint[0]) !== null && _g !== void 0 ? _g : Number.NEGATIVE_INFINITY, (_h = configuredDomainMaxConstraint === null || configuredDomainMaxConstraint === void 0 ? void 0 : configuredDomainMaxConstraint[1]) !== null && _h !== void 0 ? _h : Number.POSITIVE_INFINITY),
229
- ];
230
- if (config.preventEmptyDomain && (domain[0] === domain[1]) && isFinite(domain[0])) {
231
- domain[1] = domain[0] + 1;
232
- }
233
- components.forEach(c => c.setScaleDomain(dimension, domain));
234
- });
235
- }
236
- _updateScalesRange(...components) {
237
- var _a, _b, _c, _d, _e, _f;
238
- const { config } = this;
239
- if (!components)
240
- return;
241
- // Set initial scale range
242
- const isYDirectionSouth = config.yDirection === Direction.South;
243
- const xRange = [(_a = config.padding.left) !== null && _a !== void 0 ? _a : 0, (_b = this.width - config.padding.right) !== null && _b !== void 0 ? _b : 0];
244
- const yRange = [(_c = this.height - config.padding.bottom) !== null && _c !== void 0 ? _c : 0, (_d = config.padding.top) !== null && _d !== void 0 ? _d : 0];
245
- if (isYDirectionSouth)
246
- yRange.reverse();
247
- for (const c of components) {
248
- c.setSize(this.width, this.height, this.containerWidth, this.containerHeight);
249
- c.setScaleRange(ScaleDimension.X, (_e = config.xRange) !== null && _e !== void 0 ? _e : xRange);
250
- c.setScaleRange(ScaleDimension.Y, (_f = config.yRange) !== null && _f !== void 0 ? _f : yRange);
251
- }
252
- // Get and combine bleed
253
- const bleed = components.map(c => c.bleed).reduce((bleed, b) => {
254
- for (const key of Object.keys(bleed)) {
255
- if (bleed[key] < b[key])
256
- bleed[key] = b[key];
257
- }
258
- return bleed;
259
- }, { top: 0, bottom: 0, left: 0, right: 0 });
260
- // Update scale range
261
- for (const c of components) {
262
- c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right]);
263
- c.setScaleRange(ScaleDimension.Y, isYDirectionSouth
264
- ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards
265
- : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards
266
- );
267
- }
268
- }
269
- _renderAxes(duration) {
270
- const { config: { xAxis, yAxis } } = this;
271
- const margin = this._getMargin();
272
- const axes = clean([xAxis, yAxis]);
273
- axes.forEach(axis => {
274
- const offset = axis.getOffset(margin);
275
- axis.g.attr('transform', `translate(${offset.left},${offset.top})`);
276
- axis.render(duration);
277
- });
278
- }
279
- _setAutoMargin() {
280
- const { config: { xAxis, yAxis } } = this;
281
- // At first we need to set the domain to the scales
282
- const components = clean([...this.components, xAxis, yAxis]);
283
- this._updateScalesDomain(...components);
284
- // Calculate margin required by the axes
285
- // We do two iterations on the first render, because the amount and size of ticks can change
286
- // after new margin are calculated and applied (axes dimensions will change).
287
- // That's needed for correct label placement.
288
- const numIterations = this._firstRender ? 2 : 1;
289
- for (let i = 0; i < numIterations; i += 1) {
290
- const axisMargin = { top: 0, bottom: 0, left: 0, right: 0 };
291
- this._updateScalesRange(...components);
292
- const axes = clean([xAxis, yAxis]);
293
- axes.forEach(axis => {
294
- axis.preRender();
295
- const m = axis.getRequiredMargin();
296
- if (axisMargin.top < m.top)
297
- axisMargin.top = m.top;
298
- if (axisMargin.bottom < m.bottom)
299
- axisMargin.bottom = m.bottom;
300
- if (axisMargin.left < m.left)
301
- axisMargin.left = m.left;
302
- if (axisMargin.right < m.right)
303
- axisMargin.right = m.right;
304
- });
305
- this._axisMargin = axisMargin;
306
- }
307
- }
308
- _getMargin() {
309
- const { config: { margin } } = this;
310
- return {
311
- top: margin.top + this._axisMargin.top,
312
- bottom: margin.bottom + this._axisMargin.bottom,
313
- left: margin.left + this._axisMargin.left,
314
- right: margin.right + this._axisMargin.right,
315
- };
316
- }
317
- destroy() {
318
- const { components, config: { tooltip, crosshair, xAxis, yAxis } } = this;
319
- super.destroy();
320
- for (const c of components)
321
- c === null || c === void 0 ? void 0 : c.destroy();
322
- tooltip === null || tooltip === void 0 ? void 0 : tooltip.destroy();
323
- crosshair === null || crosshair === void 0 ? void 0 : crosshair.destroy();
324
- xAxis === null || xAxis === void 0 ? void 0 : xAxis.destroy();
325
- yAxis === null || yAxis === void 0 ? void 0 : yAxis.destroy();
326
- }
327
- }
328
-
329
- export { XYContainer };
330
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.ts"],"sourcesContent":["import { css } from '@emotion/css'\nimport { extent, merge as mergeArrays } from 'd3-array'\nimport { Selection } from 'd3-selection'\n\n// Global CSS variables (side effects import)\nimport 'styles/index'\n\n// Core\nimport { ContainerCore } from 'core/container'\nimport { XYComponentCore } from 'core/xy-component'\nimport { XYComponentConfigInterface } from 'core/xy-component/config'\n\n// Data Model\nimport { CoreDataModel } from 'data-models/core'\n\n// Types\nimport { Spacing } from 'types/spacing'\nimport { AxisType } from 'components/axis/types'\nimport { ScaleDimension } from 'types/scale'\nimport { Direction } from 'types/direction'\n\n// Utils\nimport { clamp, clean, flatten } from 'utils/data'\nimport { guid } from 'utils/misc'\n\n// Config\nimport { XYContainerConfig, XYContainerConfigInterface } from './config'\nimport {\n AreaConfigInterface,\n BrushConfigInterface,\n LineConfigInterface,\n ScatterConfigInterface,\n StackedBarConfigInterface,\n TimelineConfigInterface,\n} from '../../components'\n\nexport type XYConfigInterface<Datum> = XYComponentConfigInterface<Datum>\n| StackedBarConfigInterface<Datum>\n| LineConfigInterface<Datum>\n| ScatterConfigInterface<Datum>\n| BrushConfigInterface<Datum>\n| TimelineConfigInterface<Datum>\n| AreaConfigInterface<Datum>\n\nexport class XYContainer<Datum> extends ContainerCore {\n config: XYContainerConfig<Datum> = new XYContainerConfig()\n datamodel: CoreDataModel<Datum[]> = new CoreDataModel()\n private _svgDefs: Selection<SVGDefsElement, unknown, null, undefined>\n private _clipPath: Selection<SVGClipPathElement, unknown, null, undefined>\n private _clipPathId = guid()\n private _axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n private _firstRender = true\n\n constructor (element: HTMLElement, config?: XYContainerConfigInterface<Datum>, data?: Datum[]) {\n super(element)\n\n this._clipPath = this.svg.append('clipPath')\n .attr('id', this._clipPathId)\n this._clipPath.append('rect')\n\n // When the base tag is specified on the HTML head,\n // Safari fails to find the corresponding filter URL.\n // We have to provide tull url in order to fix that\n const highlightFilterId = 'saturate'\n const baseUrl = window.location.href.replace(window.location.hash, '')\n this.svg.attr('class', css`\n --highlight-filter-id: url(${baseUrl}#${highlightFilterId}); // defining a css variable\n `)\n\n this._svgDefs = this.svg.append('defs')\n this._svgDefs.append('filter')\n .attr('id', highlightFilterId)\n .attr('filterUnits', 'objectBoundingBox')\n .html('<feColorMatrix type=\"saturate\" in=\"SourceGraphic\" values=\"1.35\"/>')\n\n if (config) {\n this.updateContainer(config, true)\n }\n\n if (data) {\n this.setData(data, true)\n }\n\n // Render if components are present and have data\n if (this.components?.some(c => c.datamodel.data)) {\n this.render()\n }\n\n // Force re-render axes when fonts are loaded\n (document as any).fonts?.ready.then(() => {\n if (!this._firstRender) this._renderAxes(0)\n })\n }\n\n get components (): XYComponentCore<Datum>[] {\n return this.config.components\n }\n\n // Overriding ContainerCore default get width method to work with axis auto margin\n get width (): number {\n const margin = this._getMargin()\n return clamp(this.containerWidth - margin.left - margin.right, 0, Number.POSITIVE_INFINITY)\n }\n\n // Overriding ContainerCore default get height method to work with axis auto margin\n get height (): number {\n const margin = this._getMargin()\n\n return clamp(this.containerHeight - margin.top - margin.bottom, 0, Number.POSITIVE_INFINITY)\n }\n\n setData (data: Datum[], preventRender?: boolean): void {\n const { components, config } = this\n if (!data) return\n this.datamodel.data = data\n\n components.forEach((c) => {\n c.setData(data)\n })\n\n config.crosshair?.setData(data)\n config.xAxis?.setData(data)\n config.yAxis?.setData(data)\n config.tooltip?.hide()\n if (!preventRender) this.render()\n }\n\n updateContainer (containerConfig: XYContainerConfigInterface<Datum>, preventRender?: boolean): void {\n super.updateContainer(containerConfig)\n this.removeAllChildren()\n\n // If there were any new components added we need to pass them data\n this.setData(this.datamodel.data, true)\n\n // Set up the axes\n if (containerConfig.xAxis) {\n this.config.xAxis.config.type = AxisType.X\n this.element.appendChild(containerConfig.xAxis.element)\n }\n if (containerConfig.yAxis) {\n this.config.yAxis.config.type = AxisType.Y\n this.element.appendChild(containerConfig.yAxis.element)\n }\n\n // Re-insert elements to the DOM\n for (const c of this.components) {\n this.element.appendChild(c.element)\n }\n\n // Set up the tooltip\n const tooltip = containerConfig.tooltip\n if (tooltip) {\n if (!tooltip.hasContainer()) tooltip.setContainer(this._container)\n tooltip.setComponents(this.components)\n }\n\n // Set up the crosshair\n const crosshair = containerConfig.crosshair\n if (crosshair) {\n crosshair.setContainer(this.svg)\n crosshair.tooltip = tooltip\n\n this.element.appendChild(crosshair.element)\n }\n\n // Clipping path\n this.element.appendChild(this._clipPath.node())\n\n // Defs\n this.element.appendChild(this._svgDefs.node())\n\n // Rendering\n if (!preventRender) this.render()\n }\n\n updateComponents (componentConfigs: XYConfigInterface<Datum>[], preventRender?: boolean): void {\n const { config } = this\n\n this.components.forEach((c, i) => {\n const componentConfig = componentConfigs[i]\n if (componentConfig) {\n c.setConfig(componentConfigs[i])\n }\n })\n\n this.updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n if (!preventRender) this.render()\n }\n\n update (containerConfig: XYContainerConfigInterface<Datum>, componentConfigs?: XYComponentConfigInterface<Datum>[], data?: Datum[]): void {\n if (data) this.datamodel.data = data // Just updating the data model because the `updateContainer` method has the `setData` step inside\n if (containerConfig) this.updateContainer(containerConfig, true)\n if (componentConfigs) this.updateComponents(componentConfigs, true)\n this.render()\n }\n\n _render (customDuration?: number): void {\n const { config } = this\n super._render()\n\n // Calculate extra margin required to fit the axes\n if (config.autoMargin) {\n this._setAutoMargin()\n }\n\n // Get chart total margin after auto margin calculations\n const margin = this._getMargin()\n\n // Update Scales of all the components at once to calculate required paddings and sync them\n this.updateScales(...this.components, config.xAxis, config.yAxis, config.crosshair)\n\n // Render components\n for (const c of this.components) {\n c.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n .style('-webkit-clip-path', c.clippable ? `url(#${this._clipPathId})` : null)\n\n c.render(customDuration)\n }\n\n this._renderAxes(this._firstRender ? 0 : customDuration)\n\n // Clip Rect\n // Extending the clipping path to allow small overflow (e.g. Line will looks better that way when it touches the edges)\n const clipPathExtension = 2\n this._clipPath.select('rect')\n .attr('x', -clipPathExtension)\n .attr('y', -clipPathExtension)\n .attr('width', this.width + 2 * clipPathExtension)\n .attr('height', this.height + 2 * clipPathExtension)\n\n // Tooltip\n config.tooltip?.update() // Re-bind events\n\n // Crosshair\n const crosshair = config.crosshair\n if (crosshair) {\n // Pass accessors\n const yAccessors = this.components.filter(c => !c.stacked).map(c => c.config.y)\n const yStackedAccessors = this.components.filter(c => c.stacked).map(c => c.config.y)\n // eslint-disable-next-line dot-notation\n const baselineAccessor = this.components.find(c => c.config['baseline'])?.config['baseline']\n\n crosshair.accessors = {\n x: this.components[0]?.config.x,\n y: flatten(yAccessors),\n yStacked: flatten(yStackedAccessors),\n baseline: baselineAccessor,\n }\n\n crosshair.g.attr('transform', `translate(${margin.left},${margin.top})`)\n .style('clip-path', `url(#${this._clipPathId})`)\n .style('-webkit-clip-path', `url(#${this._clipPathId})`)\n crosshair.hide()\n }\n\n this._firstRender = false\n }\n\n updateScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const c = clean(components || this.components)\n this._setScales(...c)\n this._updateScalesDomain(...c)\n this._updateScalesRange(...c)\n }\n\n _setScales<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set the X and Y scales\n if (config.xScale) components.forEach(c => c.setScale(ScaleDimension.X, config.xScale))\n if (config.yScale) components.forEach(c => c.setScale(ScaleDimension.Y, config.yScale))\n }\n\n _updateScalesDomain<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Loop over all the dimensions\n Object.values(ScaleDimension).forEach((dimension: ScaleDimension) => {\n const [min, max] = extent(\n mergeArrays(\n components\n .filter(c => !c.config.excludeFromDomainCalculation)\n .map(c => c.getDataExtent(dimension, config.scaleByDomain))\n ) as number[]\n ) // Components with undefined dimension accessors will return [undefined, undefined] but d3.extent will take care of that\n\n const configuredDomain = dimension === ScaleDimension.Y ? config.yDomain : config.xDomain\n const configuredDomainMinConstraint = dimension === ScaleDimension.Y ? config.yDomainMinConstraint : config.xDomainMinConstraint\n const configuredDomainMaxConstraint = dimension === ScaleDimension.Y ? config.yDomainMaxConstraint : config.xDomainMaxConstraint\n const domainMin = configuredDomain?.[0] ?? min ?? 0\n const domainMax = configuredDomain?.[1] ?? max ?? 1\n const domain = [\n clamp(domainMin, configuredDomainMinConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMinConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n clamp(domainMax, configuredDomainMaxConstraint?.[0] ?? Number.NEGATIVE_INFINITY, configuredDomainMaxConstraint?.[1] ?? Number.POSITIVE_INFINITY),\n ]\n\n if (config.preventEmptyDomain && (domain[0] === domain[1]) && isFinite(domain[0])) {\n domain[1] = domain[0] + 1\n }\n\n components.forEach(c => c.setScaleDomain(dimension, domain))\n })\n }\n\n _updateScalesRange<T extends XYComponentCore<Datum>> (...components: T[]): void {\n const { config } = this\n if (!components) return\n\n // Set initial scale range\n const isYDirectionSouth = config.yDirection === Direction.South\n const xRange: [number, number] = [config.padding.left ?? 0, this.width - config.padding.right ?? 0]\n const yRange: [number, number] = [this.height - config.padding.bottom ?? 0, config.padding.top ?? 0]\n if (isYDirectionSouth) yRange.reverse()\n\n for (const c of components) {\n c.setSize(this.width, this.height, this.containerWidth, this.containerHeight)\n c.setScaleRange(ScaleDimension.X, config.xRange ?? xRange)\n c.setScaleRange(ScaleDimension.Y, config.yRange ?? yRange)\n }\n\n // Get and combine bleed\n const bleed = components.map(c => c.bleed).reduce((bleed, b) => {\n for (const key of Object.keys(bleed)) {\n if (bleed[key] < b[key]) bleed[key] = b[key]\n }\n return bleed\n }, { top: 0, bottom: 0, left: 0, right: 0 })\n\n // Update scale range\n for (const c of components) {\n c.setScaleRange(ScaleDimension.X, [xRange[0] + bleed.left, xRange[1] - bleed.right])\n c.setScaleRange(\n ScaleDimension.Y,\n isYDirectionSouth\n ? [yRange[0] + bleed.top, yRange[1] - bleed.bottom] // if Y axis is directed downwards\n : [yRange[0] - bleed.bottom, yRange[1] + bleed.top] // if Y axis is directed upwards\n )\n }\n }\n\n _renderAxes (duration: number): void {\n const { config: { xAxis, yAxis } } = this\n const margin = this._getMargin()\n\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n const offset = axis.getOffset(margin)\n axis.g.attr('transform', `translate(${offset.left},${offset.top})`)\n axis.render(duration)\n })\n }\n\n _setAutoMargin (): void {\n const { config: { xAxis, yAxis } } = this\n\n // At first we need to set the domain to the scales\n const components = clean([...this.components, xAxis, yAxis])\n this._updateScalesDomain(...components)\n\n // Calculate margin required by the axes\n // We do two iterations on the first render, because the amount and size of ticks can change\n // after new margin are calculated and applied (axes dimensions will change).\n // That's needed for correct label placement.\n const numIterations = this._firstRender ? 2 : 1\n for (let i = 0; i < numIterations; i += 1) {\n const axisMargin: Spacing = { top: 0, bottom: 0, left: 0, right: 0 }\n this._updateScalesRange(...components)\n const axes = clean([xAxis, yAxis])\n axes.forEach(axis => {\n axis.preRender()\n\n const m = axis.getRequiredMargin()\n if (axisMargin.top < m.top) axisMargin.top = m.top\n if (axisMargin.bottom < m.bottom) axisMargin.bottom = m.bottom\n if (axisMargin.left < m.left) axisMargin.left = m.left\n if (axisMargin.right < m.right) axisMargin.right = m.right\n })\n\n this._axisMargin = axisMargin\n }\n }\n\n private _getMargin (): Spacing {\n const { config: { margin } } = this\n\n return {\n top: margin.top + this._axisMargin.top,\n bottom: margin.bottom + this._axisMargin.bottom,\n left: margin.left + this._axisMargin.left,\n right: margin.right + this._axisMargin.right,\n }\n }\n\n public destroy (): void {\n const { components, config: { tooltip, crosshair, xAxis, yAxis } } = this\n super.destroy()\n\n for (const c of components) c?.destroy()\n tooltip?.destroy()\n crosshair?.destroy()\n xAxis?.destroy()\n yAxis?.destroy()\n }\n}\n"],"names":["mergeArrays"],"mappings":";;;;;;;;;;;;AA4CM,MAAO,WAAmB,SAAQ,aAAa,CAAA;AASnD,IAAA,WAAA,CAAa,OAAoB,EAAE,MAA0C,EAAE,IAAc,EAAA;;QAC3F,KAAK,CAAC,OAAO,CAAC,CAAA;AAThB,QAAA,IAAA,CAAA,MAAM,GAA6B,IAAI,iBAAiB,EAAE,CAAA;AAC1D,QAAA,IAAA,CAAA,SAAS,GAA2B,IAAI,aAAa,EAAE,CAAA;QAG/C,IAAW,CAAA,WAAA,GAAG,IAAI,EAAE,CAAA;AACpB,QAAA,IAAA,CAAA,WAAW,GAAY,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;QAC/D,IAAY,CAAA,YAAA,GAAG,IAAI,CAAA;QAKzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC;AACzC,aAAA,IAAI,CAAC,IAAI,EAAE,I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,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,IAAI,CAAA;QACzE,KAAK,CAAC,OAAO,EAAE,CAAA;QAEf,KAAK,MAAM,CAAC,IAAI,UAAU;AAAE,YAAA,CAAC,aAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;AACxC,QAAA,OAAO,aAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,OAAO,EAAE,CAAA;AAClB,QAAA,SAAS,aAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,EAAE,CAAA;AACpB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;AAChB,QAAA,KAAK,aAAL,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAL,KAAK,CAAE,OAAO,EAAE,CAAA;KACjB;AACF;;;;"}
package/containers.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { ContainerCore } from './core/container';
2
- export type { ContainerConfigInterface } from './core/container/config';
3
- export { SingleContainer } from './containers/single-container';
4
- export type { SingleContainerConfigInterface } from './containers/single-container/config';
5
- export { XYContainer } from './containers/xy-container';
6
- export type { XYContainerConfigInterface } from './containers/xy-container/config';
package/containers.js DELETED
@@ -1,4 +0,0 @@
1
- export { ContainerCore } from './core/container/index.js';
2
- export { SingleContainer } from './containers/single-container/index.js';
3
- export { XYContainer } from './containers/xy-container/index.js';
4
- //# sourceMappingURL=containers.js.map
package/containers.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"containers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,58 +0,0 @@
1
- import { Config } from "../config";
2
- import { VisEventCallback, VisEventType } from "./types";
3
- export interface ComponentConfigInterface {
4
- /** Animation duration of the data update transitions in milliseconds. Default: `600` */
5
- duration?: number;
6
- /** Events configuration. An object containing properties in the following format:
7
- *
8
- * ```
9
- * {
10
- *  [selectorString]: {
11
- *  [eventType]: callbackFunction
12
- * }
13
- * }
14
- * ```
15
- * e.g.:
16
- * ```
17
- * {
18
- *  [Area.selectors.area]: {
19
- * click: (d) => console.log("Clicked Area", d)
20
- * }
21
- * }
22
- * ```
23
- */
24
- events?: {
25
- [selector: string]: {
26
- [eventType in VisEventType]?: VisEventCallback;
27
- };
28
- };
29
- /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful
30
- * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:
31
- *
32
- * ```
33
- * {
34
- *  [selectorString]: {
35
- *  [attributeName]: attribute constant value or accessor function
36
- * }
37
- * }
38
- * ```
39
- * e.g.:
40
- * ```
41
- * {
42
- *  [Area.selectors.area]: {
43
- * "test-value": d => d.value
44
- * }
45
- * }
46
- * ```
47
- */
48
- attributes?: {
49
- [selector: string]: {
50
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
51
- };
52
- };
53
- }
54
- export declare class ComponentConfig extends Config implements ComponentConfigInterface {
55
- duration: number;
56
- events: {};
57
- attributes: {};
58
- }
@@ -1,14 +0,0 @@
1
- import { Config } from '../config/index.js';
2
-
3
- /* eslint-disable no-irregular-whitespace */
4
- class ComponentConfig extends Config {
5
- constructor() {
6
- super(...arguments);
7
- this.duration = 600;
8
- this.events = {};
9
- this.attributes = {};
10
- }
11
- }
12
-
13
- export { ComponentConfig };
14
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/core/component/config.ts"],"sourcesContent":["/* eslint-disable no-irregular-whitespace */\nimport { Config } from 'core/config'\nimport { VisEventCallback, VisEventType } from 'core/component/types'\n\nexport interface ComponentConfigInterface {\n /** Animation duration of the data update transitions in milliseconds. Default: `600` */\n duration?: number;\n /** Events configuration. An object containing properties in the following format:\n *\n * ```\n * {\n *  [selectorString]: {\n *  [eventType]: callbackFunction\n * }\n * }\n * ```\n * e.g.:\n * ```\n * {\n *  [Area.selectors.area]: {\n * click: (d) => console.log(\"Clicked Area\", d)\n * }\n * }\n * ```\n */\n events?: {\n [selector: string]: {\n [eventType in VisEventType]?: VisEventCallback;\n };\n };\n /** You can set every SVG and HTML visualization object to have a custom DOM attributes, which is useful\n * when you want to do unit or end-to-end testing. Attributes configuration object has the following structure:\n *\n * ```\n * {\n *  [selectorString]: {\n *  [attributeName]: attribute constant value or accessor function\n * }\n * }\n * ```\n * e.g.:\n * ```\n * {\n *  [Area.selectors.area]: {\n * \"test-value\": d => d.value\n * }\n * }\n * ```\n */\n attributes?: {\n [selector: string]: {\n [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);\n };\n };\n}\n\nexport class ComponentConfig extends Config implements ComponentConfigInterface {\n duration = 600\n events = {}\n attributes = {}\n}\n"],"names":[],"mappings":";;AAAA;AAwDM,MAAO,eAAgB,SAAQ,MAAM,CAAA;AAA3C,IAAA,WAAA,GAAA;;QACE,IAAQ,CAAA,QAAA,GAAG,GAAG,CAAA;QACd,IAAM,CAAA,MAAA,GAAG,EAAE,CAAA;QACX,IAAU,CAAA,UAAA,GAAG,EAAE,CAAA;KAChB;AAAA;;;;"}
@@ -1,43 +0,0 @@
1
- import { Selection } from 'd3-selection';
2
- import { CoreDataModel } from "../../data-models/core";
3
- import { ComponentType, Sizing } from "../../types/component";
4
- import { Spacing } from "../../types/spacing";
5
- import { VisEventCallback, VisEventType } from './types';
6
- import { ComponentConfig, ComponentConfigInterface } from './config';
7
- export declare class ComponentCore<CoreDatum, ConfigClass extends ComponentConfig = ComponentConfig, ConfigInterface extends ComponentConfigInterface = ComponentConfigInterface> {
8
- element: SVGGElement | HTMLElement;
9
- type: ComponentType;
10
- g: Selection<SVGGElement, unknown, null, undefined> | Selection<HTMLElement, unknown, null, undefined>;
11
- config: ConfigClass;
12
- prevConfig: ConfigClass;
13
- datamodel: CoreDataModel<CoreDatum>;
14
- sizing: Sizing | string;
15
- uid: string;
16
- events: {
17
- [selector: string]: {
18
- [eventType in VisEventType]?: VisEventCallback;
19
- };
20
- };
21
- /** Component width in pixels. This property is set automatically by the container. */
22
- protected _width: number;
23
- /** Component height in pixels. This property is set automatically by the container. */
24
- protected _height: number;
25
- /** Container width in pixels. This property is set automatically by the container. */
26
- protected _containerWidth: number | undefined;
27
- /** Container height in pixels. This property is set automatically by the container. */
28
- protected _containerHeight: number | undefined;
29
- _setUpComponentEventsThrottled: import("throttle-debounce").throttle<() => void>;
30
- _setCustomAttributesThrottled: import("throttle-debounce").throttle<() => void>;
31
- constructor(type?: ComponentType);
32
- setConfig(config: ConfigInterface): void;
33
- setData(data: CoreDatum): void;
34
- setSize(width: number, height: number, containerWidth: number, containerHeight: number): void;
35
- render(duration?: number): void;
36
- get bleed(): Spacing;
37
- _render(duration?: number): void;
38
- private _setCustomAttributes;
39
- private _setUpComponentEvents;
40
- private _bindEvents;
41
- destroy(): void;
42
- isDestroyed(): boolean;
43
- }