@oanda/labs-widget-common 1.0.252 → 1.0.253

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 (334) hide show
  1. package/CHANGELOG.md +1241 -62993
  2. package/dist/main/components/style.css +1 -1
  3. package/dist/module/chart/BaseChart.js +15 -7
  4. package/dist/module/chart/BaseChart.js.map +1 -1
  5. package/dist/module/chart/formatters.js +12 -3
  6. package/dist/module/chart/formatters.js.map +1 -1
  7. package/dist/module/chart/getGridLines.js +16 -9
  8. package/dist/module/chart/getGridLines.js.map +1 -1
  9. package/dist/module/chart/getTheme.js +38 -31
  10. package/dist/module/chart/getTheme.js.map +1 -1
  11. package/dist/module/chart/getZoomControls.js +12 -5
  12. package/dist/module/chart/getZoomControls.js.map +1 -1
  13. package/dist/module/chart/index.js +82 -7
  14. package/dist/module/chart/index.js.map +1 -1
  15. package/dist/module/chart/sharedOptions.js +11 -4
  16. package/dist/module/chart/sharedOptions.js.map +1 -1
  17. package/dist/module/chart/types.js +5 -1
  18. package/dist/module/components/Button/Button.js +18 -11
  19. package/dist/module/components/Button/Button.js.map +1 -1
  20. package/dist/module/components/Button/index.js +27 -2
  21. package/dist/module/components/Button/index.js.map +1 -1
  22. package/dist/module/components/Button/types.js +8 -2
  23. package/dist/module/components/Button/types.js.map +1 -1
  24. package/dist/module/components/Card/Card.js +24 -16
  25. package/dist/module/components/Card/Card.js.map +1 -1
  26. package/dist/module/components/Card/CardHeader.js +21 -14
  27. package/dist/module/components/Card/CardHeader.js.map +1 -1
  28. package/dist/module/components/Card/index.js +38 -3
  29. package/dist/module/components/Card/index.js.map +1 -1
  30. package/dist/module/components/Card/rows/DailyChangeCardRow.js +15 -7
  31. package/dist/module/components/Card/rows/DailyChangeCardRow.js.map +1 -1
  32. package/dist/module/components/Card/rows/LineChartCardRow.js +17 -10
  33. package/dist/module/components/Card/rows/LineChartCardRow.js.map +1 -1
  34. package/dist/module/components/Card/rows/PriceCardRow.js +16 -8
  35. package/dist/module/components/Card/rows/PriceCardRow.js.map +1 -1
  36. package/dist/module/components/Card/rows/SentimentCardRow.js +18 -10
  37. package/dist/module/components/Card/rows/SentimentCardRow.js.map +1 -1
  38. package/dist/module/components/Card/rows/SpreadCardRow.js +15 -7
  39. package/dist/module/components/Card/rows/SpreadCardRow.js.map +1 -1
  40. package/dist/module/components/Card/rows/index.js +60 -5
  41. package/dist/module/components/Card/rows/index.js.map +1 -1
  42. package/dist/module/components/Card/types.js +5 -1
  43. package/dist/module/components/Disclaimer/Disclaimer.js +32 -24
  44. package/dist/module/components/Disclaimer/Disclaimer.js.map +1 -1
  45. package/dist/module/components/Disclaimer/index.js +16 -1
  46. package/dist/module/components/Disclaimer/index.js.map +1 -1
  47. package/dist/module/components/Error/Error.js +27 -18
  48. package/dist/module/components/Error/Error.js.map +1 -1
  49. package/dist/module/components/Error/index.js +16 -1
  50. package/dist/module/components/Error/index.js.map +1 -1
  51. package/dist/module/components/InfoBox/InfoBox.js +10 -3
  52. package/dist/module/components/InfoBox/InfoBox.js.map +1 -1
  53. package/dist/module/components/InfoBox/index.js +27 -2
  54. package/dist/module/components/InfoBox/index.js.map +1 -1
  55. package/dist/module/components/InfoBox/types.js +5 -1
  56. package/dist/module/components/Input/NumberInput.js +21 -13
  57. package/dist/module/components/Input/NumberInput.js.map +1 -1
  58. package/dist/module/components/Input/index.js +38 -3
  59. package/dist/module/components/Input/index.js.map +1 -1
  60. package/dist/module/components/Input/types.js +5 -1
  61. package/dist/module/components/Input/useNumberFormat.js +11 -4
  62. package/dist/module/components/Input/useNumberFormat.js.map +1 -1
  63. package/dist/module/components/InstrumentRate/InstrumentRate.js +37 -30
  64. package/dist/module/components/InstrumentRate/InstrumentRate.js.map +1 -1
  65. package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js +19 -13
  66. package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js.map +1 -1
  67. package/dist/module/components/InstrumentRate/index.js +38 -3
  68. package/dist/module/components/InstrumentRate/index.js.map +1 -1
  69. package/dist/module/components/InstrumentRate/types.js +5 -1
  70. package/dist/module/components/InstrumentRate/utils.js +13 -6
  71. package/dist/module/components/InstrumentRate/utils.js.map +1 -1
  72. package/dist/module/components/Label/Label.js +12 -6
  73. package/dist/module/components/Label/Label.js.map +1 -1
  74. package/dist/module/components/Label/index.js +16 -1
  75. package/dist/module/components/Label/index.js.map +1 -1
  76. package/dist/module/components/LabelWrapper/LabelWrapper.js +24 -17
  77. package/dist/module/components/LabelWrapper/LabelWrapper.js.map +1 -1
  78. package/dist/module/components/LabelWrapper/index.js +27 -2
  79. package/dist/module/components/LabelWrapper/index.js.map +1 -1
  80. package/dist/module/components/LabelWrapper/types.js +7 -1
  81. package/dist/module/components/LabelWrapper/types.js.map +1 -1
  82. package/dist/module/components/LastUpdated/LastUpdated.js +13 -6
  83. package/dist/module/components/LastUpdated/LastUpdated.js.map +1 -1
  84. package/dist/module/components/LastUpdated/index.js +27 -2
  85. package/dist/module/components/LastUpdated/index.js.map +1 -1
  86. package/dist/module/components/LastUpdated/types.js +5 -1
  87. package/dist/module/components/LineChart/LineChart.js +18 -11
  88. package/dist/module/components/LineChart/LineChart.js.map +1 -1
  89. package/dist/module/components/LineChart/LineChartWithData.js +14 -8
  90. package/dist/module/components/LineChart/LineChartWithData.js.map +1 -1
  91. package/dist/module/components/LineChart/index.js +49 -4
  92. package/dist/module/components/LineChart/index.js.map +1 -1
  93. package/dist/module/components/LineChart/types.js +7 -1
  94. package/dist/module/components/LineChart/types.js.map +1 -1
  95. package/dist/module/components/LineChart/utils.js +16 -8
  96. package/dist/module/components/LineChart/utils.js.map +1 -1
  97. package/dist/module/components/Loader/Loader.js +18 -11
  98. package/dist/module/components/Loader/Loader.js.map +1 -1
  99. package/dist/module/components/Loader/index.js +27 -2
  100. package/dist/module/components/Loader/index.js.map +1 -1
  101. package/dist/module/components/Loader/types.js +7 -1
  102. package/dist/module/components/Loader/types.js.map +1 -1
  103. package/dist/module/components/Pagination/Pagination.js +40 -33
  104. package/dist/module/components/Pagination/Pagination.js.map +1 -1
  105. package/dist/module/components/Pagination/index.js +27 -2
  106. package/dist/module/components/Pagination/index.js.map +1 -1
  107. package/dist/module/components/Pagination/types.js +5 -1
  108. package/dist/module/components/Pagination/utils.js +8 -1
  109. package/dist/module/components/Pagination/utils.js.map +1 -1
  110. package/dist/module/components/Price/Price.js +23 -15
  111. package/dist/module/components/Price/Price.js.map +1 -1
  112. package/dist/module/components/Price/index.js +27 -2
  113. package/dist/module/components/Price/index.js.map +1 -1
  114. package/dist/module/components/Price/types.js +7 -1
  115. package/dist/module/components/Price/types.js.map +1 -1
  116. package/dist/module/components/SearchInput/SearchInput.js +12 -5
  117. package/dist/module/components/SearchInput/SearchInput.js.map +1 -1
  118. package/dist/module/components/SearchInput/index.js +27 -2
  119. package/dist/module/components/SearchInput/index.js.map +1 -1
  120. package/dist/module/components/SearchInput/types.js +5 -1
  121. package/dist/module/components/Select/Select.js +44 -36
  122. package/dist/module/components/Select/Select.js.map +1 -1
  123. package/dist/module/components/Select/index.js +27 -2
  124. package/dist/module/components/Select/index.js.map +1 -1
  125. package/dist/module/components/Select/types.js +5 -1
  126. package/dist/module/components/Sentiment/Sentiment.js +28 -20
  127. package/dist/module/components/Sentiment/Sentiment.js.map +1 -1
  128. package/dist/module/components/Sentiment/SentimentError.js +17 -10
  129. package/dist/module/components/Sentiment/SentimentError.js.map +1 -1
  130. package/dist/module/components/Sentiment/SentimentLoader.js +17 -10
  131. package/dist/module/components/Sentiment/SentimentLoader.js.map +1 -1
  132. package/dist/module/components/Sentiment/index.js +38 -3
  133. package/dist/module/components/Sentiment/index.js.map +1 -1
  134. package/dist/module/components/Sentiment/types.js +7 -1
  135. package/dist/module/components/Sentiment/types.js.map +1 -1
  136. package/dist/module/components/Sentiment/utils.js +7 -1
  137. package/dist/module/components/Sentiment/utils.js.map +1 -1
  138. package/dist/module/components/Spinner/Spinner.js +18 -10
  139. package/dist/module/components/Spinner/Spinner.js.map +1 -1
  140. package/dist/module/components/Spinner/index.js +27 -2
  141. package/dist/module/components/Spinner/index.js.map +1 -1
  142. package/dist/module/components/Spinner/types.js +7 -1
  143. package/dist/module/components/Spinner/types.js.map +1 -1
  144. package/dist/module/components/Switch/Switch.js +26 -18
  145. package/dist/module/components/Switch/Switch.js.map +1 -1
  146. package/dist/module/components/Switch/SwitchItem.js +18 -10
  147. package/dist/module/components/Switch/SwitchItem.js.map +1 -1
  148. package/dist/module/components/Switch/constants.js +7 -1
  149. package/dist/module/components/Switch/constants.js.map +1 -1
  150. package/dist/module/components/Switch/index.js +16 -1
  151. package/dist/module/components/Switch/index.js.map +1 -1
  152. package/dist/module/components/Switch/types.js +5 -1
  153. package/dist/module/components/Table/Table.js +21 -14
  154. package/dist/module/components/Table/Table.js.map +1 -1
  155. package/dist/module/components/Table/TableCell.js +19 -12
  156. package/dist/module/components/Table/TableCell.js.map +1 -1
  157. package/dist/module/components/Table/TableHeader.js +20 -13
  158. package/dist/module/components/Table/TableHeader.js.map +1 -1
  159. package/dist/module/components/Table/TableRow.js +15 -8
  160. package/dist/module/components/Table/TableRow.js.map +1 -1
  161. package/dist/module/components/Table/columns/ChartColumn.js +20 -12
  162. package/dist/module/components/Table/columns/ChartColumn.js.map +1 -1
  163. package/dist/module/components/Table/columns/DailyChangeColumn.js +15 -7
  164. package/dist/module/components/Table/columns/DailyChangeColumn.js.map +1 -1
  165. package/dist/module/components/Table/columns/InstrumentColumn.js +19 -11
  166. package/dist/module/components/Table/columns/InstrumentColumn.js.map +1 -1
  167. package/dist/module/components/Table/columns/PriceColumn.js +16 -8
  168. package/dist/module/components/Table/columns/PriceColumn.js.map +1 -1
  169. package/dist/module/components/Table/columns/SentimentColumn.js +16 -8
  170. package/dist/module/components/Table/columns/SentimentColumn.js.map +1 -1
  171. package/dist/module/components/Table/columns/SpreadColumn.js +17 -9
  172. package/dist/module/components/Table/columns/SpreadColumn.js.map +1 -1
  173. package/dist/module/components/Table/columns/index.js +71 -6
  174. package/dist/module/components/Table/columns/index.js.map +1 -1
  175. package/dist/module/components/Table/index.js +60 -5
  176. package/dist/module/components/Table/index.js.map +1 -1
  177. package/dist/module/components/Table/types.js +5 -1
  178. package/dist/module/components/TableWidget/CardRecordRow.js +22 -14
  179. package/dist/module/components/TableWidget/CardRecordRow.js.map +1 -1
  180. package/dist/module/components/TableWidget/CardRenderer.js +20 -12
  181. package/dist/module/components/TableWidget/CardRenderer.js.map +1 -1
  182. package/dist/module/components/TableWidget/Cards.js +14 -6
  183. package/dist/module/components/TableWidget/Cards.js.map +1 -1
  184. package/dist/module/components/TableWidget/ColumnRenderer.js +42 -34
  185. package/dist/module/components/TableWidget/ColumnRenderer.js.map +1 -1
  186. package/dist/module/components/TableWidget/DataRecordRow.js +20 -12
  187. package/dist/module/components/TableWidget/DataRecordRow.js.map +1 -1
  188. package/dist/module/components/TableWidget/TableWidget.js +34 -26
  189. package/dist/module/components/TableWidget/TableWidget.js.map +1 -1
  190. package/dist/module/components/TableWidget/index.js +27 -2
  191. package/dist/module/components/TableWidget/index.js.map +1 -1
  192. package/dist/module/components/TableWidget/types.js +5 -1
  193. package/dist/module/components/TableWidget/utils.js +12 -4
  194. package/dist/module/components/TableWidget/utils.js.map +1 -1
  195. package/dist/module/components/Tabs/Tab.js +16 -10
  196. package/dist/module/components/Tabs/Tab.js.map +1 -1
  197. package/dist/module/components/Tabs/Tabs.js +11 -5
  198. package/dist/module/components/Tabs/Tabs.js.map +1 -1
  199. package/dist/module/components/Tabs/index.js +16 -1
  200. package/dist/module/components/Tabs/index.js.map +1 -1
  201. package/dist/module/components/Tabs/types.js +5 -1
  202. package/dist/module/components/TextInput/TextInput.js +17 -10
  203. package/dist/module/components/TextInput/TextInput.js.map +1 -1
  204. package/dist/module/components/TextInput/index.js +16 -1
  205. package/dist/module/components/TextInput/index.js.map +1 -1
  206. package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js +14 -7
  207. package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
  208. package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js +22 -15
  209. package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
  210. package/dist/module/components/TimeUnitSwitch/index.js +16 -1
  211. package/dist/module/components/TimeUnitSwitch/index.js.map +1 -1
  212. package/dist/module/components/TimeUnitSwitch/types.js +5 -1
  213. package/dist/module/components/Tooltip/Tooltip.js +11 -4
  214. package/dist/module/components/Tooltip/Tooltip.js.map +1 -1
  215. package/dist/module/components/Tooltip/index.js +27 -2
  216. package/dist/module/components/Tooltip/index.js.map +1 -1
  217. package/dist/module/components/Tooltip/types.js +5 -1
  218. package/dist/module/components/Truncate/Truncate.js +18 -11
  219. package/dist/module/components/Truncate/Truncate.js.map +1 -1
  220. package/dist/module/components/Truncate/index.js +27 -2
  221. package/dist/module/components/Truncate/index.js.map +1 -1
  222. package/dist/module/components/Truncate/types.js +5 -1
  223. package/dist/module/components/WidgetWrapper/WidgetWrapper.js +14 -6
  224. package/dist/module/components/WidgetWrapper/WidgetWrapper.js.map +1 -1
  225. package/dist/module/components/WidgetWrapper/index.js +16 -1
  226. package/dist/module/components/WidgetWrapper/index.js.map +1 -1
  227. package/dist/module/components/constant.js +8 -2
  228. package/dist/module/components/constant.js.map +1 -1
  229. package/dist/module/components/index.js +292 -27
  230. package/dist/module/components/index.js.map +1 -1
  231. package/dist/module/components/style.css +1 -1
  232. package/dist/module/constants/index.js +13 -7
  233. package/dist/module/constants/index.js.map +1 -1
  234. package/dist/module/fonts/index.js +27 -4
  235. package/dist/module/fonts/index.js.map +1 -1
  236. package/dist/module/hooks/index.js +71 -6
  237. package/dist/module/hooks/index.js.map +1 -1
  238. package/dist/module/hooks/useFetchCombinedDataRecords.js +14 -7
  239. package/dist/module/hooks/useFetchCombinedDataRecords.js.map +1 -1
  240. package/dist/module/hooks/useLiveRates.js +12 -5
  241. package/dist/module/hooks/useLiveRates.js.map +1 -1
  242. package/dist/module/hooks/useLiveRatesMessage.js +26 -19
  243. package/dist/module/hooks/useLiveRatesMessage.js.map +1 -1
  244. package/dist/module/hooks/useLiveRatesQuery.js +12 -5
  245. package/dist/module/hooks/useLiveRatesQuery.js.map +1 -1
  246. package/dist/module/hooks/useRecords.js +13 -7
  247. package/dist/module/hooks/useRecords.js.map +1 -1
  248. package/dist/module/hooks/useVisibleLiveDataRecord.js +16 -9
  249. package/dist/module/hooks/useVisibleLiveDataRecord.js.map +1 -1
  250. package/dist/module/images/index.js +111 -16
  251. package/dist/module/images/index.js.map +1 -1
  252. package/dist/module/index.js +126 -11
  253. package/dist/module/index.js.map +1 -1
  254. package/dist/module/providers/ConditionalProvider.js +11 -3
  255. package/dist/module/providers/ConditionalProvider.js.map +1 -1
  256. package/dist/module/providers/Layout/LayoutContext.js +12 -4
  257. package/dist/module/providers/Layout/LayoutContext.js.map +1 -1
  258. package/dist/module/providers/Layout/LayoutProvider.js +30 -22
  259. package/dist/module/providers/Layout/LayoutProvider.js.map +1 -1
  260. package/dist/module/providers/Layout/LayoutProvider.test.js +61 -58
  261. package/dist/module/providers/Layout/LayoutProvider.test.js.map +1 -1
  262. package/dist/module/providers/Layout/index.js +27 -2
  263. package/dist/module/providers/Layout/index.js.map +1 -1
  264. package/dist/module/providers/LiveRates/LiveRatesContext.js +11 -4
  265. package/dist/module/providers/LiveRates/LiveRatesContext.js.map +1 -1
  266. package/dist/module/providers/LiveRates/LiveRatesProvider.js +37 -29
  267. package/dist/module/providers/LiveRates/LiveRatesProvider.js.map +1 -1
  268. package/dist/module/providers/LiveRates/index.js +27 -2
  269. package/dist/module/providers/LiveRates/index.js.map +1 -1
  270. package/dist/module/providers/Widget/WidgetProvider.js +26 -18
  271. package/dist/module/providers/Widget/WidgetProvider.js.map +1 -1
  272. package/dist/module/providers/Widget/index.js +16 -1
  273. package/dist/module/providers/Widget/index.js.map +1 -1
  274. package/dist/module/providers/index.js +38 -3
  275. package/dist/module/providers/index.js.map +1 -1
  276. package/dist/module/tailwind/cn.js +11 -4
  277. package/dist/module/tailwind/cn.js.map +1 -1
  278. package/dist/module/tailwind/colors.js +9 -3
  279. package/dist/module/tailwind/colors.js.map +1 -1
  280. package/dist/module/tailwind/index.js +39 -3
  281. package/dist/module/tailwind/index.js.map +1 -1
  282. package/dist/module/tailwind/preset.js +11 -5
  283. package/dist/module/tailwind/preset.js.map +1 -1
  284. package/dist/module/tailwind/themes/background.js +14 -8
  285. package/dist/module/tailwind/themes/background.js.map +1 -1
  286. package/dist/module/tailwind/themes/border.js +10 -4
  287. package/dist/module/tailwind/themes/border.js.map +1 -1
  288. package/dist/module/tailwind/themes/index.js +12 -6
  289. package/dist/module/tailwind/themes/index.js.map +1 -1
  290. package/dist/module/tailwind/themes/text.js +18 -12
  291. package/dist/module/tailwind/themes/text.js.map +1 -1
  292. package/dist/module/tailwind/themes/themeColors.js +26 -20
  293. package/dist/module/tailwind/themes/themeColors.js.map +1 -1
  294. package/dist/module/tailwind/types.js +5 -1
  295. package/dist/module/tailwind/utils.js +8 -1
  296. package/dist/module/tailwind/utils.js.map +1 -1
  297. package/dist/module/testUtils/index.js +15 -7
  298. package/dist/module/testUtils/index.js.map +1 -1
  299. package/dist/module/translations/index.js +15 -8
  300. package/dist/module/translations/index.js.map +1 -1
  301. package/dist/module/translations/translations.js +7 -1
  302. package/dist/module/translations/translations.js.map +1 -1
  303. package/dist/module/types/dataTypes.js +7 -1
  304. package/dist/module/types/dataTypes.js.map +1 -1
  305. package/dist/module/types/index.js +36 -4
  306. package/dist/module/types/index.js.map +1 -1
  307. package/dist/module/types/liveRatesTypes.js +5 -1
  308. package/dist/module/utils/dateUtils.js +9 -1
  309. package/dist/module/utils/dateUtils.js.map +1 -1
  310. package/dist/module/utils/getLocale.js +20 -13
  311. package/dist/module/utils/getLocale.js.map +1 -1
  312. package/dist/module/utils/index.js +38 -3
  313. package/dist/module/utils/index.js.map +1 -1
  314. package/dist/module/utils/liveRates/buildUrl.js +8 -1
  315. package/dist/module/utils/liveRates/buildUrl.js.map +1 -1
  316. package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js +7 -1
  317. package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js.map +1 -1
  318. package/dist/module/utils/liveRates/calculatePriceChange.js +8 -1
  319. package/dist/module/utils/liveRates/calculatePriceChange.js.map +1 -1
  320. package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js +8 -1
  321. package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js.map +1 -1
  322. package/dist/module/utils/liveRates/calculateSpread.js +8 -1
  323. package/dist/module/utils/liveRates/calculateSpread.js.map +1 -1
  324. package/dist/module/utils/liveRates/decodeLiveRateMessage.js +9 -2
  325. package/dist/module/utils/liveRates/decodeLiveRateMessage.js.map +1 -1
  326. package/dist/module/utils/liveRates/decodeUtilities.js +18 -6
  327. package/dist/module/utils/liveRates/decodeUtilities.js.map +1 -1
  328. package/dist/module/utils/liveRates/index.js +82 -7
  329. package/dist/module/utils/liveRates/index.js.map +1 -1
  330. package/dist/module/utils/validateToolParams.js +7 -1
  331. package/dist/module/utils/validateToolParams.js.map +1 -1
  332. package/package.json +9 -4
  333. package/src/components/style.css +1 -1
  334. package/tsconfig.types.json +2 -4
@@ -1,3 +1,3 @@
1
1
  @tailwind base;
2
2
  @tailwind components;
3
- @tailwind utilities;
3
+ @tailwind utilities;
@@ -1,17 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BaseChart = void 0;
7
+ var _core = _interopRequireDefault(require("echarts-for-react/lib/core"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1
11
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import ReactEChartsCore from 'echarts-for-react/lib/core';
3
- import React, { forwardRef, useEffect, useState } from 'react';
4
- export const BaseChart = forwardRef((_ref, ref) => {
12
+ const BaseChart = exports.BaseChart = (0, _react.forwardRef)((_ref, ref) => {
5
13
  let {
6
14
  isDark,
7
15
  chartHeight,
8
16
  ...props
9
17
  } = _ref;
10
- const [ready, setReady] = useState(false);
11
- useEffect(() => {
18
+ const [ready, setReady] = (0, _react.useState)(false);
19
+ (0, _react.useEffect)(() => {
12
20
  void document.fonts.ready.then(() => setReady(true));
13
21
  }, []);
14
- return React.createElement(React.Fragment, null, ready ? React.createElement(ReactEChartsCore, _extends({}, props, {
22
+ return _react.default.createElement(_react.default.Fragment, null, ready ? _react.default.createElement(_core.default, _extends({}, props, {
15
23
  ref: ref,
16
24
  "data-testid": "charts-container",
17
25
  style: {
@@ -19,7 +27,7 @@ export const BaseChart = forwardRef((_ref, ref) => {
19
27
  width: '100%'
20
28
  },
21
29
  theme: isDark ? 'dark_theme' : 'light_theme'
22
- })) : React.createElement("div", {
30
+ })) : _react.default.createElement("div", {
23
31
  className: "lw-w-full",
24
32
  "data-testid": "charts-placeholder",
25
33
  style: {
@@ -1 +1 @@
1
- {"version":3,"file":"BaseChart.js","names":["ReactEChartsCore","React","forwardRef","useEffect","useState","BaseChart","_ref","ref","isDark","chartHeight","props","ready","setReady","document","fonts","then","createElement","Fragment","_extends","style","height","width","theme","className","displayName"],"sources":["../../../src/chart/BaseChart.tsx"],"sourcesContent":["import ReactEChartsCore from 'echarts-for-react/lib/core';\nimport type { EChartsReactProps } from 'echarts-for-react/lib/types';\nimport React, { forwardRef, useEffect, useState } from 'react';\n\nimport type { BaseChartRef } from './types';\n\ntype BaseChartProps = EChartsReactProps & {\n isDark: boolean;\n chartHeight: number;\n};\n\nexport const BaseChart = forwardRef<BaseChartRef, BaseChartProps>(\n ({ isDark, chartHeight, ...props }, ref) => {\n const [ready, setReady] = useState(false);\n\n useEffect(() => {\n void document.fonts.ready.then(() => setReady(true));\n }, []);\n\n return (\n <>\n {ready ? (\n <ReactEChartsCore\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n ref={ref}\n data-testid=\"charts-container\"\n style={{\n height: `${chartHeight}px`,\n width: '100%',\n }}\n theme={isDark ? 'dark_theme' : 'light_theme'}\n />\n ) : (\n <div\n className=\"lw-w-full\"\n data-testid=\"charts-placeholder\"\n style={{ height: `${chartHeight}px` }}\n />\n )}\n </>\n );\n }\n);\n\nBaseChart.displayName = 'BaseChart';\n"],"mappings":";AAAA,OAAOA,gBAAgB,MAAM,4BAA4B;AAEzD,OAAOC,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAS9D,OAAO,MAAMC,SAAS,GAAGH,UAAU,CACjC,CAAAI,IAAA,EAAoCC,GAAG,KAAK;EAAA,IAA3C;IAAEC,MAAM;IAAEC,WAAW;IAAE,GAAGC;EAAM,CAAC,GAAAJ,IAAA;EAChC,MAAM,CAACK,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAAC,KAAK,CAAC;EAEzCD,SAAS,CAAC,MAAM;IACd,KAAKU,QAAQ,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,CAAC,MAAMH,QAAQ,CAAC,IAAI,CAAC,CAAC;EACtD,CAAC,EAAE,EAAE,CAAC;EAEN,OACEX,KAAA,CAAAe,aAAA,CAAAf,KAAA,CAAAgB,QAAA,QACGN,KAAK,GACJV,KAAA,CAAAe,aAAA,CAAChB,gBAAgB,EAAAkB,QAAA,KAEXR,KAAK;IACTH,GAAG,EAAEA,GAAI;IACT,eAAY,kBAAkB;IAC9BY,KAAK,EAAE;MACLC,MAAM,EAAE,GAAGX,WAAW,IAAI;MAC1BY,KAAK,EAAE;IACT,CAAE;IACFC,KAAK,EAAEd,MAAM,GAAG,YAAY,GAAG;EAAc,EAC9C,CAAC,GAEFP,KAAA,CAAAe,aAAA;IACEO,SAAS,EAAC,WAAW;IACrB,eAAY,oBAAoB;IAChCJ,KAAK,EAAE;MAAEC,MAAM,EAAE,GAAGX,WAAW;IAAK;EAAE,CACvC,CAEH,CAAC;AAEP,CACF,CAAC;AAEDJ,SAAS,CAACmB,WAAW,GAAG,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"BaseChart.js","names":["_core","_interopRequireDefault","require","_react","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","BaseChart","exports","forwardRef","_ref","ref","isDark","chartHeight","props","ready","setReady","useState","useEffect","document","fonts","then","createElement","Fragment","style","height","width","theme","className","displayName"],"sources":["../../../src/chart/BaseChart.tsx"],"sourcesContent":["import ReactEChartsCore from 'echarts-for-react/lib/core';\nimport type { EChartsReactProps } from 'echarts-for-react/lib/types';\nimport React, { forwardRef, useEffect, useState } from 'react';\n\nimport type { BaseChartRef } from './types';\n\ntype BaseChartProps = EChartsReactProps & {\n isDark: boolean;\n chartHeight: number;\n};\n\nexport const BaseChart = forwardRef<BaseChartRef, BaseChartProps>(\n ({ isDark, chartHeight, ...props }, ref) => {\n const [ready, setReady] = useState(false);\n\n useEffect(() => {\n void document.fonts.ready.then(() => setReady(true));\n }, []);\n\n return (\n <>\n {ready ? (\n <ReactEChartsCore\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n ref={ref}\n data-testid=\"charts-container\"\n style={{\n height: `${chartHeight}px`,\n width: '100%',\n }}\n theme={isDark ? 'dark_theme' : 'light_theme'}\n />\n ) : (\n <div\n className=\"lw-w-full\"\n data-testid=\"charts-placeholder\"\n style={{ height: `${chartHeight}px` }}\n />\n )}\n </>\n );\n }\n);\n\nBaseChart.displayName = 'BaseChart';\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+D,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC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,EAAE,GAAGZ,WAAW,IAAI;MAC1Ba,KAAK,EAAE;IACT,CAAE;IACFC,KAAK,EAAEf,MAAM,GAAG,YAAY,GAAG;EAAc,EAC9C,CAAC,GAEFhC,MAAA,CAAAY,OAAA,CAAA8B,aAAA;IACEM,SAAS,EAAC,WAAW;IACrB,eAAY,oBAAoB;IAChCJ,KAAK,EAAE;MAAEC,MAAM,EAAE,GAAGZ,WAAW;IAAK;EAAE,CACvC,CAEH,CAAC;AAEP,CACF,CAAC;AAEDN,SAAS,CAACsB,WAAW,GAAG,WAAW","ignoreList":[]}
@@ -1,8 +1,15 @@
1
- export const chartDateFormat = date => `${new Date(date).toLocaleDateString(undefined, {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getChartDateAndTime = exports.chartDateTimeFormat = exports.chartDateFormat = void 0;
7
+ const chartDateFormat = date => `${new Date(date).toLocaleDateString(undefined, {
2
8
  month: 'numeric',
3
9
  day: 'numeric'
4
10
  })}`;
5
- export const chartDateTimeFormat = _ref => {
11
+ exports.chartDateFormat = chartDateFormat;
12
+ const chartDateTimeFormat = _ref => {
6
13
  let {
7
14
  date,
8
15
  time
@@ -13,11 +20,13 @@ export const chartDateTimeFormat = _ref => {
13
20
  day: 'numeric'
14
21
  })}, ${time} UTC`;
15
22
  };
16
- export const getChartDateAndTime = param => {
23
+ exports.chartDateTimeFormat = chartDateTimeFormat;
24
+ const getChartDateAndTime = param => {
17
25
  const dateAndTime = param.split('T');
18
26
  return {
19
27
  date: dateAndTime[0],
20
28
  time: dateAndTime[1].substring(0, 5)
21
29
  };
22
30
  };
31
+ exports.getChartDateAndTime = getChartDateAndTime;
23
32
  //# sourceMappingURL=formatters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.js","names":["chartDateFormat","date","Date","toLocaleDateString","undefined","month","day","chartDateTimeFormat","_ref","time","year","getChartDateAndTime","param","dateAndTime","split","substring"],"sources":["../../../src/chart/formatters.ts"],"sourcesContent":["export const chartDateFormat = (date: string) =>\n `${new Date(date).toLocaleDateString(undefined, { month: 'numeric', day: 'numeric' })}`;\n\nexport const chartDateTimeFormat = ({\n date,\n time,\n}: {\n date: string;\n time: string;\n}) =>\n `${new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'numeric', day: 'numeric' })}, ${time} UTC`;\n\nexport const getChartDateAndTime = (param: string) => {\n const dateAndTime = param.split('T');\n\n return {\n date: dateAndTime[0],\n time: dateAndTime[1].substring(0, 5),\n };\n};\n"],"mappings":"AAAA,OAAO,MAAMA,eAAe,GAAIC,IAAY,IAC1C,GAAG,IAAIC,IAAI,CAACD,IAAI,CAAC,CAACE,kBAAkB,CAACC,SAAS,EAAE;EAAEC,KAAK,EAAE,SAAS;EAAEC,GAAG,EAAE;AAAU,CAAC,CAAC,EAAE;AAEzF,OAAO,MAAMC,mBAAmB,GAAGC,IAAA;EAAA,IAAC;IAClCP,IAAI;IACJQ;EAIF,CAAC,GAAAD,IAAA;EAAA,OACC,GAAG,IAAIN,IAAI,CAACD,IAAI,CAAC,CAACE,kBAAkB,CAACC,SAAS,EAAE;IAAEM,IAAI,EAAE,SAAS;IAAEL,KAAK,EAAE,SAAS;IAAEC,GAAG,EAAE;EAAU,CAAC,CAAC,KAAKG,IAAI,MAAM;AAAA;AAEvH,OAAO,MAAME,mBAAmB,GAAIC,KAAa,IAAK;EACpD,MAAMC,WAAW,GAAGD,KAAK,CAACE,KAAK,CAAC,GAAG,CAAC;EAEpC,OAAO;IACLb,IAAI,EAAEY,WAAW,CAAC,CAAC,CAAC;IACpBJ,IAAI,EAAEI,WAAW,CAAC,CAAC,CAAC,CAACE,SAAS,CAAC,CAAC,EAAE,CAAC;EACrC,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"formatters.js","names":["chartDateFormat","date","Date","toLocaleDateString","undefined","month","day","exports","chartDateTimeFormat","_ref","time","year","getChartDateAndTime","param","dateAndTime","split","substring"],"sources":["../../../src/chart/formatters.ts"],"sourcesContent":["export const chartDateFormat = (date: string) =>\n `${new Date(date).toLocaleDateString(undefined, { month: 'numeric', day: 'numeric' })}`;\n\nexport const chartDateTimeFormat = ({\n date,\n time,\n}: {\n date: string;\n time: string;\n}) =>\n `${new Date(date).toLocaleDateString(undefined, { year: 'numeric', month: 'numeric', day: 'numeric' })}, ${time} UTC`;\n\nexport const getChartDateAndTime = (param: string) => {\n const dateAndTime = param.split('T');\n\n return {\n date: dateAndTime[0],\n time: dateAndTime[1].substring(0, 5),\n };\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAIC,IAAY,IAC1C,GAAG,IAAIC,IAAI,CAACD,IAAI,CAAC,CAACE,kBAAkB,CAACC,SAAS,EAAE;EAAEC,KAAK,EAAE,SAAS;EAAEC,GAAG,EAAE;AAAU,CAAC,CAAC,EAAE;AAACC,OAAA,CAAAP,eAAA,GAAAA,eAAA;AAEnF,MAAMQ,mBAAmB,GAAGC,IAAA;EAAA,IAAC;IAClCR,IAAI;IACJS;EAIF,CAAC,GAAAD,IAAA;EAAA,OACC,GAAG,IAAIP,IAAI,CAACD,IAAI,CAAC,CAACE,kBAAkB,CAACC,SAAS,EAAE;IAAEO,IAAI,EAAE,SAAS;IAAEN,KAAK,EAAE,SAAS;IAAEC,GAAG,EAAE;EAAU,CAAC,CAAC,KAAKI,IAAI,MAAM;AAAA;AAACH,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEjH,MAAMI,mBAAmB,GAAIC,KAAa,IAAK;EACpD,MAAMC,WAAW,GAAGD,KAAK,CAACE,KAAK,CAAC,GAAG,CAAC;EAEpC,OAAO;IACLd,IAAI,EAAEa,WAAW,CAAC,CAAC,CAAC;IACpBJ,IAAI,EAAEI,WAAW,CAAC,CAAC,CAAC,CAACE,SAAS,CAAC,CAAC,EAAE,CAAC;EACrC,CAAC;AACH,CAAC;AAACT,OAAA,CAAAK,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -1,5 +1,11 @@
1
- import { getLineCommons } from './sharedOptions';
2
- export const getGridLines = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getGridLines = void 0;
7
+ var _sharedOptions = require("./sharedOptions");
8
+ const getGridLines = _ref => {
3
9
  let {
4
10
  isDark,
5
11
  chartWidth,
@@ -12,7 +18,7 @@ export const getGridLines = _ref => {
12
18
  yLabelMarinTop = 0
13
19
  } = _ref;
14
20
  return [{
15
- ...getLineCommons(isDark),
21
+ ...(0, _sharedOptions.getLineCommons)(isDark),
16
22
  top: -2,
17
23
  shape: {
18
24
  x1: 0,
@@ -21,7 +27,7 @@ export const getGridLines = _ref => {
21
27
  y2: 0
22
28
  }
23
29
  }, {
24
- ...getLineCommons(isDark),
30
+ ...(0, _sharedOptions.getLineCommons)(isDark),
25
31
  right: -2,
26
32
  shape: {
27
33
  x1: 0,
@@ -30,7 +36,7 @@ export const getGridLines = _ref => {
30
36
  y2: chartHeight - marginBottom
31
37
  }
32
38
  }, {
33
- ...getLineCommons(isDark),
39
+ ...(0, _sharedOptions.getLineCommons)(isDark),
34
40
  bottom: -2 + marginBottom,
35
41
  shape: {
36
42
  x1: 0,
@@ -39,7 +45,7 @@ export const getGridLines = _ref => {
39
45
  y2: 0
40
46
  }
41
47
  }, {
42
- ...getLineCommons(isDark),
48
+ ...(0, _sharedOptions.getLineCommons)(isDark),
43
49
  left: -2,
44
50
  shape: {
45
51
  x1: 0,
@@ -48,7 +54,7 @@ export const getGridLines = _ref => {
48
54
  y2: chartHeight - marginBottom
49
55
  }
50
56
  }, {
51
- ...getLineCommons(isDark),
57
+ ...(0, _sharedOptions.getLineCommons)(isDark),
52
58
  right: yLabelSize - 3,
53
59
  bottom: bottomLeftBox ? -2 + marginBottom : xLabelsSize - 3,
54
60
  shape: {
@@ -58,7 +64,7 @@ export const getGridLines = _ref => {
58
64
  y2: chartHeight - yLabelMarinTop
59
65
  }
60
66
  }, {
61
- ...getLineCommons(isDark),
67
+ ...(0, _sharedOptions.getLineCommons)(isDark),
62
68
  bottom: xLabelsSize - 3,
63
69
  shape: {
64
70
  x1: 0,
@@ -67,7 +73,7 @@ export const getGridLines = _ref => {
67
73
  y2: 0
68
74
  }
69
75
  }, ...additionalLines.map(item => ({
70
- ...getLineCommons(isDark),
76
+ ...(0, _sharedOptions.getLineCommons)(isDark),
71
77
  top: item.top,
72
78
  bottom: item.bottom,
73
79
  left: item.left,
@@ -80,4 +86,5 @@ export const getGridLines = _ref => {
80
86
  }
81
87
  }))];
82
88
  };
89
+ exports.getGridLines = getGridLines;
83
90
  //# sourceMappingURL=getGridLines.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getGridLines.js","names":["getLineCommons","getGridLines","_ref","isDark","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","additionalLines","marginBottom","yLabelMarinTop","top","shape","x1","y1","x2","y2","right","bottom","left","map","item"],"sources":["../../../src/chart/getGridLines.ts"],"sourcesContent":["import { getLineCommons } from './sharedOptions';\n\nexport const getGridLines = ({\n isDark,\n chartWidth,\n chartHeight,\n xLabelsSize,\n yLabelSize,\n bottomLeftBox = true,\n additionalLines = [],\n marginBottom = 0,\n yLabelMarinTop = 0,\n}: {\n isDark: boolean;\n chartWidth: number;\n chartHeight: number;\n xLabelsSize: number;\n yLabelSize: number;\n bottomLeftBox?: boolean;\n additionalLines?: {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n }[];\n marginBottom?: number;\n yLabelMarinTop?: number;\n}) => [\n // Top\n {\n ...getLineCommons(isDark),\n top: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n // Right\n {\n ...getLineCommons(isDark),\n right: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - marginBottom,\n },\n },\n // Bottom\n {\n ...getLineCommons(isDark),\n bottom: -2 + marginBottom,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n // Left\n {\n ...getLineCommons(isDark),\n left: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - marginBottom,\n },\n },\n // Y Label\n {\n ...getLineCommons(isDark),\n right: yLabelSize - 3,\n bottom: bottomLeftBox ? -2 + marginBottom : xLabelsSize - 3,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - yLabelMarinTop,\n },\n },\n // X Label\n {\n ...getLineCommons(isDark),\n bottom: xLabelsSize - 3,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n ...additionalLines.map((item) => ({\n ...getLineCommons(isDark),\n top: item.top,\n bottom: item.bottom,\n left: item.left,\n right: item.right,\n shape: {\n x1: item.x1,\n y1: item.y1,\n x2: item.x2,\n y2: item.y2,\n },\n })),\n];\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,iBAAiB;AAEhD,OAAO,MAAMC,YAAY,GAAGC,IAAA;EAAA,IAAC;IAC3BC,MAAM;IACNC,UAAU;IACVC,WAAW;IACXC,WAAW;IACXC,UAAU;IACVC,aAAa,GAAG,IAAI;IACpBC,eAAe,GAAG,EAAE;IACpBC,YAAY,GAAG,CAAC;IAChBC,cAAc,GAAG;EAoBnB,CAAC,GAAAT,IAAA;EAAA,OAAK,CAEJ;IACE,GAAGF,cAAc,CAACG,MAAM,CAAC;IACzBS,GAAG,EAAE,CAAC,CAAC;IACPC,KAAK,EAAE;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAEZ,UAAU;MACda,EAAE,EAAE;IACN;EACF,CAAC,EAED;IACE,GAAGjB,cAAc,CAACG,MAAM,CAAC;IACzBe,KAAK,EAAE,CAAC,CAAC;IACTL,KAAK,EAAE;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE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AE;MACLC,EAAE,EAAEQ,IAAI,CAACR,EAAE;MACXC,EAAE,EAAEO,IAAI,CAACP,EAAE;MACXC,EAAE,EAAEM,IAAI,CAACN,EAAE;MACXC,EAAE,EAAEK,IAAI,CAACL;IACX;EACF,CAAC,CAAC,CAAC,CACJ;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"getGridLines.js","names":["_sharedOptions","require","getGridLines","_ref","isDark","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","additionalLines","marginBottom","yLabelMarinTop","getLineCommons","top","shape","x1","y1","x2","y2","right","bottom","left","map","item","exports"],"sources":["../../../src/chart/getGridLines.ts"],"sourcesContent":["import { getLineCommons } from './sharedOptions';\n\nexport const getGridLines = ({\n isDark,\n chartWidth,\n chartHeight,\n xLabelsSize,\n yLabelSize,\n bottomLeftBox = true,\n additionalLines = [],\n marginBottom = 0,\n yLabelMarinTop = 0,\n}: {\n isDark: boolean;\n chartWidth: number;\n chartHeight: number;\n xLabelsSize: number;\n yLabelSize: number;\n bottomLeftBox?: boolean;\n additionalLines?: {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n }[];\n marginBottom?: number;\n yLabelMarinTop?: number;\n}) => [\n // Top\n {\n ...getLineCommons(isDark),\n top: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n // Right\n {\n ...getLineCommons(isDark),\n right: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - marginBottom,\n },\n },\n // Bottom\n {\n ...getLineCommons(isDark),\n bottom: -2 + marginBottom,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n // Left\n {\n ...getLineCommons(isDark),\n left: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - marginBottom,\n },\n },\n // Y Label\n {\n ...getLineCommons(isDark),\n right: yLabelSize - 3,\n bottom: bottomLeftBox ? -2 + marginBottom : xLabelsSize - 3,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: chartHeight - yLabelMarinTop,\n },\n },\n // X Label\n {\n ...getLineCommons(isDark),\n bottom: xLabelsSize - 3,\n shape: {\n x1: 0,\n y1: 0,\n x2: chartWidth,\n y2: 0,\n },\n },\n ...additionalLines.map((item) => ({\n ...getLineCommons(isDark),\n top: item.top,\n bottom: item.bottom,\n left: item.left,\n right: item.right,\n shape: {\n x1: item.x1,\n y1: item.y1,\n x2: item.x2,\n y2: item.y2,\n },\n })),\n];\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAGC,IAAA;EAAA,IAAC;IAC3BC,MAAM;IACNC,UAAU;IACVC,WAAW;IACXC,WAAW;IACXC,UAAU;IACVC,aAAa,GAAG,IAAI;IACpBC,eAAe,GAAG,EAAE;IACpBC,YAAY,GAAG,CAAC;IAChBC,cAAc,GAAG;EAoBnB,CAAC,GAAAT,IAAA;EAAA,OAAK,CAEJ;IACE,GAAG,IAAAU,6BAAc,EAACT,MAAM,CAAC;IACzBU,GAAG,EAAE,CAAC,CAAC;IACPC,KAAK,EAAE;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAEb,UAAU;MACdc,EAAE,EAAE;IACN;EACF,CAAC,EAED;IACE,GAAG,IAAAN,6BAAc,EAACT,MAAM,CAAC;IACzBgB,KAAK,EAAE,CAAC,CAAC;IACTL,KAAK,EAAE;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAEb,WAAW,GAAGK;IACpB;EACF,CAAC,EAED;IACE,GAAG,IAAAE,6BAAc,EAACT,MAAM,CAAC;IACzBiB,MAAM,EAAE,CAAC,CAAC,GAAGV,YAAY;IACzBI,KAAK,EAAE;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE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X;EACF,CAAC,CAAC,CAAC,CACJ;AAAA;AAACM,OAAA,CAAAvB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,7 +1,13 @@
1
- import { themeColors } from '../tailwind';
2
- import { Theme } from '../types';
3
- export const getChartTheme = theme => {
4
- const isLight = theme === Theme.Light;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getChartTheme = void 0;
7
+ var _tailwind = require("../tailwind");
8
+ var _types = require("../types");
9
+ const getChartTheme = theme => {
10
+ const isLight = theme === _types.Theme.Light;
5
11
  return {
6
12
  toolbox: {
7
13
  itemSize: 18,
@@ -12,60 +18,60 @@ export const getChartTheme = theme => {
12
18
  right: 6,
13
19
  showTitle: false,
14
20
  iconStyle: {
15
- borderColor: themeColors.textPrimary[theme]
21
+ borderColor: _tailwind.themeColors.textPrimary[theme]
16
22
  },
17
23
  emphasis: {
18
24
  iconStyle: {
19
- borderColor: themeColors.primary[theme]
25
+ borderColor: _tailwind.themeColors.primary[theme]
20
26
  }
21
27
  }
22
28
  },
23
- color: themeColors.chart[theme],
29
+ color: _tailwind.themeColors.chart[theme],
24
30
  textStyle: {
25
31
  fontFamily: 'Sofia W03',
26
32
  fontSize: 10,
27
- color: themeColors.textPrimary[theme]
33
+ color: _tailwind.themeColors.textPrimary[theme]
28
34
  },
29
35
  title: {
30
36
  textStyle: {
31
37
  fontFamily: 'Sofia W03',
32
38
  fontSize: 10,
33
- color: themeColors.textPrimary[theme]
39
+ color: _tailwind.themeColors.textPrimary[theme]
34
40
  },
35
41
  subtextStyle: {
36
42
  fontFamily: 'Sofia W03',
37
43
  fontSize: 10,
38
- color: themeColors.textPrimary[theme]
44
+ color: _tailwind.themeColors.textPrimary[theme]
39
45
  }
40
46
  },
41
47
  legend: {
42
48
  textStyle: {
43
- color: themeColors.textPrimary[theme]
49
+ color: _tailwind.themeColors.textPrimary[theme]
44
50
  }
45
51
  },
46
52
  categoryAxis: {
47
53
  axisLine: {
48
54
  show: true,
49
55
  lineStyle: {
50
- color: themeColors.borderPrimary[theme]
56
+ color: _tailwind.themeColors.borderPrimary[theme]
51
57
  }
52
58
  },
53
59
  axisTick: {
54
60
  show: true,
55
61
  lineStyle: {
56
- color: themeColors.borderPrimary[theme]
62
+ color: _tailwind.themeColors.borderPrimary[theme]
57
63
  }
58
64
  },
59
65
  axisLabel: {
60
66
  show: true,
61
- color: themeColors.textPrimary[theme],
67
+ color: _tailwind.themeColors.textPrimary[theme],
62
68
  fontFamily: 'Sofia W03',
63
69
  fontSize: 10
64
70
  },
65
71
  splitLine: {
66
72
  show: true,
67
73
  lineStyle: {
68
- color: [themeColors.borderPrimary[theme]]
74
+ color: [_tailwind.themeColors.borderPrimary[theme]]
69
75
  }
70
76
  }
71
77
  },
@@ -73,25 +79,25 @@ export const getChartTheme = theme => {
73
79
  axisLine: {
74
80
  show: true,
75
81
  lineStyle: {
76
- color: themeColors.borderPrimary[theme]
82
+ color: _tailwind.themeColors.borderPrimary[theme]
77
83
  }
78
84
  },
79
85
  axisTick: {
80
86
  show: true,
81
87
  lineStyle: {
82
- color: themeColors.borderPrimary[theme]
88
+ color: _tailwind.themeColors.borderPrimary[theme]
83
89
  }
84
90
  },
85
91
  axisLabel: {
86
92
  show: true,
87
- color: themeColors.textPrimary[theme],
93
+ color: _tailwind.themeColors.textPrimary[theme],
88
94
  fontFamily: 'Sofia W03',
89
95
  fontSize: 10
90
96
  },
91
97
  splitLine: {
92
98
  show: true,
93
99
  lineStyle: {
94
- color: [themeColors.borderPrimary[theme]]
100
+ color: [_tailwind.themeColors.borderPrimary[theme]]
95
101
  }
96
102
  }
97
103
  },
@@ -109,40 +115,40 @@ export const getChartTheme = theme => {
109
115
  axisLine: {
110
116
  show: true,
111
117
  lineStyle: {
112
- color: themeColors.borderPrimary[theme]
118
+ color: _tailwind.themeColors.borderPrimary[theme]
113
119
  }
114
120
  },
115
121
  axisTick: {
116
122
  show: true,
117
123
  lineStyle: {
118
- color: themeColors.borderPrimary[theme]
124
+ color: _tailwind.themeColors.borderPrimary[theme]
119
125
  }
120
126
  },
121
127
  axisLabel: {
122
128
  show: true,
123
- color: themeColors.textPrimary[theme],
129
+ color: _tailwind.themeColors.textPrimary[theme],
124
130
  fontFamily: 'Sofia W03',
125
131
  fontSize: 10
126
132
  },
127
133
  splitLine: {
128
134
  show: true,
129
135
  lineStyle: {
130
- color: isLight ? themeColors.borderSecondary.light : themeColors.borderPrimary.dark
136
+ color: isLight ? _tailwind.themeColors.borderSecondary.light : _tailwind.themeColors.borderPrimary.dark
131
137
  }
132
138
  }
133
139
  },
134
140
  axisPointer: {
135
141
  lineStyle: {
136
- color: isLight ? themeColors.borderPrimary.light : themeColors.primary.dark
142
+ color: isLight ? _tailwind.themeColors.borderPrimary.light : _tailwind.themeColors.primary.dark
137
143
  },
138
144
  label: {
139
- backgroundColor: isLight ? themeColors.borderSecondary.light : themeColors.borderPrimary.dark,
140
- color: themeColors.textPrimary[theme]
145
+ backgroundColor: isLight ? _tailwind.themeColors.borderSecondary.light : _tailwind.themeColors.borderPrimary.dark,
146
+ color: _tailwind.themeColors.textPrimary[theme]
141
147
  }
142
148
  },
143
149
  markPoint: {
144
150
  label: {
145
- color: themeColors.textPrimary[theme]
151
+ color: _tailwind.themeColors.textPrimary[theme]
146
152
  }
147
153
  },
148
154
  tooltip: {
@@ -151,23 +157,24 @@ export const getChartTheme = theme => {
151
157
  shadowBlur: 24,
152
158
  shadowOffsetX: 0,
153
159
  shadowOffsetY: 6,
154
- backgroundColor: isLight ? themeColors.bgSecondary.light : themeColors.borderPrimary.dark,
160
+ backgroundColor: isLight ? _tailwind.themeColors.bgSecondary.light : _tailwind.themeColors.borderPrimary.dark,
155
161
  textStyle: {
156
162
  fontFamily: 'Sofia W03',
157
163
  fontSize: 10,
158
- color: themeColors.textPrimary[theme]
164
+ color: _tailwind.themeColors.textPrimary[theme]
159
165
  },
160
166
  axisPointer: {
161
167
  lineStyle: {
162
- color: isLight ? themeColors.borderPrimary.light : themeColors.primary.dark,
168
+ color: isLight ? _tailwind.themeColors.borderPrimary.light : _tailwind.themeColors.primary.dark,
163
169
  width: 1
164
170
  },
165
171
  crossStyle: {
166
- color: themeColors.borderPrimary[theme],
172
+ color: _tailwind.themeColors.borderPrimary[theme],
167
173
  width: 1
168
174
  }
169
175
  }
170
176
  }
171
177
  };
172
178
  };
179
+ exports.getChartTheme = getChartTheme;
173
180
  //# sourceMappingURL=getTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTheme.js","names":["themeColors","Theme","getChartTheme","theme","isLight","Light","toolbox","itemSize","itemGap","top","undefined","left","bottom","right","showTitle","iconStyle","borderColor","textPrimary","emphasis","primary","color","chart","textStyle","fontFamily","fontSize","title","subtextStyle","legend","categoryAxis","axisLine","show","lineStyle","borderPrimary","axisTick","axisLabel","splitLine","timeAxis","bar","itemStyle","opacity","valueAxis","borderSecondary","light","dark","axisPointer","label","backgroundColor","markPoint","tooltip","borderWidth","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","bgSecondary","width","crossStyle"],"sources":["../../../src/chart/getTheme.ts"],"sourcesContent":["import { themeColors } from '../tailwind';\nimport { Theme } from '../types';\n\nexport const getChartTheme = (theme: Theme) => {\n const isLight = theme === Theme.Light;\n\n return {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n top: undefined,\n left: undefined,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: themeColors.textPrimary[theme],\n },\n emphasis: {\n iconStyle: {\n borderColor: themeColors.primary[theme],\n },\n },\n },\n color: themeColors.chart[theme],\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n title: {\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n subtextStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n },\n legend: {\n textStyle: {\n color: themeColors.textPrimary[theme],\n },\n },\n categoryAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: [themeColors.borderPrimary[theme]],\n },\n },\n },\n timeAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: [themeColors.borderPrimary[theme]],\n },\n },\n },\n bar: {\n itemStyle: {\n opacity: isLight ? 0.7 : 0.9,\n },\n emphasis: {\n itemStyle: {\n opacity: 1,\n },\n },\n },\n valueAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: isLight\n ? themeColors.borderSecondary.light\n : themeColors.borderPrimary.dark,\n },\n },\n },\n axisPointer: {\n lineStyle: {\n color: isLight\n ? themeColors.borderPrimary.light\n : themeColors.primary.dark,\n },\n label: {\n backgroundColor: isLight\n ? themeColors.borderSecondary.light\n : themeColors.borderPrimary.dark,\n color: themeColors.textPrimary[theme],\n },\n },\n markPoint: {\n label: {\n color: themeColors.textPrimary[theme],\n },\n },\n tooltip: {\n borderWidth: 0,\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n backgroundColor: isLight\n ? themeColors.bgSecondary.light\n : themeColors.borderPrimary.dark,\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n axisPointer: {\n lineStyle: {\n color: isLight\n ? themeColors.borderPrimary.light\n : themeColors.primary.dark,\n width: 1,\n },\n crossStyle: {\n color: themeColors.borderPrimary[theme],\n width: 1,\n },\n },\n },\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,KAAK,QAAQ,UAAU;AAEhC,OAAO,MAAMC,aAAa,GAAIC,KAAY,IAAK;EAC7C,MAAMC,OAAO,GAAGD,KAAK,KAAKF,KAAK,CAACI,KAAK;EAErC,OAAO;IACLC,OAAO,EAAE;MACPC,QAAQ,EAAE,EAAE;MACZC,OAAO,EAAE,EAAE;MACXC,GAAG,EAAEC,SAAS;MACdC,IAAI,EAAED,SAAS;MACfE,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE,CAAC;MACRC,SAAS,EAAE,KAAK;MAChBC,SAAS,EAAE;QACTC,WAAW,EAAEhB,WAAW,CAACiB,WAAW,CAACd,KAAK;MAC5C,CAAC;MACDe,QAAQ,EAAE;QACRH,SAAS,EAAE;UACTC,WAAW,EAAEhB,WAAW,CAACmB,OAAO,CAAChB,KAAK;QACxC;MACF;IACF,CAAC;IACDiB,KAAK,EAAEpB,WAAW,CAACqB,KAAK,CAAClB,KAAK,CAAC;IAC/BmB,SAAS,EAAE;MACTC,UAAU,EAAE,WAAW;MACvBC,QAAQ,EAAE,EAAE;MACZJ,KAAK,EAAEpB,WAAW,CAACiB,WAAW,CAACd,KAAK;IACtC,CAAC;IACDsB,KAAK,EAAE;MACLH,SAAS,EAAE;QACTC,UAAU,EAAE,WAAW;QACvBC,QAAQ,EAAE,EAAE;QACZJ,KAAK,EAAEpB,WAAW,CAACiB,WAAW,CAACd,KAAK;MACtC,CAAC;MACDuB,YAAY,EAAE;QACZH,UAAU,EAAE,WAAW;QACvBC,Q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KAAK,EAAEpB,WAAW,CAACiB,WAAW,CAACd,KAAK;MACtC;IACF,CAAC;IACD4C,SAAS,EAAE;MACTF,KAAK,EAAE;QACLzB,KAAK,EAAEpB,WAAW,CAACiB,WAAW,CAACd,KAAK;MACtC;IACF,CAAC;IACD6C,OAAO,EAAE;MACPC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,aAAa,EAAE,CAAC;MAChBC,aAAa,EAAE,CAAC;MAChBP,eAAe,EAAE1C,OAAO,GACpBJ,WAAW,CAACsD,WAAW,CAACZ,KAAK,GAC7B1C,WAAW,CAACgC,aAAa,CAACW,IAAI;MAClCrB,SAAS,EAAE;QACTC,UAAU,EAAE,WAAW;QACvBC,QAAQ,EAAE,EAAE;QACZJ,KAAK,EAAEpB,WAAW,CAACiB,WAAW,CAACd,KAAK;MACtC,CAAC;MACDyC,WAAW,EAAE;QACXb,SAAS,EAAE;UACTX,KAAK,EAAEhB,OAAO,GACVJ,WAAW,CAACgC,aAAa,CAACU,KAAK,GAC/B1C,WAAW,CAACmB,OAAO,CAACwB,IAAI;UAC5BY,KAAK,EAAE;QACT,CAAC;QACDC,UAAU,EAAE;UACVpC,KAAK,EAAEpB,WAAW,CAACgC,aAAa,CAAC7B,KAAK,CAAC;UACvCoD,KAAK,EAAE;QACT;MACF;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"getTheme.js","names":["_tailwind","require","_types","getChartTheme","theme","isLight","Theme","Light","toolbox","itemSize","itemGap","top","undefined","left","bottom","right","showTitle","iconStyle","borderColor","themeColors","textPrimary","emphasis","primary","color","chart","textStyle","fontFamily","fontSize","title","subtextStyle","legend","categoryAxis","axisLine","show","lineStyle","borderPrimary","axisTick","axisLabel","splitLine","timeAxis","bar","itemStyle","opacity","valueAxis","borderSecondary","light","dark","axisPointer","label","backgroundColor","markPoint","tooltip","borderWidth","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","bgSecondary","width","crossStyle","exports"],"sources":["../../../src/chart/getTheme.ts"],"sourcesContent":["import { themeColors } from '../tailwind';\nimport { Theme } from '../types';\n\nexport const getChartTheme = (theme: Theme) => {\n const isLight = theme === Theme.Light;\n\n return {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n top: undefined,\n left: undefined,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: themeColors.textPrimary[theme],\n },\n emphasis: {\n iconStyle: {\n borderColor: themeColors.primary[theme],\n },\n },\n },\n color: themeColors.chart[theme],\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n title: {\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n subtextStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n },\n legend: {\n textStyle: {\n color: themeColors.textPrimary[theme],\n },\n },\n categoryAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: [themeColors.borderPrimary[theme]],\n },\n },\n },\n timeAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: [themeColors.borderPrimary[theme]],\n },\n },\n },\n bar: {\n itemStyle: {\n opacity: isLight ? 0.7 : 0.9,\n },\n emphasis: {\n itemStyle: {\n opacity: 1,\n },\n },\n },\n valueAxis: {\n axisLine: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: themeColors.borderPrimary[theme],\n },\n },\n axisLabel: {\n show: true,\n color: themeColors.textPrimary[theme],\n fontFamily: 'Sofia W03',\n fontSize: 10,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: isLight\n ? themeColors.borderSecondary.light\n : themeColors.borderPrimary.dark,\n },\n },\n },\n axisPointer: {\n lineStyle: {\n color: isLight\n ? themeColors.borderPrimary.light\n : themeColors.primary.dark,\n },\n label: {\n backgroundColor: isLight\n ? themeColors.borderSecondary.light\n : themeColors.borderPrimary.dark,\n color: themeColors.textPrimary[theme],\n },\n },\n markPoint: {\n label: {\n color: themeColors.textPrimary[theme],\n },\n },\n tooltip: {\n borderWidth: 0,\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n backgroundColor: isLight\n ? themeColors.bgSecondary.light\n : themeColors.borderPrimary.dark,\n textStyle: {\n fontFamily: 'Sofia W03',\n fontSize: 10,\n color: themeColors.textPrimary[theme],\n },\n axisPointer: {\n lineStyle: {\n color: isLight\n ? themeColors.borderPrimary.light\n : themeColors.primary.dark,\n width: 1,\n },\n crossStyle: {\n color: themeColors.borderPrimary[theme],\n width: 1,\n },\n },\n },\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAIC,KAAY,IAAK;EAC7C,MAAMC,OAAO,GAAGD,KAAK,KAAKE,YAAK,CAACC,KAAK;EAErC,OAAO;IACLC,OAAO,EAAE;MACPC,QAAQ,EAAE,EAAE;MACZC,OAAO,EAAE,EAAE;MACXC,GAAG,EAAEC,SAAS;MACdC,IAAI,EAAED,SAAS;MACfE,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE,CAAC;MACRC,SAAS,EAAE,KAAK;MAChBC,S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GACVc,qBAAW,CAACgB,aAAa,CAACU,KAAK,GAC/B1B,qBAAW,CAACG,OAAO,CAACwB,IAAI;UAC5BY,KAAK,EAAE;QACT,CAAC;QACDC,UAAU,EAAE;UACVpC,KAAK,EAAEJ,qBAAW,CAACgB,aAAa,CAAC/B,KAAK,CAAC;UACvCsD,KAAK,EAAE;QACT;MACF;IACF;EACF,CAAC;AACH,CAAC;AAACE,OAAA,CAAAzD,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1,5 +1,11 @@
1
- import { chartIcons } from './sharedOptions';
2
- export const getZoomControls = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getZoomControls = void 0;
7
+ var _sharedOptions = require("./sharedOptions");
8
+ const getZoomControls = _ref => {
3
9
  let {
4
10
  resetStartValue,
5
11
  resetEndValue
@@ -8,7 +14,7 @@ export const getZoomControls = _ref => {
8
14
  myZoomIn: {
9
15
  show: true,
10
16
  title: 'Zoom in',
11
- icon: chartIcons.zoomInIcon,
17
+ icon: _sharedOptions.chartIcons.zoomInIcon,
12
18
  onclick: (model, instance) => {
13
19
  const [{
14
20
  startValue,
@@ -26,7 +32,7 @@ export const getZoomControls = _ref => {
26
32
  myZoomOut: {
27
33
  show: true,
28
34
  title: 'Zoom out',
29
- icon: chartIcons.zoomOutIcon,
35
+ icon: _sharedOptions.chartIcons.zoomOutIcon,
30
36
  onclick: (model, instance) => {
31
37
  const [{
32
38
  startValue,
@@ -44,7 +50,7 @@ export const getZoomControls = _ref => {
44
50
  myResetZoom: {
45
51
  show: true,
46
52
  title: 'ResetZoom',
47
- icon: chartIcons.resetZoomIcon,
53
+ icon: _sharedOptions.chartIcons.resetZoomIcon,
48
54
  onclick: (model, instance) => {
49
55
  instance.dispatchAction({
50
56
  type: 'dataZoom',
@@ -55,4 +61,5 @@ export const getZoomControls = _ref => {
55
61
  }
56
62
  };
57
63
  };
64
+ exports.getZoomControls = getZoomControls;
58
65
  //# sourceMappingURL=getZoomControls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getZoomControls.js","names":["chartIcons","getZoomControls","_ref","resetStartValue","resetEndValue","myZoomIn","show","title","icon","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","range","zoomStep","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon"],"sources":["../../../src/chart/getZoomControls.ts"],"sourcesContent":["import type { EChartsType, Model } from 'echarts';\n\nimport { chartIcons } from './sharedOptions';\n\nexport const getZoomControls = ({\n resetStartValue,\n resetEndValue,\n}: {\n resetStartValue: number;\n resetEndValue: number;\n}) => ({\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartIcons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const [{ startValue, endValue }] = model.option.dataZoom;\n\n const range = endValue - startValue;\n const zoomStep = range / 10;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + zoomStep,\n endValue: endValue - zoomStep,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartIcons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const [{ startValue, endValue }] = model.option.dataZoom;\n\n const range = endValue - startValue;\n const zoomStep = range / 10;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - zoomStep,\n endValue: endValue + zoomStep,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartIcons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: resetStartValue,\n endValue: resetEndValue,\n });\n },\n },\n});\n"],"mappings":"AAEA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,OAAO,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IAC9BC,eAAe;IACfC;EAIF,CAAC,GAAAF,IAAA;EAAA,OAAM;IACLG,QAAQ,EAAE;MACRC,IAAI,EAAE,IAAI;MACVC,KAAK,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3BW,QAAQ,EAAEV;QACZ,CAAC,CAAC;MACJ;IACF;EACF,CAAC;AAAA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"getZoomControls.js","names":["_sharedOptions","require","getZoomControls","_ref","resetStartValue","resetEndValue","myZoomIn","show","title","icon","chartIcons","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","range","zoomStep","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon","exports"],"sources":["../../../src/chart/getZoomControls.ts"],"sourcesContent":["import type { EChartsType, Model } from 'echarts';\n\nimport { chartIcons } from './sharedOptions';\n\nexport const getZoomControls = ({\n resetStartValue,\n resetEndValue,\n}: {\n resetStartValue: number;\n resetEndValue: number;\n}) => ({\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartIcons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const [{ startValue, endValue }] = model.option.dataZoom;\n\n const range = endValue - startValue;\n const zoomStep = range / 10;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + zoomStep,\n endValue: endValue - zoomStep,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartIcons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const [{ startValue, endValue }] = model.option.dataZoom;\n\n const range = endValue - startValue;\n const zoomStep = range / 10;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - zoomStep,\n endValue: endValue + zoomStep,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartIcons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: resetStartValue,\n endValue: resetEndValue,\n });\n },\n },\n});\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEO,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IAC9BC,eAAe;IACfC;EAIF,CAAC,GAAAF,IAAA;EAAA,OAAM;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CAAC;UACtBC,IAAI,EAAE,UAAU;UAChBP,UAAU,EAAEX,eAAe;UAC3BY,QAAQ,EAAEX;QACZ,CAAC,CAAC;MACJ;IACF;EACF,CAAC;AAAA,CAAC;AAACsB,OAAA,CAAAzB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1,8 +1,83 @@
1
- export * from './BaseChart';
2
- export * from './formatters';
3
- export * from './getGridLines';
4
- export * from './getTheme';
5
- export * from './getZoomControls';
6
- export * from './sharedOptions';
7
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _BaseChart = require("./BaseChart");
7
+ Object.keys(_BaseChart).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _BaseChart[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _BaseChart[key];
14
+ }
15
+ });
16
+ });
17
+ var _formatters = require("./formatters");
18
+ Object.keys(_formatters).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _formatters[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _formatters[key];
25
+ }
26
+ });
27
+ });
28
+ var _getGridLines = require("./getGridLines");
29
+ Object.keys(_getGridLines).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _getGridLines[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _getGridLines[key];
36
+ }
37
+ });
38
+ });
39
+ var _getTheme = require("./getTheme");
40
+ Object.keys(_getTheme).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _getTheme[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _getTheme[key];
47
+ }
48
+ });
49
+ });
50
+ var _getZoomControls = require("./getZoomControls");
51
+ Object.keys(_getZoomControls).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _getZoomControls[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _getZoomControls[key];
58
+ }
59
+ });
60
+ });
61
+ var _sharedOptions = require("./sharedOptions");
62
+ Object.keys(_sharedOptions).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _sharedOptions[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _sharedOptions[key];
69
+ }
70
+ });
71
+ });
72
+ var _types = require("./types");
73
+ Object.keys(_types).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _types[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _types[key];
80
+ }
81
+ });
82
+ });
8
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/chart/index.ts"],"sourcesContent":["export * from './BaseChart';\nexport * from './formatters';\nexport * from './getGridLines';\nexport * from './getTheme';\nexport * from './getZoomControls';\nexport * from './sharedOptions';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,iBAAiB;AAC/B,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_BaseChart","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_formatters","_getGridLines","_getTheme","_getZoomControls","_sharedOptions","_types"],"sources":["../../../src/chart/index.ts"],"sourcesContent":["export * from './BaseChart';\nexport * from './formatters';\nexport * from './getGridLines';\nexport * from './getTheme';\nexport * from './getZoomControls';\nexport * from './sharedOptions';\nexport * from './types';\n"],"mappings":";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