@antscorp/antsomi-ui 1.3.7-beta.67 → 1.3.7-beta.68

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 (515) hide show
  1. package/es/assets/css/main.scss +3 -2
  2. package/es/components/atoms/Checkbox/Checkbox.d.ts +0 -1
  3. package/es/components/atoms/ContentEditable/styled.d.ts +1 -2
  4. package/es/components/atoms/Eyedropper/styled.d.ts +0 -1
  5. package/es/components/atoms/Grid/Grid.d.ts +0 -1
  6. package/es/components/atoms/Input/Input.d.ts +18 -4
  7. package/es/components/atoms/Input/Input.js +2 -4
  8. package/es/components/atoms/Input/index.d.ts +1 -1
  9. package/es/components/atoms/Input/styled.d.ts +8 -9
  10. package/es/components/atoms/Input/styled.js +8 -8
  11. package/es/components/atoms/InputDynamic/InputDynamic.js +3 -3
  12. package/es/components/atoms/InputDynamic/styled.d.ts +1 -1
  13. package/es/components/atoms/InputDynamic/utils.js +8 -8
  14. package/es/components/atoms/MobileBrandingBar/index.d.ts +0 -1
  15. package/es/components/atoms/MobileBrandingBar/styled.d.ts +0 -1
  16. package/es/components/atoms/NotificationStatus/NotificationStatus.d.ts +0 -1
  17. package/es/components/atoms/Pagination/Pagination.d.ts +0 -1
  18. package/es/components/atoms/Popover/Popover.d.ts +0 -1
  19. package/es/components/atoms/PreviewTabs/styled.d.ts +1 -2
  20. package/es/components/atoms/Progress/Progress.d.ts +0 -1
  21. package/es/components/atoms/Radio/index.d.ts +0 -1
  22. package/es/components/atoms/RateV2/RateV2.js +2 -2
  23. package/es/components/atoms/ReactIframe/types.d.ts +0 -1
  24. package/es/components/atoms/Segmented/Segmented.d.ts +0 -1
  25. package/es/components/atoms/SelectAssociatedTag/SelectAssociatedTag.js +1 -1
  26. package/es/components/atoms/SelectAssociatedTag/SelectTag.d.ts +0 -1
  27. package/es/components/atoms/SelectAssociatedTag/styled.d.ts +2 -3
  28. package/es/components/atoms/Skeleton/Skeleton.d.ts +0 -1
  29. package/es/components/atoms/SlideBar/SlideBar.js +3 -1
  30. package/es/components/atoms/SlideBar/styled.d.ts +9 -9
  31. package/es/components/atoms/SlideBar/utils.d.ts +2 -2
  32. package/es/components/atoms/Slider/index.js +3 -8
  33. package/es/components/atoms/Space/Space.d.ts +2 -3
  34. package/es/components/atoms/Steps/styled.d.ts +2 -3
  35. package/es/components/atoms/Switch/styled.d.ts +0 -1
  36. package/es/components/atoms/Tag/Tag.js +6 -3
  37. package/es/components/atoms/Text/styled.d.ts +0 -1
  38. package/es/components/atoms/Timeline/Timeline.d.ts +1 -2
  39. package/es/components/atoms/Typography/EllipsisMiddle.d.ts +0 -1
  40. package/es/components/atoms/Watermark/Watermark.d.ts +0 -1
  41. package/es/components/icons/AntsomiAIIcon.d.ts +2 -2
  42. package/es/components/icons/AntsomiAIIcon.js +1 -3
  43. package/es/components/icons/CircleInfoIcon.d.ts +0 -1
  44. package/es/components/icons/EmotionFeedbackIcon.d.ts +2 -2
  45. package/es/components/icons/LazyIcon/LazyIcon.d.ts +3 -4
  46. package/es/components/icons/LoadingIcon.d.ts +1 -1
  47. package/es/components/icons/document/IconGallery.d.ts +0 -11
  48. package/es/components/icons/document/IconGallery.js +40 -20
  49. package/es/components/icons/document/styled.js +4 -4
  50. package/es/components/icons/index.d.ts +1 -1
  51. package/es/components/icons/index.js +1 -1
  52. package/es/components/icons/types/index.d.ts +0 -1
  53. package/es/components/molecules/AccessDenied/styled.d.ts +1 -2
  54. package/es/components/molecules/AccountSelection/AccountListing.js +1 -1
  55. package/es/components/molecules/AccountSelection/index.d.ts +2 -1
  56. package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +32 -1
  57. package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +2 -28
  58. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +2 -3
  59. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +0 -1
  60. package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +2 -2
  61. package/es/components/molecules/AddDynamicContent/constants.d.ts +18 -35
  62. package/es/components/molecules/AddDynamicContent/constants.js +0 -2
  63. package/es/components/molecules/AddDynamicContent/styled.d.ts +4 -5
  64. package/es/components/molecules/AddDynamicContent/types.d.ts +0 -32
  65. package/es/components/molecules/AddDynamicContent/utils.d.ts +1 -1
  66. package/es/components/molecules/AlignSetting/index.d.ts +1 -1
  67. package/es/components/molecules/AlignSetting/utils.d.ts +1 -1
  68. package/es/components/molecules/ApplyPopupContent/styled.d.ts +1 -2
  69. package/es/components/molecules/CalendarSelection/CalendarSelection.js +5 -4
  70. package/es/components/molecules/CalendarSelection/actions.d.ts +11 -1
  71. package/es/components/molecules/CalendarSelection/actions.js +10 -1
  72. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.d.ts +8 -1
  73. package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.js +1 -1
  74. package/es/components/molecules/CalendarSelection/constants.d.ts +22 -10
  75. package/es/components/molecules/CalendarSelection/constants.js +5 -10
  76. package/es/components/molecules/CalendarSelection/context.d.ts +0 -1
  77. package/es/components/molecules/CalendarSelection/index.d.ts +2 -2
  78. package/es/components/molecules/CalendarSelection/reducer.js +2 -1
  79. package/es/components/molecules/CalendarSelection/styled.d.ts +1 -2
  80. package/es/components/molecules/CalendarSelection/types.d.ts +4 -43
  81. package/es/components/molecules/CalendarSelection/utils.d.ts +2 -23
  82. package/es/components/molecules/CalendarSelection/utils.js +0 -5
  83. package/es/components/molecules/CaptureScreen/components/Cursor/styled.d.ts +2 -2
  84. package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +3 -1
  85. package/es/components/molecules/CaptureScreen/constants.d.ts +4 -26
  86. package/es/components/molecules/CaptureScreen/styled.d.ts +4 -5
  87. package/es/components/molecules/ChartTab/components/styled.d.ts +1 -1
  88. package/es/components/molecules/ChatBox/ChatBoxInsight/styled.d.ts +1 -2
  89. package/es/components/molecules/ChatBox/styled.d.ts +1 -1
  90. package/es/components/molecules/CodeStructure/styled.d.ts +1 -1
  91. package/es/components/molecules/CodeStructure/utils.d.ts +5 -5
  92. package/es/components/molecules/ColorPicker/ChromePicker/styled.js +2 -2
  93. package/es/components/molecules/ColorPicker/CustomPicker/index.js +2 -2
  94. package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +1 -1
  95. package/es/components/molecules/ColorPicker/CustomPicker/styled.js +6 -6
  96. package/es/components/molecules/ColorPicker/SketchPicker/styled.js +2 -2
  97. package/es/components/molecules/ColorPicker/index.d.ts +0 -1
  98. package/es/components/molecules/ColorPicker/index.js +2 -3
  99. package/es/components/molecules/ColorSetting/styled.d.ts +0 -1
  100. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +3 -3
  101. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +14 -93
  102. package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +0 -2
  103. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +1 -1
  104. package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +4 -4
  105. package/es/components/molecules/DisplayFormat/DisplayFormatSelect.js +2 -2
  106. package/es/components/molecules/DisplayFormat/DisplayFormatSettings.d.ts +1 -1
  107. package/es/components/molecules/DisplayFormat/components/FormatNumber.d.ts +1 -1
  108. package/es/components/molecules/DisplayFormat/constants.d.ts +27 -37
  109. package/es/components/molecules/DisplayFormat/index.d.ts +0 -1
  110. package/es/components/molecules/DisplayFormat/styled.d.ts +4 -5
  111. package/es/components/molecules/DisplayFormat/types.d.ts +0 -1
  112. package/es/components/molecules/DrawerDetail/DrawerDetail.js +2 -2
  113. package/es/components/molecules/DrawerDetail/styled.d.ts +2 -3
  114. package/es/components/molecules/Dropdown/styled.d.ts +1 -2
  115. package/es/components/molecules/Dropdown/types.d.ts +0 -1
  116. package/es/components/molecules/EditingList/components/List/List.d.ts +0 -1
  117. package/es/components/molecules/EditingList/components/Loadable.d.ts +5 -6
  118. package/es/components/molecules/EditingList/components/Popover/Popover.d.ts +0 -1
  119. package/es/components/molecules/EditingList/components/Search/Search.d.ts +0 -1
  120. package/es/components/molecules/EditingList/components/Title/Title.d.ts +0 -1
  121. package/es/components/molecules/EditingList/styled.d.ts +0 -1
  122. package/es/components/molecules/EditingList/types.d.ts +0 -1
  123. package/es/components/molecules/EditingListV2/components/List/List.js +0 -1
  124. package/es/components/molecules/EditingListV2/components/Loadable.d.ts +3 -4
  125. package/es/components/molecules/EditingListV2/components/Popover/Popover.d.ts +0 -1
  126. package/es/components/molecules/EditingListV2/types.d.ts +0 -1
  127. package/es/components/molecules/EditorScript/EditorScript.d.ts +0 -1
  128. package/es/components/molecules/EmojiCollections/styled.d.ts +3 -4
  129. package/es/components/molecules/EmojiPopover/styled.d.ts +3 -4
  130. package/es/components/molecules/EmptyData/constants.d.ts +8 -2
  131. package/es/components/molecules/EmptyData/styled.d.ts +2 -3
  132. package/es/components/molecules/FontSetting/index.js +2 -2
  133. package/es/components/molecules/FontSizeInput/FontSizeInput.d.ts +0 -1
  134. package/es/components/molecules/FontSizeInput/components/FontSizeControl.d.ts +0 -1
  135. package/es/components/molecules/FontSizeInput/styled.d.ts +0 -1
  136. package/es/components/molecules/FontSizeInput/types.d.ts +0 -1
  137. package/es/components/molecules/HeaderV2/HeaderV2.d.ts +1 -1
  138. package/es/components/molecules/HeaderV2/HeaderV2.js +2 -2
  139. package/es/components/molecules/IconSelection/components/Icon/index.d.ts +3 -2
  140. package/es/components/molecules/IconSelection/constants.d.ts +0 -1
  141. package/es/components/molecules/IconSelection/styled.d.ts +0 -1
  142. package/es/components/molecules/IconSelection/styled.js +6 -4
  143. package/es/components/molecules/ImageEditor/styled.d.ts +1 -2
  144. package/es/components/molecules/InputSelectAttribute/index.d.ts +0 -1
  145. package/es/components/molecules/InputSelectAttribute/styled.d.ts +1 -1
  146. package/es/components/molecules/ItemNotFound/styled.d.ts +0 -1
  147. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.js +3 -1
  148. package/es/components/molecules/MatchAnySelect/styled.d.ts +8 -15
  149. package/es/components/molecules/MatchAnySelect/utils.d.ts +20 -20
  150. package/es/components/molecules/Modal/Modal.js +1 -1
  151. package/es/components/molecules/Modal/styled.d.ts +1 -2
  152. package/es/components/molecules/ModalSelect/styled.d.ts +1 -2
  153. package/es/components/molecules/ModalV2/styled.d.ts +1 -2
  154. package/es/components/molecules/Popconfirm/Popconfirm.d.ts +0 -1
  155. package/es/components/molecules/PopupDraggable/styled.d.ts +2 -2
  156. package/es/components/molecules/PreviewModal/styled.d.ts +1 -2
  157. package/es/components/molecules/ProcessLoading/styled.d.ts +1 -2
  158. package/es/components/molecules/QuillEditor/CustomToolbar.js +26 -17
  159. package/es/components/molecules/QuillEditor/EditorToolbar.js +1 -0
  160. package/es/components/molecules/QuillEditor/QuillEditor.js +1 -1
  161. package/es/components/molecules/RadioGroup/styled.d.ts +0 -1
  162. package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +2 -1
  163. package/es/components/molecules/ResizeGrid/styled.d.ts +2 -2
  164. package/es/components/molecules/ResizeGrid/types.d.ts +0 -1
  165. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +2 -2
  166. package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +1 -1
  167. package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +1 -2
  168. package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +2 -3
  169. package/es/components/molecules/SearchPopover/SearchPopover.d.ts +0 -1
  170. package/es/components/molecules/SearchPopover/styled.d.ts +0 -1
  171. package/es/components/molecules/Select/Select.d.ts +2 -10
  172. package/es/components/molecules/Select/styled.d.ts +2 -3
  173. package/es/components/molecules/SelectAccount/styled.d.ts +2 -3
  174. package/es/components/molecules/SelectMulti/styled.d.ts +4 -5
  175. package/es/components/molecules/SelectMulti/styled.js +4 -4
  176. package/es/components/molecules/SelectV2/styled.d.ts +5 -6
  177. package/es/components/molecules/SelectV2/styled.js +6 -6
  178. package/es/components/molecules/SettingWrapper/styled.d.ts +1 -1
  179. package/es/components/molecules/ShareAccess/actions.d.ts +6 -2
  180. package/es/components/molecules/ShareAccess/actions.js +4 -1
  181. package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +1 -2
  182. package/es/components/molecules/ShareAccess/constants.d.ts +2 -24
  183. package/es/components/molecules/ShareAccess/constants.js +0 -4
  184. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +5 -6
  185. package/es/components/molecules/ShareAccess/reducer.d.ts +1 -1
  186. package/es/components/molecules/ShareAccess/reducer.js +1 -1
  187. package/es/components/molecules/ShareAccess/types.d.ts +3 -11
  188. package/es/components/molecules/ShareAccess/utils.d.ts +3 -3
  189. package/es/components/molecules/Tabs/Tabs.d.ts +1 -2
  190. package/es/components/molecules/TagifyInput/TagifyInput.js +27 -114
  191. package/es/components/molecules/TagifyInput/constants.d.ts +2 -11
  192. package/es/components/molecules/TagifyInput/constants.js +0 -1
  193. package/es/components/molecules/TagifyInput/errorWrapper.d.ts +1 -1
  194. package/es/components/molecules/TagifyInput/styled.d.ts +1 -1
  195. package/es/components/molecules/TagifyInput/types.d.ts +1 -27
  196. package/es/components/molecules/TagifyInput/utils.d.ts +1 -4
  197. package/es/components/molecules/TagifyInput/utils.js +0 -9
  198. package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.d.ts +1 -2
  199. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +3 -4
  200. package/es/components/molecules/TemplateSaveAs/styled.d.ts +2 -3
  201. package/es/components/molecules/TemplateSaveAs/styled.js +1 -1
  202. package/es/components/molecules/Tree/Tree.d.ts +1 -10
  203. package/es/components/molecules/Tree/styled.d.ts +5 -12
  204. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +8 -9
  205. package/es/components/molecules/UnsubscribePreferences/styled.d.ts +0 -1
  206. package/es/components/molecules/UnsubscribePreview/components/styled.d.ts +0 -1
  207. package/es/components/molecules/UploadImage/styled.d.ts +1 -1
  208. package/es/components/molecules/UploadImage/styled.js +6 -4
  209. package/es/components/molecules/VirtualizedMenu/VirtualizedMenu.d.ts +3 -2
  210. package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.d.ts +5 -6
  211. package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useFocusManagement.d.ts +0 -1
  212. package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useItemInteraction.d.ts +0 -1
  213. package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useKeyboardNavigation.d.ts +0 -1
  214. package/es/components/molecules/VirtualizedMenu/styled.d.ts +0 -1
  215. package/es/components/molecules/VirtualizedMenu/utils.d.ts +0 -1
  216. package/es/components/molecules/index.d.ts +2 -2
  217. package/es/components/molecules/index.js +2 -2
  218. package/es/components/organism/AccountProfile/components/AccountSetting/AccountSetting.js +1 -2
  219. package/es/components/organism/AccountProfile/components/AccountSetting/components/EditableInput/constant.js +3 -3
  220. package/es/components/organism/AccountProfile/components/AccountSetting/components/EditableInput/index.js +1 -1
  221. package/es/components/organism/AccountProfile/components/AccountSetting/components/LanguageSelector/styles.d.ts +5 -6
  222. package/es/components/organism/AccountProfile/components/AccountSetting/components/LanguageSelector/styles.js +1 -1
  223. package/es/components/organism/AccountProfile/components/AccountSetting/styled.d.ts +0 -1
  224. package/es/components/organism/AccountProfile/components/AccountSetting/types.d.ts +0 -1
  225. package/es/components/organism/AccountProfile/components/AccountSetting/types.js +0 -1
  226. package/es/components/organism/AccountProfile/components/AccountSetting/utils.js +7 -5
  227. package/es/components/organism/AccountSharing/AccountSharing.d.ts +0 -1
  228. package/es/components/organism/AccountSharing/AccountSharing.js +33 -17
  229. package/es/components/organism/AccountSharing/styled.js +3 -13
  230. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/ItemGroupEvent.d.ts +1 -1
  231. package/es/components/organism/ActivityTimeline/components/List/styled.d.ts +0 -1
  232. package/es/components/organism/ActivityTimeline/components/ListItem/styled.d.ts +1 -2
  233. package/es/components/organism/ActivityTimeline/components/ProductCard/styled.d.ts +0 -1
  234. package/es/components/organism/ActivityTimeline/components/Slide/styled.d.ts +87 -88
  235. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/styled.d.ts +0 -1
  236. package/es/components/organism/ActivityTimeline/components/TimelineSection/styled.d.ts +1 -1
  237. package/es/components/organism/ActivityTimeline/index.d.ts +2 -16
  238. package/es/components/organism/ActivityTimeline/styled.d.ts +0 -1
  239. package/es/components/organism/ActivityTimeline/types.d.ts +0 -1
  240. package/es/components/organism/AlgorithmsSetting/styled.d.ts +2 -3
  241. package/es/components/organism/AllocateCoupon/AllocateCoupon.d.ts +31 -0
  242. package/es/components/organism/AllocateCoupon/AllocateCoupon.js +33 -0
  243. package/es/components/organism/AllocateCoupon/components/ConditionRow.d.ts +16 -0
  244. package/es/components/organism/AllocateCoupon/components/ConditionRow.js +67 -0
  245. package/es/components/organism/AllocateCoupon/components/ConditionsField.d.ts +12 -0
  246. package/es/components/organism/AllocateCoupon/components/ConditionsField.js +27 -0
  247. package/es/components/organism/AllocateCoupon/components/EventRefDisplay.d.ts +15 -0
  248. package/es/components/organism/AllocateCoupon/components/EventRefDisplay.js +28 -0
  249. package/es/components/organism/AllocateCoupon/components/FieldRow.d.ts +15 -0
  250. package/es/components/organism/AllocateCoupon/components/FieldRow.js +15 -0
  251. package/es/components/organism/AllocateCoupon/components/IdentifierField.d.ts +13 -0
  252. package/es/components/organism/AllocateCoupon/components/IdentifierField.js +24 -0
  253. package/es/components/organism/AllocateCoupon/components/PoolField.d.ts +8 -0
  254. package/es/components/organism/AllocateCoupon/components/PoolField.js +17 -0
  255. package/es/components/organism/AllocateCoupon/components/QuantityField.d.ts +20 -0
  256. package/es/components/organism/AllocateCoupon/components/QuantityField.js +58 -0
  257. package/es/components/organism/AllocateCoupon/components/RefreshButton.d.ts +14 -0
  258. package/es/components/organism/AllocateCoupon/components/RefreshButton.js +21 -0
  259. package/es/components/organism/AllocateCoupon/components/Root.d.ts +10 -0
  260. package/es/components/organism/AllocateCoupon/components/Root.js +20 -0
  261. package/es/components/organism/AllocateCoupon/components/SourceEventField.d.ts +15 -0
  262. package/es/components/organism/AllocateCoupon/components/SourceEventField.js +50 -0
  263. package/es/components/organism/AllocateCoupon/constants/index.d.ts +59 -0
  264. package/es/components/organism/AllocateCoupon/constants/index.js +70 -0
  265. package/es/components/organism/AllocateCoupon/contexts/AllocateCouponContext.d.ts +4 -0
  266. package/es/components/organism/AllocateCoupon/contexts/AllocateCouponContext.js +15 -0
  267. package/es/components/organism/AllocateCoupon/hooks/useAllocateCoupon.d.ts +2 -0
  268. package/es/components/organism/AllocateCoupon/hooks/useAllocateCoupon.js +231 -0
  269. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponAttributeOptions.d.ts +27 -0
  270. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponAttributeOptions.js +45 -0
  271. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponStore.d.ts +8 -0
  272. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponStore.js +23 -0
  273. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponSync.d.ts +8 -0
  274. package/es/components/organism/AllocateCoupon/hooks/useAllocateCouponSync.js +43 -0
  275. package/es/components/organism/AllocateCoupon/index.d.ts +15 -0
  276. package/es/components/organism/AllocateCoupon/index.js +5 -0
  277. package/es/components/organism/AllocateCoupon/providers/AllocateCouponProvider.d.ts +8 -0
  278. package/es/components/organism/AllocateCoupon/providers/AllocateCouponProvider.js +7 -0
  279. package/es/components/organism/AllocateCoupon/stores/index.d.ts +11 -0
  280. package/es/components/organism/AllocateCoupon/stores/index.js +59 -0
  281. package/es/components/organism/AllocateCoupon/styles.scss +141 -0
  282. package/es/components/organism/AllocateCoupon/types/index.d.ts +336 -0
  283. package/es/components/organism/AllocateCoupon/types/index.js +22 -0
  284. package/es/components/organism/AllocateCoupon/utils/index.d.ts +50 -0
  285. package/es/components/organism/AllocateCoupon/utils/index.js +215 -0
  286. package/es/components/organism/BasicLogin/components/ChooseMethod/Method.d.ts +0 -1
  287. package/es/components/organism/BasicLogin/components/ChooseMethod/styled.d.ts +1 -2
  288. package/es/components/organism/BasicLogin/components/WidgetLayout/styled.d.ts +0 -1
  289. package/es/components/organism/BasicLogin/styled.d.ts +12 -13
  290. package/es/components/organism/ContentSources/Settings.d.ts +0 -3
  291. package/es/components/organism/ContentSources/Settings.js +1 -1
  292. package/es/components/organism/ContentSources/index.d.ts +0 -3
  293. package/es/components/organism/ContentSources/index.js +3 -4
  294. package/es/components/organism/ContentSources/styled.d.ts +1 -2
  295. package/es/components/organism/DataTable/DataTable.js +1 -1
  296. package/es/components/organism/DataTable/components/ModifyColumn/styled.d.ts +2 -3
  297. package/es/components/organism/DataTable/components/Pagination/index.js +1 -1
  298. package/es/components/organism/DataTable/components/Pagination/styled.d.ts +2 -3
  299. package/es/components/organism/DataTable/components/Table/styled.d.ts +6 -6
  300. package/es/components/organism/DataTable/components/Toolbar/styled.d.ts +5 -6
  301. package/es/components/organism/DataTable/constants/toolbar.d.ts +2 -47
  302. package/es/components/organism/DataTable/contexts/DataTableContext.d.ts +0 -1
  303. package/es/components/organism/DataTable/hooks/index.d.ts +0 -1
  304. package/es/components/organism/DataTable/hooks/index.js +0 -1
  305. package/es/components/organism/DataTable/hooks/useDataTableListing/types.d.ts +1 -1
  306. package/es/components/organism/DataTable/index.d.ts +2 -2
  307. package/es/components/organism/DataTable/index.js +1 -1
  308. package/es/components/organism/DataTable/providers/AntdTableConfigProvider.d.ts +2 -1
  309. package/es/components/organism/DataTable/styled/index.d.ts +3 -4
  310. package/es/components/organism/DataTable/types/index.d.ts +2 -3
  311. package/es/components/organism/DataTable/types/toolbar.d.ts +1 -1
  312. package/es/components/organism/DataTable/utils/filter.d.ts +3 -3
  313. package/es/components/organism/Filter/components/FilterActionButton.js +1 -1
  314. package/es/components/organism/Filter/components/FilterCondition/styled.d.ts +1 -2
  315. package/es/components/organism/Filter/contexts/FilterContext.d.ts +0 -1
  316. package/es/components/organism/Filter/hooks/useAddFilterCondition.d.ts +7 -8
  317. package/es/components/organism/Filter/styled.d.ts +4 -5
  318. package/es/components/organism/Filter/types/index.d.ts +1 -2
  319. package/es/components/organism/Filter/utils/index.d.ts +4 -3
  320. package/es/components/organism/Filter/utils/index.js +1 -1
  321. package/es/components/organism/FilterSetting/components/common/InputOrSelect/index.d.ts +9 -9
  322. package/es/components/organism/FilterSetting/components/common/InputSelectMulti/ColumnSuggestion/index.d.ts +1 -1
  323. package/es/components/organism/FilterSetting/components/common/InputSelectMulti/Tree/index.d.ts +1 -1
  324. package/es/components/organism/FilterSetting/components/common/InputSelectMulti/index.d.ts +2 -1
  325. package/es/components/organism/FilterSetting/constants.d.ts +57 -1
  326. package/es/components/organism/FilterSetting/context.d.ts +0 -1
  327. package/es/components/organism/Help/Help.js +37 -35
  328. package/es/components/organism/Help/styled.d.ts +11 -16
  329. package/es/components/organism/Help/utils.js +1 -0
  330. package/es/components/organism/LeftMenu/LeftMenu.d.ts +1 -1
  331. package/es/components/organism/LeftMenu/LeftMenu.js +7 -7
  332. package/es/components/organism/LeftMenu/components/CustomMenu/index.js +1 -1
  333. package/es/components/organism/LeftMenu/components/HomeMenu/index.d.ts +3 -1
  334. package/es/components/organism/LeftMenu/components/HomeMenu/index.js +0 -36
  335. package/es/components/organism/LeftMenu/components/HomeMenu/styled.d.ts +1 -2
  336. package/es/components/organism/LeftMenu/components/HomeMenu/useHomeMenu.d.ts +1 -2
  337. package/es/components/organism/LeftMenu/components/HomeMenu/useHomeMenu.js +1 -1
  338. package/es/components/organism/LeftMenu/components/common/ChildMenu/components/MenuItemImage/styled.d.ts +1 -2
  339. package/es/components/organism/LeftMenu/components/common/ChildMenu/index.js +1 -1
  340. package/es/components/organism/LeftMenu/components/common/ChildMenu/styled.d.ts +2 -3
  341. package/es/components/organism/LeftMenu/contexts/index.d.ts +0 -1
  342. package/es/components/organism/LeftMenu/hooks/useLeftMenu.d.ts +1 -1
  343. package/es/components/organism/LeftMenu/index.d.ts +24 -2
  344. package/es/components/organism/LeftMenu/styled.d.ts +4 -5
  345. package/es/components/organism/LeftMenu/styled.js +0 -2
  346. package/es/components/organism/LeftMenu/types/index.d.ts +1 -30
  347. package/es/components/organism/LeftMenu/utils/index.d.ts +5 -5
  348. package/es/components/organism/LeftMenu/utils/index.js +5 -7
  349. package/es/components/organism/Login/Login.js +36 -19
  350. package/es/components/organism/Login/components/ChooseMethod/Method.d.ts +0 -1
  351. package/es/components/organism/Login/components/ChooseMethod/styled.d.ts +1 -2
  352. package/es/components/organism/Login/components/SignIn/SignIn.js +2 -2
  353. package/es/components/organism/Login/components/VerifyAccount/styled.d.ts +7 -8
  354. package/es/components/organism/Login/components/WidgetLayout/styled.d.ts +0 -1
  355. package/es/components/organism/Login/styled.d.ts +14 -15
  356. package/es/components/organism/Login/types/index.d.ts +0 -2
  357. package/es/components/organism/Menu/styled.d.ts +1 -1
  358. package/es/components/organism/ModifyColumnModal/styled.d.ts +3 -4
  359. package/es/components/organism/Notification/styled.d.ts +0 -1
  360. package/es/components/organism/PreviewCollections/WhatsappMessage/CarouselMessage/styled.d.ts +0 -1
  361. package/es/components/organism/PreviewCollections/WhatsappMessage/utils.d.ts +2 -2
  362. package/es/components/organism/PreviewCollections/styled.d.ts +4 -3
  363. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.d.ts +1 -1
  364. package/es/components/organism/PreviewTemplateModal/components/Banner/styled.js +3 -1
  365. package/es/components/organism/PreviewTemplateModal/components/Information/styled.d.ts +2 -3
  366. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +1 -1
  367. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.d.ts +1 -2
  368. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +1 -1
  369. package/es/components/organism/PreviewTemplateModal/stories/dataTypes/dataType.stories.js +2 -1
  370. package/es/components/organism/PreviewTemplateModal/styled.d.ts +0 -1
  371. package/es/components/organism/PreviewTemplateModal/styled.js +1 -1
  372. package/es/components/organism/PreviewTemplateModal/types.d.ts +2 -3
  373. package/es/components/organism/SQLGeneration/components/CheckboxShowDiff.d.ts +0 -1
  374. package/es/components/organism/SQLGeneration/components/SQLGenerationCodeBlock.d.ts +0 -1
  375. package/es/components/organism/SQLGeneration/components/SQLGenerationPagination.d.ts +0 -1
  376. package/es/components/organism/SQLGeneration/components/SQLGenerationQuerySummary.d.ts +0 -1
  377. package/es/components/organism/SQLGeneration/components/SQLGenerationResult.d.ts +0 -1
  378. package/es/components/organism/SQLGeneration/components/styled.d.ts +1 -2
  379. package/es/components/organism/SQLGeneration/index.d.ts +1 -1
  380. package/es/components/organism/SQLGeneration/store/store.d.ts +42 -83
  381. package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +6 -6
  382. package/es/components/organism/TextEditor/TextEditor.d.ts +2 -2
  383. package/es/components/organism/TextEditor/index.d.ts +2 -3
  384. package/es/components/organism/TextEditor/provider.d.ts +0 -1
  385. package/es/components/organism/TextEditor/styled.d.ts +1 -2
  386. package/es/components/organism/TextEditor/types.d.ts +3 -68
  387. package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.d.ts +0 -1
  388. package/es/components/organism/TextEditor/ui/Button/Button.d.ts +5 -6
  389. package/es/components/organism/TextEditor/ui/Button/types.d.ts +0 -1
  390. package/es/components/organism/TextEditor/ui/Emoji/EmojiList.d.ts +0 -1
  391. package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.d.ts +0 -1
  392. package/es/components/organism/TextEditor/ui/Popover/Popover.d.ts +0 -1
  393. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.d.ts +0 -1
  394. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.d.ts +0 -1
  395. package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.d.ts +0 -1
  396. package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.d.ts +0 -1
  397. package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.d.ts +0 -1
  398. package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.d.ts +0 -1
  399. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.d.ts +0 -1
  400. package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.d.ts +0 -1
  401. package/es/components/organism/TextEditor/utils/link.d.ts +6 -6
  402. package/es/components/organism/TicketEditor/Content.js +29 -47
  403. package/es/components/organism/TicketEditor/components/MessageComponent.js +3 -3
  404. package/es/components/organism/TicketEditor/components/icons/AddTicketIcon.d.ts +1 -1
  405. package/es/components/organism/TicketEditor/components/icons/AddTicketIcon.js +3 -1
  406. package/es/components/organism/TicketEditor/components/icons/TicketIcon.d.ts +1 -2
  407. package/es/components/organism/TicketEditor/components/icons/TicketIcon.js +3 -1
  408. package/es/components/organism/TicketEditor/styled.d.ts +5 -6
  409. package/es/components/organism/TicketEditor/styled.js +0 -10
  410. package/es/components/organism/TicketEditor/util.d.ts +1 -2
  411. package/es/components/organism/TicketEditor/util.js +2 -27
  412. package/es/components/organism/TicketEditorV2/Content.d.ts +0 -1
  413. package/es/components/organism/TicketEditorV2/Content.js +18 -29
  414. package/es/components/organism/TicketEditorV2/components/MessageComponent.js +1 -1
  415. package/es/components/organism/TicketEditorV2/queries/useGetDetailTicket.d.ts +1 -1
  416. package/es/components/organism/TicketEditorV2/queries/useGetListComments.d.ts +1 -1
  417. package/es/components/organism/TicketEditorV2/styled.d.ts +5 -6
  418. package/es/components/organism/index.d.ts +1 -1
  419. package/es/components/organism/index.js +1 -1
  420. package/es/components/template/Layout/Layout.js +1 -3
  421. package/es/components/template/Layout/components/RecommendationWorkspace/components/MenuMapping/styled.d.ts +1 -2
  422. package/es/components/template/Layout/stores/index.d.ts +2 -3
  423. package/es/components/template/Layout/styled.d.ts +4 -5
  424. package/es/components/template/Layout/types.d.ts +0 -1
  425. package/es/components/template/TemplateListing/Loadable.d.ts +0 -1
  426. package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +1 -2
  427. package/es/components/template/TemplateListing/components/CategoryListing/index.js +1 -1
  428. package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +1 -2
  429. package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +0 -1
  430. package/es/components/template/TemplateListing/components/Empty/styled.d.ts +1 -2
  431. package/es/components/template/TemplateListing/constants/defaultProps.d.ts +1 -1
  432. package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +2 -3
  433. package/es/components/template/TemplateListing/stories/dataTypes/dataType.stories.js +2 -1
  434. package/es/components/template/TemplateListing/styled/index.d.ts +1 -2
  435. package/es/components/template/TemplateListing/types/Empty.d.ts +0 -1
  436. package/es/components/template/TemplateListing/types/TemplateListing.d.ts +8 -2
  437. package/es/components/template/TemplateListing/types/index.d.ts +0 -1
  438. package/es/constants/api.d.ts +19 -9
  439. package/es/constants/api.js +0 -7
  440. package/es/constants/queries.d.ts +0 -1
  441. package/es/constants/queries.js +0 -1
  442. package/es/constants/theme.d.ts +1 -3
  443. package/es/constants/unsubscribe.d.ts +11 -1
  444. package/es/hooks/index.d.ts +0 -1
  445. package/es/hooks/useDebounce.d.ts +0 -1
  446. package/es/hooks/useDeepCompareMemo.d.ts +0 -1
  447. package/es/hooks/useDragEvent.d.ts +1 -1
  448. package/es/hooks/useEffectWithTarget.d.ts +1 -2
  449. package/es/hooks/useElementSize.d.ts +0 -1
  450. package/es/hooks/useFocusManagement.d.ts +0 -1
  451. package/es/hooks/useKeyEventCanvas.d.ts +1 -1
  452. package/es/hooks/useLatest.d.ts +0 -1
  453. package/es/hooks/useListingItemResize.d.ts +0 -1
  454. package/es/hooks/useOutsideClick.d.ts +0 -1
  455. package/es/locales/en/translation.json +75 -0
  456. package/es/locales/i18n.d.ts +150 -0
  457. package/es/locales/vi/translation.json +75 -0
  458. package/es/models/PromotionPool.d.ts +3 -0
  459. package/es/models/PromotionPool.js +4 -0
  460. package/es/providers/AppConfigProvider/contexts/index.d.ts +3 -4
  461. package/es/providers/AppConfigProvider/contexts/index.js +3 -5
  462. package/es/providers/ConfigProvider/ConfigProvider.d.ts +1 -1
  463. package/es/providers/ConfigProvider/ConfigProvider.js +1 -1
  464. package/es/providers/ConfigProvider/GlobalStyle.js +3 -2
  465. package/es/queries/Account/useGetAccountList.js +1 -1
  466. package/es/queries/BusinessObject/useGetListEventAttr.d.ts +1 -1
  467. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +1 -1
  468. package/es/queries/CustomFunction/useCustomFunction.d.ts +1 -1
  469. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +1 -1
  470. package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +1 -1
  471. package/es/queries/TemplateListing/index.d.ts +1 -1
  472. package/es/queries/User/index.d.ts +1 -0
  473. package/es/queries/User/index.js +1 -0
  474. package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +3 -3
  475. package/es/services/index.js +5 -3
  476. package/es/styled/common.d.ts +1 -2
  477. package/es/test.d.ts +11 -0
  478. package/es/test.js +377 -138
  479. package/es/utils/color.d.ts +1 -0
  480. package/es/utils/common.js +1 -0
  481. package/es/utils/cookie.js +4 -5
  482. package/es/utils/web.d.ts +1 -2
  483. package/package.json +57 -80
  484. package/es/__tests__/fileMock.test.d.ts +0 -2
  485. package/es/__tests__/fileMock.test.js +0 -2
  486. package/es/__tests__/styleMock.test.d.ts +0 -1
  487. package/es/__tests__/styleMock.test.js +0 -2
  488. package/es/components/atoms/Input/types.d.ts +0 -17
  489. package/es/components/atoms/Input/types.js +0 -1
  490. package/es/components/atoms/Popover/styled.d.ts +0 -4
  491. package/es/components/atoms/Popover/styled.js +0 -5
  492. package/es/components/molecules/UploadImage/MediaThumb.d.ts +0 -8
  493. package/es/components/molecules/UploadImage/MediaThumb.js +0 -15
  494. package/es/components/molecules/UploadImage/VideoThumbnail.d.ts +0 -4
  495. package/es/components/molecules/UploadImage/VideoThumbnail.js +0 -40
  496. package/es/components/organism/DataTable/hooks/useCDPTable/useCDPTable.d.ts +0 -58
  497. package/es/components/organism/DataTable/hooks/useCDPTable/useCDPTable.js +0 -127
  498. package/es/components/organism/FilterSetting/components/common/InputSelectMulti/types.d.ts +0 -1
  499. package/es/components/organism/FilterSetting/components/common/InputSelectMulti/types.js +0 -1
  500. package/es/components/organism/GenerativeInsights/constants.d.ts +0 -1
  501. package/es/components/organism/GenerativeInsights/constants.js +0 -1
  502. package/es/components/organism/GenerativeInsights/index.d.ts +0 -11
  503. package/es/components/organism/GenerativeInsights/index.js +0 -54
  504. package/es/components/organism/GenerativeInsights/styled.d.ts +0 -12
  505. package/es/components/organism/GenerativeInsights/styled.js +0 -65
  506. package/es/components/organism/GenerativeInsights/utils.d.ts +0 -13
  507. package/es/components/organism/GenerativeInsights/utils.js +0 -49
  508. package/es/components/organism/LeftMenu/components/HomeMenu/types.d.ts +0 -3
  509. package/es/components/organism/LeftMenu/components/HomeMenu/types.js +0 -1
  510. package/es/components/organism/LeftMenu/hooks/types.d.ts +0 -24
  511. package/es/components/organism/LeftMenu/hooks/types.js +0 -1
  512. package/es/components/template/TemplateListing/types/TemplateItem.d.ts +0 -7
  513. package/es/components/template/TemplateListing/types/TemplateItem.js +0 -1
  514. package/es/utils/crossSubdomainCookieOptions.d.ts +0 -14
  515. package/es/utils/crossSubdomainCookieOptions.js +0 -12
@@ -1,12 +1 @@
1
- import React from 'react';
2
- declare global {
3
- interface NodeRequire {
4
- context: (directory: string, useSubdirectories: boolean, regExp: RegExp) => {
5
- keys: () => string[];
6
- (id: string): {
7
- default: React.ComponentType;
8
- };
9
- };
10
- }
11
- }
12
1
  export declare const IconGallery: () => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,23 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /// <reference types="vite/client" />
2
3
  import { useDebounce } from '@antscorp/antsomi-ui/es/hooks/useDebounceV2';
3
4
  import { ConfigProvider } from '@antscorp/antsomi-ui/es/providers';
4
5
  import { searchMatchAny } from '@antscorp/antsomi-ui/es/utils';
6
+ import { useVirtualizer } from '@tanstack/react-virtual';
5
7
  import { message } from 'antd';
6
- import { useMemo, useState } from 'react';
8
+ import { useMemo, useRef, useState } from 'react';
7
9
  import { Flex, Input, Typography } from '../../index';
8
10
  import { IconGalleryStyled } from './styled';
9
11
  import { queryClientAntsomiUI, QueryClientProviderAntsomiUI, } from '@antscorp/antsomi-ui/es/queries';
10
12
  const REGEX_DATA_SEARCH = /(?<=\/\/ search tag: ).*/g;
11
- const requireContext = require.context('../', false, /\.tsx$/);
12
- const icons = requireContext
13
- .keys()
14
- .filter(key => key.startsWith('./'))
15
- .map(key => {
16
- const componentName = key.replace('./', '').replace('.tsx', '');
17
- const Component = requireContext(key)[componentName];
18
- const compiledCode = requireContext(key)[componentName]?.render?.toString() || '';
19
- // console.log('🚀 ~ compiledCode:', compiledCode);
13
+ const COLUMNS = 5;
14
+ const ROW_ESTIMATE_SIZE = 140;
15
+ // Vite equivalent of webpack's `require.context('../', false, /\.tsx$/)`.
16
+ const iconModules = import.meta.glob('../*.tsx', { eager: true });
17
+ const icons = Object.entries(iconModules).map(([path, mod]) => {
18
+ const componentName = path.replace('../', '').replace('.tsx', '');
19
+ const Component = mod[componentName];
20
+ const compiledCode = Component?.render?.toString() || '';
20
21
  const dataSearch = compiledCode.match(REGEX_DATA_SEARCH);
21
22
  return {
22
23
  name: componentName,
@@ -26,6 +27,7 @@ const icons = requireContext
26
27
  });
27
28
  export const IconGallery = () => {
28
29
  const [search, setSearch] = useState('');
30
+ const scrollContainerRef = useRef(null);
29
31
  const debounceSearchValue = useDebounce(search, 300);
30
32
  const invalidIcons = [];
31
33
  const validIcons = useMemo(() => icons.filter(iconObj => {
@@ -35,14 +37,32 @@ export const IconGallery = () => {
35
37
  }),
36
38
  // eslint-disable-next-line react-hooks/exhaustive-deps
37
39
  []);
38
- return (_jsx(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI, children: _jsx(ConfigProvider, { children: _jsxs(IconGalleryStyled, { children: [invalidIcons.length > 0 ? (_jsxs("div", { children: [_jsx("h4", { children: "These components below are invalid (check name and file name is correct?)" }), invalidIcons.map(item => (_jsx("strong", { style: { color: 'red' }, children: _jsx("pre", { children: item.name }) }, item.name)))] })) : null, _jsx(Input, { placeholder: "Search Icon", value: search, onChange: e => setSearch(e.target.value), style: { fontSize: '16px' } }), _jsx(Flex, { className: "grid-container", gap: 16, children: validIcons
39
- .filter(item => searchMatchAny([item.name, ...item.dataSearch], debounceSearchValue))
40
- .map(item => {
41
- const { Component, name } = item;
42
- return (_jsxs("div", { className: "grid-item", onClick: () => {
43
- const copiedText = `<${name} />`;
44
- navigator.clipboard.writeText(copiedText);
45
- message.success(`${copiedText} copied to clipboard 🚀`);
46
- }, children: [_jsx(Component, {}), _jsx(Typography.Text, { ellipsis: { tooltip: true }, children: name })] }, name));
47
- }) })] }) }) }));
40
+ const filteredIcons = useMemo(() => validIcons.filter(item => searchMatchAny([item.name, ...item.dataSearch], debounceSearchValue)), [validIcons, debounceSearchValue]);
41
+ const rows = useMemo(() => {
42
+ const chunked = [];
43
+ for (let i = 0; i < filteredIcons.length; i += COLUMNS) {
44
+ chunked.push(filteredIcons.slice(i, i + COLUMNS));
45
+ }
46
+ return chunked;
47
+ }, [filteredIcons]);
48
+ const rowVirtualizer = useVirtualizer({
49
+ count: rows.length,
50
+ getScrollElement: () => scrollContainerRef.current,
51
+ estimateSize: () => ROW_ESTIMATE_SIZE,
52
+ overscan: 5,
53
+ });
54
+ return (_jsx(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI, children: _jsx(ConfigProvider, { children: _jsxs(IconGalleryStyled, { children: [invalidIcons.length > 0 ? (_jsxs("div", { children: [_jsx("h4", { children: "These components below are invalid (check name and file name is correct?)" }), invalidIcons.map(item => (_jsx("strong", { style: { color: 'red' }, children: _jsx("pre", { children: item.name }) }, item.name)))] })) : null, _jsx(Input, { placeholder: "Search Icon", value: search, onChange: e => setSearch(e.target.value), style: { fontSize: '16px' } }), _jsx("div", { ref: scrollContainerRef, className: "grid-scroll-container", children: _jsx("div", { style: { position: 'relative', width: '100%', height: rowVirtualizer.getTotalSize() }, children: rowVirtualizer.getVirtualItems().map(virtualRow => (_jsx(Flex, { ref: rowVirtualizer.measureElement, "data-index": virtualRow.index, className: "grid-container", gap: 16, style: {
55
+ position: 'absolute',
56
+ top: 0,
57
+ left: 0,
58
+ width: '100%',
59
+ transform: `translateY(${virtualRow.start}px)`,
60
+ }, children: rows[virtualRow.index].map(item => {
61
+ const { Component, name } = item;
62
+ return (_jsxs("div", { className: "grid-item", onClick: () => {
63
+ const copiedText = `<${name} />`;
64
+ navigator.clipboard.writeText(copiedText);
65
+ message.success(`${copiedText} copied to clipboard 🚀`);
66
+ }, children: [_jsx(Component, {}), _jsx(Typography.Text, { ellipsis: { tooltip: true }, children: name })] }, name));
67
+ }) }, virtualRow.key))) }) })] }) }) }));
48
68
  };
@@ -1,11 +1,11 @@
1
1
  import { globalToken } from '@antscorp/antsomi-ui/es/constants';
2
2
  import styled from 'styled-components';
3
3
  export const IconGalleryStyled = styled.div `
4
- .grid-container {
5
- /* NOTE: I don't know why gutter of antd Row doesn't apply for row-gap */
6
- /* row-gap: 16px; */
4
+ .grid-scroll-container {
5
+ position: relative;
7
6
  margin-top: 24px;
8
- flex-wrap: wrap;
7
+ height: 70vh;
8
+ overflow-y: auto;
9
9
  }
10
10
 
11
11
  .grid-item {
@@ -401,5 +401,5 @@ export { WebIcon } from './WebIcon';
401
401
  export { WebPersonalizationIcon } from './WebPersonalizationIcon';
402
402
  export { WidgetIcon } from './WidgetIcon';
403
403
  export { WritingAIAssitantIcon } from './WritingAIAssitantIcon';
404
- export { QRSetDashboardIcon } from './QRSetDashboardIcon';
405
404
  export { QRCodeManagementIcon } from './QRCodeManagementIcon';
405
+ export { QRSetDashboardIcon } from './QRSetDashboardIcon';
@@ -401,5 +401,5 @@ export { WebIcon } from './WebIcon';
401
401
  export { WebPersonalizationIcon } from './WebPersonalizationIcon';
402
402
  export { WidgetIcon } from './WidgetIcon';
403
403
  export { WritingAIAssitantIcon } from './WritingAIAssitantIcon';
404
- export { QRSetDashboardIcon } from './QRSetDashboardIcon';
405
404
  export { QRCodeManagementIcon } from './QRCodeManagementIcon';
405
+ export { QRSetDashboardIcon } from './QRSetDashboardIcon';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface IconProps extends React.ComponentPropsWithoutRef<'svg'> {
3
2
  size?: number;
4
3
  }
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export declare const AccessDeniedWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const AccessDeniedWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -44,7 +44,7 @@ export const AccountListing = React.forwardRef((props, ref) => {
44
44
  },
45
45
  // eslint-disable-next-line react-hooks/exhaustive-deps
46
46
  [onChange, recentData]);
47
- return (_jsxs(AccountSelectionStyled, { className: className, children: [_jsx(Input, { placeholder: "Search", suffix: _jsx(Icon, { type: "icon-ants-search-2", style: { fontSize: '24px', color: THEME.token?.bw8 } }), value: searchValue, onChange: event => setSearchValue(event.target.value) }), _jsx("div", { className: "account-list", children: _jsx("ul", { children: _jsxs(Scrollbars, { style: { width: '100%', height: showAllAccount ? '364px' : '410px' }, children: [recentData?.value?.length && recentData?.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { className: "recent-text", children: "Recent" }), recentData?.value
47
+ return (_jsxs(AccountSelectionStyled, { className: className, children: [_jsx(Input, { placeholder: "Search", suffix: _jsx(Icon, { type: "icon-ants-search-2", style: { fontSize: '24px', color: THEME.token?.bw8 } }), value: searchValue, onChange: event => setSearchValue(event.target.value) }), _jsx("div", { className: "account-list", children: _jsx("ul", { children: _jsxs(Scrollbars, { style: { width: '100%', height: showAllAccount ? '364px' : '410px' }, children: [recentData?.value?.length ? (_jsxs(_Fragment, { children: [_jsx(Text, { className: "recent-text", children: "Recent" }), recentData?.value
48
48
  .map(accountId => accountData?.find(account => account.userId === accountId))
49
49
  .filter((accountId, index, self) => Boolean(accountId) && index === self.indexOf(accountId))
50
50
  .map(account => (_jsx(AccountItem, { userName: account.userName, userId: account.userId, onClick: handleSelectAccount, isSelected: +currentAccount === account.userId }, account.userId))), _jsx(Divider, { style: { margin: '8px 0', color: THEME.token?.bw3 } })] })) : null, stateAccountData
@@ -1,3 +1,4 @@
1
1
  export { AccountSelection, type AccountSelectionProps } from './AccountSelection';
2
- export { AccountListing, type AccountListingHandle } from './AccountListing';
2
+ export { AccountListing } from './AccountListing';
3
+ export type { AccountListingHandle } from './AccountListing';
3
4
  export { useAccountSelection } from './hooks';
@@ -1,3 +1,34 @@
1
1
  import React from 'react';
2
- import { AddDynamicContentProps } from './types';
2
+ import { APIConfig, TDataType } from './types';
3
+ export interface LabeledValue {
4
+ label: string;
5
+ value: string;
6
+ dataType?: TDataType;
7
+ disabled?: boolean;
8
+ status?: any;
9
+ }
10
+ export interface LabeledTreeValue extends LabeledValue {
11
+ [key: string]: any;
12
+ children: LabeledTreeValue[];
13
+ disableCheckbox?: boolean;
14
+ selectable?: boolean;
15
+ checkable?: boolean;
16
+ type: number | null;
17
+ status?: any;
18
+ }
19
+ export interface AddDynamicContentProps {
20
+ defaultDynamicIndex?: number;
21
+ journeySettings: Record<string, any>;
22
+ contentSources: Record<string, any>;
23
+ additionalAttrProperties?: string[];
24
+ defaultData?: Record<string, any>;
25
+ visible: boolean;
26
+ showDisplayFormat?: boolean;
27
+ showIndex?: boolean;
28
+ onCancel?: () => void;
29
+ onOk?: (value: Record<string, any>) => void;
30
+ modalTitle?: string;
31
+ isShowCustomFunction?: boolean;
32
+ APIConfig: APIConfig;
33
+ }
3
34
  export declare const AddDynamicContent: React.FC<AddDynamicContentProps>;
@@ -15,7 +15,6 @@ import { Text } from '@antscorp/antsomi-ui/es/components/atoms/Text';
15
15
  import { Form, Select, TreeSelect } from 'antd';
16
16
  import { TreeNode } from 'rc-tree-select';
17
17
  // Locales
18
- import { translate, translations as translationLib } from '@antscorp/antsomi-locales';
19
18
  import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
20
19
  import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
21
20
  // Query
@@ -34,7 +33,6 @@ import { buildMappingFields, buildOptionAttrArchive, checkStatusAttr, CUSTOM_TYP
34
33
  // Style
35
34
  import { EditorScript } from '../EditorScript';
36
35
  import { InputSuggestion, ModalCustom } from './styled';
37
- import { Input, Radio } from '../../atoms';
38
36
  const getMembers = (member) => {
39
37
  if (!member.children || !member.children.length) {
40
38
  return member;
@@ -305,12 +303,6 @@ export const AddDynamicContent = props => {
305
303
  }
306
304
  return false;
307
305
  }, [selectedAttr, selectedDynamicContentType, eventTrackingAttributes?.mainObjects]);
308
- const eventBOAttributeLabel = useMemo(() => {
309
- if (!selectedAttr?.itemTypeId || !listEventAttributes)
310
- return '';
311
- const boAttr = listEventAttributes.find(row => row.itemTypeId === selectedAttr?.itemTypeId);
312
- return boAttr?.label;
313
- }, [listEventAttributes, selectedAttr]);
314
306
  const itemTypeName = useMemo(() => {
315
307
  let draftItemTypeName = '';
316
308
  if (itemTypeId) {
@@ -424,8 +416,6 @@ export const AddDynamicContent = props => {
424
416
  [DYNAMIC_CONTENT_SETTING_KEY.DISPLAY_FORMAT_TYPE]: undefined,
425
417
  [DYNAMIC_CONTENT_SETTING_KEY.FUNCTION]: undefined,
426
418
  [DYNAMIC_CONTENT_SETTING_KEY.DATA_TYPE]: optionDataType[0].value,
427
- [DYNAMIC_CONTENT_SETTING_KEY.DEFAULT_VALUE]: '',
428
- [DYNAMIC_CONTENT_SETTING_KEY.DATA_SOURCE]: 'event',
429
419
  });
430
420
  }, [form]);
431
421
  useEffect(() => {
@@ -1129,7 +1119,7 @@ export const AddDynamicContent = props => {
1129
1119
  __html: `${t(translations.dynamicContent.modal.label.displayFormat)}: <bdo dir='ltr'>${formatedAttr}</bdo>`,
1130
1120
  } })) : null, !showDetailEditDF && (_jsx(Button, { disabled: isActionArchive &&
1131
1121
  selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, type: "text", style: { display: 'inline-block' }, onClick: () => setShowDetailEditDF(prevShow => !prevShow), children: t(translations.edit.title) }))] }), children: _jsx(Select, { disabled: isActionArchive &&
1132
- selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions }) }), renderDefaultValue()] }));
1122
+ selectedDynamicContentType !== DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value, style: { height: 28 }, options: attrDFOptions }) })] }));
1133
1123
  };
1134
1124
  const renderCustomerAttrFields = () => {
1135
1125
  if (hasError[DYNAMIC_CONTENT_SETTING_KEY.ATTRIBUTE]) {
@@ -1215,22 +1205,6 @@ export const AddDynamicContent = props => {
1215
1205
  gap: '8px',
1216
1206
  }, children: _jsx(DisplayFormat, { infos: infos, url: url, displayFormatType: selectedDFType, formatSettings: attrDFSettings, onSettingsChange: (values) => setAttrDFSettings(values), dynamicContentType: form.getFieldValue(DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE) }) }));
1217
1207
  };
1218
- const renderGetFromData = () => (_jsx(Form.Item, { className: "ants-items-center", label: translate(translationLib._TITL_PERSONALIZATION_LOOKUP_YES, 'Get data from'), name: DYNAMIC_CONTENT_SETTING_KEY.DATA_SOURCE, required: true, children: _jsx(Radio.Group, { defaultValue: "event", options: [
1219
- {
1220
- value: 'event',
1221
- label: 'Event data',
1222
- },
1223
- {
1224
- value: 'object',
1225
- label: (_jsxs(Text, { children: [translate(translationLib._TITL_PERSONALIZATION_LOOKUP_YES, 'Data object'), ' ', _jsx("b", { children: eventBOAttributeLabel })] })),
1226
- disabled: !selectedAttr?.itemTypeId,
1227
- },
1228
- ], style: {
1229
- display: 'flex',
1230
- flexDirection: 'column',
1231
- gap: 8,
1232
- } }) }));
1233
- const renderDefaultValue = () => (_jsx(Form.Item, { className: "ants-items-center", label: translate(translations._TITL_DEFAULT_VALUE, 'Default value'), name: DYNAMIC_CONTENT_SETTING_KEY.DEFAULT_VALUE, children: _jsx(Input, { placeholder: "Enter fallback text when data is unavailable" }) }));
1234
1208
  return (_jsx(ModalCustom, { closable: false, destroyOnClose: true, forceRender: true, mask: true, okButtonProps: { disabled: formSubmitDisabled }, title: modalTitle || t(translations.dynamicContent.modal.title.addDynamicContent), visible: visible, onCancel: handleOnCancelModal, onOk: handleOnOkModal, children: _jsxs(Spin, { spinning: isFetchingSourceBO ||
1235
1209
  isFetchingListBoAttr ||
1236
1210
  isFetchingEventAttr ||
@@ -1238,7 +1212,7 @@ export const AddDynamicContent = props => {
1238
1212
  isFetchingPromotionCodeAttr ||
1239
1213
  isFetchingDynamicContentAttr, children: [_jsxs(Form, { style: { width: '100%' }, form: form, labelAlign: "left", labelCol: { span: 9 }, wrapperCol: { span: 15 }, onValuesChange: handleFormValuesChanges, initialValues: {
1240
1214
  [DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE]: listDynamicContentTypes[0].value,
1241
- }, children: [_jsx(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.contentSource), name: DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, required: true, children: _jsx(Select, { style: { height: 28 }, options: listDynamicContentTypes }) }), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value && (_jsxs(_Fragment, { children: [renderVisitorAttrFields(), renderDefaultValue()] })), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value && (_jsxs(_Fragment, { children: [renderCustomerAttrFields(), renderDefaultValue()] })), selectedDynamicContentType === CUSTOM_TYPE.value && _jsx(_Fragment, { children: renderCustomFunctionFields() }), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value && (_jsxs(_Fragment, { children: [renderEventFields(), renderSourceFields(), renderEventAttrFields(), renderGetFromData(), renderDefaultValue(), isShowEventIndexField
1215
+ }, children: [_jsx(Form.Item, { style: { alignItems: 'center' }, label: t(translations.dynamicContent.modal.label.contentSource), name: DYNAMIC_CONTENT_SETTING_KEY.DYNAMIC_CONTENT_TYPE, required: true, children: _jsx(Select, { style: { height: 28 }, options: listDynamicContentTypes }) }), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.VISITOR_ATTRIBUTE.value && (_jsx(_Fragment, { children: renderVisitorAttrFields() })), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.CUSTOMER_ATTRIBUTE.value && (_jsx(_Fragment, { children: renderCustomerAttrFields() })), selectedDynamicContentType === CUSTOM_TYPE.value && _jsx(_Fragment, { children: renderCustomFunctionFields() }), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.EVENT_ATTRIBUTE.value && (_jsxs(_Fragment, { children: [renderEventFields(), renderSourceFields(), renderEventAttrFields(), isShowEventIndexField
1242
1216
  ? renderIndexFields({ disabled: false, loading: false })
1243
1217
  : null] })), selectedDynamicContentType === DYNAMIC_CONTENT_TYPE.PROMOTION_CODE.value && (_jsxs(_Fragment, { children: [renderPromotionPoolFields(), renderPromotionCodeAttr()] })), selectedDynamicContentType && regexCSType.test(selectedDynamicContentType) && (_jsxs(_Fragment, { children: [renderBoAttrFields(), renderIndexFields({ disabled: isActionArchive, loading: isFetchingListBoAttr })] })), showDisplayFormat && renderDisplayFormat()] }), showDisplayFormat && renderDisplayFormat() !== null && renderDetailDFSettings(), isShowCustomFunction && selectedDynamicContentType === CUSTOM_TYPE.value && (_jsx("div", { style: {
1244
1218
  display: 'flex',
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
3
- import { TDisplayFormat } from '../../types';
4
- export type DisplayFormatProps = {
2
+ export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
+ type DisplayFormatProps = {
5
4
  onSettingsChange: (settings: any) => void;
6
5
  formatSettings: any;
7
6
  displayFormatType: TDisplayFormat;
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // Libraries
3
2
  // Components
4
3
  import FormatDatetime from '../FormatDatetime/FormatDatetime';
5
4
  import FormatNumber from '../FormatNumber/FormatNumber';
@@ -1,5 +1,5 @@
1
+ import { TDisplayFormat } from '../DisplayFormat';
1
2
  import { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
- import { TDisplayFormat } from '../../types';
3
3
  declare const groupingOptions: {
4
4
  readonly COMMA: {
5
5
  readonly index: 0;
@@ -32,8 +32,8 @@ declare const decimalOptions: {
32
32
  export type TGroupingSeparator = (typeof groupingOptions)[keyof typeof groupingOptions]['value'];
33
33
  export type TDecimalSeparator = (typeof decimalOptions)[keyof typeof decimalOptions]['value'];
34
34
  export type TNumberFormatSettings = {
35
- grouping: TGroupingSeparator;
36
35
  decimalPlaces: number;
36
+ grouping: TGroupingSeparator;
37
37
  decimal: TDecimalSeparator;
38
38
  isCompact: boolean;
39
39
  currencyCode: string;
@@ -1,3 +1,4 @@
1
+ import { TDataType } from './types';
1
2
  export declare const DYNAMIC_CONTENT_SETTING_KEY: {
2
3
  EVENT: string;
3
4
  INDEX: string;
@@ -12,8 +13,6 @@ export declare const DYNAMIC_CONTENT_SETTING_KEY: {
12
13
  PERNAME: string;
13
14
  SAVE_AS_TEMPLATE: string;
14
15
  DATA_TYPE: string;
15
- DATA_SOURCE: string;
16
- DEFAULT_VALUE: string;
17
16
  };
18
17
  export declare const DYNAMIC_CONTENT_TYPE_KEY: {
19
18
  readonly BO_SETTINGS: "bo-settings";
@@ -30,27 +29,11 @@ export declare const DYNAMIC_CONTENT_TYPE: {
30
29
  value: string;
31
30
  };
32
31
  };
33
- export declare const DYNAMIC_CONTENT_ATTR_DF_TYPE: readonly [{
34
- readonly label: "Number";
35
- readonly value: "number";
36
- readonly dataType: "number";
37
- }, {
38
- readonly label: "Percentage";
39
- readonly value: "percentage";
40
- readonly dataType: "number";
41
- }, {
42
- readonly label: "Currency";
43
- readonly value: "currency";
44
- readonly dataType: "number";
45
- }, {
46
- readonly label: "Datetime";
47
- readonly value: "datetime";
48
- readonly dataType: "datetime";
49
- }, {
50
- readonly label: "Raw string";
51
- readonly value: "raw_string";
52
- readonly dataType: "string";
53
- }];
32
+ export declare const DYNAMIC_CONTENT_ATTR_DF_TYPE: {
33
+ label: string;
34
+ value: string;
35
+ dataType: TDataType;
36
+ }[];
54
37
  export declare const DATA_TYPE: {
55
38
  [key: string]: {
56
39
  index: number;
@@ -117,19 +100,19 @@ export declare const ATTRIBUTE_NUMBERIC_FORMAT_OPTION: {
117
100
  };
118
101
  };
119
102
  export declare const COLLECTION_STATUS: {
120
- readonly 2: {
121
- readonly value: 2;
122
- readonly label: "Disable";
123
- readonly errorMessage: "This collection is disabled";
103
+ 2: {
104
+ value: number;
105
+ label: string;
106
+ errorMessage: string;
124
107
  };
125
- readonly 4: {
126
- readonly value: 4;
127
- readonly label: "Archive";
128
- readonly errorMessage: "This collection is not available";
108
+ 4: {
109
+ value: number;
110
+ label: string;
111
+ errorMessage: string;
129
112
  };
130
- readonly DELETE: {
131
- readonly value: 3;
132
- readonly label: "Delete";
133
- readonly errorMessage: "This collection does not exist";
113
+ DELETE: {
114
+ value: number;
115
+ label: string;
116
+ errorMessage: string;
134
117
  };
135
118
  };
@@ -12,8 +12,6 @@ export const DYNAMIC_CONTENT_SETTING_KEY = {
12
12
  PERNAME: 'templateName',
13
13
  SAVE_AS_TEMPLATE: 'saveAsTemplate',
14
14
  DATA_TYPE: 'dataType',
15
- DATA_SOURCE: 'dataSource',
16
- DEFAULT_VALUE: 'defaultValue',
17
15
  };
18
16
  export const DYNAMIC_CONTENT_TYPE_KEY = {
19
17
  BO_SETTINGS: 'bo-settings',
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
- export declare const InputSuggestion: import("styled-components").StyledComponent<(<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: import("antd").AutoCompleteProps<ValueType, OptionType> & {
3
- children?: import("react").ReactNode;
4
- } & import("react").RefAttributes<import("antd").RefSelectProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
1
+ export declare const InputSuggestion: import("styled-components").StyledComponent<(<ValueType = any, OptionType extends import("rc-select/lib/Select").BaseOptionType | import("rc-select/lib/Select").DefaultOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: import("antd").AutoCompleteProps<ValueType, OptionType> & {
2
+ children?: React.ReactNode;
3
+ } & React.RefAttributes<import("rc-select").BaseSelectRef>) => React.ReactElement) & {
5
4
  displayName?: string | undefined;
6
5
  Option: import("rc-select/lib/Option").OptionFC;
7
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => import("react").JSX.Element;
6
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
8
7
  }, any, {}, never>;
9
8
  export declare const ModalCustom: import("styled-components").StyledComponent<import("react").FC<import("../Modal").ModalProps> & {
10
9
  confirm: (props: import("antd").ModalFuncProps) => {
@@ -11,35 +11,3 @@ export type APIParams = {
11
11
  url: string;
12
12
  } & Record<string, any>;
13
13
  export type DynamicContentType = (typeof DYNAMIC_CONTENT_TYPE_KEY)[keyof typeof DYNAMIC_CONTENT_TYPE_KEY];
14
- export interface LabeledValue {
15
- label: string;
16
- value: string;
17
- dataType?: TDataType;
18
- disabled?: boolean;
19
- status?: any;
20
- }
21
- export interface LabeledTreeValue extends LabeledValue {
22
- [key: string]: any;
23
- children: LabeledTreeValue[];
24
- disableCheckbox?: boolean;
25
- selectable?: boolean;
26
- checkable?: boolean;
27
- type: number | null;
28
- status?: any;
29
- }
30
- export interface AddDynamicContentProps {
31
- defaultDynamicIndex?: number;
32
- journeySettings: Record<string, any>;
33
- contentSources: Record<string, any>;
34
- additionalAttrProperties?: string[];
35
- defaultData?: Record<string, any>;
36
- visible: boolean;
37
- showDisplayFormat?: boolean;
38
- showIndex?: boolean;
39
- onCancel?: () => void;
40
- onOk?: (value: Record<string, any>) => void;
41
- modalTitle?: string;
42
- isShowCustomFunction?: boolean;
43
- APIConfig: APIConfig;
44
- }
45
- export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
@@ -1,6 +1,6 @@
1
1
  import dayjs from 'dayjs';
2
2
  import type { TDatetimeFormatSetting, TNumberFormatSettings } from './components';
3
- import { LabeledTreeValue, LabeledValue } from './types';
3
+ import { LabeledTreeValue, LabeledValue } from './AddDynamicContent';
4
4
  export declare function getStringFormatDateDF(formatSettings: TDatetimeFormatSetting): string;
5
5
  export declare function formatDatetimeDF(date: string | number | dayjs.Dayjs | Date, formatSettings: TDatetimeFormatSetting): string;
6
6
  export declare function formatNumberDF(number: number, fType: 'number' | 'percentage' | 'currency', fOptions?: Omit<TNumberFormatSettings, 'type'>): string;
@@ -4,7 +4,7 @@ export interface AlignEditProps {
4
4
  className?: string;
5
5
  align?: TAlign;
6
6
  onChange?: (align: TAlign) => void;
7
- style?: Object;
7
+ style?: object;
8
8
  }
9
9
  export interface AlignSettingProps extends AlignEditProps {
10
10
  label?: string;
@@ -1,3 +1,3 @@
1
1
  import { TAlign } from './index';
2
2
  export declare const mapAlignToJustifyContent: (value: TAlign) => "auto" | "center" | "end" | "start";
3
- export declare const mapJustifyContentToAlign: (value: 'start' | 'end' | 'center') => string | undefined;
3
+ export declare const mapJustifyContentToAlign: (value: "start" | "end" | "center") => string | undefined;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const ContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const CloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
2
+ export declare const CloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -10,15 +10,16 @@ import { LOCAL_TIMEZONE, RANGE_LIMIT } from './constants';
10
10
  import { initState, resetValue } from './actions';
11
11
  import { useTriggerOut } from './hooks/useTriggerOut';
12
12
  export const CalendarSelection = props => {
13
- const initialized = useRef(false);
13
+ const initialed = useRef(false);
14
14
  const { value, rangeLimit = RANGE_LIMIT, timezone = LOCAL_TIMEZONE, timeDisplayProps, popoverProps, rangePickerProps, onChange, } = props;
15
15
  const [state, dispatch] = useReducer(reducer, INITIAL_STATE);
16
16
  useLayoutEffect(() => {
17
- if (!value || initialized.current)
17
+ if (!value)
18
18
  return;
19
- const needTriggerOut = !initialized.current;
19
+ const needTriggerOut = !initialed.current;
20
+ // console.log({ needTriggerOut });
20
21
  dispatch(initState(value, needTriggerOut));
21
- initialized.current = true;
22
+ initialed.current = true;
22
23
  }, [value]);
23
24
  useLayoutEffect(() => {
24
25
  if (!state.open) {
@@ -1,4 +1,14 @@
1
1
  import { Custom, RangeInfo, CalendarSelectionValue, RangeValue } from './types';
2
+ export declare const ACTION_TYPES: {
3
+ readonly initState: "init_state";
4
+ readonly changeRangeType: "change_range_type";
5
+ readonly updateRangeInfo: "update_range_info";
6
+ readonly updateRangeValue: "update_range_value";
7
+ readonly changeAutoUpdateTo: "change_auto_update_to";
8
+ readonly togglePopover: "toggle_popover";
9
+ readonly apply: "apply";
10
+ readonly resetValue: "reset_value";
11
+ };
2
12
  export declare const changeRangeType: (rangeType: string, callback?: (rangeInfo: RangeInfo) => void) => {
3
13
  type: "change_range_type";
4
14
  payload: {
@@ -23,7 +33,7 @@ export declare const updateRangeValue: (rangeValue: RangeValue[], options?: {
23
33
  } | undefined;
24
34
  };
25
35
  };
26
- export declare const changeAutoUpdateTo: (value: Custom['autoUpdateTo']) => {
36
+ export declare const changeAutoUpdateTo: (value: Custom["autoUpdateTo"]) => {
27
37
  type: "change_auto_update_to";
28
38
  payload: import("./types").AutoUpdateTo;
29
39
  };
@@ -1,4 +1,13 @@
1
- import { ACTION_TYPES } from './constants';
1
+ export const ACTION_TYPES = {
2
+ initState: 'init_state',
3
+ changeRangeType: 'change_range_type',
4
+ updateRangeInfo: 'update_range_info',
5
+ updateRangeValue: 'update_range_value',
6
+ changeAutoUpdateTo: 'change_auto_update_to',
7
+ togglePopover: 'toggle_popover',
8
+ apply: 'apply',
9
+ resetValue: 'reset_value',
10
+ };
2
11
  export const changeRangeType = (rangeType, callback) => ({
3
12
  type: ACTION_TYPES.changeRangeType,
4
13
  payload: { rangeType, callback },
@@ -1,3 +1,10 @@
1
1
  import React from 'react';
2
- import { TimeRangeDisplayProps } from '../../types';
2
+ import { CalendarSelectionValue } from '../../types';
3
+ export type TimeRangeDisplayProps = {
4
+ showType?: boolean;
5
+ formatStart?: string;
6
+ formatEnd?: string;
7
+ operator?: string;
8
+ render?: (value: CalendarSelectionValue, rangeSelectedTitle: string, rangeValueTitles: string[], handleOpenPopover: () => void) => React.ReactNode;
9
+ };
3
10
  export declare const TimeRangeDisplay: React.FC<TimeRangeDisplayProps>;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import cls from 'clsx';
3
3
  import React, { forwardRef } from 'react';
4
4
  import { Typography } from '@antscorp/antsomi-ui/es/components/atoms';
5
- import { ACTION_TYPES } from '../../constants';
5
+ import { ACTION_TYPES } from '../../actions';
6
6
  import { useCalendarSelectionContext } from '../../hooks';
7
7
  import { getRangeTypeSelectedTitle, getRangeValueSelctedTitle } from '../../utils';
8
8
  import { StyledBtnDisplayWrapper } from './styled';
@@ -1,3 +1,4 @@
1
+ import { DaysUpToToday, DaysUpToYesterday } from './types';
1
2
  export declare const TRIGGER_OUT_MODE: {
2
3
  readonly auto: "auto";
3
4
  readonly manual: "manual";
@@ -64,6 +65,27 @@ export declare const MAP_TITLE: {
64
65
  monToToDay: string;
65
66
  monToSun: string;
66
67
  };
68
+ export declare const MAP_TITLE_DISPLAY: {
69
+ days_up_to_yesterday: (rangeInfo: DaysUpToYesterday) => string;
70
+ days_up_to_today: (rangeInfo: DaysUpToToday) => string;
71
+ today: string;
72
+ yesterday: string;
73
+ last_7_days: string;
74
+ last_14_days: string;
75
+ this_month: string;
76
+ last_30_days: string;
77
+ last_month: string;
78
+ all_time: string;
79
+ last_week: string;
80
+ this_week: string;
81
+ this_quarter: string;
82
+ last_quarter: string;
83
+ custom: string;
84
+ sundayToToDay: string;
85
+ sundayToSat: string;
86
+ monToToDay: string;
87
+ monToSun: string;
88
+ };
67
89
  export declare const RANGE_SELECTION_OPTIONS: Record<string, {
68
90
  key: string;
69
91
  label: string;
@@ -73,13 +95,3 @@ export declare const RANGE_SELECTION_OPTIONS: Record<string, {
73
95
  label: string;
74
96
  }[];
75
97
  }>;
76
- export declare const ACTION_TYPES: {
77
- readonly initState: "init_state";
78
- readonly changeRangeType: "change_range_type";
79
- readonly updateRangeInfo: "update_range_info";
80
- readonly updateRangeValue: "update_range_value";
81
- readonly changeAutoUpdateTo: "change_auto_update_to";
82
- readonly togglePopover: "toggle_popover";
83
- readonly apply: "apply";
84
- readonly resetValue: "reset_value";
85
- };