@antscorp/antsomi-ui 1.3.3-beta.49 → 1.3.3-beta.50

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 (802) hide show
  1. package/README.md +78 -78
  2. package/es/assets/css/main.scss +4 -4
  3. package/es/assets/images/feedback.svg +3 -3
  4. package/es/components/atoms/Alert/Alert.d.ts +4 -4
  5. package/es/components/atoms/Alert/Alert.js +19 -19
  6. package/es/components/atoms/Alert/index.d.ts +1 -1
  7. package/es/components/atoms/Alert/index.js +1 -1
  8. package/es/components/atoms/Button/Button.d.ts +1 -1
  9. package/es/components/atoms/Button/Button.js +1 -1
  10. package/es/components/atoms/Button/index.d.ts +4 -4
  11. package/es/components/atoms/Button/index.js +2 -2
  12. package/es/components/atoms/Button/test.d.ts +3 -3
  13. package/es/components/atoms/Button/test.js +99 -99
  14. package/es/components/atoms/Checkbox/Checkbox.d.ts +1 -1
  15. package/es/components/atoms/Checkbox/Checkbox.js +1 -1
  16. package/es/components/atoms/Checkbox/index.d.ts +1 -1
  17. package/es/components/atoms/Checkbox/index.js +1 -1
  18. package/es/components/atoms/Divider/Divider.d.ts +1 -1
  19. package/es/components/atoms/Divider/Divider.js +1 -1
  20. package/es/components/atoms/Divider/index.d.ts +1 -1
  21. package/es/components/atoms/Divider/index.js +1 -1
  22. package/es/components/atoms/DividerPure/DividerPure.d.ts +10 -10
  23. package/es/components/atoms/DividerPure/DividerPure.js +27 -27
  24. package/es/components/atoms/DividerPure/index.d.ts +1 -1
  25. package/es/components/atoms/DividerPure/index.js +1 -1
  26. package/es/components/atoms/DividerPure/styled.d.ts +1 -1
  27. package/es/components/atoms/DividerPure/styled.js +41 -41
  28. package/es/components/atoms/Empty/Empty.d.ts +5 -5
  29. package/es/components/atoms/Empty/Empty.js +2 -2
  30. package/es/components/atoms/Empty/index.d.ts +1 -1
  31. package/es/components/atoms/Empty/index.js +1 -1
  32. package/es/components/atoms/Flex/Flex.d.ts +2 -2
  33. package/es/components/atoms/Flex/Flex.js +1 -1
  34. package/es/components/atoms/Flex/index.d.ts +1 -1
  35. package/es/components/atoms/Flex/index.js +1 -1
  36. package/es/components/atoms/FloatButton/FloatButton.d.ts +1 -1
  37. package/es/components/atoms/FloatButton/FloatButton.js +1 -1
  38. package/es/components/atoms/FloatButton/index.d.ts +1 -1
  39. package/es/components/atoms/FloatButton/index.js +2 -2
  40. package/es/components/atoms/Grid/Grid.d.ts +3 -3
  41. package/es/components/atoms/Grid/Grid.js +3 -3
  42. package/es/components/atoms/Grid/index.d.ts +1 -1
  43. package/es/components/atoms/Grid/index.js +1 -1
  44. package/es/components/atoms/Icon/index.d.ts +10 -10
  45. package/es/components/atoms/Icon/index.js +36 -36
  46. package/es/components/atoms/Input/Input.d.ts +31 -31
  47. package/es/components/atoms/Input/Input.js +96 -96
  48. package/es/components/atoms/Input/index.d.ts +2 -2
  49. package/es/components/atoms/Input/index.js +1 -1
  50. package/es/components/atoms/Input/styled.d.ts +11 -11
  51. package/es/components/atoms/Input/styled.js +109 -109
  52. package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -2
  53. package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -89
  54. package/es/components/atoms/InputDynamic/InputDynamic.d.ts +30 -30
  55. package/es/components/atoms/InputDynamic/InputDynamic.js +320 -320
  56. package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -16
  57. package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -85
  58. package/es/components/atoms/InputDynamic/index.d.ts +2 -2
  59. package/es/components/atoms/InputDynamic/index.js +1 -1
  60. package/es/components/atoms/InputDynamic/styled.d.ts +12 -12
  61. package/es/components/atoms/InputDynamic/styled.js +281 -281
  62. package/es/components/atoms/InputDynamic/utils.d.ts +22 -22
  63. package/es/components/atoms/InputDynamic/utils.js +751 -751
  64. package/es/components/atoms/InputNumber/InputNumber.d.ts +6 -6
  65. package/es/components/atoms/InputNumber/InputNumber.js +27 -27
  66. package/es/components/atoms/InputNumber/index.d.ts +1 -1
  67. package/es/components/atoms/InputNumber/index.js +1 -1
  68. package/es/components/atoms/Message/Message.d.ts +1 -1
  69. package/es/components/atoms/Message/Message.js +1 -1
  70. package/es/components/atoms/Message/index.d.ts +1 -1
  71. package/es/components/atoms/Message/index.js +1 -1
  72. package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -4
  73. package/es/components/atoms/MobileFrame/MobileFrame.js +22 -22
  74. package/es/components/atoms/MobileFrame/constants.d.ts +4 -4
  75. package/es/components/atoms/MobileFrame/constants.js +4 -4
  76. package/es/components/atoms/MobileFrame/index.d.ts +2 -2
  77. package/es/components/atoms/MobileFrame/index.js +1 -1
  78. package/es/components/atoms/MobileFrame/styled.d.ts +3 -3
  79. package/es/components/atoms/MobileFrame/styled.js +33 -33
  80. package/es/components/atoms/Notification/Notification.d.ts +1 -1
  81. package/es/components/atoms/Notification/Notification.js +1 -1
  82. package/es/components/atoms/Notification/index.d.ts +1 -1
  83. package/es/components/atoms/Notification/index.js +1 -1
  84. package/es/components/atoms/Pagination/Pagination.d.ts +2 -2
  85. package/es/components/atoms/Pagination/Pagination.js +2 -2
  86. package/es/components/atoms/Pagination/index.d.ts +2 -2
  87. package/es/components/atoms/Pagination/index.js +1 -1
  88. package/es/components/atoms/Popover/Popover.d.ts +4 -4
  89. package/es/components/atoms/Popover/Popover.js +2 -2
  90. package/es/components/atoms/Popover/index.d.ts +1 -1
  91. package/es/components/atoms/Popover/index.js +1 -1
  92. package/es/components/atoms/Popover/styled.d.ts +4 -4
  93. package/es/components/atoms/Popover/styled.js +5 -5
  94. package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -7
  95. package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -67
  96. package/es/components/atoms/PreviewTabs/index.d.ts +2 -2
  97. package/es/components/atoms/PreviewTabs/index.js +1 -1
  98. package/es/components/atoms/PreviewTabs/styled.d.ts +6 -6
  99. package/es/components/atoms/PreviewTabs/styled.js +79 -79
  100. package/es/components/atoms/Progress/Progress.d.ts +2 -2
  101. package/es/components/atoms/Progress/Progress.js +2 -2
  102. package/es/components/atoms/Progress/index.d.ts +1 -1
  103. package/es/components/atoms/Progress/index.js +1 -1
  104. package/es/components/atoms/Radio/Radio.d.ts +1 -1
  105. package/es/components/atoms/Radio/Radio.js +1 -1
  106. package/es/components/atoms/Radio/index.d.ts +7 -7
  107. package/es/components/atoms/Radio/index.js +25 -25
  108. package/es/components/atoms/Rate/Rate.d.ts +2 -2
  109. package/es/components/atoms/Rate/Rate.js +2 -2
  110. package/es/components/atoms/Rate/index.d.ts +1 -1
  111. package/es/components/atoms/Rate/index.js +1 -1
  112. package/es/components/atoms/RateV2/RateV2.d.ts +18 -18
  113. package/es/components/atoms/RateV2/RateV2.js +73 -73
  114. package/es/components/atoms/RateV2/index.d.ts +1 -1
  115. package/es/components/atoms/RateV2/index.js +1 -1
  116. package/es/components/atoms/RequiredLabel/index.d.ts +8 -8
  117. package/es/components/atoms/RequiredLabel/index.js +25 -25
  118. package/es/components/atoms/RequiredLabel/styled.d.ts +2 -2
  119. package/es/components/atoms/RequiredLabel/styled.js +10 -10
  120. package/es/components/atoms/ScrollBox/index.d.ts +9 -9
  121. package/es/components/atoms/ScrollBox/index.js +51 -51
  122. package/es/components/atoms/Segmented/Segmented.d.ts +2 -2
  123. package/es/components/atoms/Segmented/Segmented.js +2 -2
  124. package/es/components/atoms/Segmented/index.d.ts +1 -1
  125. package/es/components/atoms/Segmented/index.js +1 -1
  126. package/es/components/atoms/Skeleton/Skeleton.d.ts +8 -8
  127. package/es/components/atoms/Skeleton/Skeleton.js +2 -2
  128. package/es/components/atoms/Skeleton/index.d.ts +1 -1
  129. package/es/components/atoms/Skeleton/index.js +1 -1
  130. package/es/components/atoms/Slider/index.d.ts +6 -6
  131. package/es/components/atoms/Slider/index.js +25 -25
  132. package/es/components/atoms/Slider/styled.d.ts +7 -7
  133. package/es/components/atoms/Slider/styled.js +44 -44
  134. package/es/components/atoms/SliderV2/index.d.ts +6 -6
  135. package/es/components/atoms/SliderV2/index.js +21 -21
  136. package/es/components/atoms/Space/Space.d.ts +6 -6
  137. package/es/components/atoms/Space/Space.js +9 -9
  138. package/es/components/atoms/Space/index.d.ts +1 -1
  139. package/es/components/atoms/Space/index.js +1 -1
  140. package/es/components/atoms/Spin/Spin.d.ts +10 -10
  141. package/es/components/atoms/Spin/Spin.js +28 -28
  142. package/es/components/atoms/Spin/index.d.ts +1 -1
  143. package/es/components/atoms/Spin/index.js +1 -1
  144. package/es/components/atoms/Spin/styled.d.ts +1 -1
  145. package/es/components/atoms/Spin/styled.js +7 -7
  146. package/es/components/atoms/Statistic/Statistic.d.ts +1 -1
  147. package/es/components/atoms/Statistic/Statistic.js +2 -2
  148. package/es/components/atoms/Statistic/index.d.ts +1 -1
  149. package/es/components/atoms/Statistic/index.js +1 -1
  150. package/es/components/atoms/Steps/Steps.d.ts +4 -4
  151. package/es/components/atoms/Steps/Steps.js +2 -2
  152. package/es/components/atoms/Steps/index.d.ts +1 -1
  153. package/es/components/atoms/Steps/index.js +1 -1
  154. package/es/components/atoms/Switch/Switch.d.ts +2 -2
  155. package/es/components/atoms/Switch/Switch.js +2 -2
  156. package/es/components/atoms/Switch/index.d.ts +1 -1
  157. package/es/components/atoms/Switch/index.js +1 -1
  158. package/es/components/atoms/Tag/Tag.d.ts +1 -1
  159. package/es/components/atoms/Tag/Tag.js +1 -1
  160. package/es/components/atoms/Tag/index.d.ts +1 -1
  161. package/es/components/atoms/Tag/index.js +1 -1
  162. package/es/components/atoms/Text/index.d.ts +10 -10
  163. package/es/components/atoms/Text/index.js +27 -27
  164. package/es/components/atoms/Text/styled.d.ts +7 -7
  165. package/es/components/atoms/Text/styled.js +52 -52
  166. package/es/components/atoms/Timeline/Timeline.d.ts +4 -4
  167. package/es/components/atoms/Timeline/Timeline.js +2 -2
  168. package/es/components/atoms/Timeline/index.d.ts +1 -1
  169. package/es/components/atoms/Timeline/index.js +1 -1
  170. package/es/components/atoms/Tooltip/Tooltip.d.ts +1 -1
  171. package/es/components/atoms/Tooltip/Tooltip.js +1 -1
  172. package/es/components/atoms/Tooltip/index.d.ts +1 -1
  173. package/es/components/atoms/Tooltip/index.js +1 -1
  174. package/es/components/atoms/Typography/Text.d.ts +1 -1
  175. package/es/components/atoms/Typography/Text.js +1 -1
  176. package/es/components/atoms/Typography/index.d.ts +1 -1
  177. package/es/components/atoms/Typography/index.js +1 -1
  178. package/es/components/atoms/Watermark/Watermark.d.ts +2 -2
  179. package/es/components/atoms/Watermark/Watermark.js +2 -2
  180. package/es/components/atoms/Watermark/index.d.ts +1 -1
  181. package/es/components/atoms/Watermark/index.js +1 -1
  182. package/es/components/atoms/index.d.ts +41 -41
  183. package/es/components/atoms/index.js +38 -38
  184. package/es/components/common/ConfigProvider/ConfigProvider.d.ts +10 -10
  185. package/es/components/common/ConfigProvider/ConfigProvider.js +42 -42
  186. package/es/components/common/ConfigProvider/GlobalStyle.d.ts +5 -5
  187. package/es/components/common/ConfigProvider/GlobalStyle.js +734 -727
  188. package/es/components/common/ConfigProvider/index.d.ts +1 -1
  189. package/es/components/common/ConfigProvider/index.js +1 -1
  190. package/es/components/common/index.d.ts +1 -1
  191. package/es/components/common/index.js +1 -1
  192. package/es/components/icons/AccountCircle.d.ts +3 -3
  193. package/es/components/icons/AccountCircle.js +3 -3
  194. package/es/components/icons/AddShoppingCart.d.ts +3 -3
  195. package/es/components/icons/AddShoppingCart.js +3 -3
  196. package/es/components/icons/ArrowGrowIcon.d.ts +2 -2
  197. package/es/components/icons/ArrowGrowIcon.js +4 -4
  198. package/es/components/icons/AssignmentInd.d.ts +3 -3
  199. package/es/components/icons/AssignmentInd.js +3 -3
  200. package/es/components/icons/AudioRecordIcon.d.ts +2 -2
  201. package/es/components/icons/AudioRecordIcon.js +4 -4
  202. package/es/components/icons/BugIcon.d.ts +2 -2
  203. package/es/components/icons/BugIcon.js +4 -4
  204. package/es/components/icons/Call.d.ts +3 -3
  205. package/es/components/icons/Call.js +3 -3
  206. package/es/components/icons/CameraIcon.d.ts +2 -2
  207. package/es/components/icons/CameraIcon.js +4 -4
  208. package/es/components/icons/CaptureIcon.d.ts +2 -2
  209. package/es/components/icons/CaptureIcon.js +4 -4
  210. package/es/components/icons/Category.d.ts +3 -3
  211. package/es/components/icons/Category.js +5 -5
  212. package/es/components/icons/ChatBubbleOutline.d.ts +3 -3
  213. package/es/components/icons/ChatBubbleOutline.js +3 -3
  214. package/es/components/icons/CheckSlimIcon.d.ts +2 -2
  215. package/es/components/icons/CheckSlimIcon.js +4 -4
  216. package/es/components/icons/CircleNotifications.d.ts +3 -3
  217. package/es/components/icons/CircleNotifications.js +3 -3
  218. package/es/components/icons/CloseIcon.d.ts +4 -4
  219. package/es/components/icons/CloseIcon.js +22 -22
  220. package/es/components/icons/CommentIcon.d.ts +2 -2
  221. package/es/components/icons/CommentIcon.js +4 -4
  222. package/es/components/icons/ConfirmationNumber.d.ts +3 -3
  223. package/es/components/icons/ConfirmationNumber.js +3 -3
  224. package/es/components/icons/DesktopWindows.d.ts +3 -3
  225. package/es/components/icons/DesktopWindows.js +3 -3
  226. package/es/components/icons/EventIcon.d.ts +4 -4
  227. package/es/components/icons/EventIcon.js +18 -18
  228. package/es/components/icons/FactCheck.d.ts +3 -3
  229. package/es/components/icons/FactCheck.js +3 -3
  230. package/es/components/icons/FreeDrawIcon.d.ts +2 -2
  231. package/es/components/icons/FreeDrawIcon.js +4 -4
  232. package/es/components/icons/GPTIcon.d.ts +2 -2
  233. package/es/components/icons/GPTIcon.js +18 -18
  234. package/es/components/icons/GPTIconV2.d.ts +2 -2
  235. package/es/components/icons/GPTIconV2.js +18 -18
  236. package/es/components/icons/GPTIconV3.d.ts +2 -2
  237. package/es/components/icons/GPTIconV3.js +5 -5
  238. package/es/components/icons/HighlightIcon.d.ts +2 -2
  239. package/es/components/icons/HighlightIcon.js +4 -4
  240. package/es/components/icons/HightlightAlt.d.ts +3 -3
  241. package/es/components/icons/HightlightAlt.js +3 -3
  242. package/es/components/icons/HowToReg.d.ts +3 -3
  243. package/es/components/icons/HowToReg.js +3 -3
  244. package/es/components/icons/IdeaIcon.d.ts +2 -2
  245. package/es/components/icons/IdeaIcon.js +4 -4
  246. package/es/components/icons/Interactive.d.ts +3 -3
  247. package/es/components/icons/Interactive.js +3 -3
  248. package/es/components/icons/InvisibleIcon.d.ts +2 -2
  249. package/es/components/icons/InvisibleIcon.js +5 -5
  250. package/es/components/icons/List.d.ts +3 -3
  251. package/es/components/icons/List.js +3 -3
  252. package/es/components/icons/LocalMallIcon.d.ts +3 -3
  253. package/es/components/icons/LocalMallIcon.js +3 -3
  254. package/es/components/icons/MobileFriendly.d.ts +3 -3
  255. package/es/components/icons/MobileFriendly.js +3 -3
  256. package/es/components/icons/MuteIcon.d.ts +2 -2
  257. package/es/components/icons/MuteIcon.js +4 -4
  258. package/es/components/icons/NotificationsActive.d.ts +3 -3
  259. package/es/components/icons/NotificationsActive.js +3 -3
  260. package/es/components/icons/OpenUrlIcon.d.ts +2 -2
  261. package/es/components/icons/OpenUrlIcon.js +4 -4
  262. package/es/components/icons/PauseIcon.d.ts +2 -2
  263. package/es/components/icons/PauseIcon.js +4 -4
  264. package/es/components/icons/Payment.d.ts +3 -3
  265. package/es/components/icons/Payment.js +3 -3
  266. package/es/components/icons/PersonAddDisabled.d.ts +3 -3
  267. package/es/components/icons/PersonAddDisabled.js +4 -4
  268. package/es/components/icons/PhoneCallback.d.ts +3 -3
  269. package/es/components/icons/PhoneCallback.js +3 -3
  270. package/es/components/icons/PlaneIcon.d.ts +2 -2
  271. package/es/components/icons/PlaneIcon.js +8 -8
  272. package/es/components/icons/Preview.d.ts +3 -3
  273. package/es/components/icons/Preview.js +3 -3
  274. package/es/components/icons/Redeem.d.ts +3 -3
  275. package/es/components/icons/Redeem.js +3 -3
  276. package/es/components/icons/RemoveRedEye.d.ts +3 -3
  277. package/es/components/icons/RemoveRedEye.js +3 -3
  278. package/es/components/icons/RemoveShoppingCart.d.ts +3 -3
  279. package/es/components/icons/RemoveShoppingCart.js +3 -3
  280. package/es/components/icons/RequestIcon.d.ts +2 -2
  281. package/es/components/icons/RequestIcon.js +4 -4
  282. package/es/components/icons/Search.d.ts +3 -3
  283. package/es/components/icons/Search.js +3 -3
  284. package/es/components/icons/ShoppingBag.d.ts +3 -3
  285. package/es/components/icons/ShoppingBag.js +3 -3
  286. package/es/components/icons/ShoppingCart.d.ts +3 -3
  287. package/es/components/icons/ShoppingCart.js +3 -3
  288. package/es/components/icons/StopRecordIcon.d.ts +2 -2
  289. package/es/components/icons/StopRecordIcon.js +4 -4
  290. package/es/components/icons/Store.d.ts +3 -3
  291. package/es/components/icons/Store.js +3 -3
  292. package/es/components/icons/UserIcon.d.ts +2 -2
  293. package/es/components/icons/UserIcon.js +8 -8
  294. package/es/components/icons/VerticalDotsIcon.d.ts +2 -2
  295. package/es/components/icons/VerticalDotsIcon.js +4 -4
  296. package/es/components/icons/WarningIcon.d.ts +2 -2
  297. package/es/components/icons/WarningIcon.js +4 -4
  298. package/es/components/icons/Web.d.ts +3 -3
  299. package/es/components/icons/Web.js +3 -3
  300. package/es/components/icons/WebAsset.d.ts +3 -3
  301. package/es/components/icons/WebAsset.js +3 -3
  302. package/es/components/icons/index.d.ts +54 -54
  303. package/es/components/icons/index.js +54 -54
  304. package/es/components/icons/type.d.ts +3 -3
  305. package/es/components/icons/type.js +1 -1
  306. package/es/components/index.d.ts +4 -4
  307. package/es/components/index.js +4 -4
  308. package/es/components/molecules/AlignSetting/index.d.ts +19 -19
  309. package/es/components/molecules/AlignSetting/index.js +52 -52
  310. package/es/components/molecules/AlignSetting/styled.d.ts +1 -1
  311. package/es/components/molecules/AlignSetting/styled.js +7 -7
  312. package/es/components/molecules/AlignSetting/utils.d.ts +3 -3
  313. package/es/components/molecules/AlignSetting/utils.js +19 -19
  314. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +16 -16
  315. package/es/components/molecules/CaptureScreen/CaptureScreen.js +834 -834
  316. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +17 -17
  317. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.js +80 -80
  318. package/es/components/molecules/CaptureScreen/components/CommentBox/index.d.ts +1 -1
  319. package/es/components/molecules/CaptureScreen/components/CommentBox/index.js +1 -1
  320. package/es/components/molecules/CaptureScreen/components/CommentBox/styled.d.ts +12 -12
  321. package/es/components/molecules/CaptureScreen/components/CommentBox/styled.js +136 -136
  322. package/es/components/molecules/CaptureScreen/components/CommentBox/types.d.ts +15 -15
  323. package/es/components/molecules/CaptureScreen/components/CommentBox/types.js +1 -1
  324. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +4 -4
  325. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.js +17 -17
  326. package/es/components/molecules/CaptureScreen/components/Cursor/index.d.ts +1 -1
  327. package/es/components/molecules/CaptureScreen/components/Cursor/index.js +1 -1
  328. package/es/components/molecules/CaptureScreen/components/Cursor/styled.d.ts +7 -7
  329. package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +79 -79
  330. package/es/components/molecules/CaptureScreen/components/Cursor/types.d.ts +10 -10
  331. package/es/components/molecules/CaptureScreen/components/Cursor/types.js +1 -1
  332. package/es/components/molecules/CaptureScreen/constants.d.ts +41 -41
  333. package/es/components/molecules/CaptureScreen/constants.js +118 -118
  334. package/es/components/molecules/CaptureScreen/hooks/useImageEditor.d.ts +5 -5
  335. package/es/components/molecules/CaptureScreen/hooks/useImageEditor.js +103 -103
  336. package/es/components/molecules/CaptureScreen/index.d.ts +1 -1
  337. package/es/components/molecules/CaptureScreen/index.js +1 -1
  338. package/es/components/molecules/CaptureScreen/styled.d.ts +26 -26
  339. package/es/components/molecules/CaptureScreen/styled.js +255 -255
  340. package/es/components/molecules/CaptureScreen/themes/black.d.ts +54 -54
  341. package/es/components/molecules/CaptureScreen/themes/black.js +64 -64
  342. package/es/components/molecules/CaptureScreen/themes/white.d.ts +54 -54
  343. package/es/components/molecules/CaptureScreen/themes/white.js +64 -64
  344. package/es/components/molecules/CaptureScreen/types.d.ts +108 -108
  345. package/es/components/molecules/CaptureScreen/types.js +1 -1
  346. package/es/components/molecules/CaptureScreen/utils.d.ts +13 -13
  347. package/es/components/molecules/CaptureScreen/utils.js +62 -62
  348. package/es/components/molecules/Card/Card.d.ts +1 -1
  349. package/es/components/molecules/Card/Card.js +2 -2
  350. package/es/components/molecules/Card/index.d.ts +1 -1
  351. package/es/components/molecules/Card/index.js +1 -1
  352. package/es/components/molecules/Cascader/Cascader.d.ts +1 -1
  353. package/es/components/molecules/Cascader/Cascader.js +1 -1
  354. package/es/components/molecules/Cascader/index.d.ts +1 -1
  355. package/es/components/molecules/Cascader/index.js +1 -1
  356. package/es/components/molecules/ChatBox/ChatBox.d.ts +3 -3
  357. package/es/components/molecules/ChatBox/ChatBox.js +188 -188
  358. package/es/components/molecules/ChatBox/MessageItem.d.ts +5 -5
  359. package/es/components/molecules/ChatBox/MessageItem.js +66 -66
  360. package/es/components/molecules/ChatBox/constants.d.ts +6 -6
  361. package/es/components/molecules/ChatBox/constants.js +51 -51
  362. package/es/components/molecules/ChatBox/index.d.ts +1 -1
  363. package/es/components/molecules/ChatBox/index.js +1 -1
  364. package/es/components/molecules/ChatBox/styled.d.ts +10 -10
  365. package/es/components/molecules/ChatBox/styled.js +280 -280
  366. package/es/components/molecules/ChatBox/types.d.ts +32 -32
  367. package/es/components/molecules/ChatBox/types.js +1 -1
  368. package/es/components/molecules/Collapse/Collapse.d.ts +4 -4
  369. package/es/components/molecules/Collapse/Collapse.js +11 -11
  370. package/es/components/molecules/Collapse/index.d.ts +1 -1
  371. package/es/components/molecules/Collapse/index.js +1 -1
  372. package/es/components/molecules/ColorPicker/ChromePicker/index.d.ts +1 -1
  373. package/es/components/molecules/ColorPicker/ChromePicker/index.js +3 -3
  374. package/es/components/molecules/ColorPicker/ChromePicker/styled.d.ts +1 -1
  375. package/es/components/molecules/ColorPicker/ChromePicker/styled.js +15 -15
  376. package/es/components/molecules/ColorPicker/CustomPicker/index.d.ts +2 -2
  377. package/es/components/molecules/ColorPicker/CustomPicker/index.js +117 -117
  378. package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +9 -9
  379. package/es/components/molecules/ColorPicker/CustomPicker/styled.js +104 -104
  380. package/es/components/molecules/ColorPicker/SketchPicker/index.d.ts +10 -10
  381. package/es/components/molecules/ColorPicker/SketchPicker/index.js +5 -5
  382. package/es/components/molecules/ColorPicker/SketchPicker/styled.d.ts +1 -1
  383. package/es/components/molecules/ColorPicker/SketchPicker/styled.js +10 -10
  384. package/es/components/molecules/ColorPicker/index.d.ts +13 -13
  385. package/es/components/molecules/ColorPicker/index.js +95 -95
  386. package/es/components/molecules/ColorPicker/styled.d.ts +1 -1
  387. package/es/components/molecules/ColorPicker/styled.js +10 -10
  388. package/es/components/molecules/ColorSetting/index.d.ts +14 -14
  389. package/es/components/molecules/ColorSetting/index.js +97 -97
  390. package/es/components/molecules/ColorSetting/styled.d.ts +7 -7
  391. package/es/components/molecules/ColorSetting/styled.js +42 -42
  392. package/es/components/molecules/DatePicker/DatePicker.d.ts +8 -8
  393. package/es/components/molecules/DatePicker/DatePicker.js +8 -8
  394. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +28 -28
  395. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +575 -577
  396. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +94 -68
  397. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +183 -140
  398. package/es/components/molecules/DatePicker/components/AdvancedPicker/index.d.ts +3 -3
  399. package/es/components/molecules/DatePicker/components/AdvancedPicker/index.js +1 -1
  400. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +7 -7
  401. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +93 -93
  402. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +36 -36
  403. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.js +1 -1
  404. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +35 -35
  405. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +173 -173
  406. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +15 -15
  407. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +70 -70
  408. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +4 -4
  409. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +4 -4
  410. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.d.ts +2 -2
  411. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/index.js +1 -1
  412. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +17 -17
  413. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.js +1 -1
  414. package/es/components/molecules/DatePicker/index.d.ts +3 -3
  415. package/es/components/molecules/DatePicker/index.js +1 -1
  416. package/es/components/molecules/Drawer/Drawer.d.ts +5 -5
  417. package/es/components/molecules/Drawer/Drawer.js +4 -4
  418. package/es/components/molecules/Drawer/index.d.ts +2 -2
  419. package/es/components/molecules/Drawer/index.js +1 -1
  420. package/es/components/molecules/Dropdown/Dropdown.d.ts +1 -1
  421. package/es/components/molecules/Dropdown/Dropdown.js +1 -1
  422. package/es/components/molecules/Dropdown/index.d.ts +1 -1
  423. package/es/components/molecules/Dropdown/index.js +1 -1
  424. package/es/components/molecules/EdgeSetting/index.d.ts +39 -39
  425. package/es/components/molecules/EdgeSetting/index.js +192 -192
  426. package/es/components/molecules/EdgeSetting/styled.d.ts +3 -3
  427. package/es/components/molecules/EdgeSetting/styled.js +18 -18
  428. package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -307
  429. package/es/components/molecules/FontFamilySelect/constants.js +257 -257
  430. package/es/components/molecules/FontFamilySelect/index.d.ts +17 -17
  431. package/es/components/molecules/FontFamilySelect/index.js +53 -53
  432. package/es/components/molecules/FontSetting/constants.d.ts +3 -3
  433. package/es/components/molecules/FontSetting/constants.js +22 -22
  434. package/es/components/molecules/FontSetting/index.d.ts +24 -24
  435. package/es/components/molecules/FontSetting/index.js +54 -54
  436. package/es/components/molecules/FontSetting/types.d.ts +22 -22
  437. package/es/components/molecules/FontSetting/types.js +1 -1
  438. package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -28
  439. package/es/components/molecules/FontWeightSelect/constants.js +11 -11
  440. package/es/components/molecules/FontWeightSelect/index.d.ts +9 -9
  441. package/es/components/molecules/FontWeightSelect/index.js +39 -39
  442. package/es/components/molecules/Form/Form.d.ts +1 -1
  443. package/es/components/molecules/Form/Form.js +1 -1
  444. package/es/components/molecules/Form/index.d.ts +1 -1
  445. package/es/components/molecules/Form/index.js +1 -1
  446. package/es/components/molecules/GradientSetting/index.d.ts +36 -36
  447. package/es/components/molecules/GradientSetting/index.js +99 -99
  448. package/es/components/molecules/GradientSetting/styled.d.ts +1 -1
  449. package/es/components/molecules/GradientSetting/styled.js +59 -59
  450. package/es/components/molecules/IconSelection/components/Icon/index.d.ts +10 -10
  451. package/es/components/molecules/IconSelection/components/Icon/index.js +28 -28
  452. package/es/components/molecules/IconSelection/constants.d.ts +56 -56
  453. package/es/components/molecules/IconSelection/constants.js +89 -89
  454. package/es/components/molecules/IconSelection/index.d.ts +3 -3
  455. package/es/components/molecules/IconSelection/index.js +143 -143
  456. package/es/components/molecules/IconSelection/styled.d.ts +8 -8
  457. package/es/components/molecules/IconSelection/styled.js +80 -80
  458. package/es/components/molecules/IconSelection/types.d.ts +26 -26
  459. package/es/components/molecules/IconSelection/types.js +2 -2
  460. package/es/components/molecules/IconSelection/utils.d.ts +4 -4
  461. package/es/components/molecules/IconSelection/utils.js +13 -13
  462. package/es/components/molecules/InputNumber/index.d.ts +9 -9
  463. package/es/components/molecules/InputNumber/index.js +81 -81
  464. package/es/components/molecules/InputNumberWithUnit/index.d.ts +31 -31
  465. package/es/components/molecules/InputNumberWithUnit/index.js +37 -37
  466. package/es/components/molecules/InputNumberWithUnit/styled.d.ts +1 -1
  467. package/es/components/molecules/InputNumberWithUnit/styled.js +20 -20
  468. package/es/components/molecules/InputSearch/index.d.ts +7 -7
  469. package/es/components/molecules/InputSearch/index.js +23 -23
  470. package/es/components/molecules/InputSearch/styled.d.ts +1 -1
  471. package/es/components/molecules/InputSearch/styled.js +48 -48
  472. package/es/components/molecules/Modal/Modal.d.ts +23 -23
  473. package/es/components/molecules/Modal/Modal.js +26 -26
  474. package/es/components/molecules/Modal/index.d.ts +2 -2
  475. package/es/components/molecules/Modal/index.js +1 -1
  476. package/es/components/molecules/Modal/styled.d.ts +15 -15
  477. package/es/components/molecules/Modal/styled.js +78 -78
  478. package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -5
  479. package/es/components/molecules/ModalV2/ModalV2.js +26 -26
  480. package/es/components/molecules/ModalV2/index.d.ts +2 -2
  481. package/es/components/molecules/ModalV2/index.js +1 -1
  482. package/es/components/molecules/ModalV2/styled.d.ts +7 -7
  483. package/es/components/molecules/ModalV2/styled.js +22 -22
  484. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +4 -4
  485. package/es/components/molecules/Popconfirm/Popconfirm.js +2 -2
  486. package/es/components/molecules/Popconfirm/index.d.ts +1 -1
  487. package/es/components/molecules/Popconfirm/index.js +1 -1
  488. package/es/components/molecules/PopupDraggable/PopupDraggable.d.ts +6 -6
  489. package/es/components/molecules/PopupDraggable/PopupDraggable.js +52 -52
  490. package/es/components/molecules/PopupDraggable/index.d.ts +1 -1
  491. package/es/components/molecules/PopupDraggable/index.js +1 -1
  492. package/es/components/molecules/PopupDraggable/styled.d.ts +5 -5
  493. package/es/components/molecules/PopupDraggable/styled.js +52 -52
  494. package/es/components/molecules/PopupDraggable/types.d.ts +15 -15
  495. package/es/components/molecules/PopupDraggable/types.js +1 -1
  496. package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -7
  497. package/es/components/molecules/PreviewModal/PreviewModal.js +30 -30
  498. package/es/components/molecules/PreviewModal/index.d.ts +2 -2
  499. package/es/components/molecules/PreviewModal/index.js +1 -1
  500. package/es/components/molecules/PreviewModal/styled.d.ts +4 -4
  501. package/es/components/molecules/PreviewModal/styled.js +39 -39
  502. package/es/components/molecules/RadioGroup/index.d.ts +7 -7
  503. package/es/components/molecules/RadioGroup/index.js +23 -23
  504. package/es/components/molecules/RadioGroup/styled.d.ts +3 -3
  505. package/es/components/molecules/RadioGroup/styled.js +14 -14
  506. package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -3
  507. package/es/components/molecules/ResizeGrid/ResizeGrid.js +727 -727
  508. package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -3
  509. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -87
  510. package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -1
  511. package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -1
  512. package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -3
  513. package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -80
  514. package/es/components/molecules/ResizeGrid/constant.d.ts +35 -35
  515. package/es/components/molecules/ResizeGrid/constant.js +111 -111
  516. package/es/components/molecules/ResizeGrid/index.d.ts +2 -2
  517. package/es/components/molecules/ResizeGrid/index.js +1 -1
  518. package/es/components/molecules/ResizeGrid/styled.d.ts +10 -10
  519. package/es/components/molecules/ResizeGrid/styled.js +56 -56
  520. package/es/components/molecules/ResizeGrid/types.d.ts +147 -147
  521. package/es/components/molecules/ResizeGrid/types.js +1 -1
  522. package/es/components/molecules/Result/Result.d.ts +1 -1
  523. package/es/components/molecules/Result/Result.js +2 -2
  524. package/es/components/molecules/Result/index.d.ts +1 -1
  525. package/es/components/molecules/Result/index.js +1 -1
  526. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +9 -9
  527. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -53
  528. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +11 -11
  529. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +47 -47
  530. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +9 -9
  531. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +52 -52
  532. package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -2
  533. package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -765
  534. package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -3
  535. package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -2
  536. package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -9
  537. package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -17
  538. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -10
  539. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -32
  540. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -6
  541. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -15
  542. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -4
  543. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -47
  544. package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -2
  545. package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -1
  546. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -9
  547. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -37
  548. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -10
  549. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -37
  550. package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -1
  551. package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -1
  552. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -6
  553. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -20
  554. package/es/components/molecules/RichMenu/index.d.ts +3 -3
  555. package/es/components/molecules/RichMenu/index.js +3 -3
  556. package/es/components/molecules/Select/Select.d.ts +19 -19
  557. package/es/components/molecules/Select/Select.js +50 -50
  558. package/es/components/molecules/Select/Test.d.ts +3 -3
  559. package/es/components/molecules/Select/Test.js +22 -22
  560. package/es/components/molecules/Select/index.d.ts +2 -2
  561. package/es/components/molecules/Select/index.js +1 -1
  562. package/es/components/molecules/Select/styled.d.ts +4 -4
  563. package/es/components/molecules/Select/styled.js +41 -41
  564. package/es/components/molecules/SettingWrapper/index.d.ts +12 -12
  565. package/es/components/molecules/SettingWrapper/index.js +20 -20
  566. package/es/components/molecules/SettingWrapper/styled.d.ts +5 -5
  567. package/es/components/molecules/SettingWrapper/styled.js +17 -17
  568. package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -16
  569. package/es/components/molecules/SettingWrapperPopover/index.js +17 -17
  570. package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -3
  571. package/es/components/molecules/ShareAccess/ShareAccess.js +23 -23
  572. package/es/components/molecules/ShareAccess/actions.d.ts +16 -16
  573. package/es/components/molecules/ShareAccess/actions.js +12 -12
  574. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -2
  575. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +70 -70
  576. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -1
  577. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -1
  578. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -1
  579. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -57
  580. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -3
  581. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +14 -14
  582. package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -1
  583. package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -1
  584. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -1
  585. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -7
  586. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -2
  587. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -43
  588. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -1
  589. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -7
  590. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -18
  591. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -5
  592. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +92 -92
  593. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -1
  594. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -1
  595. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -1
  596. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -46
  597. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -5
  598. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -73
  599. package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -1
  600. package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -1
  601. package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -2
  602. package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -29
  603. package/es/components/molecules/ShareAccess/components/index.d.ts +1 -1
  604. package/es/components/molecules/ShareAccess/components/index.js +1 -1
  605. package/es/components/molecules/ShareAccess/constants.d.ts +61 -61
  606. package/es/components/molecules/ShareAccess/constants.js +79 -79
  607. package/es/components/molecules/ShareAccess/context.d.ts +4 -4
  608. package/es/components/molecules/ShareAccess/context.js +3 -3
  609. package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -1
  610. package/es/components/molecules/ShareAccess/hooks/index.js +1 -1
  611. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +15 -15
  612. package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +15 -15
  613. package/es/components/molecules/ShareAccess/index.d.ts +1 -1
  614. package/es/components/molecules/ShareAccess/index.js +1 -1
  615. package/es/components/molecules/ShareAccess/reducer.d.ts +2 -2
  616. package/es/components/molecules/ShareAccess/reducer.js +19 -19
  617. package/es/components/molecules/ShareAccess/types.d.ts +46 -46
  618. package/es/components/molecules/ShareAccess/types.js +1 -1
  619. package/es/components/molecules/ShareAccess/utils.d.ts +14 -14
  620. package/es/components/molecules/ShareAccess/utils.js +22 -22
  621. package/es/components/molecules/SliderWithInputNumber/index.d.ts +11 -11
  622. package/es/components/molecules/SliderWithInputNumber/index.js +62 -62
  623. package/es/components/molecules/SliderWithInputNumber/styled.d.ts +1 -1
  624. package/es/components/molecules/SliderWithInputNumber/styled.js +8 -8
  625. package/es/components/molecules/Tabs/Tabs.d.ts +1 -1
  626. package/es/components/molecules/Tabs/Tabs.js +1 -1
  627. package/es/components/molecules/Tabs/index.d.ts +1 -1
  628. package/es/components/molecules/Tabs/index.js +1 -1
  629. package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -19
  630. package/es/components/molecules/TextDecorationSelect/constants.js +26 -26
  631. package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -15
  632. package/es/components/molecules/TextDecorationSelect/index.js +45 -45
  633. package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -13
  634. package/es/components/molecules/TextTransformSelect/constants.js +19 -19
  635. package/es/components/molecules/TextTransformSelect/index.d.ts +9 -9
  636. package/es/components/molecules/TextTransformSelect/index.js +39 -39
  637. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +13 -13
  638. package/es/components/molecules/TreeSelect/TreeSelect.js +2 -2
  639. package/es/components/molecules/TreeSelect/index.d.ts +1 -1
  640. package/es/components/molecules/TreeSelect/index.js +1 -1
  641. package/es/components/molecules/UploadImage/MediaIcon.d.ts +3 -3
  642. package/es/components/molecules/UploadImage/MediaIcon.js +8 -8
  643. package/es/components/molecules/UploadImage/index.d.ts +33 -33
  644. package/es/components/molecules/UploadImage/index.js +366 -366
  645. package/es/components/molecules/UploadImage/styled.d.ts +13 -13
  646. package/es/components/molecules/UploadImage/styled.js +134 -134
  647. package/es/components/molecules/index.d.ts +45 -45
  648. package/es/components/molecules/index.js +39 -39
  649. package/es/components/organism/Help/Help.d.ts +5 -5
  650. package/es/components/organism/Help/Help.js +1005 -1005
  651. package/es/components/organism/Help/constants.d.ts +140 -140
  652. package/es/components/organism/Help/constants.js +1653 -1653
  653. package/es/components/organism/Help/index.d.ts +1 -1
  654. package/es/components/organism/Help/index.js +1 -1
  655. package/es/components/organism/Help/styled.d.ts +75 -75
  656. package/es/components/organism/Help/styled.js +264 -264
  657. package/es/components/organism/Help/types.d.ts +67 -67
  658. package/es/components/organism/Help/types.js +1 -1
  659. package/es/components/organism/Help/utils.d.ts +15 -15
  660. package/es/components/organism/Help/utils.js +82 -82
  661. package/es/components/organism/PositionSetting/config.d.ts +10 -10
  662. package/es/components/organism/PositionSetting/config.js +10 -10
  663. package/es/components/organism/PositionSetting/index.d.ts +15 -15
  664. package/es/components/organism/PositionSetting/index.js +62 -62
  665. package/es/components/organism/PositionSetting/styled.d.ts +1 -1
  666. package/es/components/organism/PositionSetting/styled.js +3 -3
  667. package/es/components/organism/PositionSetting/types.d.ts +10 -10
  668. package/es/components/organism/PositionSetting/types.js +1 -1
  669. package/es/components/organism/Table/CrossTabTable/CrossTabTable.d.ts +18 -18
  670. package/es/components/organism/Table/CrossTabTable/CrossTabTable.js +305 -305
  671. package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.d.ts +11 -11
  672. package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.js +22 -22
  673. package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.d.ts +1 -1
  674. package/es/components/organism/Table/CrossTabTable/components/CustomCell/index.js +1 -1
  675. package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.d.ts +1 -1
  676. package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.js +13 -13
  677. package/es/components/organism/Table/CrossTabTable/constants.d.ts +75 -75
  678. package/es/components/organism/Table/CrossTabTable/constants.js +1525 -1525
  679. package/es/components/organism/Table/CrossTabTable/index.d.ts +1 -1
  680. package/es/components/organism/Table/CrossTabTable/index.js +1 -1
  681. package/es/components/organism/Table/CrossTabTable/styled.d.ts +1 -1
  682. package/es/components/organism/Table/CrossTabTable/styled.js +13 -13
  683. package/es/components/organism/Table/CrossTabTable/types.d.ts +1 -1
  684. package/es/components/organism/Table/CrossTabTable/types.js +1 -1
  685. package/es/components/organism/Table/CrossTabTable/utils.d.ts +1 -1
  686. package/es/components/organism/Table/CrossTabTable/utils.js +1 -1
  687. package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.d.ts +11 -11
  688. package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.js +51 -51
  689. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.d.ts +12 -12
  690. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.js +41 -41
  691. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.d.ts +1 -1
  692. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/index.js +1 -1
  693. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.d.ts +3 -3
  694. package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.js +21 -21
  695. package/es/components/organism/Table/ExplorePivotTable/constants.d.ts +4 -4
  696. package/es/components/organism/Table/ExplorePivotTable/constants.js +84 -84
  697. package/es/components/organism/Table/ExplorePivotTable/index.d.ts +2 -2
  698. package/es/components/organism/Table/ExplorePivotTable/index.js +2 -2
  699. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +12 -12
  700. package/es/components/organism/Table/ExplorePivotTable/styled.js +15 -15
  701. package/es/components/organism/Table/ExplorePivotTable/types.d.ts +17 -17
  702. package/es/components/organism/Table/ExplorePivotTable/types.js +1 -1
  703. package/es/components/organism/Table/ExplorePivotTable/utils.d.ts +4 -4
  704. package/es/components/organism/Table/ExplorePivotTable/utils.js +154 -154
  705. package/es/components/organism/Table/Table.d.ts +1 -1
  706. package/es/components/organism/Table/Table.js +1 -1
  707. package/es/components/organism/Table/index.d.ts +2 -2
  708. package/es/components/organism/Table/index.js +2 -2
  709. package/es/components/organism/index.d.ts +3 -3
  710. package/es/components/organism/index.js +3 -3
  711. package/es/constants/gradientSetting.d.ts +83 -83
  712. package/es/constants/gradientSetting.js +86 -86
  713. package/es/constants/index.d.ts +4 -4
  714. package/es/constants/index.js +4 -4
  715. package/es/constants/keyCode.d.ts +387 -387
  716. package/es/constants/keyCode.js +394 -394
  717. package/es/constants/richMenu.d.ts +19 -19
  718. package/es/constants/richMenu.js +19 -19
  719. package/es/constants/storybook.d.ts +17 -17
  720. package/es/constants/storybook.js +36 -36
  721. package/es/constants/theme.d.ts +12 -12
  722. package/es/constants/theme.js +173 -173
  723. package/es/hooks/index.d.ts +2 -2
  724. package/es/hooks/index.js +21 -21
  725. package/es/hooks/useDebounce.d.ts +3 -3
  726. package/es/hooks/useDebounce.js +15 -15
  727. package/es/hooks/useDeepCompareEffect.d.ts +1 -1
  728. package/es/hooks/useDeepCompareEffect.js +21 -21
  729. package/es/hooks/usePrevious.d.ts +2 -2
  730. package/es/hooks/usePrevious.js +9 -9
  731. package/es/index.d.ts +1 -1
  732. package/es/index.js +1 -1
  733. package/es/locales/en/translation.json +68 -68
  734. package/es/locales/i18n.d.ts +143 -143
  735. package/es/locales/i18n.js +38 -38
  736. package/es/locales/translations.d.ts +72 -72
  737. package/es/locales/translations.js +35 -35
  738. package/es/locales/types.d.ts +15 -15
  739. package/es/locales/types.js +1 -1
  740. package/es/locales/vi/translation.json +67 -67
  741. package/es/models/SavedImage.d.ts +32 -32
  742. package/es/models/SavedImage.js +26 -26
  743. package/es/models/Upload.d.ts +32 -32
  744. package/es/models/Upload.js +21 -21
  745. package/es/models/model.d.ts +8 -8
  746. package/es/models/model.js +5 -5
  747. package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +6 -6
  748. package/es/services/MediaTemplateDesign/UploadFile/index.js +75 -75
  749. package/es/services/Ticket.d.ts +67 -67
  750. package/es/services/Ticket.js +73 -73
  751. package/es/services/constants.d.ts +20 -20
  752. package/es/services/constants.js +21 -21
  753. package/es/services/index.d.ts +9 -9
  754. package/es/services/index.js +64 -64
  755. package/es/test.d.ts +14 -14
  756. package/es/test.js +253 -184
  757. package/es/types/index.d.ts +18 -18
  758. package/es/types/index.js +2 -2
  759. package/es/types/richMenu.d.ts +191 -191
  760. package/es/types/richMenu.js +1 -1
  761. package/es/types/variables.d.ts +2 -2
  762. package/es/types/variables.js +1 -1
  763. package/es/utils/color.d.ts +10 -10
  764. package/es/utils/color.js +61 -61
  765. package/es/utils/common.d.ts +56 -56
  766. package/es/utils/common.js +375 -375
  767. package/es/utils/handleError.d.ts +32 -32
  768. package/es/utils/handleError.js +44 -44
  769. package/es/utils/index.d.ts +3 -3
  770. package/es/utils/index.js +3 -3
  771. package/es/utils/loadable.d.ts +7 -7
  772. package/es/utils/loadable.js +10 -10
  773. package/es/utils/web.d.ts +10 -10
  774. package/es/utils/web.js +26 -26
  775. package/package.json +186 -185
  776. package/dist/0dfb9214dfd945cd7290.png +0 -1
  777. package/dist/3570ecd176167c157ca4.ttf +0 -0
  778. package/dist/574b7bee0563a9fe9a29.png +0 -1
  779. package/dist/6b586356e837581204dc.svg +0 -1
  780. package/dist/8fe5f001e9f235bedfe9.svg +0 -1
  781. package/dist/9df500764bebdef838b4.eot +0 -0
  782. package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
  783. package/dist/e32f09119052a55cce3c.png +0 -1
  784. package/dist/e3851b9384a984c6fdb5.png +0 -1
  785. package/dist/f422f99dc05cb0013092.png +0 -1
  786. package/dist/fc2ea7e45a1b0489b742.woff +0 -0
  787. package/dist/index.js +0 -2
  788. package/dist/index.js.LICENSE.txt +0 -69
  789. package/dist/main.css +0 -168
  790. package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
  791. package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
  792. package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
  793. package/dist/public/icons/97210ba7dc321670f4a144c1b40e88d8.png +0 -0
  794. package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
  795. package/dist/public/icons/c856330eba3f0521e9e3a22b88124b81.svg +0 -364
  796. package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
  797. package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
  798. package/dist/public/icons/iphone-top-bar.png +0 -0
  799. package/dist/public/icons/iphone.png +0 -0
  800. package/dist/public/icons/placeholder-image.png +0 -0
  801. package/dist/public/icons/stars_slider.png +0 -0
  802. package/dist/public/icons/transparent.svg +0 -1
@@ -1,577 +1,575 @@
1
- /* eslint-disable react/no-unused-prop-types */
2
- // Libraries
3
- import React, { useEffect, useMemo, useState } from 'react';
4
- import { theme } from 'antd';
5
- import dayjs from 'dayjs';
6
- import clsx from 'clsx';
7
- // Hooks
8
- import { useDeepCompareEffect } from '../../../../../hooks';
9
- // Icons
10
- import Icon from '@antscorp/icons';
11
- import { EventIcon } from '../../../../icons';
12
- // Atoms
13
- import { Input, InputNumber, Divider, Space, Button, Typography, } from '@antscorp/antsomi-ui/es/components/atoms';
14
- // Molecules
15
- import { Select, Dropdown, DatePicker } from '@antscorp/antsomi-ui/es/components';
16
- // Utils
17
- import { handleError, reorder } from '@antscorp/antsomi-ui/es/utils';
18
- import { calculationDateAdvanced, getCellRender, getLabelQuarterRange, getPickerRender, getTimePickerRender, } from './utils';
19
- // Styled
20
- import { DatePickerCustomInput, DatePickerHeader, DropdownContent, DropdownHeader, DatePickerFooter, DropdownFooter, CalendarIconWrapper, } from './styled';
21
- // Constants
22
- import { CALCULATION_DATES, CALCULATION_TYPES, DATE_TYPES, DEFAULT_DATE_FORMAT, VALUE_TYPES, ADVANCED_PICKER_TYPE, WEEK_ARR, QUARTER_PLACEHOLDER, WEEK_PLACEHOLDER, DAY_LABEL_SHORT, HIDE_TIME_LABEL_ARR, MONTH_LABEL_FULL, DAY_OF_MONTH, ANCHOR_LEAP_YEAR, } from './constants';
23
- import { THEME } from '../../../../../constants';
24
- // Instance
25
- import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
26
- const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components/Advanced/DatePickerAdvanced.tsx';
27
- const { useToken } = theme;
28
- const { Text } = Typography;
29
- export const AdvancedPicker = props => {
30
- var _a, _b;
31
- // Props
32
- const { label, inputStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, onUpdatedNewDate, onApply, } = props;
33
- // Memo
34
- const newDateTypes = useMemo(() => {
35
- if (dateTypeKeysShow && dateTypeKeysShow.length) {
36
- const draftDateTypes = DATE_TYPES.filter(dateType => dateTypeKeysShow.some(key => key === dateType.value));
37
- return draftDateTypes;
38
- }
39
- if (defaultDateTypeKey) {
40
- const index = DATE_TYPES.findIndex(dateType => dateType.value === defaultDateTypeKey);
41
- if (index !== -1) {
42
- return reorder(DATE_TYPES, index, 0);
43
- }
44
- }
45
- return DATE_TYPES;
46
- }, [dateTypeKeysShow, defaultDateTypeKey]);
47
- const newCalculationDates = useMemo(() => {
48
- switch (valueType) {
49
- case VALUE_TYPES.YEAR_MONTH_DAY:
50
- return CALCULATION_DATES.filter(calculationDate => !['hours', 'minutes', 'seconds'].includes(calculationDate.value));
51
- case VALUE_TYPES.YEAR_MONTH_DAY_HOUR:
52
- return CALCULATION_DATES.filter(calculationDate => !['minutes', 'seconds'].includes(calculationDate.value));
53
- case VALUE_TYPES.YEAR_MONTH_DAY_MINUTE:
54
- return CALCULATION_DATES.filter(calculationDate => !['seconds'].includes(calculationDate.value));
55
- case VALUE_TYPES.YEAR:
56
- return CALCULATION_DATES.filter(calculationDate => ['years'].includes(calculationDate.value));
57
- case VALUE_TYPES.YEAR_MONTH:
58
- return CALCULATION_DATES.filter(calculationDate => ['years', 'months', 'quarters'].includes(calculationDate.value));
59
- case VALUE_TYPES.YEAR_MONTH_DAY_SECOND:
60
- return CALCULATION_DATES;
61
- default:
62
- return CALCULATION_DATES;
63
- }
64
- }, [valueType]);
65
- const [formatDisplay, timeFormatDisplay] = useMemo(() => {
66
- let formatDisplay = '';
67
- let timeFormatDisplay = '';
68
- let isStartDate = false;
69
- // Handle detect day is start or end
70
- if (operatorKey === 'between') {
71
- isStartDate = type === 'startDate';
72
- }
73
- else {
74
- isStartDate = operatorKey === 'after';
75
- }
76
- switch (valueType) {
77
- case 'YEAR':
78
- formatDisplay = 'YYYY';
79
- break;
80
- case 'YEAR_QUARTER':
81
- formatDisplay = `${QUARTER_PLACEHOLDER}Q, YYYY`;
82
- break;
83
- case 'YEAR_MONTH':
84
- formatDisplay = 'MM/YYYY';
85
- break;
86
- case 'YEAR_WEEK':
87
- formatDisplay = `${WEEK_PLACEHOLDER}W, YYYY`;
88
- break;
89
- case 'YEAR_MONTH_DAY_HOUR':
90
- formatDisplay = `DD/MM/YYYY - ${isStartDate ? 'HH:00:00' : 'HH:59:59'}`;
91
- timeFormatDisplay = 'HH';
92
- // timeFormatDisplay = isStartDate ? 'HH:00:00' : 'HH:59:59';
93
- break;
94
- case 'YEAR_MONTH_DAY_MINUTE':
95
- formatDisplay = `DD/MM/YYYY - ${isStartDate ? 'HH:mm:00' : 'HH:mm:59'}`;
96
- // timeFormatDisplay = isStartDate ? 'HH:mm:00' : 'HH:mm:59';
97
- timeFormatDisplay = 'HH:mm';
98
- break;
99
- case 'YEAR_MONTH_DAY_SECOND':
100
- formatDisplay = 'DD/MM/YYYY - HH:mm:ss';
101
- timeFormatDisplay = 'HH:mm:ss';
102
- break;
103
- case 'QUARTER':
104
- formatDisplay = `${QUARTER_PLACEHOLDER}Q`;
105
- break;
106
- case 'MONTH':
107
- formatDisplay = 'MMMM';
108
- break;
109
- case 'WEEK':
110
- formatDisplay = `${WEEK_PLACEHOLDER}W`;
111
- break;
112
- case 'MONTH_DAY':
113
- formatDisplay = 'MMMM DD';
114
- break;
115
- case 'DAY_OF_WEEK':
116
- formatDisplay = 'dddd';
117
- break;
118
- case 'DAY':
119
- formatDisplay = 'DD';
120
- break;
121
- case 'HOUR':
122
- formatDisplay = 'HH';
123
- break;
124
- case 'MINUTE':
125
- formatDisplay = 'mm';
126
- break;
127
- default:
128
- formatDisplay = `DD/MM/YYYY - ${isStartDate ? '00:00:00' : '23:59:59'}`;
129
- timeFormatDisplay = isStartDate ? '00:00:00' : '23:59:59';
130
- break;
131
- }
132
- if (formatInputDisplay) {
133
- formatDisplay = formatInputDisplay;
134
- }
135
- return [formatDisplay, timeFormatDisplay];
136
- }, [valueType, operatorKey, type, formatInputDisplay]);
137
- // State
138
- const [state, setState] = useState({
139
- isOpen: false,
140
- option: {
141
- dateType: newDateTypes[0],
142
- calculationType: CALCULATION_TYPES[0],
143
- calculationDate: newCalculationDates[0],
144
- value: 0,
145
- },
146
- optionSelected: {
147
- dateType: newDateTypes[0],
148
- calculationType: CALCULATION_TYPES[0],
149
- calculationDate: newCalculationDates[0],
150
- value: 0,
151
- },
152
- date: dayjs().format(DEFAULT_DATE_FORMAT),
153
- dateDisplay: dayjs().format(DEFAULT_DATE_FORMAT),
154
- });
155
- const { isOpen, option, date, dateDisplay } = state;
156
- const [currMonthSelected, setCurrMonthSelected] = useState(dayjs(date, format).month());
157
- const newCalculationTypes = useMemo(() => {
158
- var _a;
159
- if (calculationTypeKeysShow && calculationTypeKeysShow.length) {
160
- const draftCalculationTypes = CALCULATION_TYPES.filter(calculationType => calculationTypeKeysShow.some(key => key === calculationType.value));
161
- return draftCalculationTypes;
162
- }
163
- if (showCalculationTypeCondition && option.dateType) {
164
- if (showCalculationTypeCondition.dateType[option.dateType.value]) {
165
- const draftCalculationTypes = (_a = showCalculationTypeCondition.dateType[option.dateType.value]) === null || _a === void 0 ? void 0 : _a.map(dateType => CALCULATION_TYPES.find(({ value }) => value === dateType));
166
- if (!draftCalculationTypes.find(({ value }) => value === option.calculationType.value)) {
167
- setState(state => (Object.assign(Object.assign({}, state), { option: Object.assign(Object.assign({}, state.option), { calculationType: draftCalculationTypes[0] }) })));
168
- }
169
- return draftCalculationTypes;
170
- }
171
- }
172
- return CALCULATION_TYPES;
173
- // eslint-disable-next-line react-hooks/exhaustive-deps
174
- }, [calculationTypeKeysShow, showCalculationTypeCondition, option.dateType]);
175
- // Hooks
176
- const { token } = useToken();
177
- const { t } = i18nInstance;
178
- // Variables
179
- const contentStyle = {
180
- backgroundColor: token.colorBgElevated,
181
- borderRadius: token.borderRadius,
182
- boxShadow: token.boxShadowSecondary,
183
- };
184
- // Effects
185
- useDeepCompareEffect(() => {
186
- try {
187
- if (isOpen) {
188
- setState(state => (Object.assign(Object.assign({}, state), { option: state.optionSelected, date: state.dateDisplay })));
189
- }
190
- }
191
- catch (error) {
192
- handleError(error, {
193
- path: PATH,
194
- name: 'useEffect',
195
- args: {},
196
- });
197
- }
198
- }, [isOpen]);
199
- useEffect(() => {
200
- try {
201
- if (option.dateType.value !== 'fixed') {
202
- const newDate = calculationDateAdvanced(option.dateType.value, option.calculationType.value, option.calculationDate.value, option.value, format);
203
- setState(state => (Object.assign(Object.assign({}, state), { date: newDate })));
204
- }
205
- }
206
- catch (error) {
207
- handleError(error, {
208
- path: PATH,
209
- name: 'useEffectWithDependencies[state.option, format]',
210
- args: { option, format },
211
- });
212
- }
213
- }, [option, format]);
214
- useEffect(() => {
215
- try {
216
- if (propsOption) {
217
- const { dateType, calculationType, calculationDate, value = 0 } = propsOption || {};
218
- const newDateTypes = DATE_TYPES;
219
- const newDateType = newDateTypes.find(dType => dType.value === dateType);
220
- const newCalculationType = CALCULATION_TYPES.find(calType => calType.value === calculationType);
221
- const newCalculationDate = newCalculationDates.find(calDate => calDate.value === calculationDate);
222
- let newDate = '';
223
- if (newDateType) {
224
- if (newDateType.value === 'fixed') {
225
- newDate = dayjs(propsDate, DEFAULT_DATE_FORMAT, true).isValid()
226
- ? dayjs(propsDate, DEFAULT_DATE_FORMAT).format(format)
227
- : propsDate;
228
- setState(state => (Object.assign(Object.assign({}, state), { date: newDate, dateDisplay: newDate, optionSelected: Object.assign(Object.assign({}, option), { dateType: newDateType }) })));
229
- }
230
- else {
231
- if (newCalculationDate && newCalculationType) {
232
- const date = calculationDateAdvanced(newDateType.value, newCalculationType.value, newCalculationDate.value, value, format);
233
- setState(state => (Object.assign(Object.assign({}, state), { dateDisplay: date, optionSelected: {
234
- dateType: newDateType,
235
- calculationDate: newCalculationDate,
236
- calculationType: newCalculationType,
237
- value,
238
- } })));
239
- newDate = date;
240
- }
241
- }
242
- }
243
- if (typeof onUpdatedNewDate === 'function' && propsDate !== newDate) {
244
- onUpdatedNewDate(newDate);
245
- }
246
- }
247
- }
248
- catch (error) {
249
- handleError(error, {
250
- path: PATH,
251
- name: 'useEffectPropsOption',
252
- args: {},
253
- });
254
- }
255
- // eslint-disable-next-line react-hooks/exhaustive-deps
256
- }, [propsOption, propsDate, format]);
257
- // Handlers
258
- const disableDate = current => current > dayjs(disableAfterDate, format) || current < dayjs(disableBeforeDate, format);
259
- const renderLabel = (date, locale = 'en') => {
260
- let formatLabel = 'dddd, MMMM D, YYYY';
261
- let subLabel = '';
262
- switch (valueType) {
263
- case 'YEAR':
264
- formatLabel = 'YYYY';
265
- break;
266
- case 'YEAR_QUARTER':
267
- formatLabel = `${QUARTER_PLACEHOLDER}Q, YYYY`;
268
- subLabel = getLabelQuarterRange(date, format || DEFAULT_DATE_FORMAT, locale);
269
- break;
270
- case 'YEAR_MONTH':
271
- formatLabel = 'MMMM, YYYY';
272
- break;
273
- case 'YEAR_WEEK': {
274
- const dayObj = dayjs(date || new Date(), format).locale(locale || 'en');
275
- formatLabel = `${WEEK_PLACEHOLDER}W, YYYY`;
276
- subLabel = `${dayjs(dayObj).day(0).format('MMMM DD, YYYY')} - ${dayjs(dayObj)
277
- .day(6)
278
- .format('MMMM DD, YYYY')}`;
279
- break;
280
- }
281
- case 'QUARTER':
282
- formatLabel = `${QUARTER_PLACEHOLDER}Q`;
283
- break;
284
- case 'MONTH':
285
- formatLabel = 'MMMM';
286
- break;
287
- case 'WEEK':
288
- formatLabel = `${WEEK_PLACEHOLDER}W`;
289
- break;
290
- case 'MONTH_DAY':
291
- formatLabel = 'MMMM DD';
292
- break;
293
- case 'DAY_OF_WEEK':
294
- formatLabel = 'dddd';
295
- break;
296
- case 'DAY':
297
- formatLabel = 'DD';
298
- break;
299
- case 'HOUR':
300
- formatLabel = 'HH';
301
- break;
302
- case 'MINUTE':
303
- formatLabel = 'mm';
304
- break;
305
- default:
306
- break;
307
- }
308
- return (React.createElement(React.Fragment, null,
309
- React.createElement("div", { style: { fontWeight: 'bold' } }, dayjs(date || new Date(), format)
310
- .locale(locale || 'en')
311
- .format(formatLabel)
312
- .replace(QUARTER_PLACEHOLDER, 'Quarter ')
313
- .replace(WEEK_PLACEHOLDER, 'Week ')),
314
- subLabel ? React.createElement("div", null, subLabel) : null,
315
- !HIDE_TIME_LABEL_ARR.includes(valueType || '') && showTime && !subLabel ? (React.createElement("div", { style: { fontWeight: 'bold' } }, dayjs(date || new Date(), format)
316
- .locale(locale || 'en')
317
- .format(timeFormatDisplay))) : null));
318
- };
319
- const toggleOpenDropdown = (isOpen) => {
320
- try {
321
- setState(() => (Object.assign(Object.assign({}, state), { isOpen: isOpen != null ? isOpen : !state.isOpen })));
322
- }
323
- catch (error) {
324
- handleError(error, {
325
- path: PATH,
326
- name: 'toggleOpenDropdown',
327
- args: {},
328
- });
329
- }
330
- };
331
- const onChangeOption = (params) => {
332
- try {
333
- setState(state => (Object.assign(Object.assign({}, state), { option: Object.assign(Object.assign({}, state.option), params) })));
334
- }
335
- catch (error) {
336
- handleError(error, {
337
- path: PATH,
338
- name: 'onChangeOption',
339
- args: {},
340
- });
341
- }
342
- };
343
- const onClickApply = () => {
344
- try {
345
- const draftOption = {
346
- dateType: option.dateType.value,
347
- calculationDate: option.dateType.value === 'fixed'
348
- ? ''
349
- : option.calculationDate.value,
350
- calculationType: option.dateType.value === 'fixed'
351
- ? ''
352
- : option.calculationType.value,
353
- value: option.dateType.value === 'fixed' ? 0 : option.value,
354
- };
355
- setState(state => (Object.assign(Object.assign({}, state), { optionSelected: option, dateDisplay: date, isOpen: false })));
356
- if (typeof onApply === 'function') {
357
- onApply({
358
- date,
359
- option: draftOption,
360
- });
361
- }
362
- }
363
- catch (error) {
364
- handleError(error, {
365
- path: PATH,
366
- name: 'onClickApply',
367
- args: {},
368
- });
369
- }
370
- };
371
- const onClickNow = () => {
372
- try {
373
- setState(state => (Object.assign(Object.assign({}, state), { date: dayjs().format(format) })));
374
- }
375
- catch (error) {
376
- handleError(error, {
377
- path: PATH,
378
- name: 'onClickNow',
379
- args: {},
380
- });
381
- }
382
- };
383
- const renderDropdownLabel = () => {
384
- var _a;
385
- const title = (_a = Object.values(ADVANCED_PICKER_TYPE).find(({ value }) => value === type)) === null || _a === void 0 ? void 0 : _a.label;
386
- return (React.createElement("div", { style: { textAlign: 'center' } },
387
- title && operatorKey === 'between' && (React.createElement(Text, { className: "__title", style: { color: '#666666' } }, t(title))),
388
- renderLabel(date, 'en')));
389
- };
390
- const renderDropdownFooter = () => (React.createElement(React.Fragment, null,
391
- React.createElement(Divider, null),
392
- React.createElement(DropdownFooter, null,
393
- React.createElement(Space, null,
394
- React.createElement(Button, { type: "primary", onClick: () => onClickApply() }, "Apply"),
395
- React.createElement(Button, { type: "default", onClick: () => toggleOpenDropdown(false) }, "Cancel")),
396
- option.dateType.value === 'fixed' && React.createElement(Button, { onClick: () => onClickNow() }, "Now"))));
397
- const renderDateTypeOptions = () => (React.createElement(Select, { options: newDateTypes.map(dateType => (Object.assign(Object.assign({}, dateType), { label: t(dateType.label) }))), value: option.dateType.value, onChange: value => {
398
- const dateType = newDateTypes.find(dateType => dateType.value === value);
399
- toggleOpenDropdown(true);
400
- setTimeout(() => {
401
- onChangeOption({ dateType });
402
- }, 100);
403
- } }));
404
- const renderErrorMessage = () => {
405
- var _a;
406
- return errorMessage ? (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 5 } },
407
- React.createElement(Icon, { type: "icon-ants-remove-circle", style: { color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorError } }),
408
- React.createElement(Text, { type: "danger" }, errorMessage))) : null;
409
- };
410
- // NOTE: valueType: 'WEEK'; 'DAY_OF_WEEK'; 'MONTH_DAY'; 'DAY'
411
- const customPickerArr = useMemo(() => ({
412
- WEEK: WEEK_ARR,
413
- DAY_OF_WEEK: DAY_LABEL_SHORT,
414
- MONTH_DAY: DAY_OF_MONTH[currMonthSelected],
415
- DAY: DAY_OF_MONTH[0],
416
- }), [currMonthSelected]);
417
- const dropdownRender = () => {
418
- // const customPickerArr = valueType === 'WEEK' ? WEEK_ARR : DAY_LABEL_SHORT;
419
- const currWeek = dayjs(date, format).isoWeek();
420
- const currDay = dayjs(date, format).day();
421
- const currDayOfMonth = dayjs(date, format).date();
422
- const currMonth = dayjs(date, format).month();
423
- const getCellSelected = (item, index) => {
424
- switch (valueType) {
425
- case 'WEEK':
426
- return currWeek === item;
427
- case 'DAY_OF_WEEK':
428
- return index === currDay;
429
- case 'MONTH_DAY':
430
- return item === currDayOfMonth && currMonth === currMonthSelected;
431
- case 'DAY':
432
- return item === currDayOfMonth;
433
- default:
434
- return false;
435
- }
436
- };
437
- const getNewDate = (item, index) => {
438
- switch (valueType) {
439
- case 'WEEK':
440
- return dayjs(date).isoWeek(item);
441
- case 'DAY_OF_WEEK':
442
- return dayjs(date).day(index);
443
- case 'MONTH_DAY':
444
- return dayjs(date).year(ANCHOR_LEAP_YEAR).month(currMonthSelected).date(item);
445
- case 'DAY':
446
- return dayjs(date).year(ANCHOR_LEAP_YEAR).month(0).date(item);
447
- default:
448
- return dayjs(date);
449
- }
450
- };
451
- return (React.createElement("div", { style: contentStyle },
452
- React.createElement(DropdownHeader, { className: "dropdown-header" }, renderDropdownLabel()),
453
- React.createElement(DropdownContent, { className: "dropdown-content" },
454
- renderDateTypeOptions(),
455
- option.dateType.value === 'fixed' ? (React.createElement(React.Fragment, null,
456
- valueType === 'MONTH_DAY' ? (React.createElement("div", { className: "month-controller" },
457
- React.createElement(Icon, { type: "icon-ants-angle-left", style: { fontSize: '14px', color: '#D2D2D2' }, onClick: () => setCurrMonthSelected(prev => (prev === 0 ? 11 : prev - 1)) }),
458
- MONTH_LABEL_FULL[currMonthSelected],
459
- React.createElement(Icon, { type: "icon-ants-angle-right", style: { fontSize: '14px', color: '#D2D2D2' }, onClick: () => setCurrMonthSelected(prev => (prev === 11 ? 0 : prev + 1)) }))) : null,
460
- React.createElement("div", { className: `custom-picker-content${['MONTH_DAY', 'DAY'].includes(valueType || '') ? ' day-of-month-container' : ''}` }, customPickerArr[valueType || ''].map((item, index) => (React.createElement("div", { key: `day_${item}`, className: clsx('custom-picker-item', {
461
- 'custom-picker-item-selected': getCellSelected(item, index),
462
- }), onClick: () => {
463
- const newDate = getNewDate(item, index);
464
- setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(newDate).format(format) })));
465
- } }, item)))))) : (React.createElement(React.Fragment, null,
466
- React.createElement(Select, { options: newCalculationTypes.map(({ label, value }) => ({
467
- value,
468
- label: t(label),
469
- })), value: option.calculationType.value, onChange: value => {
470
- const calculationType = CALCULATION_TYPES.find(calculationType => calculationType.value === value);
471
- onChangeOption({ calculationType });
472
- } }),
473
- React.createElement(InputNumber, { value: option.value, style: { width: '100%' }, min: 0, showHandler: false, onChange: value => onChangeOption({ value }) }),
474
- React.createElement(Select, { options: newCalculationDates.map(calculationDate => (Object.assign(Object.assign({}, calculationDate), { label: t(calculationDate.label) }))), value: option.calculationDate.value, onChange: value => {
475
- const calculationDate = newCalculationDates.find(calculationDate => calculationDate.value === value);
476
- onChangeOption({ calculationDate });
477
- } }))),
478
- renderErrorMessage()),
479
- renderDropdownFooter()));
480
- };
481
- const cellRender = React.useCallback((current, info) => {
482
- const onChangeDatePicker = (value) => {
483
- try {
484
- setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(value).format(format) })));
485
- }
486
- catch (error) {
487
- handleError(error, {
488
- path: PATH,
489
- name: 'onChangeDatePicker',
490
- args: { value },
491
- });
492
- }
493
- };
494
- return (React.createElement("div", { className: "antsomi-picker-cell-inner", style: { pointerEvents: 'all', width: '100%' }, onClick: e => {
495
- if (info.type === 'time' && typeof current === 'number') {
496
- e.preventDefault();
497
- e.stopPropagation();
498
- let newDate;
499
- switch (info.subType) {
500
- case 'hour':
501
- newDate = dayjs(date).hour(current);
502
- break;
503
- case 'minute':
504
- newDate = dayjs(date).minute(current);
505
- break;
506
- case 'second':
507
- newDate = dayjs(date).second(current);
508
- break;
509
- default:
510
- break;
511
- }
512
- if (newDate)
513
- onChangeDatePicker(newDate);
514
- return;
515
- }
516
- if (info.type === 'decade' ||
517
- (info.type === 'year' && valueType !== 'YEAR') ||
518
- (info.type === 'month' &&
519
- !['MONTH', 'YEAR_MONTH'].includes(valueType || 'YEAR_MONTH_DAY')))
520
- return;
521
- e.preventDefault();
522
- e.stopPropagation();
523
- onChangeDatePicker(current);
524
- } }, getCellRender(current, valueType || 'YEAR_MONTH_DAY', info)));
525
- }, [valueType, format, date]);
526
- return (React.createElement(Space, { direction: "vertical", size: 5 },
527
- !!label && typeof label === 'string' ? (React.createElement(Text, { style: { color: '#666666' } }, label)) : (label),
528
- option.dateType.value === 'fixed' &&
529
- !['WEEK', 'DAY_OF_WEEK', 'MONTH_DAY', 'DAY'].includes(valueType || 'YEAR_MONTH_DAY') ? (React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, allowClear: false, inputReadOnly: true, status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: dayjs(dateDisplay, format)
530
- .format(formatDisplay)
531
- .replace(QUARTER_PLACEHOLDER, 'Quarter ')
532
- .replace(WEEK_PLACEHOLDER, 'Week '), onClick: () => toggleOpenDropdown() })), value: dayjs(date, format), style: {
533
- width: 120,
534
- }, disabledDate: disableDate, format: formatDisplay, showToday: false, popupClassName: clsx('antsomi-picker-dropdown__advanced', {
535
- '--error': errorMessage,
536
- 'hide-picker-header': ['QUARTER', 'MONTH'].includes(valueType || 'YEAR_MONTH_DAY'),
537
- 'only-show-time-picker': ['HOUR', 'MINUTE'].includes(valueType || 'YEAR_MONTH_DAY'),
538
- 'is-minutes-picker': valueType === 'MINUTE',
539
- 'is-hours-picker': valueType === 'HOUR',
540
- }), renderExtraFooter: () => (React.createElement(React.Fragment, null,
541
- React.createElement(DatePickerHeader, null,
542
- renderDropdownLabel(),
543
- renderDateTypeOptions()),
544
- React.createElement(DatePickerFooter, null,
545
- React.createElement("div", { style: { padding: '0 10px' } }, renderErrorMessage()),
546
- renderDropdownFooter()),
547
- React.createElement(Divider, null))), picker: getPickerRender(valueType || 'YEAR_MONTH_DAY'), showTime: getTimePickerRender(valueType || 'YEAR_MONTH_DAY')
548
- ? {
549
- format: getTimePickerRender(valueType || 'YEAR_MONTH_DAY'),
550
- }
551
- : undefined, suffixIcon: React.createElement(CalendarIconWrapper, { style: {
552
- pointerEvents: disabled ? 'none' : 'all',
553
- }, onClick: () => toggleOpenDropdown() },
554
- React.createElement(EventIcon, { width: 20, height: 20, fill: errorMessage ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorError : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.bw10 })), cellRender: cellRender, onOpenChange: () => toggleOpenDropdown() })) : (React.createElement(Dropdown, { disabled: disabled, open: !disabled && isOpen, dropdownRender: dropdownRender, trigger: ['click'], onOpenChange: () => toggleOpenDropdown(), overlayStyle: { width: 'fit-content', minWidth: 'auto' } },
555
- React.createElement(Input, { disabled: disabled, onClick: () => toggleOpenDropdown(), readOnly: true, suffix: React.createElement(CalendarIconWrapper, { style: {
556
- pointerEvents: disabled ? 'none' : 'all',
557
- }, onClick: () => toggleOpenDropdown() },
558
- React.createElement(EventIcon, { width: 19, height: 19 })), style: inputStyle, value: dayjs(dateDisplay, format)
559
- .format(formatDisplay)
560
- .replace(QUARTER_PLACEHOLDER, 'Quarter ')
561
- .replace(WEEK_PLACEHOLDER, 'Week '), status: errorMessage ? 'error' : '' })))));
562
- };
563
- AdvancedPicker.defaultProps = {
564
- label: '',
565
- type: ADVANCED_PICKER_TYPE.START_DATE.value,
566
- operatorKey: 'after',
567
- dateTypeKeysShow: [],
568
- date: dayjs().format(DEFAULT_DATE_FORMAT),
569
- format: DEFAULT_DATE_FORMAT,
570
- inputStyle: {
571
- width: 120,
572
- },
573
- formatInputDisplay: 'MMM DD, YYYY',
574
- valueType: VALUE_TYPES.YEAR_MONTH_DAY,
575
- showTime: true,
576
- disabled: false,
577
- };
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ // Libraries
3
+ import React, { useEffect, useMemo, useState } from 'react';
4
+ import { Tooltip, theme } from 'antd';
5
+ import dayjs from 'dayjs';
6
+ import clsx from 'clsx';
7
+ // Hooks
8
+ import { useDeepCompareEffect } from '../../../../../hooks';
9
+ // Icons
10
+ import Icon from '@antscorp/icons';
11
+ import { EventIcon } from '../../../../icons';
12
+ // Atoms
13
+ import { Input, InputNumber, Divider, Space, Button, Typography, } from '@antscorp/antsomi-ui/es/components/atoms';
14
+ // Molecules
15
+ import { Select, Dropdown, DatePicker } from '@antscorp/antsomi-ui/es/components';
16
+ // Utils
17
+ import { handleError, reorder } from '@antscorp/antsomi-ui/es/utils';
18
+ import { calculationDateAdvanced, getCellRender, getLabelQuarterRange, getPickerRender, getTimePickerRender, } from './utils';
19
+ // Styled
20
+ import { DatePickerCustomInput, DatePickerHeader, DropdownContent, DropdownHeader, DatePickerFooter, DropdownFooter, CalendarIconWrapper, } from './styled';
21
+ // Constants
22
+ import { CALCULATION_DATES, CALCULATION_TYPES, DATE_TYPES, DEFAULT_DATE_FORMAT, VALUE_TYPES, ADVANCED_PICKER_TYPE, WEEK_ARR, QUARTER_PLACEHOLDER, WEEK_PLACEHOLDER, DAY_LABEL_SHORT, HIDE_TIME_LABEL_ARR, MONTH_LABEL_FULL, DAY_OF_MONTH, ANCHOR_LEAP_YEAR, GRANULARITY_MAPPING, } from './constants';
23
+ import { THEME } from '../../../../../constants';
24
+ // Instance
25
+ import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
26
+ const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components/Advanced/DatePickerAdvanced.tsx';
27
+ const { useToken } = theme;
28
+ const { Text } = Typography;
29
+ export const AdvancedPicker = props => {
30
+ var _a, _b;
31
+ // Props
32
+ const { label, inputStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, onUpdatedNewDate, onApply, } = props;
33
+ // Memo
34
+ const newDateTypes = useMemo(() => {
35
+ if (dateTypeKeysShow && dateTypeKeysShow.length) {
36
+ const draftDateTypes = DATE_TYPES.filter(dateType => dateTypeKeysShow.some(key => key === dateType.value));
37
+ return draftDateTypes;
38
+ }
39
+ if (defaultDateTypeKey) {
40
+ const index = DATE_TYPES.findIndex(dateType => dateType.value === defaultDateTypeKey);
41
+ if (index !== -1) {
42
+ return reorder(DATE_TYPES, index, 0);
43
+ }
44
+ }
45
+ return DATE_TYPES;
46
+ }, [dateTypeKeysShow, defaultDateTypeKey]);
47
+ const newCalculationDates = useMemo(() => {
48
+ const granularityKey = GRANULARITY_MAPPING[valueType || 'YEAR_MONTH_DAY'].reverse();
49
+ return CALCULATION_DATES.filter(calculationDate => granularityKey.includes(calculationDate.value));
50
+ }, [valueType]);
51
+ const [formatDisplay, timeFormatDisplay] = useMemo(() => {
52
+ let formatDisplay = '';
53
+ let timeFormatDisplay = '';
54
+ let isStartDate = false;
55
+ // Handle detect day is start or end
56
+ if (operatorKey === 'between') {
57
+ isStartDate = type === 'startDate';
58
+ }
59
+ else {
60
+ isStartDate = operatorKey === 'after';
61
+ }
62
+ switch (valueType) {
63
+ case 'YEAR':
64
+ formatDisplay = 'YYYY';
65
+ break;
66
+ case 'YEAR_QUARTER':
67
+ formatDisplay = `${QUARTER_PLACEHOLDER}Q, YYYY`;
68
+ break;
69
+ case 'YEAR_MONTH':
70
+ formatDisplay = 'MMMM, YYYY';
71
+ break;
72
+ case 'YEAR_WEEK':
73
+ formatDisplay = `${WEEK_PLACEHOLDER}W, YYYY`;
74
+ break;
75
+ case 'YEAR_MONTH_DAY':
76
+ formatDisplay = 'MMMM DD, YYYY';
77
+ break;
78
+ case 'YEAR_MONTH_DAY_HOUR':
79
+ formatDisplay = `MMMM DD, YYYY ${isStartDate ? 'HH:00:00' : 'HH:59:59'}`;
80
+ timeFormatDisplay = isStartDate ? 'HH:00:00' : 'HH:59:59';
81
+ break;
82
+ case 'YEAR_MONTH_DAY_MINUTE':
83
+ formatDisplay = `MMMM DD, YYYY ${isStartDate ? 'HH:mm:00' : 'HH:mm:59'}`;
84
+ timeFormatDisplay = isStartDate ? 'HH:mm:00' : 'HH:mm:59';
85
+ break;
86
+ case 'YEAR_MONTH_DAY_SECOND':
87
+ formatDisplay = 'MMMM DD, YYYY HH:mm:ss';
88
+ timeFormatDisplay = 'HH:mm:ss';
89
+ break;
90
+ case 'QUARTER':
91
+ formatDisplay = `${QUARTER_PLACEHOLDER}Q`;
92
+ break;
93
+ case 'MONTH':
94
+ formatDisplay = 'MMMM';
95
+ break;
96
+ case 'WEEK':
97
+ formatDisplay = `${WEEK_PLACEHOLDER}W`;
98
+ break;
99
+ case 'MONTH_DAY':
100
+ formatDisplay = 'MMMM DD';
101
+ break;
102
+ case 'DAY_OF_WEEK':
103
+ formatDisplay = 'dddd';
104
+ break;
105
+ case 'DAY':
106
+ formatDisplay = 'DD';
107
+ break;
108
+ case 'HOUR':
109
+ formatDisplay = 'HH';
110
+ break;
111
+ case 'MINUTE':
112
+ formatDisplay = 'mm';
113
+ break;
114
+ default:
115
+ formatDisplay = `DD/MM/YYYY - ${isStartDate ? '00:00:00' : '23:59:59'}`;
116
+ timeFormatDisplay = isStartDate ? '00:00:00' : '23:59:59';
117
+ break;
118
+ }
119
+ if (formatInputDisplay) {
120
+ formatDisplay = formatInputDisplay;
121
+ }
122
+ return [formatDisplay, timeFormatDisplay];
123
+ }, [valueType, operatorKey, type, formatInputDisplay]);
124
+ // State
125
+ const [state, setState] = useState({
126
+ isOpen: false,
127
+ option: {
128
+ dateType: newDateTypes[0],
129
+ calculationType: CALCULATION_TYPES[0],
130
+ calculationDate: newCalculationDates[0],
131
+ value: 0,
132
+ },
133
+ optionSelected: {
134
+ dateType: newDateTypes[0],
135
+ calculationType: CALCULATION_TYPES[0],
136
+ calculationDate: newCalculationDates[0],
137
+ value: 0,
138
+ },
139
+ date: dayjs().format(DEFAULT_DATE_FORMAT),
140
+ dateDisplay: dayjs().format(DEFAULT_DATE_FORMAT),
141
+ });
142
+ const { isOpen, option, date, dateDisplay } = state;
143
+ const [currMonthSelected, setCurrMonthSelected] = useState(dayjs(date, format).month());
144
+ const newCalculationTypes = useMemo(() => {
145
+ var _a;
146
+ if (calculationTypeKeysShow && calculationTypeKeysShow.length) {
147
+ const draftCalculationTypes = CALCULATION_TYPES.filter(calculationType => calculationTypeKeysShow.some(key => key === calculationType.value));
148
+ return draftCalculationTypes;
149
+ }
150
+ if (showCalculationTypeCondition && option.dateType) {
151
+ if (showCalculationTypeCondition.dateType[option.dateType.value]) {
152
+ const draftCalculationTypes = (_a = showCalculationTypeCondition.dateType[option.dateType.value]) === null || _a === void 0 ? void 0 : _a.map(dateType => CALCULATION_TYPES.find(({ value }) => value === dateType));
153
+ if (!draftCalculationTypes.find(({ value }) => value === option.calculationType.value)) {
154
+ setState(state => (Object.assign(Object.assign({}, state), { option: Object.assign(Object.assign({}, state.option), { calculationType: draftCalculationTypes[0] }) })));
155
+ }
156
+ return draftCalculationTypes;
157
+ }
158
+ }
159
+ return CALCULATION_TYPES;
160
+ // eslint-disable-next-line react-hooks/exhaustive-deps
161
+ }, [calculationTypeKeysShow, showCalculationTypeCondition, option.dateType]);
162
+ // Hooks
163
+ const { token } = useToken();
164
+ const { t } = i18nInstance;
165
+ // Variables
166
+ const contentStyle = {
167
+ backgroundColor: token.colorBgElevated,
168
+ borderRadius: token.borderRadius,
169
+ boxShadow: token.boxShadowSecondary,
170
+ };
171
+ // Effects
172
+ useDeepCompareEffect(() => {
173
+ try {
174
+ if (isOpen) {
175
+ setState(state => (Object.assign(Object.assign({}, state), { option: state.optionSelected, date: state.dateDisplay })));
176
+ }
177
+ }
178
+ catch (error) {
179
+ handleError(error, {
180
+ path: PATH,
181
+ name: 'useEffect',
182
+ args: {},
183
+ });
184
+ }
185
+ }, [isOpen]);
186
+ useEffect(() => {
187
+ try {
188
+ if (option.dateType.value !== 'fixed') {
189
+ const newDate = calculationDateAdvanced(option.dateType.value, option.calculationType.value, option.calculationDate.value, option.value, format);
190
+ setState(state => (Object.assign(Object.assign({}, state), { date: newDate })));
191
+ }
192
+ }
193
+ catch (error) {
194
+ handleError(error, {
195
+ path: PATH,
196
+ name: 'useEffectWithDependencies[state.option, format]',
197
+ args: { option, format },
198
+ });
199
+ }
200
+ }, [option, format]);
201
+ useEffect(() => {
202
+ try {
203
+ if (propsOption) {
204
+ const { dateType, calculationType, calculationDate, value = 0 } = propsOption || {};
205
+ const newDateTypes = DATE_TYPES;
206
+ const newDateType = newDateTypes.find(dType => dType.value === dateType);
207
+ const newCalculationType = CALCULATION_TYPES.find(calType => calType.value === calculationType);
208
+ const newCalculationDate = newCalculationDates.find(calDate => calDate.value === calculationDate);
209
+ let newDate = '';
210
+ if (newDateType) {
211
+ if (newDateType.value === 'fixed') {
212
+ newDate = dayjs(propsDate, DEFAULT_DATE_FORMAT, true).isValid()
213
+ ? dayjs(propsDate, DEFAULT_DATE_FORMAT).format(format)
214
+ : propsDate;
215
+ setState(state => (Object.assign(Object.assign({}, state), { date: newDate, dateDisplay: newDate, optionSelected: Object.assign(Object.assign({}, option), { dateType: newDateType }) })));
216
+ }
217
+ else {
218
+ if (newCalculationDate && newCalculationType) {
219
+ const date = calculationDateAdvanced(newDateType.value, newCalculationType.value, newCalculationDate.value, value, format);
220
+ setState(state => (Object.assign(Object.assign({}, state), { dateDisplay: date, optionSelected: {
221
+ dateType: newDateType,
222
+ calculationDate: newCalculationDate,
223
+ calculationType: newCalculationType,
224
+ value,
225
+ } })));
226
+ newDate = date;
227
+ }
228
+ }
229
+ }
230
+ if (typeof onUpdatedNewDate === 'function' && propsDate !== newDate) {
231
+ onUpdatedNewDate(newDate);
232
+ }
233
+ }
234
+ }
235
+ catch (error) {
236
+ handleError(error, {
237
+ path: PATH,
238
+ name: 'useEffectPropsOption',
239
+ args: {},
240
+ });
241
+ }
242
+ // eslint-disable-next-line react-hooks/exhaustive-deps
243
+ }, [propsOption, propsDate, format]);
244
+ // Handlers
245
+ const disableDate = current => current > dayjs(disableAfterDate, format) || current < dayjs(disableBeforeDate, format);
246
+ const renderLabel = (date, locale = 'en') => {
247
+ let formatLabel = 'dddd, MMMM DD, YYYY';
248
+ let subLabel = '';
249
+ switch (valueType) {
250
+ case 'YEAR':
251
+ formatLabel = 'YYYY';
252
+ break;
253
+ case 'YEAR_QUARTER':
254
+ formatLabel = `${QUARTER_PLACEHOLDER}Q, YYYY`;
255
+ subLabel = getLabelQuarterRange(date, format || DEFAULT_DATE_FORMAT, locale);
256
+ break;
257
+ case 'YEAR_MONTH':
258
+ formatLabel = 'MMMM, YYYY';
259
+ break;
260
+ case 'YEAR_WEEK': {
261
+ const dayObj = dayjs(date || new Date(), format).locale(locale || 'en');
262
+ formatLabel = `${WEEK_PLACEHOLDER}W, YYYY`;
263
+ subLabel = `${dayjs(dayObj).day(0).format('MMMM DD, YYYY')} - ${dayjs(dayObj)
264
+ .day(6)
265
+ .format('MMMM DD, YYYY')}`;
266
+ break;
267
+ }
268
+ case 'YEAR_MONTH_DAY_HOUR':
269
+ formatLabel = 'dddd, MMMM DD, YYYY';
270
+ break;
271
+ case 'QUARTER':
272
+ formatLabel = `${QUARTER_PLACEHOLDER}Q`;
273
+ break;
274
+ case 'MONTH':
275
+ formatLabel = 'MMMM';
276
+ break;
277
+ case 'WEEK':
278
+ formatLabel = `${WEEK_PLACEHOLDER}W`;
279
+ break;
280
+ case 'MONTH_DAY':
281
+ formatLabel = 'MMMM DD';
282
+ break;
283
+ case 'DAY_OF_WEEK':
284
+ formatLabel = 'dddd';
285
+ break;
286
+ case 'DAY':
287
+ formatLabel = 'DD';
288
+ break;
289
+ case 'HOUR':
290
+ formatLabel = 'HH:00:00';
291
+ break;
292
+ case 'MINUTE':
293
+ formatLabel = '00:mm:00';
294
+ break;
295
+ default:
296
+ break;
297
+ }
298
+ return (React.createElement(React.Fragment, null,
299
+ React.createElement("div", { style: { fontWeight: 'bold' } }, dayjs(date || new Date(), format)
300
+ .locale(locale || 'en')
301
+ .format(formatLabel)
302
+ .replace(QUARTER_PLACEHOLDER, 'Quarter ')
303
+ .replace(WEEK_PLACEHOLDER, 'Week ')),
304
+ subLabel ? React.createElement("div", null, subLabel) : null,
305
+ !HIDE_TIME_LABEL_ARR.includes(valueType || '') && showTime && !subLabel ? (React.createElement("div", { style: { fontWeight: 'bold' } }, dayjs(date || new Date(), format)
306
+ .locale(locale || 'en')
307
+ .format(timeFormatDisplay))) : null));
308
+ };
309
+ const toggleOpenDropdown = (isOpen) => {
310
+ try {
311
+ setState(() => (Object.assign(Object.assign({}, state), { isOpen: isOpen != null ? isOpen : !state.isOpen })));
312
+ }
313
+ catch (error) {
314
+ handleError(error, {
315
+ path: PATH,
316
+ name: 'toggleOpenDropdown',
317
+ args: {},
318
+ });
319
+ }
320
+ };
321
+ const onChangeOption = (params) => {
322
+ try {
323
+ setState(state => (Object.assign(Object.assign({}, state), { option: Object.assign(Object.assign({}, state.option), params) })));
324
+ }
325
+ catch (error) {
326
+ handleError(error, {
327
+ path: PATH,
328
+ name: 'onChangeOption',
329
+ args: {},
330
+ });
331
+ }
332
+ };
333
+ const onClickApply = () => {
334
+ try {
335
+ const draftOption = {
336
+ dateType: option.dateType.value,
337
+ calculationDate: option.dateType.value === 'fixed'
338
+ ? ''
339
+ : option.calculationDate.value,
340
+ calculationType: option.dateType.value === 'fixed'
341
+ ? ''
342
+ : option.calculationType.value,
343
+ value: option.dateType.value === 'fixed' ? 0 : option.value,
344
+ };
345
+ setState(state => (Object.assign(Object.assign({}, state), { optionSelected: option, dateDisplay: date, isOpen: false })));
346
+ if (typeof onApply === 'function') {
347
+ onApply({
348
+ date,
349
+ option: draftOption,
350
+ });
351
+ }
352
+ }
353
+ catch (error) {
354
+ handleError(error, {
355
+ path: PATH,
356
+ name: 'onClickApply',
357
+ args: {},
358
+ });
359
+ }
360
+ };
361
+ const onClickNow = () => {
362
+ try {
363
+ setState(state => (Object.assign(Object.assign({}, state), { date: dayjs().format(format) })));
364
+ }
365
+ catch (error) {
366
+ handleError(error, {
367
+ path: PATH,
368
+ name: 'onClickNow',
369
+ args: {},
370
+ });
371
+ }
372
+ };
373
+ const renderDropdownLabel = () => {
374
+ var _a;
375
+ const title = (_a = Object.values(ADVANCED_PICKER_TYPE).find(({ value }) => value === type)) === null || _a === void 0 ? void 0 : _a.label;
376
+ return (React.createElement("div", { style: { textAlign: 'center' } },
377
+ title && operatorKey === 'between' && (React.createElement(Text, { className: "__title", style: { color: '#666666' } }, t(title))),
378
+ renderLabel(date, 'en')));
379
+ };
380
+ const renderDropdownFooter = () => (React.createElement(React.Fragment, null,
381
+ React.createElement(Divider, null),
382
+ React.createElement(DropdownFooter, null,
383
+ React.createElement(Space, null,
384
+ React.createElement(Button, { type: "primary", onClick: () => onClickApply() }, "Apply"),
385
+ React.createElement(Button, { type: "default", onClick: () => toggleOpenDropdown(false) }, "Cancel")),
386
+ option.dateType.value === 'fixed' && React.createElement(Button, { onClick: () => onClickNow() }, "Now"))));
387
+ const renderDateTypeOptions = () => (React.createElement(Select, { options: newDateTypes.map(dateType => (Object.assign(Object.assign({}, dateType), { label: t(dateType.label) }))), value: option.dateType.value, onChange: value => {
388
+ const dateType = newDateTypes.find(dateType => dateType.value === value);
389
+ toggleOpenDropdown(true);
390
+ setTimeout(() => {
391
+ onChangeOption({ dateType });
392
+ }, 100);
393
+ } }));
394
+ const renderErrorMessage = () => {
395
+ var _a;
396
+ return errorMessage ? (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 5 } },
397
+ React.createElement(Icon, { type: "icon-ants-remove-circle", style: { color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorError } }),
398
+ React.createElement(Text, { type: "danger" }, errorMessage))) : null;
399
+ };
400
+ // NOTE: valueType: 'WEEK'; 'DAY_OF_WEEK'; 'MONTH_DAY'; 'DAY'
401
+ const customPickerArr = useMemo(() => ({
402
+ WEEK: WEEK_ARR,
403
+ DAY_OF_WEEK: DAY_LABEL_SHORT,
404
+ MONTH_DAY: DAY_OF_MONTH[currMonthSelected],
405
+ DAY: DAY_OF_MONTH[0],
406
+ }), [currMonthSelected]);
407
+ const dropdownRender = () => {
408
+ // const customPickerArr = valueType === 'WEEK' ? WEEK_ARR : DAY_LABEL_SHORT;
409
+ const currWeek = dayjs(date, format).isoWeek();
410
+ const currDay = dayjs(date, format).day();
411
+ const currDayOfMonth = dayjs(date, format).date();
412
+ const currMonth = dayjs(date, format).month();
413
+ const getCellSelected = (item, index) => {
414
+ switch (valueType) {
415
+ case 'WEEK':
416
+ return currWeek === item;
417
+ case 'DAY_OF_WEEK':
418
+ return index === currDay;
419
+ case 'MONTH_DAY':
420
+ return item === currDayOfMonth && currMonth === currMonthSelected;
421
+ case 'DAY':
422
+ return item === currDayOfMonth;
423
+ default:
424
+ return false;
425
+ }
426
+ };
427
+ const getNewDate = (item, index) => {
428
+ switch (valueType) {
429
+ case 'WEEK':
430
+ return dayjs(date).isoWeek(item);
431
+ case 'DAY_OF_WEEK':
432
+ return dayjs(date).day(index);
433
+ case 'MONTH_DAY':
434
+ return dayjs(date).year(ANCHOR_LEAP_YEAR).month(currMonthSelected).date(item);
435
+ case 'DAY':
436
+ return dayjs(date).year(ANCHOR_LEAP_YEAR).month(0).date(item);
437
+ default:
438
+ return dayjs(date);
439
+ }
440
+ };
441
+ return (React.createElement("div", { style: contentStyle },
442
+ React.createElement(DropdownHeader, { className: "dropdown-header" }, renderDropdownLabel()),
443
+ React.createElement(DropdownContent, { className: "dropdown-content" },
444
+ renderDateTypeOptions(),
445
+ option.dateType.value === 'fixed' ? (React.createElement(React.Fragment, null,
446
+ valueType === 'MONTH_DAY' ? (React.createElement("div", { className: "month-controller" },
447
+ React.createElement(Icon, { type: "icon-ants-angle-left", style: { fontSize: '14px', color: '#D2D2D2' }, onClick: () => setCurrMonthSelected(prev => (prev === 0 ? 11 : prev - 1)) }),
448
+ MONTH_LABEL_FULL[currMonthSelected],
449
+ React.createElement(Icon, { type: "icon-ants-angle-right", style: { fontSize: '14px', color: '#D2D2D2' }, onClick: () => setCurrMonthSelected(prev => (prev === 11 ? 0 : prev + 1)) }))) : null,
450
+ React.createElement("div", { className: `custom-picker-content${['MONTH_DAY', 'DAY'].includes(valueType || '') ? ' day-of-month-container' : ''}` }, customPickerArr[valueType || ''].map((item, index) => (React.createElement("div", { key: `day_${item}`, className: clsx('custom-picker-item', {
451
+ 'custom-picker-item-selected': getCellSelected(item, index),
452
+ }), onClick: () => {
453
+ const newDate = getNewDate(item, index);
454
+ setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(newDate).format(format) })));
455
+ } }, item)))))) : (React.createElement(React.Fragment, null,
456
+ React.createElement(Select, { options: newCalculationTypes.map(({ label, value }) => ({
457
+ value,
458
+ label: t(label),
459
+ })), value: option.calculationType.value, onChange: value => {
460
+ const calculationType = CALCULATION_TYPES.find(calculationType => calculationType.value === value);
461
+ onChangeOption({ calculationType });
462
+ } }),
463
+ React.createElement(InputNumber, { value: option.value, style: { width: '100%' }, min: 0, showHandler: false, onChange: value => onChangeOption({ value }) }),
464
+ React.createElement(Select, { options: newCalculationDates.map(calculationDate => (Object.assign(Object.assign({}, calculationDate), { label: t(calculationDate.label) }))), value: option.calculationDate.value, onChange: value => {
465
+ const calculationDate = newCalculationDates.find(calculationDate => calculationDate.value === value);
466
+ onChangeOption({ calculationDate });
467
+ } }))),
468
+ renderErrorMessage()),
469
+ renderDropdownFooter()));
470
+ };
471
+ const cellRender = React.useCallback((current, info) => {
472
+ const onChangeDatePicker = (value) => {
473
+ try {
474
+ setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(value).format(format) })));
475
+ }
476
+ catch (error) {
477
+ handleError(error, {
478
+ path: PATH,
479
+ name: 'onChangeDatePicker',
480
+ args: { value },
481
+ });
482
+ }
483
+ };
484
+ return (React.createElement("div", { className: "antsomi-picker-cell-inner", style: { pointerEvents: 'all', width: '100%' }, onClick: e => {
485
+ if (info.type === 'time' && typeof current === 'number') {
486
+ e.preventDefault();
487
+ e.stopPropagation();
488
+ let newDate;
489
+ switch (info.subType) {
490
+ case 'hour':
491
+ newDate = dayjs(date).hour(current);
492
+ break;
493
+ case 'minute':
494
+ newDate = dayjs(date).minute(current);
495
+ break;
496
+ case 'second':
497
+ newDate = dayjs(date).second(current);
498
+ break;
499
+ default:
500
+ break;
501
+ }
502
+ if (newDate)
503
+ onChangeDatePicker(newDate);
504
+ return;
505
+ }
506
+ if (info.type === 'decade' ||
507
+ (info.type === 'year' && valueType !== 'YEAR') ||
508
+ (info.type === 'month' &&
509
+ !['MONTH', 'YEAR_MONTH'].includes(valueType || 'YEAR_MONTH_DAY')))
510
+ return;
511
+ e.preventDefault();
512
+ e.stopPropagation();
513
+ onChangeDatePicker(current);
514
+ } }, getCellRender(current, valueType || 'YEAR_MONTH_DAY', info)));
515
+ }, [valueType, format, date]);
516
+ return (React.createElement(Space, { direction: "vertical", size: 5, className: "antsomi-advanced-picker-container" },
517
+ !!label && typeof label === 'string' ? (React.createElement(Text, { style: { color: '#666666' } }, label)) : (label),
518
+ option.dateType.value === 'fixed' &&
519
+ !['WEEK', 'DAY_OF_WEEK', 'MONTH_DAY', 'DAY'].includes(valueType || 'YEAR_MONTH_DAY') ? (React.createElement(Tooltip, { title: dayjs(dateDisplay, format)
520
+ .format(formatDisplay)
521
+ .replace(QUARTER_PLACEHOLDER, 'Quarter ')
522
+ .replace(WEEK_PLACEHOLDER, 'Week ') },
523
+ React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, allowClear: false, inputReadOnly: true, status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: dayjs(dateDisplay, format)
524
+ .format(formatDisplay)
525
+ .replace(QUARTER_PLACEHOLDER, 'Quarter ')
526
+ .replace(WEEK_PLACEHOLDER, 'Week '), onClick: () => toggleOpenDropdown() })), value: dayjs(date, format), style: {
527
+ width: 120,
528
+ }, disabledDate: disableDate, format: formatDisplay, showToday: false, popupClassName: clsx('antsomi-picker-dropdown__advanced', {
529
+ '--error': errorMessage,
530
+ 'hide-picker-header': ['QUARTER', 'MONTH'].includes(valueType || 'YEAR_MONTH_DAY'),
531
+ 'only-show-time-picker': ['HOUR', 'MINUTE'].includes(valueType || 'YEAR_MONTH_DAY'),
532
+ 'is-minutes-picker': valueType === 'MINUTE',
533
+ 'is-hours-picker': valueType === 'HOUR',
534
+ }), renderExtraFooter: () => (React.createElement(React.Fragment, null,
535
+ React.createElement(DatePickerHeader, null,
536
+ renderDropdownLabel(),
537
+ renderDateTypeOptions()),
538
+ React.createElement(DatePickerFooter, null,
539
+ React.createElement("div", { style: { padding: '0 10px' } }, renderErrorMessage()),
540
+ renderDropdownFooter()),
541
+ React.createElement(Divider, null))), picker: getPickerRender(valueType || 'YEAR_MONTH_DAY'), showTime: getTimePickerRender(valueType || 'YEAR_MONTH_DAY')
542
+ ? {
543
+ format: getTimePickerRender(valueType || 'YEAR_MONTH_DAY'),
544
+ }
545
+ : undefined, suffixIcon: React.createElement(CalendarIconWrapper, { style: {
546
+ pointerEvents: disabled ? 'none' : 'all',
547
+ }, onClick: () => toggleOpenDropdown() },
548
+ React.createElement(EventIcon, { width: 20, height: 20, fill: errorMessage ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorError : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.bw10 })), cellRender: cellRender, onOpenChange: () => toggleOpenDropdown() }))) : (React.createElement(Dropdown, { disabled: disabled, open: !disabled && isOpen, dropdownRender: dropdownRender, trigger: ['click'], onOpenChange: () => toggleOpenDropdown(), overlayStyle: { width: 'fit-content', minWidth: 'auto' } },
549
+ React.createElement(Tooltip, { title: dayjs(dateDisplay, format)
550
+ .format(formatDisplay)
551
+ .replace(QUARTER_PLACEHOLDER, 'Quarter ')
552
+ .replace(WEEK_PLACEHOLDER, 'Week ') },
553
+ React.createElement(Input, { disabled: disabled, onClick: () => toggleOpenDropdown(), readOnly: true, suffix: React.createElement(CalendarIconWrapper, { style: {
554
+ pointerEvents: disabled ? 'none' : 'all',
555
+ }, onClick: () => toggleOpenDropdown() },
556
+ React.createElement(EventIcon, { width: 19, height: 19 })), style: inputStyle, value: dayjs(dateDisplay, format)
557
+ .format(formatDisplay)
558
+ .replace(QUARTER_PLACEHOLDER, 'Quarter ')
559
+ .replace(WEEK_PLACEHOLDER, 'Week '), status: errorMessage ? 'error' : '' }))))));
560
+ };
561
+ AdvancedPicker.defaultProps = {
562
+ label: '',
563
+ type: ADVANCED_PICKER_TYPE.START_DATE.value,
564
+ operatorKey: 'after',
565
+ dateTypeKeysShow: [],
566
+ date: dayjs().format(DEFAULT_DATE_FORMAT),
567
+ format: DEFAULT_DATE_FORMAT,
568
+ inputStyle: {
569
+ width: 120,
570
+ },
571
+ formatInputDisplay: 'MMM DD, YYYY',
572
+ valueType: VALUE_TYPES.YEAR_MONTH_DAY,
573
+ showTime: true,
574
+ disabled: false,
575
+ };