@oanda/labs-widget-common 1.0.252 → 1.0.254

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 +774 -62520
  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,28 @@
1
- export * from './LabelWrapper';
2
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _LabelWrapper = require("./LabelWrapper");
7
+ Object.keys(_LabelWrapper).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _LabelWrapper[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _LabelWrapper[key];
14
+ }
15
+ });
16
+ });
17
+ var _types = require("./types");
18
+ Object.keys(_types).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
3
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/LabelWrapper/index.ts"],"sourcesContent":["export * from './LabelWrapper';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_LabelWrapper","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/LabelWrapper/index.ts"],"sourcesContent":["export * from './LabelWrapper';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,4 +1,10 @@
1
- export let LabelSize = function (LabelSize) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LabelSize = void 0;
7
+ let LabelSize = exports.LabelSize = function (LabelSize) {
2
8
  LabelSize["sm"] = "sm";
3
9
  LabelSize["md"] = "md";
4
10
  LabelSize["lg"] = "lg";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["LabelSize"],"sources":["../../../../src/components/LabelWrapper/types.ts"],"sourcesContent":["import type { LoaderSize } from '../Loader';\n\nexport interface LabelWrapperProps {\n children: React.ReactNode;\n isLoading?: boolean;\n isError?: boolean;\n loaderSize?: LoaderSize;\n withoutLoader?: boolean;\n size?: LabelSize;\n}\n\nexport enum LabelSize {\n sm = 'sm',\n md = 'md',\n lg = 'lg',\n}\n"],"mappings":"AAWA,WAAYA,SAAS,aAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["LabelSize","exports"],"sources":["../../../../src/components/LabelWrapper/types.ts"],"sourcesContent":["import type { LoaderSize } from '../Loader';\n\nexport interface LabelWrapperProps {\n children: React.ReactNode;\n isLoading?: boolean;\n isError?: boolean;\n loaderSize?: LoaderSize;\n withoutLoader?: boolean;\n size?: LabelSize;\n}\n\nexport enum LabelSize {\n sm = 'sm',\n md = 'md',\n lg = 'lg',\n}\n"],"mappings":";;;;;;IAWYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,aAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA","ignoreList":[]}
@@ -1,15 +1,22 @@
1
- import React from 'react';
2
- import { EMPTY_VALUE } from '../../constants';
3
- import { formatUpdatedTimestamp } from '../../utils';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LastUpdated = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _constants = require("../../constants");
9
+ var _utils = require("../../utils");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
4
11
  const LastUpdated = _ref => {
5
12
  let {
6
13
  timestamp,
7
14
  labelCallback
8
15
  } = _ref;
9
- return React.createElement("span", {
16
+ return _react.default.createElement("span", {
10
17
  className: "lw-ml-1 lw-font-sans lw-text-xs lw-font-bold",
11
18
  "data-testid": "last-updated"
12
- }, `${labelCallback('last_updated')}: ${timestamp?.endsWith('Z') ? formatUpdatedTimestamp(timestamp, labelCallback('today')) : EMPTY_VALUE}`);
19
+ }, `${labelCallback('last_updated')}: ${timestamp?.endsWith('Z') ? (0, _utils.formatUpdatedTimestamp)(timestamp, labelCallback('today')) : _constants.EMPTY_VALUE}`);
13
20
  };
14
- export { LastUpdated };
21
+ exports.LastUpdated = LastUpdated;
15
22
  //# sourceMappingURL=LastUpdated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LastUpdated.js","names":["React","EMPTY_VALUE","formatUpdatedTimestamp","LastUpdated","_ref","timestamp","labelCallback","createElement","className","endsWith"],"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import React from 'react';\n\nimport { EMPTY_VALUE } from '../../constants';\nimport { formatUpdatedTimestamp } from '../../utils';\nimport type { LastUpdatedProps } from './types';\n\nconst LastUpdated = ({ timestamp, labelCallback }: LastUpdatedProps) => (\n <span\n className=\"lw-ml-1 lw-font-sans lw-text-xs lw-font-bold\"\n data-testid=\"last-updated\"\n >\n {`${labelCallback('last_updated')}: ${timestamp?.endsWith('Z') ? formatUpdatedTimestamp(timestamp, labelCallback('today')) : EMPTY_VALUE}`}\n </span>\n);\n\nexport { LastUpdated };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,sBAAsB,QAAQ,aAAa;AAGpD,MAAMC,WAAW,GAAGC,IAAA;EAAA,IAAC;IAAEC,SAAS;IAAEC;EAAgC,CAAC,GAAAF,IAAA;EAAA,OACjEJ,KAAA,CAAAO,aAAA;IACEC,SAAS,EAAC,8CAA8C;IACxD,eAAY;EAAc,GAEzB,GAAGF,aAAa,CAAC,cAAc,CAAC,KAAKD,SAAS,EAAEI,QAAQ,CAAC,GAAG,CAAC,GAAGP,sBAAsB,CAACG,SAAS,EAAEC,aAAa,CAAC,OAAO,CAAC,CAAC,GAAGL,WAAW,EACpI,CAAC;AAAA,CACR;AAED,SAASE,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"LastUpdated.js","names":["_react","_interopRequireDefault","require","_constants","_utils","e","__esModule","default","LastUpdated","_ref","timestamp","labelCallback","createElement","className","endsWith","formatUpdatedTimestamp","EMPTY_VALUE","exports"],"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import React from 'react';\n\nimport { EMPTY_VALUE } from '../../constants';\nimport { formatUpdatedTimestamp } from '../../utils';\nimport type { LastUpdatedProps } from './types';\n\nconst LastUpdated = ({ timestamp, labelCallback }: LastUpdatedProps) => (\n <span\n className=\"lw-ml-1 lw-font-sans lw-text-xs lw-font-bold\"\n data-testid=\"last-updated\"\n >\n {`${labelCallback('last_updated')}: ${timestamp?.endsWith('Z') ? formatUpdatedTimestamp(timestamp, labelCallback('today')) : EMPTY_VALUE}`}\n </span>\n);\n\nexport { LastUpdated };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAqD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGrD,MAAMG,WAAW,GAAGC,IAAA;EAAA,IAAC;IAAEC,SAAS;IAAEC;EAAgC,CAAC,GAAAF,IAAA;EAAA,OACjET,MAAA,CAAAO,OAAA,CAAAK,aAAA;IACEC,SAAS,EAAC,8CAA8C;IACxD,eAAY;EAAc,GAEzB,GAAGF,aAAa,CAAC,cAAc,CAAC,KAAKD,SAAS,EAAEI,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAAC,6BAAsB,EAACL,SAAS,EAAEC,aAAa,CAAC,OAAO,CAAC,CAAC,GAAGK,sBAAW,EACpI,CAAC;AAAA,CACR;AAACC,OAAA,CAAAT,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,3 +1,28 @@
1
- export * from './LastUpdated';
2
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _LastUpdated = require("./LastUpdated");
7
+ Object.keys(_LastUpdated).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _LastUpdated[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _LastUpdated[key];
14
+ }
15
+ });
16
+ });
17
+ var _types = require("./types");
18
+ Object.keys(_types).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
3
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/LastUpdated/index.ts"],"sourcesContent":["export * from './LastUpdated';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_LastUpdated","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/LastUpdated/index.ts"],"sourcesContent":["export * from './LastUpdated';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,6 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,14 @@
1
- import React from 'react';
2
- import { CELL_EMPTY_VALUE, CHART_DEFAULT_POINTS_NUMBER } from '../constant';
3
- import { LineChartSize } from './types';
4
- import { getSvgPath } from './utils';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LineChart = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _constant = require("../constant");
9
+ var _types = require("./types");
10
+ var _utils = require("./utils");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
5
12
  const sizes = {
6
13
  xs: {
7
14
  class: 'lw-h-[24px] lw-w-[100px]',
@@ -18,25 +25,25 @@ const LineChart = _ref => {
18
25
  let {
19
26
  data,
20
27
  color,
21
- size = LineChartSize.sm,
28
+ size = _types.LineChartSize.sm,
22
29
  padding = 8
23
30
  } = _ref;
24
- const svgPath = getSvgPath({
31
+ const svgPath = (0, _utils.getSvgPath)({
25
32
  data,
26
33
  width: sizes[size].width,
27
34
  height: sizes[size].height,
28
35
  padding
29
36
  });
30
- return React.createElement(React.Fragment, null, data.length < CHART_DEFAULT_POINTS_NUMBER && React.createElement("span", {
37
+ return _react.default.createElement(_react.default.Fragment, null, data.length < _constant.CHART_DEFAULT_POINTS_NUMBER && _react.default.createElement("span", {
31
38
  className: "lw-font-sans",
32
39
  "data-testid": "line-chart-empty-value"
33
- }, CELL_EMPTY_VALUE), data.length >= CHART_DEFAULT_POINTS_NUMBER && React.createElement("div", {
40
+ }, _constant.CELL_EMPTY_VALUE), data.length >= _constant.CHART_DEFAULT_POINTS_NUMBER && _react.default.createElement("div", {
34
41
  className: `${sizes[size].class}`,
35
42
  "data-testid": "line-chart"
36
- }, React.createElement("svg", {
43
+ }, _react.default.createElement("svg", {
37
44
  viewBox: `0 0 ${sizes[size].width} ${sizes[size].height}`,
38
45
  xmlns: "http://www.w3.org/2000/svg"
39
- }, React.createElement("path", {
46
+ }, _react.default.createElement("path", {
40
47
  d: svgPath,
41
48
  fill: "none",
42
49
  stroke: color,
@@ -44,5 +51,5 @@ const LineChart = _ref => {
44
51
  strokeWidth: 1
45
52
  }))));
46
53
  };
47
- export { LineChart };
54
+ exports.LineChart = LineChart;
48
55
  //# sourceMappingURL=LineChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.js","names":["React","CELL_EMPTY_VALUE","CHART_DEFAULT_POINTS_NUMBER","LineChartSize","getSvgPath","sizes","xs","class","width","height","sm","LineChart","_ref","data","color","size","padding","svgPath","createElement","Fragment","length","className","viewBox","xmlns","d","fill","stroke","strokeLinecap","strokeWidth"],"sources":["../../../../src/components/LineChart/LineChart.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CELL_EMPTY_VALUE, CHART_DEFAULT_POINTS_NUMBER } from '../constant';\nimport type { LineChartProps, SizeConfig } from './types';\nimport { LineChartSize } from './types';\nimport { getSvgPath } from './utils';\n\nconst sizes: { [key in LineChartSize]: SizeConfig } = {\n xs: {\n class: 'lw-h-[24px] lw-w-[100px]',\n width: 100,\n height: 24,\n },\n sm: {\n class: 'lw-h-[40px] lw-w-[100px]',\n width: 100,\n height: 40,\n },\n};\n\nconst LineChart = ({\n data,\n color,\n size = LineChartSize.sm,\n padding = 8,\n}: LineChartProps) => {\n const svgPath = getSvgPath({\n data,\n width: sizes[size].width,\n height: sizes[size].height,\n padding,\n });\n\n return (\n <>\n {data.length < CHART_DEFAULT_POINTS_NUMBER && (\n <span className=\"lw-font-sans\" data-testid=\"line-chart-empty-value\">\n {CELL_EMPTY_VALUE}\n </span>\n )}\n {data.length >= CHART_DEFAULT_POINTS_NUMBER && (\n <div className={`${sizes[size].class}`} data-testid=\"line-chart\">\n <svg\n viewBox={`0 0 ${sizes[size].width} ${sizes[size].height}`}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d={svgPath}\n fill=\"none\"\n stroke={color}\n strokeLinecap=\"round\"\n strokeWidth={1}\n />\n </svg>\n </div>\n )}\n </>\n );\n};\n\nexport { LineChart };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,gBAAgB,EAAEC,2BAA2B,QAAQ,aAAa;AAE3E,SAASC,aAAa,QAAQ,SAAS;AACvC,SAASC,UAAU,QAAQ,SAAS;AAEpC,MAAMC,KAA6C,GAAG;EACpDC,EAAE,EAAE;IACFC,KAAK,EAAE,0BAA0B;IACjCC,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV,CAAC;EACDC,EAAE,EAAE;IACFH,KAAK,EAAE,0BAA0B;IACjCC,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC;AAED,MAAME,SAAS,GAAGC,IAAA,IAKI;EAAA,IALH;IACjBC,IAAI;IACJC,KAAK;IACLC,IAAI,GAAGZ,aAAa,CAACO,EAAE;IACvBM,OAAO,GAAG;EACI,CAAC,GAAAJ,IAAA;EACf,MAAMK,OAAO,GAAGb,UAAU,CAAC;IACzBS,IAAI;IACJL,KAAK,EAAEH,KAAK,CAACU,IAAI,CAAC,CAACP,KAAK;IACxBC,MAAM,EAAEJ,KAAK,CAACU,IAAI,CAAC,CAACN,MAAM;IAC1BO;EACF,CAAC,CAAC;EAEF,OACEhB,KAAA,CAAAkB,aAAA,CAAAlB,KAAA,CAAAmB,QAAA,QACGN,IAAI,CAACO,MAAM,GAAGlB,2BAA2B,IACxCF,KAAA,CAAAkB,aAAA;IAAMG,SAAS,EAAC,cAAc;IAAC,eAAY;EAAwB,GAChEpB,gBACG,CACP,EACAY,IAAI,CAACO,MAAM,IAAIlB,2BAA2B,IACzCF,KAAA,CAAAkB,aAAA;IAAKG,SAAS,EAAE,GAAGhB,KAAK,CAACU,IAAI,CAAC,CAACR,KAAK,EAAG;IAAC,eAAY;EAAY,GAC9DP,KAAA,CAAAkB,aAAA;IACEI,OAAO,EAAE,OAAOjB,KAAK,CAACU,IAAI,CAAC,CAACP,KAAK,IAAIH,KAAK,CAACU,IAAI,CAAC,CAACN,MAAM,EAAG;IAC1Dc,KAAK,EAAC;EAA4B,GAElCvB,KAAA,CAAAkB,aAAA;IACEM,CAAC,EAAEP,OAAQ;IACXQ,IAAI,EAAC,MAAM;IACXC,MAAM,EAAEZ,KAAM;IACda,aAAa,EAAC,OAAO;IACrBC,WAAW,EAAE;EAAE,CAChB,CACE,CACF,CAEP,CAAC;AAEP,CAAC;AAED,SAASjB,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"LineChart.js","names":["_react","_interopRequireDefault","require","_constant","_types","_utils","e","__esModule","default","sizes","xs","class","width","height","sm","LineChart","_ref","data","color","size","LineChartSize","padding","svgPath","getSvgPath","createElement","Fragment","length","CHART_DEFAULT_POINTS_NUMBER","className","CELL_EMPTY_VALUE","viewBox","xmlns","d","fill","stroke","strokeLinecap","strokeWidth","exports"],"sources":["../../../../src/components/LineChart/LineChart.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CELL_EMPTY_VALUE, CHART_DEFAULT_POINTS_NUMBER } from '../constant';\nimport type { LineChartProps, SizeConfig } from './types';\nimport { LineChartSize } from './types';\nimport { getSvgPath } from './utils';\n\nconst sizes: { [key in LineChartSize]: SizeConfig } = {\n xs: {\n class: 'lw-h-[24px] lw-w-[100px]',\n width: 100,\n height: 24,\n },\n sm: {\n class: 'lw-h-[40px] lw-w-[100px]',\n width: 100,\n height: 40,\n },\n};\n\nconst LineChart = ({\n data,\n color,\n size = LineChartSize.sm,\n padding = 8,\n}: LineChartProps) => {\n const svgPath = getSvgPath({\n data,\n width: sizes[size].width,\n height: sizes[size].height,\n padding,\n });\n\n return (\n <>\n {data.length < CHART_DEFAULT_POINTS_NUMBER && (\n <span className=\"lw-font-sans\" data-testid=\"line-chart-empty-value\">\n {CELL_EMPTY_VALUE}\n </span>\n )}\n {data.length >= CHART_DEFAULT_POINTS_NUMBER && (\n <div className={`${sizes[size].class}`} data-testid=\"line-chart\">\n <svg\n viewBox={`0 0 ${sizes[size].width} ${sizes[size].height}`}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d={svgPath}\n fill=\"none\"\n stroke={color}\n strokeLinecap=\"round\"\n strokeWidth={1}\n />\n </svg>\n </div>\n )}\n </>\n );\n};\n\nexport { LineChart };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAqC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErC,MAAMG,KAA6C,GAAG;EACpDC,EAAE,EAAE;IACFC,KAAK,EAAE,0BAA0B;IACjCC,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV,CAAC;EACDC,EAAE,EAAE;IACFH,KAAK,EAAE,0BAA0B;IACjCC,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC;AAED,MAAME,SAAS,GAAGC,IAAA,IAKI;EAAA,IALH;IACjBC,IAAI;IACJC,KAAK;IACLC,IAAI,GAAGC,oBAAa,CAACN,EAAE;IACvBO,OAAO,GAAG;EACI,CAAC,GAAAL,IAAA;EACf,MAAMM,OAAO,GAAG,IAAAC,iBAAU,EAAC;IACzBN,IAAI;IACJL,KAAK,EAAEH,KAAK,CAACU,IAAI,CAAC,CAACP,KAAK;IACxBC,MAAM,EAAEJ,KAAK,CAACU,IAAI,CAAC,CAACN,MAAM;IAC1BQ;EACF,CAAC,CAAC;EAEF,OACErB,MAAA,CAAAQ,OAAA,CAAAgB,aAAA,CAAAxB,MAAA,CAAAQ,OAAA,CAAAiB,QAAA,QACGR,IAAI,CAACS,MAAM,GAAGC,qCAA2B,IACxC3B,MAAA,CAAAQ,OAAA,CAAAgB,aAAA;IAAMI,SAAS,EAAC,cAAc;IAAC,eAAY;EAAwB,GAChEC,0BACG,CACP,EACAZ,IAAI,CAACS,MAAM,IAAIC,qCAA2B,IACzC3B,MAAA,CAAAQ,OAAA,CAAAgB,aAAA;IAAKI,SAAS,EAAE,GAAGnB,KAAK,CAACU,IAAI,CAAC,CAACR,KAAK,EAAG;IAAC,eAAY;EAAY,GAC9DX,MAAA,CAAAQ,OAAA,CAAAgB,aAAA;IACEM,OAAO,EAAE,OAAOrB,KAAK,CAACU,IAAI,CAAC,CAACP,KAAK,IAAIH,KAAK,CAACU,IAAI,CAAC,CAACN,MAAM,EAAG;IAC1DkB,KAAK,EAAC;EAA4B,GAElC/B,MAAA,CAAAQ,OAAA,CAAAgB,aAAA;IACEQ,CAAC,EAAEV,OAAQ;IACXW,IAAI,EAAC,MAAM;IACXC,MAAM,EAAEhB,KAAM;IACdiB,aAAa,EAAC,OAAO;IACrBC,WAAW,EAAE;EAAE,CAChB,CACE,CACF,CAEP,CAAC;AAEP,CAAC;AAACC,OAAA,CAAAtB,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -1,6 +1,13 @@
1
- import { useReadQuery } from '@apollo/client';
2
- import React from 'react';
3
- import { LineChart } from './LineChart';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LineChartWithData = LineChartWithData;
7
+ var _client = require("@apollo/client");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _LineChart = require("./LineChart");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
4
11
  function LineChartWithData(_ref) {
5
12
  let {
6
13
  color,
@@ -8,16 +15,15 @@ function LineChartWithData(_ref) {
8
15
  } = _ref;
9
16
  const {
10
17
  data
11
- } = useReadQuery(queryRef);
18
+ } = (0, _client.useReadQuery)(queryRef);
12
19
  const chartData = data[Object.keys(data)[0]];
13
- return React.createElement("div", {
20
+ return _react.default.createElement("div", {
14
21
  className: "lw-relative"
15
- }, React.createElement("div", {
22
+ }, _react.default.createElement("div", {
16
23
  className: "lw-absolute lw-bottom-0 lw-right-0 lw--z-50 lw-flex lw-h-10 lw-w-[100px] lw-items-center lw-justify-center"
17
- }, React.createElement(LineChart, {
24
+ }, _react.default.createElement(_LineChart.LineChart, {
18
25
  color: color,
19
26
  data: chartData[0].chart
20
27
  })));
21
28
  }
22
- export { LineChartWithData };
23
29
  //# sourceMappingURL=LineChartWithData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChartWithData.js","names":["useReadQuery","React","LineChart","LineChartWithData","_ref","color","queryRef","data","chartData","Object","keys","createElement","className","chart"],"sources":["../../../../src/components/LineChart/LineChartWithData.tsx"],"sourcesContent":["import { useReadQuery } from '@apollo/client';\nimport React from 'react';\n\nimport { LineChart } from './LineChart';\nimport type { LineChartWithDataProps } from './types';\n\nfunction LineChartWithData<T>({ color, queryRef }: LineChartWithDataProps<T>) {\n const { data } = useReadQuery(queryRef!);\n\n const chartData = data[Object.keys(data!)[0] as keyof T] as Record<\n string,\n number[]\n >[];\n\n return (\n <div className=\"lw-relative\">\n <div className=\"lw-absolute lw-bottom-0 lw-right-0 lw--z-50 lw-flex lw-h-10 lw-w-[100px] lw-items-center lw-justify-center\">\n <LineChart color={color} data={chartData[0].chart} />\n </div>\n </div>\n );\n}\n\nexport { LineChartWithData };\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,SAAS,QAAQ,aAAa;AAGvC,SAASC,iBAAiBA,CAAAC,IAAA,EAAoD;EAAA,IAAhD;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAC1E,MAAM;IAAEG;EAAK,CAAC,GAAGP,YAAY,CAACM,QAAS,CAAC;EAExC,MAAME,SAAS,GAAGD,IAAI,CAACE,MAAM,CAACC,IAAI,CAACH,IAAK,CAAC,CAAC,CAAC,CAAC,CAGzC;EAEH,OACEN,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAAa,GAC1BX,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAA4G,GACzHX,KAAA,CAAAU,aAAA,CAACT,SAAS;IAACG,KAAK,EAAEA,KAAM;IAACE,IAAI,EAAEC,SAAS,CAAC,CAAC,CAAC,CAACK;EAAM,CAAE,CACjD,CACF,CAAC;AAEV;AAEA,SAASV,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"LineChartWithData.js","names":["_client","require","_react","_interopRequireDefault","_LineChart","e","__esModule","default","LineChartWithData","_ref","color","queryRef","data","useReadQuery","chartData","Object","keys","createElement","className","LineChart","chart"],"sources":["../../../../src/components/LineChart/LineChartWithData.tsx"],"sourcesContent":["import { useReadQuery } from '@apollo/client';\nimport React from 'react';\n\nimport { LineChart } from './LineChart';\nimport type { LineChartWithDataProps } from './types';\n\nfunction LineChartWithData<T>({ color, queryRef }: LineChartWithDataProps<T>) {\n const { data } = useReadQuery(queryRef!);\n\n const chartData = data[Object.keys(data!)[0] as keyof T] as Record<\n string,\n number[]\n >[];\n\n return (\n <div className=\"lw-relative\">\n <div className=\"lw-absolute lw-bottom-0 lw-right-0 lw--z-50 lw-flex lw-h-10 lw-w-[100px] lw-items-center lw-justify-center\">\n <LineChart color={color} data={chartData[0].chart} />\n </div>\n </div>\n );\n}\n\nexport { LineChartWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAAwC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGxC,SAASG,iBAAiBA,CAAAC,IAAA,EAAoD;EAAA,IAAhD;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAC1E,MAAM;IAAEG;EAAK,CAAC,GAAG,IAAAC,oBAAY,EAACF,QAAS,CAAC;EAExC,MAAMG,SAAS,GAAGF,IAAI,CAACG,MAAM,CAACC,IAAI,CAACJ,IAAK,CAAC,CAAC,CAAC,CAAC,CAGzC;EAEH,OACEV,MAAA,CAAAK,OAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAAa,GAC1BhB,MAAA,CAAAK,OAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAA4G,GACzHhB,MAAA,CAAAK,OAAA,CAAAU,aAAA,CAACb,UAAA,CAAAe,SAAS;IAACT,KAAK,EAAEA,KAAM;IAACE,IAAI,EAAEE,SAAS,CAAC,CAAC,CAAC,CAACM;EAAM,CAAE,CACjD,CACF,CAAC;AAEV","ignoreList":[]}
@@ -1,5 +1,50 @@
1
- export * from './LineChart';
2
- export * from './LineChartWithData';
3
- export * from './types';
4
- export * from './utils';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _LineChart = require("./LineChart");
7
+ Object.keys(_LineChart).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _LineChart[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _LineChart[key];
14
+ }
15
+ });
16
+ });
17
+ var _LineChartWithData = require("./LineChartWithData");
18
+ Object.keys(_LineChartWithData).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _LineChartWithData[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _LineChartWithData[key];
25
+ }
26
+ });
27
+ });
28
+ var _types = require("./types");
29
+ Object.keys(_types).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _types[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _types[key];
36
+ }
37
+ });
38
+ });
39
+ var _utils = require("./utils");
40
+ Object.keys(_utils).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _utils[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _utils[key];
47
+ }
48
+ });
49
+ });
5
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/LineChart/index.ts"],"sourcesContent":["export * from './LineChart';\nexport * from './LineChartWithData';\nexport * from './types';\nexport * from './utils';\n"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,SAAS;AACvB,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_LineChart","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_LineChartWithData","_types","_utils"],"sources":["../../../../src/components/LineChart/index.ts"],"sourcesContent":["export * from './LineChart';\nexport * from './LineChartWithData';\nexport * from './types';\nexport * from './utils';\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,kBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,kBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,kBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,kBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,MAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,MAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,MAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,MAAA,CAAAP,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,4 +1,10 @@
1
- export let LineChartSize = function (LineChartSize) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LineChartSize = void 0;
7
+ let LineChartSize = exports.LineChartSize = function (LineChartSize) {
2
8
  LineChartSize["xs"] = "xs";
3
9
  LineChartSize["sm"] = "sm";
4
10
  return LineChartSize;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["LineChartSize"],"sources":["../../../../src/components/LineChart/types.tsx"],"sourcesContent":["import type { QueryRef } from '@apollo/client';\n\nexport interface LineChartWithDataProps<T> {\n color: string;\n queryRef?: QueryRef<T>;\n}\n\nexport interface LineChartProps {\n data: number[];\n color: string;\n size?: LineChartSize;\n padding?: number;\n disableLoader?: boolean;\n}\n\nexport enum LineChartSize {\n xs = 'xs',\n sm = 'sm',\n}\n\nexport interface SizeConfig {\n class: string;\n width: number;\n height: number;\n}\n"],"mappings":"AAeA,WAAYA,aAAa,aAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["LineChartSize","exports"],"sources":["../../../../src/components/LineChart/types.tsx"],"sourcesContent":["import type { QueryRef } from '@apollo/client';\n\nexport interface LineChartWithDataProps<T> {\n color: string;\n queryRef?: QueryRef<T>;\n}\n\nexport interface LineChartProps {\n data: number[];\n color: string;\n size?: LineChartSize;\n padding?: number;\n disableLoader?: boolean;\n}\n\nexport enum LineChartSize {\n xs = 'xs',\n sm = 'sm',\n}\n\nexport interface SizeConfig {\n class: string;\n width: number;\n height: number;\n}\n"],"mappings":";;;;;;IAeYA,aAAa,GAAAC,OAAA,CAAAD,aAAA,aAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
@@ -1,6 +1,12 @@
1
- import { themeColors } from '../../tailwind';
2
- import { Theme } from '../../types';
3
- export const getSvgPath = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSvgPath = exports.getChartColor = void 0;
7
+ var _tailwind = require("../../tailwind");
8
+ var _types = require("../../types");
9
+ const getSvgPath = _ref => {
4
10
  let {
5
11
  data,
6
12
  width,
@@ -20,15 +26,17 @@ export const getSvgPath = _ref => {
20
26
  return index ? `${x} ${y}` : `M${x} ${y}`;
21
27
  }).join(' ');
22
28
  };
23
- export const getChartColor = (dailyChange, isDarkMode) => {
24
- const theme = isDarkMode ? Theme.Dark : Theme.Light;
29
+ exports.getSvgPath = getSvgPath;
30
+ const getChartColor = (dailyChange, isDarkMode) => {
31
+ const theme = isDarkMode ? _types.Theme.Dark : _types.Theme.Light;
25
32
  switch (dailyChange?.charAt(0)) {
26
33
  case '+':
27
- return themeColors.ok[theme];
34
+ return _tailwind.themeColors.ok[theme];
28
35
  case '-':
29
- return themeColors.danger[theme];
36
+ return _tailwind.themeColors.danger[theme];
30
37
  default:
31
- return themeColors.borderDisabled[theme];
38
+ return _tailwind.themeColors.borderDisabled[theme];
32
39
  }
33
40
  };
41
+ exports.getChartColor = getChartColor;
34
42
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["themeColors","Theme","getSvgPath","_ref","data","width","height","padding","min","Math","max","usableHeight","usableWidth","length","map","item","index","x","y","join","getChartColor","dailyChange","isDarkMode","theme","Dark","Light","charAt","ok","danger","borderDisabled"],"sources":["../../../../src/components/LineChart/utils.tsx"],"sourcesContent":["import { themeColors } from '../../tailwind';\nimport { Theme } from '../../types';\n\nexport const getSvgPath = ({\n data,\n width,\n height,\n padding,\n}: {\n data: number[];\n width: number;\n height: number;\n padding: number;\n}) => {\n const min = Math.min(...data);\n const max = Math.max(...data);\n const usableHeight = height - padding * 2;\n const usableWidth = width - padding * 2;\n const { length } = data;\n\n return data\n .map((item, index) => {\n const x = usableWidth * (index / (length - 1)) + padding;\n const y =\n min === max\n ? usableHeight / 2\n : usableHeight -\n usableHeight * ((item - min) / (max - min)) +\n padding;\n\n return index ? `${x} ${y}` : `M${x} ${y}`;\n })\n .join(' ');\n};\n\nexport const getChartColor = (dailyChange?: string, isDarkMode?: boolean) => {\n const theme = isDarkMode ? Theme.Dark : Theme.Light;\n\n switch (dailyChange?.charAt(0)) {\n case '+':\n return themeColors.ok[theme];\n case '-':\n return themeColors.danger[theme];\n default:\n return themeColors.borderDisabled[theme];\n }\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,KAAK,QAAQ,aAAa;AAEnC,OAAO,MAAMC,UAAU,GAAGC,IAAA,IAUpB;EAAA,IAVqB;IACzBC,IAAI;IACJC,KAAK;IACLC,MAAM;IACNC;EAMF,CAAC,GAAAJ,IAAA;EACC,MAAMK,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,GAAGJ,IAAI,CAAC;EAC7B,MAAMM,GAAG,GAAGD,IAAI,CAACC,GAAG,CAAC,GAAGN,IAAI,CAAC;EAC7B,MAAMO,YAAY,GAAGL,MAAM,GAAGC,OAAO,GAAG,CAAC;EACzC,MAAMK,WAAW,GAAGP,KAAK,GAAGE,OAAO,GAAG,CAAC;EACvC,MAAM;IAAEM;EAAO,CAAC,GAAGT,IAAI;EAEvB,OAAOA,IAAI,CACRU,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IACpB,MAAMC,CAAC,GAAGL,WAAW,IAAII,KAAK,IAAIH,MAAM,GAAG,CAAC,CAAC,CAAC,GAAGN,OAAO;IACxD,MAAMW,CAAC,GACLV,GAAG,KAAKE,GAAG,GACPC,YAAY,GAAG,CAAC,GAChBA,YAAY,GACZA,YAAY,IAAI,CAACI,IAAI,GAAGP,GAAG,KAAKE,GAAG,GAAGF,GAAG,CAAC,CAAC,GAC3CD,OAAO;IAEb,OAAOS,KAAK,GAAG,GAAGC,CAAC,IAAIC,CAAC,EAAE,GAAG,IAAID,CAAC,IAAIC,CAAC,EAAE;EAC3C,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;AACd,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGA,CAACC,WAAoB,EAAEC,UAAoB,KAAK;EAC3E,MAAMC,KAAK,GAAGD,UAAU,GAAGrB,KAAK,CAACuB,IAAI,GAAGvB,KAAK,CAACwB,KAAK;EAEnD,QAAQJ,WAAW,EAAEK,MAAM,CAAC,CAAC,CAAC;IAC5B,KAAK,GAAG;MACN,OAAO1B,WAAW,CAAC2B,EAAE,CAACJ,KAAK,CAAC;IAC9B,KAAK,GAAG;MACN,OAAOvB,WAAW,CAAC4B,MAAM,CAACL,KAAK,CAAC;IAClC;MACE,OAAOvB,WAAW,CAAC6B,cAAc,CAACN,KAAK,CAAC;EAC5C;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["_tailwind","require","_types","getSvgPath","_ref","data","width","height","padding","min","Math","max","usableHeight","usableWidth","length","map","item","index","x","y","join","exports","getChartColor","dailyChange","isDarkMode","theme","Theme","Dark","Light","charAt","themeColors","ok","danger","borderDisabled"],"sources":["../../../../src/components/LineChart/utils.tsx"],"sourcesContent":["import { themeColors } from '../../tailwind';\nimport { Theme } from '../../types';\n\nexport const getSvgPath = ({\n data,\n width,\n height,\n padding,\n}: {\n data: number[];\n width: number;\n height: number;\n padding: number;\n}) => {\n const min = Math.min(...data);\n const max = Math.max(...data);\n const usableHeight = height - padding * 2;\n const usableWidth = width - padding * 2;\n const { length } = data;\n\n return data\n .map((item, index) => {\n const x = usableWidth * (index / (length - 1)) + padding;\n const y =\n min === max\n ? usableHeight / 2\n : usableHeight -\n usableHeight * ((item - min) / (max - min)) +\n padding;\n\n return index ? `${x} ${y}` : `M${x} ${y}`;\n })\n .join(' ');\n};\n\nexport const getChartColor = (dailyChange?: string, isDarkMode?: boolean) => {\n const theme = isDarkMode ? Theme.Dark : Theme.Light;\n\n switch (dailyChange?.charAt(0)) {\n case '+':\n return themeColors.ok[theme];\n case '-':\n return themeColors.danger[theme];\n default:\n return themeColors.borderDisabled[theme];\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,UAAU,GAAGC,IAAA,IAUpB;EAAA,IAVqB;IACzBC,IAAI;IACJC,KAAK;IACLC,MAAM;IACNC;EAMF,CAAC,GAAAJ,IAAA;EACC,MAAMK,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,GAAGJ,IAAI,CAAC;EAC7B,MAAMM,GAAG,GAAGD,IAAI,CAACC,GAAG,CAAC,GAAGN,IAAI,CAAC;EAC7B,MAAMO,YAAY,GAAGL,MAAM,GAAGC,OAAO,GAAG,CAAC;EACzC,MAAMK,WAAW,GAAGP,KAAK,GAAGE,OAAO,GAAG,CAAC;EACvC,MAAM;IAAEM;EAAO,CAAC,GAAGT,IAAI;EAEvB,OAAOA,IAAI,CACRU,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IACpB,MAAMC,CAAC,GAAGL,WAAW,IAAII,KAAK,IAAIH,MAAM,GAAG,CAAC,CAAC,CAAC,GAAGN,OAAO;IACxD,MAAMW,CAAC,GACLV,GAAG,KAAKE,GAAG,GACPC,YAAY,GAAG,CAAC,GAChBA,YAAY,GACZA,YAAY,IAAI,CAACI,IAAI,GAAGP,GAAG,KAAKE,GAAG,GAAGF,GAAG,CAAC,CAAC,GAC3CD,OAAO;IAEb,OAAOS,KAAK,GAAG,GAAGC,CAAC,IAAIC,CAAC,EAAE,GAAG,IAAID,CAAC,IAAIC,CAAC,EAAE;EAC3C,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;AACd,CAAC;AAACC,OAAA,CAAAlB,UAAA,GAAAA,UAAA;AAEK,MAAMmB,aAAa,GAAGA,CAACC,WAAoB,EAAEC,UAAoB,KAAK;EAC3E,MAAMC,KAAK,GAAGD,UAAU,GAAGE,YAAK,CAACC,IAAI,GAAGD,YAAK,CAACE,KAAK;EAEnD,QAAQL,WAAW,EAAEM,MAAM,CAAC,CAAC,CAAC;IAC5B,KAAK,GAAG;MACN,OAAOC,qBAAW,CAACC,EAAE,CAACN,KAAK,CAAC;IAC9B,KAAK,GAAG;MACN,OAAOK,qBAAW,CAACE,MAAM,CAACP,KAAK,CAAC;IAClC;MACE,OAAOK,qBAAW,CAACG,cAAc,CAACR,KAAK,CAAC;EAC5C;AACF,CAAC;AAACJ,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -1,21 +1,28 @@
1
- import classnames from 'classnames';
2
- import React from 'react';
3
- import { LoaderSize } from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Loader = void 0;
7
+ var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _types = require("./types");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
4
11
  const Loader = _ref => {
5
12
  let {
6
13
  size
7
14
  } = _ref;
8
- return React.createElement("div", {
9
- className: classnames('lw-overflow-hidden lw-rounded-sm lw-bg-border-primary lw-text-sm', {
10
- 'lw-h-[14px] lw-w-[40px]': size === LoaderSize.sm,
11
- 'lw-h-[16px] lw-w-[60px]': size === LoaderSize.md,
12
- 'lw-h-[20px] lw-w-[100px]': size === LoaderSize.lg,
13
- 'lw-h-full lw-w-full': size === LoaderSize.full
15
+ return _react.default.createElement("div", {
16
+ className: (0, _classnames.default)('lw-overflow-hidden lw-rounded-sm lw-bg-border-primary lw-text-sm', {
17
+ 'lw-h-[14px] lw-w-[40px]': size === _types.LoaderSize.sm,
18
+ 'lw-h-[16px] lw-w-[60px]': size === _types.LoaderSize.md,
19
+ 'lw-h-[20px] lw-w-[100px]': size === _types.LoaderSize.lg,
20
+ 'lw-h-full lw-w-full': size === _types.LoaderSize.full
14
21
  }),
15
22
  "data-testid": "loader"
16
- }, React.createElement("div", {
23
+ }, _react.default.createElement("div", {
17
24
  className: "lw-h-full lw-w-full lw-animate-[loader_1s_linear_infinite] lw-rounded-sm lw-bg-loader"
18
25
  }));
19
26
  };
20
- export { Loader };
27
+ exports.Loader = Loader;
21
28
  //# sourceMappingURL=Loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.js","names":["classnames","React","LoaderSize","Loader","_ref","size","createElement","className","sm","md","lg","full"],"sources":["../../../../src/components/Loader/Loader.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport React from 'react';\n\nimport type { LoaderProps } from './types';\nimport { LoaderSize } from './types';\n\nconst Loader = ({ size }: LoaderProps) => (\n <div\n className={classnames(\n 'lw-overflow-hidden lw-rounded-sm lw-bg-border-primary lw-text-sm',\n {\n 'lw-h-[14px] lw-w-[40px]': size === LoaderSize.sm,\n 'lw-h-[16px] lw-w-[60px]': size === LoaderSize.md,\n 'lw-h-[20px] lw-w-[100px]': size === LoaderSize.lg,\n 'lw-h-full lw-w-full': size === LoaderSize.full,\n }\n )}\n data-testid=\"loader\"\n >\n <div className=\"lw-h-full lw-w-full lw-animate-[loader_1s_linear_infinite] lw-rounded-sm lw-bg-loader\" />\n </div>\n);\n\nexport { Loader };\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAGzB,SAASC,UAAU,QAAQ,SAAS;AAEpC,MAAMC,MAAM,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAkB,CAAC,GAAAD,IAAA;EAAA,OACnCH,KAAA,CAAAK,aAAA;IACEC,SAAS,EAAEP,UAAU,CACnB,kEAAkE,EAClE;MACE,yBAAyB,EAAEK,IAAI,KAAKH,UAAU,CAACM,EAAE;MACjD,yBAAyB,EAAEH,IAAI,KAAKH,UAAU,CAACO,EAAE;MACjD,0BAA0B,EAAEJ,IAAI,KAAKH,UAAU,CAACQ,EAAE;MAClD,qBAAqB,EAAEL,IAAI,KAAKH,UAAU,CAACS;IAC7C,CACF,CAAE;IACF,eAAY;EAAQ,GAEpBV,KAAA,CAAAK,aAAA;IAAKC,SAAS,EAAC;EAAuF,CAAE,CACrG,CAAC;AAAA,CACP;AAED,SAASJ,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Loader.js","names":["_classnames","_interopRequireDefault","require","_react","_types","e","__esModule","default","Loader","_ref","size","createElement","className","classnames","LoaderSize","sm","md","lg","full","exports"],"sources":["../../../../src/components/Loader/Loader.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport React from 'react';\n\nimport type { LoaderProps } from './types';\nimport { LoaderSize } from './types';\n\nconst Loader = ({ size }: LoaderProps) => (\n <div\n className={classnames(\n 'lw-overflow-hidden lw-rounded-sm lw-bg-border-primary lw-text-sm',\n {\n 'lw-h-[14px] lw-w-[40px]': size === LoaderSize.sm,\n 'lw-h-[16px] lw-w-[60px]': size === LoaderSize.md,\n 'lw-h-[20px] lw-w-[100px]': size === LoaderSize.lg,\n 'lw-h-full lw-w-full': size === LoaderSize.full,\n }\n )}\n data-testid=\"loader\"\n >\n <div className=\"lw-h-full lw-w-full lw-animate-[loader_1s_linear_infinite] lw-rounded-sm lw-bg-loader\" />\n </div>\n);\n\nexport { Loader };\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAAqC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErC,MAAMG,MAAM,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAkB,CAAC,GAAAD,IAAA;EAAA,OACnCN,MAAA,CAAAI,OAAA,CAAAI,aAAA;IACEC,SAAS,EAAE,IAAAC,mBAAU,EACnB,kEAAkE,EAClE;MACE,yBAAyB,EAAEH,IAAI,KAAKI,iBAAU,CAACC,EAAE;MACjD,yBAAyB,EAAEL,IAAI,KAAKI,iBAAU,CAACE,EAAE;MACjD,0BAA0B,EAAEN,IAAI,KAAKI,iBAAU,CAACG,EAAE;MAClD,qBAAqB,EAAEP,IAAI,KAAKI,iBAAU,CAACI;IAC7C,CACF,CAAE;IACF,eAAY;EAAQ,GAEpBf,MAAA,CAAAI,OAAA,CAAAI,aAAA;IAAKC,SAAS,EAAC;EAAuF,CAAE,CACrG,CAAC;AAAA,CACP;AAACO,OAAA,CAAAX,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -1,3 +1,28 @@
1
- export * from './Loader';
2
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Loader = require("./Loader");
7
+ Object.keys(_Loader).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Loader[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Loader[key];
14
+ }
15
+ });
16
+ });
17
+ var _types = require("./types");
18
+ Object.keys(_types).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
3
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Loader/index.ts"],"sourcesContent":["export * from './Loader';\nexport * from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Loader","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/Loader/index.ts"],"sourcesContent":["export * from './Loader';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,4 +1,10 @@
1
- export let LoaderSize = function (LoaderSize) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LoaderSize = void 0;
7
+ let LoaderSize = exports.LoaderSize = function (LoaderSize) {
2
8
  LoaderSize["sm"] = "sm";
3
9
  LoaderSize["md"] = "md";
4
10
  LoaderSize["lg"] = "lg";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["LoaderSize"],"sources":["../../../../src/components/Loader/types.ts"],"sourcesContent":["export interface LoaderProps {\n size: LoaderSize;\n}\n\nexport enum LoaderSize {\n sm = 'sm',\n md = 'md',\n lg = 'lg',\n full = 'full',\n}\n"],"mappings":"AAIA,WAAYA,UAAU,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["LoaderSize","exports"],"sources":["../../../../src/components/Loader/types.ts"],"sourcesContent":["export interface LoaderProps {\n size: LoaderSize;\n}\n\nexport enum LoaderSize {\n sm = 'sm',\n md = 'md',\n lg = 'lg',\n full = 'full',\n}\n"],"mappings":";;;;;;IAIYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}