greeks-live-ui 0.0.21 → 0.0.23

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 (271) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.min.mjs +146 -146
  3. package/dist/index.full.min.mjs.map +1 -1
  4. package/dist/index.full.mjs +64 -51
  5. package/es/components/chart/index.d.ts +28 -28
  6. package/es/components/chart/src/chart.vue.d.ts +28 -28
  7. package/es/components/chart-panel/index.d.ts +10 -10
  8. package/es/components/chart-panel/src/chart-panel.vue.d.ts +10 -10
  9. package/es/components/chart-table/index.d.ts +1 -1
  10. package/es/components/chart-table/src/chart-table.vue.d.ts +1 -1
  11. package/es/components/demo/index.d.ts +28 -28
  12. package/es/components/demo/src/demo.vue.d.ts +28 -28
  13. package/es/components/panel-atm-iv/index.d.ts +2 -2
  14. package/es/components/panel-atm-iv/src/panel-atm-iv.vue.d.ts +2 -2
  15. package/es/components/panel-historical-delivery-price/index.d.ts +2 -2
  16. package/es/components/panel-historical-delivery-price/src/panel-historical-delivery-price.vue.d.ts +2 -2
  17. package/es/components/panel-implied-volatility-surface/index.d.ts +2 -2
  18. package/es/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.vue.d.ts +2 -2
  19. package/es/components/panel-iv-skew/index.d.ts +1 -1
  20. package/es/components/panel-iv-skew/src/panel-iv-skew.vue.d.ts +1 -1
  21. package/es/components/panel-max-pain-price/index.d.ts +2 -2
  22. package/es/components/panel-max-pain-price/src/panel-max-pain-price.vue.d.ts +2 -2
  23. package/es/components/panel-option-flow/index.d.ts +1 -1
  24. package/es/components/panel-option-flow/src/panel-option-flow.vue.d.ts +1 -1
  25. package/es/components/panel-option-open-interest/index.d.ts +1 -1
  26. package/es/components/panel-option-open-interest/src/panel-option-open-interest.vue.d.ts +1 -1
  27. package/es/components/panel-option-trade-volume/index.d.ts +1 -1
  28. package/es/components/panel-option-trade-volume/src/panel-option-trade-volume.vue.d.ts +1 -1
  29. package/es/components/panel-rv/index.d.ts +13 -12
  30. package/es/components/panel-rv/src/panel-rv.vue.d.ts +13 -12
  31. package/es/components/panel-skew/index.d.ts +2 -2
  32. package/es/components/panel-skew/src/panel-skew.vue.d.ts +2 -2
  33. package/es/components/panel-volatility-term-structure/index.d.ts +2 -2
  34. package/es/components/panel-volatility-term-structure/src/panel-volatility-term-structure.vue.d.ts +2 -2
  35. package/es/components/panel-vrp/index.d.ts +2 -2
  36. package/es/components/panel-vrp/src/panel-vrp.vue.d.ts +2 -2
  37. package/es/hooks/use-floating/index.d.ts +8 -8
  38. package/es/index.mjs +17 -17
  39. package/es/packages/components/chart-panel/index.mjs +2 -2
  40. package/es/packages/components/chart-panel/src/chart-panel.mjs +38 -273
  41. package/es/packages/components/chart-panel/src/chart-panel.mjs.map +1 -1
  42. package/es/packages/components/chart-panel/src/chart-panel2.mjs +273 -38
  43. package/es/packages/components/chart-panel/src/chart-panel2.mjs.map +1 -1
  44. package/es/packages/components/chart-table/index.mjs +2 -2
  45. package/es/packages/components/chart-table/src/chart-table.mjs +144 -15
  46. package/es/packages/components/chart-table/src/chart-table.mjs.map +1 -1
  47. package/es/packages/components/chart-table/src/chart-table2.mjs +15 -144
  48. package/es/packages/components/chart-table/src/chart-table2.mjs.map +1 -1
  49. package/es/packages/components/dropdown/index.mjs +2 -2
  50. package/es/packages/components/dropdown/src/dropdown.mjs +34 -5
  51. package/es/packages/components/dropdown/src/dropdown.mjs.map +1 -1
  52. package/es/packages/components/dropdown/src/dropdown2.mjs +5 -34
  53. package/es/packages/components/dropdown/src/dropdown2.mjs.map +1 -1
  54. package/es/packages/components/dropdown-button/index.mjs +2 -2
  55. package/es/packages/components/dropdown-button/src/dropdown-button.mjs +5 -39
  56. package/es/packages/components/dropdown-button/src/dropdown-button.mjs.map +1 -1
  57. package/es/packages/components/dropdown-button/src/dropdown-button2.mjs +39 -5
  58. package/es/packages/components/dropdown-button/src/dropdown-button2.mjs.map +1 -1
  59. package/es/packages/components/icon/src/iconfont/iconfont.mjs +1 -1
  60. package/es/packages/components/icon/src/iconfont/iconfont.mjs.map +1 -1
  61. package/es/packages/components/index.mjs +17 -17
  62. package/es/packages/components/panel/index.mjs +2 -2
  63. package/es/packages/components/panel/src/panel.mjs +5 -82
  64. package/es/packages/components/panel/src/panel.mjs.map +1 -1
  65. package/es/packages/components/panel/src/panel2.mjs +82 -5
  66. package/es/packages/components/panel/src/panel2.mjs.map +1 -1
  67. package/es/packages/components/panel-atm-iv/src/panel-atm-iv2.mjs +9 -3
  68. package/es/packages/components/panel-atm-iv/src/panel-atm-iv2.mjs.map +1 -1
  69. package/es/packages/components/panel-historical-delivery-price/src/panel-historical-delivery-price2.mjs +3 -3
  70. package/es/packages/components/panel-historical-delivery-price/src/panel-historical-delivery-price2.mjs.map +1 -1
  71. package/es/packages/components/panel-implied-volatility-surface/index.mjs +2 -2
  72. package/es/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.mjs +279 -22
  73. package/es/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.mjs.map +1 -1
  74. package/es/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface2.mjs +22 -279
  75. package/es/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface2.mjs.map +1 -1
  76. package/es/packages/components/panel-iv-skew/index.mjs +2 -2
  77. package/es/packages/components/panel-iv-skew/src/panel-iv-skew.mjs +22 -398
  78. package/es/packages/components/panel-iv-skew/src/panel-iv-skew.mjs.map +1 -1
  79. package/es/packages/components/panel-iv-skew/src/panel-iv-skew2.mjs +398 -22
  80. package/es/packages/components/panel-iv-skew/src/panel-iv-skew2.mjs.map +1 -1
  81. package/es/packages/components/panel-max-pain-price/src/panel-max-pain-price.mjs +3 -3
  82. package/es/packages/components/panel-max-pain-price/src/panel-max-pain-price.mjs.map +1 -1
  83. package/es/packages/components/panel-option-flow/index.mjs +2 -2
  84. package/es/packages/components/panel-option-flow/src/panel-option-flow.mjs +430 -22
  85. package/es/packages/components/panel-option-flow/src/panel-option-flow.mjs.map +1 -1
  86. package/es/packages/components/panel-option-flow/src/panel-option-flow2.mjs +22 -430
  87. package/es/packages/components/panel-option-flow/src/panel-option-flow2.mjs.map +1 -1
  88. package/es/packages/components/panel-option-open-interest/src/panel-option-open-interest.mjs +8 -8
  89. package/es/packages/components/panel-option-open-interest/src/panel-option-open-interest.mjs.map +1 -1
  90. package/es/packages/components/panel-option-trade-volume/index.mjs +2 -2
  91. package/es/packages/components/panel-option-trade-volume/src/panel-option-trade-volume.mjs +22 -504
  92. package/es/packages/components/panel-option-trade-volume/src/panel-option-trade-volume.mjs.map +1 -1
  93. package/es/packages/components/panel-option-trade-volume/src/panel-option-trade-volume2.mjs +504 -22
  94. package/es/packages/components/panel-option-trade-volume/src/panel-option-trade-volume2.mjs.map +1 -1
  95. package/es/packages/components/panel-rv/src/panel-rv2.mjs +13 -6
  96. package/es/packages/components/panel-rv/src/panel-rv2.mjs.map +1 -1
  97. package/es/packages/components/panel-rv-calc/index.mjs +2 -2
  98. package/es/packages/components/panel-rv-calc/src/panel-rv-calc.mjs +507 -8
  99. package/es/packages/components/panel-rv-calc/src/panel-rv-calc.mjs.map +1 -1
  100. package/es/packages/components/panel-rv-calc/src/panel-rv-calc2.mjs +8 -507
  101. package/es/packages/components/panel-rv-calc/src/panel-rv-calc2.mjs.map +1 -1
  102. package/es/packages/components/panel-skew/index.mjs +2 -2
  103. package/es/packages/components/panel-skew/src/panel-skew.mjs +672 -21
  104. package/es/packages/components/panel-skew/src/panel-skew.mjs.map +1 -1
  105. package/es/packages/components/panel-skew/src/panel-skew2.mjs +21 -672
  106. package/es/packages/components/panel-skew/src/panel-skew2.mjs.map +1 -1
  107. package/es/packages/components/panel-volatility-term-structure/src/panel-volatility-term-structure2.mjs +3 -3
  108. package/es/packages/components/panel-volatility-term-structure/src/panel-volatility-term-structure2.mjs.map +1 -1
  109. package/es/packages/components/panel-vrp/src/panel-vrp2.mjs +3 -3
  110. package/es/packages/components/panel-vrp/src/panel-vrp2.mjs.map +1 -1
  111. package/es/packages/components/radio/index.mjs +2 -2
  112. package/es/packages/components/radio/src/radio-button.mjs +1 -1
  113. package/es/packages/components/radio/src/radio-group.mjs +1 -1
  114. package/es/packages/components/radio/src/radio.mjs +5 -31
  115. package/es/packages/components/radio/src/radio.mjs.map +1 -1
  116. package/es/packages/components/radio/src/radio2.mjs +31 -5
  117. package/es/packages/components/radio/src/radio2.mjs.map +1 -1
  118. package/es/packages/components/radio-dropdown/index.mjs +2 -2
  119. package/es/packages/components/radio-dropdown/src/radio-dropdown.mjs +15 -204
  120. package/es/packages/components/radio-dropdown/src/radio-dropdown.mjs.map +1 -1
  121. package/es/packages/components/radio-dropdown/src/radio-dropdown2.mjs +204 -15
  122. package/es/packages/components/radio-dropdown/src/radio-dropdown2.mjs.map +1 -1
  123. package/es/packages/components/select/index.mjs +2 -2
  124. package/es/packages/components/select/src/option.mjs +1 -1
  125. package/es/packages/components/select/src/select.mjs +41 -10
  126. package/es/packages/components/select/src/select.mjs.map +1 -1
  127. package/es/packages/components/select/src/select2.mjs +10 -41
  128. package/es/packages/components/select/src/select2.mjs.map +1 -1
  129. package/es/packages/components/spin/index.mjs +2 -2
  130. package/es/packages/components/spin/src/spin.mjs +31 -5
  131. package/es/packages/components/spin/src/spin.mjs.map +1 -1
  132. package/es/packages/components/spin/src/spin2.mjs +5 -31
  133. package/es/packages/components/spin/src/spin2.mjs.map +1 -1
  134. package/es/packages/components/table/index.mjs +2 -2
  135. package/es/packages/components/table/src/table.mjs +37 -5
  136. package/es/packages/components/table/src/table.mjs.map +1 -1
  137. package/es/packages/components/table/src/table2.mjs +5 -37
  138. package/es/packages/components/table/src/table2.mjs.map +1 -1
  139. package/es/packages/components/toggle-button/index.mjs +2 -2
  140. package/es/packages/components/toggle-button/src/toggle-button.mjs +12 -51
  141. package/es/packages/components/toggle-button/src/toggle-button.mjs.map +1 -1
  142. package/es/packages/components/toggle-button/src/toggle-button2.mjs +51 -12
  143. package/es/packages/components/toggle-button/src/toggle-button2.mjs.map +1 -1
  144. package/es/packages/utils/chartHelp.mjs +4 -1
  145. package/es/packages/utils/chartHelp.mjs.map +1 -1
  146. package/es/utils/vue/vnode.d.ts +6 -6
  147. package/lib/components/chart/index.d.ts +28 -28
  148. package/lib/components/chart/src/chart.vue.d.ts +28 -28
  149. package/lib/components/chart-panel/index.d.ts +10 -10
  150. package/lib/components/chart-panel/src/chart-panel.vue.d.ts +10 -10
  151. package/lib/components/chart-table/index.d.ts +1 -1
  152. package/lib/components/chart-table/src/chart-table.vue.d.ts +1 -1
  153. package/lib/components/demo/index.d.ts +28 -28
  154. package/lib/components/demo/src/demo.vue.d.ts +28 -28
  155. package/lib/components/panel-atm-iv/index.d.ts +2 -2
  156. package/lib/components/panel-atm-iv/src/panel-atm-iv.vue.d.ts +2 -2
  157. package/lib/components/panel-historical-delivery-price/index.d.ts +2 -2
  158. package/lib/components/panel-historical-delivery-price/src/panel-historical-delivery-price.vue.d.ts +2 -2
  159. package/lib/components/panel-implied-volatility-surface/index.d.ts +2 -2
  160. package/lib/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.vue.d.ts +2 -2
  161. package/lib/components/panel-iv-skew/index.d.ts +1 -1
  162. package/lib/components/panel-iv-skew/src/panel-iv-skew.vue.d.ts +1 -1
  163. package/lib/components/panel-max-pain-price/index.d.ts +2 -2
  164. package/lib/components/panel-max-pain-price/src/panel-max-pain-price.vue.d.ts +2 -2
  165. package/lib/components/panel-option-flow/index.d.ts +1 -1
  166. package/lib/components/panel-option-flow/src/panel-option-flow.vue.d.ts +1 -1
  167. package/lib/components/panel-option-open-interest/index.d.ts +1 -1
  168. package/lib/components/panel-option-open-interest/src/panel-option-open-interest.vue.d.ts +1 -1
  169. package/lib/components/panel-option-trade-volume/index.d.ts +1 -1
  170. package/lib/components/panel-option-trade-volume/src/panel-option-trade-volume.vue.d.ts +1 -1
  171. package/lib/components/panel-rv/index.d.ts +13 -12
  172. package/lib/components/panel-rv/src/panel-rv.vue.d.ts +13 -12
  173. package/lib/components/panel-skew/index.d.ts +2 -2
  174. package/lib/components/panel-skew/src/panel-skew.vue.d.ts +2 -2
  175. package/lib/components/panel-volatility-term-structure/index.d.ts +2 -2
  176. package/lib/components/panel-volatility-term-structure/src/panel-volatility-term-structure.vue.d.ts +2 -2
  177. package/lib/components/panel-vrp/index.d.ts +2 -2
  178. package/lib/components/panel-vrp/src/panel-vrp.vue.d.ts +2 -2
  179. package/lib/hooks/use-floating/index.d.ts +8 -8
  180. package/lib/index.js +12 -12
  181. package/lib/packages/components/chart-table/src/chart-table.js +2 -2
  182. package/lib/packages/components/chart-table/src/chart-table.js.map +1 -1
  183. package/lib/packages/components/checkbox/index.js +2 -2
  184. package/lib/packages/components/checkbox/src/checkbox.js +31 -6
  185. package/lib/packages/components/checkbox/src/checkbox.js.map +1 -1
  186. package/lib/packages/components/checkbox/src/checkbox2.js +6 -31
  187. package/lib/packages/components/checkbox/src/checkbox2.js.map +1 -1
  188. package/lib/packages/components/checkbox-group/index.js +2 -2
  189. package/lib/packages/components/checkbox-group/src/checkbox-group.js +6 -31
  190. package/lib/packages/components/checkbox-group/src/checkbox-group.js.map +1 -1
  191. package/lib/packages/components/checkbox-group/src/checkbox-group2.js +31 -6
  192. package/lib/packages/components/checkbox-group/src/checkbox-group2.js.map +1 -1
  193. package/lib/packages/components/demo/index.js +2 -2
  194. package/lib/packages/components/demo/src/demo.js +89 -6
  195. package/lib/packages/components/demo/src/demo.js.map +1 -1
  196. package/lib/packages/components/demo/src/demo2.js +6 -89
  197. package/lib/packages/components/demo/src/demo2.js.map +1 -1
  198. package/lib/packages/components/dropdown-button/index.js +2 -2
  199. package/lib/packages/components/dropdown-button/src/dropdown-button.js +6 -39
  200. package/lib/packages/components/dropdown-button/src/dropdown-button.js.map +1 -1
  201. package/lib/packages/components/dropdown-button/src/dropdown-button2.js +39 -6
  202. package/lib/packages/components/dropdown-button/src/dropdown-button2.js.map +1 -1
  203. package/lib/packages/components/icon/index.js +2 -2
  204. package/lib/packages/components/icon/src/icon.js +16 -48
  205. package/lib/packages/components/icon/src/icon.js.map +1 -1
  206. package/lib/packages/components/icon/src/icon2.js +48 -16
  207. package/lib/packages/components/icon/src/icon2.js.map +1 -1
  208. package/lib/packages/components/icon/src/iconfont/iconfont.js +1 -1
  209. package/lib/packages/components/icon/src/iconfont/iconfont.js.map +1 -1
  210. package/lib/packages/components/index.js +12 -12
  211. package/lib/packages/components/page-turner/index.js +2 -2
  212. package/lib/packages/components/page-turner/src/page-turner.js +13 -67
  213. package/lib/packages/components/page-turner/src/page-turner.js.map +1 -1
  214. package/lib/packages/components/page-turner/src/page-turner2.js +67 -13
  215. package/lib/packages/components/page-turner/src/page-turner2.js.map +1 -1
  216. package/lib/packages/components/panel-atm-iv/index.js +2 -2
  217. package/lib/packages/components/panel-atm-iv/src/panel-atm-iv.js +22 -886
  218. package/lib/packages/components/panel-atm-iv/src/panel-atm-iv.js.map +1 -1
  219. package/lib/packages/components/panel-atm-iv/src/panel-atm-iv2.js +892 -22
  220. package/lib/packages/components/panel-atm-iv/src/panel-atm-iv2.js.map +1 -1
  221. package/lib/packages/components/panel-historical-delivery-price/src/panel-historical-delivery-price2.js +3 -3
  222. package/lib/packages/components/panel-historical-delivery-price/src/panel-historical-delivery-price2.js.map +1 -1
  223. package/lib/packages/components/panel-implied-volatility-surface/index.js +2 -2
  224. package/lib/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.js +279 -23
  225. package/lib/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface.js.map +1 -1
  226. package/lib/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface2.js +23 -279
  227. package/lib/packages/components/panel-implied-volatility-surface/src/panel-implied-volatility-surface2.js.map +1 -1
  228. package/lib/packages/components/panel-iv-skew/index.js +2 -2
  229. package/lib/packages/components/panel-iv-skew/src/panel-iv-skew.js +398 -23
  230. package/lib/packages/components/panel-iv-skew/src/panel-iv-skew.js.map +1 -1
  231. package/lib/packages/components/panel-iv-skew/src/panel-iv-skew2.js +23 -398
  232. package/lib/packages/components/panel-iv-skew/src/panel-iv-skew2.js.map +1 -1
  233. package/lib/packages/components/panel-max-pain-price/src/panel-max-pain-price.js +3 -3
  234. package/lib/packages/components/panel-max-pain-price/src/panel-max-pain-price.js.map +1 -1
  235. package/lib/packages/components/panel-option-flow/src/panel-option-flow2.js +4 -4
  236. package/lib/packages/components/panel-option-flow/src/panel-option-flow2.js.map +1 -1
  237. package/lib/packages/components/panel-option-open-interest/src/panel-option-open-interest.js +7 -7
  238. package/lib/packages/components/panel-option-open-interest/src/panel-option-open-interest.js.map +1 -1
  239. package/lib/packages/components/panel-option-trade-volume/src/panel-option-trade-volume.js +3 -3
  240. package/lib/packages/components/panel-option-trade-volume/src/panel-option-trade-volume.js.map +1 -1
  241. package/lib/packages/components/panel-rv/index.js +2 -2
  242. package/lib/packages/components/panel-rv/src/panel-rv.js +23 -741
  243. package/lib/packages/components/panel-rv/src/panel-rv.js.map +1 -1
  244. package/lib/packages/components/panel-rv/src/panel-rv2.js +748 -23
  245. package/lib/packages/components/panel-rv/src/panel-rv2.js.map +1 -1
  246. package/lib/packages/components/panel-skew/src/panel-skew.js +3 -3
  247. package/lib/packages/components/panel-skew/src/panel-skew.js.map +1 -1
  248. package/lib/packages/components/panel-volatility-term-structure/src/panel-volatility-term-structure2.js +3 -3
  249. package/lib/packages/components/panel-volatility-term-structure/src/panel-volatility-term-structure2.js.map +1 -1
  250. package/lib/packages/components/panel-vrp/src/panel-vrp2.js +3 -3
  251. package/lib/packages/components/panel-vrp/src/panel-vrp2.js.map +1 -1
  252. package/lib/packages/components/select/index.js +2 -2
  253. package/lib/packages/components/select/src/option.js +1 -1
  254. package/lib/packages/components/select/src/select.js +41 -15
  255. package/lib/packages/components/select/src/select.js.map +1 -1
  256. package/lib/packages/components/select/src/select2.js +15 -41
  257. package/lib/packages/components/select/src/select2.js.map +1 -1
  258. package/lib/packages/components/toggle-button/index.js +2 -2
  259. package/lib/packages/components/toggle-button/src/toggle-button.js +13 -51
  260. package/lib/packages/components/toggle-button/src/toggle-button.js.map +1 -1
  261. package/lib/packages/components/toggle-button/src/toggle-button2.js +51 -13
  262. package/lib/packages/components/toggle-button/src/toggle-button2.js.map +1 -1
  263. package/lib/packages/utils/chartHelp.js +4 -1
  264. package/lib/packages/utils/chartHelp.js.map +1 -1
  265. package/lib/utils/vue/vnode.d.ts +6 -6
  266. package/package.json +1 -1
  267. package/theme-chalk/base.css +1 -1
  268. package/theme-chalk/g-antd.css +1 -1
  269. package/theme-chalk/index.css +1 -1
  270. package/theme-chalk/src/antd.scss +44 -8
  271. package/web-types.json +1 -1
@@ -2,32 +2,902 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var panelAtmIv = require('./panel-atm-iv.js');
5
8
  require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
9
+ var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
11
+ var index$1 = require('../../../hooks/use-locale/index.js');
12
+ var index$2 = require('../../../hooks/use-device-type/index.js');
13
+ var index$3 = require('../../../hooks/use-theme/index.js');
14
+ var dataLab = require('../../../utils/dataLab.js');
15
+ var chartHelp = require('../../../utils/chartHelp.js');
7
16
 
8
- const panelAtmIvEmits = {
9
- "update:currency": (currency) => true,
10
- "update:exchange": (exchange) => true
17
+ const _hoisted_1 = /* @__PURE__ */ vue.createTextVNode(" ATM IV");
18
+ const _hoisted_2 = ["innerHTML"];
19
+ const _hoisted_3 = { class: "period-range h5-hide" };
20
+ const _hoisted_4 = { key: 0 };
21
+ const _hoisted_5 = {
22
+ key: 1,
23
+ class: "echart",
24
+ ref: "echart"
11
25
  };
12
- const panelAtmIvProps = runtime.buildProps({
13
- defaultCurrency: {
14
- type: String,
15
- required: false
16
- },
17
- defaultExchange: {
18
- type: String,
19
- required: false
20
- },
21
- currency: {
22
- type: String,
23
- required: false
24
- },
25
- exchange: {
26
- type: String,
27
- required: false
26
+ const _hoisted_6 = { class: "h5-tip-title" };
27
+ const _hoisted_7 = { class: "h5-legend" };
28
+ const __default__ = {
29
+ name: "GPanelAtmIv"
30
+ };
31
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
32
+ ...__default__,
33
+ props: panelAtmIv.panelAtmIvProps,
34
+ emits: panelAtmIv.panelAtmIvEmits,
35
+ setup(__props, { emit }) {
36
+ const props = __props;
37
+ const ns = index.useNamespace("panel-atm-iv");
38
+ const { t } = index$1.useLocale();
39
+ const { isMobile, isPC } = index$2.useDeviceType();
40
+ const { isDark } = index$3.useTheme();
41
+ let legendList = [
42
+ {
43
+ value: "ALL",
44
+ label: "All",
45
+ days: 0,
46
+ color: "#00B42A"
47
+ },
48
+ {
49
+ value: "1D",
50
+ label: "1 D",
51
+ days: 1,
52
+ color: "#7630F7"
53
+ },
54
+ {
55
+ value: "1W",
56
+ label: "1 W",
57
+ days: 7,
58
+ color: "#23C343"
59
+ },
60
+ {
61
+ value: "1M",
62
+ label: "1 M",
63
+ days: 30,
64
+ color: "#FFD600"
65
+ },
66
+ {
67
+ value: "2M",
68
+ label: "2 M",
69
+ days: 60,
70
+ color: "#FF8D1F"
71
+ },
72
+ {
73
+ value: "3M",
74
+ label: "3 M",
75
+ days: 90,
76
+ color: "#FF3B30"
77
+ },
78
+ {
79
+ value: "6M",
80
+ label: "6 M",
81
+ days: 180,
82
+ color: "#007AFF"
83
+ },
84
+ {
85
+ value: "1Y",
86
+ label: "1 Y",
87
+ days: 365,
88
+ color: "#00C7BE"
89
+ }
90
+ ];
91
+ const periodList = vue.computed(() => {
92
+ if (currency.value === "BTC" || currency.value === "ETH") {
93
+ return legendList.filter(
94
+ (v) => ["ALL", "1W", "1M", "3M", "1Y"].includes(v.value)
95
+ );
96
+ } else if (currency.value.includes("PAXG")) {
97
+ return legendList.filter(
98
+ (v) => ["ALL", "1W", "1M", "3M"].includes(v.value)
99
+ );
100
+ } else {
101
+ return legendList.filter((v) => ["ALL", "1W", "1M"].includes(v.value));
102
+ }
103
+ });
104
+ const rangeList = vue.computed(() => {
105
+ if (currency.value === "BTC" || currency.value === "ETH") {
106
+ return ["1D", "1W", "1M", "2M", "3M", "6M", "1Y"];
107
+ } else if (currency.value.includes("PAXG")) {
108
+ return ["1D", "1W", "1M", "3M", "6M"];
109
+ } else {
110
+ return ["1D", "1W", "1M"];
111
+ }
112
+ });
113
+ const defaultPeriod = vue.computed(() => {
114
+ if (currency.value === "BTC" || currency.value === "ETH") {
115
+ return "3M";
116
+ } else if (currency.value.includes("PAXG")) {
117
+ return "3M";
118
+ } else {
119
+ return "1M";
120
+ }
121
+ });
122
+ const state = vue.reactive({
123
+ loadingFlag: false,
124
+ showTableCard: true,
125
+ isToolTipShow: false,
126
+ toolTipTitle: "",
127
+ exchange: props.exchange || props.defaultExchange || "Deribit",
128
+ currency: props.currency || props.defaultCurrency || "BTC",
129
+ range: "1W",
130
+ period: "3M",
131
+ periodDateRange: "",
132
+ chartData: [],
133
+ tableData: [],
134
+ legendMap: {},
135
+ hvMap: {},
136
+ legendList: []
137
+ });
138
+ const currency = vue.computed({
139
+ get: () => props.currency || state.currency || "BTC",
140
+ set: (newVal) => {
141
+ props.currency ? emit("update:currency", newVal) : state.currency = newVal;
142
+ }
143
+ });
144
+ const exchange = vue.computed({
145
+ get: () => props.exchange || state.exchange || "Deribit",
146
+ set: (newVal) => {
147
+ props.exchange ? emit("update:exchange", newVal) : state.exchange = newVal;
148
+ }
149
+ });
150
+ vue.watch(currency, () => {
151
+ if (rangeList.value.findIndex((v) => v === state.range) === -1) {
152
+ state.range = "1W";
153
+ }
154
+ if (periodList.value.findIndex((v) => v.value === state.period) === -1) {
155
+ state.period = defaultPeriod.value;
156
+ }
157
+ fetchData();
158
+ });
159
+ vue.watch(exchange, () => {
160
+ fetchData();
161
+ });
162
+ const fetchData = () => {
163
+ state.loadingFlag = true;
164
+ dataLab.getIvHistory({
165
+ currency: currency.value,
166
+ gap: state.showTableCard ? defaultPeriod.value : state.period
167
+ }).then((res) => {
168
+ if (res && res.code === 200) {
169
+ state.chartData = res.data || [];
170
+ getTableData();
171
+ getLegendData();
172
+ }
173
+ }).finally(() => {
174
+ state.loadingFlag = false;
175
+ });
176
+ };
177
+ vue.onMounted(() => {
178
+ state.period = defaultPeriod.value;
179
+ handleChangePeriod(state.period);
180
+ });
181
+ const handleChangePeriod = (value) => {
182
+ const selectedPeriod = periodList.value.find((v) => v.value === value);
183
+ if (!selectedPeriod)
184
+ return;
185
+ state.periodDateRange = chartHelp.showDateRange(selectedPeriod.days);
186
+ fetchData();
187
+ };
188
+ const handleToggleTableChart = () => {
189
+ state.showTableCard = !state.showTableCard;
190
+ fetchData();
191
+ };
192
+ const handleTipShow = (isShow) => {
193
+ state.isToolTipShow = isShow;
194
+ !isShow && (state.toolTipTitle = "");
195
+ };
196
+ const getLegendValue = (days) => {
197
+ var _a;
198
+ const r = Number((_a = Number(days[days.length - 1])) == null ? void 0 : _a.toFixed(2));
199
+ return r >= 0 ? `+${r}%` : `${r}%`;
200
+ };
201
+ const getLegendData = () => {
202
+ const { day1, week1, month1, month2, month3, month6, year1, hvText, dataHv } = getEchartData();
203
+ state.legendMap = {
204
+ "1D": getLegendValue(day1),
205
+ "1W": getLegendValue(week1),
206
+ "1M": getLegendValue(month1),
207
+ "2M": getLegendValue(month2),
208
+ "3M": getLegendValue(month3),
209
+ "6M": getLegendValue(month6),
210
+ "1Y": getLegendValue(year1),
211
+ [hvText]: getLegendValue(dataHv)
212
+ };
213
+ };
214
+ const getTableData = () => {
215
+ var _a;
216
+ let data = state.chartData || [];
217
+ let hvMap = {};
218
+ let arr = ((_a = data[data.length - 1]) == null ? void 0 : _a.data) || [];
219
+ arr.forEach((item) => {
220
+ let key = "";
221
+ if (item.day === 1) {
222
+ key = "1D";
223
+ } else if (item.day === 7) {
224
+ key = "1W";
225
+ } else if (item.day === 30) {
226
+ key = "1M";
227
+ } else if (item.day === 60) {
228
+ key = "2M";
229
+ } else if (item.day === 90) {
230
+ key = "3M";
231
+ } else if (item.day === 180) {
232
+ key = "6M";
233
+ } else if (item.day === 365) {
234
+ key = "1Y";
235
+ }
236
+ hvMap[key] = item.hv;
237
+ state.hvMap = hvMap;
238
+ });
239
+ let day1 = 864e5;
240
+ let data0 = data[data.length - 1];
241
+ let dataDate1 = chartHelp.formatDateForNumber(data0.created_at - day1);
242
+ let dataDate2 = chartHelp.formatDateForNumber(data0.created_at - day1 * 2);
243
+ let dataDate7 = chartHelp.formatDateForNumber(data0.created_at - day1 * 7);
244
+ let dataDate15 = chartHelp.formatDateForNumber(data0.created_at - day1 * 14);
245
+ let dataDate30 = chartHelp.formatDateForNumber(data0.created_at - day1 * 30);
246
+ let map = {};
247
+ data.forEach((item) => {
248
+ let date = chartHelp.formatDateForNumber(item.created_at);
249
+ if (date === dataDate1) {
250
+ map[date] = item;
251
+ } else if (date === dataDate2) {
252
+ map[date] = item;
253
+ } else if (date === dataDate7) {
254
+ map[date] = item;
255
+ } else if (date === dataDate15) {
256
+ map[date] = item;
257
+ } else if (date === dataDate30) {
258
+ map[date] = item;
259
+ }
260
+ });
261
+ let list = Object.values(map).sort(
262
+ (prev, next) => next.created_at - prev.created_at
263
+ );
264
+ let dataMap1 = { expire: "1 day", atm: data0.one_day };
265
+ let dataMap2 = { expire: "1 week", atm: data0.one_week };
266
+ let dataMap3 = { expire: "1 month", atm: data0.month1 };
267
+ let dataMap4 = { expire: "2 month", atm: data0.month2 };
268
+ let dataMap5 = { expire: "3 month", atm: data0.month3 };
269
+ let dataMap6 = { expire: "6 month", atm: data0.month6 };
270
+ let dataMap7 = { expire: "1 year", atm: data0.one_year };
271
+ for (let i = 0; i < list.length; i++) {
272
+ let item = list[i];
273
+ let key;
274
+ switch (i) {
275
+ case 0:
276
+ key = "chg1";
277
+ break;
278
+ case 1:
279
+ key = "chg2";
280
+ break;
281
+ case 2:
282
+ key = "chg7";
283
+ break;
284
+ case 3:
285
+ key = "chg14";
286
+ break;
287
+ case 4:
288
+ key = "chg30";
289
+ break;
290
+ default:
291
+ continue;
292
+ }
293
+ dataMap1[key] = data0.one_day - item.one_day;
294
+ dataMap2[key] = data0.one_week - item.one_week;
295
+ dataMap3[key] = data0.month1 - item.month1;
296
+ dataMap4[key] = data0.month2 - item.month2;
297
+ dataMap5[key] = data0.month3 - item.month3;
298
+ dataMap6[key] = data0.month6 - item.month6;
299
+ dataMap7[key] = data0.one_year - item.one_year;
300
+ }
301
+ let tableData = [];
302
+ if (currency.value === "BTC" || currency.value === "ETH") {
303
+ tableData = [
304
+ dataMap1,
305
+ dataMap2,
306
+ dataMap3,
307
+ dataMap4,
308
+ dataMap5,
309
+ dataMap6,
310
+ dataMap7
311
+ ];
312
+ } else if (currency.value.includes("PAXG")) {
313
+ tableData = [dataMap1, dataMap2, dataMap3, dataMap4, dataMap5, dataMap6];
314
+ } else {
315
+ tableData = [dataMap1, dataMap2, dataMap3];
316
+ }
317
+ state.tableData = tableData.map((v) => {
318
+ v["vrp"] = v.atm - Number(hvMap[state.range]);
319
+ v["vrpLabel"] = state.range + " VRP";
320
+ return v;
321
+ });
322
+ };
323
+ const getEchartData = () => {
324
+ let data = [...state.chartData];
325
+ const data2 = data.map((v) => v.data);
326
+ let date = [];
327
+ let day1 = [];
328
+ let week1 = [];
329
+ let month1 = [];
330
+ let month2 = [];
331
+ let month3 = [];
332
+ let month6 = [];
333
+ let year1 = [];
334
+ data.forEach((item) => {
335
+ day1.push(
336
+ item.one_day ? chartHelp.numberFormat(item.one_day, 2) : ""
337
+ );
338
+ week1.push(
339
+ item.one_week ? chartHelp.numberFormat(item.one_week, 2) : ""
340
+ );
341
+ month1.push(chartHelp.numberFormat(item.month1, 2));
342
+ month2.push(
343
+ item.month2 ? chartHelp.numberFormat(item.month2, 2) : ""
344
+ );
345
+ month3.push(chartHelp.numberFormat(item.month3, 2));
346
+ month6.push(chartHelp.numberFormat(item.month6, 2));
347
+ year1.push(
348
+ item.one_year ? chartHelp.numberFormat(item.one_year, 2) : ""
349
+ );
350
+ date.push(chartHelp.formatDateForNumber(item.created_at));
351
+ });
352
+ let days1 = [];
353
+ let days7 = [];
354
+ let days30 = [];
355
+ let days60 = [];
356
+ let days90 = [];
357
+ let days180 = [];
358
+ let days365 = [];
359
+ data2.forEach((item) => {
360
+ item = item || [];
361
+ let set = /* @__PURE__ */ new Set([
362
+ "days1",
363
+ "days7",
364
+ "days30",
365
+ "days60",
366
+ "days90",
367
+ "days180",
368
+ "days365"
369
+ ]);
370
+ item.forEach((item2) => {
371
+ if (item2.day === 1) {
372
+ set.delete("days1");
373
+ days1.push(chartHelp.numberFormat(item2.hv, 2));
374
+ } else if (item2.day === 7) {
375
+ set.delete("days7");
376
+ days7.push(chartHelp.numberFormat(item2.hv, 2));
377
+ } else if (item2.day === 30) {
378
+ set.delete("days30");
379
+ days30.push(chartHelp.numberFormat(item2.hv, 2));
380
+ } else if (item2.day === 60) {
381
+ set.delete("days60");
382
+ days60.push(chartHelp.numberFormat(item2.hv, 2));
383
+ } else if (item2.day === 90) {
384
+ set.delete("days90");
385
+ days90.push(chartHelp.numberFormat(item2.hv, 2));
386
+ } else if (item2.day === 180) {
387
+ set.delete("days180");
388
+ days180.push(chartHelp.numberFormat(item2.hv, 2));
389
+ } else if (item2.day === 365) {
390
+ set.delete("days365");
391
+ days365.push(chartHelp.numberFormat(item2.hv, 2));
392
+ }
393
+ });
394
+ let arr = [...set];
395
+ arr.forEach((item3) => {
396
+ if (item3 === "days1") {
397
+ days1.push("");
398
+ } else if (item3 === "days7") {
399
+ days7.push("");
400
+ } else if (item3 === "days30") {
401
+ days30.push("");
402
+ } else if (item3 === "days60") {
403
+ days60.push("");
404
+ } else if (item3 === "days90") {
405
+ days90.push("");
406
+ } else if (item3 === "days180") {
407
+ days180.push("");
408
+ } else if (item3 === "days365") {
409
+ days365.push("");
410
+ }
411
+ });
412
+ });
413
+ let dataHv = [];
414
+ if (state.range === "1D") {
415
+ dataHv = days1;
416
+ } else if (state.range === "1W") {
417
+ dataHv = days7;
418
+ } else if (state.range === "1M") {
419
+ dataHv = days30;
420
+ } else if (state.range === "2M") {
421
+ dataHv = days60;
422
+ } else if (state.range === "3M") {
423
+ dataHv = days90;
424
+ } else if (state.range === "6M") {
425
+ dataHv = days180;
426
+ } else if (state.range === "1Y") {
427
+ dataHv = days365;
428
+ }
429
+ const hvText = `${state.range.toLocaleLowerCase()} HV`;
430
+ return {
431
+ date,
432
+ day1,
433
+ week1,
434
+ month1,
435
+ month2,
436
+ month3,
437
+ month6,
438
+ year1,
439
+ hvText,
440
+ dataHv
441
+ };
442
+ };
443
+ const getEchartOption = (params) => {
444
+ const {
445
+ date,
446
+ day1,
447
+ week1,
448
+ month1,
449
+ month2,
450
+ month3,
451
+ month6,
452
+ year1,
453
+ hvText,
454
+ dataHv
455
+ } = params;
456
+ const seriesMap = {
457
+ "1D": {
458
+ name: "1 D",
459
+ key: 1,
460
+ type: "line",
461
+ symbol: "none",
462
+ data: day1
463
+ },
464
+ "1W": {
465
+ name: "1 W",
466
+ key: 7,
467
+ type: "line",
468
+ symbol: "none",
469
+ data: week1
470
+ },
471
+ "1M": {
472
+ name: "1 M",
473
+ key: 30,
474
+ type: "line",
475
+ symbol: "none",
476
+ data: month1
477
+ },
478
+ "2M": {
479
+ name: "2 M",
480
+ key: 60,
481
+ type: "line",
482
+ symbol: "none",
483
+ data: month2
484
+ },
485
+ "3M": {
486
+ name: "3 M",
487
+ key: 90,
488
+ type: "line",
489
+ symbol: "none",
490
+ data: month3
491
+ },
492
+ "6M": {
493
+ name: "6 M",
494
+ key: 180,
495
+ type: "line",
496
+ symbol: "none",
497
+ data: month6
498
+ },
499
+ "1Y": {
500
+ name: "1 Y",
501
+ key: 365,
502
+ type: "line",
503
+ symbol: "none",
504
+ data: year1
505
+ }
506
+ };
507
+ const filteredSeries = rangeList.value.map((range) => seriesMap[range]);
508
+ filteredSeries.push({
509
+ name: hvText,
510
+ type: "line",
511
+ symbol: "none",
512
+ data: dataHv
513
+ });
514
+ const option = {
515
+ color: legendList.slice(1).map((v) => v.color),
516
+ tooltip: {
517
+ trigger: "axis",
518
+ axisPointer: {
519
+ type: "cross",
520
+ label: {
521
+ show: isMobile.value ? true : false,
522
+ backgroundColor: "#DEE2E6",
523
+ color: "#343A40",
524
+ padding: [4, 6, 4, 6],
525
+ margin: 9
526
+ },
527
+ crossStyle: {
528
+ color: "#8B959F"
529
+ },
530
+ lineStyle: {
531
+ color: "#8B959F"
532
+ }
533
+ },
534
+ backgroundColor: isDark.value ? "#E9ECEF" : "#292F3D",
535
+ padding: isMobile.value ? 0 : [6, 8, 5, 6],
536
+ textStyle: {
537
+ color: isDark.value ? "#000000" : "#FFFFFF",
538
+ fontSize: 12,
539
+ lineHeight: 16,
540
+ fontWeight: 400
541
+ },
542
+ formatter: (params2) => {
543
+ let content = "";
544
+ state.toolTipTitle = chartHelp.getTooltipDate(params2[0].axisValueLabel, "en-US");
545
+ content += `<div class="chart-tooltip-box"><div style="margin-bottom:4px;">${state.toolTipTitle}</div> `;
546
+ params2.forEach(
547
+ (param) => {
548
+ content += `
549
+ <div class="chart-tooltip">
550
+ <div>
551
+ <span class="chart-tooltip-line" style="background-color:${param.color};"></span>
552
+ <span>${param.seriesName}</span>
553
+ </div>
554
+ <span>${param.value.toFixed(2)}</span>
555
+ </div>
556
+ `;
557
+ }
558
+ );
559
+ return content + "</div>";
560
+ }
561
+ },
562
+ axisPointer: {
563
+ type: "line",
564
+ label: {
565
+ show: true,
566
+ backgroundColor: "#DEE2E6",
567
+ color: "#343A40",
568
+ fontSize: 10,
569
+ padding: [4, 6, 4, 8]
570
+ }
571
+ },
572
+ legend: {
573
+ show: !isMobile.value,
574
+ left: "center",
575
+ width: "90%",
576
+ icon: "rect",
577
+ itemWidth: 14,
578
+ itemHeight: 2,
579
+ itemGap: 20,
580
+ textStyle: {
581
+ color: "#596169",
582
+ fontSize: 12
583
+ },
584
+ lineStyle: {
585
+ inactiveColor: isDark.value ? "#2B2F32" : "#DEE2E6"
586
+ },
587
+ inactiveColor: isDark.value ? "#495057" : "#BDC4CB",
588
+ formatter: function(name) {
589
+ try {
590
+ switch (name) {
591
+ case "1 D":
592
+ return name + ` (${day1[day1.length - 1]}%)`;
593
+ case "1 W":
594
+ return name + ` (${week1[week1.length - 1]}%)`;
595
+ case "1 M":
596
+ return name + ` (${month1[month1.length - 1]}%)`;
597
+ case "2 M":
598
+ return name + ` (${month2[month2.length - 1]}%)`;
599
+ case "3 M":
600
+ return name + ` (${month3[month3.length - 1]}%)`;
601
+ case "6 M":
602
+ return name + ` (${month6[month6.length - 1]}%)`;
603
+ case "1 Y":
604
+ return name + ` (${year1[year1.length - 1]}%)`;
605
+ case hvText:
606
+ return name + ` (${dataHv[dataHv.length - 1]}%)`;
607
+ }
608
+ } catch (e) {
609
+ return name;
610
+ }
611
+ },
612
+ selected: {
613
+ "1 D": false,
614
+ "1 W": false,
615
+ "1 M": true,
616
+ "2 M": false,
617
+ "3 M": true,
618
+ "6 M": true,
619
+ "1 Y": false
620
+ }
621
+ },
622
+ xAxis: {
623
+ type: "category",
624
+ data: date,
625
+ axisTick: {
626
+ show: false
627
+ },
628
+ axisLabel: {
629
+ color: isDark.value ? "#CED4DA" : "#343A40",
630
+ fontWeight: 400,
631
+ fontSize: 10
632
+ },
633
+ axisLine: {
634
+ show: false,
635
+ lineStyle: {
636
+ color: isDark.value ? "#CED4DA" : "#343A40"
637
+ }
638
+ },
639
+ splitLine: {
640
+ show: !isMobile.value && !isDark.value,
641
+ lineStyle: {
642
+ color: "#F1F1F1",
643
+ width: 1,
644
+ type: "solid"
645
+ }
646
+ }
647
+ },
648
+ yAxis: {
649
+ type: "value",
650
+ scale: true,
651
+ axisLabel: {
652
+ show: true,
653
+ color: isDark.value ? "#CED4DA" : "#343A40",
654
+ fontWeight: 400,
655
+ fontSize: 10
656
+ },
657
+ name: "IV(%)",
658
+ nameLocation: "end",
659
+ nameGap: isMobile.value ? -30 : 20,
660
+ nameRotate: isMobile.value ? 90 : 0,
661
+ nameTextStyle: {
662
+ color: isDark.value ? "#8B959F" : "#8B959F",
663
+ fontWeight: 400,
664
+ fontSize: 10
665
+ },
666
+ axisLine: {
667
+ lineStyle: {
668
+ color: isDark.value ? "#CED4DA" : "#343A40"
669
+ }
670
+ },
671
+ splitLine: {
672
+ lineStyle: {
673
+ color: isDark.value ? "#2B2F32" : "#F1F1F1",
674
+ width: 1,
675
+ type: "solid"
676
+ }
677
+ }
678
+ },
679
+ grid: {
680
+ top: isPC.value ? 60 : 20,
681
+ left: "left",
682
+ right: 27,
683
+ bottom: 0,
684
+ containLabel: true
685
+ },
686
+ series: filteredSeries
687
+ };
688
+ if (isMobile.value) {
689
+ option.series = option.series.map((v) => ({ ...v, symbol: "circle" }));
690
+ }
691
+ return option;
692
+ };
693
+ const chartOption = vue.computed(() => {
694
+ return getEchartOption(getEchartData());
695
+ });
696
+ return (_ctx, _cache) => {
697
+ const _component_g_icon = vue.resolveComponent("g-icon");
698
+ const _component_g_tooltip = vue.resolveComponent("g-tooltip");
699
+ const _component_g_select_option = vue.resolveComponent("g-select-option");
700
+ const _component_g_select = vue.resolveComponent("g-select");
701
+ const _component_g_chart_table = vue.resolveComponent("g-chart-table");
702
+ const _component_g_chart = vue.resolveComponent("g-chart");
703
+ const _component_g_chart_panel = vue.resolveComponent("g-chart-panel");
704
+ return vue.openBlock(), vue.createElementBlock(
705
+ "div",
706
+ {
707
+ class: vue.normalizeClass([vue.unref(ns).b()])
708
+ },
709
+ [
710
+ vue.createVNode(_component_g_chart_panel, {
711
+ currency: vue.unref(currency),
712
+ "onUpdate:currency": _cache[4] || (_cache[4] = ($event) => vue.isRef(currency) ? currency.value = $event : null),
713
+ exchange: vue.unref(exchange),
714
+ "onUpdate:exchange": _cache[5] || (_cache[5] = ($event) => vue.isRef(exchange) ? exchange.value = $event : null),
715
+ operations: ["toggle"],
716
+ loading: state.loadingFlag,
717
+ onToggle: handleToggleTableChart,
718
+ onRefresh: fetchData
719
+ }, {
720
+ title: vue.withCtx(() => [
721
+ vue.createVNode(_component_g_tooltip, {
722
+ placement: "bottom",
723
+ "arrow-point-at-center": ""
724
+ }, {
725
+ title: vue.withCtx(() => [
726
+ vue.createElementVNode("div", {
727
+ innerHTML: vue.unref(t)("message.atmIVTips")
728
+ }, null, 8, _hoisted_2)
729
+ ]),
730
+ default: vue.withCtx(() => [
731
+ _hoisted_1,
732
+ vue.createVNode(_component_g_icon, { type: "info_question_circle" })
733
+ ]),
734
+ _: 1
735
+ })
736
+ ]),
737
+ tool: vue.withCtx(() => [
738
+ !state.showTableCard ? (vue.openBlock(), vue.createElementBlock(
739
+ vue.Fragment,
740
+ { key: 0 },
741
+ [
742
+ vue.createVNode(_component_g_select, {
743
+ value: state.period,
744
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => state.period = $event),
745
+ onChange: handleChangePeriod,
746
+ size: vue.unref(isPC) ? "small" : "medium",
747
+ class: "period-select"
748
+ }, {
749
+ default: vue.withCtx(() => [
750
+ (vue.openBlock(true), vue.createElementBlock(
751
+ vue.Fragment,
752
+ null,
753
+ vue.renderList(vue.unref(periodList), (periodItem) => {
754
+ return vue.openBlock(), vue.createBlock(_component_g_select_option, {
755
+ value: periodItem.value
756
+ }, {
757
+ default: vue.withCtx(() => [
758
+ vue.createTextVNode(
759
+ vue.toDisplayString(periodItem.label),
760
+ 1
761
+ )
762
+ ]),
763
+ _: 2
764
+ }, 1032, ["value"]);
765
+ }),
766
+ 256
767
+ ))
768
+ ]),
769
+ _: 1
770
+ }, 8, ["value", "size"]),
771
+ vue.createElementVNode(
772
+ "span",
773
+ _hoisted_3,
774
+ vue.toDisplayString(state.periodDateRange),
775
+ 1
776
+ )
777
+ ],
778
+ 64
779
+ )) : vue.createCommentVNode("v-if", true),
780
+ vue.createVNode(_component_g_select, {
781
+ value: state.range,
782
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => state.range = $event),
783
+ onChange: getTableData,
784
+ class: "input-select second-select",
785
+ size: vue.unref(isPC) ? "small" : "medium"
786
+ }, {
787
+ default: vue.withCtx(() => [
788
+ (vue.openBlock(true), vue.createElementBlock(
789
+ vue.Fragment,
790
+ null,
791
+ vue.renderList(vue.unref(rangeList), (item) => {
792
+ return vue.openBlock(), vue.createBlock(_component_g_select_option, {
793
+ key: item,
794
+ value: item
795
+ }, {
796
+ default: vue.withCtx(() => [
797
+ vue.createTextVNode(
798
+ vue.toDisplayString(item) + " HV:" + vue.toDisplayString(vue.unref(chartHelp.numberFormat)(state.hvMap[item])),
799
+ 1
800
+ ),
801
+ state.hvMap[item] !== null || !isNaN(state.hvMap[item]) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, "%")) : vue.createCommentVNode("v-if", true)
802
+ ]),
803
+ _: 2
804
+ }, 1032, ["value"]);
805
+ }),
806
+ 128
807
+ ))
808
+ ]),
809
+ _: 1
810
+ }, 8, ["value", "size"])
811
+ ]),
812
+ body: vue.withCtx(() => [
813
+ state.showTableCard ? (vue.openBlock(), vue.createBlock(_component_g_chart_table, {
814
+ key: 0,
815
+ tableData: state.tableData,
816
+ name: "IV"
817
+ }, null, 8, ["tableData"])) : (vue.openBlock(), vue.createElementBlock(
818
+ "div",
819
+ _hoisted_5,
820
+ [
821
+ vue.createElementVNode(
822
+ "div",
823
+ {
824
+ class: vue.normalizeClass({
825
+ "h5-legend-box-hover": state.isToolTipShow,
826
+ "h5-legend-box": true,
827
+ "pc-hide": true
828
+ })
829
+ },
830
+ [
831
+ vue.createElementVNode(
832
+ "h6",
833
+ _hoisted_6,
834
+ vue.toDisplayString(state.toolTipTitle),
835
+ 1
836
+ ),
837
+ vue.createElementVNode("div", _hoisted_7, [
838
+ (vue.openBlock(true), vue.createElementBlock(
839
+ vue.Fragment,
840
+ null,
841
+ vue.renderList(vue.unref(legendList).slice(1), (legendItem) => {
842
+ var _a, _b, _c, _d;
843
+ return vue.openBlock(), vue.createElementBlock("div", {
844
+ key: legendItem.label
845
+ }, [
846
+ vue.createElementVNode(
847
+ "span",
848
+ {
849
+ style: vue.normalizeStyle({ backgroundColor: legendItem.color }),
850
+ class: "legend-line"
851
+ },
852
+ null,
853
+ 4
854
+ ),
855
+ vue.createElementVNode("div", null, [
856
+ vue.createElementVNode(
857
+ "div",
858
+ null,
859
+ vue.toDisplayString(legendItem.label),
860
+ 1
861
+ ),
862
+ vue.createElementVNode(
863
+ "p",
864
+ {
865
+ class: vue.normalizeClass({
866
+ "positive-text": (_b = (_a = state.legendMap) == null ? void 0 : _a[legendItem.value]) == null ? void 0 : _b.includes("+"),
867
+ "negative-text": (_d = (_c = state.legendMap) == null ? void 0 : _c[legendItem.value]) == null ? void 0 : _d.includes("-")
868
+ })
869
+ },
870
+ vue.toDisplayString(state.legendMap[legendItem.value]),
871
+ 3
872
+ )
873
+ ])
874
+ ]);
875
+ }),
876
+ 128
877
+ ))
878
+ ])
879
+ ],
880
+ 2
881
+ ),
882
+ vue.createVNode(_component_g_chart, {
883
+ class: "skew-chart",
884
+ option: vue.unref(chartOption),
885
+ onShowTip: _cache[2] || (_cache[2] = ($event) => handleTipShow(true)),
886
+ onHideTip: _cache[3] || (_cache[3] = ($event) => handleTipShow(false))
887
+ }, null, 8, ["option"])
888
+ ],
889
+ 512
890
+ ))
891
+ ]),
892
+ _: 1
893
+ }, 8, ["currency", "exchange", "loading"])
894
+ ],
895
+ 2
896
+ );
897
+ };
28
898
  }
29
899
  });
900
+ var PanelAtmIv = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/luobowen/Desktop/greeks/greeks-live-ui/packages/components/panel-atm-iv/src/panel-atm-iv.vue"]]);
30
901
 
31
- exports.panelAtmIvEmits = panelAtmIvEmits;
32
- exports.panelAtmIvProps = panelAtmIvProps;
902
+ exports["default"] = PanelAtmIv;
33
903
  //# sourceMappingURL=panel-atm-iv2.js.map