@antscorp/antsomi-ui 1.3.4 → 1.3.5-beta.2

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 (500) hide show
  1. package/es/assets/css/main.scss +6 -0
  2. package/es/assets/images/iphone-top-bar.png +0 -0
  3. package/es/assets/images/iphone.png +0 -0
  4. package/es/assets/images/stars_slider.png +0 -0
  5. package/es/components/atoms/Empty/Empty.d.ts +6 -5
  6. package/es/components/atoms/Empty/Empty.js +7 -1
  7. package/es/components/atoms/Flex/Flex.d.ts +2 -0
  8. package/es/components/atoms/Flex/Flex.js +1 -0
  9. package/es/components/atoms/Flex/index.d.ts +1 -0
  10. package/es/components/atoms/Flex/index.js +1 -0
  11. package/es/components/atoms/Input/Input.d.ts +14 -3
  12. package/es/components/atoms/Input/Input.js +7 -3
  13. package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -0
  14. package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -0
  15. package/es/components/atoms/InputDynamic/InputDynamic.d.ts +10 -0
  16. package/es/components/atoms/InputDynamic/InputDynamic.js +516 -0
  17. package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -0
  18. package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -0
  19. package/es/components/atoms/InputDynamic/constants.d.ts +71 -0
  20. package/es/components/atoms/InputDynamic/constants.js +71 -0
  21. package/es/components/atoms/InputDynamic/index.d.ts +2 -0
  22. package/es/components/atoms/InputDynamic/index.js +1 -0
  23. package/es/components/atoms/InputDynamic/styled.d.ts +13 -0
  24. package/es/components/atoms/InputDynamic/styled.js +293 -0
  25. package/es/components/atoms/InputDynamic/types.d.ts +116 -0
  26. package/es/components/atoms/InputDynamic/types.js +1 -0
  27. package/es/components/atoms/InputDynamic/utils.d.ts +30 -0
  28. package/es/components/atoms/InputDynamic/utils.js +874 -0
  29. package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -0
  30. package/es/components/atoms/MobileFrame/MobileFrame.js +22 -0
  31. package/es/components/atoms/MobileFrame/constants.d.ts +4 -0
  32. package/es/components/atoms/MobileFrame/constants.js +4 -0
  33. package/es/components/atoms/MobileFrame/index.d.ts +2 -0
  34. package/es/components/atoms/MobileFrame/index.js +1 -0
  35. package/es/components/atoms/MobileFrame/styled.d.ts +3 -0
  36. package/es/components/atoms/MobileFrame/styled.js +33 -0
  37. package/es/components/atoms/Pagination/index.d.ts +1 -0
  38. package/es/components/atoms/Popover/styled.d.ts +4 -0
  39. package/es/components/atoms/Popover/styled.js +5 -0
  40. package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -0
  41. package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -0
  42. package/es/components/atoms/PreviewTabs/index.d.ts +2 -0
  43. package/es/components/atoms/PreviewTabs/index.js +1 -0
  44. package/es/components/atoms/PreviewTabs/styled.d.ts +6 -0
  45. package/es/components/atoms/PreviewTabs/styled.js +79 -0
  46. package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
  47. package/es/components/atoms/RateV2/RateV2.js +73 -0
  48. package/es/components/atoms/RateV2/index.d.ts +1 -0
  49. package/es/components/atoms/RateV2/index.js +1 -0
  50. package/es/components/atoms/RequiredLabel/index.d.ts +1 -0
  51. package/es/components/atoms/RequiredLabel/index.js +4 -3
  52. package/es/components/atoms/SlideBar/SlideBar.d.ts +34 -0
  53. package/es/components/atoms/SlideBar/SlideBar.js +283 -0
  54. package/es/components/atoms/SlideBar/constants.d.ts +10 -0
  55. package/es/components/atoms/SlideBar/constants.js +10 -0
  56. package/es/components/atoms/SlideBar/index.d.ts +1 -0
  57. package/es/components/atoms/SlideBar/index.js +1 -0
  58. package/es/components/atoms/SlideBar/styled.d.ts +20 -0
  59. package/es/components/atoms/SlideBar/styled.js +136 -0
  60. package/es/components/atoms/Slider/index.d.ts +2 -1
  61. package/es/components/atoms/Slider/index.js +14 -16
  62. package/es/components/atoms/SliderV2/index.d.ts +6 -0
  63. package/es/components/atoms/SliderV2/index.js +21 -0
  64. package/es/components/atoms/Spin/Spin.d.ts +2 -1
  65. package/es/components/atoms/index.d.ts +10 -0
  66. package/es/components/atoms/index.js +8 -0
  67. package/es/components/common/ConfigProvider/ConfigProvider.d.ts +2 -0
  68. package/es/components/common/ConfigProvider/ConfigProvider.js +14 -0
  69. package/es/components/common/ConfigProvider/GlobalStyle.js +310 -27
  70. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  71. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  72. package/es/components/icons/BugIcon.d.ts +2 -1
  73. package/es/components/icons/CameraIcon.d.ts +2 -1
  74. package/es/components/icons/CaptureIcon.d.ts +2 -1
  75. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  76. package/es/components/icons/CloseIcon.d.ts +2 -1
  77. package/es/components/icons/CommentIcon.d.ts +2 -1
  78. package/es/components/icons/EventIcon.d.ts +2 -1
  79. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  80. package/es/components/icons/GPTIcon.d.ts +2 -1
  81. package/es/components/icons/GPTIconV2.d.ts +2 -1
  82. package/es/components/icons/GPTIconV3.d.ts +2 -1
  83. package/es/components/icons/HighlightIcon.d.ts +2 -1
  84. package/es/components/icons/IdeaIcon.d.ts +2 -1
  85. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  86. package/es/components/icons/MuteIcon.d.ts +2 -1
  87. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  88. package/es/components/icons/PauseIcon.d.ts +2 -1
  89. package/es/components/icons/PlaneIcon.d.ts +2 -1
  90. package/es/components/icons/RequestIcon.d.ts +2 -1
  91. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  92. package/es/components/icons/UserIcon.d.ts +2 -1
  93. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  94. package/es/components/icons/WarningIcon.d.ts +2 -1
  95. package/es/components/index.d.ts +1 -0
  96. package/es/components/index.js +1 -0
  97. package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
  98. package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1248 -0
  99. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -0
  100. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -0
  101. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -0
  102. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -0
  103. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -0
  104. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +100 -0
  105. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -0
  106. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -0
  107. package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -0
  108. package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -0
  109. package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -0
  110. package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -0
  111. package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -0
  112. package/es/components/molecules/AddDynamicContent/components/index.js +3 -0
  113. package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -0
  114. package/es/components/molecules/AddDynamicContent/constants.js +152 -0
  115. package/es/components/molecules/AddDynamicContent/currencies.json +1523 -0
  116. package/es/components/molecules/AddDynamicContent/index.d.ts +2 -0
  117. package/es/components/molecules/AddDynamicContent/index.js +2 -0
  118. package/es/components/molecules/AddDynamicContent/styled.d.ts +12 -0
  119. package/es/components/molecules/AddDynamicContent/styled.js +30 -0
  120. package/es/components/molecules/AddDynamicContent/types.d.ts +13 -0
  121. package/es/components/molecules/AddDynamicContent/types.js +1 -0
  122. package/es/components/molecules/AddDynamicContent/utils.d.ts +41 -0
  123. package/es/components/molecules/AddDynamicContent/utils.js +396 -0
  124. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
  125. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
  126. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
  127. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  128. package/es/components/molecules/Collapse/Collapse.js +9 -0
  129. package/es/components/molecules/ColorPicker/CustomPicker/index.js +9 -18
  130. package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +5 -1
  131. package/es/components/molecules/ColorPicker/CustomPicker/styled.js +14 -3
  132. package/es/components/molecules/ColorPicker/index.js +3 -3
  133. package/es/components/molecules/ColorSetting/index.js +3 -3
  134. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +7 -3
  135. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +212 -205
  136. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +78 -25
  137. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +145 -22
  138. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +49 -5
  139. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
  140. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +25 -1
  141. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +167 -40
  142. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +3 -1
  143. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +21 -9
  144. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +1 -0
  145. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +1 -0
  146. package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +1 -0
  147. package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.d.ts +13 -0
  148. package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.js +87 -0
  149. package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.d.ts +6 -0
  150. package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.js +12 -0
  151. package/es/components/molecules/Drawer/Drawer.d.ts +5 -1
  152. package/es/components/molecules/Drawer/Drawer.js +3 -1
  153. package/es/components/molecules/Drawer/index.d.ts +1 -0
  154. package/es/components/molecules/EditorScript/EditorScript.d.ts +14 -0
  155. package/es/components/molecules/EditorScript/EditorScript.js +89 -0
  156. package/es/components/molecules/EditorScript/index.d.ts +1 -0
  157. package/es/components/molecules/EditorScript/index.js +1 -0
  158. package/es/components/molecules/EditorScript/styled.d.ts +1 -0
  159. package/es/components/molecules/EditorScript/styled.js +3 -0
  160. package/es/components/molecules/FontFamilySelect/constants.d.ts +307 -0
  161. package/es/components/molecules/FontFamilySelect/constants.js +257 -0
  162. package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
  163. package/es/components/molecules/FontFamilySelect/index.js +53 -0
  164. package/es/components/molecules/FontSetting/constants.d.ts +3 -0
  165. package/es/components/molecules/FontSetting/constants.js +22 -0
  166. package/es/components/molecules/FontSetting/index.d.ts +24 -0
  167. package/es/components/molecules/FontSetting/index.js +54 -0
  168. package/es/components/molecules/FontSetting/types.d.ts +22 -0
  169. package/es/components/molecules/FontSetting/types.js +1 -0
  170. package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
  171. package/es/components/molecules/FontWeightSelect/constants.js +11 -0
  172. package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
  173. package/es/components/molecules/FontWeightSelect/index.js +39 -0
  174. package/es/components/molecules/Form/Form.d.ts +1 -0
  175. package/es/components/molecules/Form/Form.js +1 -0
  176. package/es/components/molecules/Form/index.d.ts +1 -0
  177. package/es/components/molecules/Form/index.js +1 -0
  178. package/es/components/molecules/GradientSetting/index.d.ts +19 -2
  179. package/es/components/molecules/GradientSetting/index.js +52 -30
  180. package/es/components/molecules/GradientSetting/styled.d.ts +1 -0
  181. package/es/components/molecules/GradientSetting/styled.js +59 -0
  182. package/es/components/molecules/InputNumber/index.js +2 -2
  183. package/es/components/molecules/Modal/index.d.ts +1 -0
  184. package/es/components/molecules/Modal/styled.d.ts +1 -1
  185. package/es/components/molecules/Modal/styled.js +2 -0
  186. package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -0
  187. package/es/components/molecules/ModalV2/ModalV2.js +26 -0
  188. package/es/components/molecules/ModalV2/index.d.ts +2 -0
  189. package/es/components/molecules/ModalV2/index.js +1 -0
  190. package/es/components/molecules/ModalV2/styled.d.ts +7 -0
  191. package/es/components/molecules/ModalV2/styled.js +22 -0
  192. package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -0
  193. package/es/components/molecules/PreviewModal/PreviewModal.js +30 -0
  194. package/es/components/molecules/PreviewModal/index.d.ts +2 -0
  195. package/es/components/molecules/PreviewModal/index.js +1 -0
  196. package/es/components/molecules/PreviewModal/styled.d.ts +4 -0
  197. package/es/components/molecules/PreviewModal/styled.js +39 -0
  198. package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
  199. package/es/components/molecules/ResizeGrid/ResizeGrid.js +728 -0
  200. package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
  201. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -0
  202. package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
  203. package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
  204. package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
  205. package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -0
  206. package/es/components/molecules/ResizeGrid/constant.d.ts +35 -0
  207. package/es/components/molecules/ResizeGrid/constant.js +111 -0
  208. package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
  209. package/es/components/molecules/ResizeGrid/index.js +1 -0
  210. package/es/components/molecules/ResizeGrid/styled.d.ts +10 -0
  211. package/es/components/molecules/ResizeGrid/styled.js +56 -0
  212. package/es/components/molecules/ResizeGrid/types.d.ts +147 -0
  213. package/es/components/molecules/ResizeGrid/types.js +1 -0
  214. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +13 -0
  215. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
  216. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +18 -0
  217. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +110 -0
  218. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -0
  219. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -0
  220. package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -0
  221. package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -0
  222. package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -0
  223. package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -0
  224. package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -0
  225. package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -0
  226. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -0
  227. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -0
  228. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -0
  229. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -0
  230. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -0
  231. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -0
  232. package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -0
  233. package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -0
  234. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -0
  235. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
  236. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -0
  237. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -0
  238. package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -0
  239. package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -0
  240. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -0
  241. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -0
  242. package/es/components/molecules/RichMenu/index.d.ts +3 -0
  243. package/es/components/molecules/RichMenu/index.js +3 -0
  244. package/es/components/molecules/Select/Select.d.ts +3 -0
  245. package/es/components/molecules/Select/Select.js +23 -2
  246. package/es/components/molecules/Select/Test.d.ts +2 -1
  247. package/es/components/molecules/SettingWrapper/index.d.ts +1 -2
  248. package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
  249. package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
  250. package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -0
  251. package/es/components/molecules/ShareAccess/ShareAccess.js +23 -0
  252. package/es/components/molecules/ShareAccess/actions.d.ts +16 -0
  253. package/es/components/molecules/ShareAccess/actions.js +12 -0
  254. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -0
  255. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +78 -0
  256. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -0
  257. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -0
  258. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -0
  259. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -0
  260. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -0
  261. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +19 -0
  262. package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -0
  263. package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -0
  264. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -0
  265. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -0
  266. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -0
  267. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -0
  268. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.d.ts +0 -0
  269. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -0
  270. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -0
  271. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -0
  272. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -0
  273. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +97 -0
  274. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -0
  275. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -0
  276. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -0
  277. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -0
  278. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -0
  279. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -0
  280. package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -0
  281. package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -0
  282. package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -0
  283. package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -0
  284. package/es/components/molecules/ShareAccess/components/index.d.ts +1 -0
  285. package/es/components/molecules/ShareAccess/components/index.js +1 -0
  286. package/es/components/molecules/ShareAccess/constants.d.ts +67 -0
  287. package/es/components/molecules/ShareAccess/constants.js +85 -0
  288. package/es/components/molecules/ShareAccess/context.d.ts +4 -0
  289. package/es/components/molecules/ShareAccess/context.js +3 -0
  290. package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -0
  291. package/es/components/molecules/ShareAccess/hooks/index.js +1 -0
  292. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +18 -0
  293. package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -0
  294. package/es/components/molecules/ShareAccess/index.d.ts +4 -0
  295. package/es/components/molecules/ShareAccess/index.js +4 -0
  296. package/es/components/molecules/ShareAccess/reducer.d.ts +2 -0
  297. package/es/components/molecules/ShareAccess/reducer.js +19 -0
  298. package/es/components/molecules/ShareAccess/types.d.ts +54 -0
  299. package/es/components/molecules/ShareAccess/types.js +1 -0
  300. package/es/components/molecules/ShareAccess/utils.d.ts +38 -0
  301. package/es/components/molecules/ShareAccess/utils.js +57 -0
  302. package/es/components/molecules/TextDecorationSelect/constants.d.ts +19 -0
  303. package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
  304. package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
  305. package/es/components/molecules/TextDecorationSelect/index.js +45 -0
  306. package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
  307. package/es/components/molecules/TextTransformSelect/constants.js +19 -0
  308. package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
  309. package/es/components/molecules/TextTransformSelect/index.js +39 -0
  310. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +2 -2
  311. package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
  312. package/es/components/molecules/UploadImage/MediaThumb.d.ts +8 -0
  313. package/es/components/molecules/UploadImage/MediaThumb.js +15 -0
  314. package/es/components/molecules/UploadImage/VideoThumbnail.d.ts +4 -0
  315. package/es/components/molecules/UploadImage/VideoThumbnail.js +43 -0
  316. package/es/components/molecules/UploadImage/index.d.ts +6 -2
  317. package/es/components/molecules/UploadImage/index.js +105 -85
  318. package/es/components/molecules/UploadImage/styled.js +0 -4
  319. package/es/components/molecules/UploadImage/utils.d.ts +3 -0
  320. package/es/components/molecules/UploadImage/utils.js +24 -0
  321. package/es/components/molecules/index.d.ts +18 -3
  322. package/es/components/molecules/index.js +15 -3
  323. package/es/components/organism/GenerativeInsights/constants.d.ts +1 -0
  324. package/es/components/organism/GenerativeInsights/constants.js +1 -0
  325. package/es/components/organism/GenerativeInsights/index.d.ts +11 -0
  326. package/es/components/organism/GenerativeInsights/index.js +57 -0
  327. package/es/components/organism/GenerativeInsights/styled.d.ts +12 -0
  328. package/es/components/organism/GenerativeInsights/styled.js +66 -0
  329. package/es/components/organism/GenerativeInsights/utils.d.ts +13 -0
  330. package/es/components/organism/GenerativeInsights/utils.js +50 -0
  331. package/es/components/organism/index.d.ts +1 -0
  332. package/es/components/organism/index.js +1 -0
  333. package/es/components/template/TemplateListing/components/BlankTemplate/index.d.ts +3 -0
  334. package/es/components/template/TemplateListing/components/BlankTemplate/index.js +17 -0
  335. package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +2 -0
  336. package/es/components/template/TemplateListing/components/BlankTemplate/styled.js +24 -0
  337. package/es/components/template/TemplateListing/components/CategoryListing/index.d.ts +3 -0
  338. package/es/components/template/TemplateListing/components/CategoryListing/index.js +103 -0
  339. package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +5 -0
  340. package/es/components/template/TemplateListing/components/CategoryListing/styled.js +55 -0
  341. package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +10 -0
  342. package/es/components/template/TemplateListing/components/CategoryListing/types.js +1 -0
  343. package/es/components/template/TemplateListing/components/TemplateItem/index.d.ts +3 -0
  344. package/es/components/template/TemplateListing/components/TemplateItem/index.js +53 -0
  345. package/es/components/template/TemplateListing/components/TemplateItem/styled.d.ts +1 -0
  346. package/es/components/template/TemplateListing/components/TemplateItem/styled.js +82 -0
  347. package/es/components/template/TemplateListing/components/index.d.ts +3 -0
  348. package/es/components/template/TemplateListing/components/index.js +3 -0
  349. package/es/components/template/TemplateListing/constants/defaultProps.d.ts +8 -0
  350. package/es/components/template/TemplateListing/constants/defaultProps.js +20 -0
  351. package/es/components/template/TemplateListing/constants/index.d.ts +2 -0
  352. package/es/components/template/TemplateListing/constants/index.js +2 -0
  353. package/es/components/template/TemplateListing/constants/mockData.d.ts +2 -0
  354. package/es/components/template/TemplateListing/constants/mockData.js +101 -0
  355. package/es/components/template/TemplateListing/index.d.ts +3 -0
  356. package/es/components/template/TemplateListing/index.js +22 -0
  357. package/es/components/template/TemplateListing/styled/index.d.ts +2 -0
  358. package/es/components/template/TemplateListing/styled/index.js +16 -0
  359. package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +8 -0
  360. package/es/components/template/TemplateListing/types/BlankTemplate.js +1 -0
  361. package/es/components/template/TemplateListing/types/CategoryListing.d.ts +16 -0
  362. package/es/components/template/TemplateListing/types/CategoryListing.js +1 -0
  363. package/es/components/template/TemplateListing/types/TemplateItem.d.ts +14 -0
  364. package/es/components/template/TemplateListing/types/TemplateItem.js +1 -0
  365. package/es/components/template/TemplateListing/types/TemplateListing.d.ts +15 -0
  366. package/es/components/template/TemplateListing/types/TemplateListing.js +1 -0
  367. package/es/components/template/TemplateListing/types/index.d.ts +4 -0
  368. package/es/components/template/TemplateListing/types/index.js +4 -0
  369. package/es/components/template/index.d.ts +2 -0
  370. package/es/components/template/index.js +2 -0
  371. package/es/constants/index.d.ts +1 -0
  372. package/es/constants/index.js +1 -0
  373. package/es/constants/queries.d.ts +14 -0
  374. package/es/constants/queries.js +21 -0
  375. package/es/constants/richMenu.d.ts +19 -0
  376. package/es/constants/richMenu.js +19 -0
  377. package/es/constants/storybook.d.ts +7 -1
  378. package/es/constants/storybook.js +12 -0
  379. package/es/constants/theme.js +30 -3
  380. package/es/hooks/index.d.ts +1 -0
  381. package/es/hooks/index.js +1 -0
  382. package/es/hooks/useDebounceCallback.d.ts +1 -0
  383. package/es/hooks/useDebounceCallback.js +5 -0
  384. package/es/hooks/useDebounceV2.d.ts +1 -0
  385. package/es/hooks/useDebounceV2.js +11 -0
  386. package/es/hooks/useDeepCompareEffect.d.ts +1 -0
  387. package/es/hooks/useDeepCompareEffect.js +21 -0
  388. package/es/hooks/useDeepCompareMemo.d.ts +2 -0
  389. package/es/hooks/useDeepCompareMemo.js +21 -0
  390. package/es/hooks/useOutsideClick.d.ts +4 -0
  391. package/es/hooks/useOutsideClick.js +18 -0
  392. package/es/hooks/usePrevious.d.ts +2 -0
  393. package/es/hooks/usePrevious.js +9 -0
  394. package/es/locales/en/translation.json +167 -1
  395. package/es/locales/i18n.d.ts +167 -0
  396. package/es/locales/translations.d.ts +166 -0
  397. package/es/locales/vi/translation.json +2 -1
  398. package/es/models/BusinessObject.d.ts +116 -0
  399. package/es/models/BusinessObject.js +113 -0
  400. package/es/models/Currency.d.ts +9 -0
  401. package/es/models/Currency.js +10 -0
  402. package/es/models/CustomFunction.d.ts +19 -0
  403. package/es/models/CustomFunction.js +25 -0
  404. package/es/models/DynamicContentAttribute.d.ts +34 -0
  405. package/es/models/DynamicContentAttribute.js +9 -0
  406. package/es/models/EventTrackingAttribute.d.ts +11 -0
  407. package/es/models/EventTrackingAttribute.js +13 -0
  408. package/es/models/PromotionPool.d.ts +11 -0
  409. package/es/models/PromotionPool.js +12 -0
  410. package/es/models/{SavedImage.d.ts → SavedMedia.d.ts} +7 -5
  411. package/es/models/{SavedImage.js → SavedMedia.js} +7 -3
  412. package/es/models/Upload.d.ts +2 -0
  413. package/es/models/Upload.js +3 -0
  414. package/es/queries/BusinessObject/index.d.ts +6 -0
  415. package/es/queries/BusinessObject/index.js +6 -0
  416. package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -0
  417. package/es/queries/BusinessObject/useGetListAllEvents.js +14 -0
  418. package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -0
  419. package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -0
  420. package/es/queries/BusinessObject/useGetListBO.d.ts +6 -0
  421. package/es/queries/BusinessObject/useGetListBO.js +19 -0
  422. package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -0
  423. package/es/queries/BusinessObject/useGetListEventAttr.js +15 -0
  424. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -0
  425. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -0
  426. package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -0
  427. package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -0
  428. package/es/queries/CustomFunction/index.d.ts +2 -0
  429. package/es/queries/CustomFunction/index.js +2 -0
  430. package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -0
  431. package/es/queries/CustomFunction/useCustomFunction.js +53 -0
  432. package/es/queries/DynamicContentAttribute/index.d.ts +1 -0
  433. package/es/queries/DynamicContentAttribute/index.js +1 -0
  434. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -0
  435. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -0
  436. package/es/queries/PromotionPool/index.d.ts +1 -0
  437. package/es/queries/PromotionPool/index.js +1 -0
  438. package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -0
  439. package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -0
  440. package/es/queries/ThirdParty/index.d.ts +1 -0
  441. package/es/queries/ThirdParty/index.js +1 -0
  442. package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -0
  443. package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -0
  444. package/es/queries/configs.d.ts +4 -0
  445. package/es/queries/configs.js +13 -0
  446. package/es/queries/index.d.ts +6 -0
  447. package/es/queries/index.js +6 -0
  448. package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -0
  449. package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -0
  450. package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -0
  451. package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -0
  452. package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -0
  453. package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -0
  454. package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -0
  455. package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -0
  456. package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -0
  457. package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -0
  458. package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +5 -5
  459. package/es/services/MediaTemplateDesign/UploadFile/index.js +37 -19
  460. package/es/services/ThirParty/index.d.ts +8 -0
  461. package/es/services/ThirParty/index.js +26 -0
  462. package/es/services/index.d.ts +14 -5
  463. package/es/services/index.js +45 -1
  464. package/es/test.d.ts +2 -1
  465. package/es/test.js +258 -80
  466. package/es/types/index.d.ts +17 -0
  467. package/es/types/index.js +2 -1
  468. package/es/types/richMenu.d.ts +214 -0
  469. package/es/types/richMenu.js +1 -0
  470. package/es/types/variables.d.ts +2 -0
  471. package/es/types/variables.js +1 -0
  472. package/es/utils/common.d.ts +4 -0
  473. package/es/utils/common.js +21 -0
  474. package/es/utils/handleError.d.ts +32 -2
  475. package/es/utils/handleError.js +42 -4
  476. package/package.json +27 -9
  477. package/dist/0173b5993573afa04880.woff +0 -0
  478. package/dist/0dfb9214dfd945cd7290.png +0 -1
  479. package/dist/2883cad25a2b4e87ce5f.eot +0 -0
  480. package/dist/4f54a37971347e3d7122.png +0 -1
  481. package/dist/574b7bee0563a9fe9a29.png +0 -1
  482. package/dist/6b586356e837581204dc.svg +0 -1
  483. package/dist/72eec5c1c786b45a667f.ttf +0 -0
  484. package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
  485. package/dist/dbc405edd6e0806efbc9.svg +0 -1
  486. package/dist/e32f09119052a55cce3c.png +0 -1
  487. package/dist/e3851b9384a984c6fdb5.png +0 -1
  488. package/dist/index.js +0 -2
  489. package/dist/index.js.LICENSE.txt +0 -69
  490. package/dist/main.css +0 -68
  491. package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
  492. package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
  493. package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
  494. package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
  495. package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
  496. package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
  497. package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
  498. package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
  499. package/dist/public/icons/placeholder-image.png +0 -0
  500. package/dist/public/icons/transparent.svg +0 -1
@@ -0,0 +1,12 @@
1
+ import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
+ export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
+ type DisplayFormatProps = {
4
+ onSettingsChange: (settings: any) => void;
5
+ formatSettings: any;
6
+ displayFormatType: TDisplayFormat;
7
+ dynamicContentType?: string;
8
+ infos: PayloadInfo;
9
+ url: string;
10
+ };
11
+ declare const DisplayFormat: (props: DisplayFormatProps) => JSX.Element | null;
12
+ export default DisplayFormat;
@@ -0,0 +1,25 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import FormatDatetime from '../FormatDatetime/FormatDatetime';
5
+ import FormatNumber from '../FormatNumber/FormatNumber';
6
+ const DisplayFormat = (props) => {
7
+ const { infos, url } = props;
8
+ const renderFormatSetting = () => {
9
+ switch (props.displayFormatType) {
10
+ case 'number':
11
+ case 'percentage':
12
+ case 'currency': {
13
+ return (React.createElement(FormatNumber, Object.assign({}, props.formatSettings, { onSettingsChange: props.onSettingsChange, type: props.displayFormatType, url: url, infos: infos })));
14
+ }
15
+ case 'datetime': {
16
+ return (React.createElement(FormatDatetime, Object.assign({}, props.formatSettings, { onSettingsChange: props.onSettingsChange, type: props.displayFormatType, dynamicContentType: props.dynamicContentType })));
17
+ }
18
+ default: {
19
+ return null;
20
+ }
21
+ }
22
+ };
23
+ return renderFormatSetting();
24
+ };
25
+ export default DisplayFormat;
@@ -0,0 +1,3 @@
1
+ import DisplayFormat from './DisplayFormat';
2
+ export * from './DisplayFormat';
3
+ export default DisplayFormat;
@@ -0,0 +1,3 @@
1
+ import DisplayFormat from './DisplayFormat';
2
+ export * from './DisplayFormat';
3
+ export default DisplayFormat;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import dayjs from 'dayjs';
3
+ export type TDatetimeFormatSetting = {
4
+ hasDateFormat: boolean;
5
+ hasTimeFormat: boolean;
6
+ dateParseFormat: 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD';
7
+ timeParseFormat: '12hour' | '24hour' | string;
8
+ dateParseOption: 'short' | 'medium' | 'long' | undefined;
9
+ timeParseOption: 'short' | 'medium' | 'long' | undefined;
10
+ language?: string;
11
+ type?: 'datetime';
12
+ };
13
+ export type FormatDatetimeProps = {
14
+ onSettingsChange?: (settingValues: TDatetimeFormatSetting) => void;
15
+ dynamicContentType?: string;
16
+ } & TDatetimeFormatSetting;
17
+ export declare const dateExample: dayjs.Dayjs;
18
+ declare const FormatDatetime: ({ hasDateFormat, hasTimeFormat, dateParseFormat, timeParseFormat, dateParseOption, timeParseOption, onSettingsChange, dynamicContentType, }: FormatDatetimeProps) => React.JSX.Element;
19
+ export default FormatDatetime;
@@ -0,0 +1,100 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ // Libraries
3
+ import React from 'react';
4
+ import dayjs from 'dayjs';
5
+ // Locales
6
+ import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
7
+ import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
8
+ // Atoms
9
+ import { Checkbox, Radio, Space } from '@antscorp/antsomi-ui/es/components/atoms';
10
+ // Molecules
11
+ import { RadioGroup } from '../../../RadioGroup';
12
+ import { Select } from '../../../Select';
13
+ // Utils
14
+ import customParseFormat from 'dayjs/plugin/customParseFormat';
15
+ import { transformDateFormat } from '../../utils';
16
+ dayjs.extend(customParseFormat);
17
+ export const dateExample = dayjs('2020-04-15 18:23:11');
18
+ const FormatDatetime = ({ hasDateFormat, hasTimeFormat, dateParseFormat, timeParseFormat, dateParseOption, timeParseOption, onSettingsChange, dynamicContentType, }) => {
19
+ const { t, language: portalLanguage } = i18nInstance;
20
+ const dfSettings = {
21
+ hasDateFormat,
22
+ hasTimeFormat,
23
+ dateParseFormat,
24
+ timeParseFormat,
25
+ dateParseOption,
26
+ timeParseOption,
27
+ };
28
+ const datetimeEx = dayjs(dateExample).locale(portalLanguage);
29
+ const timezone = Math.round(dayjs(dateExample).utcOffset() / 60);
30
+ const prefix = timezone > 0 ? '+' : '';
31
+ const gmtString = `GMT ${prefix}${timezone}`;
32
+ const handleChange = (updatedSettings) => {
33
+ if (onSettingsChange) {
34
+ onSettingsChange(Object.assign(Object.assign({}, updatedSettings), { type: 'datetime', language: portalLanguage }));
35
+ }
36
+ };
37
+ const labelHours = dynamicContentType !== 'custom' ? 'HH:MM:SS' : '';
38
+ return (React.createElement("div", null,
39
+ React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '16px' } },
40
+ React.createElement(Checkbox, { checked: hasDateFormat, disabled: hasDateFormat && !hasTimeFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { hasDateFormat: e.target.checked })) }, t(translations.dynamicContent.modal.label.datimeDisplayFormat.dateDF)),
41
+ React.createElement(Select, { style: { width: 190 }, disabled: !hasDateFormat, defaultValue: dateParseFormat, options: [
42
+ {
43
+ label: `MM/DD/YYYY ${labelHours}`,
44
+ value: 'MM/DD/YYYY',
45
+ },
46
+ {
47
+ label: `DD/MM/YYYY ${labelHours}`,
48
+ value: 'DD/MM/YYYY',
49
+ },
50
+ {
51
+ label: `YYYY/MM/DD ${labelHours}`,
52
+ value: 'YYYY/MM/DD',
53
+ },
54
+ ], onChange: value => handleChange(Object.assign(Object.assign({}, dfSettings), { dateParseFormat: value })) })),
55
+ React.createElement("div", { style: { marginTop: '8px' } },
56
+ React.createElement(RadioGroup, { disabled: !hasDateFormat, defaultValue: dateParseOption, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { dateParseOption: e.target.value })) },
57
+ React.createElement(Space, { direction: "vertical", size: 4, style: { marginLeft: '20px' } },
58
+ React.createElement(Radio, { value: "short" },
59
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.short),
60
+ ' - ',
61
+ datetimeEx.format(transformDateFormat(dateParseFormat, 'short'))),
62
+ React.createElement(Radio, { value: "medium" },
63
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.medium),
64
+ ' - ',
65
+ datetimeEx.format(transformDateFormat(dateParseFormat, 'medium'))),
66
+ React.createElement(Radio, { value: "long" },
67
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.long),
68
+ ' - ',
69
+ datetimeEx.format(transformDateFormat(dateParseFormat, 'long')))))),
70
+ React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '16px', marginTop: 16 } },
71
+ React.createElement(Checkbox, { checked: hasTimeFormat, disabled: hasTimeFormat && !hasDateFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { hasTimeFormat: e.target.checked })) }, t(translations.dynamicContent.modal.label.datimeDisplayFormat.timeDF)),
72
+ React.createElement(Select, { style: { width: 190 }, disabled: !hasTimeFormat, defaultValue: timeParseFormat, options: [
73
+ {
74
+ label: 'AM/PM',
75
+ value: '12hour',
76
+ },
77
+ {
78
+ label: t(translations.dynamicContent.modal.label.datimeDisplayFormat.use24hour),
79
+ value: '24hour',
80
+ },
81
+ ], onChange: value => handleChange(Object.assign(Object.assign({}, dfSettings), { timeParseFormat: value })) })),
82
+ React.createElement("div", { style: { marginTop: '8px' } },
83
+ React.createElement(RadioGroup, { defaultValue: timeParseOption, disabled: !hasTimeFormat, onChange: e => handleChange(Object.assign(Object.assign({}, dfSettings), { timeParseOption: e.target.value })) },
84
+ React.createElement(Space, { direction: "vertical", size: 4, style: { marginLeft: '20px' } },
85
+ React.createElement(Radio, { value: "short" },
86
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.short),
87
+ ' - ',
88
+ datetimeEx.format(timeParseFormat === '12hour' ? 'h:mm A' : 'H:mm')),
89
+ React.createElement(Radio, { value: "medium" },
90
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.medium),
91
+ ' - ',
92
+ datetimeEx.format(timeParseFormat === '12hour' ? 'h:mm:ss A' : 'H:mm:ss')),
93
+ React.createElement(Radio, { value: "long" },
94
+ t(translations.dynamicContent.modal.label.datimeDisplayFormat.long),
95
+ ' - ',
96
+ datetimeEx.format(timeParseFormat === '12hour'
97
+ ? `h:mm:ss A [${gmtString}]`
98
+ : `H:mm:ss [${gmtString}]`)))))));
99
+ };
100
+ export default FormatDatetime;
@@ -0,0 +1 @@
1
+ export * from './FormatDatetime';
@@ -0,0 +1 @@
1
+ export * from './FormatDatetime';
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { TDisplayFormat } from '../DisplayFormat';
3
+ import { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
4
+ declare const groupingOptions: {
5
+ readonly COMMA: {
6
+ readonly index: 0;
7
+ readonly label: ",";
8
+ readonly value: ",";
9
+ };
10
+ readonly DOT: {
11
+ readonly index: 1;
12
+ readonly label: ".";
13
+ readonly value: ".";
14
+ };
15
+ readonly NONE: {
16
+ readonly index: 2;
17
+ readonly label: "none";
18
+ readonly value: "none";
19
+ };
20
+ };
21
+ declare const decimalOptions: {
22
+ readonly COMMA: {
23
+ readonly index: 0;
24
+ readonly label: ",";
25
+ readonly value: ",";
26
+ };
27
+ readonly DOT: {
28
+ readonly index: 1;
29
+ readonly label: ".";
30
+ readonly value: ".";
31
+ };
32
+ };
33
+ export type TGroupingSeparator = (typeof groupingOptions)[keyof typeof groupingOptions]['value'];
34
+ export type TDecimalSeparator = (typeof decimalOptions)[keyof typeof decimalOptions]['value'];
35
+ export type TNumberFormatSettings = {
36
+ decimalPlaces: number;
37
+ grouping: TGroupingSeparator;
38
+ decimal: TDecimalSeparator;
39
+ isCompact: boolean;
40
+ currencyCode: string;
41
+ prefixType: 'symbol' | 'code';
42
+ type?: TDisplayFormat;
43
+ };
44
+ type FormatNumberProps = {
45
+ onSettingsChange?: (settingValues: TNumberFormatSettings) => void;
46
+ type: TDisplayFormat;
47
+ } & TNumberFormatSettings & {
48
+ infos: PayloadInfo;
49
+ url: string;
50
+ };
51
+ declare const FormatNumber: (props: FormatNumberProps) => React.JSX.Element;
52
+ export default FormatNumber;
@@ -0,0 +1,132 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ // Libraries
11
+ import React, { useEffect, useMemo, useState } from 'react';
12
+ // Components
13
+ import { Radio } from '@antscorp/antsomi-ui/es/components/atoms';
14
+ import { Col, Row, Tooltip, Form, Select, Checkbox } from 'antd';
15
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
16
+ import { ButtonCustom } from '../../styled';
17
+ // Json
18
+ import Currencies from '../../currencies.json';
19
+ // Constants
20
+ import { ATTRIBUTE_NUMBERIC_FORMAT_OPTION } from '../../constants';
21
+ // Services
22
+ import { getCurrencyList } from '@antscorp/antsomi-ui/es/services/MediaTemplateDesign/ListCurrency';
23
+ // Locales
24
+ import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
25
+ import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
26
+ const groupingOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.GROUPING_SEPARATOR;
27
+ const decimalOptions = ATTRIBUTE_NUMBERIC_FORMAT_OPTION.DECIMAL_SEPARATOR;
28
+ const FormatNumber = (props) => {
29
+ const { t, language } = i18nInstance;
30
+ const { onSettingsChange, type: displayType, infos, url } = props;
31
+ const { currencyCode, decimalPlaces, grouping, decimal, prefixType, isCompact } = props;
32
+ const settingValues = {
33
+ decimalPlaces,
34
+ grouping,
35
+ decimal,
36
+ isCompact,
37
+ currencyCode,
38
+ prefixType,
39
+ };
40
+ const [listCurrencyOptions, setListCurrencyOptions] = useState([]);
41
+ const [isLoadingCurrencyOptions, setIsLoadingCurrencyOptions] = useState(true);
42
+ const onChangeSettingsHandle = (settingValues) => {
43
+ if (onSettingsChange) {
44
+ onSettingsChange(Object.assign(Object.assign({}, settingValues), { type: displayType }));
45
+ }
46
+ };
47
+ useEffect(() => {
48
+ (() => __awaiter(void 0, void 0, void 0, function* () {
49
+ // Regex for getting text between the last brackets (with brakets) of line
50
+ const regex = /\(([^)]*)\)[^(]*$/;
51
+ if (listCurrencyOptions.length) {
52
+ setListCurrencyOptions(prevOptions => prevOptions.map(currencyOption => {
53
+ var _a;
54
+ // setLabel: Dollal Mỹ (USD) or Dollal Mỹ ($)
55
+ currencyOption.label =
56
+ prefixType === 'symbol'
57
+ ? currencyOption.label.replace(regex, `(${(_a = Currencies[currencyOption.value]) === null || _a === void 0 ? void 0 : _a.symbol})`)
58
+ : currencyOption.label.replace(regex, `(${currencyOption.value})`);
59
+ return currencyOption;
60
+ }));
61
+ }
62
+ else {
63
+ setIsLoadingCurrencyOptions(true);
64
+ try {
65
+ const data = yield getCurrencyList({ lang: language, url }, infos);
66
+ const currencies = data.reduce((accumulate, currency) => {
67
+ var _a;
68
+ if (Currencies[currency.code]) {
69
+ accumulate.push({
70
+ value: currency.code,
71
+ // setLabel: Dollal Mỹ (USD) or Dollal Mỹ ($)
72
+ label: prefixType === 'symbol'
73
+ ? `${currency.name.replace(regex, '')} (${(_a = Currencies[currency.code]) === null || _a === void 0 ? void 0 : _a.symbol})`
74
+ : `${currency.name.replace(regex, '')} (${currency.code})`,
75
+ });
76
+ }
77
+ else {
78
+ // console.log('library not found ', currency.code + ' - ' + currency.name);
79
+ }
80
+ return accumulate;
81
+ }, []);
82
+ setListCurrencyOptions(currencies);
83
+ }
84
+ catch (err) {
85
+ setListCurrencyOptions([]);
86
+ }
87
+ finally {
88
+ setIsLoadingCurrencyOptions(false);
89
+ }
90
+ }
91
+ }))();
92
+ // eslint-disable-next-line react-hooks/exhaustive-deps
93
+ }, [prefixType]);
94
+ const listGroupingSeparatorOptions = useMemo(() => Object.values(groupingOptions)
95
+ .sort((a, b) => a.index - b.index)
96
+ .map(grouping => (Object.assign(Object.assign({}, grouping), (grouping.value === decimal && { disabled: true })))), [decimal]);
97
+ const listDecimalSeparatorOptions = useMemo(() => Object.values(decimalOptions)
98
+ .sort((a, b) => a.index - b.index)
99
+ .map(decimal => (Object.assign(Object.assign({}, decimal), (decimal.value === grouping && { disabled: true })))), [grouping]);
100
+ return (React.createElement(Form, { style: { width: '100%', fontSize: '12px' }, labelAlign: "left" },
101
+ displayType === 'currency' && (React.createElement(React.Fragment, null,
102
+ React.createElement(Form.Item, { labelCol: { span: 8 }, wrapperCol: { span: 16 }, label: t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currency), colon: false },
103
+ React.createElement(Radio.Group, { value: prefixType, onChange: ({ target: { value } }) => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { prefixType: value })) },
104
+ React.createElement(Radio, { style: { fontSize: 12 }, value: "code" }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencyCode)),
105
+ React.createElement(Radio, { style: { fontSize: 12 }, value: "symbol" }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.currencySymbol)))),
106
+ React.createElement(Form.Item, { label: " ", labelCol: { span: 8 }, wrapperCol: { span: 16 }, colon: false },
107
+ React.createElement(Select, { style: { height: 28 }, disabled: isLoadingCurrencyOptions, options: listCurrencyOptions, value: currencyCode, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { currencyCode: value })), showSearch: true })))),
108
+ React.createElement(Form.Item, null,
109
+ React.createElement(Checkbox, { style: { fontSize: 12 }, checked: isCompact, onChange: ({ target: { checked } }) => {
110
+ onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { isCompact: checked }));
111
+ } }, t(translations.dynamicContent.modal.label.formNumberDisplayFormat.compact))),
112
+ React.createElement(Form.Item, { label: `${t(translations.dynamicContent.modal.label.formNumberDisplayFormat.decimalPlace)} (${decimalPlaces})`, style: { marginBottom: 12 }, colon: false },
113
+ React.createElement("div", { style: { display: 'flex', marginLeft: 40 } },
114
+ React.createElement(ButtonCustom, { disabled: decimalPlaces <= 0, onClick: () => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimalPlaces: decimalPlaces - 1 })) }, '<< .0'),
115
+ React.createElement(ButtonCustom, { onClick: () => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimalPlaces: decimalPlaces + 1 })) }, '.00 >>'))),
116
+ React.createElement(Row, { gutter: 15 },
117
+ React.createElement(Col, { span: 12 },
118
+ React.createElement(Form.Item, { label: React.createElement("span", null,
119
+ t(translations.dynamicContent.modal.label.formNumberDisplayFormat.grouping),
120
+ React.createElement(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
121
+ .groupingIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 } },
122
+ React.createElement(FontAwesomeIcon, { icon: ['fas', 'info-circle'] }))), colon: false },
123
+ React.createElement(Select, { style: { height: 28 }, value: grouping, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { grouping: value })), options: listGroupingSeparatorOptions }))),
124
+ React.createElement(Col, { span: 12 },
125
+ React.createElement(Form.Item, { label: React.createElement("span", null,
126
+ t(translations.dynamicContent.modal.label.formNumberDisplayFormat.decimal),
127
+ React.createElement(Tooltip, { placement: "top", title: t(translations.dynamicContent.modal.label.formNumberDisplayFormat
128
+ .decimalIconTooltipTitle), style: { marginLeft: 4, opacity: 0.4 } },
129
+ React.createElement(FontAwesomeIcon, { icon: ['fas', 'info-circle'] }))), colon: false },
130
+ React.createElement(Select, { style: { height: 28 }, value: decimal, onChange: value => onChangeSettingsHandle(Object.assign(Object.assign({}, settingValues), { decimal: value })), options: listDecimalSeparatorOptions }))))));
131
+ };
132
+ export default FormatNumber;
@@ -0,0 +1 @@
1
+ export * from './FormatNumber';
@@ -0,0 +1 @@
1
+ export * from './FormatNumber';
@@ -0,0 +1,3 @@
1
+ export * from './FormatNumber';
2
+ export * from './DisplayFormat';
3
+ export * from './FormatDatetime';
@@ -0,0 +1,3 @@
1
+ export * from './FormatNumber';
2
+ export * from './DisplayFormat';
3
+ export * from './FormatDatetime';
@@ -0,0 +1,101 @@
1
+ import { TDataType } from './types';
2
+ export declare const DYNAMIC_CONTENT_SETTING_KEY: {
3
+ EVENT: string;
4
+ INDEX: string;
5
+ ATTRIBUTE: string;
6
+ DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS: string;
7
+ DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS: string;
8
+ DISPLAY_FORMAT_TYPE: string;
9
+ DYNAMIC_CONTENT_TYPE: string;
10
+ PROMOTION_POOL: string;
11
+ SOURCE: string;
12
+ FUNCTION: string;
13
+ PERNAME: string;
14
+ SAVE_AS_TEMPLATE: string;
15
+ DATA_TYPE: string;
16
+ };
17
+ export declare const DYNAMIC_CONTENT_TYPE_KEY: {
18
+ readonly BO_SETTINGS: "bo-settings";
19
+ readonly CUSTOMER_ATTRIBUTE: "customer-attribute";
20
+ readonly EVENT_ATTRIBUTE: "event-attribute";
21
+ readonly PROMOTION_CODE: "promotion-code";
22
+ readonly VISITOR_ATTRIBUTE: "visitor-attribute";
23
+ readonly CUSTOM_FUNCTION: "custom";
24
+ };
25
+ export declare const DYNAMIC_CONTENT_TYPE: {
26
+ [key: string]: {
27
+ index: number;
28
+ label: string;
29
+ value: string;
30
+ };
31
+ };
32
+ export declare const DYNAMIC_CONTENT_ATTR_DF_TYPE: {
33
+ label: string;
34
+ value: string;
35
+ dataType: TDataType;
36
+ }[];
37
+ export declare const DATA_TYPE: {
38
+ [key: string]: {
39
+ index: number;
40
+ label: string;
41
+ value: string;
42
+ };
43
+ };
44
+ export declare const ATTRIBUTE_STATUS: {
45
+ 4: {
46
+ value: number;
47
+ label: string;
48
+ errorMessage: string;
49
+ };
50
+ DELETE: {
51
+ value: number;
52
+ label: string;
53
+ errorMessage: string;
54
+ };
55
+ };
56
+ export declare const ATTRIBUTE_TYPE: {
57
+ ITEM: number;
58
+ };
59
+ export declare const BO_STATUS: {
60
+ 4: {
61
+ value: number;
62
+ label: string;
63
+ errorMessage: string;
64
+ };
65
+ DELETE: {
66
+ value: number;
67
+ label: string;
68
+ errorMessage: string;
69
+ };
70
+ };
71
+ export declare const ATTRIBUTE_NUMBERIC_FORMAT_OPTION: {
72
+ readonly DECIMAL_SEPARATOR: {
73
+ readonly COMMA: {
74
+ readonly index: 0;
75
+ readonly label: ",";
76
+ readonly value: ",";
77
+ };
78
+ readonly DOT: {
79
+ readonly index: 1;
80
+ readonly label: ".";
81
+ readonly value: ".";
82
+ };
83
+ };
84
+ readonly GROUPING_SEPARATOR: {
85
+ readonly COMMA: {
86
+ readonly index: 0;
87
+ readonly label: ",";
88
+ readonly value: ",";
89
+ };
90
+ readonly DOT: {
91
+ readonly index: 1;
92
+ readonly label: ".";
93
+ readonly value: ".";
94
+ };
95
+ readonly NONE: {
96
+ readonly index: 2;
97
+ readonly label: "none";
98
+ readonly value: "none";
99
+ };
100
+ };
101
+ };
@@ -0,0 +1,152 @@
1
+ export const DYNAMIC_CONTENT_SETTING_KEY = {
2
+ EVENT: 'event',
3
+ INDEX: 'index',
4
+ ATTRIBUTE: 'attribute',
5
+ DYNAMIC_CONTENT_NUMBERIC_ATTR_FORMAT_SETTINGS: 'numberFormatSettings',
6
+ DYNAMIC_CONTENT_DATETIME_ATTR_FORMAT_SETTINGS: 'datetimeFormatSettings',
7
+ DISPLAY_FORMAT_TYPE: 'dfType',
8
+ DYNAMIC_CONTENT_TYPE: 'type',
9
+ PROMOTION_POOL: 'pool',
10
+ SOURCE: 'source',
11
+ FUNCTION: 'customFunction',
12
+ PERNAME: 'templateName',
13
+ SAVE_AS_TEMPLATE: 'saveAsTemplate',
14
+ DATA_TYPE: 'dataType',
15
+ };
16
+ export const DYNAMIC_CONTENT_TYPE_KEY = {
17
+ BO_SETTINGS: 'bo-settings',
18
+ CUSTOMER_ATTRIBUTE: 'customer-attribute',
19
+ EVENT_ATTRIBUTE: 'event-attribute',
20
+ PROMOTION_CODE: 'promotion-code',
21
+ VISITOR_ATTRIBUTE: 'visitor-attribute',
22
+ CUSTOM_FUNCTION: 'custom',
23
+ };
24
+ export const DYNAMIC_CONTENT_TYPE = {
25
+ BO_SETTINGS: {
26
+ index: 4,
27
+ label: '',
28
+ value: DYNAMIC_CONTENT_TYPE_KEY.BO_SETTINGS,
29
+ },
30
+ CUSTOMER_ATTRIBUTE: {
31
+ index: 1,
32
+ label: 'Customer Attribute',
33
+ value: DYNAMIC_CONTENT_TYPE_KEY.CUSTOMER_ATTRIBUTE,
34
+ },
35
+ EVENT_ATTRIBUTE: {
36
+ index: 2,
37
+ label: 'Event Attribute',
38
+ value: DYNAMIC_CONTENT_TYPE_KEY.EVENT_ATTRIBUTE,
39
+ },
40
+ PROMOTION_CODE: {
41
+ index: 3,
42
+ label: 'Promotion Code',
43
+ value: DYNAMIC_CONTENT_TYPE_KEY.PROMOTION_CODE,
44
+ },
45
+ VISITOR_ATTRIBUTE: {
46
+ index: 0,
47
+ label: 'Visitor Attribute',
48
+ value: DYNAMIC_CONTENT_TYPE_KEY.VISITOR_ATTRIBUTE,
49
+ },
50
+ };
51
+ export const DYNAMIC_CONTENT_ATTR_DF_TYPE = [
52
+ {
53
+ label: 'Number',
54
+ value: 'number',
55
+ dataType: 'number',
56
+ },
57
+ {
58
+ label: 'Percentage',
59
+ value: 'percentage',
60
+ dataType: 'number',
61
+ },
62
+ {
63
+ label: 'Currency',
64
+ value: 'currency',
65
+ dataType: 'number',
66
+ },
67
+ {
68
+ label: 'Datetime',
69
+ value: 'datetime',
70
+ dataType: 'datetime',
71
+ },
72
+ {
73
+ label: 'Raw string',
74
+ value: 'raw_string',
75
+ dataType: 'string',
76
+ },
77
+ ];
78
+ export const DATA_TYPE = {
79
+ NUMBER: {
80
+ index: 0,
81
+ label: 'Number',
82
+ value: 'number',
83
+ },
84
+ DATE_TIME: {
85
+ index: 1,
86
+ label: 'Datetime',
87
+ value: 'datetime',
88
+ },
89
+ STRING: {
90
+ index: 2,
91
+ label: 'String',
92
+ value: 'string',
93
+ },
94
+ };
95
+ export const ATTRIBUTE_STATUS = {
96
+ 4: {
97
+ value: 4,
98
+ label: 'Archive',
99
+ errorMessage: 'This attribute is not available',
100
+ },
101
+ DELETE: {
102
+ value: 3,
103
+ label: 'Delete',
104
+ errorMessage: 'This attribute does not exist',
105
+ },
106
+ };
107
+ export const ATTRIBUTE_TYPE = {
108
+ ITEM: 2,
109
+ };
110
+ export const BO_STATUS = {
111
+ 4: {
112
+ value: 4,
113
+ label: 'Archive',
114
+ errorMessage: 'This BO is archive',
115
+ },
116
+ DELETE: {
117
+ value: 3,
118
+ label: 'Delete',
119
+ errorMessage: 'This BO does not exist',
120
+ },
121
+ };
122
+ export const ATTRIBUTE_NUMBERIC_FORMAT_OPTION = {
123
+ DECIMAL_SEPARATOR: {
124
+ COMMA: {
125
+ index: 0,
126
+ label: ',',
127
+ value: ',',
128
+ },
129
+ DOT: {
130
+ index: 1,
131
+ label: '.',
132
+ value: '.',
133
+ },
134
+ },
135
+ GROUPING_SEPARATOR: {
136
+ COMMA: {
137
+ index: 0,
138
+ label: ',',
139
+ value: ',',
140
+ },
141
+ DOT: {
142
+ index: 1,
143
+ label: '.',
144
+ value: '.',
145
+ },
146
+ NONE: {
147
+ index: 2,
148
+ label: 'none',
149
+ value: 'none',
150
+ },
151
+ },
152
+ };