@oanda/labs-crowd-view-widget 1.0.53 → 1.0.54

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 (246) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/dist/main/CrowdViewWidget/Main.js +4 -2
  3. package/dist/main/CrowdViewWidget/Main.js.map +1 -1
  4. package/dist/main/CrowdViewWidget/components/Chart/Chart.js +5 -28
  5. package/dist/main/CrowdViewWidget/components/Chart/Chart.js.map +1 -1
  6. package/dist/main/CrowdViewWidget/components/Chart/ChartWithData.js +3 -10
  7. package/dist/main/CrowdViewWidget/components/Chart/ChartWithData.js.map +1 -1
  8. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js +18 -0
  9. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js.map +1 -0
  10. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js +30 -0
  11. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js.map +1 -0
  12. package/dist/main/CrowdViewWidget/components/Chart/{utils → chartOptions}/getGridLines.js +5 -52
  13. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getGridLines.js.map +1 -0
  14. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js +54 -0
  15. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js.map +1 -0
  16. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js +65 -0
  17. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js.map +1 -0
  18. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js +60 -0
  19. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js.map +1 -0
  20. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js +53 -0
  21. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js.map +1 -0
  22. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js +31 -0
  23. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js.map +1 -0
  24. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js +42 -0
  25. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js.map +1 -0
  26. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js +75 -0
  27. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js.map +1 -0
  28. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/index.js +116 -0
  29. package/dist/main/CrowdViewWidget/components/Chart/chartOptions/index.js.map +1 -0
  30. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js +18 -0
  31. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js.map +1 -0
  32. package/dist/main/CrowdViewWidget/components/Chart/{utils → chartUtils}/getChartStyles.js +4 -4
  33. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getChartStyles.js.map +1 -0
  34. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js +14 -0
  35. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js.map +1 -0
  36. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js +42 -0
  37. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js.map +1 -0
  38. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js +14 -0
  39. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js.map +1 -0
  40. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js +108 -0
  41. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js.map +1 -0
  42. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/index.js +83 -0
  43. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/index.js.map +1 -0
  44. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js +15 -0
  45. package/dist/main/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js.map +1 -0
  46. package/dist/main/CrowdViewWidget/{utils/instrumentUtils.js → components/Chart/dataUtils/getInstrumentConfigForDivision.js} +3 -3
  47. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/getInstrumentConfigForDivision.js.map +1 -0
  48. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js +18 -0
  49. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js.map +1 -0
  50. package/dist/main/CrowdViewWidget/components/Chart/{utils → dataUtils}/index.js +8 -8
  51. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/index.js.map +1 -0
  52. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.js.map +1 -0
  53. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.js.map +1 -0
  54. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/processSentiments.js.map +1 -0
  55. package/dist/main/CrowdViewWidget/components/Chart/dataUtils/validateData.js.map +1 -0
  56. package/dist/main/CrowdViewWidget/components/Chart/getOption.js +103 -0
  57. package/dist/main/CrowdViewWidget/components/Chart/getOption.js.map +1 -0
  58. package/dist/main/CrowdViewWidget/components/Chart/index.js +11 -11
  59. package/dist/main/CrowdViewWidget/components/Chart/index.js.map +1 -1
  60. package/dist/main/CrowdViewWidget/components/Chart/useCrowdViewData.js +9 -9
  61. package/dist/main/CrowdViewWidget/components/Chart/useCrowdViewData.js.map +1 -1
  62. package/dist/main/CrowdViewWidget/components/Legend/Legend.js +15 -12
  63. package/dist/main/CrowdViewWidget/components/Legend/Legend.js.map +1 -1
  64. package/dist/main/CrowdViewWidget/components/Legend/LegendBar.js +5 -16
  65. package/dist/main/CrowdViewWidget/components/Legend/LegendBar.js.map +1 -1
  66. package/dist/main/CrowdViewWidget/constants.js +11 -13
  67. package/dist/main/CrowdViewWidget/constants.js.map +1 -1
  68. package/dist/main/translations/sources/en.json +2 -1
  69. package/dist/module/CrowdViewWidget/Main.js +4 -2
  70. package/dist/module/CrowdViewWidget/Main.js.map +1 -1
  71. package/dist/module/CrowdViewWidget/components/Chart/Chart.js +6 -29
  72. package/dist/module/CrowdViewWidget/components/Chart/Chart.js.map +1 -1
  73. package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js +3 -10
  74. package/dist/module/CrowdViewWidget/components/Chart/ChartWithData.js.map +1 -1
  75. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js +11 -0
  76. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.js.map +1 -0
  77. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js +23 -0
  78. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.js.map +1 -0
  79. package/dist/module/CrowdViewWidget/components/Chart/{utils → chartOptions}/getGridLines.js +5 -52
  80. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getGridLines.js.map +1 -0
  81. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js +46 -0
  82. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.js.map +1 -0
  83. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js +58 -0
  84. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.js.map +1 -0
  85. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js +53 -0
  86. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.js.map +1 -0
  87. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js +46 -0
  88. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.js.map +1 -0
  89. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js +24 -0
  90. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.js.map +1 -0
  91. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js +35 -0
  92. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.js.map +1 -0
  93. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js +68 -0
  94. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.js.map +1 -0
  95. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/index.js +11 -0
  96. package/dist/module/CrowdViewWidget/components/Chart/chartOptions/index.js.map +1 -0
  97. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js +11 -0
  98. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.js.map +1 -0
  99. package/dist/module/CrowdViewWidget/components/Chart/{utils → chartUtils}/getChartStyles.js +4 -4
  100. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getChartStyles.js.map +1 -0
  101. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js +6 -0
  102. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.js.map +1 -0
  103. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js +35 -0
  104. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getLabelData.js.map +1 -0
  105. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js +7 -0
  106. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getRectColor.js.map +1 -0
  107. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js +101 -0
  108. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.js.map +1 -0
  109. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/index.js +8 -0
  110. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/index.js.map +1 -0
  111. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js +8 -0
  112. package/dist/module/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.js.map +1 -0
  113. package/dist/module/CrowdViewWidget/{utils/instrumentUtils.js → components/Chart/dataUtils/getInstrumentConfigForDivision.js} +3 -3
  114. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getInstrumentConfigForDivision.js.map +1 -0
  115. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js +11 -0
  116. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.js.map +1 -0
  117. package/dist/module/CrowdViewWidget/components/Chart/{utils → dataUtils}/index.js +2 -2
  118. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/index.js.map +1 -0
  119. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processOrderPositionBooks.js.map +1 -0
  120. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processPriceCandles.js.map +1 -0
  121. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/processSentiments.js.map +1 -0
  122. package/dist/module/CrowdViewWidget/components/Chart/dataUtils/validateData.js.map +1 -0
  123. package/dist/module/CrowdViewWidget/components/Chart/getOption.js +96 -0
  124. package/dist/module/CrowdViewWidget/components/Chart/getOption.js.map +1 -0
  125. package/dist/module/CrowdViewWidget/components/Chart/index.js +1 -1
  126. package/dist/module/CrowdViewWidget/components/Chart/index.js.map +1 -1
  127. package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js +2 -2
  128. package/dist/module/CrowdViewWidget/components/Chart/useCrowdViewData.js.map +1 -1
  129. package/dist/module/CrowdViewWidget/components/Legend/Legend.js +15 -12
  130. package/dist/module/CrowdViewWidget/components/Legend/Legend.js.map +1 -1
  131. package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js +5 -16
  132. package/dist/module/CrowdViewWidget/components/Legend/LegendBar.js.map +1 -1
  133. package/dist/module/CrowdViewWidget/constants.js +9 -12
  134. package/dist/module/CrowdViewWidget/constants.js.map +1 -1
  135. package/dist/module/translations/sources/en.json +2 -1
  136. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.d.ts +2 -0
  137. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.d.ts +6 -0
  138. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getGridLines.d.ts +6 -0
  139. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.d.ts +9 -0
  140. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.d.ts +11 -0
  141. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.d.ts +7 -0
  142. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.d.ts +16 -0
  143. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.d.ts +7 -0
  144. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.d.ts +7 -0
  145. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.d.ts +9 -0
  146. package/dist/types/CrowdViewWidget/components/Chart/chartOptions/index.d.ts +10 -0
  147. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.d.ts +1 -0
  148. package/dist/types/CrowdViewWidget/components/Chart/{utils → chartUtils}/getChartStyles.d.ts +2 -2
  149. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.d.ts +1 -0
  150. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/getLabelData.d.ts +17 -0
  151. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/getRectColor.d.ts +1 -0
  152. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.d.ts +10 -0
  153. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/index.d.ts +7 -0
  154. package/dist/types/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.d.ts +1 -0
  155. package/dist/types/CrowdViewWidget/{utils/instrumentUtils.d.ts → components/Chart/dataUtils/getInstrumentConfigForDivision.d.ts} +2 -2
  156. package/dist/types/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.d.ts +2 -0
  157. package/dist/types/CrowdViewWidget/components/Chart/{utils → dataUtils}/index.d.ts +2 -2
  158. package/dist/types/CrowdViewWidget/components/Chart/index.d.ts +1 -1
  159. package/dist/types/CrowdViewWidget/components/Legend/Legend.d.ts +1 -4
  160. package/dist/types/CrowdViewWidget/components/Legend/LegendBar.d.ts +1 -3
  161. package/dist/types/CrowdViewWidget/constants.d.ts +3 -7
  162. package/package.json +3 -3
  163. package/src/CrowdViewWidget/Main.tsx +3 -2
  164. package/src/CrowdViewWidget/components/Chart/Chart.tsx +10 -34
  165. package/src/CrowdViewWidget/components/Chart/ChartWithData.tsx +2 -15
  166. package/src/CrowdViewWidget/components/Chart/chartOptions/getDataZoomConfig.ts +13 -0
  167. package/src/CrowdViewWidget/components/Chart/chartOptions/getGridConfig.ts +29 -0
  168. package/src/CrowdViewWidget/components/Chart/chartOptions/getGridLines.ts +84 -0
  169. package/src/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.ts +52 -0
  170. package/src/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.ts +82 -0
  171. package/src/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.ts +63 -0
  172. package/src/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.ts +63 -0
  173. package/src/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.ts +32 -0
  174. package/src/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.ts +43 -0
  175. package/src/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.ts +77 -0
  176. package/src/CrowdViewWidget/components/Chart/chartOptions/index.ts +10 -0
  177. package/src/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.ts +16 -0
  178. package/src/CrowdViewWidget/components/Chart/{utils → chartUtils}/getChartStyles.ts +9 -6
  179. package/src/CrowdViewWidget/components/Chart/chartUtils/getGradientColor.ts +16 -0
  180. package/src/CrowdViewWidget/components/Chart/chartUtils/getLabelData.ts +42 -0
  181. package/src/CrowdViewWidget/components/Chart/chartUtils/getRectColor.ts +27 -0
  182. package/src/CrowdViewWidget/components/Chart/chartUtils/getTooltipFormatter.ts +183 -0
  183. package/src/CrowdViewWidget/components/Chart/chartUtils/index.ts +7 -0
  184. package/src/CrowdViewWidget/components/Chart/chartUtils/isDifferenceGreaterThanTwoWeeks.ts +13 -0
  185. package/src/CrowdViewWidget/{utils/instrumentUtils.ts → components/Chart/dataUtils/getInstrumentConfigForDivision.ts} +2 -2
  186. package/src/CrowdViewWidget/components/Chart/dataUtils/getTimeSpanForGranularity.ts +14 -0
  187. package/src/CrowdViewWidget/components/Chart/{utils → dataUtils}/index.ts +2 -2
  188. package/src/CrowdViewWidget/components/Chart/getOption.ts +114 -0
  189. package/src/CrowdViewWidget/components/Chart/index.ts +1 -1
  190. package/src/CrowdViewWidget/components/Chart/useCrowdViewData.ts +3 -3
  191. package/src/CrowdViewWidget/components/Legend/Legend.tsx +24 -22
  192. package/src/CrowdViewWidget/components/Legend/LegendBar.tsx +13 -26
  193. package/src/CrowdViewWidget/constants.ts +20 -17
  194. package/src/translations/sources/en.json +2 -1
  195. package/test/components/Chart/utils/chartUtils.test.ts +7 -7
  196. package/test/components/Chart/utils/getChartStyles.test.ts +10 -10
  197. package/test/components/Chart/utils/processSentiments.test.ts +1 -1
  198. package/test/components/Legend.test.tsx +13 -21
  199. package/test/components/LegendBar.test.tsx +31 -51
  200. package/test/utils/instrumentUtils.test.ts +1 -1
  201. package/dist/main/CrowdViewWidget/components/Chart/chartOptions.js +0 -399
  202. package/dist/main/CrowdViewWidget/components/Chart/chartOptions.js.map +0 -1
  203. package/dist/main/CrowdViewWidget/components/Chart/utils/chartUtils.js +0 -126
  204. package/dist/main/CrowdViewWidget/components/Chart/utils/chartUtils.js.map +0 -1
  205. package/dist/main/CrowdViewWidget/components/Chart/utils/getChartStyles.js.map +0 -1
  206. package/dist/main/CrowdViewWidget/components/Chart/utils/getGridLines.js.map +0 -1
  207. package/dist/main/CrowdViewWidget/components/Chart/utils/index.js.map +0 -1
  208. package/dist/main/CrowdViewWidget/components/Chart/utils/processOrderPositionBooks.js.map +0 -1
  209. package/dist/main/CrowdViewWidget/components/Chart/utils/processPriceCandles.js.map +0 -1
  210. package/dist/main/CrowdViewWidget/components/Chart/utils/processSentiments.js.map +0 -1
  211. package/dist/main/CrowdViewWidget/components/Chart/utils/validateData.js.map +0 -1
  212. package/dist/main/CrowdViewWidget/utils/instrumentUtils.js.map +0 -1
  213. package/dist/module/CrowdViewWidget/components/Chart/chartOptions.js +0 -391
  214. package/dist/module/CrowdViewWidget/components/Chart/chartOptions.js.map +0 -1
  215. package/dist/module/CrowdViewWidget/components/Chart/utils/chartUtils.js +0 -113
  216. package/dist/module/CrowdViewWidget/components/Chart/utils/chartUtils.js.map +0 -1
  217. package/dist/module/CrowdViewWidget/components/Chart/utils/getChartStyles.js.map +0 -1
  218. package/dist/module/CrowdViewWidget/components/Chart/utils/getGridLines.js.map +0 -1
  219. package/dist/module/CrowdViewWidget/components/Chart/utils/index.js.map +0 -1
  220. package/dist/module/CrowdViewWidget/components/Chart/utils/processOrderPositionBooks.js.map +0 -1
  221. package/dist/module/CrowdViewWidget/components/Chart/utils/processPriceCandles.js.map +0 -1
  222. package/dist/module/CrowdViewWidget/components/Chart/utils/processSentiments.js.map +0 -1
  223. package/dist/module/CrowdViewWidget/components/Chart/utils/validateData.js.map +0 -1
  224. package/dist/module/CrowdViewWidget/utils/instrumentUtils.js.map +0 -1
  225. package/dist/types/CrowdViewWidget/components/Chart/utils/chartUtils.d.ts +0 -30
  226. package/dist/types/CrowdViewWidget/components/Chart/utils/getGridLines.d.ts +0 -97
  227. package/src/CrowdViewWidget/components/Chart/chartOptions.ts +0 -449
  228. package/src/CrowdViewWidget/components/Chart/utils/chartUtils.ts +0 -228
  229. package/src/CrowdViewWidget/components/Chart/utils/getGridLines.ts +0 -148
  230. /package/dist/main/CrowdViewWidget/components/Chart/{utils → dataUtils}/processOrderPositionBooks.js +0 -0
  231. /package/dist/main/CrowdViewWidget/components/Chart/{utils → dataUtils}/processPriceCandles.js +0 -0
  232. /package/dist/main/CrowdViewWidget/components/Chart/{utils → dataUtils}/processSentiments.js +0 -0
  233. /package/dist/main/CrowdViewWidget/components/Chart/{utils → dataUtils}/validateData.js +0 -0
  234. /package/dist/module/CrowdViewWidget/components/Chart/{utils → dataUtils}/processOrderPositionBooks.js +0 -0
  235. /package/dist/module/CrowdViewWidget/components/Chart/{utils → dataUtils}/processPriceCandles.js +0 -0
  236. /package/dist/module/CrowdViewWidget/components/Chart/{utils → dataUtils}/processSentiments.js +0 -0
  237. /package/dist/module/CrowdViewWidget/components/Chart/{utils → dataUtils}/validateData.js +0 -0
  238. /package/dist/types/CrowdViewWidget/components/Chart/{utils → dataUtils}/processOrderPositionBooks.d.ts +0 -0
  239. /package/dist/types/CrowdViewWidget/components/Chart/{utils → dataUtils}/processPriceCandles.d.ts +0 -0
  240. /package/dist/types/CrowdViewWidget/components/Chart/{utils → dataUtils}/processSentiments.d.ts +0 -0
  241. /package/dist/types/CrowdViewWidget/components/Chart/{utils → dataUtils}/validateData.d.ts +0 -0
  242. /package/dist/types/CrowdViewWidget/components/Chart/{chartOptions.d.ts → getOption.d.ts} +0 -0
  243. /package/src/CrowdViewWidget/components/Chart/{utils → dataUtils}/processOrderPositionBooks.ts +0 -0
  244. /package/src/CrowdViewWidget/components/Chart/{utils → dataUtils}/processPriceCandles.ts +0 -0
  245. /package/src/CrowdViewWidget/components/Chart/{utils → dataUtils}/processSentiments.ts +0 -0
  246. /package/src/CrowdViewWidget/components/Chart/{utils → dataUtils}/validateData.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGridLines.js","names":["_labsWidgetCommon","require","_constants","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","getGridLines","_ref","isDark","WIDTH","MAIN_HEIGHT","X_LABEL_SIZE","Y_SENTIMENT_LABEL_SIZE","CHART_CONFIG","getLineCommons","top","shape","x1","y1","x2","y2","right","bottom","left","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getGridLines.ts"],"sourcesContent":["import { getLineCommons } from '@oanda/labs-widget-common';\nimport type { GraphicComponentOption } from 'echarts';\n\nimport { CHART_CONFIG } from '../../../constants';\n\ninterface GetGridLinesParams {\n isDark: boolean;\n}\n\nexport const getGridLines = ({\n isDark,\n}: GetGridLinesParams): GraphicComponentOption[] => {\n const { WIDTH, MAIN_HEIGHT, X_LABEL_SIZE, Y_SENTIMENT_LABEL_SIZE } =\n CHART_CONFIG;\n return [\n // Top\n {\n ...getLineCommons(isDark),\n top: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: WIDTH,\n y2: 0,\n },\n },\n // Right\n {\n ...getLineCommons(isDark),\n right: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: MAIN_HEIGHT + X_LABEL_SIZE + 2,\n },\n },\n // Bottom\n {\n ...getLineCommons(isDark),\n bottom: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: WIDTH,\n y2: 0,\n },\n },\n // Left\n {\n ...getLineCommons(isDark),\n left: -2,\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: MAIN_HEIGHT + X_LABEL_SIZE + 2,\n },\n },\n // Y Sentiment Label\n {\n ...getLineCommons(isDark),\n left: Y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[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSeriesCandlestickConfig = void 0;
7
+ var _chromaJs = _interopRequireDefault(require("chroma-js"));
8
+ var _chartUtils = require("../chartUtils");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const getSeriesCandlestickConfig = _ref => {
11
+ let {
12
+ dates,
13
+ isGreaterThanTwoWeeks,
14
+ styles
15
+ } = _ref;
16
+ const {
17
+ candleLongColor,
18
+ candleShortColor
19
+ } = styles;
20
+ const labelsData = (0, _chartUtils.getLabelData)({
21
+ dates,
22
+ isGreaterThanTwoWeeks
23
+ });
24
+ return {
25
+ type: 'candlestick',
26
+ id: 'candlestick',
27
+ xAxisIndex: 0,
28
+ yAxisIndex: 0,
29
+ encode: {
30
+ x: 'dates',
31
+ y: ['open', 'close', 'low', 'high']
32
+ },
33
+ itemStyle: {
34
+ color: (0, _chromaJs.default)(candleLongColor).desaturate().css(),
35
+ color0: (0, _chromaJs.default)(candleShortColor).desaturate().css(),
36
+ borderColor: candleLongColor,
37
+ borderColor0: candleShortColor
38
+ },
39
+ emphasis: {
40
+ itemStyle: {
41
+ color: candleLongColor,
42
+ color0: candleShortColor
43
+ }
44
+ },
45
+ markPoint: {
46
+ data: labelsData,
47
+ symbol: 'circle',
48
+ symbolSize: 0
49
+ },
50
+ z: 2
51
+ };
52
+ };
53
+ exports.getSeriesCandlestickConfig = getSeriesCandlestickConfig;
54
+ //# sourceMappingURL=getSeriesCandlestickConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSeriesCandlestickConfig.js","names":["_chromaJs","_interopRequireDefault","require","_chartUtils","e","__esModule","default","getSeriesCandlestickConfig","_ref","dates","isGreaterThanTwoWeeks","styles","candleLongColor","candleShortColor","labelsData","getLabelData","type","id","xAxisIndex","yAxisIndex","encode","x","y","itemStyle","color","chroma","desaturate","css","color0","borderColor","borderColor0","emphasis","markPoint","data","symbol","symbolSize","z","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getSeriesCandlestickConfig.ts"],"sourcesContent":["import chroma from 'chroma-js';\nimport type { CandlestickSeriesOption } from 'echarts';\n\nimport { getLabelData } from '../chartUtils';\nimport type { ChartStyles } from '../chartUtils/getChartStyles';\n\ninterface GetSeriesCandlestickConfigParams {\n dates: string[];\n isGreaterThanTwoWeeks: boolean;\n styles: ChartStyles;\n}\n\nexport const getSeriesCandlestickConfig = ({\n dates,\n isGreaterThanTwoWeeks,\n styles,\n}: GetSeriesCandlestickConfigParams): CandlestickSeriesOption => {\n const { candleLongColor, candleShortColor } = styles;\n const labelsData = getLabelData({\n dates,\n isGreaterThanTwoWeeks,\n });\n\n return {\n type: 'candlestick',\n id: 'candlestick',\n xAxisIndex: 0,\n yAxisIndex: 0,\n encode: {\n x: 'dates',\n y: ['open', 'close', 'low', 'high'],\n },\n itemStyle: {\n color: chroma(candleLongColor).desaturate().css(),\n color0: chroma(candleShortColor).desaturate().css(),\n borderColor: candleLongColor,\n borderColor0: candleShortColor,\n },\n emphasis: {\n itemStyle: {\n color: candleLongColor,\n color0: candleShortColor,\n },\n },\n markPoint: {\n data: labelsData,\n symbol: 'circle',\n symbolSize: 0,\n },\n z: 2,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAA6C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAStC,MAAMG,0BAA0B,GAAGC,IAAA,IAIuB;EAAA,IAJtB;IACzCC,KAAK;IACLC,qBAAqB;IACrBC;EACgC,CAAC,GAAAH,IAAA;EACjC,MAAM;IAAEI,eAAe;IAAEC;EAAiB,CAAC,GAAGF,MAAM;EACpD,MAAMG,UAAU,GAAG,IAAAC,wBAAY,EAAC;IAC9BN,KAAK;IACLC;EACF,CAAC,CAAC;EAEF,OAAO;IACLM,IAAI,EAAE,aAAa;IACnBC,EAAE,EAAE,aAAa;IACjBC,UAAU,EAAE,CAAC;IACbC,UAAU,EAAE,CAAC;IACbC,MAAM,EAAE;MACNC,CAAC,EAAE,OAAO;MACVC,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM;IACpC,CAAC;IACDC,SAAS,EAAE;MACTC,KAAK,EAAE,IAAAC,iBAAM,EAACb,eAAe,CAAC,CAACc,UAAU,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC;MACjDC,MAAM,EAAE,IAAAH,iBAAM,EAACZ,gBAAgB,CAAC,CAACa,UAAU,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC;MACnDE,WAAW,EAAEjB,eAAe;MAC5BkB,YAAY,EAAEjB;IAChB,CAAC;IACDkB,QAAQ,EAAE;MACRR,SAAS,EAAE;QACTC,KAAK,EAAEZ,eAAe;QACtBgB,MAAM,EAAEf;MACV;IACF,CAAC;IACDmB,SAAS,EAAE;MACTC,IAAI,EAAEnB,UAAU;MAChBoB,MAAM,EAAE,QAAQ;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,CAAC,EAAE;EACL,CAAC;AACH,CAAC;AAACC,OAAA,CAAA9B,0BAAA,GAAAA,0BAAA","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSeriesHeatmapConfig = void 0;
7
+ var _chartUtils = require("../chartUtils");
8
+ const getSeriesHeatmapConfig = _ref => {
9
+ let {
10
+ bucketWidth,
11
+ buckets,
12
+ isDark,
13
+ sentimentThresholdMax,
14
+ sentimentThresholdMin
15
+ } = _ref;
16
+ return {
17
+ type: 'custom',
18
+ id: 'heatmap',
19
+ name: 'heatmap',
20
+ xAxisIndex: 0,
21
+ yAxisIndex: 0,
22
+ encode: {
23
+ x: 'dates',
24
+ y: 'bookPrices'
25
+ },
26
+ dimensions: ['dates', 'bookPrices', 'bookIndexes'],
27
+ clip: true,
28
+ renderItem: (_params, api) => {
29
+ const xVal = api.value(0);
30
+ const bucketIndex = api.value(2);
31
+ if (bucketIndex == null) {
32
+ return null;
33
+ }
34
+ const metaValues = buckets[bucketIndex];
35
+ const [rectWidth, rectHeight] = api.size([0, bucketWidth]);
36
+ const items = metaValues.map(_ref2 => {
37
+ let {
38
+ price,
39
+ sentiment
40
+ } = _ref2;
41
+ const start = api.coord([xVal, price]);
42
+ return {
43
+ shape: {
44
+ height: rectHeight,
45
+ width: rectWidth + 1,
46
+ x: start[0] - rectWidth / 2,
47
+ y: start[1] - rectHeight
48
+ },
49
+ style: {
50
+ fill: (0, _chartUtils.getRectColor)(sentiment, isDark, sentimentThresholdMin, sentimentThresholdMax)
51
+ },
52
+ type: 'rect'
53
+ };
54
+ });
55
+ return {
56
+ children: items,
57
+ emphasisDisabled: true,
58
+ type: 'group'
59
+ };
60
+ },
61
+ z: 1
62
+ };
63
+ };
64
+ exports.getSeriesHeatmapConfig = getSeriesHeatmapConfig;
65
+ //# sourceMappingURL=getSeriesHeatmapConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSeriesHeatmapConfig.js","names":["_chartUtils","require","getSeriesHeatmapConfig","_ref","bucketWidth","buckets","isDark","sentimentThresholdMax","sentimentThresholdMin","type","id","name","xAxisIndex","yAxisIndex","encode","x","y","dimensions","clip","renderItem","_params","api","xVal","value","bucketIndex","metaValues","rectWidth","rectHeight","size","items","map","_ref2","price","sentiment","start","coord","shape","height","width","style","fill","getRectColor","children","emphasisDisabled","z","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getSeriesHeatmapConfig.ts"],"sourcesContent":["import type {\n CustomSeriesOption,\n CustomSeriesRenderItemAPI,\n CustomSeriesRenderItemParams,\n} from 'echarts';\n\nimport { getRectColor } from '../chartUtils';\nimport type { Bucket } from '../types';\n\ninterface GetSeriesHeatmapConfigParams {\n bucketWidth: number;\n buckets: Bucket[][];\n isDark: boolean;\n sentimentThresholdMax: number;\n sentimentThresholdMin: number;\n}\n\nexport const getSeriesHeatmapConfig = ({\n bucketWidth,\n buckets,\n isDark,\n sentimentThresholdMax,\n sentimentThresholdMin,\n}: GetSeriesHeatmapConfigParams): CustomSeriesOption => {\n return {\n type: 'custom',\n id: 'heatmap',\n name: 'heatmap',\n xAxisIndex: 0,\n yAxisIndex: 0,\n encode: {\n x: 'dates',\n y: 'bookPrices',\n },\n dimensions: ['dates', 'bookPrices', 'bookIndexes'],\n clip: true,\n renderItem: (\n _params: CustomSeriesRenderItemParams,\n api: CustomSeriesRenderItemAPI\n ) => {\n const xVal = api.value(0);\n const bucketIndex = api.value(2) as number;\n\n if (bucketIndex == null) {\n return null;\n }\n\n const metaValues = buckets[bucketIndex];\n\n const [rectWidth, rectHeight] = api.size!([0, bucketWidth]) as number[];\n\n const items = metaValues.map(({ price, sentiment }: Bucket) => {\n const start = api.coord([xVal, price]);\n\n return {\n shape: {\n height: rectHeight,\n width: rectWidth + 1,\n x: start[0] - rectWidth / 2,\n y: start[1] - rectHeight,\n },\n style: {\n fill: getRectColor(\n sentiment,\n isDark,\n sentimentThresholdMin,\n sentimentThresholdMax\n ),\n },\n type: 'rect' as const,\n };\n });\n\n return {\n children: items,\n emphasisDisabled: true,\n type: 'group' as const,\n };\n },\n z: 1,\n };\n};\n"],"mappings":";;;;;;AAMA,IAAAA,WAAA,GAAAC,OAAA;AAWO,MAAMC,sBAAsB,GAAGC,IAAA,IAMkB;EAAA,IANjB;IACrCC,WAAW;IACXC,OAAO;IACPC,MAAM;IACNC,qBAAqB;IACrBC;EAC4B,CAAC,GAAAL,IAAA;EAC7B,OAAO;IACLM,IAAI,EAAE,QAAQ;IACdC,EAAE,EAAE,SAAS;IACbC,IAAI,EAAE,SAAS;IACfC,UAAU,EAAE,CAAC;IACbC,UAAU,EAAE,CAAC;IACbC,MAAM,EA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IAAI,EAAE;MACR,CAAC;IACH,CAAC;IACDmC,CAAC,EAAE;EACL,CAAC;AACH,CAAC;AAACC,OAAA,CAAA3C,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSeriesSentimentConfig = void 0;
7
+ var _labsWidgetCommon = require("@oanda/labs-widget-common");
8
+ const getSeriesSentimentConfig = _ref => {
9
+ let {
10
+ styles
11
+ } = _ref;
12
+ return {
13
+ type: 'line',
14
+ id: 'sentiment',
15
+ name: 'sentiment',
16
+ xAxisIndex: 1,
17
+ yAxisIndex: 1,
18
+ encode: {
19
+ x: 'dates',
20
+ y: 'sentimentShorts'
21
+ },
22
+ dimensions: ['dates', 'sentimentShorts', 'sentimentLongs'],
23
+ lineStyle: {
24
+ width: styles.sentimentOutlineWidth,
25
+ opacity: 1,
26
+ shadowColor: styles.sentimentOutlineColor,
27
+ shadowBlur: 3
28
+ },
29
+ emphasis: {
30
+ disabled: true
31
+ },
32
+ markLine: {
33
+ silent: true,
34
+ symbol: ['none', 'none'],
35
+ label: {
36
+ show: false
37
+ },
38
+ lineStyle: {
39
+ color: _labsWidgetCommon.colorPalette.grayLight,
40
+ width: 1
41
+ },
42
+ data: [{
43
+ yAxis: 20
44
+ }, {
45
+ yAxis: 50,
46
+ lineStyle: {
47
+ width: 1
48
+ }
49
+ }, {
50
+ yAxis: 80
51
+ }]
52
+ },
53
+ stack: 'sentiment',
54
+ showSymbol: false,
55
+ symbol: 'none',
56
+ z: 3
57
+ };
58
+ };
59
+ exports.getSeriesSentimentConfig = getSeriesSentimentConfig;
60
+ //# sourceMappingURL=getSeriesSentimentConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSeriesSentimentConfig.js","names":["_labsWidgetCommon","require","getSeriesSentimentConfig","_ref","styles","type","id","name","xAxisIndex","yAxisIndex","encode","x","y","dimensions","lineStyle","width","sentimentOutlineWidth","opacity","shadowColor","sentimentOutlineColor","shadowBlur","emphasis","disabled","markLine","silent","symbol","label","show","color","colorPalette","grayLight","data","yAxis","stack","showSymbol","z","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getSeriesSentimentConfig.ts"],"sourcesContent":["import { colorPalette } from '@oanda/labs-widget-common';\nimport type { LineSeriesOption } from 'echarts';\n\nimport type { ChartStyles } from '../chartUtils';\n\ninterface GetSeriesSentimentConfigParams {\n styles: ChartStyles;\n}\n\nexport const getSeriesSentimentConfig = ({\n styles,\n}: GetSeriesSentimentConfigParams): LineSeriesOption => {\n return {\n type: 'line',\n id: 'sentiment',\n name: 'sentiment',\n xAxisIndex: 1,\n yAxisIndex: 1,\n encode: {\n x: 'dates',\n y: 'sentimentShorts',\n },\n dimensions: ['dates', 'sentimentShorts', 'sentimentLongs'],\n lineStyle: {\n width: styles.sentimentOutlineWidth,\n opacity: 1,\n shadowColor: styles.sentimentOutlineColor,\n shadowBlur: 3,\n },\n emphasis: {\n disabled: true,\n },\n markLine: {\n silent: true,\n symbol: ['none', 'none'],\n label: {\n show: false,\n },\n lineStyle: {\n color: colorPalette.grayLight,\n width: 1,\n },\n data: [\n {\n yAxis: 20,\n },\n {\n yAxis: 50,\n lineStyle: {\n width: 1,\n },\n },\n {\n yAxis: 80,\n },\n ],\n },\n stack: 'sentiment',\n showSymbol: false,\n symbol: 'none',\n z: 3,\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AASO,MAAMC,wBAAwB,GAAGC,IAAA,IAEgB;EAAA,IAFf;IACvCC;EAC8B,CAAC,GAAAD,IAAA;EAC/B,OAAO;IACLE,IAAI,EAAE,MAAM;IACZC,EAAE,EAAE,WAAW;IACfC,IAAI,EAAE,WAAW;IACjBC,UAAU,EAAE,CAAC;IACbC,UAAU,EAAE,CAAC;IACbC,MAAM,EAAE;MACNC,CAAC,EAAE,OAAO;MACVC,CAAC,EAAE;IACL,CAAC;IACDC,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;IAC1DC,SAAS,EAAE;MACTC,KAAK,EAAEX,MAAM,CAACY,qBAAqB;MACnCC,OAAO,EAAE,CAAC;MACVC,WAAW,EAAEd,MAAM,CAACe,qBAAqB;MACzCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRC,QAAQ,EAAE;IACZ,CAAC;IACDC,QAAQ,EAAE;MACRC,MAAM,EAAE,IAAI;MACZC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;MACxBC,KAAK,EAAE;QACLC,IAAI,EAAE;MACR,CAAC;MACDb,SAAS,EAAE;QACTc,KAAK,EAAEC,8BAAY,CAACC,SAAS;QAC7Bf,KAAK,EAAE;MACT,CAAC;MACDgB,IAAI,EAAE,CACJ;QACEC,KAAK,EAAE;MACT,CAAC,EACD;QACEA,KAAK,EAAE,EAAE;QACTlB,SAAS,EAAE;UACTC,KAAK,EAAE;QACT;MACF,CAAC,EACD;QACEiB,KAAK,EAAE;MACT,CAAC;IAEL,CAAC;IACDC,KAAK,EAAE,WAAW;IAClBC,UAAU,EAAE,KAAK;IACjBT,MAAM,EAAE,MAAM;IACdU,CAAC,EAAE;EACL,CAAC;AACH,CAAC;AAACC,OAAA,CAAAlC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTooltipConfig = void 0;
7
+ var _chartUtils = require("../chartUtils");
8
+ const getTooltipConfig = _ref => {
9
+ let {
10
+ bookType,
11
+ bucketWidth,
12
+ buckets,
13
+ displayPrecision,
14
+ labelCallback,
15
+ selectedPriceRef,
16
+ tooltipLinesColor
17
+ } = _ref;
18
+ return {
19
+ trigger: 'axis',
20
+ formatter: params => (0, _chartUtils.getTooltipFormatter)({
21
+ bookType,
22
+ bucketWidth,
23
+ buckets,
24
+ labelCallback,
25
+ params: params,
26
+ selectedPrice: selectedPriceRef.current
27
+ }),
28
+ axisPointer: {
29
+ type: 'cross',
30
+ axis: 'x',
31
+ lineStyle: {
32
+ color: tooltipLinesColor
33
+ },
34
+ crossStyle: {
35
+ color: tooltipLinesColor
36
+ },
37
+ label: {
38
+ padding: 0,
39
+ lineHeight: 24,
40
+ formatter: params => {
41
+ if (params.axisDimension === 'y' && params.axisIndex === 0) {
42
+ selectedPriceRef.current = Number(params.value);
43
+ return " ".concat(Number(params.value).toFixed(displayPrecision), " ");
44
+ }
45
+ return '';
46
+ }
47
+ }
48
+ },
49
+ confine: true
50
+ };
51
+ };
52
+ exports.getTooltipConfig = getTooltipConfig;
53
+ //# sourceMappingURL=getTooltipConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTooltipConfig.js","names":["_chartUtils","require","getTooltipConfig","_ref","bookType","bucketWidth","buckets","displayPrecision","labelCallback","selectedPriceRef","tooltipLinesColor","trigger","formatter","params","getTooltipFormatter","selectedPrice","current","axisPointer","type","axis","lineStyle","color","crossStyle","label","padding","lineHeight","axisDimension","axisIndex","Number","value","concat","toFixed","confine","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getTooltipConfig.ts"],"sourcesContent":["import type { TooltipComponentOption } from 'echarts';\n\nimport type { BookType } from '../../../../gql/types/graphql';\nimport { getTooltipFormatter } from '../chartUtils';\nimport type { Bucket, TooltipParam } from '../types';\n\ninterface GetTooltipConfigParams {\n bookType: BookType;\n bucketWidth: number;\n buckets: Bucket[][];\n displayPrecision: number;\n labelCallback: (key: string, params?: Record<string, unknown>) => string;\n selectedPriceRef: { current: number };\n tooltipLinesColor: string;\n}\n\nexport const getTooltipConfig = ({\n bookType,\n bucketWidth,\n buckets,\n displayPrecision,\n labelCallback,\n selectedPriceRef,\n tooltipLinesColor,\n}: GetTooltipConfigParams): TooltipComponentOption => ({\n trigger: 'axis' as const,\n formatter: (params) =>\n getTooltipFormatter({\n bookType,\n bucketWidth,\n buckets,\n labelCallback,\n params: params as unknown as TooltipParam[],\n selectedPrice: selectedPriceRef.current,\n }),\n\n axisPointer: {\n type: 'cross' as const,\n axis: 'x' as const,\n lineStyle: {\n color: tooltipLinesColor,\n },\n crossStyle: {\n color: tooltipLinesColor,\n },\n label: {\n padding: 0,\n lineHeight: 24,\n formatter: (params: {\n axisDimension?: string;\n axisIndex?: number;\n value: unknown;\n }) => {\n if (params.axisDimension === 'y' && params.axisIndex === 0) {\n selectedPriceRef.current = Number(params.value);\n return ` ${Number(params.value).toFixed(displayPrecision)} `;\n }\n return '';\n },\n },\n },\n confine: true,\n});\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAaO,MAAMC,gBAAgB,GAAGC,IAAA;EAAA,IAAC;IAC/BC,QAAQ;IACRC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC,aAAa;IACbC,gBAAgB;IAChBC;EACsB,CAAC,GAAAP,IAAA;EAAA,OAA8B;IACrDQ,OAAO,EAAE,MAAe;IACxBC,SAAS,EAAGC,MAAM,IAChB,IAAAC,+BAAmB,EAAC;MAClBV,QAAQ;MACRC,WAAW;MACXC,OAAO;MACPE,aAAa;MACbK,MAAM,EAAEA,MAAmC;MAC3CE,aAAa,EAAEN,gBAAgB,CAACO;IAClC,CAAC,CAAC;IAEJC,WAAW,EAAE;MACXC,IAAI,EAAE,OAAgB;MACtBC,IAAI,EAAE,GAAY;MAClBC,SAAS,EAAE;QACTC,KAAK,EAAEX;MACT,CAAC;MACDY,UAAU,EAAE;QACVD,KAAK,EAAEX;MACT,CAAC;MACDa,KAAK,EAAE;QACLC,OAAO,EAAE,CAAC;QACVC,UAAU,EAAE,EAAE;QACdb,SAAS,EAAGC,MAIX,IAAK;UACJ,IAAIA,MAAM,CAACa,aAAa,KAAK,GAAG,IAAIb,MAAM,CAACc,SAAS,KAAK,CAAC,EAAE;YAC1DlB,gBAAgB,CAACO,OAAO,GAAGY,MAAM,CAACf,MAAM,CAACgB,KAAK,CAAC;YAC/C,WAAAC,MAAA,CAAWF,MAAM,CAACf,MAAM,CAACgB,KAAK,CAAC,CAACE,OAAO,CAACxB,gBAAgB,CAAC;UAC3D;UACA,OAAO,EAAE;QACX;MACF;IACF,CAAC;IACDyB,OAAO,EAAE;EACX,CAAC;AAAA,CAAC;AAACC,OAAA,CAAA/B,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getVisualMapConfig = void 0;
7
+ var _constants = require("../../../constants");
8
+ const getVisualMapConfig = _ref => {
9
+ let {
10
+ sentimentLongColor,
11
+ sentimentShortColor
12
+ } = _ref;
13
+ return {
14
+ show: false,
15
+ dimension: 1,
16
+ seriesId: 'sentiment',
17
+ pieces: [{
18
+ lt: _constants.CHART_CONFIG.SENTIMENT_MAX / 2,
19
+ color: sentimentShortColor
20
+ }, {
21
+ gte: _constants.CHART_CONFIG.SENTIMENT_MAX / 2,
22
+ lte: _constants.CHART_CONFIG.SENTIMENT_MAX,
23
+ color: sentimentLongColor
24
+ }, {
25
+ gt: _constants.CHART_CONFIG.SENTIMENT_MAX,
26
+ color: sentimentLongColor
27
+ }]
28
+ };
29
+ };
30
+ exports.getVisualMapConfig = getVisualMapConfig;
31
+ //# sourceMappingURL=getVisualMapConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVisualMapConfig.js","names":["_constants","require","getVisualMapConfig","_ref","sentimentLongColor","sentimentShortColor","show","dimension","seriesId","pieces","lt","CHART_CONFIG","SENTIMENT_MAX","color","gte","lte","gt","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getVisualMapConfig.ts"],"sourcesContent":["import type { VisualMapComponentOption } from 'echarts';\n\nimport { CHART_CONFIG } from '../../../constants';\n\ninterface GetVisualMapConfigParams {\n sentimentLongColor: string;\n sentimentShortColor: string;\n}\n\nexport const getVisualMapConfig = ({\n sentimentLongColor,\n sentimentShortColor,\n}: GetVisualMapConfigParams): VisualMapComponentOption => ({\n show: false,\n dimension: 1,\n seriesId: 'sentiment',\n pieces: [\n {\n lt: CHART_CONFIG.SENTIMENT_MAX / 2,\n color: sentimentShortColor,\n },\n {\n gte: CHART_CONFIG.SENTIMENT_MAX / 2,\n lte: CHART_CONFIG.SENTIMENT_MAX,\n color: sentimentLongColor,\n },\n {\n gt: CHART_CONFIG.SENTIMENT_MAX,\n color: sentimentLongColor,\n },\n ],\n});\n"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAOO,MAAMC,kBAAkB,GAAGC,IAAA;EAAA,IAAC;IACjCC,kBAAkB;IAClBC;EACwB,CAAC,GAAAF,IAAA;EAAA,OAAgC;IACzDG,IAAI,EAAE,KAAK;IACXC,SAAS,EAAE,CAAC;IACZC,QAAQ,EAAE,WAAW;IACrBC,MAAM,EAAE,CACN;MACEC,EAAE,EAAEC,uBAAY,CAACC,aAAa,GAAG,CAAC;MAClCC,KAAK,EAAER;IACT,CAAC,EACD;MACES,GAAG,EAAEH,uBAAY,CAACC,aAAa,GAAG,CAAC;MACnCG,GAAG,EAAEJ,uBAAY,CAACC,aAAa;MAC/BC,KAAK,EAAET;IACT,CAAC,EACD;MACEY,EAAE,EAAEL,uBAAY,CAACC,aAAa;MAC9BC,KAAK,EAAET;IACT,CAAC;EAEL,CAAC;AAAA,CAAC;AAACa,OAAA,CAAAf,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getXAxisConfig = void 0;
7
+ var _chartUtils = require("../chartUtils");
8
+ const getXAxisConfig = _ref => {
9
+ let {
10
+ dates,
11
+ isGreaterThanTwoWeeks
12
+ } = _ref;
13
+ return [{
14
+ type: 'category',
15
+ id: 'main-xAxis',
16
+ name: 'xAxis-less-than-two-weeks',
17
+ nameTextStyle: {
18
+ fontSize: 0
19
+ },
20
+ axisTick: {
21
+ show: false
22
+ },
23
+ axisLabel: {
24
+ padding: [8, 16, 8, 16],
25
+ margin: 0,
26
+ formatter: value => (0, _chartUtils.formatXAxisLabel)(value, isGreaterThanTwoWeeks)
27
+ }
28
+ }, {
29
+ type: 'category',
30
+ gridIndex: 1,
31
+ show: false,
32
+ axisTick: {
33
+ show: false
34
+ },
35
+ axisLabel: {
36
+ show: false
37
+ },
38
+ data: dates
39
+ }];
40
+ };
41
+ exports.getXAxisConfig = getXAxisConfig;
42
+ //# sourceMappingURL=getXAxisConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getXAxisConfig.js","names":["_chartUtils","require","getXAxisConfig","_ref","dates","isGreaterThanTwoWeeks","type","id","name","nameTextStyle","fontSize","axisTick","show","axisLabel","padding","margin","formatter","value","formatXAxisLabel","gridIndex","data","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getXAxisConfig.ts"],"sourcesContent":["import type { XAXisComponentOption } from 'echarts';\n\nimport { formatXAxisLabel } from '../chartUtils';\n\ninterface GetXAxisConfigParams {\n dates: string[];\n isGreaterThanTwoWeeks: boolean;\n}\n\nexport const getXAxisConfig = ({\n dates,\n isGreaterThanTwoWeeks,\n}: GetXAxisConfigParams): XAXisComponentOption[] => [\n {\n type: 'category',\n id: 'main-xAxis',\n name: 'xAxis-less-than-two-weeks',\n nameTextStyle: {\n fontSize: 0,\n },\n axisTick: {\n show: false,\n },\n axisLabel: {\n padding: [8, 16, 8, 16],\n margin: 0,\n formatter: (value: unknown) =>\n formatXAxisLabel(value, isGreaterThanTwoWeeks),\n },\n },\n {\n type: 'category',\n gridIndex: 1,\n show: false,\n axisTick: {\n show: false,\n },\n axisLabel: {\n show: false,\n },\n data: dates,\n },\n];\n"],"mappings":";;;;;;AAEA,IAAAA,WAAA,GAAAC,OAAA;AAOO,MAAMC,cAAc,GAAGC,IAAA;EAAA,IAAC;IAC7BC,KAAK;IACLC;EACoB,CAAC,GAAAF,IAAA;EAAA,OAA6B,CAClD;IACEG,IAAI,EAAE,UAAU;IAChBC,EAAE,EAAE,YAAY;IAChBC,IAAI,EAAE,2BAA2B;IACjCC,aAAa,EAAE;MACbC,QAAQ,EAAE;IACZ,CAAC;IACDC,QAAQ,EAAE;MACRC,IAAI,EAAE;IACR,CAAC;IACDC,SAAS,EAAE;MACTC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;MACvBC,MAAM,EAAE,CAAC;MACTC,SAAS,EAAGC,KAAc,IACxB,IAAAC,4BAAgB,EAACD,KAAK,EAAEZ,qBAAqB;IACjD;EACF,CAAC,EACD;IACEC,IAAI,EAAE,UAAU;IAChBa,SAAS,EAAE,CAAC;IACZP,IAAI,EAAE,KAAK;IACXD,QAAQ,EAAE;MACRC,IAAI,EAAE;IACR,CAAC;IACDC,SAAS,EAAE;MACTD,IAAI,EAAE;IACR,CAAC;IACDQ,IAAI,EAAEhB;EACR,CAAC,CACF;AAAA;AAACiB,OAAA,CAAAnB,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getYAxisConfig = void 0;
7
+ var _constants = require("../../../constants");
8
+ const getYAxisConfig = _ref => {
9
+ let {
10
+ bucketWidth,
11
+ displayPrecision,
12
+ isDesktop,
13
+ labelCallback
14
+ } = _ref;
15
+ return [{
16
+ type: 'value',
17
+ gridIndex: 0,
18
+ position: 'right',
19
+ min: val => val.min - bucketWidth * _constants.BUCKET_CONFIG.PRICE_MARGIN_MULTIPLIER,
20
+ max: val => val.max + bucketWidth * _constants.BUCKET_CONFIG.PRICE_MARGIN_MULTIPLIER,
21
+ axisLine: {
22
+ show: false
23
+ },
24
+ axisTick: {
25
+ show: false
26
+ },
27
+ axisLabel: {
28
+ showMinLabel: false,
29
+ showMaxLabel: false,
30
+ formatter: value => value.toFixed(displayPrecision - 1)
31
+ }
32
+ }, {
33
+ type: 'value',
34
+ gridIndex: 1,
35
+ position: 'left',
36
+ min: _constants.CHART_CONFIG.SENTIMENT_MIN,
37
+ max: _constants.CHART_CONFIG.SENTIMENT_MAX,
38
+ axisLine: {
39
+ show: false
40
+ },
41
+ axisTick: {
42
+ show: false
43
+ },
44
+ axisPointer: {
45
+ show: false
46
+ },
47
+ axisLabel: {
48
+ margin: isDesktop ? 4 : 2,
49
+ lineHeight: 20,
50
+ verticalAlignMinLabel: 'bottom',
51
+ verticalAlignMaxLabel: 'top',
52
+ customValues: [_constants.CHART_CONFIG.SENTIMENT_MIN, _constants.CHART_CONFIG.SENTIMENT_MAX / 5, _constants.CHART_CONFIG.SENTIMENT_MAX / 2, _constants.CHART_CONFIG.SENTIMENT_MAX * 4 / 5, _constants.CHART_CONFIG.SENTIMENT_MAX],
53
+ formatter: value => {
54
+ if (value === _constants.CHART_CONFIG.SENTIMENT_MIN) {
55
+ return "".concat(labelCallback('short'));
56
+ }
57
+ if (value === _constants.CHART_CONFIG.SENTIMENT_MAX) {
58
+ return "".concat(labelCallback('long'));
59
+ }
60
+ if (value === _constants.CHART_CONFIG.SENTIMENT_MAX / 2) {
61
+ return '50%';
62
+ }
63
+ if (value === _constants.CHART_CONFIG.SENTIMENT_MAX / 5) {
64
+ return '80%';
65
+ }
66
+ if (value === _constants.CHART_CONFIG.SENTIMENT_MAX * 4 / 5) {
67
+ return '20%';
68
+ }
69
+ return '';
70
+ }
71
+ }
72
+ }];
73
+ };
74
+ exports.getYAxisConfig = getYAxisConfig;
75
+ //# sourceMappingURL=getYAxisConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getYAxisConfig.js","names":["_constants","require","getYAxisConfig","_ref","bucketWidth","displayPrecision","isDesktop","labelCallback","type","gridIndex","position","min","val","BUCKET_CONFIG","PRICE_MARGIN_MULTIPLIER","max","axisLine","show","axisTick","axisLabel","showMinLabel","showMaxLabel","formatter","value","toFixed","CHART_CONFIG","SENTIMENT_MIN","SENTIMENT_MAX","axisPointer","margin","lineHeight","verticalAlignMinLabel","verticalAlignMaxLabel","customValues","concat","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/getYAxisConfig.ts"],"sourcesContent":["import type { YAXisComponentOption } from 'echarts';\n\nimport { BUCKET_CONFIG, CHART_CONFIG } from '../../../constants';\n\ninterface GetYAxisConfigParams {\n bucketWidth: number;\n displayPrecision: number;\n isDesktop: boolean;\n labelCallback: (key: string, params?: Record<string, unknown>) => string;\n}\n\nexport const getYAxisConfig = ({\n bucketWidth,\n displayPrecision,\n isDesktop,\n labelCallback,\n}: GetYAxisConfigParams): YAXisComponentOption[] => [\n {\n type: 'value',\n gridIndex: 0,\n position: 'right',\n min: (val: { min: number }) =>\n val.min - bucketWidth * BUCKET_CONFIG.PRICE_MARGIN_MULTIPLIER,\n max: (val: { max: number }) =>\n val.max + bucketWidth * BUCKET_CONFIG.PRICE_MARGIN_MULTIPLIER,\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value: number) => value.toFixed(displayPrecision - 1),\n },\n },\n {\n type: 'value',\n gridIndex: 1,\n position: 'left',\n min: CHART_CONFIG.SENTIMENT_MIN,\n max: CHART_CONFIG.SENTIMENT_MAX,\n axisLine: { show: false },\n axisTick: { show: false },\n axisPointer: {\n show: false,\n },\n axisLabel: {\n margin: isDesktop ? 4 : 2,\n lineHeight: 20,\n verticalAlignMinLabel: 'bottom',\n verticalAlignMaxLabel: 'top',\n customValues: [\n CHART_CONFIG.SENTIMENT_MIN,\n CHART_CONFIG.SENTIMENT_MAX / 5,\n CHART_CONFIG.SENTIMENT_MAX / 2,\n (CHART_CONFIG.SENTIMENT_MAX * 4) / 5,\n CHART_CONFIG.SENTIMENT_MAX,\n ],\n formatter: (value: number) => {\n if (value === CHART_CONFIG.SENTIMENT_MIN) {\n return `${labelCallback('short')}`;\n }\n if (value === CHART_CONFIG.SENTIMENT_MAX) {\n return `${labelCallback('long')}`;\n }\n if (value === CHART_CONFIG.SENTIMENT_MAX / 2) {\n return '50%';\n }\n if (value === CHART_CONFIG.SENTIMENT_MAX / 5) {\n return '80%';\n }\n if (value === (CHART_CONFIG.SENTIMENT_MAX * 4) / 5) {\n return '20%';\n }\n return '';\n },\n },\n },\n];\n"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AASO,MAAMC,cAAc,GAAGC,IAAA;EAAA,IAAC;IAC7BC,WAAW;IACXC,gBAAgB;IAChBC,SAAS;IACTC;EACoB,CAAC,GAAAJ,IAAA;EAAA,OAA6B,CAClD;IACEK,IAAI,EAAE,OAAO;IACbC,SAAS,EAAE,CAAC;IACZC,QAAQ,EAAE,OAAO;IACjBC,GAAG,EAAGC,GAAoB,IACxBA,GAAG,CAACD,GAAG,GAAGP,WAAW,GAAGS,wBAAa,CAACC,uBAAuB;IAC/DC,GAAG,EAAGH,GAAoB,IACxBA,GAAG,CAACG,GAAG,GAAGX,WAAW,GAAGS,wBAAa,CAACC,uBAAuB;IAC/DE,QAAQ,EAAE;MAAEC,IAAI,EAAE;IAAM,CAAC;IACzBC,QAAQ,EAAE;MAAED,IAAI,EAAE;IAAM,CAAC;IACzBE,SAAS,EAAE;MACTC,YAAY,EAAE,KAAK;MACnBC,YAAY,EAAE,KAAK;MACnBC,SAAS,EAAGC,KAAa,IAAKA,KAAK,CAACC,OAAO,CAACnB,gBAAgB,GAAG,CAAC;IAClE;EACF,CAAC,EACD;IACEG,IAAI,EAAE,OAAO;IACbC,SAAS,EAAE,CAAC;IACZC,QAAQ,EAAE,MAAM;IAChBC,GAAG,EAAEc,uBAAY,CAACC,aAAa;IAC/BX,GAAG,EAAEU,uBAAY,CAACE,aAAa;IAC/BX,QAAQ,EAAE;MAAEC,IAAI,EAAE;IAAM,CAAC;IACzBC,QAAQ,EAAE;MAAED,IAAI,EAAE;IAAM,CAAC;IACzBW,WAAW,EAAE;MACXX,IAAI,EAAE;IACR,CAAC;IACDE,SAAS,EAAE;MACTU,MAAM,EAAEvB,SAAS,GAAG,CAAC,GAAG,CAAC;MACzBwB,UAAU,EAAE,EAAE;MACdC,qBAAqB,EAAE,QAAQ;MAC/BC,qBAAqB,EAAE,KAAK;MAC5BC,YAAY,EAAE,CACZR,uBAAY,CAACC,aAAa,EAC1BD,uBAAY,CAACE,aAAa,GAAG,CAAC,EAC9BF,uBAAY,CAACE,aAAa,GAAG,CAAC,EAC7BF,uBAAY,CAACE,aAAa,GAAG,CAAC,GAAI,CAAC,EACpCF,uBAAY,CAACE,aAAa,CAC3B;MACDL,SAAS,EAAGC,KAAa,IAAK;QAC5B,IAAIA,KAAK,KAAKE,uBAAY,CAACC,aAAa,EAAE;UACxC,UAAAQ,MAAA,CAAU3B,aAAa,CAAC,OAAO,CAAC;QAClC;QACA,IAAIgB,KAAK,KAAKE,uBAAY,CAACE,aAAa,EAAE;UACxC,UAAAO,MAAA,CAAU3B,aAAa,CAAC,MAAM,CAAC;QACjC;QACA,IAAIgB,KAAK,KAAKE,uBAAY,CAACE,aAAa,GAAG,CAAC,EAAE;UAC5C,OAAO,KAAK;QACd;QACA,IAAIJ,KAAK,KAAKE,uBAAY,CAACE,aAAa,GAAG,CAAC,EAAE;UAC5C,OAAO,KAAK;QACd;QACA,IAAIJ,KAAK,KAAME,uBAAY,CAACE,aAAa,GAAG,CAAC,GAAI,CAAC,EAAE;UAClD,OAAO,KAAK;QACd;QACA,OAAO,EAAE;MACX;IACF;EACF,CAAC,CACF;AAAA;AAACQ,OAAA,CAAAjC,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _getDataZoomConfig = require("./getDataZoomConfig");
7
+ Object.keys(_getDataZoomConfig).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _getDataZoomConfig[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _getDataZoomConfig[key];
14
+ }
15
+ });
16
+ });
17
+ var _getGridConfig = require("./getGridConfig");
18
+ Object.keys(_getGridConfig).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _getGridConfig[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _getGridConfig[key];
25
+ }
26
+ });
27
+ });
28
+ var _getGridLines = require("./getGridLines");
29
+ Object.keys(_getGridLines).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _getGridLines[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _getGridLines[key];
36
+ }
37
+ });
38
+ });
39
+ var _getSeriesCandlestickConfig = require("./getSeriesCandlestickConfig");
40
+ Object.keys(_getSeriesCandlestickConfig).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _getSeriesCandlestickConfig[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _getSeriesCandlestickConfig[key];
47
+ }
48
+ });
49
+ });
50
+ var _getSeriesHeatmapConfig = require("./getSeriesHeatmapConfig");
51
+ Object.keys(_getSeriesHeatmapConfig).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _getSeriesHeatmapConfig[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _getSeriesHeatmapConfig[key];
58
+ }
59
+ });
60
+ });
61
+ var _getSeriesSentimentConfig = require("./getSeriesSentimentConfig");
62
+ Object.keys(_getSeriesSentimentConfig).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _getSeriesSentimentConfig[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _getSeriesSentimentConfig[key];
69
+ }
70
+ });
71
+ });
72
+ var _getTooltipConfig = require("./getTooltipConfig");
73
+ Object.keys(_getTooltipConfig).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _getTooltipConfig[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _getTooltipConfig[key];
80
+ }
81
+ });
82
+ });
83
+ var _getVisualMapConfig = require("./getVisualMapConfig");
84
+ Object.keys(_getVisualMapConfig).forEach(function (key) {
85
+ if (key === "default" || key === "__esModule") return;
86
+ if (key in exports && exports[key] === _getVisualMapConfig[key]) return;
87
+ Object.defineProperty(exports, key, {
88
+ enumerable: true,
89
+ get: function () {
90
+ return _getVisualMapConfig[key];
91
+ }
92
+ });
93
+ });
94
+ var _getXAxisConfig = require("./getXAxisConfig");
95
+ Object.keys(_getXAxisConfig).forEach(function (key) {
96
+ if (key === "default" || key === "__esModule") return;
97
+ if (key in exports && exports[key] === _getXAxisConfig[key]) return;
98
+ Object.defineProperty(exports, key, {
99
+ enumerable: true,
100
+ get: function () {
101
+ return _getXAxisConfig[key];
102
+ }
103
+ });
104
+ });
105
+ var _getYAxisConfig = require("./getYAxisConfig");
106
+ Object.keys(_getYAxisConfig).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _getYAxisConfig[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _getYAxisConfig[key];
113
+ }
114
+ });
115
+ });
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_getDataZoomConfig","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getGridConfig","_getGridLines","_getSeriesCandlestickConfig","_getSeriesHeatmapConfig","_getSeriesSentimentConfig","_getTooltipConfig","_getVisualMapConfig","_getXAxisConfig","_getYAxisConfig"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartOptions/index.ts"],"sourcesContent":["export * from './getDataZoomConfig';\nexport * from './getGridConfig';\nexport * from './getGridLines';\nexport * from './getSeriesCandlestickConfig';\nexport * from './getSeriesHeatmapConfig';\nexport * from './getSeriesSentimentConfig';\nexport * from './getTooltipConfig';\nexport * from './getVisualMapConfig';\nexport * from './getXAxisConfig';\nexport * from './getYAxisConfig';\n"],"mappings":";;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,kBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,kBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,kBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,cAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,cAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,cAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,cAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,aAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,aAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD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AA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAa,eAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,eAAA,CAAAb,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatXAxisLabel = void 0;
7
+ var _constants = require("../../../constants");
8
+ const formatXAxisLabel = (value, isGreaterThanTwoWeeks) => {
9
+ const date = new Date(value);
10
+ return isGreaterThanTwoWeeks ? "".concat(date.toLocaleTimeString(undefined, {
11
+ hour: '2-digit',
12
+ minute: '2-digit'
13
+ })) : "".concat(_constants.CHART_CONFIG.X_AXIS_DATE_PADDING).concat(date.toLocaleDateString(undefined, {
14
+ day: 'numeric'
15
+ })).concat(_constants.CHART_CONFIG.X_AXIS_DATE_PADDING);
16
+ };
17
+ exports.formatXAxisLabel = formatXAxisLabel;
18
+ //# sourceMappingURL=formatXAxisLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatXAxisLabel.js","names":["_constants","require","formatXAxisLabel","value","isGreaterThanTwoWeeks","date","Date","concat","toLocaleTimeString","undefined","hour","minute","CHART_CONFIG","X_AXIS_DATE_PADDING","toLocaleDateString","day","exports"],"sources":["../../../../../../src/CrowdViewWidget/components/Chart/chartUtils/formatXAxisLabel.ts"],"sourcesContent":["import { CHART_CONFIG } from '../../../constants';\n\nexport const formatXAxisLabel = (\n value: unknown,\n isGreaterThanTwoWeeks: boolean\n) => {\n const date = new Date(value as string);\n return isGreaterThanTwoWeeks\n ? `${date.toLocaleTimeString(undefined, {\n hour: '2-digit',\n minute: '2-digit',\n })}`\n : `${CHART_CONFIG.X_AXIS_DATE_PADDING}${date.toLocaleDateString(undefined, {\n day: 'numeric',\n })}${CHART_CONFIG.X_AXIS_DATE_PADDING}`;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAGA,CAC9BC,KAAc,EACdC,qBAA8B,KAC3B;EACH,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACH,KAAe,CAAC;EACtC,OAAOC,qBAAqB,MAAAG,MAAA,CACrBF,IAAI,CAACG,kBAAkB,CAACC,SAAS,EAAE;IACpCC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC,CAAC,OAAAJ,MAAA,CACCK,uBAAY,CAACC,mBAAmB,EAAAN,MAAA,CAAGF,IAAI,CAACS,kBAAkB,CAACL,SAAS,EAAE;IACvEM,GAAG,EAAE;EACP,CAAC,CAAC,EAAAR,MAAA,CAAGK,uBAAY,CAACC,mBAAmB,CAAE;AAC7C,CAAC;AAACG,OAAA,CAAAd,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -8,19 +8,19 @@ var _labsWidgetCommon = require("@oanda/labs-widget-common");
8
8
  const getChartStyles = isDark => {
9
9
  const sentimentLongColor = isDark ? _labsWidgetCommon.colorPalette.darkBlue90 : _labsWidgetCommon.colorPalette.lightBlue90;
10
10
  const sentimentShortColor = isDark ? _labsWidgetCommon.colorPalette.darkYellow90 : _labsWidgetCommon.colorPalette.lightYellow90;
11
+ const sentimentOutlineColor = isDark ? _labsWidgetCommon.colorPalette.black : _labsWidgetCommon.colorPalette.white;
12
+ const sentimentOutlineWidth = isDark ? 3 : 2;
11
13
  const candleLongColor = isDark ? _labsWidgetCommon.colorPalette.bottleGreenDark : _labsWidgetCommon.colorPalette.bottleGreenLight;
12
14
  const candleShortColor = isDark ? _labsWidgetCommon.colorPalette.orange : _labsWidgetCommon.colorPalette.raspberryLight;
13
- const sentimentAreaOpacity = isDark ? 0.5 : 0.2;
14
15
  const tooltipLinesColor = isDark ? _labsWidgetCommon.colorPalette.orange : _labsWidgetCommon.colorPalette.bottleGreenLight;
15
- const sentimentLabelColor = isDark ? _labsWidgetCommon.colorPalette.white : _labsWidgetCommon.colorPalette.black;
16
16
  return {
17
17
  sentimentLongColor,
18
18
  sentimentShortColor,
19
+ sentimentOutlineColor,
19
20
  candleLongColor,
20
21
  candleShortColor,
21
- sentimentAreaOpacity,
22
22
  tooltipLinesColor,
23
- sentimentLabelColor
23
+ sentimentOutlineWidth
24
24
  };
25
25
  };
26
26
  exports.getChartStyles = getChartStyles;