@antscorp/antsomi-ui 1.3.3-beta.2 → 1.3.3-beta.21

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 (652) hide show
  1. package/README.md +78 -78
  2. package/dist/index.js +1 -1
  3. package/dist/main.css +100 -1
  4. package/dist/public/icons/stars_slider.png +0 -0
  5. package/es/assets/css/main.scss +4 -4
  6. package/es/assets/images/feedback.svg +3 -3
  7. package/es/assets/images/stars_slider.png +0 -0
  8. package/es/components/atoms/Alert/Alert.d.ts +4 -4
  9. package/es/components/atoms/Alert/Alert.js +19 -19
  10. package/es/components/atoms/Alert/index.d.ts +1 -1
  11. package/es/components/atoms/Alert/index.js +1 -1
  12. package/es/components/atoms/Button/Button.d.ts +1 -1
  13. package/es/components/atoms/Button/Button.js +1 -1
  14. package/es/components/atoms/Button/index.d.ts +4 -4
  15. package/es/components/atoms/Button/index.js +2 -2
  16. package/es/components/atoms/Button/test.d.ts +3 -3
  17. package/es/components/atoms/Button/test.js +99 -99
  18. package/es/components/atoms/Checkbox/Checkbox.d.ts +1 -1
  19. package/es/components/atoms/Checkbox/Checkbox.js +1 -1
  20. package/es/components/atoms/Checkbox/index.d.ts +1 -1
  21. package/es/components/atoms/Checkbox/index.js +1 -1
  22. package/es/components/atoms/Divider/Divider.d.ts +1 -1
  23. package/es/components/atoms/Divider/Divider.js +1 -1
  24. package/es/components/atoms/Divider/index.d.ts +1 -1
  25. package/es/components/atoms/Divider/index.js +1 -1
  26. package/es/components/atoms/DividerPure/DividerPure.d.ts +10 -10
  27. package/es/components/atoms/DividerPure/DividerPure.js +27 -27
  28. package/es/components/atoms/DividerPure/index.d.ts +1 -1
  29. package/es/components/atoms/DividerPure/index.js +1 -1
  30. package/es/components/atoms/DividerPure/styled.d.ts +1 -1
  31. package/es/components/atoms/DividerPure/styled.js +41 -41
  32. package/es/components/atoms/Empty/Empty.d.ts +5 -5
  33. package/es/components/atoms/Empty/Empty.js +2 -2
  34. package/es/components/atoms/Empty/index.d.ts +1 -1
  35. package/es/components/atoms/Empty/index.js +1 -1
  36. package/es/components/atoms/Flex/Flex.d.ts +2 -0
  37. package/es/components/atoms/Flex/Flex.js +1 -0
  38. package/es/components/atoms/Flex/index.d.ts +1 -0
  39. package/es/components/atoms/Flex/index.js +1 -0
  40. package/es/components/atoms/FloatButton/FloatButton.d.ts +1 -1
  41. package/es/components/atoms/FloatButton/FloatButton.js +1 -1
  42. package/es/components/atoms/FloatButton/index.d.ts +1 -1
  43. package/es/components/atoms/FloatButton/index.js +2 -2
  44. package/es/components/atoms/Grid/Grid.d.ts +3 -3
  45. package/es/components/atoms/Grid/Grid.js +3 -3
  46. package/es/components/atoms/Grid/index.d.ts +1 -1
  47. package/es/components/atoms/Grid/index.js +1 -1
  48. package/es/components/atoms/Icon/index.d.ts +10 -10
  49. package/es/components/atoms/Icon/index.js +36 -36
  50. package/es/components/atoms/Input/Input.d.ts +28 -20
  51. package/es/components/atoms/Input/Input.js +95 -92
  52. package/es/components/atoms/Input/index.d.ts +2 -2
  53. package/es/components/atoms/Input/index.js +1 -1
  54. package/es/components/atoms/Input/styled.d.ts +11 -11
  55. package/es/components/atoms/Input/styled.js +109 -109
  56. package/es/components/atoms/InputNumber/InputNumber.d.ts +6 -6
  57. package/es/components/atoms/InputNumber/InputNumber.js +27 -27
  58. package/es/components/atoms/InputNumber/index.d.ts +1 -1
  59. package/es/components/atoms/InputNumber/index.js +1 -1
  60. package/es/components/atoms/Message/Message.d.ts +1 -1
  61. package/es/components/atoms/Message/Message.js +1 -1
  62. package/es/components/atoms/Message/index.d.ts +1 -1
  63. package/es/components/atoms/Message/index.js +1 -1
  64. package/es/components/atoms/Notification/Notification.d.ts +1 -1
  65. package/es/components/atoms/Notification/Notification.js +1 -1
  66. package/es/components/atoms/Notification/index.d.ts +1 -1
  67. package/es/components/atoms/Notification/index.js +1 -1
  68. package/es/components/atoms/Pagination/Pagination.d.ts +2 -2
  69. package/es/components/atoms/Pagination/Pagination.js +2 -2
  70. package/es/components/atoms/Pagination/index.d.ts +1 -1
  71. package/es/components/atoms/Pagination/index.js +1 -1
  72. package/es/components/atoms/Popover/Popover.d.ts +4 -4
  73. package/es/components/atoms/Popover/Popover.js +2 -2
  74. package/es/components/atoms/Popover/index.d.ts +1 -1
  75. package/es/components/atoms/Popover/index.js +1 -1
  76. package/es/components/atoms/Popover/styled.d.ts +4 -4
  77. package/es/components/atoms/Popover/styled.js +5 -5
  78. package/es/components/atoms/Progress/Progress.d.ts +2 -2
  79. package/es/components/atoms/Progress/Progress.js +2 -2
  80. package/es/components/atoms/Progress/index.d.ts +1 -1
  81. package/es/components/atoms/Progress/index.js +1 -1
  82. package/es/components/atoms/Radio/Radio.d.ts +1 -1
  83. package/es/components/atoms/Radio/Radio.js +1 -1
  84. package/es/components/atoms/Radio/index.d.ts +7 -7
  85. package/es/components/atoms/Radio/index.js +25 -25
  86. package/es/components/atoms/Rate/Rate.d.ts +2 -2
  87. package/es/components/atoms/Rate/Rate.js +2 -2
  88. package/es/components/atoms/Rate/index.d.ts +1 -1
  89. package/es/components/atoms/Rate/index.js +1 -1
  90. package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
  91. package/es/components/atoms/RateV2/RateV2.js +73 -0
  92. package/es/components/atoms/RateV2/index.d.ts +1 -0
  93. package/es/components/atoms/RateV2/index.js +1 -0
  94. package/es/components/atoms/RequiredLabel/index.d.ts +7 -7
  95. package/es/components/atoms/RequiredLabel/index.js +24 -24
  96. package/es/components/atoms/RequiredLabel/styled.d.ts +2 -2
  97. package/es/components/atoms/RequiredLabel/styled.js +10 -10
  98. package/es/components/atoms/ScrollBox/index.d.ts +9 -9
  99. package/es/components/atoms/ScrollBox/index.js +51 -51
  100. package/es/components/atoms/Segmented/Segmented.d.ts +2 -2
  101. package/es/components/atoms/Segmented/Segmented.js +2 -2
  102. package/es/components/atoms/Segmented/index.d.ts +1 -1
  103. package/es/components/atoms/Segmented/index.js +1 -1
  104. package/es/components/atoms/Skeleton/Skeleton.d.ts +8 -8
  105. package/es/components/atoms/Skeleton/Skeleton.js +2 -2
  106. package/es/components/atoms/Skeleton/index.d.ts +1 -1
  107. package/es/components/atoms/Skeleton/index.js +1 -1
  108. package/es/components/atoms/Slider/index.d.ts +6 -5
  109. package/es/components/atoms/Slider/index.js +25 -32
  110. package/es/components/atoms/Slider/styled.d.ts +7 -7
  111. package/es/components/atoms/Slider/styled.js +44 -44
  112. package/es/components/atoms/SliderV2/index.d.ts +6 -0
  113. package/es/components/atoms/SliderV2/index.js +21 -0
  114. package/es/components/atoms/Space/Space.d.ts +6 -6
  115. package/es/components/atoms/Space/Space.js +9 -9
  116. package/es/components/atoms/Space/index.d.ts +1 -1
  117. package/es/components/atoms/Space/index.js +1 -1
  118. package/es/components/atoms/Spin/Spin.d.ts +10 -9
  119. package/es/components/atoms/Spin/Spin.js +28 -28
  120. package/es/components/atoms/Spin/index.d.ts +1 -1
  121. package/es/components/atoms/Spin/index.js +1 -1
  122. package/es/components/atoms/Spin/styled.d.ts +1 -1
  123. package/es/components/atoms/Spin/styled.js +7 -7
  124. package/es/components/atoms/Statistic/Statistic.d.ts +1 -1
  125. package/es/components/atoms/Statistic/Statistic.js +2 -2
  126. package/es/components/atoms/Statistic/index.d.ts +1 -1
  127. package/es/components/atoms/Statistic/index.js +1 -1
  128. package/es/components/atoms/Steps/Steps.d.ts +4 -4
  129. package/es/components/atoms/Steps/Steps.js +2 -2
  130. package/es/components/atoms/Steps/index.d.ts +1 -1
  131. package/es/components/atoms/Steps/index.js +1 -1
  132. package/es/components/atoms/Switch/Switch.d.ts +2 -2
  133. package/es/components/atoms/Switch/Switch.js +2 -2
  134. package/es/components/atoms/Switch/index.d.ts +1 -1
  135. package/es/components/atoms/Switch/index.js +1 -1
  136. package/es/components/atoms/Tag/Tag.d.ts +1 -1
  137. package/es/components/atoms/Tag/Tag.js +1 -1
  138. package/es/components/atoms/Tag/index.d.ts +1 -1
  139. package/es/components/atoms/Tag/index.js +1 -1
  140. package/es/components/atoms/Text/index.d.ts +10 -10
  141. package/es/components/atoms/Text/index.js +27 -27
  142. package/es/components/atoms/Text/styled.d.ts +7 -7
  143. package/es/components/atoms/Text/styled.js +52 -52
  144. package/es/components/atoms/Timeline/Timeline.d.ts +4 -4
  145. package/es/components/atoms/Timeline/Timeline.js +2 -2
  146. package/es/components/atoms/Timeline/index.d.ts +1 -1
  147. package/es/components/atoms/Timeline/index.js +1 -1
  148. package/es/components/atoms/Tooltip/Tooltip.d.ts +1 -1
  149. package/es/components/atoms/Tooltip/Tooltip.js +1 -1
  150. package/es/components/atoms/Tooltip/index.d.ts +1 -1
  151. package/es/components/atoms/Tooltip/index.js +1 -1
  152. package/es/components/atoms/Typography/Text.d.ts +1 -1
  153. package/es/components/atoms/Typography/Text.js +1 -1
  154. package/es/components/atoms/Typography/index.d.ts +1 -1
  155. package/es/components/atoms/Typography/index.js +1 -1
  156. package/es/components/atoms/Watermark/Watermark.d.ts +2 -2
  157. package/es/components/atoms/Watermark/Watermark.js +2 -2
  158. package/es/components/atoms/Watermark/index.d.ts +1 -1
  159. package/es/components/atoms/Watermark/index.js +1 -1
  160. package/es/components/atoms/index.d.ts +36 -33
  161. package/es/components/atoms/index.js +35 -32
  162. package/es/components/common/ConfigProvider/ConfigProvider.d.ts +10 -10
  163. package/es/components/common/ConfigProvider/ConfigProvider.js +42 -42
  164. package/es/components/common/ConfigProvider/GlobalStyle.d.ts +5 -5
  165. package/es/components/common/ConfigProvider/GlobalStyle.js +527 -490
  166. package/es/components/common/ConfigProvider/index.d.ts +1 -1
  167. package/es/components/common/ConfigProvider/index.js +1 -1
  168. package/es/components/common/index.d.ts +1 -1
  169. package/es/components/common/index.js +1 -1
  170. package/es/components/icons/AccountCircle.d.ts +3 -3
  171. package/es/components/icons/AccountCircle.js +3 -3
  172. package/es/components/icons/AddShoppingCart.d.ts +3 -3
  173. package/es/components/icons/AddShoppingCart.js +3 -3
  174. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  175. package/es/components/icons/ArrowGrowIcon.js +4 -4
  176. package/es/components/icons/AssignmentInd.d.ts +3 -3
  177. package/es/components/icons/AssignmentInd.js +3 -3
  178. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  179. package/es/components/icons/AudioRecordIcon.js +4 -4
  180. package/es/components/icons/BugIcon.d.ts +2 -1
  181. package/es/components/icons/BugIcon.js +4 -4
  182. package/es/components/icons/Call.d.ts +3 -3
  183. package/es/components/icons/Call.js +3 -3
  184. package/es/components/icons/CameraIcon.d.ts +2 -1
  185. package/es/components/icons/CameraIcon.js +4 -4
  186. package/es/components/icons/CaptureIcon.d.ts +2 -1
  187. package/es/components/icons/CaptureIcon.js +4 -4
  188. package/es/components/icons/Category.d.ts +3 -3
  189. package/es/components/icons/Category.js +5 -5
  190. package/es/components/icons/ChatBubbleOutline.d.ts +3 -3
  191. package/es/components/icons/ChatBubbleOutline.js +3 -3
  192. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  193. package/es/components/icons/CheckSlimIcon.js +4 -4
  194. package/es/components/icons/CircleNotifications.d.ts +3 -3
  195. package/es/components/icons/CircleNotifications.js +3 -3
  196. package/es/components/icons/CloseIcon.d.ts +4 -3
  197. package/es/components/icons/CloseIcon.js +22 -22
  198. package/es/components/icons/CommentIcon.d.ts +2 -1
  199. package/es/components/icons/CommentIcon.js +4 -4
  200. package/es/components/icons/ConfirmationNumber.d.ts +3 -3
  201. package/es/components/icons/ConfirmationNumber.js +3 -3
  202. package/es/components/icons/DesktopWindows.d.ts +3 -3
  203. package/es/components/icons/DesktopWindows.js +3 -3
  204. package/es/components/icons/EventIcon.d.ts +4 -3
  205. package/es/components/icons/EventIcon.js +18 -18
  206. package/es/components/icons/FactCheck.d.ts +3 -3
  207. package/es/components/icons/FactCheck.js +3 -3
  208. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  209. package/es/components/icons/FreeDrawIcon.js +4 -4
  210. package/es/components/icons/GPTIcon.d.ts +2 -1
  211. package/es/components/icons/GPTIcon.js +18 -18
  212. package/es/components/icons/GPTIconV2.d.ts +2 -1
  213. package/es/components/icons/GPTIconV2.js +18 -18
  214. package/es/components/icons/GPTIconV3.d.ts +2 -1
  215. package/es/components/icons/GPTIconV3.js +5 -5
  216. package/es/components/icons/HighlightIcon.d.ts +2 -1
  217. package/es/components/icons/HighlightIcon.js +4 -4
  218. package/es/components/icons/HightlightAlt.d.ts +3 -3
  219. package/es/components/icons/HightlightAlt.js +3 -3
  220. package/es/components/icons/HowToReg.d.ts +3 -3
  221. package/es/components/icons/HowToReg.js +3 -3
  222. package/es/components/icons/IdeaIcon.d.ts +2 -1
  223. package/es/components/icons/IdeaIcon.js +4 -4
  224. package/es/components/icons/Interactive.d.ts +3 -3
  225. package/es/components/icons/Interactive.js +3 -3
  226. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  227. package/es/components/icons/InvisibleIcon.js +5 -5
  228. package/es/components/icons/List.d.ts +3 -3
  229. package/es/components/icons/List.js +3 -3
  230. package/es/components/icons/LocalMallIcon.d.ts +3 -3
  231. package/es/components/icons/LocalMallIcon.js +3 -3
  232. package/es/components/icons/MobileFriendly.d.ts +3 -3
  233. package/es/components/icons/MobileFriendly.js +3 -3
  234. package/es/components/icons/MuteIcon.d.ts +2 -1
  235. package/es/components/icons/MuteIcon.js +4 -4
  236. package/es/components/icons/NotificationsActive.d.ts +3 -3
  237. package/es/components/icons/NotificationsActive.js +3 -3
  238. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  239. package/es/components/icons/OpenUrlIcon.js +4 -4
  240. package/es/components/icons/PauseIcon.d.ts +2 -1
  241. package/es/components/icons/PauseIcon.js +4 -4
  242. package/es/components/icons/Payment.d.ts +3 -3
  243. package/es/components/icons/Payment.js +3 -3
  244. package/es/components/icons/PersonAddDisabled.d.ts +3 -3
  245. package/es/components/icons/PersonAddDisabled.js +4 -4
  246. package/es/components/icons/PhoneCallback.d.ts +3 -3
  247. package/es/components/icons/PhoneCallback.js +3 -3
  248. package/es/components/icons/PlaneIcon.d.ts +2 -1
  249. package/es/components/icons/PlaneIcon.js +8 -8
  250. package/es/components/icons/Preview.d.ts +3 -3
  251. package/es/components/icons/Preview.js +3 -3
  252. package/es/components/icons/Redeem.d.ts +3 -3
  253. package/es/components/icons/Redeem.js +3 -3
  254. package/es/components/icons/RemoveRedEye.d.ts +3 -3
  255. package/es/components/icons/RemoveRedEye.js +3 -3
  256. package/es/components/icons/RemoveShoppingCart.d.ts +3 -3
  257. package/es/components/icons/RemoveShoppingCart.js +3 -3
  258. package/es/components/icons/RequestIcon.d.ts +2 -1
  259. package/es/components/icons/RequestIcon.js +4 -4
  260. package/es/components/icons/Search.d.ts +3 -3
  261. package/es/components/icons/Search.js +3 -3
  262. package/es/components/icons/ShoppingBag.d.ts +3 -3
  263. package/es/components/icons/ShoppingBag.js +3 -3
  264. package/es/components/icons/ShoppingCart.d.ts +3 -3
  265. package/es/components/icons/ShoppingCart.js +3 -3
  266. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  267. package/es/components/icons/StopRecordIcon.js +4 -4
  268. package/es/components/icons/Store.d.ts +3 -3
  269. package/es/components/icons/Store.js +3 -3
  270. package/es/components/icons/UserIcon.d.ts +2 -1
  271. package/es/components/icons/UserIcon.js +8 -8
  272. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  273. package/es/components/icons/VerticalDotsIcon.js +4 -4
  274. package/es/components/icons/WarningIcon.d.ts +2 -1
  275. package/es/components/icons/WarningIcon.js +4 -4
  276. package/es/components/icons/Web.d.ts +3 -3
  277. package/es/components/icons/Web.js +3 -3
  278. package/es/components/icons/WebAsset.d.ts +3 -3
  279. package/es/components/icons/WebAsset.js +3 -3
  280. package/es/components/icons/index.d.ts +54 -54
  281. package/es/components/icons/index.js +54 -54
  282. package/es/components/icons/type.d.ts +3 -3
  283. package/es/components/icons/type.js +1 -1
  284. package/es/components/index.d.ts +4 -4
  285. package/es/components/index.js +4 -4
  286. package/es/components/molecules/AlignSetting/index.d.ts +19 -19
  287. package/es/components/molecules/AlignSetting/index.js +52 -52
  288. package/es/components/molecules/AlignSetting/styled.d.ts +1 -1
  289. package/es/components/molecules/AlignSetting/styled.js +7 -7
  290. package/es/components/molecules/AlignSetting/utils.d.ts +3 -3
  291. package/es/components/molecules/AlignSetting/utils.js +19 -19
  292. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +16 -15
  293. package/es/components/molecules/CaptureScreen/CaptureScreen.js +834 -834
  294. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +17 -16
  295. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.js +80 -80
  296. package/es/components/molecules/CaptureScreen/components/CommentBox/index.d.ts +1 -1
  297. package/es/components/molecules/CaptureScreen/components/CommentBox/index.js +1 -1
  298. package/es/components/molecules/CaptureScreen/components/CommentBox/styled.d.ts +12 -12
  299. package/es/components/molecules/CaptureScreen/components/CommentBox/styled.js +136 -136
  300. package/es/components/molecules/CaptureScreen/components/CommentBox/types.d.ts +15 -15
  301. package/es/components/molecules/CaptureScreen/components/CommentBox/types.js +1 -1
  302. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +4 -3
  303. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.js +17 -17
  304. package/es/components/molecules/CaptureScreen/components/Cursor/index.d.ts +1 -1
  305. package/es/components/molecules/CaptureScreen/components/Cursor/index.js +1 -1
  306. package/es/components/molecules/CaptureScreen/components/Cursor/styled.d.ts +7 -7
  307. package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +79 -79
  308. package/es/components/molecules/CaptureScreen/components/Cursor/types.d.ts +10 -10
  309. package/es/components/molecules/CaptureScreen/components/Cursor/types.js +1 -1
  310. package/es/components/molecules/CaptureScreen/constants.d.ts +41 -41
  311. package/es/components/molecules/CaptureScreen/constants.js +118 -118
  312. package/es/components/molecules/CaptureScreen/hooks/useImageEditor.d.ts +5 -5
  313. package/es/components/molecules/CaptureScreen/hooks/useImageEditor.js +103 -103
  314. package/es/components/molecules/CaptureScreen/index.d.ts +1 -1
  315. package/es/components/molecules/CaptureScreen/index.js +1 -1
  316. package/es/components/molecules/CaptureScreen/styled.d.ts +26 -26
  317. package/es/components/molecules/CaptureScreen/styled.js +255 -255
  318. package/es/components/molecules/CaptureScreen/themes/black.d.ts +54 -54
  319. package/es/components/molecules/CaptureScreen/themes/black.js +64 -64
  320. package/es/components/molecules/CaptureScreen/themes/white.d.ts +54 -54
  321. package/es/components/molecules/CaptureScreen/themes/white.js +64 -64
  322. package/es/components/molecules/CaptureScreen/types.d.ts +108 -108
  323. package/es/components/molecules/CaptureScreen/types.js +1 -1
  324. package/es/components/molecules/CaptureScreen/utils.d.ts +13 -13
  325. package/es/components/molecules/CaptureScreen/utils.js +62 -62
  326. package/es/components/molecules/Card/Card.d.ts +1 -1
  327. package/es/components/molecules/Card/Card.js +2 -2
  328. package/es/components/molecules/Card/index.d.ts +1 -1
  329. package/es/components/molecules/Card/index.js +1 -1
  330. package/es/components/molecules/Cascader/Cascader.d.ts +1 -1
  331. package/es/components/molecules/Cascader/Cascader.js +1 -1
  332. package/es/components/molecules/Cascader/index.d.ts +1 -1
  333. package/es/components/molecules/Cascader/index.js +1 -1
  334. package/es/components/molecules/ChatBox/ChatBox.d.ts +3 -3
  335. package/es/components/molecules/ChatBox/ChatBox.js +188 -188
  336. package/es/components/molecules/ChatBox/MessageItem.d.ts +5 -5
  337. package/es/components/molecules/ChatBox/MessageItem.js +66 -66
  338. package/es/components/molecules/ChatBox/constants.d.ts +6 -6
  339. package/es/components/molecules/ChatBox/constants.js +51 -51
  340. package/es/components/molecules/ChatBox/index.d.ts +1 -1
  341. package/es/components/molecules/ChatBox/index.js +1 -1
  342. package/es/components/molecules/ChatBox/styled.d.ts +10 -10
  343. package/es/components/molecules/ChatBox/styled.js +280 -280
  344. package/es/components/molecules/ChatBox/types.d.ts +32 -32
  345. package/es/components/molecules/ChatBox/types.js +1 -1
  346. package/es/components/molecules/Collapse/Collapse.d.ts +4 -4
  347. package/es/components/molecules/Collapse/Collapse.js +11 -2
  348. package/es/components/molecules/Collapse/index.d.ts +1 -1
  349. package/es/components/molecules/Collapse/index.js +1 -1
  350. package/es/components/molecules/ColorPicker/ChromePicker/index.d.ts +1 -1
  351. package/es/components/molecules/ColorPicker/ChromePicker/index.js +3 -3
  352. package/es/components/molecules/ColorPicker/ChromePicker/styled.d.ts +1 -1
  353. package/es/components/molecules/ColorPicker/ChromePicker/styled.js +15 -15
  354. package/es/components/molecules/ColorPicker/CustomPicker/index.d.ts +2 -2
  355. package/es/components/molecules/ColorPicker/CustomPicker/index.js +117 -117
  356. package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +9 -9
  357. package/es/components/molecules/ColorPicker/CustomPicker/styled.js +104 -104
  358. package/es/components/molecules/ColorPicker/SketchPicker/index.d.ts +10 -10
  359. package/es/components/molecules/ColorPicker/SketchPicker/index.js +5 -5
  360. package/es/components/molecules/ColorPicker/SketchPicker/styled.d.ts +1 -1
  361. package/es/components/molecules/ColorPicker/SketchPicker/styled.js +10 -10
  362. package/es/components/molecules/ColorPicker/index.d.ts +13 -13
  363. package/es/components/molecules/ColorPicker/index.js +95 -95
  364. package/es/components/molecules/ColorPicker/styled.d.ts +1 -1
  365. package/es/components/molecules/ColorPicker/styled.js +10 -10
  366. package/es/components/molecules/ColorSetting/index.d.ts +14 -14
  367. package/es/components/molecules/ColorSetting/index.js +97 -97
  368. package/es/components/molecules/ColorSetting/styled.d.ts +7 -7
  369. package/es/components/molecules/ColorSetting/styled.js +42 -42
  370. package/es/components/molecules/DatePicker/DatePicker.d.ts +8 -8
  371. package/es/components/molecules/DatePicker/DatePicker.js +8 -8
  372. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +28 -28
  373. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +428 -428
  374. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +53 -53
  375. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +74 -74
  376. package/es/components/molecules/DatePicker/components/AdvancedPicker/index.d.ts +3 -3
  377. package/es/components/molecules/DatePicker/components/AdvancedPicker/index.js +1 -1
  378. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +7 -7
  379. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +49 -49
  380. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +14 -14
  381. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.js +1 -1
  382. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +15 -15
  383. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +84 -84
  384. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +15 -15
  385. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +70 -70
  386. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +4 -4
  387. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +4 -4
  388. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.d.ts +2 -2
  389. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.js +1 -1
  390. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +17 -17
  391. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.js +1 -1
  392. package/es/components/molecules/DatePicker/index.d.ts +3 -3
  393. package/es/components/molecules/DatePicker/index.js +1 -1
  394. package/es/components/molecules/Drawer/Drawer.d.ts +1 -1
  395. package/es/components/molecules/Drawer/Drawer.js +2 -2
  396. package/es/components/molecules/Drawer/index.d.ts +1 -1
  397. package/es/components/molecules/Drawer/index.js +1 -1
  398. package/es/components/molecules/Dropdown/Dropdown.d.ts +1 -1
  399. package/es/components/molecules/Dropdown/Dropdown.js +1 -1
  400. package/es/components/molecules/Dropdown/index.d.ts +1 -1
  401. package/es/components/molecules/Dropdown/index.js +1 -1
  402. package/es/components/molecules/EdgeSetting/index.d.ts +39 -39
  403. package/es/components/molecules/EdgeSetting/index.js +192 -192
  404. package/es/components/molecules/EdgeSetting/styled.d.ts +3 -3
  405. package/es/components/molecules/EdgeSetting/styled.js +18 -18
  406. package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -0
  407. package/es/components/molecules/FontFamilySelect/constants.js +257 -0
  408. package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
  409. package/es/components/molecules/FontFamilySelect/index.js +53 -0
  410. package/es/components/molecules/FontSetting/constants.d.ts +3 -0
  411. package/es/components/molecules/FontSetting/constants.js +22 -0
  412. package/es/components/molecules/FontSetting/index.d.ts +24 -0
  413. package/es/components/molecules/FontSetting/index.js +54 -0
  414. package/es/components/molecules/FontSetting/types.d.ts +22 -0
  415. package/es/components/molecules/FontSetting/types.js +1 -0
  416. package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
  417. package/es/components/molecules/FontWeightSelect/constants.js +11 -0
  418. package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
  419. package/es/components/molecules/FontWeightSelect/index.js +39 -0
  420. package/es/components/molecules/Form/Form.d.ts +1 -0
  421. package/es/components/molecules/Form/Form.js +1 -0
  422. package/es/components/molecules/Form/index.d.ts +1 -0
  423. package/es/components/molecules/Form/index.js +1 -0
  424. package/es/components/molecules/GradientSetting/index.d.ts +36 -36
  425. package/es/components/molecules/GradientSetting/index.js +99 -99
  426. package/es/components/molecules/GradientSetting/styled.d.ts +1 -1
  427. package/es/components/molecules/GradientSetting/styled.js +59 -59
  428. package/es/components/molecules/IconSelection/components/Icon/index.d.ts +10 -10
  429. package/es/components/molecules/IconSelection/components/Icon/index.js +28 -28
  430. package/es/components/molecules/IconSelection/constants.d.ts +56 -56
  431. package/es/components/molecules/IconSelection/constants.js +89 -89
  432. package/es/components/molecules/IconSelection/index.d.ts +3 -3
  433. package/es/components/molecules/IconSelection/index.js +143 -143
  434. package/es/components/molecules/IconSelection/styled.d.ts +8 -8
  435. package/es/components/molecules/IconSelection/styled.js +80 -80
  436. package/es/components/molecules/IconSelection/types.d.ts +26 -26
  437. package/es/components/molecules/IconSelection/types.js +2 -2
  438. package/es/components/molecules/IconSelection/utils.d.ts +4 -4
  439. package/es/components/molecules/IconSelection/utils.js +13 -13
  440. package/es/components/molecules/InputNumber/index.d.ts +9 -9
  441. package/es/components/molecules/InputNumber/index.js +81 -81
  442. package/es/components/molecules/InputNumberWithUnit/index.d.ts +31 -31
  443. package/es/components/molecules/InputNumberWithUnit/index.js +37 -37
  444. package/es/components/molecules/InputNumberWithUnit/styled.d.ts +1 -1
  445. package/es/components/molecules/InputNumberWithUnit/styled.js +20 -20
  446. package/es/components/molecules/InputSearch/index.d.ts +7 -7
  447. package/es/components/molecules/InputSearch/index.js +23 -23
  448. package/es/components/molecules/InputSearch/styled.d.ts +1 -1
  449. package/es/components/molecules/InputSearch/styled.js +48 -48
  450. package/es/components/molecules/Modal/Modal.d.ts +23 -23
  451. package/es/components/molecules/Modal/Modal.js +26 -26
  452. package/es/components/molecules/Modal/index.d.ts +1 -1
  453. package/es/components/molecules/Modal/index.js +1 -1
  454. package/es/components/molecules/Modal/styled.d.ts +15 -15
  455. package/es/components/molecules/Modal/styled.js +78 -78
  456. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +4 -4
  457. package/es/components/molecules/Popconfirm/Popconfirm.js +2 -2
  458. package/es/components/molecules/Popconfirm/index.d.ts +1 -1
  459. package/es/components/molecules/Popconfirm/index.js +1 -1
  460. package/es/components/molecules/PopupDraggable/PopupDraggable.d.ts +6 -6
  461. package/es/components/molecules/PopupDraggable/PopupDraggable.js +52 -52
  462. package/es/components/molecules/PopupDraggable/index.d.ts +1 -1
  463. package/es/components/molecules/PopupDraggable/index.js +1 -1
  464. package/es/components/molecules/PopupDraggable/styled.d.ts +5 -5
  465. package/es/components/molecules/PopupDraggable/styled.js +52 -52
  466. package/es/components/molecules/PopupDraggable/types.d.ts +15 -15
  467. package/es/components/molecules/PopupDraggable/types.js +1 -1
  468. package/es/components/molecules/RadioGroup/index.d.ts +7 -7
  469. package/es/components/molecules/RadioGroup/index.js +23 -23
  470. package/es/components/molecules/RadioGroup/styled.d.ts +3 -3
  471. package/es/components/molecules/RadioGroup/styled.js +14 -14
  472. package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
  473. package/es/components/molecules/ResizeGrid/ResizeGrid.js +353 -0
  474. package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
  475. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +67 -0
  476. package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
  477. package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
  478. package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
  479. package/es/components/molecules/ResizeGrid/components/Cell/styled.js +62 -0
  480. package/es/components/molecules/ResizeGrid/constant.d.ts +34 -0
  481. package/es/components/molecules/ResizeGrid/constant.js +108 -0
  482. package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
  483. package/es/components/molecules/ResizeGrid/index.js +1 -0
  484. package/es/components/molecules/ResizeGrid/styled.d.ts +3 -0
  485. package/es/components/molecules/ResizeGrid/styled.js +20 -0
  486. package/es/components/molecules/ResizeGrid/types.d.ts +128 -0
  487. package/es/components/molecules/ResizeGrid/types.js +1 -0
  488. package/es/components/molecules/Result/Result.d.ts +1 -1
  489. package/es/components/molecules/Result/Result.js +2 -2
  490. package/es/components/molecules/Result/index.d.ts +1 -1
  491. package/es/components/molecules/Result/index.js +1 -1
  492. package/es/components/molecules/Select/Select.d.ts +17 -14
  493. package/es/components/molecules/Select/Select.js +50 -29
  494. package/es/components/molecules/Select/Test.d.ts +3 -2
  495. package/es/components/molecules/Select/Test.js +22 -22
  496. package/es/components/molecules/Select/index.d.ts +2 -2
  497. package/es/components/molecules/Select/index.js +1 -1
  498. package/es/components/molecules/Select/styled.d.ts +4 -4
  499. package/es/components/molecules/Select/styled.js +41 -41
  500. package/es/components/molecules/SettingWrapper/index.d.ts +12 -13
  501. package/es/components/molecules/SettingWrapper/index.js +20 -20
  502. package/es/components/molecules/SettingWrapper/styled.d.ts +5 -5
  503. package/es/components/molecules/SettingWrapper/styled.js +17 -17
  504. package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
  505. package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
  506. package/es/components/molecules/SliderWithInputNumber/index.d.ts +11 -11
  507. package/es/components/molecules/SliderWithInputNumber/index.js +62 -62
  508. package/es/components/molecules/SliderWithInputNumber/styled.d.ts +1 -1
  509. package/es/components/molecules/SliderWithInputNumber/styled.js +8 -8
  510. package/es/components/molecules/Tabs/Tabs.d.ts +1 -1
  511. package/es/components/molecules/Tabs/Tabs.js +1 -1
  512. package/es/components/molecules/Tabs/index.d.ts +1 -1
  513. package/es/components/molecules/Tabs/index.js +1 -1
  514. package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -0
  515. package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
  516. package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
  517. package/es/components/molecules/TextDecorationSelect/index.js +45 -0
  518. package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
  519. package/es/components/molecules/TextTransformSelect/constants.js +19 -0
  520. package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
  521. package/es/components/molecules/TextTransformSelect/index.js +39 -0
  522. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +11 -11
  523. package/es/components/molecules/TreeSelect/TreeSelect.js +2 -2
  524. package/es/components/molecules/TreeSelect/index.d.ts +1 -1
  525. package/es/components/molecules/TreeSelect/index.js +1 -1
  526. package/es/components/molecules/UploadImage/MediaIcon.d.ts +3 -2
  527. package/es/components/molecules/UploadImage/MediaIcon.js +8 -8
  528. package/es/components/molecules/UploadImage/index.d.ts +33 -33
  529. package/es/components/molecules/UploadImage/index.js +366 -366
  530. package/es/components/molecules/UploadImage/styled.d.ts +13 -13
  531. package/es/components/molecules/UploadImage/styled.js +134 -134
  532. package/es/components/molecules/index.d.ts +40 -30
  533. package/es/components/molecules/index.js +35 -27
  534. package/es/components/organism/Help/Help.d.ts +5 -5
  535. package/es/components/organism/Help/Help.js +1005 -1005
  536. package/es/components/organism/Help/constants.d.ts +140 -140
  537. package/es/components/organism/Help/constants.js +1653 -1653
  538. package/es/components/organism/Help/index.d.ts +1 -1
  539. package/es/components/organism/Help/index.js +1 -1
  540. package/es/components/organism/Help/styled.d.ts +71 -71
  541. package/es/components/organism/Help/styled.js +264 -264
  542. package/es/components/organism/Help/types.d.ts +67 -67
  543. package/es/components/organism/Help/types.js +1 -1
  544. package/es/components/organism/Help/utils.d.ts +15 -15
  545. package/es/components/organism/Help/utils.js +82 -82
  546. package/es/components/organism/PositionSetting/config.d.ts +10 -10
  547. package/es/components/organism/PositionSetting/config.js +10 -10
  548. package/es/components/organism/PositionSetting/index.d.ts +15 -15
  549. package/es/components/organism/PositionSetting/index.js +62 -62
  550. package/es/components/organism/PositionSetting/styled.d.ts +1 -1
  551. package/es/components/organism/PositionSetting/styled.js +3 -3
  552. package/es/components/organism/PositionSetting/types.d.ts +10 -10
  553. package/es/components/organism/PositionSetting/types.js +1 -1
  554. package/es/components/organism/Table/CrossTabTable/CrossTabTable.d.ts +18 -18
  555. package/es/components/organism/Table/CrossTabTable/CrossTabTable.js +305 -305
  556. package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.d.ts +11 -11
  557. package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.js +22 -22
  558. package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.d.ts +1 -1
  559. package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.js +1 -1
  560. package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.d.ts +1 -1
  561. package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.js +13 -13
  562. package/es/components/organism/Table/CrossTabTable/constants.d.ts +75 -75
  563. package/es/components/organism/Table/CrossTabTable/constants.js +1525 -1525
  564. package/es/components/organism/Table/CrossTabTable/index.d.ts +1 -1
  565. package/es/components/organism/Table/CrossTabTable/index.js +1 -1
  566. package/es/components/organism/Table/CrossTabTable/styled.d.ts +1 -1
  567. package/es/components/organism/Table/CrossTabTable/styled.js +13 -13
  568. package/es/components/organism/Table/CrossTabTable/types.d.ts +1 -1
  569. package/es/components/organism/Table/CrossTabTable/types.js +1 -1
  570. package/es/components/organism/Table/CrossTabTable/utils.d.ts +1 -1
  571. package/es/components/organism/Table/CrossTabTable/utils.js +1 -1
  572. package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.d.ts +11 -11
  573. package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.js +51 -51
  574. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.d.ts +12 -12
  575. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.js +41 -41
  576. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.d.ts +1 -1
  577. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.js +1 -1
  578. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.d.ts +3 -3
  579. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.js +21 -21
  580. package/es/components/organism/Table/ExplorePivotTable/constants.d.ts +4 -4
  581. package/es/components/organism/Table/ExplorePivotTable/constants.js +84 -84
  582. package/es/components/organism/Table/ExplorePivotTable/index.d.ts +2 -2
  583. package/es/components/organism/Table/ExplorePivotTable/index.js +2 -2
  584. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +12 -12
  585. package/es/components/organism/Table/ExplorePivotTable/styled.js +15 -15
  586. package/es/components/organism/Table/ExplorePivotTable/types.d.ts +17 -17
  587. package/es/components/organism/Table/ExplorePivotTable/types.js +1 -1
  588. package/es/components/organism/Table/ExplorePivotTable/utils.d.ts +4 -4
  589. package/es/components/organism/Table/ExplorePivotTable/utils.js +154 -154
  590. package/es/components/organism/Table/Table.d.ts +1 -1
  591. package/es/components/organism/Table/Table.js +1 -1
  592. package/es/components/organism/Table/index.d.ts +2 -2
  593. package/es/components/organism/Table/index.js +2 -2
  594. package/es/components/organism/index.d.ts +3 -3
  595. package/es/components/organism/index.js +3 -3
  596. package/es/constants/gradientSetting.d.ts +83 -83
  597. package/es/constants/gradientSetting.js +86 -86
  598. package/es/constants/index.d.ts +3 -3
  599. package/es/constants/index.js +3 -3
  600. package/es/constants/keyCode.d.ts +387 -387
  601. package/es/constants/keyCode.js +394 -394
  602. package/es/constants/storybook.d.ts +12 -11
  603. package/es/constants/storybook.js +24 -24
  604. package/es/constants/theme.d.ts +12 -12
  605. package/es/constants/theme.js +168 -146
  606. package/es/hooks/index.d.ts +2 -2
  607. package/es/hooks/index.js +21 -21
  608. package/es/hooks/useDebounce.d.ts +3 -3
  609. package/es/hooks/useDebounce.js +15 -15
  610. package/es/hooks/useDeepCompareEffect.d.ts +1 -0
  611. package/es/hooks/useDeepCompareEffect.js +21 -0
  612. package/es/index.d.ts +1 -1
  613. package/es/index.js +1 -1
  614. package/es/locales/en/translation.json +66 -66
  615. package/es/locales/i18n.d.ts +140 -140
  616. package/es/locales/i18n.js +38 -38
  617. package/es/locales/translations.d.ts +70 -70
  618. package/es/locales/translations.js +35 -35
  619. package/es/locales/types.d.ts +15 -15
  620. package/es/locales/types.js +1 -1
  621. package/es/locales/vi/translation.json +66 -66
  622. package/es/models/SavedImage.d.ts +32 -32
  623. package/es/models/SavedImage.js +26 -26
  624. package/es/models/Upload.d.ts +32 -32
  625. package/es/models/Upload.js +21 -21
  626. package/es/models/model.d.ts +8 -8
  627. package/es/models/model.js +5 -5
  628. package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +6 -6
  629. package/es/services/MediaTemplateDesign/UploadFile/index.js +75 -75
  630. package/es/services/Ticket.d.ts +67 -67
  631. package/es/services/Ticket.js +73 -73
  632. package/es/services/constants.d.ts +20 -20
  633. package/es/services/constants.js +21 -21
  634. package/es/services/index.d.ts +9 -9
  635. package/es/services/index.js +64 -64
  636. package/es/test.d.ts +14 -13
  637. package/es/test.js +162 -155
  638. package/es/types/index.d.ts +6 -6
  639. package/es/types/index.js +1 -1
  640. package/es/utils/color.d.ts +10 -10
  641. package/es/utils/color.js +61 -61
  642. package/es/utils/common.d.ts +53 -53
  643. package/es/utils/common.js +355 -355
  644. package/es/utils/handleError.d.ts +2 -2
  645. package/es/utils/handleError.js +6 -6
  646. package/es/utils/index.d.ts +3 -3
  647. package/es/utils/index.js +3 -3
  648. package/es/utils/loadable.d.ts +7 -7
  649. package/es/utils/loadable.js +10 -10
  650. package/es/utils/web.d.ts +10 -10
  651. package/es/utils/web.js +26 -26
  652. package/package.json +183 -182
@@ -1,64 +1,64 @@
1
- // Libraries
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- export const instance = axios.create();
5
- const { CancelToken } = axios;
6
- export const services = {
7
- mediaTemplateSavedImages: {
8
- getList: function getList(params, infos) {
9
- if (typeof params.API_HOST !== 'undefined') {
10
- const { API_HOST } = params;
11
- const { userId, accountId, token } = infos;
12
- const cancelToken = params.cancelToken ? params.cancelToken : new CancelToken(() => { });
13
- const { signal } = params;
14
- delete params.API_HOST;
15
- delete params.cancelToken;
16
- delete params.signal;
17
- const snapParams = Object.assign(Object.assign({}, params), { _token: token, _user_id: userId, _account_id: accountId });
18
- return instance.get(API_HOST, {
19
- params: snapParams,
20
- cancelToken,
21
- signal,
22
- });
23
- }
24
- return false;
25
- },
26
- create: function create(params, infos) {
27
- if (params.API_HOST !== 'undefined') {
28
- const { API_HOST } = params;
29
- const { userId, accountId, token } = infos;
30
- const cancelToken = params.cancelToken ? params.cancelToken : new CancelToken(() => { });
31
- delete params.API_HOST;
32
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
33
- params.cancelToken && delete params.cancelToken;
34
- const paramsInfo = {
35
- _token: token,
36
- _user_id: userId,
37
- _account_id: accountId,
38
- };
39
- return instance.post(API_HOST, params, { cancelToken, params: paramsInfo });
40
- }
41
- return Promise.resolve(false);
42
- },
43
- upload: function upload(params, infos) {
44
- if (typeof params.API_HOST !== 'undefined') {
45
- const { API_HOST } = params;
46
- const { userId, accountId, token } = infos;
47
- delete params.API_HOST;
48
- const paramsInfo = {
49
- _token: token,
50
- _user_id: userId,
51
- _account_id: accountId,
52
- };
53
- const url = `${API_HOST}?${qs.stringify(params.params)}`;
54
- return instance.post(url, params.formData, {
55
- params: paramsInfo,
56
- headers: {
57
- 'Content-Type': 'multipart/form-data',
58
- },
59
- });
60
- }
61
- return false;
62
- },
63
- },
64
- };
1
+ // Libraries
2
+ import axios from 'axios';
3
+ import qs from 'qs';
4
+ export const instance = axios.create();
5
+ const { CancelToken } = axios;
6
+ export const services = {
7
+ mediaTemplateSavedImages: {
8
+ getList: function getList(params, infos) {
9
+ if (typeof params.API_HOST !== 'undefined') {
10
+ const { API_HOST } = params;
11
+ const { userId, accountId, token } = infos;
12
+ const cancelToken = params.cancelToken ? params.cancelToken : new CancelToken(() => { });
13
+ const { signal } = params;
14
+ delete params.API_HOST;
15
+ delete params.cancelToken;
16
+ delete params.signal;
17
+ const snapParams = Object.assign(Object.assign({}, params), { _token: token, _user_id: userId, _account_id: accountId });
18
+ return instance.get(API_HOST, {
19
+ params: snapParams,
20
+ cancelToken,
21
+ signal,
22
+ });
23
+ }
24
+ return false;
25
+ },
26
+ create: function create(params, infos) {
27
+ if (params.API_HOST !== 'undefined') {
28
+ const { API_HOST } = params;
29
+ const { userId, accountId, token } = infos;
30
+ const cancelToken = params.cancelToken ? params.cancelToken : new CancelToken(() => { });
31
+ delete params.API_HOST;
32
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
33
+ params.cancelToken && delete params.cancelToken;
34
+ const paramsInfo = {
35
+ _token: token,
36
+ _user_id: userId,
37
+ _account_id: accountId,
38
+ };
39
+ return instance.post(API_HOST, params, { cancelToken, params: paramsInfo });
40
+ }
41
+ return Promise.resolve(false);
42
+ },
43
+ upload: function upload(params, infos) {
44
+ if (typeof params.API_HOST !== 'undefined') {
45
+ const { API_HOST } = params;
46
+ const { userId, accountId, token } = infos;
47
+ delete params.API_HOST;
48
+ const paramsInfo = {
49
+ _token: token,
50
+ _user_id: userId,
51
+ _account_id: accountId,
52
+ };
53
+ const url = `${API_HOST}?${qs.stringify(params.params)}`;
54
+ return instance.post(url, params.formData, {
55
+ params: paramsInfo,
56
+ headers: {
57
+ 'Content-Type': 'multipart/form-data',
58
+ },
59
+ });
60
+ }
61
+ return false;
62
+ },
63
+ },
64
+ };
package/es/test.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import '@antscorp/icons/main.css';
2
- export declare const BACKGROUND_COLOR_STYLE: {
3
- SOLID: {
4
- value: string;
5
- label: string;
6
- };
7
- GRADIENT: {
8
- value: string;
9
- label: string;
10
- };
11
- };
12
- export declare const customColors: string[];
13
- export declare const App: () => JSX.Element;
1
+ import React from 'react';
2
+ import '@antscorp/icons/main.css';
3
+ export declare const BACKGROUND_COLOR_STYLE: {
4
+ SOLID: {
5
+ value: string;
6
+ label: string;
7
+ };
8
+ GRADIENT: {
9
+ value: string;
10
+ label: string;
11
+ };
12
+ };
13
+ export declare const customColors: string[];
14
+ export declare const App: () => React.JSX.Element;
package/es/test.js CHANGED
@@ -1,155 +1,162 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import React, { useState } from 'react';
3
- import { createRoot } from 'react-dom/client';
4
- import '@antscorp/icons/main.css';
5
- import { ConfigProvider, EdgeSetting, GradientSetting, IconSelection, PositionSetting, SettingWrapper,
6
- // Slider,
7
- SliderWithInputNumber, Space, UploadImage, } from './components';
8
- // import { Slider } from 'antd';
9
- import { Slider } from '@antscorp/antsomi-ui/es/components/atoms/Slider';
10
- import { Rate } from './components/atoms/Rate';
11
- export const BACKGROUND_COLOR_STYLE = {
12
- SOLID: {
13
- value: 'color',
14
- label: 'Solid',
15
- },
16
- GRADIENT: {
17
- value: 'gradient',
18
- label: 'Gradient',
19
- },
20
- };
21
- export const customColors = [
22
- '#f7da64',
23
- '#8912dd',
24
- '#ed1515',
25
- '#230439',
26
- '#d11a66',
27
- '#ffbd64',
28
- '#f1ab96',
29
- '#824ccd',
30
- '#5858e9',
31
- '#57b8c2',
32
- ];
33
- export const App = () => {
34
- const [state, setState] = useState({
35
- option: {
36
- dateType: 'today',
37
- calculationDate: 'years',
38
- calculationType: 'minus',
39
- value: 1,
40
- },
41
- date: '',
42
- format: 'YYYYMMDD',
43
- });
44
- const [colorSettingState, setColorSettingState] = useState({
45
- color: 'green',
46
- customColors,
47
- });
48
- const [radioValue, setRadioValue] = useState('color');
49
- const [sliderValue, setSliderValue] = useState(10);
50
- const [edge, setEdge] = useState(['auto', 'auto', 700, 700]);
51
- const [icon, setIcon] = useState('');
52
- const callbackColorSetting = (key, dataIn) => {
53
- switch (key) {
54
- case 'ON_ADD_NEW_PRESET':
55
- // eslint-disable-next-line no-case-declarations
56
- const { customColors = [] } = dataIn;
57
- setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { customColors })));
58
- break;
59
- case 'ON_EDIT_CLICKED': {
60
- // eslint-disable-next-line no-console
61
- console.log('insideee.dev - clicked edit preset :>');
62
- break;
63
- }
64
- default:
65
- break;
66
- }
67
- };
68
- const handleChangeColorSetting = (colorOut) => {
69
- setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { color: colorOut })));
70
- };
71
- const handleChangeRadio = e => {
72
- const { value = '' } = e.target;
73
- setRadioValue(value);
74
- };
75
- const handleChangeSlider = value => {
76
- setSliderValue(value);
77
- };
78
- const handleSetIcon = value => {
79
- setIcon(value);
80
- };
81
- // ---------------------------- Test Helps Start ------------------------------
82
- // return (
83
- // <div style={{ display: 'flex', justifyContent: 'center', width: '100vw', height: '100vh' }}>
84
- // <Help />
85
- // </div>
86
- // );
87
- // ---------------------------- Test Helps End ------------------------------
88
- // ------------------------ Media template components test start -------------------------
89
- return (React.createElement(ConfigProvider, null,
90
- React.createElement("div", { style: {
91
- width: 500,
92
- height: 1000,
93
- border: '1px solid black',
94
- margin: '0 auto',
95
- padding: 12,
96
- borderRadius: '10px',
97
- marginTop: 12,
98
- } },
99
- React.createElement("h2", { style: { textAlign: 'center' } }, "Test component of media template"),
100
- React.createElement(Space, { size: 20, direction: "vertical" },
101
- React.createElement(SettingWrapper, { vertical: true, label: "Color Setting" },
102
- React.createElement(GradientSetting, null)),
103
- React.createElement(SliderWithInputNumber, { label: "Size (px)", labelStyling: { marginTop: 10 }, min: 0, max: 100, value: sliderValue, onAfterChange: handleChangeSlider }),
104
- React.createElement(EdgeSetting, { label: "Notification Spacing", unit: "px", linked: false, values: edge,
105
- // edgeLabels={[t(translations.column.title), t(translations.row.title)]}
106
- onChange: ({ values, linked, unit }) => {
107
- setEdge(values);
108
- // onUpdateSettings({
109
- // gapX: values[0] + unit,
110
- // gapY: values[1] + unit,
111
- // gapSuffix: unit,
112
- // linkedGapInput: linked,
113
- // });
114
- } }),
115
- React.createElement(PositionSetting, { settings: { linkedPositionInput: false, positionSuffix: 'px' }, styles: { top: '10px', right: '20px', bottom: '30', left: '40' }, onChange: () => { } })),
116
- React.createElement(Space, { size: 10, direction: "vertical" },
117
- React.createElement(SettingWrapper, { vertical: true, label: "Background Image", containerStyle: { gap: '20px' } },
118
- React.createElement(UploadImage, { domainMedia: "https://sandbox-media-template.antsomi.com", slug: "cdp/api/v1", labelButtonSelect: "Select Toggle from Computor", labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search toggle", paramConfigs: {
119
- token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
120
- userId: '1600084695',
121
- accountId: '1600084695',
122
- },
123
- // title="Background Image"
124
- selectedImage: {
125
- url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
126
- }, onChangeImage: image => { }, onRemoveImage: () => {
127
- // onChangeSettings('backgroundImageObj', {
128
- // name: '',
129
- // previewUrl: '',
130
- // });
131
- } })),
132
- React.createElement(SettingWrapper, { vertical: true, label: "Icon" },
133
- React.createElement(IconSelection, { isOpen: false, labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search for toggle...", icon: icon, onChange: handleSetIcon, iconTypes: ['cus', 'font-awesome'], onChangeSvg: value => {
134
- console.log('onChangeSvg', value);
135
- } }))))));
136
- // ------------------------ Media template components test end -------------------------
137
- return (React.createElement("div", { style: { width: '500px', margin: '32px' } },
138
- React.createElement(GradientSetting, { onChange: e => console.log('gradient change') }),
139
- React.createElement("br", null),
140
- React.createElement("br", null),
141
- React.createElement("br", null),
142
- React.createElement("br", null),
143
- React.createElement(Slider, { className: "test-classname", min: -10, max: 10, onChange: e => console.log('slider change', e) }),
144
- React.createElement("br", null),
145
- React.createElement("br", null),
146
- React.createElement(Rate, null),
147
- React.createElement("br", null),
148
- React.createElement("br", null),
149
- React.createElement(Slider, { className: "test-classname" })));
150
- };
151
- const container = document.getElementById('root');
152
- const root = createRoot(container);
153
- root.render(React.createElement(React.StrictMode, null,
154
- React.createElement(ConfigProvider, { locale: "en" },
155
- React.createElement(App, null))));
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import React, { useState } from 'react';
3
+ import { createRoot } from 'react-dom/client';
4
+ import '@antscorp/icons/main.css';
5
+ import { ConfigProvider, EdgeSetting, GradientSetting, IconSelection, PositionSetting, SettingWrapper,
6
+ // Slider,
7
+ SliderWithInputNumber, Space, UploadImage, RateV2, } from './components';
8
+ // import { Slider } from 'antd';
9
+ import { Slider } from '@antscorp/antsomi-ui/es/components/atoms/Slider';
10
+ import { Rate } from './components/atoms/Rate';
11
+ export const BACKGROUND_COLOR_STYLE = {
12
+ SOLID: {
13
+ value: 'color',
14
+ label: 'Solid',
15
+ },
16
+ GRADIENT: {
17
+ value: 'gradient',
18
+ label: 'Gradient',
19
+ },
20
+ };
21
+ export const customColors = [
22
+ '#f7da64',
23
+ '#8912dd',
24
+ '#ed1515',
25
+ '#230439',
26
+ '#d11a66',
27
+ '#ffbd64',
28
+ '#f1ab96',
29
+ '#824ccd',
30
+ '#5858e9',
31
+ '#57b8c2',
32
+ ];
33
+ export const App = () => {
34
+ const [state, setState] = useState({
35
+ option: {
36
+ dateType: 'today',
37
+ calculationDate: 'years',
38
+ calculationType: 'minus',
39
+ value: 1,
40
+ },
41
+ date: '',
42
+ format: 'YYYYMMDD',
43
+ });
44
+ const [colorSettingState, setColorSettingState] = useState({
45
+ color: 'green',
46
+ customColors,
47
+ });
48
+ const [radioValue, setRadioValue] = useState('color');
49
+ const [sliderValue, setSliderValue] = useState(10);
50
+ const [edge, setEdge] = useState(['auto', 'auto', 700, 700]);
51
+ const [icon, setIcon] = useState('');
52
+ const callbackColorSetting = (key, dataIn) => {
53
+ switch (key) {
54
+ case 'ON_ADD_NEW_PRESET':
55
+ // eslint-disable-next-line no-case-declarations
56
+ const { customColors = [] } = dataIn;
57
+ setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { customColors })));
58
+ break;
59
+ case 'ON_EDIT_CLICKED': {
60
+ // eslint-disable-next-line no-console
61
+ console.log('insideee.dev - clicked edit preset :>');
62
+ break;
63
+ }
64
+ default:
65
+ break;
66
+ }
67
+ };
68
+ const handleChangeColorSetting = (colorOut) => {
69
+ setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { color: colorOut })));
70
+ };
71
+ const handleChangeRadio = e => {
72
+ const { value = '' } = e.target;
73
+ setRadioValue(value);
74
+ };
75
+ const handleChangeSlider = value => {
76
+ setSliderValue(value);
77
+ };
78
+ const handleSetIcon = value => {
79
+ setIcon(value);
80
+ };
81
+ // ---------------------------- Test Helps Start ------------------------------
82
+ // return (
83
+ // <div style={{ display: 'flex', justifyContent: 'center', width: '100vw', height: '100vh' }}>
84
+ // <Help />
85
+ // </div>
86
+ // );
87
+ // ---------------------------- Test Helps End ------------------------------
88
+ // ------------------------ Media template components test start -------------------------
89
+ const [starValue, setStarValue] = useState(1.3);
90
+ return (React.createElement(ConfigProvider, null,
91
+ React.createElement("div", { style: {
92
+ width: 500,
93
+ height: 1000,
94
+ border: '1px solid black',
95
+ margin: '0 auto',
96
+ padding: 12,
97
+ borderRadius: '10px',
98
+ marginTop: 12,
99
+ } },
100
+ React.createElement("br", null),
101
+ React.createElement("br", null),
102
+ React.createElement(RateV2, { value: starValue, onChange: value => setStarValue(value) }),
103
+ React.createElement("br", null),
104
+ React.createElement("br", null),
105
+ React.createElement("br", null),
106
+ React.createElement("h2", { style: { textAlign: 'center' } }, "Test component of media template"),
107
+ React.createElement(Space, { size: 20, direction: "vertical" },
108
+ React.createElement(SettingWrapper, { vertical: true, label: "Color Setting" },
109
+ React.createElement(GradientSetting, null)),
110
+ React.createElement(SliderWithInputNumber, { label: "Size (px)", labelStyling: { marginTop: 10 }, min: 0, max: 100, value: sliderValue, onAfterChange: handleChangeSlider }),
111
+ React.createElement(EdgeSetting, { label: "Notification Spacing", unit: "px", linked: false, values: edge,
112
+ // edgeLabels={[t(translations.column.title), t(translations.row.title)]}
113
+ onChange: ({ values, linked, unit }) => {
114
+ setEdge(values);
115
+ // onUpdateSettings({
116
+ // gapX: values[0] + unit,
117
+ // gapY: values[1] + unit,
118
+ // gapSuffix: unit,
119
+ // linkedGapInput: linked,
120
+ // });
121
+ } }),
122
+ React.createElement(PositionSetting, { settings: { linkedPositionInput: false, positionSuffix: 'px' }, styles: { top: '10px', right: '20px', bottom: '30', left: '40' }, onChange: () => { } })),
123
+ React.createElement(Space, { size: 10, direction: "vertical" },
124
+ React.createElement(SettingWrapper, { vertical: true, label: "Background Image", containerStyle: { gap: '20px' } },
125
+ React.createElement(UploadImage, { domainMedia: "https://sandbox-media-template.antsomi.com", slug: "cdp/api/v1", labelButtonSelect: "Select Toggle from Computor", labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search toggle", paramConfigs: {
126
+ token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
127
+ userId: '1600084695',
128
+ accountId: '1600084695',
129
+ },
130
+ // title="Background Image"
131
+ selectedImage: {
132
+ url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
133
+ }, onChangeImage: image => { }, onRemoveImage: () => {
134
+ // onChangeSettings('backgroundImageObj', {
135
+ // name: '',
136
+ // previewUrl: '',
137
+ // });
138
+ } })),
139
+ React.createElement(SettingWrapper, { vertical: true, label: "Icon" },
140
+ React.createElement(IconSelection, { isOpen: false, labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search for toggle...", icon: icon, onChange: handleSetIcon, iconTypes: ['cus', 'font-awesome'], onChangeSvg: value => {
141
+ console.log('onChangeSvg', value);
142
+ } }))))));
143
+ // ------------------------ Media template components test end -------------------------
144
+ return (React.createElement("div", { style: { width: '500px', margin: '32px' } },
145
+ React.createElement(GradientSetting, { onChange: e => console.log('gradient change') }),
146
+ React.createElement("br", null),
147
+ React.createElement("br", null),
148
+ React.createElement("br", null),
149
+ React.createElement("br", null),
150
+ React.createElement(Slider, { className: "test-classname", min: -10, max: 10, onChange: e => console.log('slider change', e) }),
151
+ React.createElement("br", null),
152
+ React.createElement("br", null),
153
+ React.createElement(Rate, null),
154
+ React.createElement("br", null),
155
+ React.createElement("br", null),
156
+ React.createElement(Slider, { className: "test-classname" })));
157
+ };
158
+ const container = document.getElementById('root');
159
+ const root = createRoot(container);
160
+ root.render(React.createElement(React.StrictMode, null,
161
+ React.createElement(ConfigProvider, { locale: "en" },
162
+ React.createElement(App, null))));
@@ -1,6 +1,6 @@
1
- export type THandleErrorPayload = {
2
- path: string;
3
- name: string;
4
- args: Record<string, any>;
5
- };
6
- export type TLocale = 'en' | 'vi';
1
+ export type THandleErrorPayload = {
2
+ path: string;
3
+ name: string;
4
+ args: Record<string, any>;
5
+ };
6
+ export type TLocale = 'en' | 'vi';
package/es/types/index.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,10 +1,10 @@
1
- export declare const isDarkColor: (hexcolor: any, alpha?: number) => boolean;
2
- export declare const hexWithAlpha: (color: ColorResult) => string;
3
- /**
4
- * Converts a hexadecimal color code to its corresponding RGB values.
5
- * @param {string} hexCode - The hexadecimal color code to convert.
6
- * @returns {Array} An array containing the RGB values.
7
- * @throws {Error} If the input is an invalid hexadecimal color code.
8
- */
9
- export declare const hexToRgb: (hexCode: string) => [number, number, number];
10
- export declare const generateHeatMapColor: (value: number, maxValue: number, rgbColor: [number, number, number]) => string;
1
+ export declare const isDarkColor: (hexcolor: any, alpha?: number) => boolean;
2
+ export declare const hexWithAlpha: (color: ColorResult) => string;
3
+ /**
4
+ * Converts a hexadecimal color code to its corresponding RGB values.
5
+ * @param {string} hexCode - The hexadecimal color code to convert.
6
+ * @returns {Array} An array containing the RGB values.
7
+ * @throws {Error} If the input is an invalid hexadecimal color code.
8
+ */
9
+ export declare const hexToRgb: (hexCode: string) => [number, number, number];
10
+ export declare const generateHeatMapColor: (value: number, maxValue: number, rgbColor: [number, number, number]) => string;
package/es/utils/color.js CHANGED
@@ -1,61 +1,61 @@
1
- export const isDarkColor = (hexcolor, alpha) => {
2
- if (alpha) {
3
- if (alpha < 0.5) {
4
- return false;
5
- }
6
- return true;
7
- }
8
- const r = parseInt(hexcolor.substr(1, 2), 16);
9
- const g = parseInt(hexcolor.substr(3, 2), 16);
10
- const b = parseInt(hexcolor.substr(4, 2), 16);
11
- const yiq = (r * 299 + g * 587 + b * 114) / 1000;
12
- return yiq < 155;
13
- };
14
- export const hexWithAlpha = (color) => {
15
- if (color.hex === 'transparent') {
16
- return 'transparent';
17
- }
18
- let alpha = Math.round((color.rgb.a || 0) * 255).toString(16);
19
- if (alpha.length < 2)
20
- alpha = `0${alpha}`;
21
- const hexWithAlpha = color.hex + (alpha === 'ff' ? '' : alpha);
22
- return hexWithAlpha;
23
- };
24
- /**
25
- * Converts a hexadecimal color code to its corresponding RGB values.
26
- * @param {string} hexCode - The hexadecimal color code to convert.
27
- * @returns {Array} An array containing the RGB values.
28
- * @throws {Error} If the input is an invalid hexadecimal color code.
29
- */
30
- export const hexToRgb = (hexCode) => {
31
- let hex = hexCode.replace('#', '');
32
- const hexLen = hex.length;
33
- if (hexLen !== 3 && hexLen !== 6) {
34
- throw new Error('Invalid hexadecimal color code');
35
- }
36
- if (hexLen === 3) {
37
- hex = hex
38
- .split('')
39
- .map(char => char + char)
40
- .join('');
41
- }
42
- try {
43
- const r = parseInt(hex.substring(0, 2), 16);
44
- const g = parseInt(hex.substring(2, 4), 16);
45
- const b = parseInt(hex.substring(4, 6), 16);
46
- return [r, g, b];
47
- }
48
- catch (error) {
49
- throw new Error('Invalid hexadecimal color code');
50
- }
51
- };
52
- export const generateHeatMapColor = (value, maxValue, rgbColor) => {
53
- // Normalize the value between 0.05 and 1
54
- const normalizedValue = value / maxValue + 0.05;
55
- // Set the base color components
56
- const baseRed = rgbColor[0];
57
- const baseGreen = rgbColor[1];
58
- const baseBlue = rgbColor[2];
59
- // Return the RGBA color as a string
60
- return `rgba(${baseRed},${baseGreen},${baseBlue},${normalizedValue})`;
61
- };
1
+ export const isDarkColor = (hexcolor, alpha) => {
2
+ if (alpha) {
3
+ if (alpha < 0.5) {
4
+ return false;
5
+ }
6
+ return true;
7
+ }
8
+ const r = parseInt(hexcolor.substr(1, 2), 16);
9
+ const g = parseInt(hexcolor.substr(3, 2), 16);
10
+ const b = parseInt(hexcolor.substr(4, 2), 16);
11
+ const yiq = (r * 299 + g * 587 + b * 114) / 1000;
12
+ return yiq < 155;
13
+ };
14
+ export const hexWithAlpha = (color) => {
15
+ if (color.hex === 'transparent') {
16
+ return 'transparent';
17
+ }
18
+ let alpha = Math.round((color.rgb.a || 0) * 255).toString(16);
19
+ if (alpha.length < 2)
20
+ alpha = `0${alpha}`;
21
+ const hexWithAlpha = color.hex + (alpha === 'ff' ? '' : alpha);
22
+ return hexWithAlpha;
23
+ };
24
+ /**
25
+ * Converts a hexadecimal color code to its corresponding RGB values.
26
+ * @param {string} hexCode - The hexadecimal color code to convert.
27
+ * @returns {Array} An array containing the RGB values.
28
+ * @throws {Error} If the input is an invalid hexadecimal color code.
29
+ */
30
+ export const hexToRgb = (hexCode) => {
31
+ let hex = hexCode.replace('#', '');
32
+ const hexLen = hex.length;
33
+ if (hexLen !== 3 && hexLen !== 6) {
34
+ throw new Error('Invalid hexadecimal color code');
35
+ }
36
+ if (hexLen === 3) {
37
+ hex = hex
38
+ .split('')
39
+ .map(char => char + char)
40
+ .join('');
41
+ }
42
+ try {
43
+ const r = parseInt(hex.substring(0, 2), 16);
44
+ const g = parseInt(hex.substring(2, 4), 16);
45
+ const b = parseInt(hex.substring(4, 6), 16);
46
+ return [r, g, b];
47
+ }
48
+ catch (error) {
49
+ throw new Error('Invalid hexadecimal color code');
50
+ }
51
+ };
52
+ export const generateHeatMapColor = (value, maxValue, rgbColor) => {
53
+ // Normalize the value between 0.05 and 1
54
+ const normalizedValue = value / maxValue + 0.05;
55
+ // Set the base color components
56
+ const baseRed = rgbColor[0];
57
+ const baseGreen = rgbColor[1];
58
+ const baseBlue = rgbColor[2];
59
+ // Return the RGBA color as a string
60
+ return `rgba(${baseRed},${baseGreen},${baseBlue},${normalizedValue})`;
61
+ };