@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.
- package/es/assets/images/iphone-top-bar.png +0 -0
- package/es/assets/images/iphone.png +0 -0
- package/es/assets/images/stars_slider.png +0 -0
- package/es/components/atoms/Button/index.d.ts +1 -8
- package/es/components/atoms/Empty/Empty.d.ts +6 -5
- package/es/components/atoms/Empty/Empty.js +7 -1
- package/es/components/atoms/Flex/Flex.d.ts +2 -0
- package/es/components/atoms/Flex/Flex.js +1 -0
- package/es/components/atoms/Flex/index.d.ts +1 -0
- package/es/components/atoms/Flex/index.js +1 -0
- package/es/components/atoms/Input/Input.d.ts +14 -3
- package/es/components/atoms/Input/Input.js +7 -3
- package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -0
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -0
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +10 -0
- package/es/components/atoms/InputDynamic/InputDynamic.js +484 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -0
- package/es/components/atoms/InputDynamic/constants.d.ts +71 -0
- package/es/components/atoms/InputDynamic/constants.js +71 -0
- package/es/components/atoms/InputDynamic/index.d.ts +2 -0
- package/es/components/atoms/InputDynamic/index.js +1 -0
- package/es/components/atoms/InputDynamic/styled.d.ts +13 -0
- package/es/components/atoms/InputDynamic/styled.js +293 -0
- package/es/components/atoms/InputDynamic/types.d.ts +113 -0
- package/es/components/atoms/InputDynamic/types.js +1 -0
- package/es/components/atoms/InputDynamic/utils.d.ts +30 -0
- package/es/components/atoms/InputDynamic/utils.js +872 -0
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -0
- package/es/components/atoms/MobileFrame/MobileFrame.js +22 -0
- package/es/components/atoms/MobileFrame/constants.d.ts +4 -0
- package/es/components/atoms/MobileFrame/constants.js +4 -0
- package/es/components/atoms/MobileFrame/index.d.ts +2 -0
- package/es/components/atoms/MobileFrame/index.js +1 -0
- package/es/components/atoms/MobileFrame/styled.d.ts +3 -0
- package/es/components/atoms/MobileFrame/styled.js +33 -0
- package/es/components/atoms/Pagination/index.d.ts +1 -0
- package/es/components/atoms/Popover/Popover.d.ts +1 -1
- package/es/components/atoms/Popover/styled.d.ts +1 -1
- package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -0
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -0
- package/es/components/atoms/PreviewTabs/index.d.ts +2 -0
- package/es/components/atoms/PreviewTabs/index.js +1 -0
- package/es/components/atoms/PreviewTabs/styled.d.ts +6 -0
- package/es/components/atoms/PreviewTabs/styled.js +79 -0
- package/es/components/atoms/Progress/Progress.d.ts +1 -1
- package/es/components/atoms/Radio/index.d.ts +3 -3
- package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
- package/es/components/atoms/RateV2/RateV2.js +73 -0
- package/es/components/atoms/RateV2/index.d.ts +1 -0
- package/es/components/atoms/RateV2/index.js +1 -0
- package/es/components/atoms/RequiredLabel/index.d.ts +1 -0
- package/es/components/atoms/RequiredLabel/index.js +4 -3
- package/es/components/atoms/Slider/index.d.ts +2 -1
- package/es/components/atoms/Slider/index.js +7 -14
- package/es/components/atoms/SliderV2/index.d.ts +6 -0
- package/es/components/atoms/SliderV2/index.js +21 -0
- package/es/components/atoms/Space/Space.d.ts +1 -1
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
- package/es/components/atoms/index.d.ts +8 -0
- package/es/components/atoms/index.js +6 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +6 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +281 -27
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
- package/es/components/icons/AudioRecordIcon.d.ts +2 -1
- package/es/components/icons/BugIcon.d.ts +2 -1
- package/es/components/icons/CameraIcon.d.ts +2 -1
- package/es/components/icons/CaptureIcon.d.ts +2 -1
- package/es/components/icons/CheckSlimIcon.d.ts +2 -1
- package/es/components/icons/CloseIcon.d.ts +2 -1
- package/es/components/icons/CommentIcon.d.ts +2 -1
- package/es/components/icons/EventIcon.d.ts +2 -1
- package/es/components/icons/FreeDrawIcon.d.ts +2 -1
- package/es/components/icons/GPTIcon.d.ts +2 -1
- package/es/components/icons/GPTIconV2.d.ts +2 -1
- package/es/components/icons/GPTIconV3.d.ts +2 -1
- package/es/components/icons/HighlightIcon.d.ts +2 -1
- package/es/components/icons/IdeaIcon.d.ts +2 -1
- package/es/components/icons/InvisibleIcon.d.ts +2 -1
- package/es/components/icons/MuteIcon.d.ts +2 -1
- package/es/components/icons/OpenUrlIcon.d.ts +2 -1
- package/es/components/icons/PauseIcon.d.ts +2 -1
- package/es/components/icons/PlaneIcon.d.ts +2 -1
- package/es/components/icons/RequestIcon.d.ts +2 -1
- package/es/components/icons/StopRecordIcon.d.ts +2 -1
- package/es/components/icons/UserIcon.d.ts +2 -1
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
- package/es/components/icons/WarningIcon.d.ts +2 -1
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1248 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +100 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -0
- package/es/components/molecules/AddDynamicContent/constants.js +152 -0
- package/es/components/molecules/AddDynamicContent/currencies.json +1523 -0
- package/es/components/molecules/AddDynamicContent/index.d.ts +2 -0
- package/es/components/molecules/AddDynamicContent/index.js +2 -0
- package/es/components/molecules/AddDynamicContent/styled.d.ts +12 -0
- package/es/components/molecules/AddDynamicContent/styled.js +30 -0
- package/es/components/molecules/AddDynamicContent/types.d.ts +13 -0
- package/es/components/molecules/AddDynamicContent/types.js +1 -0
- package/es/components/molecules/AddDynamicContent/utils.d.ts +41 -0
- package/es/components/molecules/AddDynamicContent/utils.js +396 -0
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +9 -0
- package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +260 -113
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +66 -25
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +109 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +48 -4
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +20 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +90 -1
- package/es/components/molecules/Drawer/Drawer.d.ts +5 -1
- package/es/components/molecules/Drawer/Drawer.js +3 -1
- package/es/components/molecules/Drawer/index.d.ts +1 -0
- package/es/components/molecules/EditorScript/EditorScript.d.ts +14 -0
- package/es/components/molecules/EditorScript/EditorScript.js +89 -0
- package/es/components/molecules/EditorScript/index.d.ts +1 -0
- package/es/components/molecules/EditorScript/index.js +1 -0
- package/es/components/molecules/EditorScript/styled.d.ts +1 -0
- package/es/components/molecules/EditorScript/styled.js +3 -0
- package/es/components/molecules/Form/Form.d.ts +1 -0
- package/es/components/molecules/Form/Form.js +1 -0
- package/es/components/molecules/Form/index.d.ts +1 -0
- package/es/components/molecules/Form/index.js +1 -0
- package/es/components/molecules/IconSelection/styled.d.ts +1 -8
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/index.d.ts +1 -0
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Modal/styled.js +2 -0
- package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -0
- package/es/components/molecules/ModalV2/ModalV2.js +26 -0
- package/es/components/molecules/ModalV2/index.d.ts +2 -0
- package/es/components/molecules/ModalV2/index.js +1 -0
- package/es/components/molecules/ModalV2/styled.d.ts +7 -0
- package/es/components/molecules/ModalV2/styled.js +22 -0
- package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
- package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -0
- package/es/components/molecules/PreviewModal/PreviewModal.js +30 -0
- package/es/components/molecules/PreviewModal/index.d.ts +2 -0
- package/es/components/molecules/PreviewModal/index.js +1 -0
- package/es/components/molecules/PreviewModal/styled.d.ts +4 -0
- package/es/components/molecules/PreviewModal/styled.js +39 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +728 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -0
- package/es/components/molecules/ResizeGrid/constant.d.ts +35 -0
- package/es/components/molecules/ResizeGrid/constant.js +111 -0
- package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
- package/es/components/molecules/ResizeGrid/index.js +1 -0
- package/es/components/molecules/ResizeGrid/styled.d.ts +10 -0
- package/es/components/molecules/ResizeGrid/styled.js +56 -0
- package/es/components/molecules/ResizeGrid/types.d.ts +147 -0
- package/es/components/molecules/ResizeGrid/types.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +12 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +17 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +108 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -0
- package/es/components/molecules/RichMenu/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/index.js +3 -0
- package/es/components/molecules/Select/Select.d.ts +6 -4
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -0
- package/es/components/molecules/ShareAccess/ShareAccess.js +23 -0
- package/es/components/molecules/ShareAccess/actions.d.ts +16 -0
- package/es/components/molecules/ShareAccess/actions.js +12 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +78 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +19 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.d.ts +0 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +97 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -0
- package/es/components/molecules/ShareAccess/components/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/index.js +1 -0
- package/es/components/molecules/ShareAccess/constants.d.ts +67 -0
- package/es/components/molecules/ShareAccess/constants.js +85 -0
- package/es/components/molecules/ShareAccess/context.d.ts +4 -0
- package/es/components/molecules/ShareAccess/context.js +3 -0
- package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/hooks/index.js +1 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +18 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -0
- package/es/components/molecules/ShareAccess/index.d.ts +4 -0
- package/es/components/molecules/ShareAccess/index.js +4 -0
- package/es/components/molecules/ShareAccess/reducer.d.ts +2 -0
- package/es/components/molecules/ShareAccess/reducer.js +19 -0
- package/es/components/molecules/ShareAccess/types.d.ts +54 -0
- package/es/components/molecules/ShareAccess/types.js +1 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +38 -0
- package/es/components/molecules/ShareAccess/utils.js +57 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -5
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
- package/es/components/molecules/UploadImage/MediaThumb.d.ts +11 -0
- package/es/components/molecules/UploadImage/MediaThumb.js +31 -0
- package/es/components/molecules/UploadImage/index.d.ts +6 -2
- package/es/components/molecules/UploadImage/index.js +111 -84
- package/es/components/molecules/UploadImage/styled.js +0 -4
- package/es/components/molecules/UploadImage/utils.d.ts +3 -0
- package/es/components/molecules/UploadImage/utils.js +24 -0
- package/es/components/molecules/index.d.ts +11 -3
- package/es/components/molecules/index.js +9 -3
- package/es/components/organism/Help/styled.d.ts +6 -16
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.js +1 -0
- package/es/constants/queries.d.ts +14 -0
- package/es/constants/queries.js +21 -0
- package/es/constants/richMenu.d.ts +19 -0
- package/es/constants/richMenu.js +19 -0
- package/es/constants/storybook.d.ts +7 -1
- package/es/constants/storybook.js +12 -0
- package/es/constants/theme.js +30 -3
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useDebounceCallback.d.ts +1 -0
- package/es/hooks/useDebounceCallback.js +5 -0
- package/es/hooks/useDebounceV2.d.ts +1 -0
- package/es/hooks/useDebounceV2.js +11 -0
- package/es/hooks/useDeepCompareEffect.d.ts +1 -0
- package/es/hooks/useDeepCompareEffect.js +21 -0
- package/es/hooks/useDeepCompareMemo.d.ts +2 -0
- package/es/hooks/useDeepCompareMemo.js +21 -0
- package/es/hooks/usePrevious.d.ts +2 -0
- package/es/hooks/usePrevious.js +9 -0
- package/es/locales/en/translation.json +160 -3
- package/es/locales/i18n.d.ts +158 -0
- package/es/locales/translations.d.ts +157 -0
- package/es/locales/vi/translation.json +2 -1
- package/es/models/BusinessObject.d.ts +116 -0
- package/es/models/BusinessObject.js +113 -0
- package/es/models/Currency.d.ts +9 -0
- package/es/models/Currency.js +10 -0
- package/es/models/CustomFunction.d.ts +19 -0
- package/es/models/CustomFunction.js +25 -0
- package/es/models/DynamicContentAttribute.d.ts +34 -0
- package/es/models/DynamicContentAttribute.js +9 -0
- package/es/models/EventTrackingAttribute.d.ts +11 -0
- package/es/models/EventTrackingAttribute.js +13 -0
- package/es/models/PromotionPool.d.ts +11 -0
- package/es/models/PromotionPool.js +12 -0
- package/es/models/{SavedImage.d.ts → SavedMedia.d.ts} +5 -5
- package/es/models/{SavedImage.js → SavedMedia.js} +3 -3
- package/es/queries/BusinessObject/index.d.ts +6 -0
- package/es/queries/BusinessObject/index.js +6 -0
- package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -0
- package/es/queries/BusinessObject/useGetListAllEvents.js +14 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -0
- package/es/queries/BusinessObject/useGetListBO.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListBO.js +19 -0
- package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -0
- package/es/queries/BusinessObject/useGetListEventAttr.js +15 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -0
- package/es/queries/CustomFunction/index.d.ts +2 -0
- package/es/queries/CustomFunction/index.js +2 -0
- package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -0
- package/es/queries/CustomFunction/useCustomFunction.js +53 -0
- package/es/queries/DynamicContentAttribute/index.d.ts +1 -0
- package/es/queries/DynamicContentAttribute/index.js +1 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -0
- package/es/queries/PromotionPool/index.d.ts +1 -0
- package/es/queries/PromotionPool/index.js +1 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -0
- package/es/queries/ThirdParty/index.d.ts +1 -0
- package/es/queries/ThirdParty/index.js +1 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -0
- package/es/queries/configs.d.ts +4 -0
- package/es/queries/configs.js +13 -0
- package/es/queries/index.d.ts +6 -0
- package/es/queries/index.js +6 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -0
- package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +5 -5
- package/es/services/MediaTemplateDesign/UploadFile/index.js +36 -19
- package/es/services/ThirParty/index.d.ts +8 -0
- package/es/services/ThirParty/index.js +26 -0
- package/es/services/index.d.ts +14 -5
- package/es/services/index.js +45 -1
- package/es/test.d.ts +2 -1
- package/es/test.js +201 -63
- package/es/types/index.d.ts +17 -0
- package/es/types/index.js +2 -1
- package/es/types/richMenu.d.ts +214 -0
- package/es/types/richMenu.js +1 -0
- package/es/types/variables.d.ts +2 -0
- package/es/types/variables.js +1 -0
- package/es/utils/common.d.ts +4 -0
- package/es/utils/common.js +21 -0
- package/es/utils/handleError.d.ts +32 -2
- package/es/utils/handleError.js +42 -4
- 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,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,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>;
|