@antscorp/antsomi-ui 1.3.3-beta.7 → 1.3.3-beta.71

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 (378) hide show
  1. package/es/assets/images/iphone-top-bar.png +0 -0
  2. package/es/assets/images/iphone.png +0 -0
  3. package/es/assets/images/stars_slider.png +0 -0
  4. package/es/components/atoms/Button/index.d.ts +1 -8
  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 +484 -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 +113 -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 +872 -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/Popover.d.ts +1 -1
  39. package/es/components/atoms/Popover/styled.d.ts +1 -1
  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/Progress/Progress.d.ts +1 -1
  47. package/es/components/atoms/Radio/index.d.ts +3 -3
  48. package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
  49. package/es/components/atoms/RateV2/RateV2.js +73 -0
  50. package/es/components/atoms/RateV2/index.d.ts +1 -0
  51. package/es/components/atoms/RateV2/index.js +1 -0
  52. package/es/components/atoms/RequiredLabel/index.d.ts +1 -0
  53. package/es/components/atoms/RequiredLabel/index.js +4 -3
  54. package/es/components/atoms/Slider/index.d.ts +2 -1
  55. package/es/components/atoms/Slider/index.js +7 -14
  56. package/es/components/atoms/SliderV2/index.d.ts +6 -0
  57. package/es/components/atoms/SliderV2/index.js +21 -0
  58. package/es/components/atoms/Space/Space.d.ts +1 -1
  59. package/es/components/atoms/Spin/Spin.d.ts +2 -1
  60. package/es/components/atoms/Spin/styled.d.ts +1 -1
  61. package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
  62. package/es/components/atoms/index.d.ts +8 -0
  63. package/es/components/atoms/index.js +6 -0
  64. package/es/components/common/ConfigProvider/ConfigProvider.js +6 -0
  65. package/es/components/common/ConfigProvider/GlobalStyle.js +281 -27
  66. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  67. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  68. package/es/components/icons/BugIcon.d.ts +2 -1
  69. package/es/components/icons/CameraIcon.d.ts +2 -1
  70. package/es/components/icons/CaptureIcon.d.ts +2 -1
  71. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  72. package/es/components/icons/CloseIcon.d.ts +2 -1
  73. package/es/components/icons/CommentIcon.d.ts +2 -1
  74. package/es/components/icons/EventIcon.d.ts +2 -1
  75. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  76. package/es/components/icons/GPTIcon.d.ts +2 -1
  77. package/es/components/icons/GPTIconV2.d.ts +2 -1
  78. package/es/components/icons/GPTIconV3.d.ts +2 -1
  79. package/es/components/icons/HighlightIcon.d.ts +2 -1
  80. package/es/components/icons/IdeaIcon.d.ts +2 -1
  81. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  82. package/es/components/icons/MuteIcon.d.ts +2 -1
  83. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  84. package/es/components/icons/PauseIcon.d.ts +2 -1
  85. package/es/components/icons/PlaneIcon.d.ts +2 -1
  86. package/es/components/icons/RequestIcon.d.ts +2 -1
  87. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  88. package/es/components/icons/UserIcon.d.ts +2 -1
  89. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  90. package/es/components/icons/WarningIcon.d.ts +2 -1
  91. package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
  92. package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1248 -0
  93. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -0
  94. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -0
  95. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -0
  96. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -0
  97. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -0
  98. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +100 -0
  99. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -0
  100. package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -0
  101. package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -0
  102. package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -0
  103. package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -0
  104. package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -0
  105. package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -0
  106. package/es/components/molecules/AddDynamicContent/components/index.js +3 -0
  107. package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -0
  108. package/es/components/molecules/AddDynamicContent/constants.js +152 -0
  109. package/es/components/molecules/AddDynamicContent/currencies.json +1523 -0
  110. package/es/components/molecules/AddDynamicContent/index.d.ts +2 -0
  111. package/es/components/molecules/AddDynamicContent/index.js +2 -0
  112. package/es/components/molecules/AddDynamicContent/styled.d.ts +12 -0
  113. package/es/components/molecules/AddDynamicContent/styled.js +30 -0
  114. package/es/components/molecules/AddDynamicContent/types.d.ts +13 -0
  115. package/es/components/molecules/AddDynamicContent/types.js +1 -0
  116. package/es/components/molecules/AddDynamicContent/utils.d.ts +41 -0
  117. package/es/components/molecules/AddDynamicContent/utils.js +396 -0
  118. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
  119. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
  120. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
  121. package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
  122. package/es/components/molecules/Collapse/Collapse.js +9 -0
  123. package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
  124. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +2 -2
  125. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +260 -113
  126. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +66 -25
  127. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +109 -0
  128. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +48 -4
  129. package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
  130. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +20 -0
  131. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +90 -1
  132. package/es/components/molecules/Drawer/Drawer.d.ts +5 -1
  133. package/es/components/molecules/Drawer/Drawer.js +3 -1
  134. package/es/components/molecules/Drawer/index.d.ts +1 -0
  135. package/es/components/molecules/EditorScript/EditorScript.d.ts +14 -0
  136. package/es/components/molecules/EditorScript/EditorScript.js +89 -0
  137. package/es/components/molecules/EditorScript/index.d.ts +1 -0
  138. package/es/components/molecules/EditorScript/index.js +1 -0
  139. package/es/components/molecules/EditorScript/styled.d.ts +1 -0
  140. package/es/components/molecules/EditorScript/styled.js +3 -0
  141. package/es/components/molecules/Form/Form.d.ts +1 -0
  142. package/es/components/molecules/Form/Form.js +1 -0
  143. package/es/components/molecules/Form/index.d.ts +1 -0
  144. package/es/components/molecules/Form/index.js +1 -0
  145. package/es/components/molecules/IconSelection/styled.d.ts +1 -8
  146. package/es/components/molecules/Modal/Modal.d.ts +2 -2
  147. package/es/components/molecules/Modal/index.d.ts +1 -0
  148. package/es/components/molecules/Modal/styled.d.ts +1 -1
  149. package/es/components/molecules/Modal/styled.js +2 -0
  150. package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -0
  151. package/es/components/molecules/ModalV2/ModalV2.js +26 -0
  152. package/es/components/molecules/ModalV2/index.d.ts +2 -0
  153. package/es/components/molecules/ModalV2/index.js +1 -0
  154. package/es/components/molecules/ModalV2/styled.d.ts +7 -0
  155. package/es/components/molecules/ModalV2/styled.js +22 -0
  156. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
  157. package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -0
  158. package/es/components/molecules/PreviewModal/PreviewModal.js +30 -0
  159. package/es/components/molecules/PreviewModal/index.d.ts +2 -0
  160. package/es/components/molecules/PreviewModal/index.js +1 -0
  161. package/es/components/molecules/PreviewModal/styled.d.ts +4 -0
  162. package/es/components/molecules/PreviewModal/styled.js +39 -0
  163. package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
  164. package/es/components/molecules/ResizeGrid/ResizeGrid.js +728 -0
  165. package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
  166. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -0
  167. package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
  168. package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
  169. package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
  170. package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -0
  171. package/es/components/molecules/ResizeGrid/constant.d.ts +35 -0
  172. package/es/components/molecules/ResizeGrid/constant.js +111 -0
  173. package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
  174. package/es/components/molecules/ResizeGrid/index.js +1 -0
  175. package/es/components/molecules/ResizeGrid/styled.d.ts +10 -0
  176. package/es/components/molecules/ResizeGrid/styled.js +56 -0
  177. package/es/components/molecules/ResizeGrid/types.d.ts +147 -0
  178. package/es/components/molecules/ResizeGrid/types.js +1 -0
  179. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +12 -0
  180. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
  181. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +17 -0
  182. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +108 -0
  183. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -0
  184. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -0
  185. package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -0
  186. package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -0
  187. package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -0
  188. package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -0
  189. package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -0
  190. package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -0
  191. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -0
  192. package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -0
  193. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -0
  194. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -0
  195. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -0
  196. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -0
  197. package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -0
  198. package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -0
  199. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -0
  200. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
  201. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -0
  202. package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -0
  203. package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -0
  204. package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -0
  205. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -0
  206. package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -0
  207. package/es/components/molecules/RichMenu/index.d.ts +3 -0
  208. package/es/components/molecules/RichMenu/index.js +3 -0
  209. package/es/components/molecules/Select/Select.d.ts +6 -4
  210. package/es/components/molecules/Select/Select.js +23 -2
  211. package/es/components/molecules/Select/Test.d.ts +2 -1
  212. package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -0
  213. package/es/components/molecules/ShareAccess/ShareAccess.js +23 -0
  214. package/es/components/molecules/ShareAccess/actions.d.ts +16 -0
  215. package/es/components/molecules/ShareAccess/actions.js +12 -0
  216. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -0
  217. package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +78 -0
  218. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -0
  219. package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -0
  220. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -0
  221. package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -0
  222. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -0
  223. package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +19 -0
  224. package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -0
  225. package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -0
  226. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -0
  227. package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -0
  228. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -0
  229. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -0
  230. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.d.ts +0 -0
  231. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -0
  232. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -0
  233. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -0
  234. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -0
  235. package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +97 -0
  236. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -0
  237. package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -0
  238. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -0
  239. package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -0
  240. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -0
  241. package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -0
  242. package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -0
  243. package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -0
  244. package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -0
  245. package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -0
  246. package/es/components/molecules/ShareAccess/components/index.d.ts +1 -0
  247. package/es/components/molecules/ShareAccess/components/index.js +1 -0
  248. package/es/components/molecules/ShareAccess/constants.d.ts +67 -0
  249. package/es/components/molecules/ShareAccess/constants.js +85 -0
  250. package/es/components/molecules/ShareAccess/context.d.ts +4 -0
  251. package/es/components/molecules/ShareAccess/context.js +3 -0
  252. package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -0
  253. package/es/components/molecules/ShareAccess/hooks/index.js +1 -0
  254. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +18 -0
  255. package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -0
  256. package/es/components/molecules/ShareAccess/index.d.ts +4 -0
  257. package/es/components/molecules/ShareAccess/index.js +4 -0
  258. package/es/components/molecules/ShareAccess/reducer.d.ts +2 -0
  259. package/es/components/molecules/ShareAccess/reducer.js +19 -0
  260. package/es/components/molecules/ShareAccess/types.d.ts +54 -0
  261. package/es/components/molecules/ShareAccess/types.js +1 -0
  262. package/es/components/molecules/ShareAccess/utils.d.ts +38 -0
  263. package/es/components/molecules/ShareAccess/utils.js +57 -0
  264. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -5
  265. package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
  266. package/es/components/molecules/UploadImage/MediaThumb.d.ts +11 -0
  267. package/es/components/molecules/UploadImage/MediaThumb.js +31 -0
  268. package/es/components/molecules/UploadImage/index.d.ts +6 -2
  269. package/es/components/molecules/UploadImage/index.js +111 -84
  270. package/es/components/molecules/UploadImage/styled.js +0 -4
  271. package/es/components/molecules/UploadImage/utils.d.ts +3 -0
  272. package/es/components/molecules/UploadImage/utils.js +24 -0
  273. package/es/components/molecules/index.d.ts +11 -3
  274. package/es/components/molecules/index.js +9 -3
  275. package/es/components/organism/Help/styled.d.ts +6 -16
  276. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
  277. package/es/constants/index.d.ts +1 -0
  278. package/es/constants/index.js +1 -0
  279. package/es/constants/queries.d.ts +14 -0
  280. package/es/constants/queries.js +21 -0
  281. package/es/constants/richMenu.d.ts +19 -0
  282. package/es/constants/richMenu.js +19 -0
  283. package/es/constants/storybook.d.ts +7 -1
  284. package/es/constants/storybook.js +12 -0
  285. package/es/constants/theme.js +30 -3
  286. package/es/hooks/index.d.ts +1 -0
  287. package/es/hooks/index.js +1 -0
  288. package/es/hooks/useDebounceCallback.d.ts +1 -0
  289. package/es/hooks/useDebounceCallback.js +5 -0
  290. package/es/hooks/useDebounceV2.d.ts +1 -0
  291. package/es/hooks/useDebounceV2.js +11 -0
  292. package/es/hooks/useDeepCompareEffect.d.ts +1 -0
  293. package/es/hooks/useDeepCompareEffect.js +21 -0
  294. package/es/hooks/useDeepCompareMemo.d.ts +2 -0
  295. package/es/hooks/useDeepCompareMemo.js +21 -0
  296. package/es/hooks/usePrevious.d.ts +2 -0
  297. package/es/hooks/usePrevious.js +9 -0
  298. package/es/locales/en/translation.json +160 -3
  299. package/es/locales/i18n.d.ts +158 -0
  300. package/es/locales/translations.d.ts +157 -0
  301. package/es/locales/vi/translation.json +2 -1
  302. package/es/models/BusinessObject.d.ts +116 -0
  303. package/es/models/BusinessObject.js +113 -0
  304. package/es/models/Currency.d.ts +9 -0
  305. package/es/models/Currency.js +10 -0
  306. package/es/models/CustomFunction.d.ts +19 -0
  307. package/es/models/CustomFunction.js +25 -0
  308. package/es/models/DynamicContentAttribute.d.ts +34 -0
  309. package/es/models/DynamicContentAttribute.js +9 -0
  310. package/es/models/EventTrackingAttribute.d.ts +11 -0
  311. package/es/models/EventTrackingAttribute.js +13 -0
  312. package/es/models/PromotionPool.d.ts +11 -0
  313. package/es/models/PromotionPool.js +12 -0
  314. package/es/models/{SavedImage.d.ts → SavedMedia.d.ts} +5 -5
  315. package/es/models/{SavedImage.js → SavedMedia.js} +3 -3
  316. package/es/queries/BusinessObject/index.d.ts +6 -0
  317. package/es/queries/BusinessObject/index.js +6 -0
  318. package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -0
  319. package/es/queries/BusinessObject/useGetListAllEvents.js +14 -0
  320. package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -0
  321. package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -0
  322. package/es/queries/BusinessObject/useGetListBO.d.ts +6 -0
  323. package/es/queries/BusinessObject/useGetListBO.js +19 -0
  324. package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -0
  325. package/es/queries/BusinessObject/useGetListEventAttr.js +15 -0
  326. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -0
  327. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -0
  328. package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -0
  329. package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -0
  330. package/es/queries/CustomFunction/index.d.ts +2 -0
  331. package/es/queries/CustomFunction/index.js +2 -0
  332. package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -0
  333. package/es/queries/CustomFunction/useCustomFunction.js +53 -0
  334. package/es/queries/DynamicContentAttribute/index.d.ts +1 -0
  335. package/es/queries/DynamicContentAttribute/index.js +1 -0
  336. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -0
  337. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -0
  338. package/es/queries/PromotionPool/index.d.ts +1 -0
  339. package/es/queries/PromotionPool/index.js +1 -0
  340. package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -0
  341. package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -0
  342. package/es/queries/ThirdParty/index.d.ts +1 -0
  343. package/es/queries/ThirdParty/index.js +1 -0
  344. package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -0
  345. package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -0
  346. package/es/queries/configs.d.ts +4 -0
  347. package/es/queries/configs.js +13 -0
  348. package/es/queries/index.d.ts +6 -0
  349. package/es/queries/index.js +6 -0
  350. package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -0
  351. package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -0
  352. package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -0
  353. package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -0
  354. package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -0
  355. package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -0
  356. package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -0
  357. package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -0
  358. package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -0
  359. package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -0
  360. package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +5 -5
  361. package/es/services/MediaTemplateDesign/UploadFile/index.js +36 -19
  362. package/es/services/ThirParty/index.d.ts +8 -0
  363. package/es/services/ThirParty/index.js +26 -0
  364. package/es/services/index.d.ts +14 -5
  365. package/es/services/index.js +45 -1
  366. package/es/test.d.ts +2 -1
  367. package/es/test.js +201 -63
  368. package/es/types/index.d.ts +17 -0
  369. package/es/types/index.js +2 -1
  370. package/es/types/richMenu.d.ts +214 -0
  371. package/es/types/richMenu.js +1 -0
  372. package/es/types/variables.d.ts +2 -0
  373. package/es/types/variables.js +1 -0
  374. package/es/utils/common.d.ts +4 -0
  375. package/es/utils/common.js +21 -0
  376. package/es/utils/handleError.d.ts +32 -2
  377. package/es/utils/handleError.js +42 -4
  378. package/package.json +18 -8
@@ -0,0 +1,41 @@
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 get from 'lodash/get';
12
+ import { useQuery } from '@tanstack/react-query';
13
+ // Constants
14
+ import { QUERY_KEYS } from '../../constants/queries';
15
+ // Configs
16
+ import { queryClientAntsomiUI } from '../configs';
17
+ // Services
18
+ import { getListAttributesBO } from '../../services/MediaTemplateDesign/BusinessObject';
19
+ export const useGetListAttributeBO = (apiParams, infos, props) => {
20
+ const { options } = props || {};
21
+ const itemTypeIds = (props === null || props === void 0 ? void 0 : props.itemTypeIds) || [];
22
+ return useQuery(Object.assign(Object.assign({ queryKey: [QUERY_KEYS.GET_EVENT_ATTRIBUTE_BO, itemTypeIds], queryFn: () => getListAttributesBO({ itemTypeIds, url: apiParams.url }, infos), placeholderData: {
23
+ rows: [],
24
+ total: [],
25
+ } }, options), { enabled: itemTypeIds.filter(Boolean).length > 0 }));
26
+ };
27
+ export const getListAttributeBOQuery = ({ itemTypeIds, url, infos, }) => __awaiter(void 0, void 0, void 0, function* () {
28
+ try {
29
+ if (itemTypeIds.filter(itemTypeId => !!itemTypeId).length) {
30
+ const { rows } = (yield queryClientAntsomiUI.fetchQuery({
31
+ queryKey: [QUERY_KEYS.GET_EVENT_ATTRIBUTE_BO, itemTypeIds],
32
+ queryFn: () => getListAttributesBO({ itemTypeIds, url }, infos),
33
+ }));
34
+ return get(rows, `[0].properties`, []);
35
+ }
36
+ return [];
37
+ }
38
+ catch (error) {
39
+ return [];
40
+ }
41
+ });
@@ -0,0 +1,6 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '../../types';
4
+ type TDataFnQuery = Record<string, any>;
5
+ export declare const useGetListBO: <T = TDataFnQuery>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: UseQueryOptions<TDataFnQuery, any, T, import("@tanstack/react-query").QueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
+ export {};
@@ -0,0 +1,19 @@
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 { useQuery } from '@tanstack/react-query';
12
+ // Services
13
+ import { getListBusinessObject } from '../../services/MediaTemplateDesign/BusinessObject';
14
+ // Constants
15
+ import { QUERY_KEYS } from '../../constants/queries';
16
+ export const useGetListBO = (apiConfig, infos, queryOptions) => useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_BO], queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
17
+ const { rows: businessObjects } = yield getListBusinessObject({ url: apiConfig === null || apiConfig === void 0 ? void 0 : apiConfig.url }, infos);
18
+ return businessObjects;
19
+ }) }, queryOptions));
@@ -0,0 +1,4 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '../../types';
4
+ export declare const useGetListEventAttr: <T = any[]>(apiConfig: APIParams, infos: PayloadInfo, eventSource: string, sourceId: string, queryOptions?: Omit<UseQueryOptions<any[], any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
@@ -0,0 +1,15 @@
1
+ // Libraries
2
+ import { useQuery } from '@tanstack/react-query';
3
+ // Services
4
+ import { getListAttributes } from '../../services/MediaTemplateDesign/BusinessObject';
5
+ // Keys
6
+ import { QUERY_KEYS } from '../../constants/queries';
7
+ export const useGetListEventAttr = (apiConfig, infos, eventSource, sourceId, queryOptions) => {
8
+ const [eventActionId, eventCategoryId] = eventSource.split(':');
9
+ return useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_EVENT_ATTR, sourceId, eventSource], enabled: !!sourceId && !!eventActionId && !!eventCategoryId, queryFn: () => getListAttributes({
10
+ url: apiConfig.url,
11
+ eventActionId,
12
+ eventCategoryId,
13
+ sourceId,
14
+ }, infos) }, queryOptions));
15
+ };
@@ -0,0 +1,6 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '../../types';
4
+ type TQueryFnData = any[];
5
+ export declare const useGetListPromotionCodeAttr: <T = TQueryFnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TQueryFnData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
+ export {};
@@ -0,0 +1,26 @@
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 { useQuery } from '@tanstack/react-query';
12
+ // Services
13
+ import { getListAttributesBO } from '../../services/MediaTemplateDesign/BusinessObject';
14
+ // Keys
15
+ import { QUERY_KEYS } from '../../constants/queries';
16
+ export const useGetListPromotionCodeAttr = (apiConfig, infos, queryOptions) => useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_PROMOTION_CODE_ATTR], queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
17
+ var _a, _b;
18
+ const data = yield getListAttributesBO({ itemTypeIds: [-100], url: apiConfig.url }, infos);
19
+ if (((_a = data === null || data === void 0 ? void 0 : data.rows) === null || _a === void 0 ? void 0 : _a.length) && (data === null || data === void 0 ? void 0 : data.rows[0])) {
20
+ const item = data.rows[0];
21
+ if (Array.isArray(item === null || item === void 0 ? void 0 : item.properties) && ((_b = item === null || item === void 0 ? void 0 : item.properties) === null || _b === void 0 ? void 0 : _b.length)) {
22
+ return item.properties;
23
+ }
24
+ return [];
25
+ }
26
+ }) }, queryOptions));
@@ -0,0 +1,13 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '../../types';
4
+ type OptionHasDefault = 'queryKey' | 'queryFn';
5
+ type GetListSourceByEvent<T> = {
6
+ eventCategoryId: number;
7
+ eventActionId: number;
8
+ apiConfig: APIParams;
9
+ infos: PayloadInfo;
10
+ options?: Omit<UseQueryOptions<any, any, T, any[]>, OptionHasDefault>;
11
+ };
12
+ export declare const useGetListSourceByEvent: <T = any>(props: GetListSourceByEvent<T>) => import("@tanstack/react-query").UseQueryResult<T, any>;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ // Libraries
2
+ import { useQuery } from '@tanstack/react-query';
3
+ // Constants
4
+ import { QUERY_KEYS } from '../../constants/queries';
5
+ // Services
6
+ import { getListSourceByEvent } from '../../services/MediaTemplateDesign/BusinessObject';
7
+ export const useGetListSourceByEvent = (props) => {
8
+ const { options, apiConfig, infos, eventCategoryId, eventActionId } = props || {};
9
+ // Selectors
10
+ return useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_SOURCE_BY_EVENT, eventActionId, eventCategoryId], queryFn: () => getListSourceByEvent({ url: apiConfig.url, eventActionId, eventCategoryId }, infos), enabled: !!eventCategoryId && !!eventActionId, placeholderData: { rows: [], total: 0 } }, options));
11
+ };
@@ -0,0 +1,2 @@
1
+ import { useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction } from './useCustomFunction';
2
+ export { useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction };
@@ -0,0 +1,2 @@
1
+ import { useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction, } from './useCustomFunction';
2
+ export { useGetCustomFunction, useAddSavedCSFunction, useUpdateCSFunction };
@@ -0,0 +1,19 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import { MediaJsonCustomFunction } from '../../models/CustomFunction';
3
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
4
+ import type { PayloadInfo } from '../../types';
5
+ export declare const useGetCustomFunction: <T = MediaJsonCustomFunction[]>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<MediaJsonCustomFunction[], any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
+ export declare const useAddSavedCSFunction: () => import("@tanstack/react-query").UseMutationResult<any, unknown, Partial<any> & {
7
+ url: string;
8
+ } & Record<string, any> & {
9
+ infos: PayloadInfo;
10
+ }, {
11
+ previousSavedBlock: unknown;
12
+ }>;
13
+ export declare const useUpdateCSFunction: () => import("@tanstack/react-query").UseMutationResult<any, unknown, Partial<any> & {
14
+ url: string;
15
+ } & Record<string, any> & {
16
+ infos: PayloadInfo;
17
+ }, {
18
+ previousSavedBlock: unknown;
19
+ }>;
@@ -0,0 +1,53 @@
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 { useMutation, useQuery } from '@tanstack/react-query';
12
+ // Services
13
+ import { getListingTemplateCustomFunction, createSavedCustomFunction, updateSavedCustomFunction, } from '../../services/MediaTemplateDesign/CustomFunction';
14
+ // Constants
15
+ import { QUERY_KEYS } from '../../constants/queries';
16
+ // Query client
17
+ import { queryClientAntsomiUI } from '../configs';
18
+ export const useGetCustomFunction = (apiConfig, infos, queryOptions) => useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_CUSTOM], queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
19
+ const data = yield getListingTemplateCustomFunction({ url: apiConfig.url }, infos);
20
+ return data;
21
+ }) }, queryOptions));
22
+ export const useAddSavedCSFunction = () => useMutation(createSavedCustomFunction, {
23
+ onMutate: (_payload) => {
24
+ const previousSavedBlock = queryClientAntsomiUI.getQueryData([
25
+ QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION,
26
+ ]);
27
+ return { previousSavedBlock };
28
+ },
29
+ onError: (_error, _payload, context) => {
30
+ queryClientAntsomiUI.setQueryData([QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION], context === null || context === void 0 ? void 0 : context.previousSavedBlock);
31
+ },
32
+ onSettled: () => {
33
+ queryClientAntsomiUI.invalidateQueries([QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION], {
34
+ exact: true,
35
+ });
36
+ },
37
+ });
38
+ export const useUpdateCSFunction = () => useMutation(updateSavedCustomFunction, {
39
+ onMutate: (_payload) => {
40
+ const previousSavedBlock = queryClientAntsomiUI.getQueryData([
41
+ QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION,
42
+ ]);
43
+ return { previousSavedBlock };
44
+ },
45
+ onError: (_error, _payload, context) => {
46
+ queryClientAntsomiUI.setQueryData([QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION], context === null || context === void 0 ? void 0 : context.previousSavedBlock);
47
+ },
48
+ onSettled: () => {
49
+ queryClientAntsomiUI.invalidateQueries([QUERY_KEYS.GET_SAVE_CUSTOM_FUNCTION], {
50
+ exact: true,
51
+ });
52
+ },
53
+ });
@@ -0,0 +1 @@
1
+ export * from './useGetDynamicContentAttr';
@@ -0,0 +1 @@
1
+ export * from './useGetDynamicContentAttr';
@@ -0,0 +1,10 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import { DynamicContentAttribute } from '../../models/DynamicContentAttribute';
3
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
4
+ import type { PayloadInfo } from '../../types';
5
+ interface TData {
6
+ visitor: DynamicContentAttribute['visitor'];
7
+ customer: DynamicContentAttribute['customer'];
8
+ }
9
+ export declare const useGetDynamicContentAttr: <T = TData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
10
+ export {};
@@ -0,0 +1,21 @@
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 { useQuery } from '@tanstack/react-query';
12
+ // Constants
13
+ import { QUERY_KEYS } from '../../constants/queries';
14
+ import { getDynamicContentAttributes } from '../../services/MediaTemplateDesign/DynamicContentAttribute';
15
+ export const useGetDynamicContentAttr = (apiConfig, infos, queryOptions) => useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_DYNAMIC_CONTENT_ATTR], queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
16
+ const data = yield getDynamicContentAttributes({ url: apiConfig.url }, infos);
17
+ return {
18
+ visitor: data.visitor,
19
+ customer: data.customer,
20
+ };
21
+ }) }, queryOptions));
@@ -0,0 +1 @@
1
+ export * from './useGetListPromotionPool';
@@ -0,0 +1 @@
1
+ export * from './useGetListPromotionPool';
@@ -0,0 +1,9 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '../../types';
4
+ interface TReturnData {
5
+ rows: any[];
6
+ total: number;
7
+ }
8
+ export declare const useGetListPromotionPool: <T = TReturnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TReturnData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
9
+ export {};
@@ -0,0 +1,62 @@
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 { useQuery } from '@tanstack/react-query';
12
+ // Services
13
+ import { getListPromotionPools } from '../../services/MediaTemplateDesign/PromotionPool';
14
+ // Constants
15
+ import { QUERY_KEYS } from '../../constants/queries';
16
+ export const useGetListPromotionPool = (apiConfig, infos, queryOptions) => useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_LIST_PROMOTION_POOL], queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
17
+ const data = yield getListPromotionPools({
18
+ url: apiConfig.url,
19
+ limit: 1000,
20
+ page: 1,
21
+ sd: 'asc',
22
+ search: '',
23
+ decryptFields: [],
24
+ feServices: 'suggestionMultilang',
25
+ feKey: '10-pool_name',
26
+ objectType: 'PROMOTION_POOL',
27
+ sort: 'asc',
28
+ filters: {
29
+ OR: [
30
+ {
31
+ AND: [
32
+ {
33
+ type: 1,
34
+ column: 'process_status',
35
+ data_type: 'number',
36
+ operator: 'matches',
37
+ value: [2],
38
+ },
39
+ {
40
+ type: 1,
41
+ column: 'status',
42
+ data_type: 'number',
43
+ operator: 'matches',
44
+ value: [1],
45
+ },
46
+ ],
47
+ },
48
+ ],
49
+ },
50
+ }, infos);
51
+ let result = {
52
+ rows: [],
53
+ total: 0,
54
+ };
55
+ if (data.rows.length) {
56
+ result = {
57
+ rows: data.rows,
58
+ total: data.total,
59
+ };
60
+ }
61
+ return result;
62
+ }) }, queryOptions));
@@ -0,0 +1 @@
1
+ export * from './useGetEventTrackingAttributes';
@@ -0,0 +1 @@
1
+ export * from './useGetEventTrackingAttributes';
@@ -0,0 +1,14 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import { EventTrackingAttribute } from '../../models/EventTrackingAttribute';
3
+ import type { APIParams } from '../../components/molecules/AddDynamicContent';
4
+ import type { PayloadInfo } from '../../types';
5
+ type OptionHasDefault = 'queryKey' | 'queryFn';
6
+ type GetDataTableBOProps<T> = {
7
+ apiConfig: APIParams;
8
+ infos: PayloadInfo;
9
+ eventCategoryId: number;
10
+ eventActionId: number;
11
+ options?: Omit<UseQueryOptions<any, any, T, any[]>, OptionHasDefault>;
12
+ };
13
+ export declare const useGetEventTrackingAttributes: <T = EventTrackingAttribute>(props: GetDataTableBOProps<T>) => import("@tanstack/react-query").UseQueryResult<T, any>;
14
+ export {};
@@ -0,0 +1,15 @@
1
+ // Libraries
2
+ import { useQuery } from '@tanstack/react-query';
3
+ // Constants
4
+ import { QUERY_KEYS } from '../../constants/queries';
5
+ // Services
6
+ import { getEventTrackingAttributes } from '../../services/ThirParty';
7
+ export const useGetEventTrackingAttributes = (props) => {
8
+ const { options, apiConfig, infos, eventCategoryId, eventActionId } = props || {};
9
+ // Selectors
10
+ return useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_EVENT_TRACKING_ATTRIBUTES, eventActionId, eventCategoryId], queryFn: () => getEventTrackingAttributes({ url: apiConfig.url, eventActionId, eventCategoryId }, infos), enabled: !!eventCategoryId && !!eventActionId, placeholderData: {
11
+ eventAttributes: [],
12
+ foreignObjects: [],
13
+ mainObjects: [],
14
+ } }, options));
15
+ };
@@ -0,0 +1,4 @@
1
+ import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
2
+ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
3
+ declare const queryClient: QueryClient;
4
+ export { QueryClientProvider as QueryClientProviderAntsomiUI, QueryClient as QueryClientAntsomiUI, ReactQueryDevtools as QueryDevtoolsAntsomiUI, queryClient as queryClientAntsomiUI, };
@@ -0,0 +1,13 @@
1
+ // Libraries
2
+ import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
3
+ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
4
+ const queryClient = new QueryClient({
5
+ defaultOptions: {
6
+ queries: {
7
+ refetchOnWindowFocus: false,
8
+ staleTime: Infinity,
9
+ retry: 1,
10
+ },
11
+ },
12
+ });
13
+ export { QueryClientProvider as QueryClientProviderAntsomiUI, QueryClient as QueryClientAntsomiUI, ReactQueryDevtools as QueryDevtoolsAntsomiUI, queryClient as queryClientAntsomiUI, };
@@ -0,0 +1,6 @@
1
+ export * from './configs';
2
+ export * from './BusinessObject';
3
+ export * from './CustomFunction';
4
+ export * from './PromotionPool';
5
+ export * from './DynamicContentAttribute';
6
+ export * from './ThirdParty';
@@ -0,0 +1,6 @@
1
+ export * from './configs';
2
+ export * from './BusinessObject';
3
+ export * from './CustomFunction';
4
+ export * from './PromotionPool';
5
+ export * from './DynamicContentAttribute';
6
+ export * from './ThirdParty';
@@ -0,0 +1,8 @@
1
+ import { ListAttribute } from '@antscorp/antsomi-ui/es/models/BusinessObject';
2
+ import type { APIParams } from '@antscorp/antsomi-ui/es/components/molecules/AddDynamicContent';
3
+ import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
4
+ export declare const getListAttributesBO: (params: APIParams, infos: PayloadInfo) => Promise<Record<string, any>>;
5
+ export declare const getListAttributes: (params: APIParams, infos: PayloadInfo) => Promise<ListAttribute[]>;
6
+ export declare const getListBusinessObject: (params: APIParams, infos: PayloadInfo) => Promise<Record<string, any>>;
7
+ export declare const getListAllEvents: (params: APIParams, infos: PayloadInfo) => Promise<Record<string, any>>;
8
+ export declare const getListSourceByEvent: (params: APIParams, infos: PayloadInfo) => Promise<Record<string, any>>;
@@ -0,0 +1,100 @@
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
+ /* eslint-disable no-promise-executor-return */
11
+ // Libraries
12
+ import { uniqBy } from 'lodash';
13
+ // Services
14
+ import { services } from '../..';
15
+ // Models
16
+ import { AttributeBO, BusinessObject, Source, Event, } from '@antscorp/antsomi-ui/es/models/BusinessObject';
17
+ export const getListAttributesBO = (params, infos) => __awaiter(void 0, void 0, void 0, function* () {
18
+ var _a, _b;
19
+ try {
20
+ const { data } = yield services.mediaTemplateDesign.getList({
21
+ API_HOST: `${params.url}/third-party/bo-attribute/${[...params.itemTypeIds]}`,
22
+ }, infos);
23
+ let attributesBO = (data === null || data === void 0 ? void 0 : data.data) || [];
24
+ attributesBO = Array.isArray(attributesBO)
25
+ ? attributesBO.map(object => new AttributeBO(object))
26
+ : [];
27
+ return {
28
+ rows: attributesBO,
29
+ total: ((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.total) || 0,
30
+ };
31
+ }
32
+ catch (error) {
33
+ return new Promise((_, reject) => reject(error));
34
+ }
35
+ });
36
+ export const getListAttributes = (params, infos) => __awaiter(void 0, void 0, void 0, function* () {
37
+ try {
38
+ const { data = {} } = yield services.mediaTemplateDesign.getList(Object.assign({ API_HOST: `${params.url}/third-party/event-attribute` }, params), infos);
39
+ const listAttribute = data.data || [];
40
+ return uniqBy(listAttribute, 'eventPropertyName');
41
+ }
42
+ catch (error) {
43
+ return Promise.reject(error);
44
+ }
45
+ });
46
+ export const getListBusinessObject = (params, infos) => __awaiter(void 0, void 0, void 0, function* () {
47
+ var _c, _d;
48
+ try {
49
+ const { data } = yield services.mediaTemplateDesign.getList({
50
+ API_HOST: `${params.url}/third-party/list-bo`,
51
+ }, infos);
52
+ let businessObjects = (data === null || data === void 0 ? void 0 : data.data) || [];
53
+ businessObjects = Array.isArray(businessObjects)
54
+ ? businessObjects.map(object => new BusinessObject(object))
55
+ : [];
56
+ return {
57
+ rows: businessObjects,
58
+ total: ((_d = (_c = data === null || data === void 0 ? void 0 : data.data) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.total) || 0,
59
+ };
60
+ }
61
+ catch (error) {
62
+ return new Promise((_, reject) => reject(error));
63
+ }
64
+ });
65
+ export const getListAllEvents = (params, infos) => __awaiter(void 0, void 0, void 0, function* () {
66
+ var _e, _f;
67
+ try {
68
+ const { data } = yield services.mediaTemplateDesign.getList({
69
+ API_HOST: `${params.url}/third-party/all-event-tracking`,
70
+ }, infos);
71
+ let allEvents = (data === null || data === void 0 ? void 0 : data.data) || [];
72
+ allEvents = Array.isArray(allEvents) ? allEvents.map(object => new Event(object)) : [];
73
+ return {
74
+ rows: allEvents,
75
+ total: ((_f = (_e = data === null || data === void 0 ? void 0 : data.data) === null || _e === void 0 ? void 0 : _e.meta) === null || _f === void 0 ? void 0 : _f.total) || 0,
76
+ };
77
+ }
78
+ catch (error) {
79
+ return new Promise((_, reject) => reject(error));
80
+ }
81
+ });
82
+ export const getListSourceByEvent = (params, infos) => __awaiter(void 0, void 0, void 0, function* () {
83
+ var _g, _h;
84
+ try {
85
+ const { data } = yield services.mediaTemplateDesign.getList({
86
+ API_HOST: `${params.url}/third-party/source-by-event?eventCategoryId=${params.eventCategoryId}&eventActionId=${params.eventActionId}`,
87
+ }, infos);
88
+ let sourceByEvent = (data === null || data === void 0 ? void 0 : data.data) || [];
89
+ sourceByEvent = Array.isArray(sourceByEvent)
90
+ ? sourceByEvent.map(object => new Source(object))
91
+ : [];
92
+ return {
93
+ rows: sourceByEvent,
94
+ total: ((_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.meta) === null || _h === void 0 ? void 0 : _h.total) || 0,
95
+ };
96
+ }
97
+ catch (error) {
98
+ return new Promise((_, reject) => reject(error));
99
+ }
100
+ });
@@ -0,0 +1,15 @@
1
+ import type { APIParams } from '@antscorp/antsomi-ui/es/components/molecules/AddDynamicContent';
2
+ import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
3
+ export declare const mapToAPI: (displayFormat: any, dataFormat: any) => {};
4
+ export declare const getListingTemplateCustomFunction: (params: APIParams, infos: PayloadInfo) => Promise<any[]>;
5
+ export declare const createSavedCustomFunction: (payload: Partial<any> & APIParams & {
6
+ infos: PayloadInfo;
7
+ }) => Promise<any>;
8
+ export declare const updateSavedCustomFunction: (payload: Partial<any> & APIParams & {
9
+ infos: PayloadInfo;
10
+ }) => Promise<any>;
11
+ export declare const validateSavedBlockName: (payload: {
12
+ savedBlockName: string;
13
+ } & APIParams & {
14
+ infos: PayloadInfo;
15
+ }) => Promise<any>;