@antscorp/antsomi-ui 1.3.5-beta.83 → 1.3.5-beta.85
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/background/skeleton-background.png +0 -0
- package/es/assets/images/components/PreviewModal/Banner/skeletonBackground.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/buttonText.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/clickButton.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/description.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/deviceRadio.png +0 -0
- package/es/assets/images/components/PreviewModal/Information/itemName.png +0 -0
- package/es/assets/images/components/PreviewModal/banner.png +0 -0
- package/es/assets/images/components/PreviewModal/information.png +0 -0
- package/es/assets/images/components/PreviewModal/similarTemplate.png +0 -0
- package/es/assets/images/components/PreviewModal/thumbnails.png +0 -0
- package/es/assets/images/components/TemplateListing/blankTemplate.png +0 -0
- package/es/assets/images/components/TemplateListing/categoryListing.png +0 -0
- package/es/assets/images/components/TemplateListing/empty.png +0 -0
- package/es/assets/images/components/TemplateListing/previewModal.png +0 -0
- package/es/assets/images/components/TemplateListing/templateItem.png +0 -0
- package/es/assets/images/components/TemplateListing/templates.png +0 -0
- package/es/assets/images/ip14-pro-camera.png +0 -0
- package/es/assets/images/ip14-pro-mobile-frame.png +0 -0
- package/es/assets/images/iphone-top-bar.png +0 -0
- package/es/assets/images/iphone.png +0 -0
- package/es/assets/images/profile.png +0 -0
- package/es/assets/images/skeleton_bg.png +0 -0
- package/es/assets/images/stars_slider.png +0 -0
- package/es/assets/images/tail.png +0 -0
- package/es/assets/svg/mobile-frame.svg +3 -0
- 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 +104 -0
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +10 -0
- package/es/components/atoms/InputDynamic/InputDynamic.js +518 -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 +116 -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 +874 -0
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +6 -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 +4 -0
- package/es/components/atoms/MobileFrame/styled.js +38 -0
- package/es/components/atoms/MobileFrameV2/MobileFrameV2.d.ts +4 -0
- package/es/components/atoms/MobileFrameV2/MobileFrameV2.js +22 -0
- package/es/components/atoms/MobileFrameV2/constants.d.ts +4 -0
- package/es/components/atoms/MobileFrameV2/constants.js +4 -0
- package/es/components/atoms/MobileFrameV2/index.d.ts +2 -0
- package/es/components/atoms/MobileFrameV2/index.js +1 -0
- package/es/components/atoms/MobileFrameV2/styled.d.ts +3 -0
- package/es/components/atoms/MobileFrameV2/styled.js +43 -0
- package/es/components/atoms/Pagination/index.d.ts +1 -0
- 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/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/SlideBar/SlideBar.d.ts +34 -0
- package/es/components/atoms/SlideBar/SlideBar.js +283 -0
- package/es/components/atoms/SlideBar/constants.d.ts +10 -0
- package/es/components/atoms/SlideBar/constants.js +10 -0
- package/es/components/atoms/SlideBar/index.d.ts +1 -0
- package/es/components/atoms/SlideBar/index.js +1 -0
- package/es/components/atoms/SlideBar/styled.d.ts +20 -0
- package/es/components/atoms/SlideBar/styled.js +136 -0
- package/es/components/atoms/Slider/index.js +8 -3
- package/es/components/atoms/SliderV2/index.d.ts +3 -2
- package/es/components/atoms/SliderV2/index.js +9 -11
- package/es/components/atoms/Spin/Spin.js +2 -2
- package/es/components/atoms/index.d.ts +9 -0
- package/es/components/atoms/index.js +7 -0
- package/es/components/common/ConfigProvider/ConfigProvider.d.ts +1 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +16 -3
- package/es/components/common/ConfigProvider/GlobalStyle.js +379 -27
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1249 -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/CalendarSelection/CalendarSelection.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/CalendarSelection.js +45 -0
- package/es/components/molecules/CalendarSelection/actions.d.ts +55 -0
- package/es/components/molecules/CalendarSelection/actions.js +39 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.d.ts +7 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/AutoUpdateTo.js +24 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/AutoUpdateTo/styled.js +10 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/CustomPicker.js +108 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.d.ts +6 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/styled.js +152 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/types.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/CustomPicker/types.js +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/Footer.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/Footer/Footer.js +11 -0
- package/es/components/molecules/CalendarSelection/components/Footer/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/Footer/styled.js +6 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.js +4 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/styled.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/RangePicker/styled.js +13 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/RangeSelectOptions.js +23 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/NumOfDaysRanges.js +41 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/NumOfDaysRanges/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.d.ts +11 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/Option.js +40 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/Option/styled.js +29 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/components/index.js +2 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/index.js +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/styled.js +34 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/RangeSelectOptions/types.js +1 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.d.ts +8 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/TimeRangeDisplay.js +49 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/index.js +2 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.d.ts +1 -0
- package/es/components/molecules/CalendarSelection/components/TimeRangeDisplay/styled.js +70 -0
- package/es/components/molecules/CalendarSelection/components/index.d.ts +5 -0
- package/es/components/molecules/CalendarSelection/components/index.js +5 -0
- package/es/components/molecules/CalendarSelection/constants.d.ts +97 -0
- package/es/components/molecules/CalendarSelection/constants.js +183 -0
- package/es/components/molecules/CalendarSelection/context.d.ts +4 -0
- package/es/components/molecules/CalendarSelection/context.js +6 -0
- package/es/components/molecules/CalendarSelection/hooks/index.d.ts +2 -0
- package/es/components/molecules/CalendarSelection/hooks/index.js +2 -0
- package/es/components/molecules/CalendarSelection/hooks/useStateContext.d.ts +4 -0
- package/es/components/molecules/CalendarSelection/hooks/useStateContext.js +13 -0
- package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.d.ts +9 -0
- package/es/components/molecules/CalendarSelection/hooks/useTriggerOut.js +19 -0
- package/es/components/molecules/CalendarSelection/index.d.ts +25 -0
- package/es/components/molecules/CalendarSelection/index.js +6 -0
- package/es/components/molecules/CalendarSelection/reducer.d.ts +3 -0
- package/es/components/molecules/CalendarSelection/reducer.js +121 -0
- package/es/components/molecules/CalendarSelection/styled.d.ts +6 -0
- package/es/components/molecules/CalendarSelection/styled.js +13 -0
- package/es/components/molecules/CalendarSelection/types.d.ts +98 -0
- package/es/components/molecules/CalendarSelection/types.js +1 -0
- package/es/components/molecules/CalendarSelection/utils.d.ts +52 -0
- package/es/components/molecules/CalendarSelection/utils.js +304 -0
- package/es/components/molecules/ChatBox/ChatBox.js +44 -93
- package/es/components/molecules/ChatBox/MessageItem.js +8 -16
- package/es/components/molecules/ChatBox/constants.d.ts +0 -5
- package/es/components/molecules/ChatBox/constants.js +0 -27
- package/es/components/molecules/ChatBox/styled.d.ts +1 -5
- package/es/components/molecules/ChatBox/styled.js +8 -35
- package/es/components/molecules/ChatBox/types.d.ts +0 -11
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +9 -0
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +3 -3
- package/es/components/molecules/ColorPicker/index.d.ts +1 -0
- package/es/components/molecules/ColorPicker/index.js +3 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +7 -3
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +223 -208
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +78 -25
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +145 -22
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +5 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +80 -6
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +25 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +167 -40
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +6 -2
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +23 -10
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.d.ts +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +1 -0
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +1 -0
- package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.d.ts +13 -0
- package/es/components/molecules/DatePicker/components/DropdownLabel/DropdownLabel.js +87 -0
- package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.d.ts +6 -0
- package/es/components/molecules/DatePicker/components/ErrorMessage/ErrorMessage.js +12 -0
- 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/FontSetting/index.js +1 -1
- 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/Modal/index.d.ts +1 -0
- 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 +26 -0
- 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 +736 -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 +148 -0
- package/es/components/molecules/ResizeGrid/types.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +14 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +18 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +110 -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 +11 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +33 -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 +10 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +17 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +56 -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 +11 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +51 -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 +3 -0
- package/es/components/molecules/Select/Select.js +23 -2
- 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 +5 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +79 -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 +58 -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 +98 -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 +19 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -0
- package/es/components/molecules/ShareAccess/index.d.ts +3 -0
- package/es/components/molecules/ShareAccess/index.js +3 -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 +63 -0
- package/es/components/molecules/ShareAccess/types.js +1 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +39 -0
- package/es/components/molecules/ShareAccess/utils.js +66 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.d.ts +79 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.js +187 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.d.ts +10 -0
- package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.js +50 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.d.ts +20 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/ImageSlider.js +57 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.d.ts +1 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/index.js +1 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.d.ts +9 -0
- package/es/components/molecules/TemplateSaveAs/components/ImageSlider/styled.js +182 -0
- package/es/components/molecules/TemplateSaveAs/components/index.d.ts +1 -0
- package/es/components/molecules/TemplateSaveAs/components/index.js +1 -0
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +65 -0
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.js +121 -0
- package/es/components/molecules/TemplateSaveAs/index.d.ts +4 -0
- package/es/components/molecules/TemplateSaveAs/index.js +3 -0
- package/es/components/molecules/TemplateSaveAs/styled.d.ts +4 -0
- package/es/components/molecules/TemplateSaveAs/styled.js +73 -0
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.d.ts +3 -0
- package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +72 -0
- package/es/components/molecules/ThumbnailCard/constants.d.ts +3 -0
- package/es/components/molecules/ThumbnailCard/constants.js +3 -0
- package/es/components/molecules/ThumbnailCard/index.d.ts +2 -0
- package/es/components/molecules/ThumbnailCard/index.js +2 -0
- package/es/components/molecules/ThumbnailCard/styled.d.ts +5 -0
- package/es/components/molecules/ThumbnailCard/styled.js +90 -0
- package/es/components/molecules/ThumbnailCard/types.d.ts +24 -0
- package/es/components/molecules/ThumbnailCard/types.js +1 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +1 -1
- package/es/components/molecules/UploadImage/MediaThumb.d.ts +8 -0
- package/es/components/molecules/UploadImage/MediaThumb.js +15 -0
- package/es/components/molecules/UploadImage/VideoThumbnail.d.ts +4 -0
- package/es/components/molecules/UploadImage/VideoThumbnail.js +43 -0
- package/es/components/molecules/UploadImage/index.d.ts +6 -2
- package/es/components/molecules/UploadImage/index.js +105 -85
- 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 +16 -3
- package/es/components/molecules/index.js +12 -3
- package/es/components/organism/GenerativeInsights/index.d.ts +1 -5
- package/es/components/organism/GenerativeInsights/index.js +7 -8
- package/es/components/organism/Help/Help.js +30 -1
- package/es/components/organism/Menu/Menu.d.ts +2 -0
- package/es/components/organism/Menu/Menu.js +2 -0
- package/es/components/organism/Menu/index.d.ts +1 -0
- package/es/components/organism/Menu/index.js +1 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/index.js +18 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/styled.d.ts +1 -0
- package/es/components/organism/PreviewTemplateModal/components/Banner/styled.js +69 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/index.js +29 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/styled.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/components/Information/styled.js +42 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +32 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/styled.js +12 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.d.ts +6 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +77 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/styled.js +62 -0
- package/es/components/organism/PreviewTemplateModal/components/index.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/components/index.js +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/dataSample.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/constants/dataSample.js +9 -0
- package/es/components/organism/PreviewTemplateModal/constants/defaultProps.d.ts +8 -0
- package/es/components/organism/PreviewTemplateModal/constants/defaultProps.js +12 -0
- package/es/components/organism/PreviewTemplateModal/constants/html.d.ts +1 -0
- package/es/components/organism/PreviewTemplateModal/constants/html.js +1 -0
- package/es/components/organism/PreviewTemplateModal/constants/index.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/index.js +4 -0
- package/es/components/organism/PreviewTemplateModal/constants/variables.d.ts +12 -0
- package/es/components/organism/PreviewTemplateModal/constants/variables.js +12 -0
- package/es/components/organism/PreviewTemplateModal/index.d.ts +3 -0
- package/es/components/organism/PreviewTemplateModal/index.js +34 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/BannerPropsTable/index.js +34 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/DataTypeTable/index.js +62 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/InformationPropsTable/index.js +76 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/SimilarTemplatePropsTable/index.js +40 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/TThumbnailTable/index.js +30 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.d.ts +2 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/ThumbnailPropsTable/index.js +46 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.d.ts +6 -0
- package/es/components/organism/PreviewTemplateModal/stories/dataTypes/components/index.js +6 -0
- package/es/components/organism/PreviewTemplateModal/styled.d.ts +4 -0
- package/es/components/organism/PreviewTemplateModal/styled.js +26 -0
- package/es/components/organism/PreviewTemplateModal/types.d.ts +38 -0
- package/es/components/organism/PreviewTemplateModal/types.js +1 -0
- package/es/components/organism/index.d.ts +1 -0
- package/es/components/organism/index.js +1 -0
- package/es/components/template/TemplateListing/Loadable.d.ts +6 -0
- package/es/components/template/TemplateListing/Loadable.js +7 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/index.js +19 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +2 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.js +26 -0
- package/es/components/template/TemplateListing/components/CategoryListing/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/CategoryListing/index.js +112 -0
- package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +7 -0
- package/es/components/template/TemplateListing/components/CategoryListing/styled.js +97 -0
- package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +11 -0
- package/es/components/template/TemplateListing/components/CategoryListing/types.js +1 -0
- package/es/components/template/TemplateListing/components/Empty/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/Empty/index.js +18 -0
- package/es/components/template/TemplateListing/components/Empty/styled.d.ts +3 -0
- package/es/components/template/TemplateListing/components/Empty/styled.js +35 -0
- package/es/components/template/TemplateListing/components/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/index.js +3 -0
- package/es/components/template/TemplateListing/constants/defaultProps.d.ts +12 -0
- package/es/components/template/TemplateListing/constants/defaultProps.js +23 -0
- package/es/components/template/TemplateListing/constants/index.d.ts +2 -0
- package/es/components/template/TemplateListing/constants/index.js +2 -0
- package/es/components/template/TemplateListing/constants/mockData.d.ts +2 -0
- package/es/components/template/TemplateListing/constants/mockData.js +101 -0
- package/es/components/template/TemplateListing/hooks/index.d.ts +1 -0
- package/es/components/template/TemplateListing/hooks/index.js +1 -0
- package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +62 -0
- package/es/components/template/TemplateListing/hooks/useTemplateListing.js +240 -0
- package/es/components/template/TemplateListing/index.d.ts +3 -0
- package/es/components/template/TemplateListing/index.js +84 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +46 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +57 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +78 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +30 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TCategoryItemTable/index.js +46 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TTemplateItemTable/index.js +38 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +50 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +7 -0
- package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +7 -0
- package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
- package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
- package/es/components/template/TemplateListing/styled/index.d.ts +3 -0
- package/es/components/template/TemplateListing/styled/index.js +35 -0
- package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +9 -0
- package/es/components/template/TemplateListing/types/BlankTemplate.js +1 -0
- package/es/components/template/TemplateListing/types/CategoryListing.d.ts +21 -0
- package/es/components/template/TemplateListing/types/CategoryListing.js +1 -0
- package/es/components/template/TemplateListing/types/Empty.d.ts +5 -0
- package/es/components/template/TemplateListing/types/Empty.js +1 -0
- package/es/components/template/TemplateListing/types/TemplateListing.d.ts +26 -0
- package/es/components/template/TemplateListing/types/TemplateListing.js +1 -0
- package/es/components/template/TemplateListing/types/index.d.ts +3 -0
- package/es/components/template/TemplateListing/types/index.js +3 -0
- package/es/components/template/index.d.ts +3 -0
- package/es/components/template/index.js +6 -0
- package/es/constants/datetime.d.ts +8 -0
- package/es/constants/datetime.js +1594 -0
- package/es/constants/index.d.ts +6 -1
- package/es/constants/index.js +6 -1
- package/es/constants/queries.d.ts +18 -0
- package/es/constants/queries.js +26 -0
- package/es/constants/richMenu.d.ts +19 -0
- package/es/constants/richMenu.js +19 -0
- package/es/constants/storybook.d.ts +5 -0
- package/es/constants/storybook.js +12 -0
- package/es/constants/templateListing.d.ts +50 -0
- package/es/constants/templateListing.js +52 -0
- package/es/constants/theme.js +30 -3
- package/es/constants/variables.d.ts +19 -0
- package/es/constants/variables.js +19 -0
- package/es/hooks/index.d.ts +5 -0
- package/es/hooks/index.js +5 -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/useEffectOnlyOnce.d.ts +2 -0
- package/es/hooks/useEffectOnlyOnce.js +12 -0
- package/es/hooks/useForceUpdate.d.ts +1 -0
- package/es/hooks/useForceUpdate.js +5 -0
- package/es/hooks/useIntersectionObserver.d.ts +57 -0
- package/es/hooks/useIntersectionObserver.js +97 -0
- package/es/hooks/useListingItemResize.d.ts +12 -0
- package/es/hooks/useListingItemResize.js +58 -0
- package/es/hooks/useOutsideClick.d.ts +4 -0
- package/es/hooks/useOutsideClick.js +18 -0
- package/es/hooks/usePrevious.d.ts +2 -0
- package/es/hooks/usePrevious.js +9 -0
- package/es/hooks/useScrollToEnd.d.ts +1 -0
- package/es/hooks/useScrollToEnd.js +30 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/locales/en/translation.json +176 -2
- package/es/locales/i18n.d.ts +183 -0
- package/es/locales/translations.d.ts +174 -0
- package/es/locales/vi/translation.json +9 -0
- 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/ObjectTemplate.d.ts +56 -0
- package/es/models/ObjectTemplate.js +82 -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} +7 -5
- package/es/models/{SavedImage.js → SavedMedia.js} +7 -3
- package/es/models/TemplateCategory.d.ts +13 -0
- package/es/models/TemplateCategory.js +28 -0
- package/es/models/Upload.d.ts +2 -0
- package/es/models/Upload.js +3 -0
- 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/TemplateListing/index.d.ts +52 -0
- package/es/queries/TemplateListing/index.js +105 -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 +7 -0
- package/es/queries/index.js +7 -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 +37 -19
- package/es/services/TemplateListing/index.d.ts +70 -0
- package/es/services/TemplateListing/index.js +161 -0
- 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.js +315 -66
- package/es/types/index.d.ts +22 -0
- package/es/types/index.js +5 -1
- package/es/types/richMenu.d.ts +214 -0
- package/es/types/richMenu.js +1 -0
- package/es/types/service.d.ts +22 -0
- package/es/types/service.js +1 -0
- package/es/types/share-access.d.ts +18 -0
- package/es/types/share-access.js +1 -0
- package/es/types/templateListing.d.ts +13 -0
- package/es/types/templateListing.js +1 -0
- package/es/types/variables.d.ts +5 -0
- package/es/types/variables.js +1 -0
- package/es/utils/common.d.ts +8 -0
- package/es/utils/common.js +59 -0
- package/es/utils/commonComponent.d.ts +7 -0
- package/es/utils/commonComponent.js +28 -0
- package/es/utils/handleError.d.ts +32 -2
- package/es/utils/handleError.js +42 -4
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/templateListing.d.ts +2 -0
- package/es/utils/templateListing.js +12 -0
- package/package.json +29 -6
- package/CHANGELOG.md +0 -1034
- package/dist/0173b5993573afa04880.woff +0 -0
- package/dist/0dfb9214dfd945cd7290.png +0 -1
- package/dist/2883cad25a2b4e87ce5f.eot +0 -0
- package/dist/4f54a37971347e3d7122.png +0 -1
- package/dist/574b7bee0563a9fe9a29.png +0 -1
- package/dist/6b586356e837581204dc.svg +0 -1
- package/dist/72eec5c1c786b45a667f.ttf +0 -0
- package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
- package/dist/dbc405edd6e0806efbc9.svg +0 -1
- package/dist/e32f09119052a55cce3c.png +0 -1
- package/dist/e3851b9384a984c6fdb5.png +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -69
- package/dist/main.css +0 -168
- package/dist/package.json +0 -183
- package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
- package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
- package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
- package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
- package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
- package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
- package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
- package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
- package/dist/public/icons/placeholder-image.png +0 -0
- package/dist/public/icons/transparent.svg +0 -1
- package/es/components/molecules/ChatBox/QuestionItem.d.ts +0 -7
- package/es/components/molecules/ChatBox/QuestionItem.js +0 -11
- package/es/components/molecules/ChatBox/utils.d.ts +0 -2
- package/es/components/molecules/ChatBox/utils.js +0 -18
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
2
|
+
// Libraries
|
|
3
|
+
import React, { useState, useLayoutEffect, useEffect, useRef, useCallback, useMemo, } from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { has, isEmpty, omit } from 'lodash';
|
|
6
|
+
// Components
|
|
7
|
+
import CaretPositioning from './EditCaretPositioning';
|
|
8
|
+
import { WrapperInputStyle, TooltipHover, DynamicItem } from './styled';
|
|
9
|
+
import { Popover } from 'antd';
|
|
10
|
+
import { AddDynamicContent } from '../../molecules/AddDynamicContent';
|
|
11
|
+
import { PopupShortLink } from './PopupShortLink';
|
|
12
|
+
import Icon from '@antscorp/icons';
|
|
13
|
+
// Utils
|
|
14
|
+
import { getObjectPropSafely, random, safeParse } from '@antscorp/antsomi-ui/es/utils';
|
|
15
|
+
import { convertBreakTag, convertDivToBreakTag, convertHtmlText, genShortLinkValue, getInsertLinkPatternWithAppendSpaceEnd, getInsertPatternWithAppendSpaceEnd, handleUpdateInputPersonalization, initialValue, mapLabelPersonalization, pasteHtmlAtCaret, removeHtmlTag, spacingNonTracking, validateHTMLTags, createElement, getBgColorByContentSourceType, } from './utils';
|
|
16
|
+
// Hooks
|
|
17
|
+
import { useDebounce } from '@antscorp/antsomi-ui/es/hooks/useDebounce';
|
|
18
|
+
// Constants
|
|
19
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
20
|
+
const PATH = 'src/components/atoms/InputDynamic/InputDynamic.tsx';
|
|
21
|
+
export const AllowDynamicType = {
|
|
22
|
+
SHORTLINK: 'shortlink',
|
|
23
|
+
ADDPERSONALIZATION: 'addPersonalization',
|
|
24
|
+
};
|
|
25
|
+
const defaultProps = {
|
|
26
|
+
value: '',
|
|
27
|
+
isViewMode: false,
|
|
28
|
+
isRealTime: true,
|
|
29
|
+
errors: [],
|
|
30
|
+
ms: 450,
|
|
31
|
+
canMultipleLine: false,
|
|
32
|
+
apiConfig: {
|
|
33
|
+
domain: 'https://sandbox-media-template.antsomi.com/cdp',
|
|
34
|
+
slug: '/api/v1',
|
|
35
|
+
token: '5474r2x214z2a4b403e4y446p4b4t2b4t474j4t2i5',
|
|
36
|
+
accountId: '1600085679',
|
|
37
|
+
userId: '1600085679',
|
|
38
|
+
},
|
|
39
|
+
disabled: false,
|
|
40
|
+
showIndex: true,
|
|
41
|
+
showDisplayFormat: true,
|
|
42
|
+
isShowCustomFunction: true,
|
|
43
|
+
onError: () => { },
|
|
44
|
+
onChange: () => { },
|
|
45
|
+
addMessageToQueue: () => { },
|
|
46
|
+
};
|
|
47
|
+
export const InputDynamic = (props) => {
|
|
48
|
+
const { value, isViewMode, isRealTime, ms, errors, disabledOpts, disabled, canMultipleLine, allowDynamicOptions, showIndex, showDisplayFormat, isShowCustomFunction, apiConfig, onError, onChange, addMessageToQueue, } = props;
|
|
49
|
+
// States
|
|
50
|
+
const [textValue, setTextValue] = useState(initialValue(value));
|
|
51
|
+
const [initSelectedProperties, setInitSelectedProperties] = useState({
|
|
52
|
+
keyTag: 'shortlink_static',
|
|
53
|
+
link: '',
|
|
54
|
+
urlDetected: '',
|
|
55
|
+
});
|
|
56
|
+
const [isShowPopover, setIsShowPopover] = useState(false);
|
|
57
|
+
const [dynamicContent, setDynamicContent] = useState({
|
|
58
|
+
visible: false,
|
|
59
|
+
defaultData: {},
|
|
60
|
+
activeTagId: '',
|
|
61
|
+
contentSources: {
|
|
62
|
+
groups: [],
|
|
63
|
+
expanded: [],
|
|
64
|
+
isLoadingDataBO: false,
|
|
65
|
+
},
|
|
66
|
+
journeySettings: {
|
|
67
|
+
unsubscribeSegmentType: 'customer',
|
|
68
|
+
triggerType: 'event_based',
|
|
69
|
+
triggerEvent: {
|
|
70
|
+
eventActionId: '',
|
|
71
|
+
eventCategoryId: '',
|
|
72
|
+
insightPropertyIds: [],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
const [popoverOpenShortLink, setPopoverOpenShortLink] = useState(false);
|
|
77
|
+
const [tooltipHoverDebounce, _tooltipHover, setTooltipHover] = useDebounce({ x: 0, y: 0 }, 200);
|
|
78
|
+
// Refs
|
|
79
|
+
const caretPositionRef = useRef(null);
|
|
80
|
+
const timerRef = useRef();
|
|
81
|
+
const personalizationInputRef = useRef(null);
|
|
82
|
+
const isRenderAddDynamicContent = useMemo(() => {
|
|
83
|
+
if (isEmpty(apiConfig) ||
|
|
84
|
+
isEmpty(allowDynamicOptions) ||
|
|
85
|
+
(allowDynamicOptions &&
|
|
86
|
+
allowDynamicOptions.findIndex(dynamicKey => dynamicKey === AllowDynamicType.ADDPERSONALIZATION) === -1))
|
|
87
|
+
return false;
|
|
88
|
+
return true;
|
|
89
|
+
}, [apiConfig, allowDynamicOptions]);
|
|
90
|
+
const onTriggerChange = (event = null) => {
|
|
91
|
+
var _a;
|
|
92
|
+
try {
|
|
93
|
+
let tmp = (_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.innerHTML;
|
|
94
|
+
if (event !== null) {
|
|
95
|
+
caretPositionRef.current = CaretPositioning.saveSelection(event.currentTarget);
|
|
96
|
+
tmp = event.currentTarget.innerHTML;
|
|
97
|
+
}
|
|
98
|
+
tmp = tmp === null || tmp === void 0 ? void 0 : tmp.replace(
|
|
99
|
+
// replace old non tracking url to detect url
|
|
100
|
+
/<button(?=[^>]*class="insert-word")[^>]*value=['"]#(?:{nontrackurl\()?(https?:\/\/[0-9a-zA-Z-{}|"\./?_=&%:#*@;]+)(?:\)})?['"][^>]*>.*?<\/button>/g, match => {
|
|
101
|
+
const url = match.match(/(https?:\/\/[0-9a-zA-Z-\./?_=&%:#*@;]+)(?![^ ])/);
|
|
102
|
+
if (url) {
|
|
103
|
+
return `<span id="${random(5)}" class="detect-url">${url[1]}</span>`;
|
|
104
|
+
}
|
|
105
|
+
return match; // If no match found, return the original string
|
|
106
|
+
}).replace(
|
|
107
|
+
// replace url to detect url
|
|
108
|
+
/((?<!class="detect-url">|#{shortlink(?:_static)?\(|<span style="line-height: 20px;margin-right: 8px;pointer-events:none;">)\bhttps*:\/\/[0-9a-zA-Z-{}|"\./?_=&%:#*@;]+)/g, match => `<span id="${random(5)}" class="detect-url">${match}</span>`);
|
|
109
|
+
tmp = convertDivToBreakTag(tmp);
|
|
110
|
+
setTextValue(tmp);
|
|
111
|
+
const text = convertHtmlText(tmp, 'raw', {}, {}, 'input', 'add');
|
|
112
|
+
const textConverted = convertBreakTag(text);
|
|
113
|
+
onChange(removeHtmlTag(textConverted));
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
if (typeof addMessageToQueue === 'function') {
|
|
117
|
+
addMessageToQueue({
|
|
118
|
+
path: 'app/containers/UIDev/UIEditorPersonalization/Input/index.jsx',
|
|
119
|
+
func: 'onTriggerChange',
|
|
120
|
+
data: error,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
// eslint-disable-next-line no-console
|
|
124
|
+
console.error(error);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const handleHidePopover = () => {
|
|
128
|
+
setIsShowPopover(false);
|
|
129
|
+
};
|
|
130
|
+
const handleOpenChangeAddDynamicContent = useCallback((newChange) => {
|
|
131
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { visible: newChange })));
|
|
132
|
+
}, []);
|
|
133
|
+
const handleOpenChange = (newOpen) => {
|
|
134
|
+
if (disabled)
|
|
135
|
+
return;
|
|
136
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { activeTagId: '' })));
|
|
137
|
+
setIsShowPopover(newOpen);
|
|
138
|
+
};
|
|
139
|
+
const callback = (type, data) => {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
switch (type) {
|
|
142
|
+
case 'REPLACE_DETECTED_URL': {
|
|
143
|
+
const innerHTML = getObjectPropSafely(() => { var _a; return (_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.innerHTML; }, '');
|
|
144
|
+
if (innerHTML) {
|
|
145
|
+
// remove span url và focus vào vị trí remove để add tag shortlink vào vị trí này.
|
|
146
|
+
const index = Array.from((_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.childNodes).findIndex((element) => element.id === data.id);
|
|
147
|
+
if (index !== -1) {
|
|
148
|
+
const range = document.createRange(); // Tạo một đối tượng Range
|
|
149
|
+
const sel = window.getSelection(); // Lấy đối tượng Selection hiện tại
|
|
150
|
+
range.setStart((_b = personalizationInputRef.current) === null || _b === void 0 ? void 0 : _b.childNodes[index], 0); // Đặt điểm bắt đầu của Range
|
|
151
|
+
range.collapse(true); // Thu gọn Range để tập trung vào điểm bắt đầu
|
|
152
|
+
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges(); // Xóa tất cả các Range hiện có
|
|
153
|
+
sel === null || sel === void 0 ? void 0 : sel.addRange(range); // Thêm Range mới vào Selection
|
|
154
|
+
caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
|
|
155
|
+
const newDataUpdate = innerHTML.replace(data.outerHTML, '');
|
|
156
|
+
personalizationInputRef.current.innerHTML = newDataUpdate;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
default:
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const handleChangeInputDebounce = (ms) => {
|
|
166
|
+
clearTimeout(timerRef.current);
|
|
167
|
+
timerRef.current = setTimeout(() => {
|
|
168
|
+
caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
|
|
169
|
+
onTriggerChange();
|
|
170
|
+
}, ms);
|
|
171
|
+
};
|
|
172
|
+
const onPaste = (e) => {
|
|
173
|
+
var _a;
|
|
174
|
+
// cancel paste
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
// get text representation of clipboard
|
|
177
|
+
const text = (e.originalEvent || e).clipboardData.getData('text/plain');
|
|
178
|
+
handleChangeInputDebounce(ms);
|
|
179
|
+
// insert text manually
|
|
180
|
+
document.execCommand('insertHTML', false, text);
|
|
181
|
+
(_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
182
|
+
};
|
|
183
|
+
const handleInsertSortLink = (url, type) => {
|
|
184
|
+
try {
|
|
185
|
+
const { id, value: linkValue, label: linkLabel } = genShortLinkValue(url, type);
|
|
186
|
+
setPopoverOpenShortLink(false);
|
|
187
|
+
if (personalizationInputRef.current instanceof HTMLElement) {
|
|
188
|
+
CaretPositioning.restoreSelection(personalizationInputRef.current, caretPositionRef.current);
|
|
189
|
+
pasteHtmlAtCaret(getInsertLinkPatternWithAppendSpaceEnd(id, linkValue, linkLabel), null);
|
|
190
|
+
onTriggerChange();
|
|
191
|
+
caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
|
|
192
|
+
}
|
|
193
|
+
setInitSelectedProperties({ link: '', keyTag: 'shortlink_static', urlDetected: '' });
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
if (typeof addMessageToQueue === 'function') {
|
|
197
|
+
addMessageToQueue({
|
|
198
|
+
path: 'app/containers/UIDev/UIEditorPersonalization/Input/index.jsx',
|
|
199
|
+
func: 'handleInsertText',
|
|
200
|
+
data: err,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
const handleCloseAddDynamicContent = () => {
|
|
206
|
+
setDynamicContent(Object.assign(Object.assign({}, dynamicContent), { visible: false }));
|
|
207
|
+
};
|
|
208
|
+
const handleInsertText = (dataObj) => {
|
|
209
|
+
try {
|
|
210
|
+
const id = random(5);
|
|
211
|
+
const { mappingFields = '', type = '', attribute = {}, customFunction = {} } = dataObj;
|
|
212
|
+
const isCustom = type === 'custom';
|
|
213
|
+
const personalizationCode = isCustom ? mappingFields : `#{${mappingFields}||""}`;
|
|
214
|
+
const bgColor = getBgColorByContentSourceType(type);
|
|
215
|
+
const label = getObjectPropSafely(() => isCustom ? customFunction.templateName : attribute.label);
|
|
216
|
+
if (personalizationInputRef.current instanceof HTMLElement) {
|
|
217
|
+
if (dynamicContent.activeTagId) {
|
|
218
|
+
// for case update
|
|
219
|
+
const element = document.getElementById(dynamicContent.activeTagId);
|
|
220
|
+
const child = createElement('em', {
|
|
221
|
+
class: 'editor-icon-remove',
|
|
222
|
+
style: 'color: white;font-style: normal;',
|
|
223
|
+
}, ['x']);
|
|
224
|
+
const newElement = createElement('button', {
|
|
225
|
+
id,
|
|
226
|
+
class: 'insert-word',
|
|
227
|
+
style: `color: white; font-size: inherit; outline: none;border: 1px solid transparent; border-radius: 1.2rem; max-height: 30px; cursor: pointer; backgroundColor: ${bgColor}`,
|
|
228
|
+
contentEditable: 'false',
|
|
229
|
+
value: `${personalizationCode.replace(/\s/gm, ' ')}`,
|
|
230
|
+
}, [
|
|
231
|
+
`${getObjectPropSafely(() => isCustom ? customFunction.templateName : attribute.label)} `,
|
|
232
|
+
child,
|
|
233
|
+
]);
|
|
234
|
+
if (element && element.parentNode) {
|
|
235
|
+
element.parentNode.replaceChild(newElement, element);
|
|
236
|
+
}
|
|
237
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { activeTagId: dynamicContent.activeTagId, defaultData: Object.assign(Object.assign({}, (prev.defaultData || {})), { [dynamicContent.activeTagId]: dataObj }), visible: false })));
|
|
238
|
+
onTriggerChange();
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
personalizationInputRef.current.focus();
|
|
242
|
+
CaretPositioning.restoreSelection(personalizationInputRef.current, caretPositionRef.current);
|
|
243
|
+
pasteHtmlAtCaret(getInsertPatternWithAppendSpaceEnd(id, personalizationCode, label, bgColor), null, () => {
|
|
244
|
+
caretPositionRef.current = CaretPositioning.saveSelection(personalizationInputRef.current);
|
|
245
|
+
onTriggerChange();
|
|
246
|
+
});
|
|
247
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { activeTagId: id, defaultData: Object.assign(Object.assign({}, (prev.defaultData || {})), { [id]: dataObj }), visible: false })));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
catch (error) {
|
|
251
|
+
if (typeof addMessageToQueue === 'function') {
|
|
252
|
+
addMessageToQueue({
|
|
253
|
+
path: PATH,
|
|
254
|
+
func: 'handleInsertText',
|
|
255
|
+
data: error,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
// eslint-disable-next-line no-console
|
|
259
|
+
console.log(error);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const handleKeyPress = (e) => {
|
|
263
|
+
if (isRealTime) {
|
|
264
|
+
handleChangeInputDebounce(ms);
|
|
265
|
+
}
|
|
266
|
+
if (canMultipleLine)
|
|
267
|
+
return;
|
|
268
|
+
if (+e.charCode === 13) {
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const getDangerouslySetInnerHTML = (text) => {
|
|
273
|
+
if (text) {
|
|
274
|
+
const regex = /<[^<>]+>/g;
|
|
275
|
+
let tag;
|
|
276
|
+
// eslint-disable-next-line no-cond-assign
|
|
277
|
+
while ((tag = regex.exec(text))) {
|
|
278
|
+
if (!validateHTMLTags.isValidTag(tag[0])) {
|
|
279
|
+
const finalTag = tag[0].replace('<', '<').replace('>', '>');
|
|
280
|
+
text = text.replace(tag[0], finalTag);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
text = text.replaceAll('\n', '<br>');
|
|
284
|
+
if (spacingNonTracking(text)) {
|
|
285
|
+
return text;
|
|
286
|
+
}
|
|
287
|
+
return safeParse(text, '').concat('<br />');
|
|
288
|
+
}
|
|
289
|
+
return '';
|
|
290
|
+
};
|
|
291
|
+
const toggleShortLinkModal = useCallback(() => {
|
|
292
|
+
setPopoverOpenShortLink(!popoverOpenShortLink);
|
|
293
|
+
}, [popoverOpenShortLink]);
|
|
294
|
+
const handleClickDynamicItem = (e, dynamicKey) => {
|
|
295
|
+
e.stopPropagation();
|
|
296
|
+
handleHidePopover();
|
|
297
|
+
if (dynamicKey === AllowDynamicType.SHORTLINK) {
|
|
298
|
+
toggleShortLinkModal();
|
|
299
|
+
}
|
|
300
|
+
if (dynamicKey === AllowDynamicType.ADDPERSONALIZATION) {
|
|
301
|
+
handleOpenChangeAddDynamicContent(true);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* [NOTE:open modal to edit]
|
|
306
|
+
*/
|
|
307
|
+
useEffect(() => {
|
|
308
|
+
const handleClickTag = (e) => {
|
|
309
|
+
try {
|
|
310
|
+
e.stopPropagation();
|
|
311
|
+
if (e.target) {
|
|
312
|
+
const { value = '', id = '' } = e.target;
|
|
313
|
+
const shortLink = value.replace(/#|{|}|/g, '').split('(');
|
|
314
|
+
if (shortLink && shortLink.length >= 2) {
|
|
315
|
+
const link = shortLink[1].substring(0, shortLink[1].length - 1) || '';
|
|
316
|
+
setInitSelectedProperties(prev => (Object.assign(Object.assign({}, prev), { link, keyTag: shortLink[0], urlDetected: e.currentTarget })));
|
|
317
|
+
toggleShortLinkModal();
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { activeTagId: id })));
|
|
321
|
+
handleOpenChangeAddDynamicContent(true);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
catch (err) {
|
|
326
|
+
// eslint-disable-next-line no-console
|
|
327
|
+
console.log('err', err);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const listTags = Array.from(document.querySelectorAll('#ants-ui-input-personalization .input-personal .insert-word'));
|
|
331
|
+
if (listTags && listTags.length > 0) {
|
|
332
|
+
listTags.forEach((tag) => {
|
|
333
|
+
tag.addEventListener('click', handleClickTag);
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return () => {
|
|
337
|
+
listTags.forEach((tag) => {
|
|
338
|
+
tag.removeEventListener('click', handleClickTag);
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
}, [handleOpenChangeAddDynamicContent, textValue, toggleShortLinkModal]);
|
|
342
|
+
/** Anchor tooltip */
|
|
343
|
+
useEffect(() => {
|
|
344
|
+
let listElement = [];
|
|
345
|
+
const handleMouseOver = (e, targetRect) => {
|
|
346
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
347
|
+
const viewportTop = window.pageYOffset;
|
|
348
|
+
const viewportLeft = window.pageXOffset;
|
|
349
|
+
const offsetWidth = targetRect.width / 2;
|
|
350
|
+
const offsetHeight = targetRect.height / 2;
|
|
351
|
+
const tooltipHeight = 16;
|
|
352
|
+
const x = targetRect.left - viewportLeft + offsetWidth;
|
|
353
|
+
const y = targetRect.top - viewportTop - offsetHeight - tooltipHeight;
|
|
354
|
+
setTooltipHover({
|
|
355
|
+
x,
|
|
356
|
+
y,
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
const handleMouseOut = (e) => {
|
|
360
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
361
|
+
setTooltipHover({ x: 0, y: 0 });
|
|
362
|
+
};
|
|
363
|
+
const handleClickDetectUrl = (e) => {
|
|
364
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
365
|
+
setInitSelectedProperties(prev => {
|
|
366
|
+
var _a;
|
|
367
|
+
return (Object.assign(Object.assign({}, prev), { link: ((_a = e === null || e === void 0 ? void 0 : e.currentTarget) === null || _a === void 0 ? void 0 : _a.textContent) || '', urlDetected: e === null || e === void 0 ? void 0 : e.currentTarget }));
|
|
368
|
+
});
|
|
369
|
+
toggleShortLinkModal();
|
|
370
|
+
};
|
|
371
|
+
if (!isViewMode) {
|
|
372
|
+
const elements = document.querySelectorAll('#ants-ui-input-personalization .detect-url');
|
|
373
|
+
listElement = Array.from(elements);
|
|
374
|
+
if (listElement.length) {
|
|
375
|
+
listElement.forEach((element) => {
|
|
376
|
+
element.addEventListener('mouseover', e => handleMouseOver(e, element.getBoundingClientRect()));
|
|
377
|
+
element.addEventListener('mouseout', handleMouseOut);
|
|
378
|
+
/** Open shortlink modal */
|
|
379
|
+
element.addEventListener('click', handleClickDetectUrl);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return () => {
|
|
384
|
+
listElement.forEach((element) => {
|
|
385
|
+
element.removeEventListener('mouseover', handleMouseOver);
|
|
386
|
+
element.removeEventListener('mouseout', handleMouseOut);
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
}, [textValue, isViewMode, setTooltipHover, toggleShortLinkModal]);
|
|
390
|
+
/** Style & remove for tag shortlink button & icon remove */
|
|
391
|
+
useLayoutEffect(() => {
|
|
392
|
+
// get button Els [x] to create hover and style it
|
|
393
|
+
const iconRemoveEls = document.querySelectorAll('.editor-icon-remove');
|
|
394
|
+
const listIconRemove = iconRemoveEls && Array.from(iconRemoveEls);
|
|
395
|
+
// get button elements
|
|
396
|
+
const buttonElement = document.querySelectorAll('.insert-word');
|
|
397
|
+
const listBtnElement = buttonElement && Array.from(buttonElement);
|
|
398
|
+
const handleRemoveTag = (e) => {
|
|
399
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
400
|
+
if (e && ((_a = e.target) === null || _a === void 0 ? void 0 : _a.nodeName) === 'EM' && ((_b = e.target) === null || _b === void 0 ? void 0 : _b.className) === 'editor-icon-remove') {
|
|
401
|
+
e.stopPropagation();
|
|
402
|
+
if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.parentElement) &&
|
|
403
|
+
has(dynamicContent.defaultData, [(_e = (_d = e.target) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.id])) {
|
|
404
|
+
setDynamicContent(prev => {
|
|
405
|
+
var _a, _b;
|
|
406
|
+
return (Object.assign(Object.assign({}, prev), { activeTagId: '', defaultData: omit(prev.defaultData, [(_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.id]) }));
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
(_g = (_f = e.target) === null || _f === void 0 ? void 0 : _f.parentElement) === null || _g === void 0 ? void 0 : _g.remove();
|
|
410
|
+
setTextValue(personalizationInputRef && ((_h = personalizationInputRef.current) === null || _h === void 0 ? void 0 : _h.innerHTML));
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
listIconRemove.forEach(eachIcon => {
|
|
414
|
+
eachIcon.addEventListener('click', handleRemoveTag);
|
|
415
|
+
});
|
|
416
|
+
handleUpdateInputPersonalization(listIconRemove, listBtnElement);
|
|
417
|
+
return () => {
|
|
418
|
+
listIconRemove.forEach(eachIcon => {
|
|
419
|
+
eachIcon.removeEventListener('click', handleRemoveTag);
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
}, [dynamicContent.defaultData, textValue]);
|
|
423
|
+
useLayoutEffect(() => {
|
|
424
|
+
try {
|
|
425
|
+
// save caret position
|
|
426
|
+
if (!personalizationInputRef.current) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
// Perhaps React (whose VDOM gets outdated because we often prevent
|
|
430
|
+
// rerendering) did not update the DOM. So we update it manually now.
|
|
431
|
+
if (caretPositionRef && caretPositionRef.current) {
|
|
432
|
+
CaretPositioning.restoreSelection(personalizationInputRef.current, caretPositionRef.current);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
catch (error) {
|
|
436
|
+
if (typeof addMessageToQueue === 'function') {
|
|
437
|
+
addMessageToQueue({
|
|
438
|
+
path: PATH,
|
|
439
|
+
func: 'useLayoutEffect',
|
|
440
|
+
data: error,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
if (typeof onError === 'function') {
|
|
444
|
+
onError(error, {
|
|
445
|
+
component: PATH,
|
|
446
|
+
action: 'useLayoutEffect saved caret position',
|
|
447
|
+
args: {},
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}, [addMessageToQueue, onError, textValue]);
|
|
452
|
+
const renderContentDynamicOptions = () => {
|
|
453
|
+
if (!(allowDynamicOptions === null || allowDynamicOptions === void 0 ? void 0 : allowDynamicOptions.length)) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
return allowDynamicOptions.map((dynamicKey) => (React.createElement(DynamicItem, { key: dynamicKey, onClick: e => handleClickDynamicItem(e, dynamicKey) }, mapLabelPersonalization(dynamicKey))));
|
|
457
|
+
};
|
|
458
|
+
const renderAddPersonalizationView = () => {
|
|
459
|
+
var _a, _b;
|
|
460
|
+
if (isViewMode) {
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
const isRenderPopover = allowDynamicOptions && (allowDynamicOptions === null || allowDynamicOptions === void 0 ? void 0 : allowDynamicOptions.length) > 1;
|
|
464
|
+
const isOnlyOneOpt = allowDynamicOptions && (allowDynamicOptions === null || allowDynamicOptions === void 0 ? void 0 : allowDynamicOptions.length) === 1;
|
|
465
|
+
const hasOnlyPersonalization = isOnlyOneOpt && (allowDynamicOptions === null || allowDynamicOptions === void 0 ? void 0 : allowDynamicOptions.includes(AllowDynamicType.ADDPERSONALIZATION));
|
|
466
|
+
const hasOnlyShortlink = isOnlyOneOpt && (allowDynamicOptions === null || allowDynamicOptions === void 0 ? void 0 : allowDynamicOptions.includes(AllowDynamicType.SHORTLINK));
|
|
467
|
+
const iconPersonalization = (React.createElement(Icon, { type: "icon-ants-person-alt", onClick: e => {
|
|
468
|
+
e.stopPropagation();
|
|
469
|
+
if (disabled || isRenderPopover)
|
|
470
|
+
return;
|
|
471
|
+
// Open short link modal
|
|
472
|
+
if (hasOnlyShortlink) {
|
|
473
|
+
toggleShortLinkModal();
|
|
474
|
+
}
|
|
475
|
+
else if (hasOnlyPersonalization) {
|
|
476
|
+
// Open Personalization modal
|
|
477
|
+
setDynamicContent(prev => (Object.assign(Object.assign({}, prev), { activeTagId: '', visible: true })));
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
toggleShortLinkModal();
|
|
481
|
+
}
|
|
482
|
+
}, className: "customize-antsomi-profile", style: {
|
|
483
|
+
width: 24,
|
|
484
|
+
height: 24,
|
|
485
|
+
color: disabled ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorTextDisabled : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorPrimary,
|
|
486
|
+
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
487
|
+
} }));
|
|
488
|
+
if (!isRenderPopover) {
|
|
489
|
+
return iconPersonalization;
|
|
490
|
+
}
|
|
491
|
+
return (React.createElement(Popover, { content: renderContentDynamicOptions(), placement: "bottomLeft", rootClassName: "no-padding-content", trigger: "click", open: isShowPopover, onOpenChange: handleOpenChange }, iconPersonalization));
|
|
492
|
+
};
|
|
493
|
+
return (React.createElement(WrapperInputStyle, { id: "ants-ui-input-personalization" },
|
|
494
|
+
React.createElement("div", { className: classnames({
|
|
495
|
+
'input-wrapper-outter': true,
|
|
496
|
+
'styles-input-wrapper': !isViewMode,
|
|
497
|
+
'input-error': (errors === null || errors === void 0 ? void 0 : errors.length) && (errors === null || errors === void 0 ? void 0 : errors.length) > 0,
|
|
498
|
+
}), style: Object.assign(Object.assign({}, (isViewMode && {
|
|
499
|
+
padding: 0,
|
|
500
|
+
minHeight: 0,
|
|
501
|
+
fontSize: 12,
|
|
502
|
+
border: 'none',
|
|
503
|
+
})), { width: '100%' }), onClick: () => { var _a; return (_a = personalizationInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } },
|
|
504
|
+
React.createElement("div", { className: "input-personal", style: {
|
|
505
|
+
display: textValue && textValue !== '<br>' ? 'inline-block' : undefined,
|
|
506
|
+
}, contentEditable: !isViewMode, onBlur: onTriggerChange, onKeyPress: handleKeyPress, ref: personalizationInputRef,
|
|
507
|
+
// eslint-disable-next-line react/no-danger
|
|
508
|
+
dangerouslySetInnerHTML: {
|
|
509
|
+
__html: getDangerouslySetInnerHTML(textValue),
|
|
510
|
+
}, onPaste: onPaste }),
|
|
511
|
+
renderAddPersonalizationView()),
|
|
512
|
+
React.createElement(TooltipHover, { isShow: tooltipHoverDebounce.x > 0 && tooltipHoverDebounce.y > 0, top: tooltipHoverDebounce.y, left: tooltipHoverDebounce.x }, "Click on the link to convert it to a shortlink"),
|
|
513
|
+
popoverOpenShortLink && (React.createElement(PopupShortLink, { open: popoverOpenShortLink, disabledOpts: disabledOpts, onOk: handleInsertSortLink, onClose: toggleShortLinkModal, initSelectedProperties: initSelectedProperties, callback: callback })),
|
|
514
|
+
isRenderAddDynamicContent && (React.createElement(AddDynamicContent, { APIConfig: apiConfig, defaultDynamicIndex: 1, showIndex: showIndex, showDisplayFormat: showDisplayFormat, isShowCustomFunction: isShowCustomFunction, visible: dynamicContent.visible, defaultData: dynamicContent.defaultData[dynamicContent.activeTagId] || {}, journeySettings: dynamicContent.journeySettings, contentSources: dynamicContent.contentSources, onOk: (value) => {
|
|
515
|
+
handleInsertText(value);
|
|
516
|
+
}, onCancel: () => handleCloseAddDynamicContent() }))));
|
|
517
|
+
};
|
|
518
|
+
InputDynamic.defaultProps = defaultProps;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import type { SelectedPropertiesProps } from './types';
|
|
3
|
+
type PopupShortLinkProps = {
|
|
4
|
+
open: any;
|
|
5
|
+
onClose: Function;
|
|
6
|
+
onOk: Function;
|
|
7
|
+
disabledOpts?: DisableShortLinkTypeProps;
|
|
8
|
+
initSelectedProperties: SelectedPropertiesProps;
|
|
9
|
+
callback: Function;
|
|
10
|
+
};
|
|
11
|
+
export type ShortLinkType = 'individual' | 'general';
|
|
12
|
+
export type DisableShortLinkTypeProps = {
|
|
13
|
+
[key in ShortLinkType]?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const PopupShortLink: FC<PopupShortLinkProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { Col, Row } from 'antd';
|
|
4
|
+
// Molecules
|
|
5
|
+
import { Modal } from '../../molecules';
|
|
6
|
+
// Components
|
|
7
|
+
import { Radio } from '../Radio';
|
|
8
|
+
// Styled
|
|
9
|
+
import { InputShortLink, InputWrapper } from './styled';
|
|
10
|
+
// Utils
|
|
11
|
+
import { validateURL } from './utils';
|
|
12
|
+
const OPTIONS = [
|
|
13
|
+
{
|
|
14
|
+
value: 'individual',
|
|
15
|
+
label: 'Individual',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: 'general',
|
|
19
|
+
label: 'General',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export const PopupShortLink = props => {
|
|
23
|
+
const { open, onClose, onOk, disabledOpts, initSelectedProperties, callback } = props;
|
|
24
|
+
const [state, setState] = useState({
|
|
25
|
+
link: '',
|
|
26
|
+
type: 'individual',
|
|
27
|
+
error: '',
|
|
28
|
+
});
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
let type = 'individual';
|
|
31
|
+
if (initSelectedProperties && initSelectedProperties.keyTag) {
|
|
32
|
+
type = initSelectedProperties.keyTag === 'shortlink' ? 'individual' : 'general';
|
|
33
|
+
}
|
|
34
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: initSelectedProperties.link, type: type })));
|
|
35
|
+
}, [initSelectedProperties, setState]);
|
|
36
|
+
const handleClose = () => {
|
|
37
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: '', error: '' })));
|
|
38
|
+
if (onClose)
|
|
39
|
+
onClose();
|
|
40
|
+
};
|
|
41
|
+
const handleValidate = ({ urlString = state.link, afterValidate }) => {
|
|
42
|
+
const isValid = validateURL(urlString);
|
|
43
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { error: isValid ? '' : 'Invalid URL' })));
|
|
44
|
+
if (typeof afterValidate === 'function')
|
|
45
|
+
afterValidate(isValid);
|
|
46
|
+
};
|
|
47
|
+
const handleOnChange = (value) => {
|
|
48
|
+
if (state.error)
|
|
49
|
+
handleValidate({ urlString: value });
|
|
50
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: value })));
|
|
51
|
+
};
|
|
52
|
+
const handleOnOK = () => {
|
|
53
|
+
handleValidate({
|
|
54
|
+
afterValidate: (isValid) => {
|
|
55
|
+
if (isValid && onOk) {
|
|
56
|
+
if (initSelectedProperties.urlDetected) {
|
|
57
|
+
callback('REPLACE_DETECTED_URL', initSelectedProperties.urlDetected);
|
|
58
|
+
}
|
|
59
|
+
onOk(state.link, state.type);
|
|
60
|
+
handleClose();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const onChangeType = (event) => {
|
|
66
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { type: event.target.value })));
|
|
67
|
+
};
|
|
68
|
+
return (React.createElement(Modal, { open: open, onCancel: handleClose, title: React.createElement("div", { style: { color: 'rgba(0, 0, 0, 0.87)', fontWeight: 'normal', fontSize: '16px' } }, "Add Short Link"), okText: "OK", cancelText: "Cancel", closable: false, onOk: handleOnOK, okButtonProps: {
|
|
69
|
+
disabled: !validateURL(state.link),
|
|
70
|
+
type: !validateURL(state.link) ? 'default' : 'primary',
|
|
71
|
+
} },
|
|
72
|
+
React.createElement(Row, null,
|
|
73
|
+
React.createElement(Col, { span: 6 },
|
|
74
|
+
React.createElement("span", { style: { fontSize: 12, color: '#000' } }, "Short link type")),
|
|
75
|
+
React.createElement(Col, { span: 18 },
|
|
76
|
+
React.createElement(Radio.Group, { onChange: onChangeType, value: state.type }, OPTIONS.map(each => (React.createElement(Radio, { key: each.value, disabled: disabledOpts && disabledOpts[each.value], name: "shortlink-type", value: each.value }, each.label)))))),
|
|
77
|
+
React.createElement(Row, null,
|
|
78
|
+
React.createElement(Col, { span: 24 },
|
|
79
|
+
React.createElement(InputWrapper, null,
|
|
80
|
+
React.createElement(InputShortLink, { required: true, isReverseMask: true, isHideErrMessage: true, labelColor: "#000000", id: "input-short-link-url", label: "Your URL", value: state.link, onAfterChange: handleOnChange })))),
|
|
81
|
+
!!state.error && (React.createElement(Row, null,
|
|
82
|
+
React.createElement(Col, { span: 6 }),
|
|
83
|
+
React.createElement(Col, { span: 18 },
|
|
84
|
+
React.createElement("div", null, state.error))))));
|
|
85
|
+
};
|