@perses-dev/components 0.0.0-snapshot-embed-import-errors-8906900 → 0.0.0-snapshot-test-internal-dep-dd238ac

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 (450) hide show
  1. package/README.md +2 -3
  2. package/dist/ColorPicker/ColorPicker.d.ts +12 -0
  3. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -0
  4. package/dist/ColorPicker/ColorPicker.js +78 -0
  5. package/dist/ColorPicker/ColorPicker.js.map +1 -0
  6. package/dist/ColorPicker/index.d.ts +2 -0
  7. package/dist/ColorPicker/index.d.ts.map +1 -0
  8. package/dist/{Tooltip → ColorPicker}/index.js +2 -3
  9. package/dist/ColorPicker/index.js.map +1 -0
  10. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +2 -1
  11. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  12. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +88 -51
  13. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  14. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  15. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +3 -2
  16. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  17. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
  18. package/dist/DateTimeRangePicker/TimeRangeSelector.js +4 -1
  19. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  20. package/dist/DateTimeRangePicker/index.js +1 -1
  21. package/dist/DateTimeRangePicker/index.js.map +1 -1
  22. package/dist/DateTimeRangePicker/utils.js +1 -1
  23. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  24. package/dist/Dialog/Dialog.d.ts +24 -0
  25. package/dist/Dialog/Dialog.d.ts.map +1 -0
  26. package/dist/Dialog/Dialog.js +74 -0
  27. package/dist/Dialog/Dialog.js.map +1 -0
  28. package/dist/Dialog/index.d.ts +2 -0
  29. package/dist/Dialog/index.d.ts.map +1 -0
  30. package/dist/Dialog/index.js +15 -0
  31. package/dist/{Tooltip → Dialog}/index.js.map +1 -1
  32. package/dist/Drawer/Drawer.js +1 -1
  33. package/dist/Drawer/Drawer.js.map +1 -1
  34. package/dist/Drawer/index.js +1 -1
  35. package/dist/Drawer/index.js.map +1 -1
  36. package/dist/{EChart.d.ts → EChart/EChart.d.ts} +3 -3
  37. package/dist/EChart/EChart.d.ts.map +1 -0
  38. package/dist/{EChart.js → EChart/EChart.js} +2 -3
  39. package/dist/EChart/EChart.js.map +1 -0
  40. package/dist/EChart/index.d.ts +2 -0
  41. package/dist/EChart/index.d.ts.map +1 -0
  42. package/dist/EChart/index.js +15 -0
  43. package/dist/EChart/index.js.map +1 -0
  44. package/dist/ErrorAlert.js +1 -1
  45. package/dist/ErrorAlert.js.map +1 -1
  46. package/dist/ErrorBoundary.js +1 -1
  47. package/dist/ErrorBoundary.js.map +1 -1
  48. package/dist/GaugeChart/GaugeChart.d.ts +1 -2
  49. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  50. package/dist/GaugeChart/GaugeChart.js +3 -2
  51. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  52. package/dist/GaugeChart/index.js +1 -1
  53. package/dist/GaugeChart/index.js.map +1 -1
  54. package/dist/InfoTooltip/InfoTooltip.d.ts +1 -6
  55. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  56. package/dist/InfoTooltip/InfoTooltip.js +2 -9
  57. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  58. package/dist/InfoTooltip/index.js +1 -1
  59. package/dist/InfoTooltip/index.js.map +1 -1
  60. package/dist/JSONEditor.js +1 -1
  61. package/dist/JSONEditor.js.map +1 -1
  62. package/dist/Legend/CompactLegend.js +1 -1
  63. package/dist/Legend/CompactLegend.js.map +1 -1
  64. package/dist/Legend/Legend.d.ts.map +1 -1
  65. package/dist/Legend/Legend.js +13 -5
  66. package/dist/Legend/Legend.js.map +1 -1
  67. package/dist/Legend/LegendColorBadge.js +1 -1
  68. package/dist/Legend/LegendColorBadge.js.map +1 -1
  69. package/dist/Legend/ListLegend.js +1 -1
  70. package/dist/Legend/ListLegend.js.map +1 -1
  71. package/dist/Legend/ListLegendItem.js +1 -1
  72. package/dist/Legend/ListLegendItem.js.map +1 -1
  73. package/dist/Legend/index.js +1 -1
  74. package/dist/Legend/index.js.map +1 -1
  75. package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
  76. package/dist/LegendOptionsEditor/LegendOptionsEditor.js +13 -18
  77. package/dist/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  78. package/dist/LegendOptionsEditor/index.js +1 -1
  79. package/dist/LegendOptionsEditor/index.js.map +1 -1
  80. package/dist/LineChart/LineChart.d.ts +4 -2
  81. package/dist/LineChart/LineChart.d.ts.map +1 -1
  82. package/dist/LineChart/LineChart.js +4 -4
  83. package/dist/LineChart/LineChart.js.map +1 -1
  84. package/dist/LineChart/index.js +1 -1
  85. package/dist/LineChart/index.js.map +1 -1
  86. package/dist/LineChart/utils.js +2 -2
  87. package/dist/LineChart/utils.js.map +1 -1
  88. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  89. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  90. package/dist/OptionsEditorLayout/OptionsEditorControl.js +2 -2
  91. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  92. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  93. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  94. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +3 -2
  95. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  96. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +18 -6
  97. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  98. package/dist/OptionsEditorLayout/index.js +1 -1
  99. package/dist/OptionsEditorLayout/index.js.map +1 -1
  100. package/dist/StatChart/StatChart.d.ts +1 -3
  101. package/dist/StatChart/StatChart.d.ts.map +1 -1
  102. package/dist/StatChart/StatChart.js +23 -16
  103. package/dist/StatChart/StatChart.js.map +1 -1
  104. package/dist/StatChart/index.js +1 -1
  105. package/dist/StatChart/index.js.map +1 -1
  106. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +4 -0
  107. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +1 -0
  108. package/dist/ThresholdsEditor/ThresholdColorPicker.js +76 -0
  109. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -0
  110. package/dist/ThresholdsEditor/ThresholdInput.d.ts +13 -0
  111. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -0
  112. package/dist/ThresholdsEditor/ThresholdInput.js +61 -0
  113. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -0
  114. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +10 -0
  115. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -0
  116. package/dist/ThresholdsEditor/ThresholdsEditor.js +215 -0
  117. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -0
  118. package/dist/ThresholdsEditor/index.d.ts +2 -0
  119. package/dist/ThresholdsEditor/index.d.ts.map +1 -0
  120. package/dist/ThresholdsEditor/index.js +15 -0
  121. package/dist/ThresholdsEditor/index.js.map +1 -0
  122. package/dist/{Tooltip → TimeSeriesTooltip}/SeriesInfo.d.ts +1 -2
  123. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -0
  124. package/dist/TimeSeriesTooltip/SeriesInfo.js +89 -0
  125. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -0
  126. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +9 -0
  127. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -0
  128. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +99 -0
  129. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -0
  130. package/dist/{Tooltip → TimeSeriesTooltip}/SeriesMarker.d.ts +2 -1
  131. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -0
  132. package/dist/{Tooltip → TimeSeriesTooltip}/SeriesMarker.js +7 -7
  133. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -0
  134. package/dist/{Tooltip/Tooltip.d.ts → TimeSeriesTooltip/TimeSeriesTooltip.d.ts} +4 -4
  135. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +1 -0
  136. package/dist/{Tooltip/Tooltip.js → TimeSeriesTooltip/TimeSeriesTooltip.js} +3 -4
  137. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +1 -0
  138. package/dist/{Tooltip → TimeSeriesTooltip}/TooltipContent.d.ts +1 -2
  139. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -0
  140. package/dist/{Tooltip → TimeSeriesTooltip}/TooltipContent.js +1 -1
  141. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -0
  142. package/dist/TimeSeriesTooltip/focused-series.d.ts.map +1 -0
  143. package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.js +6 -6
  144. package/dist/TimeSeriesTooltip/focused-series.js.map +1 -0
  145. package/dist/TimeSeriesTooltip/index.d.ts +9 -0
  146. package/dist/TimeSeriesTooltip/index.d.ts.map +1 -0
  147. package/dist/TimeSeriesTooltip/index.js +22 -0
  148. package/dist/TimeSeriesTooltip/index.js.map +1 -0
  149. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -0
  150. package/dist/{Tooltip → TimeSeriesTooltip}/tooltip-model.js +1 -1
  151. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -0
  152. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -0
  153. package/dist/{Tooltip → TimeSeriesTooltip}/utils.js +1 -1
  154. package/dist/TimeSeriesTooltip/utils.js.map +1 -0
  155. package/dist/UnitSelector/UnitSelector.js +1 -1
  156. package/dist/UnitSelector/UnitSelector.js.map +1 -1
  157. package/dist/UnitSelector/index.js +1 -1
  158. package/dist/UnitSelector/index.js.map +1 -1
  159. package/dist/YAxisLabel.js +1 -1
  160. package/dist/YAxisLabel.js.map +1 -1
  161. package/dist/cjs/ColorPicker/ColorPicker.js +128 -0
  162. package/dist/cjs/{Tooltip → ColorPicker}/index.js +2 -3
  163. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +87 -50
  164. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +3 -2
  165. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +4 -1
  166. package/dist/cjs/DateTimeRangePicker/index.js +1 -1
  167. package/dist/cjs/DateTimeRangePicker/utils.js +1 -1
  168. package/dist/cjs/Dialog/Dialog.js +85 -0
  169. package/dist/cjs/Dialog/index.js +28 -0
  170. package/dist/cjs/Drawer/Drawer.js +1 -1
  171. package/dist/cjs/Drawer/index.js +1 -1
  172. package/dist/cjs/{EChart.js → EChart/EChart.js} +5 -11
  173. package/dist/cjs/EChart/index.js +28 -0
  174. package/dist/cjs/ErrorAlert.js +1 -1
  175. package/dist/cjs/ErrorBoundary.js +1 -1
  176. package/dist/cjs/GaugeChart/GaugeChart.js +3 -2
  177. package/dist/cjs/GaugeChart/index.js +1 -1
  178. package/dist/cjs/InfoTooltip/InfoTooltip.js +5 -18
  179. package/dist/cjs/InfoTooltip/index.js +1 -1
  180. package/dist/cjs/JSONEditor.js +1 -1
  181. package/dist/cjs/Legend/CompactLegend.js +1 -1
  182. package/dist/cjs/Legend/Legend.js +13 -5
  183. package/dist/cjs/Legend/LegendColorBadge.js +1 -1
  184. package/dist/cjs/Legend/ListLegend.js +1 -1
  185. package/dist/cjs/Legend/ListLegendItem.js +1 -1
  186. package/dist/cjs/Legend/index.js +1 -1
  187. package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.js +13 -18
  188. package/dist/cjs/LegendOptionsEditor/index.js +1 -1
  189. package/dist/cjs/LineChart/LineChart.js +43 -4
  190. package/dist/cjs/LineChart/index.js +1 -1
  191. package/dist/cjs/LineChart/utils.js +3 -8
  192. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  193. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +2 -2
  194. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  195. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +23 -6
  196. package/dist/cjs/OptionsEditorLayout/index.js +1 -1
  197. package/dist/cjs/StatChart/StatChart.js +24 -60
  198. package/dist/cjs/StatChart/index.js +1 -1
  199. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +87 -0
  200. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +72 -0
  201. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +265 -0
  202. package/dist/cjs/ThresholdsEditor/index.js +28 -0
  203. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +95 -0
  204. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +105 -0
  205. package/dist/cjs/{Tooltip → TimeSeriesTooltip}/SeriesMarker.js +7 -7
  206. package/dist/cjs/{Tooltip/Tooltip.js → TimeSeriesTooltip/TimeSeriesTooltip.js} +4 -4
  207. package/dist/cjs/{Tooltip → TimeSeriesTooltip}/TooltipContent.js +1 -1
  208. package/dist/cjs/{Tooltip → TimeSeriesTooltip}/focused-series.js +6 -6
  209. package/dist/cjs/TimeSeriesTooltip/index.js +35 -0
  210. package/dist/cjs/{Tooltip → TimeSeriesTooltip}/tooltip-model.js +1 -1
  211. package/dist/cjs/{Tooltip → TimeSeriesTooltip}/utils.js +1 -1
  212. package/dist/cjs/UnitSelector/UnitSelector.js +1 -1
  213. package/dist/cjs/UnitSelector/index.js +1 -1
  214. package/dist/cjs/YAxisLabel.js +1 -1
  215. package/dist/cjs/context/ChartsThemeProvider.js +1 -1
  216. package/dist/cjs/context/TimeZoneProvider.js +1 -1
  217. package/dist/cjs/index.js +5 -1
  218. package/dist/cjs/model/graph.js +4 -15
  219. package/dist/cjs/model/index.js +2 -1
  220. package/dist/cjs/model/legend.js +67 -0
  221. package/dist/cjs/model/theme.js +1 -1
  222. package/dist/cjs/model/units/bytes.js +1 -1
  223. package/dist/cjs/model/units/constants.js +1 -1
  224. package/dist/cjs/model/units/decimal.js +5 -2
  225. package/dist/cjs/model/units/index.js +1 -1
  226. package/dist/cjs/model/units/percent.js +1 -1
  227. package/dist/cjs/model/units/time.js +1 -1
  228. package/dist/cjs/model/units/types.js +1 -1
  229. package/dist/cjs/model/units/units.js +1 -1
  230. package/dist/cjs/test/index.js +1 -1
  231. package/dist/cjs/test/render.js +1 -1
  232. package/dist/cjs/test/setup-tests.js +1 -1
  233. package/dist/cjs/test-utils/index.js +1 -1
  234. package/dist/cjs/test-utils/theme.js +14 -1
  235. package/dist/cjs/theme/index.js +1 -1
  236. package/dist/cjs/theme/palette/background.js +1 -1
  237. package/dist/cjs/theme/palette/colors/blue.js +1 -1
  238. package/dist/cjs/theme/palette/colors/common.js +1 -1
  239. package/dist/cjs/theme/palette/colors/green.js +1 -1
  240. package/dist/cjs/theme/palette/colors/grey.js +1 -1
  241. package/dist/cjs/theme/palette/colors/index.js +1 -1
  242. package/dist/cjs/theme/palette/colors/orange.js +1 -1
  243. package/dist/cjs/theme/palette/colors/purple.js +1 -1
  244. package/dist/cjs/theme/palette/colors/red.js +1 -1
  245. package/dist/cjs/theme/palette/colors/types.js +1 -1
  246. package/dist/cjs/theme/palette/error.js +1 -1
  247. package/dist/cjs/theme/palette/grey.js +1 -1
  248. package/dist/cjs/theme/palette/index.js +1 -1
  249. package/dist/cjs/theme/palette/palette-options.js +1 -1
  250. package/dist/cjs/theme/palette/primary.js +1 -1
  251. package/dist/cjs/theme/palette/secondary.js +1 -1
  252. package/dist/cjs/theme/palette/success.js +1 -1
  253. package/dist/cjs/theme/palette/text.js +1 -1
  254. package/dist/cjs/theme/palette/warning.js +1 -1
  255. package/dist/cjs/theme/theme.js +17 -1
  256. package/dist/cjs/theme/types/ThemeExtension.d.js +1 -1
  257. package/dist/cjs/theme/typography.js +5 -1
  258. package/dist/cjs/utils/combine-sx.js +1 -1
  259. package/dist/cjs/utils/component-ids.js +1 -1
  260. package/dist/cjs/utils/format.js +1 -1
  261. package/dist/cjs/utils/index.js +1 -1
  262. package/dist/cjs/utils/mathjs.js +1 -1
  263. package/dist/cjs/utils/theme-gen.js +16 -8
  264. package/dist/context/ChartsThemeProvider.js +1 -1
  265. package/dist/context/ChartsThemeProvider.js.map +1 -1
  266. package/dist/context/TimeZoneProvider.js +1 -1
  267. package/dist/context/TimeZoneProvider.js.map +1 -1
  268. package/dist/index.d.ts +4 -0
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +5 -1
  271. package/dist/index.js.map +1 -1
  272. package/dist/model/graph.d.ts +3 -18
  273. package/dist/model/graph.d.ts.map +1 -1
  274. package/dist/model/graph.js +1 -5
  275. package/dist/model/graph.js.map +1 -1
  276. package/dist/model/index.d.ts +1 -0
  277. package/dist/model/index.d.ts.map +1 -1
  278. package/dist/model/index.js +2 -1
  279. package/dist/model/index.js.map +1 -1
  280. package/dist/model/legend.d.ts +22 -0
  281. package/dist/model/legend.d.ts.map +1 -0
  282. package/dist/model/legend.js +51 -0
  283. package/dist/model/legend.js.map +1 -0
  284. package/dist/model/theme.d.ts +16 -0
  285. package/dist/model/theme.d.ts.map +1 -1
  286. package/dist/model/theme.js +1 -1
  287. package/dist/model/theme.js.map +1 -1
  288. package/dist/model/units/bytes.d.ts +1 -1
  289. package/dist/model/units/bytes.d.ts.map +1 -1
  290. package/dist/model/units/bytes.js +1 -1
  291. package/dist/model/units/bytes.js.map +1 -1
  292. package/dist/model/units/constants.js +1 -1
  293. package/dist/model/units/constants.js.map +1 -1
  294. package/dist/model/units/decimal.d.ts +1 -1
  295. package/dist/model/units/decimal.d.ts.map +1 -1
  296. package/dist/model/units/decimal.js +5 -2
  297. package/dist/model/units/decimal.js.map +1 -1
  298. package/dist/model/units/index.js +1 -1
  299. package/dist/model/units/index.js.map +1 -1
  300. package/dist/model/units/percent.d.ts +1 -1
  301. package/dist/model/units/percent.d.ts.map +1 -1
  302. package/dist/model/units/percent.js +1 -1
  303. package/dist/model/units/percent.js.map +1 -1
  304. package/dist/model/units/time.d.ts +1 -1
  305. package/dist/model/units/time.d.ts.map +1 -1
  306. package/dist/model/units/time.js +1 -1
  307. package/dist/model/units/time.js.map +1 -1
  308. package/dist/model/units/types.d.ts +1 -1
  309. package/dist/model/units/types.d.ts.map +1 -1
  310. package/dist/model/units/types.js +1 -1
  311. package/dist/model/units/types.js.map +1 -1
  312. package/dist/model/units/units.js +1 -1
  313. package/dist/model/units/units.js.map +1 -1
  314. package/dist/test/index.js +1 -1
  315. package/dist/test/index.js.map +1 -1
  316. package/dist/test/render.js +1 -1
  317. package/dist/test/render.js.map +1 -1
  318. package/dist/test/setup-tests.js +1 -1
  319. package/dist/test/setup-tests.js.map +1 -1
  320. package/dist/test-utils/index.js +1 -1
  321. package/dist/test-utils/index.js.map +1 -1
  322. package/dist/test-utils/theme.d.ts.map +1 -1
  323. package/dist/test-utils/theme.js +14 -1
  324. package/dist/test-utils/theme.js.map +1 -1
  325. package/dist/theme/index.js +1 -1
  326. package/dist/theme/index.js.map +1 -1
  327. package/dist/theme/palette/background.js +1 -1
  328. package/dist/theme/palette/background.js.map +1 -1
  329. package/dist/theme/palette/colors/blue.js +1 -1
  330. package/dist/theme/palette/colors/blue.js.map +1 -1
  331. package/dist/theme/palette/colors/common.js +1 -1
  332. package/dist/theme/palette/colors/common.js.map +1 -1
  333. package/dist/theme/palette/colors/green.js +1 -1
  334. package/dist/theme/palette/colors/green.js.map +1 -1
  335. package/dist/theme/palette/colors/grey.js +1 -1
  336. package/dist/theme/palette/colors/grey.js.map +1 -1
  337. package/dist/theme/palette/colors/index.js +1 -1
  338. package/dist/theme/palette/colors/index.js.map +1 -1
  339. package/dist/theme/palette/colors/orange.js +1 -1
  340. package/dist/theme/palette/colors/orange.js.map +1 -1
  341. package/dist/theme/palette/colors/purple.js +1 -1
  342. package/dist/theme/palette/colors/purple.js.map +1 -1
  343. package/dist/theme/palette/colors/red.js +1 -1
  344. package/dist/theme/palette/colors/red.js.map +1 -1
  345. package/dist/theme/palette/colors/types.js +1 -1
  346. package/dist/theme/palette/colors/types.js.map +1 -1
  347. package/dist/theme/palette/error.js +1 -1
  348. package/dist/theme/palette/error.js.map +1 -1
  349. package/dist/theme/palette/grey.js +1 -1
  350. package/dist/theme/palette/grey.js.map +1 -1
  351. package/dist/theme/palette/index.js +1 -1
  352. package/dist/theme/palette/index.js.map +1 -1
  353. package/dist/theme/palette/palette-options.js +1 -1
  354. package/dist/theme/palette/palette-options.js.map +1 -1
  355. package/dist/theme/palette/primary.js +1 -1
  356. package/dist/theme/palette/primary.js.map +1 -1
  357. package/dist/theme/palette/secondary.js +1 -1
  358. package/dist/theme/palette/secondary.js.map +1 -1
  359. package/dist/theme/palette/success.js +1 -1
  360. package/dist/theme/palette/success.js.map +1 -1
  361. package/dist/theme/palette/text.js +1 -1
  362. package/dist/theme/palette/text.js.map +1 -1
  363. package/dist/theme/palette/warning.js +1 -1
  364. package/dist/theme/palette/warning.js.map +1 -1
  365. package/dist/theme/theme.d.ts.map +1 -1
  366. package/dist/theme/theme.js +18 -2
  367. package/dist/theme/theme.js.map +1 -1
  368. package/dist/theme/types/ThemeExtension.d.js +1 -1
  369. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  370. package/dist/theme/typography.d.ts +4 -0
  371. package/dist/theme/typography.d.ts.map +1 -1
  372. package/dist/theme/typography.js +5 -1
  373. package/dist/theme/typography.js.map +1 -1
  374. package/dist/utils/combine-sx.js +1 -1
  375. package/dist/utils/combine-sx.js.map +1 -1
  376. package/dist/utils/component-ids.js +1 -1
  377. package/dist/utils/component-ids.js.map +1 -1
  378. package/dist/utils/format.js +1 -1
  379. package/dist/utils/format.js.map +1 -1
  380. package/dist/utils/index.js +1 -1
  381. package/dist/utils/index.js.map +1 -1
  382. package/dist/utils/mathjs.js +1 -1
  383. package/dist/utils/mathjs.js.map +1 -1
  384. package/dist/utils/theme-gen.d.ts.map +1 -1
  385. package/dist/utils/theme-gen.js +15 -2
  386. package/dist/utils/theme-gen.js.map +1 -1
  387. package/package.json +10 -4
  388. package/dist/EChart.d.ts.map +0 -1
  389. package/dist/EChart.js.map +0 -1
  390. package/dist/InfoTooltip/InfoTooltip.test.d.ts +0 -2
  391. package/dist/InfoTooltip/InfoTooltip.test.d.ts.map +0 -1
  392. package/dist/InfoTooltip/InfoTooltip.test.js +0 -36
  393. package/dist/InfoTooltip/InfoTooltip.test.js.map +0 -1
  394. package/dist/LegendOptionsEditor/LegendOptionsEditor.test.d.ts +0 -2
  395. package/dist/LegendOptionsEditor/LegendOptionsEditor.test.d.ts.map +0 -1
  396. package/dist/LegendOptionsEditor/LegendOptionsEditor.test.js +0 -41
  397. package/dist/LegendOptionsEditor/LegendOptionsEditor.test.js.map +0 -1
  398. package/dist/StatChart/StatChart.test.d.ts +0 -2
  399. package/dist/StatChart/StatChart.test.d.ts.map +0 -1
  400. package/dist/StatChart/StatChart.test.js +0 -94
  401. package/dist/StatChart/StatChart.test.js.map +0 -1
  402. package/dist/Tooltip/SeriesInfo.d.ts.map +0 -1
  403. package/dist/Tooltip/SeriesInfo.js +0 -143
  404. package/dist/Tooltip/SeriesInfo.js.map +0 -1
  405. package/dist/Tooltip/SeriesMarker.d.ts.map +0 -1
  406. package/dist/Tooltip/SeriesMarker.js.map +0 -1
  407. package/dist/Tooltip/Tooltip.d.ts.map +0 -1
  408. package/dist/Tooltip/Tooltip.js.map +0 -1
  409. package/dist/Tooltip/TooltipContent.d.ts.map +0 -1
  410. package/dist/Tooltip/TooltipContent.js.map +0 -1
  411. package/dist/Tooltip/focused-series.d.ts.map +0 -1
  412. package/dist/Tooltip/focused-series.js.map +0 -1
  413. package/dist/Tooltip/focused-series.test.d.ts +0 -2
  414. package/dist/Tooltip/focused-series.test.d.ts.map +0 -1
  415. package/dist/Tooltip/focused-series.test.js +0 -93
  416. package/dist/Tooltip/focused-series.test.js.map +0 -1
  417. package/dist/Tooltip/index.d.ts +0 -3
  418. package/dist/Tooltip/index.d.ts.map +0 -1
  419. package/dist/Tooltip/tooltip-model.d.ts.map +0 -1
  420. package/dist/Tooltip/tooltip-model.js.map +0 -1
  421. package/dist/Tooltip/utils.d.ts.map +0 -1
  422. package/dist/Tooltip/utils.js.map +0 -1
  423. package/dist/UnitSelector/UnitSelector.test.d.ts +0 -2
  424. package/dist/UnitSelector/UnitSelector.test.d.ts.map +0 -1
  425. package/dist/UnitSelector/UnitSelector.test.js +0 -204
  426. package/dist/UnitSelector/UnitSelector.test.js.map +0 -1
  427. package/dist/cjs/InfoTooltip/InfoTooltip.test.js +0 -43
  428. package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.test.js +0 -48
  429. package/dist/cjs/StatChart/StatChart.test.js +0 -96
  430. package/dist/cjs/Tooltip/SeriesInfo.js +0 -149
  431. package/dist/cjs/Tooltip/focused-series.test.js +0 -95
  432. package/dist/cjs/UnitSelector/UnitSelector.test.js +0 -211
  433. package/dist/cjs/model/units/units.test.js +0 -153
  434. package/dist/cjs/utils/format.test.js +0 -47
  435. package/dist/cjs/utils/theme-gen.test.js +0 -197
  436. package/dist/model/units/units.test.d.ts +0 -2
  437. package/dist/model/units/units.test.d.ts.map +0 -1
  438. package/dist/model/units/units.test.js +0 -151
  439. package/dist/model/units/units.test.js.map +0 -1
  440. package/dist/utils/format.test.d.ts +0 -2
  441. package/dist/utils/format.test.d.ts.map +0 -1
  442. package/dist/utils/format.test.js +0 -45
  443. package/dist/utils/format.test.js.map +0 -1
  444. package/dist/utils/theme-gen.test.d.ts +0 -2
  445. package/dist/utils/theme-gen.test.d.ts.map +0 -1
  446. package/dist/utils/theme-gen.test.js +0 -195
  447. package/dist/utils/theme-gen.test.js.map +0 -1
  448. /package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.d.ts +0 -0
  449. /package/dist/{Tooltip → TimeSeriesTooltip}/tooltip-model.d.ts +0 -0
  450. /package/dist/{Tooltip → TimeSeriesTooltip}/utils.d.ts +0 -0
@@ -1,151 +0,0 @@
1
- // Copyright 2022 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- import { formatValue } from './units';
14
- describe('formatValue()', ()=>{
15
- const tests = [
16
- {
17
- value: 100000,
18
- unit: {
19
- kind: 'Decimal'
20
- },
21
- expected: '100,000.00'
22
- },
23
- {
24
- value: 155900,
25
- unit: {
26
- kind: 'Decimal',
27
- decimal_places: 4
28
- },
29
- expected: '155,900.0000'
30
- },
31
- {
32
- value: 10,
33
- unit: {
34
- kind: 'Percent'
35
- },
36
- expected: '10.00%'
37
- },
38
- {
39
- value: 50,
40
- unit: {
41
- kind: 'Percent',
42
- decimal_places: 0
43
- },
44
- expected: '50%'
45
- },
46
- {
47
- value: 0.1,
48
- unit: {
49
- kind: 'PercentDecimal'
50
- },
51
- expected: '10.00%'
52
- },
53
- {
54
- value: 100,
55
- unit: {
56
- kind: 'Bytes',
57
- decimal_places: 0,
58
- abbreviate: false
59
- },
60
- expected: '100 bytes'
61
- },
62
- {
63
- value: 100,
64
- unit: {
65
- kind: 'Bytes',
66
- decimal_places: -1,
67
- abbreviate: false
68
- },
69
- expected: '100 bytes'
70
- },
71
- {
72
- value: 225000,
73
- unit: {
74
- kind: 'Bytes',
75
- decimal_places: 0,
76
- abbreviate: true
77
- },
78
- expected: '220 KB'
79
- },
80
- {
81
- value: 505200,
82
- unit: {
83
- kind: 'Bytes'
84
- },
85
- expected: '505,200.00 bytes'
86
- },
87
- {
88
- value: 8000,
89
- unit: {
90
- kind: 'Milliseconds'
91
- },
92
- expected: '8,000.00 milliseconds'
93
- },
94
- {
95
- value: 200900,
96
- unit: {
97
- kind: 'Seconds'
98
- },
99
- expected: '200,900.00 seconds'
100
- },
101
- {
102
- value: 300,
103
- unit: {
104
- kind: 'Minutes'
105
- },
106
- expected: '300.00 minutes'
107
- },
108
- {
109
- value: 300,
110
- unit: {
111
- kind: 'Hours'
112
- },
113
- expected: '300.00 hours'
114
- },
115
- {
116
- value: 300,
117
- unit: {
118
- kind: 'Days'
119
- },
120
- expected: '300.00 days'
121
- },
122
- {
123
- value: 300,
124
- unit: {
125
- kind: 'Weeks'
126
- },
127
- expected: '300.00 weeks'
128
- },
129
- {
130
- value: 300,
131
- unit: {
132
- kind: 'Months'
133
- },
134
- expected: '300.00 months'
135
- },
136
- {
137
- value: 300,
138
- unit: {
139
- kind: 'Years'
140
- },
141
- expected: '300.00 years'
142
- }
143
- ];
144
- tests.forEach(({ value , unit , expected })=>{
145
- it(`formats ${value} as ${JSON.stringify(unit)}`, ()=>{
146
- expect(formatValue(value, unit)).toEqual(expected);
147
- });
148
- });
149
- });
150
-
151
- //# sourceMappingURL=units.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/model/units/units.test.ts"],"sourcesContent":["// Copyright 2022 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatValue, UnitOptions } from './units';\n\ndescribe('formatValue()', () => {\n const tests = [\n {\n value: 100000,\n unit: { kind: 'Decimal' },\n expected: '100,000.00',\n },\n {\n value: 155900,\n unit: { kind: 'Decimal', decimal_places: 4 },\n expected: '155,900.0000',\n },\n {\n value: 10,\n unit: { kind: 'Percent' },\n expected: '10.00%',\n },\n {\n value: 50,\n unit: { kind: 'Percent', decimal_places: 0 },\n expected: '50%',\n },\n {\n value: 0.1,\n unit: { kind: 'PercentDecimal' },\n expected: '10.00%',\n },\n {\n value: 100,\n unit: { kind: 'Bytes', decimal_places: 0, abbreviate: false },\n expected: '100 bytes',\n },\n {\n value: 100,\n unit: { kind: 'Bytes', decimal_places: -1, abbreviate: false },\n expected: '100 bytes',\n },\n {\n value: 225000,\n unit: { kind: 'Bytes', decimal_places: 0, abbreviate: true },\n expected: '220 KB',\n },\n {\n value: 505200,\n unit: { kind: 'Bytes' },\n expected: '505,200.00 bytes',\n },\n {\n value: 8000,\n unit: { kind: 'Milliseconds' },\n expected: '8,000.00 milliseconds',\n },\n {\n value: 200900,\n unit: { kind: 'Seconds' },\n expected: '200,900.00 seconds',\n },\n {\n value: 300,\n unit: { kind: 'Minutes' },\n expected: '300.00 minutes',\n },\n {\n value: 300,\n unit: { kind: 'Hours' },\n expected: '300.00 hours',\n },\n {\n value: 300,\n unit: { kind: 'Days' },\n expected: '300.00 days',\n },\n {\n value: 300,\n unit: { kind: 'Weeks' },\n expected: '300.00 weeks',\n },\n {\n value: 300,\n unit: { kind: 'Months' },\n expected: '300.00 months',\n },\n {\n value: 300,\n unit: { kind: 'Years' },\n expected: '300.00 years',\n },\n ];\n\n tests.forEach(({ value, unit, expected }) => {\n it(`formats ${value} as ${JSON.stringify(unit)}`, () => {\n expect(formatValue(value, unit as UnitOptions)).toEqual(expected);\n });\n });\n});\n"],"names":["formatValue","describe","tests","value","unit","kind","expected","decimal_places","abbreviate","forEach","it","JSON","stringify","expect","toEqual"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;A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CI,EAAE,CAAC,CAAC,QAAQ,EAAEP,KAAK,CAAC,IAAI,EAAEQ,IAAI,CAACC,SAAS,CAACR,IAAI,CAAC,CAAC,CAAC,EAAE,IAAM;YACtDS,MAAM,CAACb,WAAW,CAACG,KAAK,EAAEC,IAAI,CAAgB,CAAC,CAACU,OAAO,CAACR,QAAQ,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=format.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.test.d.ts","sourceRoot":"","sources":["../../src/utils/format.test.ts"],"names":[],"mappings":""}
@@ -1,45 +0,0 @@
1
- // Copyright 2022 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- import { dateFormatOptionsWithTimeZone, formatWithTimeZone } from './format';
14
- const DATE = new Date(168523200000);
15
- const DATE_FORMAT_OPTIONS = {
16
- hour: 'numeric',
17
- minute: 'numeric',
18
- hourCycle: 'h23'
19
- };
20
- describe('formatWithTimeZone', ()=>{
21
- it('should format in Los Angeles timezone', ()=>{
22
- expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'America/Los_Angeles')).toBe('1975-05-05 05:00:00');
23
- });
24
- it('should format in UTC timezone', ()=>{
25
- expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'UTC')).toBe('1975-05-05 12:00:00');
26
- expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'utc')).toBe('1975-05-05 12:00:00');
27
- });
28
- });
29
- describe('dateFormatOptionsWithTimeZone', ()=>{
30
- it('should format in Los Angeles timezone', ()=>{
31
- const dateFormatOptions = dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'America/Los_Angeles');
32
- expect(new Intl.DateTimeFormat(undefined, dateFormatOptions).format(DATE)).toBe('05:00');
33
- });
34
- it('should format in UTC timezone', ()=>{
35
- const dateFormatOptions = dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'utc');
36
- expect(new Intl.DateTimeFormat(undefined, dateFormatOptions).format(DATE)).toBe('12:00');
37
- });
38
- it('should use browser local timezone', ()=>{
39
- expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'browser').timeZone).toBeUndefined();
40
- expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'local').timeZone).toBeUndefined();
41
- expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS).timeZone).toBeUndefined();
42
- });
43
- });
44
-
45
- //# sourceMappingURL=format.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/format.test.ts"],"sourcesContent":["// Copyright 2022 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { dateFormatOptionsWithTimeZone, formatWithTimeZone } from './format';\n\nconst DATE = new Date(168523200000);\n\nconst DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: 'numeric',\n hourCycle: 'h23',\n};\n\ndescribe('formatWithTimeZone', () => {\n it('should format in Los Angeles timezone', () => {\n expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'America/Los_Angeles')).toBe('1975-05-05 05:00:00');\n });\n it('should format in UTC timezone', () => {\n expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'UTC')).toBe('1975-05-05 12:00:00');\n expect(formatWithTimeZone(DATE, 'yyyy-MM-dd HH:mm:ss', 'utc')).toBe('1975-05-05 12:00:00');\n });\n});\n\ndescribe('dateFormatOptionsWithTimeZone', () => {\n it('should format in Los Angeles timezone', () => {\n const dateFormatOptions = dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'America/Los_Angeles');\n expect(new Intl.DateTimeFormat(undefined, dateFormatOptions).format(DATE)).toBe('05:00');\n });\n it('should format in UTC timezone', () => {\n const dateFormatOptions = dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'utc');\n expect(new Intl.DateTimeFormat(undefined, dateFormatOptions).format(DATE)).toBe('12:00');\n });\n it('should use browser local timezone', () => {\n expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'browser').timeZone).toBeUndefined();\n expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS, 'local').timeZone).toBeUndefined();\n expect(dateFormatOptionsWithTimeZone(DATE_FORMAT_OPTIONS).timeZone).toBeUndefined();\n });\n});\n"],"names":["dateFormatOptionsWithTimeZone","formatWithTimeZone","DATE","Date","DATE_FORMAT_OPTIONS","hour","minute","hourCycle","describe","it","expect","toBe","dateFormatOptions","Intl","DateTimeFormat","undefined","format","timeZone","toBeUndefined"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,SAASA,6BAA6B,EAAEC,kBAAkB,QAAQ,UAAU,CAAC;AAE7E,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAAC,YAAY,CAAC,AAAC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AACS,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3F,CAAC,CAAC,CAAC;IACHF,EAAE,CAAC,mCAAmC,EAAE,IAAM;QAC5CC,MAAM,CAACV,6BAA6B,CAACI,mBAAmB,EAAE,SAAS,CAAC,CAACa,QAAQ,CAAC,CAACC,aAAa,EAAE,CAAC;QAC/FR,MAAM,CAACV,6BAA6B,CAACI,mBAAmB,EAAE,OAAO,CAAC,CAACa,QAAQ,CAAC,CAACC,aAAa,EAAE,CAAC;QAC7FR,MAAM,CAACV,6BAA6B,CAACI,mBAAmB,CAAC,CAACa,QAAQ,CAAC,CAACC,aAAa,EAAE,CAAC;IACtF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=theme-gen.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-gen.test.d.ts","sourceRoot":"","sources":["../../src/utils/theme-gen.test.ts"],"names":[],"mappings":""}
@@ -1,195 +0,0 @@
1
- // Copyright 2022 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- import { createTheme } from '@mui/material';
14
- import { generateChartsTheme } from './theme-gen';
15
- describe('generateChartsTheme', ()=>{
16
- const muiTheme = createTheme({});
17
- const echartsThemeOverrides = {
18
- legend: {
19
- textStyle: {
20
- color: 'yellow'
21
- }
22
- },
23
- line: {
24
- showSymbol: true,
25
- smooth: true
26
- }
27
- };
28
- const chartsTheme = generateChartsTheme(muiTheme, echartsThemeOverrides);
29
- it('should return perses specific charts theme from converted MUI theme', ()=>{
30
- expect(chartsTheme).toMatchInlineSnapshot(`
31
- Object {
32
- "echartsTheme": Object {
33
- "bar": Object {
34
- "barMaxWidth": 150,
35
- "itemStyle": Object {
36
- "borderColor": "#e0e0e0",
37
- "borderWidth": 0,
38
- },
39
- },
40
- "categoryAxis": Object {
41
- "axisLabel": Object {
42
- "color": "rgba(0, 0, 0, 0.87)",
43
- "margin": 15,
44
- "show": true,
45
- },
46
- "axisLine": Object {
47
- "lineStyle": Object {
48
- "color": "#757575",
49
- },
50
- "show": true,
51
- },
52
- "axisTick": Object {
53
- "length": 6,
54
- "lineStyle": Object {
55
- "color": "#757575",
56
- },
57
- "show": false,
58
- },
59
- "show": true,
60
- "splitArea": Object {
61
- "areaStyle": Object {
62
- "color": Array [
63
- "#e0e0e0",
64
- ],
65
- },
66
- "show": false,
67
- },
68
- "splitLine": Object {
69
- "lineStyle": Object {
70
- "color": "#e0e0e0",
71
- "opacity": 0.6,
72
- "width": 0.5,
73
- },
74
- "show": true,
75
- },
76
- },
77
- "color": Array [
78
- "#8dd3c7",
79
- "#bebada",
80
- "#fb8072",
81
- "#80b1d3",
82
- "#fdb462",
83
- ],
84
- "gauge": Object {
85
- "detail": Object {
86
- "fontSize": 18,
87
- "fontWeight": 600,
88
- "valueAnimation": false,
89
- },
90
- "splitLine": Object {
91
- "distance": 0,
92
- "length": 4,
93
- "lineStyle": Object {
94
- "width": 1,
95
- },
96
- },
97
- "splitNumber": 12,
98
- },
99
- "grid": Object {
100
- "bottom": 0,
101
- "containLabel": true,
102
- "left": 20,
103
- "right": 20,
104
- "top": 5,
105
- },
106
- "legend": Object {
107
- "orient": "horizontal",
108
- "pageIconColor": "rgba(0, 0, 0, 0.54)",
109
- "pageIconInactiveColor": "rgba(0, 0, 0, 0.26)",
110
- "pageTextStyle": Object {
111
- "color": "#757575",
112
- },
113
- "textStyle": Object {
114
- "color": "yellow",
115
- },
116
- },
117
- "line": Object {
118
- "emphasis": Object {
119
- "lineStyle": Object {
120
- "width": 1.5,
121
- },
122
- },
123
- "lineStyle": Object {
124
- "width": 1,
125
- },
126
- "showSymbol": true,
127
- "smooth": true,
128
- "symbol": "circle",
129
- "symbolSize": 4,
130
- },
131
- "textStyle": Object {
132
- "color": "rgba(0, 0, 0, 0.87)",
133
- "fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
134
- "fontSize": 12,
135
- },
136
- "title": Object {
137
- "show": false,
138
- },
139
- "toolbox": Object {
140
- "iconStyle": Object {
141
- "borderColor": "rgba(0, 0, 0, 0.87)",
142
- },
143
- "right": 10,
144
- "show": true,
145
- "top": 10,
146
- },
147
- "tooltip": Object {},
148
- "valueAxis": Object {
149
- "axisLabel": Object {
150
- "color": "rgba(0, 0, 0, 0.87)",
151
- "margin": 12,
152
- },
153
- "axisLine": Object {
154
- "show": false,
155
- },
156
- "show": true,
157
- "splitLine": Object {
158
- "lineStyle": Object {
159
- "color": "#e0e0e0",
160
- "opacity": 0.6,
161
- "width": 0.5,
162
- },
163
- "show": true,
164
- },
165
- },
166
- },
167
- "noDataOption": Object {
168
- "title": Object {
169
- "left": "center",
170
- "show": true,
171
- "text": "No data",
172
- "textStyle": Object {
173
- "color": "rgba(0, 0, 0, 0.87)",
174
- "fontSize": 16,
175
- "fontWeight": 400,
176
- },
177
- "top": "center",
178
- },
179
- "xAxis": Object {
180
- "show": false,
181
- },
182
- "yAxis": Object {
183
- "show": false,
184
- },
185
- },
186
- "sparkline": Object {
187
- "color": "#1976d2",
188
- "width": 2,
189
- },
190
- }
191
- `);
192
- });
193
- });
194
-
195
- //# sourceMappingURL=theme-gen.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/theme-gen.test.ts"],"sourcesContent":["// Copyright 2022 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme } from '@mui/material';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\nimport { generateChartsTheme } from './theme-gen';\n\ndescribe('generateChartsTheme', () => {\n const muiTheme = createTheme({});\n const echartsThemeOverrides: EChartsTheme = {\n legend: {\n textStyle: {\n color: 'yellow',\n },\n },\n line: {\n showSymbol: true,\n smooth: true,\n },\n };\n const chartsTheme: PersesChartsTheme = generateChartsTheme(muiTheme, echartsThemeOverrides);\n\n it('should return perses specific charts theme from converted MUI theme', () => {\n expect(chartsTheme).toMatchInlineSnapshot(`\n Object {\n \"echartsTheme\": Object {\n \"bar\": Object {\n \"barMaxWidth\": 150,\n \"itemStyle\": Object {\n \"borderColor\": \"#e0e0e0\",\n \"borderWidth\": 0,\n },\n },\n \"categoryAxis\": Object {\n \"axisLabel\": Object {\n \"color\": \"rgba(0, 0, 0, 0.87)\",\n \"margin\": 15,\n \"show\": true,\n },\n \"axisLine\": Object {\n \"lineStyle\": Object {\n \"color\": \"#757575\",\n },\n \"show\": true,\n },\n \"axisTick\": Object {\n \"length\": 6,\n \"lineStyle\": Object {\n \"color\": \"#757575\",\n },\n \"show\": false,\n },\n \"show\": true,\n \"splitArea\": Object {\n \"areaStyle\": Object {\n \"color\": Array [\n \"#e0e0e0\",\n ],\n },\n \"show\": false,\n },\n \"splitLine\": Object {\n \"lineStyle\": Object {\n \"color\": \"#e0e0e0\",\n \"opacity\": 0.6,\n \"width\": 0.5,\n },\n \"show\": true,\n },\n },\n \"color\": Array [\n \"#8dd3c7\",\n \"#bebada\",\n \"#fb8072\",\n \"#80b1d3\",\n \"#fdb462\",\n ],\n \"gauge\": Object {\n \"detail\": Object {\n \"fontSize\": 18,\n \"fontWeight\": 600,\n \"valueAnimation\": false,\n },\n \"splitLine\": Object {\n \"distance\": 0,\n \"length\": 4,\n \"lineStyle\": Object {\n \"width\": 1,\n },\n },\n \"splitNumber\": 12,\n },\n \"grid\": Object {\n \"bottom\": 0,\n \"containLabel\": true,\n \"left\": 20,\n \"right\": 20,\n \"top\": 5,\n },\n \"legend\": Object {\n \"orient\": \"horizontal\",\n \"pageIconColor\": \"rgba(0, 0, 0, 0.54)\",\n \"pageIconInactiveColor\": \"rgba(0, 0, 0, 0.26)\",\n \"pageTextStyle\": Object {\n \"color\": \"#757575\",\n },\n \"textStyle\": Object {\n \"color\": \"yellow\",\n },\n },\n \"line\": Object {\n \"emphasis\": Object {\n \"lineStyle\": Object {\n \"width\": 1.5,\n },\n },\n \"lineStyle\": Object {\n \"width\": 1,\n },\n \"showSymbol\": true,\n \"smooth\": true,\n \"symbol\": \"circle\",\n \"symbolSize\": 4,\n },\n \"textStyle\": Object {\n \"color\": \"rgba(0, 0, 0, 0.87)\",\n \"fontFamily\": \"\\\\\"Roboto\\\\\", \\\\\"Helvetica\\\\\", \\\\\"Arial\\\\\", sans-serif\",\n \"fontSize\": 12,\n },\n \"title\": Object {\n \"show\": false,\n },\n \"toolbox\": Object {\n \"iconStyle\": Object {\n \"borderColor\": \"rgba(0, 0, 0, 0.87)\",\n },\n \"right\": 10,\n \"show\": true,\n \"top\": 10,\n },\n \"tooltip\": Object {},\n \"valueAxis\": Object {\n \"axisLabel\": Object {\n \"color\": \"rgba(0, 0, 0, 0.87)\",\n \"margin\": 12,\n },\n \"axisLine\": Object {\n \"show\": false,\n },\n \"show\": true,\n \"splitLine\": Object {\n \"lineStyle\": Object {\n \"color\": \"#e0e0e0\",\n \"opacity\": 0.6,\n \"width\": 0.5,\n },\n \"show\": true,\n },\n },\n },\n \"noDataOption\": Object {\n \"title\": Object {\n \"left\": \"center\",\n \"show\": true,\n \"text\": \"No data\",\n \"textStyle\": Object {\n \"color\": \"rgba(0, 0, 0, 0.87)\",\n \"fontSize\": 16,\n \"fontWeight\": 400,\n },\n \"top\": \"center\",\n },\n \"xAxis\": Object {\n \"show\": false,\n },\n \"yAxis\": Object {\n \"show\": false,\n },\n },\n \"sparkline\": Object {\n \"color\": \"#1976d2\",\n \"width\": 2,\n },\n }\n `);\n });\n});\n"],"names":["createTheme","generateChartsTheme","describe","muiTheme","echartsThemeOverrides","legend","textStyle","color","line","showSymbol","smooth","chartsTheme","it","expect","toMatchInlineSnapshot"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,WAAW,QAAQ,eAAe,CAAC;AAE5C,SAASC,mBAAmB,QAAQ,aAAa,CAAC;AAElDC,QAAQ,CAAC,qBAAqB,EAAE,IAAM;IACpC,MAAMC,QAAQ,GAAGH,WAAW,CAAC,EAAE,CAAC,AAAC;IACjC,MAAMI,qBAAqB,GAAiB;QAC1CC,MAAM,EAAE;YACNC,SAAS,EAAE;gBACTC,KAAK,EAAE,QAAQ;aAChB;SACF;QACDC,IAAI,EAAE;YACJC,UAAU,EAAE,IAAI;YAChBC,MAAM,EAAE,IAAI;SACb;KACF,AAAC;IACF,MAAMC,WAAW,GAAsBV,mBAAmB,CAACE,QAAQ,EAAEC,qBAAqB,CAAC,AAAC;IAE5FQ,EAAE,CAAC,qEAAqE,EAAE,IAAM;QAC9EC,MAAM,CAACF,WAAW,CAAC,CAACG,qBAAqB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiK3C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
File without changes