@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 +1 @@
1
- {"version":3,"file":"background.js","names":["colorPalette","backgroundColors","bgPrimary","light","white","dark","black","bgTransparent50","white50","black50","bgSecondary","bgOk","bottleGreenDark","bgDanger","orange"],"sources":["../../../../src/tailwind/themes/background.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const backgroundColors = {\n bgPrimary: {\n light: colorPalette.white,\n dark: colorPalette.black,\n },\n bgTransparent50: {\n light: colorPalette.white50,\n dark: colorPalette.black50,\n },\n bgSecondary: {\n light: '#F4F8FA',\n dark: '#1C1C1C',\n },\n bgOk: {\n light: '#70D2AF',\n dark: colorPalette.bottleGreenDark,\n },\n bgDanger: {\n light: '#FE4084',\n dark: colorPalette.orange,\n },\n} as const;\n\nexport type BackgroundColorKeys = KeysOf<typeof backgroundColors>;\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,WAAW;AAExC,OAAO,MAAMC,gBAAgB,GAAG;EAC9BC,SAAS,EAAE;IACTC,KAAK,EAAEH,YAAY,CAACI,KAAK;IACzBC,IAAI,EAAEL,YAAY,CAACM;EACrB,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAEH,YAAY,CAACQ,OAAO;IAC3BH,IAAI,EAAEL,YAAY,CAACS;EACrB,CAAC;EACDC,WAAW,EAAE;IACXP,KAAK,EAAE,SAAS;IAChBE,IAAI,EAAE;EACR,CAAC;EACDM,IAAI,EAAE;IACJR,KAAK,EAAE,SAAS;IAChBE,IAAI,EAAEL,YAAY,CAACY;EACrB,CAAC;EACDC,QAAQ,EAAE;IACRV,KAAK,EAAE,SAAS;IAChBE,IAAI,EAAEL,YAAY,CAACc;EACrB;AACF,CAAU","ignoreList":[]}
1
+ {"version":3,"file":"background.js","names":["_colors","require","backgroundColors","exports","bgPrimary","light","colorPalette","white","dark","black","bgTransparent50","white50","black50","bgSecondary","bgOk","bottleGreenDark","bgDanger","orange"],"sources":["../../../../src/tailwind/themes/background.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const backgroundColors = {\n bgPrimary: {\n light: colorPalette.white,\n dark: colorPalette.black,\n },\n bgTransparent50: {\n light: colorPalette.white50,\n dark: colorPalette.black50,\n },\n bgSecondary: {\n light: '#F4F8FA',\n dark: '#1C1C1C',\n },\n bgOk: {\n light: '#70D2AF',\n dark: colorPalette.bottleGreenDark,\n },\n bgDanger: {\n light: '#FE4084',\n dark: colorPalette.orange,\n },\n} as const;\n\nexport type BackgroundColorKeys = KeysOf<typeof backgroundColors>;\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,SAAS,EAAE;IACTC,KAAK,EAAEC,oBAAY,CAACC,KAAK;IACzBC,IAAI,EAAEF,oBAAY,CAACG;EACrB,CAAC;EACDC,eAAe,EAAE;IACfL,KAAK,EAAEC,oBAAY,CAACK,OAAO;IAC3BH,IAAI,EAAEF,oBAAY,CAACM;EACrB,CAAC;EACDC,WAAW,EAAE;IACXR,KAAK,EAAE,SAAS;IAChBG,IAAI,EAAE;EACR,CAAC;EACDM,IAAI,EAAE;IACJT,KAAK,EAAE,SAAS;IAChBG,IAAI,EAAEF,oBAAY,CAACS;EACrB,CAAC;EACDC,QAAQ,EAAE;IACRX,KAAK,EAAE,SAAS;IAChBG,IAAI,EAAEF,oBAAY,CAACW;EACrB;AACF,CAAU","ignoreList":[]}
@@ -1,5 +1,11 @@
1
- import { colorPalette } from '../colors';
2
- export const borderColors = {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.borderColors = void 0;
7
+ var _colors = require("../colors");
8
+ const borderColors = exports.borderColors = {
3
9
  borderPrimary: {
4
10
  light: '#D7D9D8',
5
11
  dark: '#333333'
@@ -9,8 +15,8 @@ export const borderColors = {
9
15
  dark: '#9EA4AC'
10
16
  },
11
17
  borderDisabled: {
12
- light: colorPalette.grayLight,
13
- dark: colorPalette.grayLight
18
+ light: _colors.colorPalette.grayLight,
19
+ dark: _colors.colorPalette.grayLight
14
20
  }
15
21
  };
16
22
  //# sourceMappingURL=border.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"border.js","names":["colorPalette","borderColors","borderPrimary","light","dark","borderSecondary","borderDisabled","grayLight"],"sources":["../../../../src/tailwind/themes/border.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const borderColors = {\n borderPrimary: {\n light: '#D7D9D8',\n dark: '#333333',\n },\n borderSecondary: {\n light: '#F1F1F1',\n dark: '#9EA4AC',\n },\n borderDisabled: {\n light: colorPalette.grayLight,\n dark: colorPalette.grayLight,\n },\n} as const;\n\nexport type BorderColorsKeys = KeysOf<typeof borderColors>;\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,WAAW;AAExC,OAAO,MAAMC,YAAY,GAAG;EAC1BC,aAAa,EAAE;IACbC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDC,eAAe,EAAE;IACfF,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDE,cAAc,EAAE;IACdH,KAAK,EAAEH,YAAY,CAACO,SAAS;IAC7BH,IAAI,EAAEJ,YAAY,CAACO;EACrB;AACF,CAAU","ignoreList":[]}
1
+ {"version":3,"file":"border.js","names":["_colors","require","borderColors","exports","borderPrimary","light","dark","borderSecondary","borderDisabled","colorPalette","grayLight"],"sources":["../../../../src/tailwind/themes/border.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const borderColors = {\n borderPrimary: {\n light: '#D7D9D8',\n dark: '#333333',\n },\n borderSecondary: {\n light: '#F1F1F1',\n dark: '#9EA4AC',\n },\n borderDisabled: {\n light: colorPalette.grayLight,\n dark: colorPalette.grayLight,\n },\n} as const;\n\nexport type BorderColorsKeys = KeysOf<typeof borderColors>;\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,aAAa,EAAE;IACbC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDC,eAAe,EAAE;IACfF,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE;EACR,CAAC;EACDE,cAAc,EAAE;IACdH,KAAK,EAAEI,oBAAY,CAACC,SAAS;IAC7BJ,IAAI,EAAEG,oBAAY,CAACC;EACrB;AACF,CAAU","ignoreList":[]}
@@ -1,15 +1,21 @@
1
- import { createThemes } from 'tw-colors';
2
- import { Theme } from '../../types';
3
- import { twTheme } from './themeColors';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.themes = void 0;
7
+ var _twColors = require("tw-colors");
8
+ var _types = require("../../types");
9
+ var _themeColors = require("./themeColors");
4
10
  const extractColorTheme = (colors, property) => Object.keys(colors).reduce((acc, key) => {
5
11
  const color = colors[key];
6
12
  return Object.assign(acc, {
7
13
  [key]: color[property]
8
14
  });
9
15
  }, {});
10
- export const themes = createThemes({
11
- light: extractColorTheme(twTheme, Theme.Light),
12
- dark: extractColorTheme(twTheme, Theme.Dark)
16
+ const themes = exports.themes = (0, _twColors.createThemes)({
17
+ light: extractColorTheme(_themeColors.twTheme, _types.Theme.Light),
18
+ dark: extractColorTheme(_themeColors.twTheme, _types.Theme.Dark)
13
19
  }, {
14
20
  defaultTheme: 'light'
15
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createThemes","Theme","twTheme","extractColorTheme","colors","property","Object","keys","reduce","acc","key","color","assign","themes","light","Light","dark","Dark","defaultTheme"],"sources":["../../../../src/tailwind/themes/index.ts"],"sourcesContent":["import { createThemes } from 'tw-colors';\n\nimport { Theme } from '../../types';\nimport type { ThemeColor, ThemeColorKeys } from '../types';\nimport { twTheme } from './themeColors';\n\nconst extractColorTheme = (\n colors: Record<string, ThemeColor>,\n property: ThemeColorKeys\n) =>\n Object.keys(colors).reduce((acc, key) => {\n const color = colors[key];\n return Object.assign(acc, { [key]: color[property] });\n }, {});\n\nexport const themes = createThemes(\n {\n light: extractColorTheme(twTheme, Theme.Light),\n dark: extractColorTheme(twTheme, Theme.Dark),\n },\n {\n defaultTheme: 'light',\n }\n);\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,WAAW;AAExC,SAASC,KAAK,QAAQ,aAAa;AAEnC,SAASC,OAAO,QAAQ,eAAe;AAEvC,MAAMC,iBAAiB,GAAGA,CACxBC,MAAkC,EAClCC,QAAwB,KAExBC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,CAACI,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;EACvC,MAAMC,KAAK,GAAGP,MAAM,CAACM,GAAG,CAAC;EACzB,OAAOJ,MAAM,CAACM,MAAM,CAACH,GAAG,EAAE;IAAE,CAACC,GAAG,GAAGC,KAAK,CAACN,QAAQ;EAAE,CAAC,CAAC;AACvD,CAAC,EAAE,CAAC,CAAC,CAAC;AAER,OAAO,MAAMQ,MAAM,GAAGb,YAAY,CAChC;EACEc,KAAK,EAAEX,iBAAiB,CAACD,OAAO,EAAED,KAAK,CAACc,KAAK,CAAC;EAC9CC,IAAI,EAAEb,iBAAiB,CAACD,OAAO,EAAED,KAAK,CAACgB,IAAI;AAC7C,CAAC,EACD;EACEC,YAAY,EAAE;AAChB,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_twColors","require","_types","_themeColors","extractColorTheme","colors","property","Object","keys","reduce","acc","key","color","assign","themes","exports","createThemes","light","twTheme","Theme","Light","dark","Dark","defaultTheme"],"sources":["../../../../src/tailwind/themes/index.ts"],"sourcesContent":["import { createThemes } from 'tw-colors';\n\nimport { Theme } from '../../types';\nimport type { ThemeColor, ThemeColorKeys } from '../types';\nimport { twTheme } from './themeColors';\n\nconst extractColorTheme = (\n colors: Record<string, ThemeColor>,\n property: ThemeColorKeys\n) =>\n Object.keys(colors).reduce((acc, key) => {\n const color = colors[key];\n return Object.assign(acc, { [key]: color[property] });\n }, {});\n\nexport const themes = createThemes(\n {\n light: extractColorTheme(twTheme, Theme.Light),\n dark: extractColorTheme(twTheme, Theme.Dark),\n },\n {\n defaultTheme: 'light',\n }\n);\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,iBAAiB,GAAGA,CACxBC,MAAkC,EAClCC,QAAwB,KAExBC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,CAACI,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;EACvC,MAAMC,KAAK,GAAGP,MAAM,CAACM,GAAG,CAAC;EACzB,OAAOJ,MAAM,CAACM,MAAM,CAACH,GAAG,EAAE;IAAE,CAACC,GAAG,GAAGC,KAAK,CAACN,QAAQ;EAAE,CAAC,CAAC;AACvD,CAAC,EAAE,CAAC,CAAC,CAAC;AAED,MAAMQ,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,IAAAE,sBAAY,EAChC;EACEC,KAAK,EAAEb,iBAAiB,CAACc,oBAAO,EAAEC,YAAK,CAACC,KAAK,CAAC;EAC9CC,IAAI,EAAEjB,iBAAiB,CAACc,oBAAO,EAAEC,YAAK,CAACG,IAAI;AAC7C,CAAC,EACD;EACEC,YAAY,EAAE;AAChB,CACF,CAAC","ignoreList":[]}
@@ -1,32 +1,38 @@
1
- import { colorPalette } from '../colors';
2
- export const textColors = {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.textColors = void 0;
7
+ var _colors = require("../colors");
8
+ const textColors = exports.textColors = {
3
9
  textPrimary: {
4
- dark: colorPalette.white,
10
+ dark: _colors.colorPalette.white,
5
11
  light: '#0B0B0B'
6
12
  },
7
13
  textSecondary: {
8
14
  dark: '#FBFEFF',
9
- light: colorPalette.navyBlue
15
+ light: _colors.colorPalette.navyBlue
10
16
  },
11
17
  textSecondary75: {
12
18
  dark: 'rgba(251, 254, 255, 0.75)',
13
19
  light: 'rgba(0, 33, 74, 0.75)'
14
20
  },
15
21
  textNegative: {
16
- dark: colorPalette.black,
17
- light: colorPalette.white
22
+ dark: _colors.colorPalette.black,
23
+ light: _colors.colorPalette.white
18
24
  },
19
25
  textOk: {
20
- dark: colorPalette.greenLight,
21
- light: colorPalette.bottleGreenDark120
26
+ dark: _colors.colorPalette.greenLight,
27
+ light: _colors.colorPalette.bottleGreenDark120
22
28
  },
23
29
  textDanger: {
24
- dark: colorPalette.redLight,
25
- light: colorPalette.redDark
30
+ dark: _colors.colorPalette.redLight,
31
+ light: _colors.colorPalette.redDark
26
32
  },
27
33
  textDisabled: {
28
- dark: colorPalette.grayLight,
29
- light: colorPalette.gray
34
+ dark: _colors.colorPalette.grayLight,
35
+ light: _colors.colorPalette.gray
30
36
  }
31
37
  };
32
38
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","names":["colorPalette","textColors","textPrimary","dark","white","light","textSecondary","navyBlue","textSecondary75","textNegative","black","textOk","greenLight","bottleGreenDark120","textDanger","redLight","redDark","textDisabled","grayLight","gray"],"sources":["../../../../src/tailwind/themes/text.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const textColors = {\n textPrimary: {\n dark: colorPalette.white,\n light: '#0B0B0B',\n },\n textSecondary: {\n dark: '#FBFEFF',\n light: colorPalette.navyBlue,\n },\n textSecondary75: {\n dark: 'rgba(251, 254, 255, 0.75)',\n light: 'rgba(0, 33, 74, 0.75)',\n },\n textNegative: {\n dark: colorPalette.black,\n light: colorPalette.white,\n },\n textOk: {\n dark: colorPalette.greenLight,\n light: colorPalette.bottleGreenDark120,\n },\n textDanger: {\n dark: colorPalette.redLight,\n light: colorPalette.redDark,\n },\n textDisabled: {\n dark: colorPalette.grayLight,\n light: colorPalette.gray,\n },\n} as const;\n\nexport type TextColorsKeys = KeysOf<typeof textColors>;\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,WAAW;AAExC,OAAO,MAAMC,UAAU,GAAG;EACxBC,WAAW,EAAE;IACXC,IAAI,EAAEH,YAAY,CAACI,KAAK;IACxBC,KAAK,EAAE;EACT,CAAC;EACDC,aAAa,EAAE;IACbH,IAAI,EAAE,SAAS;IACfE,KAAK,EAAEL,YAAY,CAACO;EACtB,CAAC;EACDC,eAAe,EAAE;IACfL,IAAI,EAAE,2BAA2B;IACjCE,KAAK,EAAE;EACT,CAAC;EACDI,YAAY,EAAE;IACZN,IAAI,EAAEH,YAAY,CAACU,KAAK;IACxBL,KAAK,EAAEL,YAAY,CAACI;EACtB,CAAC;EACDO,MAAM,EAAE;IACNR,IAAI,EAAEH,YAAY,CAACY,UAAU;IAC7BP,KAAK,EAAEL,YAAY,CAACa;EACtB,CAAC;EACDC,UAAU,EAAE;IACVX,IAAI,EAAEH,YAAY,CAACe,QAAQ;IAC3BV,KAAK,EAAEL,YAAY,CAACgB;EACtB,CAAC;EACDC,YAAY,EAAE;IACZd,IAAI,EAAEH,YAAY,CAACkB,SAAS;IAC5Bb,KAAK,EAAEL,YAAY,CAACmB;EACtB;AACF,CAAU","ignoreList":[]}
1
+ {"version":3,"file":"text.js","names":["_colors","require","textColors","exports","textPrimary","dark","colorPalette","white","light","textSecondary","navyBlue","textSecondary75","textNegative","black","textOk","greenLight","bottleGreenDark120","textDanger","redLight","redDark","textDisabled","grayLight","gray"],"sources":["../../../../src/tailwind/themes/text.ts"],"sourcesContent":["import type { KeysOf } from '../../types';\nimport { colorPalette } from '../colors';\n\nexport const textColors = {\n textPrimary: {\n dark: colorPalette.white,\n light: '#0B0B0B',\n },\n textSecondary: {\n dark: '#FBFEFF',\n light: colorPalette.navyBlue,\n },\n textSecondary75: {\n dark: 'rgba(251, 254, 255, 0.75)',\n light: 'rgba(0, 33, 74, 0.75)',\n },\n textNegative: {\n dark: colorPalette.black,\n light: colorPalette.white,\n },\n textOk: {\n dark: colorPalette.greenLight,\n light: colorPalette.bottleGreenDark120,\n },\n textDanger: {\n dark: colorPalette.redLight,\n light: colorPalette.redDark,\n },\n textDisabled: {\n dark: colorPalette.grayLight,\n light: colorPalette.gray,\n },\n} as const;\n\nexport type TextColorsKeys = KeysOf<typeof textColors>;\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;EACxBE,WAAW,EAAE;IACXC,IAAI,EAAEC,oBAAY,CAACC,KAAK;IACxBC,KAAK,EAAE;EACT,CAAC;EACDC,aAAa,EAAE;IACbJ,IAAI,EAAE,SAAS;IACfG,KAAK,EAAEF,oBAAY,CAACI;EACtB,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE,2BAA2B;IACjCG,KAAK,EAAE;EACT,CAAC;EACDI,YAAY,EAAE;IACZP,IAAI,EAAEC,oBAAY,CAACO,KAAK;IACxBL,KAAK,EAAEF,oBAAY,CAACC;EACtB,CAAC;EACDO,MAAM,EAAE;IACNT,IAAI,EAAEC,oBAAY,CAACS,UAAU;IAC7BP,KAAK,EAAEF,oBAAY,CAACU;EACtB,CAAC;EACDC,UAAU,EAAE;IACVZ,IAAI,EAAEC,oBAAY,CAACY,QAAQ;IAC3BV,KAAK,EAAEF,oBAAY,CAACa;EACtB,CAAC;EACDC,YAAY,EAAE;IACZf,IAAI,EAAEC,oBAAY,CAACe,SAAS;IAC5Bb,KAAK,EAAEF,oBAAY,CAACgB;EACtB;AACF,CAAU","ignoreList":[]}
@@ -1,32 +1,38 @@
1
- import { colorPalette } from '../colors';
2
- import { toTwConfigKeys } from '../utils';
3
- import { backgroundColors } from './background';
4
- import { borderColors } from './border';
5
- import { textColors } from './text';
6
- export const themeColors = {
7
- ...textColors,
8
- ...backgroundColors,
9
- ...borderColors,
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.twTheme = exports.themeColors = void 0;
7
+ var _colors = require("../colors");
8
+ var _utils = require("../utils");
9
+ var _background = require("./background");
10
+ var _border = require("./border");
11
+ var _text = require("./text");
12
+ const themeColors = exports.themeColors = {
13
+ ..._text.textColors,
14
+ ..._background.backgroundColors,
15
+ ..._border.borderColors,
10
16
  primary: {
11
- dark: colorPalette.orange,
12
- light: colorPalette.bottleGreenDark
17
+ dark: _colors.colorPalette.orange,
18
+ light: _colors.colorPalette.bottleGreenDark
13
19
  },
14
20
  secondary: {
15
- dark: colorPalette.orange,
16
- light: colorPalette.navyBlue
21
+ dark: _colors.colorPalette.orange,
22
+ light: _colors.colorPalette.navyBlue
17
23
  },
18
24
  ok: {
19
- dark: colorPalette.bottleGreenDark,
20
- light: colorPalette.greenLight
25
+ dark: _colors.colorPalette.bottleGreenDark,
26
+ light: _colors.colorPalette.greenLight
21
27
  },
22
28
  danger: {
23
- dark: colorPalette.orange,
24
- light: colorPalette.raspberryLight
29
+ dark: _colors.colorPalette.orange,
30
+ light: _colors.colorPalette.raspberryLight
25
31
  },
26
32
  chart: {
27
- dark: colorPalette.orange,
28
- light: colorPalette.turquoiseLight
33
+ dark: _colors.colorPalette.orange,
34
+ light: _colors.colorPalette.turquoiseLight
29
35
  }
30
36
  };
31
- export const twTheme = toTwConfigKeys(themeColors);
37
+ const twTheme = exports.twTheme = (0, _utils.toTwConfigKeys)(themeColors);
32
38
  //# sourceMappingURL=themeColors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeColors.js","names":["colorPalette","toTwConfigKeys","backgroundColors","borderColors","textColors","themeColors","primary","dark","orange","light","bottleGreenDark","secondary","navyBlue","ok","greenLight","danger","raspberryLight","chart","turquoiseLight","twTheme"],"sources":["../../../../src/tailwind/themes/themeColors.ts"],"sourcesContent":["import { colorPalette } from '../colors';\nimport type { ThemeColor } from '../types';\nimport { toTwConfigKeys } from '../utils';\nimport { type BackgroundColorKeys, backgroundColors } from './background';\nimport { borderColors, type BorderColorsKeys } from './border';\nimport { textColors, type TextColorsKeys } from './text';\n\ntype ThemeKeys =\n | 'primary'\n | 'secondary'\n | 'ok'\n | 'danger'\n | 'chart'\n | BackgroundColorKeys\n | BorderColorsKeys\n | TextColorsKeys;\n\nexport const themeColors: Record<ThemeKeys, ThemeColor> = {\n ...textColors,\n ...backgroundColors,\n ...borderColors,\n primary: {\n dark: colorPalette.orange,\n light: colorPalette.bottleGreenDark,\n },\n secondary: {\n dark: colorPalette.orange,\n light: colorPalette.navyBlue,\n },\n ok: {\n dark: colorPalette.bottleGreenDark,\n light: colorPalette.greenLight,\n },\n danger: {\n dark: colorPalette.orange,\n light: colorPalette.raspberryLight,\n },\n chart: {\n dark: colorPalette.orange,\n light: colorPalette.turquoiseLight,\n },\n};\n\nexport const twTheme = toTwConfigKeys(themeColors);\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,WAAW;AAExC,SAASC,cAAc,QAAQ,UAAU;AACzC,SAAmCC,gBAAgB,QAAQ,cAAc;AACzE,SAASC,YAAY,QAA+B,UAAU;AAC9D,SAASC,UAAU,QAA6B,QAAQ;AAYxD,OAAO,MAAMC,WAA0C,GAAG;EACxD,GAAGD,UAAU;EACb,GAAGF,gBAAgB;EACnB,GAAGC,YAAY;EACfG,OAAO,EAAE;IACPC,IAAI,EAAEP,YAAY,CAACQ,MAAM;IACzBC,KAAK,EAAET,YAAY,CAACU;EACtB,CAAC;EACDC,SAAS,EAAE;IACTJ,IAAI,EAAEP,YAAY,CAACQ,MAAM;IACzBC,KAAK,EAAET,YAAY,CAACY;EACtB,CAAC;EACDC,EAAE,EAAE;IACFN,IAAI,EAAEP,YAAY,CAACU,eAAe;IAClCD,KAAK,EAAET,YAAY,CAACc;EACtB,CAAC;EACDC,MAAM,EAAE;IACNR,IAAI,EAAEP,YAAY,CAACQ,MAAM;IACzBC,KAAK,EAAET,YAAY,CAACgB;EACtB,CAAC;EACDC,KAAK,EAAE;IACLV,IAAI,EAAEP,YAAY,CAACQ,MAAM;IACzBC,KAAK,EAAET,YAAY,CAACkB;EACtB;AACF,CAAC;AAED,OAAO,MAAMC,OAAO,GAAGlB,cAAc,CAACI,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"themeColors.js","names":["_colors","require","_utils","_background","_border","_text","themeColors","exports","textColors","backgroundColors","borderColors","primary","dark","colorPalette","orange","light","bottleGreenDark","secondary","navyBlue","ok","greenLight","danger","raspberryLight","chart","turquoiseLight","twTheme","toTwConfigKeys"],"sources":["../../../../src/tailwind/themes/themeColors.ts"],"sourcesContent":["import { colorPalette } from '../colors';\nimport type { ThemeColor } from '../types';\nimport { toTwConfigKeys } from '../utils';\nimport { type BackgroundColorKeys, backgroundColors } from './background';\nimport { borderColors, type BorderColorsKeys } from './border';\nimport { textColors, type TextColorsKeys } from './text';\n\ntype ThemeKeys =\n | 'primary'\n | 'secondary'\n | 'ok'\n | 'danger'\n | 'chart'\n | BackgroundColorKeys\n | BorderColorsKeys\n | TextColorsKeys;\n\nexport const themeColors: Record<ThemeKeys, ThemeColor> = {\n ...textColors,\n ...backgroundColors,\n ...borderColors,\n primary: {\n dark: colorPalette.orange,\n light: colorPalette.bottleGreenDark,\n },\n secondary: {\n dark: colorPalette.orange,\n light: colorPalette.navyBlue,\n },\n ok: {\n dark: colorPalette.bottleGreenDark,\n light: colorPalette.greenLight,\n },\n danger: {\n dark: colorPalette.orange,\n light: colorPalette.raspberryLight,\n },\n chart: {\n dark: colorPalette.orange,\n light: colorPalette.turquoiseLight,\n },\n};\n\nexport const twTheme = toTwConfigKeys(themeColors);\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAYO,MAAMK,WAA0C,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACxD,GAAGE,gBAAU;EACb,GAAGC,4BAAgB;EACnB,GAAGC,oBAAY;EACfC,OAAO,EAAE;IACPC,IAAI,EAAEC,oBAAY,CAACC,MAAM;IACzBC,KAAK,EAAEF,oBAAY,CAACG;EACtB,CAAC;EACDC,SAAS,EAAE;IACTL,IAAI,EAAEC,oBAAY,CAACC,MAAM;IACzBC,KAAK,EAAEF,oBAAY,CAACK;EACtB,CAAC;EACDC,EAAE,EAAE;IACFP,IAAI,EAAEC,oBAAY,CAACG,eAAe;IAClCD,KAAK,EAAEF,oBAAY,CAACO;EACtB,CAAC;EACDC,MAAM,EAAE;IACNT,IAAI,EAAEC,oBAAY,CAACC,MAAM;IACzBC,KAAK,EAAEF,oBAAY,CAACS;EACtB,CAAC;EACDC,KAAK,EAAE;IACLX,IAAI,EAAEC,oBAAY,CAACC,MAAM;IACzBC,KAAK,EAAEF,oBAAY,CAACW;EACtB;AACF,CAAC;AAEM,MAAMC,OAAO,GAAAlB,OAAA,CAAAkB,OAAA,GAAG,IAAAC,qBAAc,EAACpB,WAAW,CAAC","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,8 +1,15 @@
1
- export const toTwConfigKeys = obj => Object.keys(obj).reduce((result, key) => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toTwConfigKeys = void 0;
7
+ const toTwConfigKeys = obj => Object.keys(obj).reduce((result, key) => {
2
8
  const kebabKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').replace(/([0-9]+)/g, '-$1').toLowerCase();
3
9
  return {
4
10
  ...result,
5
11
  [kebabKey]: obj[key]
6
12
  };
7
13
  }, {});
14
+ exports.toTwConfigKeys = toTwConfigKeys;
8
15
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["toTwConfigKeys","obj","Object","keys","reduce","result","key","kebabKey","replace","toLowerCase"],"sources":["../../../src/tailwind/utils.ts"],"sourcesContent":["import type { ThemeColor } from './types';\n\ntype KebabCase<S extends string> = S extends `${infer Head}${infer Tail}`\n ? Tail extends Capitalize<Tail>\n ? `${Lowercase<Head>}-${KebabCase<Tail>}`\n : `${Head}${KebabCase<Tail>}`\n : S;\n\ntype KebabCaseKeys<T extends Record<string, string | ThemeColor>> = {\n [K in keyof T as KebabCase<K & string>]: T[K];\n};\n\nexport const toTwConfigKeys = <T extends Record<string, string | ThemeColor>>(\n obj: T\n): KebabCaseKeys<T> =>\n Object.keys(obj).reduce((result, key) => {\n const kebabKey = key\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([0-9]+)/g, '-$1')\n .toLowerCase();\n return {\n ...result,\n [kebabKey]: obj[key],\n };\n }, {} as KebabCaseKeys<T>);\n"],"mappings":"AAYA,OAAO,MAAMA,cAAc,GACzBC,GAAM,IAENC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;EACvC,MAAMC,QAAQ,GAAGD,GAAG,CACjBE,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CACnCA,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAC3BC,WAAW,CAAC,CAAC;EAChB,OAAO;IACL,GAAGJ,MAAM;IACT,CAACE,QAAQ,GAAGN,GAAG,CAACK,GAAG;EACrB,CAAC;AACH,CAAC,EAAE,CAAC,CAAqB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["toTwConfigKeys","obj","Object","keys","reduce","result","key","kebabKey","replace","toLowerCase","exports"],"sources":["../../../src/tailwind/utils.ts"],"sourcesContent":["import type { ThemeColor } from './types';\n\ntype KebabCase<S extends string> = S extends `${infer Head}${infer Tail}`\n ? Tail extends Capitalize<Tail>\n ? `${Lowercase<Head>}-${KebabCase<Tail>}`\n : `${Head}${KebabCase<Tail>}`\n : S;\n\ntype KebabCaseKeys<T extends Record<string, string | ThemeColor>> = {\n [K in keyof T as KebabCase<K & string>]: T[K];\n};\n\nexport const toTwConfigKeys = <T extends Record<string, string | ThemeColor>>(\n obj: T\n): KebabCaseKeys<T> =>\n Object.keys(obj).reduce((result, key) => {\n const kebabKey = key\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([0-9]+)/g, '-$1')\n .toLowerCase();\n return {\n ...result,\n [kebabKey]: obj[key],\n };\n }, {} as KebabCaseKeys<T>);\n"],"mappings":";;;;;;AAYO,MAAMA,cAAc,GACzBC,GAAM,IAENC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;EACvC,MAAMC,QAAQ,GAAGD,GAAG,CACjBE,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CACnCA,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAC3BC,WAAW,CAAC,CAAC;EAChB,OAAO;IACL,GAAGJ,MAAM;IACT,CAACE,QAAQ,GAAGN,GAAG,CAACK,GAAG;EACrB,CAAC;AACH,CAAC,EAAE,CAAC,CAAqB,CAAC;AAACI,OAAA,CAAAV,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1,18 +1,26 @@
1
- import React from 'react';
2
- import { LayoutContext } from '../providers';
3
- import { Size, Theme } from '../types';
4
- export const MockLayoutProvider = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MockLayoutProvider = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _providers = require("../providers");
9
+ var _types = require("../types");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const MockLayoutProvider = _ref => {
5
12
  let {
6
13
  children,
7
14
  size,
8
15
  isDark
9
16
  } = _ref;
10
- return React.createElement(LayoutContext.Provider, {
17
+ return _react.default.createElement(_providers.LayoutContext.Provider, {
11
18
  value: {
12
- size: size ?? Size.DESKTOP,
19
+ size: size ?? _types.Size.DESKTOP,
13
20
  isDark: isDark ?? true,
14
- theme: Theme.Dark
21
+ theme: _types.Theme.Dark
15
22
  }
16
23
  }, children);
17
24
  };
25
+ exports.MockLayoutProvider = MockLayoutProvider;
18
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","LayoutContext","Size","Theme","MockLayoutProvider","_ref","children","size","isDark","createElement","Provider","value","DESKTOP","theme","Dark"],"sources":["../../../src/testUtils/index.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { LayoutContextValue } from '../providers';\nimport { LayoutContext } from '../providers';\nimport { Size, Theme } from '../types';\n\nexport const MockLayoutProvider: FC<\n PropsWithChildren & Partial<LayoutContextValue>\n> = ({ children, size, isDark }) => (\n <LayoutContext.Provider\n value={{\n size: size ?? Size.DESKTOP,\n isDark: isDark ?? true,\n theme: Theme.Dark,\n }}\n >\n {children}\n </LayoutContext.Provider>\n);\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,IAAI,EAAEC,KAAK,QAAQ,UAAU;AAEtC,OAAO,MAAMC,kBAEZ,GAAGC,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAAH,IAAA;EAAA,OAC7BL,KAAA,CAAAS,aAAA,CAACR,aAAa,CAACS,QAAQ;IACrBC,KAAK,EAAE;MACLJ,IAAI,EAAEA,IAAI,IAAIL,IAAI,CAACU,OAAO;MAC1BJ,MAAM,EAAEA,MAAM,IAAI,IAAI;MACtBK,KAAK,EAAEV,KAAK,CAACW;IACf;EAAE,GAEDR,QACqB,CAAC;AAAA,CAC1B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_providers","_types","e","__esModule","default","MockLayoutProvider","_ref","children","size","isDark","createElement","LayoutContext","Provider","value","Size","DESKTOP","theme","Theme","Dark","exports"],"sources":["../../../src/testUtils/index.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { LayoutContextValue } from '../providers';\nimport { LayoutContext } from '../providers';\nimport { Size, Theme } from '../types';\n\nexport const MockLayoutProvider: FC<\n PropsWithChildren & Partial<LayoutContextValue>\n> = ({ children, size, isDark }) => (\n <LayoutContext.Provider\n value={{\n size: size ?? Size.DESKTOP,\n isDark: isDark ?? true,\n theme: Theme.Dark,\n }}\n >\n {children}\n </LayoutContext.Provider>\n);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAuC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,kBAEZ,GAAGC,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAAH,IAAA;EAAA,OAC7BT,MAAA,CAAAO,OAAA,CAAAM,aAAA,CAACV,UAAA,CAAAW,aAAa,CAACC,QAAQ;IACrBC,KAAK,EAAE;MACLL,IAAI,EAAEA,IAAI,IAAIM,WAAI,CAACC,OAAO;MAC1BN,MAAM,EAAEA,MAAM,IAAI,IAAI;MACtBO,KAAK,EAAEC,YAAK,CAACC;IACf;EAAE,GAEDX,QACqB,CAAC;AAAA,CAC1B;AAACY,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,12 +1,19 @@
1
- import { Locale } from '@oanda/mono-i18n';
2
- import en from './sources/en.json';
3
- import zhTW from './sources/zh_TW.json';
4
- export const translations = {
5
- [Locale.en]: {
6
- translation: en
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.translations = void 0;
7
+ var _monoI18n = require("@oanda/mono-i18n");
8
+ var _en = _interopRequireDefault(require("./sources/en.json"));
9
+ var _zh_TW = _interopRequireDefault(require("./sources/zh_TW.json"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const translations = exports.translations = {
12
+ [_monoI18n.Locale.en]: {
13
+ translation: _en.default
7
14
  },
8
- [Locale.zhTW]: {
9
- translation: zhTW
15
+ [_monoI18n.Locale.zhTW]: {
16
+ translation: _zh_TW.default
10
17
  }
11
18
  };
12
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Locale","en","zhTW","translations","translation"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n};\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,kBAAkB;AAEzC,OAAOC,EAAE,MAAM,mBAAmB;AAClC,OAAOC,IAAI,MAAM,sBAAsB;AAKvC,OAAO,MAAMC,YAA0B,GAAG;EACxC,CAACH,MAAM,CAACC,EAAE,GAAG;IAAEG,WAAW,EAAEH;EAAG,CAAC;EAChC,CAACD,MAAM,CAACE,IAAI,GAAG;IAAEE,WAAW,EAAEF;EAAK;AACrC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_monoI18n","require","_en","_interopRequireDefault","_zh_TW","e","__esModule","default","translations","exports","Locale","en","translation","zhTW"],"sources":["../../../src/translations/index.ts"],"sourcesContent":["import type { Translations } from '@oanda/mono-i18n';\nimport { Locale } from '@oanda/mono-i18n';\n\nimport en from './sources/en.json';\nimport zhTW from './sources/zh_TW.json';\nimport type { defaultTranslations } from './translations';\n\nexport type TranslationKey = keyof typeof defaultTranslations;\n\nexport const translations: Translations = {\n [Locale.en]: { translation: en },\n [Locale.zhTW]: { translation: zhTW },\n};\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKjC,MAAMG,YAA0B,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACxC,CAACE,gBAAM,CAACC,EAAE,GAAG;IAAEC,WAAW,EAAED;EAAG,CAAC;EAChC,CAACD,gBAAM,CAACG,IAAI,GAAG;IAAED,WAAW,EAAEC;EAAK;AACrC,CAAC","ignoreList":[]}
@@ -1,4 +1,10 @@
1
- export const defaultTranslations = {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultTranslations = void 0;
7
+ const defaultTranslations = exports.defaultTranslations = {
2
8
  data_unavailable: 'Data unavailable',
3
9
  pagination_entries_range: '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries'
4
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"translations.js","names":["defaultTranslations","data_unavailable","pagination_entries_range"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n data_unavailable: 'Data unavailable',\n pagination_entries_range:\n '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,mBAAmB,GAAG;EACjCC,gBAAgB,EAAE,kBAAkB;EACpCC,wBAAwB,EACtB;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"translations.js","names":["defaultTranslations","exports","data_unavailable","pagination_entries_range"],"sources":["../../../src/translations/translations.ts"],"sourcesContent":["export const defaultTranslations = {\n data_unavailable: 'Data unavailable',\n pagination_entries_range:\n '{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries',\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCE,gBAAgB,EAAE,kBAAkB;EACpCC,wBAAwB,EACtB;AACJ,CAAC","ignoreList":[]}
@@ -1,4 +1,10 @@
1
- export let DataRecordType = function (DataRecordType) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DataRecordType = void 0;
7
+ let DataRecordType = exports.DataRecordType = function (DataRecordType) {
2
8
  DataRecordType["INSTRUMENT"] = "instrument";
3
9
  DataRecordType["SELL"] = "sell";
4
10
  DataRecordType["BUY"] = "buy";
@@ -1 +1 @@
1
- {"version":3,"file":"dataTypes.js","names":["DataRecordType"],"sources":["../../../src/types/dataTypes.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface DataRecord {\n [key: string]: string | number | SentimentValue | undefined | number[];\n instrument: string;\n displayName: string;\n buy?: number;\n sell?: number;\n spread?: number;\n sentiment?: SentimentValue;\n sellPriceMovement?: number;\n buyPriceMovement?: number;\n dailyPercentChange?: string;\n displayPrecision?: number;\n chart?: number[];\n high?: number;\n low?: number;\n tradeMode?: string;\n dataSource?: string;\n}\n\nexport interface SentimentValue {\n shortPercent: number;\n longPercent: number;\n}\n\nexport type EmptyRecord = Record<string, never>;\n\nexport interface QueryVariables {\n [key: string]: any;\n}\n\nexport enum DataRecordType {\n INSTRUMENT = 'instrument',\n SELL = 'sell',\n BUY = 'buy',\n DAILY_CHANGE = 'dailyChange',\n CHART = 'chart',\n SPREAD = 'spread',\n SENTIMENT = 'sentiment',\n LOW = 'low',\n HIGH = 'high',\n SYMBOL = 'symbol',\n TRADE_MODE = 'tradeMode',\n DATA_SOURCE = 'dataSource',\n}\n"],"mappings":"AA+BA,WAAYA,cAAc,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"dataTypes.js","names":["DataRecordType","exports"],"sources":["../../../src/types/dataTypes.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface DataRecord {\n [key: string]: string | number | SentimentValue | undefined | number[];\n instrument: string;\n displayName: string;\n buy?: number;\n sell?: number;\n spread?: number;\n sentiment?: SentimentValue;\n sellPriceMovement?: number;\n buyPriceMovement?: number;\n dailyPercentChange?: string;\n displayPrecision?: number;\n chart?: number[];\n high?: number;\n low?: number;\n tradeMode?: string;\n dataSource?: string;\n}\n\nexport interface SentimentValue {\n shortPercent: number;\n longPercent: number;\n}\n\nexport type EmptyRecord = Record<string, never>;\n\nexport interface QueryVariables {\n [key: string]: any;\n}\n\nexport enum DataRecordType {\n INSTRUMENT = 'instrument',\n SELL = 'sell',\n BUY = 'buy',\n DAILY_CHANGE = 'dailyChange',\n CHART = 'chart',\n SPREAD = 'spread',\n SENTIMENT = 'sentiment',\n LOW = 'low',\n HIGH = 'high',\n SYMBOL = 'symbol',\n TRADE_MODE = 'tradeMode',\n DATA_SOURCE = 'dataSource',\n}\n"],"mappings":";;;;;;IA+BYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,aAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
@@ -1,14 +1,46 @@
1
- export let Theme = function (Theme) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ Theme: true,
8
+ Size: true
9
+ };
10
+ exports.Theme = exports.Size = void 0;
11
+ var _dataTypes = require("./dataTypes");
12
+ Object.keys(_dataTypes).forEach(function (key) {
13
+ if (key === "default" || key === "__esModule") return;
14
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
15
+ if (key in exports && exports[key] === _dataTypes[key]) return;
16
+ Object.defineProperty(exports, key, {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _dataTypes[key];
20
+ }
21
+ });
22
+ });
23
+ var _liveRatesTypes = require("./liveRatesTypes");
24
+ Object.keys(_liveRatesTypes).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
+ if (key in exports && exports[key] === _liveRatesTypes[key]) return;
28
+ Object.defineProperty(exports, key, {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _liveRatesTypes[key];
32
+ }
33
+ });
34
+ });
35
+ let Theme = exports.Theme = function (Theme) {
2
36
  Theme["Dark"] = "dark";
3
37
  Theme["Light"] = "light";
4
38
  return Theme;
5
39
  }({});
6
- export let Size = function (Size) {
40
+ let Size = exports.Size = function (Size) {
7
41
  Size["MOBILE"] = "mobile";
8
42
  Size["TABLET"] = "tablet";
9
43
  Size["DESKTOP"] = "desktop";
10
44
  return Size;
11
45
  }({});
12
- export * from './dataTypes';
13
- export * from './liveRatesTypes';
14
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Theme","Size"],"sources":["../../../src/types/index.ts"],"sourcesContent":["import type { Locale } from '@oanda/mono-i18n';\nimport type { ReactElement } from 'react';\n\nexport type Voidable<T> = T | undefined;\nexport type VoidEffect = () => void;\nexport type Nullable<T> = T | null;\nexport type ValueOf<T> = T[keyof T];\nexport type KeysOf<T> = keyof T;\n\nexport enum Theme {\n Dark = 'dark',\n Light = 'light',\n}\n\nexport enum Size {\n MOBILE = 'mobile',\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\nexport type WidgetConfig = WidgetStyling &\n Pick<WidgetLink, 'logoLink'> & {\n locale: Locale;\n graphqlUrl: string;\n theme?: Theme;\n isParamError?: boolean;\n };\n\nexport interface WidgetStyling {\n brandingSpace?: 'horizontal' | 'vertical';\n fitContent?: boolean;\n layout?: 'compact' | 'full';\n removePadding?: boolean;\n}\n\nexport interface WidgetLink {\n logoLink?: string;\n linkArea?: 'full' | 'logo';\n}\n\nexport type RenderComponentParams = WidgetStyling &\n WidgetLink & {\n Component: ReactElement;\n };\n\nexport * from './dataTypes';\nexport * from './liveRatesTypes';\n"],"mappings":"AASA,WAAYA,KAAK,aAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAKjB,WAAYC,IAAI,aAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA;AA+BhB,cAAc,aAAa;AAC3B,cAAc,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_dataTypes","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_liveRatesTypes","Theme","Size"],"sources":["../../../src/types/index.ts"],"sourcesContent":["import type { Locale } from '@oanda/mono-i18n';\nimport type { ReactElement } from 'react';\n\nexport type Voidable<T> = T | undefined;\nexport type VoidEffect = () => void;\nexport type Nullable<T> = T | null;\nexport type ValueOf<T> = T[keyof T];\nexport type KeysOf<T> = keyof T;\n\nexport enum Theme {\n Dark = 'dark',\n Light = 'light',\n}\n\nexport enum Size {\n MOBILE = 'mobile',\n TABLET = 'tablet',\n DESKTOP = 'desktop',\n}\n\nexport type WidgetConfig = WidgetStyling &\n Pick<WidgetLink, 'logoLink'> & {\n locale: Locale;\n graphqlUrl: string;\n theme?: Theme;\n isParamError?: boolean;\n };\n\nexport interface WidgetStyling {\n brandingSpace?: 'horizontal' | 'vertical';\n fitContent?: boolean;\n layout?: 'compact' | 'full';\n removePadding?: boolean;\n}\n\nexport interface WidgetLink {\n logoLink?: string;\n linkArea?: 'full' | 'logo';\n}\n\nexport type RenderComponentParams = WidgetStyling &\n WidgetLink & {\n Component: ReactElement;\n };\n\nexport * from './dataTypes';\nexport * from './liveRatesTypes';\n"],"mappings":";;;;;;;;;;AA6CA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,eAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,eAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,eAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,eAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAAiC,IArCrBU,KAAK,GAAAL,OAAA,CAAAK,KAAA,aAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAAA,IAKLC,IAAI,GAAAN,OAAA,CAAAM,IAAA,aAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA","ignoreList":[]}
@@ -1,2 +1,6 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=liveRatesTypes.js.map
@@ -1,3 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatUpdatedTimestampTime = exports.formatUpdatedTimestampDate = exports.formatUpdatedTimestamp = void 0;
1
7
  const addLeadingZero = value => String(value).padStart(2, '0');
2
8
  const formatTimezone = timestamp => {
3
9
  const date = new Date(timestamp);
@@ -10,12 +16,14 @@ const formatUpdatedTimestampTime = timestamp => {
10
16
  const date = new Date(timestamp);
11
17
  return `${addLeadingZero(date.getHours())}:${addLeadingZero(date.getMinutes())}:${addLeadingZero(date.getSeconds())}`;
12
18
  };
19
+ exports.formatUpdatedTimestampTime = formatUpdatedTimestampTime;
13
20
  const formatUpdatedTimestampDate = (timestamp, dateLabel) => {
14
21
  const timestampDate = new Date(timestamp);
15
22
  return new Date().toDateString() === timestampDate.toDateString() ? dateLabel : timestampDate.toLocaleDateString(undefined, {
16
23
  dateStyle: 'short'
17
24
  });
18
25
  };
26
+ exports.formatUpdatedTimestampDate = formatUpdatedTimestampDate;
19
27
  const formatUpdatedTimestamp = (timestamp, dateLabel) => timestamp ? `${formatUpdatedTimestampTime(timestamp)}, ${formatUpdatedTimestampDate(timestamp, dateLabel)} ${formatTimezone(timestamp)}.` : '';
20
- export { formatUpdatedTimestamp, formatUpdatedTimestampDate, formatUpdatedTimestampTime };
28
+ exports.formatUpdatedTimestamp = formatUpdatedTimestamp;
21
29
  //# sourceMappingURL=dateUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.js","names":["addLeadingZero","value","String","padStart","formatTimezone","timestamp","date","Date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneValue","formatUpdatedTimestampTime","getHours","getMinutes","getSeconds","formatUpdatedTimestampDate","dateLabel","timestampDate","toDateString","toLocaleDateString","undefined","dateStyle","formatUpdatedTimestamp"],"sources":["../../../src/utils/dateUtils.ts"],"sourcesContent":["const addLeadingZero = (value: number) => String(value).padStart(2, '0');\n\nconst formatTimezone = (timestamp: string) => {\n const date = new Date(timestamp);\n const timezoneOffset = date.getTimezoneOffset();\n const timezoneSymbol = timezoneOffset < 0 ? '+' : '';\n const timezoneValue = timezoneOffset / -60;\n\n return `(UTC${timezoneSymbol}${timezoneOffset ? timezoneValue : ''})`;\n};\n\nconst formatUpdatedTimestampTime = (timestamp: string) => {\n const date = new Date(timestamp);\n\n return `${addLeadingZero(date.getHours())}:${addLeadingZero(\n date.getMinutes()\n )}:${addLeadingZero(date.getSeconds())}`;\n};\n\nconst formatUpdatedTimestampDate = (timestamp: string, dateLabel: string) => {\n const timestampDate = new Date(timestamp);\n\n return new Date().toDateString() === timestampDate.toDateString()\n ? dateLabel\n : timestampDate.toLocaleDateString(undefined, { dateStyle: 'short' });\n};\n\nconst formatUpdatedTimestamp = (timestamp: string, dateLabel: string) =>\n timestamp\n ? `${formatUpdatedTimestampTime(timestamp)}, ${formatUpdatedTimestampDate(timestamp, dateLabel)} ${formatTimezone(timestamp)}.`\n : '';\n\nexport {\n formatUpdatedTimestamp,\n formatUpdatedTimestampDate,\n formatUpdatedTimestampTime,\n};\n"],"mappings":"AAAA,MAAMA,cAAc,GAAIC,KAAa,IAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAExE,MAAMC,cAAc,GAAIC,SAAiB,IAAK;EAC5C,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC;EAChC,MAAMG,cAAc,GAAGF,IAAI,CAACG,iBAAiB,CAAC,CAAC;EAC/C,MAAMC,cAAc,GAAGF,cAAc,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE;EACpD,MAAMG,aAAa,GAAGH,cAAc,GAAG,CAAC,EAAE;EAE1C,OAAO,OAAOE,cAAc,GAAGF,cAAc,GAAGG,aAAa,GAAG,EAAE,GAAG;AACvE,CAAC;AAED,MAAMC,0BAA0B,GAAIP,SAAiB,IAAK;EACxD,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC;EAEhC,OAAO,GAAGL,cAAc,CAACM,IAAI,CAACO,QAAQ,CAAC,CAAC,CAAC,IAAIb,cAAc,CACzDM,IAAI,CAACQ,UAAU,CAAC,CAClB,CAAC,IAAId,cAAc,CAACM,IAAI,CAACS,UAAU,CAAC,CAAC,CAAC,EAAE;AAC1C,CAAC;AAED,MAAMC,0BAA0B,GAAGA,CAACX,SAAiB,EAAEY,SAAiB,KAAK;EAC3E,MAAMC,aAAa,GAAG,IAAIX,IAAI,CAACF,SAAS,CAAC;EAEzC,OAAO,IAAIE,IAAI,CAAC,CAAC,CAACY,YAAY,CAAC,CAAC,KAAKD,aAAa,CAACC,YAAY,CAAC,CAAC,GAC7DF,SAAS,GACTC,aAAa,CAACE,kBAAkB,CAACC,SAAS,EAAE;IAAEC,SAAS,EAAE;EAAQ,CAAC,CAAC;AACzE,CAAC;AAED,MAAMC,sBAAsB,GAAGA,CAAClB,SAAiB,EAAEY,SAAiB,KAClEZ,SAAS,GACL,GAAGO,0BAA0B,CAACP,SAAS,CAAC,KAAKW,0BAA0B,CAACX,SAAS,EAAEY,SAAS,CAAC,IAAIb,cAAc,CAACC,SAAS,CAAC,GAAG,GAC7H,EAAE;AAER,SACEkB,sBAAsB,EACtBP,0BAA0B,EAC1BJ,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"dateUtils.js","names":["addLeadingZero","value","String","padStart","formatTimezone","timestamp","date","Date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneValue","formatUpdatedTimestampTime","getHours","getMinutes","getSeconds","exports","formatUpdatedTimestampDate","dateLabel","timestampDate","toDateString","toLocaleDateString","undefined","dateStyle","formatUpdatedTimestamp"],"sources":["../../../src/utils/dateUtils.ts"],"sourcesContent":["const addLeadingZero = (value: number) => String(value).padStart(2, '0');\n\nconst formatTimezone = (timestamp: string) => {\n const date = new Date(timestamp);\n const timezoneOffset = date.getTimezoneOffset();\n const timezoneSymbol = timezoneOffset < 0 ? '+' : '';\n const timezoneValue = timezoneOffset / -60;\n\n return `(UTC${timezoneSymbol}${timezoneOffset ? timezoneValue : ''})`;\n};\n\nconst formatUpdatedTimestampTime = (timestamp: string) => {\n const date = new Date(timestamp);\n\n return `${addLeadingZero(date.getHours())}:${addLeadingZero(\n date.getMinutes()\n )}:${addLeadingZero(date.getSeconds())}`;\n};\n\nconst formatUpdatedTimestampDate = (timestamp: string, dateLabel: string) => {\n const timestampDate = new Date(timestamp);\n\n return new Date().toDateString() === timestampDate.toDateString()\n ? dateLabel\n : timestampDate.toLocaleDateString(undefined, { dateStyle: 'short' });\n};\n\nconst formatUpdatedTimestamp = (timestamp: string, dateLabel: string) =>\n timestamp\n ? `${formatUpdatedTimestampTime(timestamp)}, ${formatUpdatedTimestampDate(timestamp, dateLabel)} ${formatTimezone(timestamp)}.`\n : '';\n\nexport {\n formatUpdatedTimestamp,\n formatUpdatedTimestampDate,\n formatUpdatedTimestampTime,\n};\n"],"mappings":";;;;;;AAAA,MAAMA,cAAc,GAAIC,KAAa,IAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAExE,MAAMC,cAAc,GAAIC,SAAiB,IAAK;EAC5C,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC;EAChC,MAAMG,cAAc,GAAGF,IAAI,CAACG,iBAAiB,CAAC,CAAC;EAC/C,MAAMC,cAAc,GAAGF,cAAc,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE;EACpD,MAAMG,aAAa,GAAGH,cAAc,GAAG,CAAC,EAAE;EAE1C,OAAO,OAAOE,cAAc,GAAGF,cAAc,GAAGG,aAAa,GAAG,EAAE,GAAG;AACvE,CAAC;AAED,MAAMC,0BAA0B,GAAIP,SAAiB,IAAK;EACxD,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC;EAEhC,OAAO,GAAGL,cAAc,CAACM,IAAI,CAACO,QAAQ,CAAC,CAAC,CAAC,IAAIb,cAAc,CACzDM,IAAI,CAACQ,UAAU,CAAC,CAClB,CAAC,IAAId,cAAc,CAACM,IAAI,CAACS,UAAU,CAAC,CAAC,CAAC,EAAE;AAC1C,CAAC;AAACC,OAAA,CAAAJ,0BAAA,GAAAA,0BAAA;AAEF,MAAMK,0BAA0B,GAAGA,CAACZ,SAAiB,EAAEa,SAAiB,KAAK;EAC3E,MAAMC,aAAa,GAAG,IAAIZ,IAAI,CAACF,SAAS,CAAC;EAEzC,OAAO,IAAIE,IAAI,CAAC,CAAC,CAACa,YAAY,CAAC,CAAC,KAAKD,aAAa,CAACC,YAAY,CAAC,CAAC,GAC7DF,SAAS,GACTC,aAAa,CAACE,kBAAkB,CAACC,SAAS,EAAE;IAAEC,SAAS,EAAE;EAAQ,CAAC,CAAC;AACzE,CAAC;AAACP,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAEF,MAAMO,sBAAsB,GAAGA,CAACnB,SAAiB,EAAEa,SAAiB,KAClEb,SAAS,GACL,GAAGO,0BAA0B,CAACP,SAAS,CAAC,KAAKY,0BAA0B,CAACZ,SAAS,EAAEa,SAAS,CAAC,IAAId,cAAc,CAACC,SAAS,CAAC,GAAG,GAC7H,EAAE;AAACW,OAAA,CAAAQ,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,23 +1,30 @@
1
- import { Locale } from '@oanda/mono-i18n';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.validateLocale = exports.getLocale = void 0;
7
+ var _monoI18n = require("@oanda/mono-i18n");
2
8
  const validateLocale = locale => {
3
9
  const locales = ['en', 'zh', 'es', 'th', 'fr', 'de', 'pt', 'it', 'zhCN', 'vi', 'ja'];
4
10
  return locales.includes(locale?.substring(0, 2));
5
11
  };
12
+ exports.validateLocale = validateLocale;
6
13
  const getLocale = locale => {
7
14
  const languageCodeDictionary = {
8
- en: Locale.en,
9
- zh: Locale.zhTW,
10
- es: Locale.es,
11
- th: Locale.th,
12
- fr: Locale.fr,
13
- de: Locale.de,
14
- pt: Locale.pt,
15
- it: Locale.it,
16
- ['zh-CN']: Locale.zhCN,
17
- vi: Locale.vi,
18
- ja: Locale.ja
15
+ en: _monoI18n.Locale.en,
16
+ zh: _monoI18n.Locale.zhTW,
17
+ es: _monoI18n.Locale.es,
18
+ th: _monoI18n.Locale.th,
19
+ fr: _monoI18n.Locale.fr,
20
+ de: _monoI18n.Locale.de,
21
+ pt: _monoI18n.Locale.pt,
22
+ it: _monoI18n.Locale.it,
23
+ ['zh-CN']: _monoI18n.Locale.zhCN,
24
+ vi: _monoI18n.Locale.vi,
25
+ ja: _monoI18n.Locale.ja
19
26
  };
20
27
  return languageCodeDictionary[locale] || languageCodeDictionary.en;
21
28
  };
22
- export { getLocale, validateLocale };
29
+ exports.getLocale = getLocale;
23
30
  //# sourceMappingURL=getLocale.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLocale.js","names":["Locale","validateLocale","locale","locales","includes","substring","getLocale","languageCodeDictionary","en","zh","zhTW","es","th","fr","de","pt","it","zhCN","vi","ja"],"sources":["../../../src/utils/getLocale.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\n\nconst validateLocale = (locale?: string) => {\n const locales = [\n 'en',\n 'zh',\n 'es',\n 'th',\n 'fr',\n 'de',\n 'pt',\n 'it',\n 'zhCN',\n 'vi',\n 'ja',\n ];\n\n return locales.includes(locale?.substring(0, 2)!);\n};\n\nconst getLocale = (locale?: string) => {\n const languageCodeDictionary: Record<string, Locale> = {\n en: Locale.en,\n zh: Locale.zhTW,\n es: Locale.es,\n th: Locale.th,\n fr: Locale.fr,\n de: Locale.de,\n pt: Locale.pt,\n it: Locale.it,\n ['zh-CN']: Locale.zhCN,\n vi: Locale.vi,\n ja: Locale.ja,\n };\n\n return languageCodeDictionary[locale!] || languageCodeDictionary.en;\n};\n\nexport { getLocale, validateLocale };\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,kBAAkB;AAEzC,MAAMC,cAAc,GAAIC,MAAe,IAAK;EAC1C,MAAMC,OAAO,GAAG,CACd,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,CACL;EAED,OAAOA,OAAO,CAACC,QAAQ,CAACF,MAAM,EAAEG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAE,CAAC;AACnD,CAAC;AAED,MAAMC,SAAS,GAAIJ,MAAe,IAAK;EACrC,MAAMK,sBAA8C,GAAG;IACrDC,EAAE,EAAER,MAAM,CAACQ,EAAE;IACbC,EAAE,EAAET,MAAM,CAACU,IAAI;IACfC,EAAE,EAAEX,MAAM,CAACW,EAAE;IACbC,EAAE,EAAEZ,MAAM,CAACY,EAAE;IACbC,EAAE,EAAEb,MAAM,CAACa,EAAE;IACbC,EAAE,EAAEd,MAAM,CAACc,EAAE;IACbC,EAAE,EAAEf,MAAM,CAACe,EAAE;IACbC,EAAE,EAAEhB,MAAM,CAACgB,EAAE;IACb,CAAC,OAAO,GAAGhB,MAAM,CAACiB,IAAI;IACtBC,EAAE,EAAElB,MAAM,CAACkB,EAAE;IACbC,EAAE,EAAEnB,MAAM,CAACmB;EACb,CAAC;EAED,OAAOZ,sBAAsB,CAACL,MAAM,CAAE,IAAIK,sBAAsB,CAACC,EAAE;AACrE,CAAC;AAED,SAASF,SAAS,EAAEL,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"getLocale.js","names":["_monoI18n","require","validateLocale","locale","locales","includes","substring","exports","getLocale","languageCodeDictionary","en","Locale","zh","zhTW","es","th","fr","de","pt","it","zhCN","vi","ja"],"sources":["../../../src/utils/getLocale.ts"],"sourcesContent":["import { Locale } from '@oanda/mono-i18n';\n\nconst validateLocale = (locale?: string) => {\n const locales = [\n 'en',\n 'zh',\n 'es',\n 'th',\n 'fr',\n 'de',\n 'pt',\n 'it',\n 'zhCN',\n 'vi',\n 'ja',\n ];\n\n return locales.includes(locale?.substring(0, 2)!);\n};\n\nconst getLocale = (locale?: string) => {\n const languageCodeDictionary: Record<string, Locale> = {\n en: Locale.en,\n zh: Locale.zhTW,\n es: Locale.es,\n th: Locale.th,\n fr: Locale.fr,\n de: Locale.de,\n pt: Locale.pt,\n it: Locale.it,\n ['zh-CN']: Locale.zhCN,\n vi: Locale.vi,\n ja: Locale.ja,\n };\n\n return languageCodeDictionary[locale!] || languageCodeDictionary.en;\n};\n\nexport { getLocale, validateLocale };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,MAAMC,cAAc,GAAIC,MAAe,IAAK;EAC1C,MAAMC,OAAO,GAAG,CACd,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,CACL;EAED,OAAOA,OAAO,CAACC,QAAQ,CAACF,MAAM,EAAEG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAE,CAAC;AACnD,CAAC;AAACC,OAAA,CAAAL,cAAA,GAAAA,cAAA;AAEF,MAAMM,SAAS,GAAIL,MAAe,IAAK;EACrC,MAAMM,sBAA8C,GAAG;IACrDC,EAAE,EAAEC,gBAAM,CAACD,EAAE;IACbE,EAAE,EAAED,gBAAM,CAACE,IAAI;IACfC,EAAE,EAAEH,gBAAM,CAACG,EAAE;IACbC,EAAE,EAAEJ,gBAAM,CAACI,EAAE;IACbC,EAAE,EAAEL,gBAAM,CAACK,EAAE;IACbC,EAAE,EAAEN,gBAAM,CAACM,EAAE;IACbC,EAAE,EAAEP,gBAAM,CAACO,EAAE;IACbC,EAAE,EAAER,gBAAM,CAACQ,EAAE;IACb,CAAC,OAAO,GAAGR,gBAAM,CAACS,IAAI;IACtBC,EAAE,EAAEV,gBAAM,CAACU,EAAE;IACbC,EAAE,EAAEX,gBAAM,CAACW;EACb,CAAC;EAED,OAAOb,sBAAsB,CAACN,MAAM,CAAE,IAAIM,sBAAsB,CAACC,EAAE;AACrE,CAAC;AAACH,OAAA,CAAAC,SAAA,GAAAA,SAAA","ignoreList":[]}