@antscorp/antsomi-ui 1.3.4 → 1.3.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/css/main.scss +6 -0
- 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/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 +516 -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 +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/styled.d.ts +4 -0
- package/es/components/atoms/Popover/styled.js +5 -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.d.ts +2 -1
- package/es/components/atoms/Slider/index.js +14 -16
- package/es/components/atoms/SliderV2/index.d.ts +6 -0
- package/es/components/atoms/SliderV2/index.js +21 -0
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/index.d.ts +10 -0
- package/es/components/atoms/index.js +8 -0
- package/es/components/common/ConfigProvider/ConfigProvider.d.ts +2 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +14 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +310 -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/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 +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/ColorPicker/CustomPicker/index.js +9 -18
- package/es/components/molecules/ColorPicker/CustomPicker/styled.d.ts +5 -1
- package/es/components/molecules/ColorPicker/CustomPicker/styled.js +14 -3
- package/es/components/molecules/ColorPicker/index.js +3 -3
- package/es/components/molecules/ColorSetting/index.js +3 -3
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +7 -3
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +212 -205
- 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.js +49 -5
- 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 +3 -1
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +21 -9
- 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/FontFamilySelect/constants.d.ts +307 -0
- package/es/components/molecules/FontFamilySelect/constants.js +257 -0
- package/es/components/molecules/FontFamilySelect/index.d.ts +17 -0
- package/es/components/molecules/FontFamilySelect/index.js +53 -0
- package/es/components/molecules/FontSetting/constants.d.ts +3 -0
- package/es/components/molecules/FontSetting/constants.js +22 -0
- package/es/components/molecules/FontSetting/index.d.ts +24 -0
- package/es/components/molecules/FontSetting/index.js +54 -0
- package/es/components/molecules/FontSetting/types.d.ts +22 -0
- package/es/components/molecules/FontSetting/types.js +1 -0
- package/es/components/molecules/FontWeightSelect/constants.d.ts +28 -0
- package/es/components/molecules/FontWeightSelect/constants.js +11 -0
- package/es/components/molecules/FontWeightSelect/index.d.ts +9 -0
- package/es/components/molecules/FontWeightSelect/index.js +39 -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/GradientSetting/index.d.ts +19 -2
- package/es/components/molecules/GradientSetting/index.js +52 -30
- package/es/components/molecules/GradientSetting/styled.d.ts +1 -0
- package/es/components/molecules/GradientSetting/styled.js +59 -0
- package/es/components/molecules/InputNumber/index.js +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/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 +13 -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 +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 +3 -0
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/SettingWrapper/index.d.ts +1 -2
- package/es/components/molecules/SettingWrapperPopover/index.d.ts +16 -0
- package/es/components/molecules/SettingWrapperPopover/index.js +17 -0
- 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/TextDecorationSelect/constants.d.ts +19 -0
- package/es/components/molecules/TextDecorationSelect/constants.js +26 -0
- package/es/components/molecules/TextDecorationSelect/index.d.ts +15 -0
- package/es/components/molecules/TextDecorationSelect/index.js +45 -0
- package/es/components/molecules/TextTransformSelect/constants.d.ts +13 -0
- package/es/components/molecules/TextTransformSelect/constants.js +19 -0
- package/es/components/molecules/TextTransformSelect/index.d.ts +9 -0
- package/es/components/molecules/TextTransformSelect/index.js +39 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +2 -2
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -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 +18 -3
- package/es/components/molecules/index.js +15 -3
- package/es/components/organism/GenerativeInsights/constants.d.ts +1 -0
- package/es/components/organism/GenerativeInsights/constants.js +1 -0
- package/es/components/organism/GenerativeInsights/index.d.ts +11 -0
- package/es/components/organism/GenerativeInsights/index.js +57 -0
- package/es/components/organism/GenerativeInsights/styled.d.ts +12 -0
- package/es/components/organism/GenerativeInsights/styled.js +66 -0
- package/es/components/organism/GenerativeInsights/utils.d.ts +13 -0
- package/es/components/organism/GenerativeInsights/utils.js +50 -0
- package/es/components/organism/index.d.ts +1 -0
- package/es/components/organism/index.js +1 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/index.js +17 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.d.ts +2 -0
- package/es/components/template/TemplateListing/components/BlankTemplate/styled.js +24 -0
- package/es/components/template/TemplateListing/components/CategoryListing/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/CategoryListing/index.js +103 -0
- package/es/components/template/TemplateListing/components/CategoryListing/styled.d.ts +5 -0
- package/es/components/template/TemplateListing/components/CategoryListing/styled.js +55 -0
- package/es/components/template/TemplateListing/components/CategoryListing/types.d.ts +10 -0
- package/es/components/template/TemplateListing/components/CategoryListing/types.js +1 -0
- package/es/components/template/TemplateListing/components/TemplateItem/index.d.ts +3 -0
- package/es/components/template/TemplateListing/components/TemplateItem/index.js +53 -0
- package/es/components/template/TemplateListing/components/TemplateItem/styled.d.ts +1 -0
- package/es/components/template/TemplateListing/components/TemplateItem/styled.js +82 -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 +8 -0
- package/es/components/template/TemplateListing/constants/defaultProps.js +20 -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/index.d.ts +3 -0
- package/es/components/template/TemplateListing/index.js +22 -0
- package/es/components/template/TemplateListing/styled/index.d.ts +2 -0
- package/es/components/template/TemplateListing/styled/index.js +16 -0
- package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +8 -0
- package/es/components/template/TemplateListing/types/BlankTemplate.js +1 -0
- package/es/components/template/TemplateListing/types/CategoryListing.d.ts +16 -0
- package/es/components/template/TemplateListing/types/CategoryListing.js +1 -0
- package/es/components/template/TemplateListing/types/TemplateItem.d.ts +14 -0
- package/es/components/template/TemplateListing/types/TemplateItem.js +1 -0
- package/es/components/template/TemplateListing/types/TemplateListing.d.ts +15 -0
- package/es/components/template/TemplateListing/types/TemplateListing.js +1 -0
- package/es/components/template/TemplateListing/types/index.d.ts +4 -0
- package/es/components/template/TemplateListing/types/index.js +4 -0
- package/es/components/template/index.d.ts +2 -0
- package/es/components/template/index.js +2 -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/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/locales/en/translation.json +167 -1
- package/es/locales/i18n.d.ts +167 -0
- package/es/locales/translations.d.ts +166 -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} +7 -5
- package/es/models/{SavedImage.js → SavedMedia.js} +7 -3
- 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/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 +37 -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 +258 -80
- 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 +27 -9
- 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 -68
- 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
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { useRef, useEffect, useState, useMemo } from 'react';
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
|
5
|
+
// Components
|
|
6
|
+
import { Icon } from '../Icon';
|
|
7
|
+
import { Popover } from '../Popover';
|
|
8
|
+
// Styled
|
|
9
|
+
import { ContainerSlideBar, MainContent, MenuItem, MenuList, SlideItem, SliderWrapper, SlideText, WrapperDisable, WrapperOverflow, } from './styled';
|
|
10
|
+
import { PlusCircleFilled } from '@ant-design/icons';
|
|
11
|
+
// Constants
|
|
12
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
13
|
+
import { BTN_ADD_SIZE, slideActionType, WIDTH_SLIDE_ITEM } from './constants';
|
|
14
|
+
// Utils
|
|
15
|
+
import { getObjectPropSafely, handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
16
|
+
// Locales
|
|
17
|
+
import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
18
|
+
import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
|
|
19
|
+
const getItemStyle = (isDragging, draggableStyle) => (Object.assign({
|
|
20
|
+
// some basic styles to make the items look a bit nicer
|
|
21
|
+
userSelect: 'none', borderLeft: isDragging ? '1px solid #e0e0e0' : 'none' }, draggableStyle));
|
|
22
|
+
const PATH = 'src/components/atoms/SlideBar/SlideBar.tsx';
|
|
23
|
+
export const SlideBar = props => {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
|
+
const { isViewMode, isShowLabelSequentially, isDragDisabled, isShowAdd, disabled, prefix, options, activeId, limit, errors, callback, } = props;
|
|
26
|
+
// States
|
|
27
|
+
const [state, setState] = useState({
|
|
28
|
+
cacheInfoClicked: {
|
|
29
|
+
label: '',
|
|
30
|
+
value: '',
|
|
31
|
+
},
|
|
32
|
+
openPopover: {},
|
|
33
|
+
disabledPrev: true,
|
|
34
|
+
disabledNext: true,
|
|
35
|
+
notiUpdateScroll: 1,
|
|
36
|
+
});
|
|
37
|
+
// Refs
|
|
38
|
+
const wrapperOverflowRef = useRef(null);
|
|
39
|
+
const disabledAdd = useMemo(() => disabled || isViewMode || (limit && options.length >= (limit === null || limit === void 0 ? void 0 : limit.max)), [disabled, isViewMode, limit, options.length]);
|
|
40
|
+
const disabledDuplicate = useMemo(() => (limit && options.length >= (limit === null || limit === void 0 ? void 0 : limit.max)) || isViewMode || disabled, [disabled, isViewMode, limit, options.length]);
|
|
41
|
+
const disabledDelete = useMemo(() => (limit && options.length <= (limit === null || limit === void 0 ? void 0 : limit.min)) || isViewMode || disabled, [disabled, isViewMode, limit, options.length]);
|
|
42
|
+
// Locales
|
|
43
|
+
const { t } = i18nInstance;
|
|
44
|
+
const handleClick = (event, slideInfo) => {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { cacheInfoClicked: slideInfo })));
|
|
47
|
+
};
|
|
48
|
+
const reorder = (list, startIndex, endIndex) => {
|
|
49
|
+
const result = Array.from(list);
|
|
50
|
+
const [removed] = result.splice(startIndex, 1);
|
|
51
|
+
result.splice(endIndex, 0, removed);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
const handleDragEnd = result => {
|
|
55
|
+
try {
|
|
56
|
+
// dropped outside the list
|
|
57
|
+
if (!result.destination) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const items = reorder(options, result.source.index, result.destination.index);
|
|
61
|
+
if (typeof callback === 'function') {
|
|
62
|
+
callback(slideActionType.RE_ORDERS, items);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
handleError(error, {
|
|
67
|
+
path: PATH,
|
|
68
|
+
name: 'handleDragEnd',
|
|
69
|
+
args: {
|
|
70
|
+
error,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
// eslint-disable-next-line no-console
|
|
74
|
+
console.log('error :>', error);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleActiveSlide = (e, slideInfo) => {
|
|
78
|
+
try {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
if (typeof callback === 'function' && !_.isEmpty(slideInfo) && activeId !== slideInfo.value) {
|
|
81
|
+
callback(slideActionType.ACTIVE, slideInfo);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
handleError(error, {
|
|
86
|
+
path: PATH,
|
|
87
|
+
name: 'handleActiveSlide',
|
|
88
|
+
args: {
|
|
89
|
+
error,
|
|
90
|
+
slideInfo,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
// eslint-disable-next-line no-console
|
|
94
|
+
console.log(error);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const handleClosePopover = () => {
|
|
98
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { openPopover: {} })));
|
|
99
|
+
};
|
|
100
|
+
const handleDuplicateSlide = (slideInfo) => {
|
|
101
|
+
try {
|
|
102
|
+
if (typeof callback === 'function' && !_.isEmpty(slideInfo)) {
|
|
103
|
+
callback(slideActionType.DUPLICATE, slideInfo);
|
|
104
|
+
}
|
|
105
|
+
handleClosePopover();
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
handleError(error, {
|
|
109
|
+
path: PATH,
|
|
110
|
+
name: 'handleDuplicateSlide',
|
|
111
|
+
args: {
|
|
112
|
+
error,
|
|
113
|
+
slideInfo,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
// eslint-disable-next-line no-console
|
|
117
|
+
console.log(error);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const handleDeleteSlide = (slideInfo) => {
|
|
121
|
+
try {
|
|
122
|
+
if (typeof callback === 'function' && !_.isEmpty(slideInfo)) {
|
|
123
|
+
callback(slideActionType.DELETE, slideInfo);
|
|
124
|
+
}
|
|
125
|
+
handleClosePopover();
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
handleError(error, {
|
|
129
|
+
path: PATH,
|
|
130
|
+
name: 'handleDeleteSlide',
|
|
131
|
+
args: {
|
|
132
|
+
error,
|
|
133
|
+
slideInfo,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
// eslint-disable-next-line no-console
|
|
137
|
+
console.log(error);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const handleChangeScrollDirection = (type = '') => {
|
|
141
|
+
try {
|
|
142
|
+
if (_.isEmpty(wrapperOverflowRef.current))
|
|
143
|
+
return;
|
|
144
|
+
if (type === 'PREVIOUS') {
|
|
145
|
+
if (wrapperOverflowRef.current.scrollLeft < WIDTH_SLIDE_ITEM) {
|
|
146
|
+
wrapperOverflowRef.current.scrollLeft = 0;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
wrapperOverflowRef.current.scrollLeft -= WIDTH_SLIDE_ITEM;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else if (type === 'NEXT') {
|
|
153
|
+
wrapperOverflowRef.current.scrollLeft += WIDTH_SLIDE_ITEM;
|
|
154
|
+
}
|
|
155
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { notiUpdateScroll: prev.notiUpdateScroll + 1 })));
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
handleError(error, {
|
|
159
|
+
path: PATH,
|
|
160
|
+
name: 'handleChangePrev',
|
|
161
|
+
args: {
|
|
162
|
+
type,
|
|
163
|
+
error,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
// eslint-disable-next-line no-console
|
|
167
|
+
console.log(error);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const handleAddSlide = () => {
|
|
171
|
+
try {
|
|
172
|
+
if (typeof callback === 'function') {
|
|
173
|
+
callback(slideActionType.ADD);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
handleError(error, {
|
|
178
|
+
path: PATH,
|
|
179
|
+
name: 'handleAddSlide',
|
|
180
|
+
args: {
|
|
181
|
+
error,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const handleOpenChange = (newOpen, itemId) => {
|
|
187
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { openPopover: {
|
|
188
|
+
[itemId]: newOpen,
|
|
189
|
+
} })));
|
|
190
|
+
};
|
|
191
|
+
useEffect(() => () => {
|
|
192
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { cacheInfoClicked: { label: '', value: '' } })));
|
|
193
|
+
}, []);
|
|
194
|
+
// Calculator center selected template
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
const selectedSlideEle = document.getElementById(`template-slide-${activeId}`);
|
|
197
|
+
if (selectedSlideEle instanceof HTMLElement &&
|
|
198
|
+
wrapperOverflowRef &&
|
|
199
|
+
wrapperOverflowRef.current) {
|
|
200
|
+
// Calculate the scroll position to center the element
|
|
201
|
+
const elementLeftOffset = selectedSlideEle.offsetLeft;
|
|
202
|
+
const containerWidth = wrapperOverflowRef.current.clientWidth;
|
|
203
|
+
const elementWidth = selectedSlideEle.clientWidth;
|
|
204
|
+
const scrollPosition = elementLeftOffset - (containerWidth - elementWidth) / 2;
|
|
205
|
+
// Set the scroll position of the container
|
|
206
|
+
wrapperOverflowRef.current.scrollLeft = scrollPosition;
|
|
207
|
+
}
|
|
208
|
+
}, [activeId]);
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
if (!_.isEmpty(wrapperOverflowRef.current)) {
|
|
211
|
+
const isDisabledPrevTmp = getObjectPropSafely(() => { var _a; return ((_a = wrapperOverflowRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) === 0; });
|
|
212
|
+
const isDisabledNextTmp = getObjectPropSafely(() => {
|
|
213
|
+
const { scrollLeft = 0, offsetWidth = 0, scrollWidth = 0, } = wrapperOverflowRef.current || {};
|
|
214
|
+
return offsetWidth === scrollWidth || scrollWidth <= Math.ceil(scrollLeft) + offsetWidth;
|
|
215
|
+
});
|
|
216
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { disabledPrev: isDisabledPrevTmp, disabledNext: isDisabledNextTmp })));
|
|
217
|
+
}
|
|
218
|
+
}, [options, state.notiUpdateScroll]);
|
|
219
|
+
const renderMainContent = () => options.map((item, index) => {
|
|
220
|
+
let { label } = _.cloneDeep(item);
|
|
221
|
+
if (isShowLabelSequentially) {
|
|
222
|
+
label = `${prefix} ${index + 1}`;
|
|
223
|
+
}
|
|
224
|
+
return (React.createElement(Draggable, { key: item.value, isDragDisabled: isViewMode || disabled || isDragDisabled, draggableId: item.value, index: index }, (providedDraggable, snapshotDraggable) => {
|
|
225
|
+
var _a, _b;
|
|
226
|
+
return (React.createElement(SlideItem, Object.assign({ id: `template-slide-${item.value}`, isActive: activeId === item.value, className: "slide-item", ref: providedDraggable.innerRef }, providedDraggable.draggableProps, providedDraggable.dragHandleProps, { isSlideError: Array.isArray(errors) && errors.includes(item.value), style: getItemStyle(snapshotDraggable.isDragging, providedDraggable.draggableProps.style), onClick: (e) => {
|
|
227
|
+
e.stopPropagation();
|
|
228
|
+
handleActiveSlide(e, item);
|
|
229
|
+
} }),
|
|
230
|
+
React.createElement(SlideText, { isActive: activeId === item.value }, label),
|
|
231
|
+
!isViewMode && (React.createElement(Popover, { placement: "bottomLeft", trigger: "click", open: state.openPopover[item.value], onOpenChange: newOpen => handleOpenChange(newOpen, item.value), content: React.createElement(MenuList, null,
|
|
232
|
+
React.createElement(WrapperDisable, { disabled: disabledDuplicate },
|
|
233
|
+
React.createElement(MenuItem, { isDisabled: disabledDuplicate, onClick: (e) => {
|
|
234
|
+
e.stopPropagation();
|
|
235
|
+
if (!disabledDuplicate) {
|
|
236
|
+
handleDuplicateSlide(state.cacheInfoClicked);
|
|
237
|
+
}
|
|
238
|
+
} }, t(translations.duplicate.title))),
|
|
239
|
+
React.createElement(WrapperDisable, { disabled: disabledDelete },
|
|
240
|
+
React.createElement(MenuItem, { isDisabled: disabledDelete, onClick: (e) => {
|
|
241
|
+
e.stopPropagation();
|
|
242
|
+
if (!disabledDelete) {
|
|
243
|
+
handleDeleteSlide(state.cacheInfoClicked);
|
|
244
|
+
}
|
|
245
|
+
} }, t(translations.delete.title)))), arrow: false },
|
|
246
|
+
React.createElement(Icon, { type: "icon-ants-three-dot-vertical", color: activeId === item.value ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorText, size: "20px", onClick: (event) => handleClick(event, item), disabled: false })))));
|
|
247
|
+
}));
|
|
248
|
+
});
|
|
249
|
+
const renderSliderDragDrop = () => (React.createElement(WrapperOverflow, { ref: wrapperOverflowRef, id: "wrapper-overflow" },
|
|
250
|
+
React.createElement(DragDropContext, { onDragEnd: handleDragEnd },
|
|
251
|
+
React.createElement(Droppable, { droppableId: "droppable", direction: "horizontal" }, (providedDroppable, _snapshotDroppable) => (React.createElement(MainContent, Object.assign({ ref: providedDroppable.innerRef }, providedDroppable.droppableProps), renderMainContent()))))));
|
|
252
|
+
return (React.createElement(ContainerSlideBar, null,
|
|
253
|
+
React.createElement(SliderWrapper, { isViewMode: isViewMode },
|
|
254
|
+
React.createElement(Icon, { type: "icon-ants-angle-left", style: { fontSize: '16px', cursor: 'pointer', color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary }, className: "btn-arrow-left btn-action-slide-template", disabled: state.disabledPrev, onClick: (e) => {
|
|
255
|
+
e.stopPropagation();
|
|
256
|
+
handleChangeScrollDirection('PREVIOUS');
|
|
257
|
+
} }),
|
|
258
|
+
renderSliderDragDrop(),
|
|
259
|
+
React.createElement(Icon, { type: "icon-ants-angle-right", style: { fontSize: '16px', cursor: 'pointer', color: (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorPrimary }, className: "btn-arrow-right btn-action-slide-template", disabled: state.disabledNext, onClick: (e) => {
|
|
260
|
+
e.stopPropagation();
|
|
261
|
+
handleChangeScrollDirection('NEXT');
|
|
262
|
+
} })),
|
|
263
|
+
isShowAdd && (React.createElement(PlusCircleFilled, { style: {
|
|
264
|
+
fontSize: `${BTN_ADD_SIZE}px`,
|
|
265
|
+
cursor: disabledAdd ? 'not-allowed' : 'pointer',
|
|
266
|
+
color: disabledAdd ? (_c = THEME.token) === null || _c === void 0 ? void 0 : _c.colorTextDisabled : (_d = THEME.token) === null || _d === void 0 ? void 0 : _d.colorPrimary,
|
|
267
|
+
}, disabled: disabledAdd, onClick: (e) => {
|
|
268
|
+
e.stopPropagation();
|
|
269
|
+
if (!disabledAdd) {
|
|
270
|
+
handleAddSlide();
|
|
271
|
+
}
|
|
272
|
+
} }))));
|
|
273
|
+
};
|
|
274
|
+
SlideBar.defaultProps = {
|
|
275
|
+
isViewMode: false,
|
|
276
|
+
disabled: false,
|
|
277
|
+
isShowLabelSequentially: true,
|
|
278
|
+
isShowAdd: true,
|
|
279
|
+
isDragDisabled: false,
|
|
280
|
+
activeId: '',
|
|
281
|
+
prefix: 'Slide',
|
|
282
|
+
options: [],
|
|
283
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const OFFSET_SIZE_SLIDE = 32;
|
|
2
|
+
export declare const BTN_ADD_SIZE = 32;
|
|
3
|
+
export declare const WIDTH_SLIDE_ITEM = 105;
|
|
4
|
+
export declare const slideActionType: {
|
|
5
|
+
readonly ADD: "ADD_SLIDE";
|
|
6
|
+
readonly RE_ORDERS: "RE_ORDERS_SLIDE_LIST";
|
|
7
|
+
readonly ACTIVE: "ACTIVE_SLIDE";
|
|
8
|
+
readonly DUPLICATE: "DUPLICATE_SLIDE";
|
|
9
|
+
readonly DELETE: "DELETE_SLIDE";
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const OFFSET_SIZE_SLIDE = 32;
|
|
2
|
+
export const BTN_ADD_SIZE = 32;
|
|
3
|
+
export const WIDTH_SLIDE_ITEM = 105;
|
|
4
|
+
export const slideActionType = {
|
|
5
|
+
ADD: 'ADD_SLIDE',
|
|
6
|
+
RE_ORDERS: 'RE_ORDERS_SLIDE_LIST',
|
|
7
|
+
ACTIVE: 'ACTIVE_SLIDE',
|
|
8
|
+
DUPLICATE: 'DUPLICATE_SLIDE',
|
|
9
|
+
DELETE: 'DELETE_SLIDE',
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SlideBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SlideBar';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const SliderWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
isViewMode?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
4
|
+
export declare const WrapperOverflow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const MainContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const SlideItem: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
isActive?: boolean | undefined;
|
|
8
|
+
isSlideError?: boolean | undefined;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const SlideText: import("styled-components").StyledComponent<"div", any, {
|
|
11
|
+
isActive?: boolean | undefined;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const MenuList: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const MenuItem: import("styled-components").StyledComponent<"div", any, {
|
|
15
|
+
isDisabled?: boolean | undefined;
|
|
16
|
+
}, never>;
|
|
17
|
+
export declare const ContainerSlideBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const WrapperDisable: import("styled-components").StyledComponent<"div", any, {
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
}, never>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2
|
+
/* eslint-disable indent */
|
|
3
|
+
// Styled
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
// Constants
|
|
6
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
7
|
+
import { BTN_ADD_SIZE, OFFSET_SIZE_SLIDE, WIDTH_SLIDE_ITEM } from './constants';
|
|
8
|
+
export const SliderWrapper = styled.div `
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
border: 1px solid ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.accent1};
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
// max-width: ${props => (props.isViewMode ? '100%' : 'calc(100% - 40px)')};
|
|
16
|
+
width: calc(100% - ${BTN_ADD_SIZE}px - ${OFFSET_SIZE_SLIDE * 2}px);
|
|
17
|
+
flex: 1;
|
|
18
|
+
height: ${OFFSET_SIZE_SLIDE}px;
|
|
19
|
+
padding: 0px ${OFFSET_SIZE_SLIDE}px;
|
|
20
|
+
|
|
21
|
+
.btn-action-slide-template {
|
|
22
|
+
width: ${OFFSET_SIZE_SLIDE}px !important;
|
|
23
|
+
height: ${OFFSET_SIZE_SLIDE - 2}px !important;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
|
|
29
|
+
&.btn-arrow-left {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 0px;
|
|
32
|
+
left: 0;
|
|
33
|
+
border-right: 1px solid ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.accent1};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.btn-arrow-right {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0px;
|
|
39
|
+
right: 0px;
|
|
40
|
+
border-left: 1px solid ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.accent1};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
export const WrapperOverflow = styled.div `
|
|
45
|
+
overflow-x: auto;
|
|
46
|
+
overflow-y: hidden;
|
|
47
|
+
flex: 1;
|
|
48
|
+
|
|
49
|
+
&::-webkit-scrollbar {
|
|
50
|
+
-webkit-appearance: none;
|
|
51
|
+
background-color: #eee;
|
|
52
|
+
width: 0px;
|
|
53
|
+
height: 0px;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
export const MainContent = styled.div `
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
height: 100%;
|
|
60
|
+
|
|
61
|
+
.slide-item {
|
|
62
|
+
border-right: 1px solid ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.accent1};
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
export const SlideItem = styled.div `
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
align-items: center;
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
|
|
71
|
+
border-top: 1px solid ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.accent1};
|
|
72
|
+
border-bottom: 1px solid ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.accent1};
|
|
73
|
+
height: ${OFFSET_SIZE_SLIDE}px;
|
|
74
|
+
width: ${WIDTH_SLIDE_ITEM}px;
|
|
75
|
+
padding: 0px 10px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
background-color: ${props => { var _a, _b; return (props.isActive ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorTextActive : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.bw0); }};
|
|
78
|
+
|
|
79
|
+
.icon-more-vertical {
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
${props => {
|
|
84
|
+
var _a;
|
|
85
|
+
return props.isSlideError &&
|
|
86
|
+
css `
|
|
87
|
+
border: 1px solid ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.red8} !important;
|
|
88
|
+
`;
|
|
89
|
+
}}
|
|
90
|
+
`;
|
|
91
|
+
export const SlideText = styled.div `
|
|
92
|
+
font-size: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.fontSize}px;
|
|
93
|
+
font-weight: 400;
|
|
94
|
+
line-height: ${OFFSET_SIZE_SLIDE}px;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
|
|
99
|
+
color: ${props => { var _a, _b; return (props.isActive ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary : (_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorText); }};
|
|
100
|
+
`;
|
|
101
|
+
export const MenuList = styled.div `
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
align-items: flex-start;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
gap: 8px;
|
|
107
|
+
`;
|
|
108
|
+
export const MenuItem = styled.div `
|
|
109
|
+
font-size: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.fontSize}px;
|
|
110
|
+
line-height: 14px;
|
|
111
|
+
color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.colorText};
|
|
112
|
+
|
|
113
|
+
${props => props.isDisabled &&
|
|
114
|
+
css `
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
`}
|
|
117
|
+
`;
|
|
118
|
+
export const ContainerSlideBar = styled.div `
|
|
119
|
+
display: flex;
|
|
120
|
+
width: 100%;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: flex-start;
|
|
123
|
+
gap: 10px;
|
|
124
|
+
* > * {
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
export const WrapperDisable = styled.div `
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
|
|
131
|
+
${props => props.disabled &&
|
|
132
|
+
css `
|
|
133
|
+
cursor: not-allowed;
|
|
134
|
+
opacity: 0.6;
|
|
135
|
+
`}
|
|
136
|
+
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
|
|
3
|
-
export interface SliderProps extends SliderSingleProps {
|
|
3
|
+
export interface SliderProps extends Omit<SliderSingleProps, 'tooltipVisible'> {
|
|
4
|
+
tooltipVisible?: boolean | 'default';
|
|
4
5
|
}
|
|
5
6
|
export declare const Slider: React.FC<SliderProps | SliderRangeProps>;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
// Libraries
|
|
13
2
|
import React, { memo, useMemo } from 'react';
|
|
14
3
|
// Antd Components
|
|
15
4
|
import { Slider as AntdSlider } from 'antd';
|
|
16
5
|
// Styled
|
|
17
6
|
import { SliderWrapper } from './styled';
|
|
7
|
+
import { omit } from 'lodash';
|
|
18
8
|
export const Slider = memo(props => {
|
|
19
|
-
const { range, value, min = 0, max = 0
|
|
9
|
+
const { range, value, min = 0, max = 0, className, tooltipVisible } = props;
|
|
20
10
|
const isNegative = useMemo(() => !!(!range && min < 0), [range, min]);
|
|
21
11
|
const calculateWidth = useMemo(() => ((value || 0) * 100) / (Math.abs(max) + Math.abs(min) || 1), [min, max, value]);
|
|
12
|
+
// const restProps = tooltipVisible === 'default' ? omit(props, ['tooltipVisible']) : props;
|
|
13
|
+
const restProps = omit(props, ['tooltipVisible']);
|
|
22
14
|
if (isNegative) {
|
|
23
|
-
return (React.createElement(SliderWrapper, { isNegative: true, width: calculateWidth },
|
|
24
|
-
React.createElement(AntdSlider, Object.assign({
|
|
15
|
+
return (React.createElement(SliderWrapper, { isNegative: true, width: calculateWidth, className: className },
|
|
16
|
+
React.createElement(AntdSlider, Object.assign({}, omit(restProps, ['marks', 'className']), { tooltip: tooltipVisible !== 'default' && {
|
|
17
|
+
open: tooltipVisible,
|
|
18
|
+
}, marks: {
|
|
19
|
+
0: ' ',
|
|
20
|
+
} }))));
|
|
25
21
|
}
|
|
26
|
-
return (React.createElement(SliderWrapper,
|
|
27
|
-
React.createElement(AntdSlider, Object.assign({},
|
|
22
|
+
return (React.createElement(SliderWrapper, { className: className },
|
|
23
|
+
React.createElement(AntdSlider, Object.assign({}, restProps, { tooltip: tooltipVisible !== 'default' && {
|
|
24
|
+
open: tooltipVisible,
|
|
25
|
+
} }))));
|
|
28
26
|
});
|
|
29
27
|
Slider.defaultProps = {
|
|
30
28
|
tooltipVisible: false,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SliderRangeProps, SliderSingleProps } from 'antd/es/slider';
|
|
3
|
+
export interface SliderProps {
|
|
4
|
+
defaultSliderTrack?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const SliderV2: React.FC<(SliderSingleProps & SliderProps) | (SliderRangeProps & SliderProps)>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
// Antd Components
|
|
4
|
+
import { Slider as AntdSlider } from 'antd';
|
|
5
|
+
// React.FC<SliderProps>
|
|
6
|
+
export const SliderV2 = props => {
|
|
7
|
+
const { min, max, onChange, styles, range, value, defaultValue, marks, defaultSliderTrack } = props;
|
|
8
|
+
const [valueInternal, setValueInternal] = useState(defaultValue || min || 0);
|
|
9
|
+
if (min && max && min < 0 && max > 0 && !range && !defaultSliderTrack) {
|
|
10
|
+
const sliderWidth = max - min;
|
|
11
|
+
const calcValue = value || valueInternal;
|
|
12
|
+
const leftTrackPosition = `${(Math.abs(calcValue > 0 ? min : min - calcValue) / sliderWidth) * 100}%`;
|
|
13
|
+
const sliderTrackWidth = `${(Math.abs(calcValue) / sliderWidth) * 100}%`;
|
|
14
|
+
return (React.createElement(AntdSlider, Object.assign({ value: value || valueInternal, onChange: value => {
|
|
15
|
+
setValueInternal(value);
|
|
16
|
+
if (onChange)
|
|
17
|
+
onChange(value);
|
|
18
|
+
}, styles: Object.assign({ track: Object.assign({ left: leftTrackPosition, width: sliderTrackWidth }, styles === null || styles === void 0 ? void 0 : styles.track) }, styles), marks: marks || { 0: ' ' } }, props)));
|
|
19
|
+
}
|
|
20
|
+
return React.createElement(AntdSlider, Object.assign({}, props));
|
|
21
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SpinProps as AntdSpinProps } from 'antd';
|
|
2
3
|
export interface TSpinProps extends AntdSpinProps {
|
|
3
4
|
indicatorSize?: number;
|
|
4
5
|
children?: any;
|
|
5
6
|
}
|
|
6
7
|
export declare const Spin: {
|
|
7
|
-
(props: TSpinProps): JSX.Element;
|
|
8
|
+
(props: TSpinProps): React.JSX.Element;
|
|
8
9
|
defaultProps: {};
|
|
9
10
|
};
|
|
@@ -29,4 +29,14 @@ export { Slider } from './Slider';
|
|
|
29
29
|
export { Spin } from './Spin';
|
|
30
30
|
export { Alert } from './Alert';
|
|
31
31
|
export { ScrollBox } from './ScrollBox';
|
|
32
|
+
export { Rate } from './Rate';
|
|
33
|
+
export { SliderV2 } from './SliderV2';
|
|
34
|
+
export { InputDynamic } from './InputDynamic';
|
|
35
|
+
export * from './Flex';
|
|
36
|
+
export * from './RateV2';
|
|
37
|
+
export * from './PreviewTabs';
|
|
38
|
+
export * from './MobileFrame';
|
|
39
|
+
export * from './SlideBar';
|
|
32
40
|
export type { SliderProps } from './Slider';
|
|
41
|
+
export type { PaginationProps } from './Pagination';
|
|
42
|
+
export type { InputDynamicProps } from './InputDynamic';
|
|
@@ -29,3 +29,11 @@ export { Slider } from './Slider';
|
|
|
29
29
|
export { Spin } from './Spin';
|
|
30
30
|
export { Alert } from './Alert';
|
|
31
31
|
export { ScrollBox } from './ScrollBox';
|
|
32
|
+
export { Rate } from './Rate';
|
|
33
|
+
export { SliderV2 } from './SliderV2';
|
|
34
|
+
export { InputDynamic } from './InputDynamic';
|
|
35
|
+
export * from './Flex';
|
|
36
|
+
export * from './RateV2';
|
|
37
|
+
export * from './PreviewTabs';
|
|
38
|
+
export * from './MobileFrame';
|
|
39
|
+
export * from './SlideBar';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
+
import '@antscorp/antsomi-ui/es/assets/css/main.scss';
|
|
3
4
|
import { TLocale } from '@antscorp/antsomi-ui/es/types';
|
|
5
|
+
import 'animate.css';
|
|
4
6
|
interface ConfigProviderProps extends Omit<AntdConfigProviderProps, 'locale'> {
|
|
5
7
|
children?: ReactNode;
|
|
6
8
|
locale?: TLocale;
|
|
@@ -12,14 +12,28 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
// Libraries
|
|
13
13
|
import { StyleProvider } from '@ant-design/cssinjs';
|
|
14
14
|
import { ConfigProvider as AntdConfigProvider } from 'antd';
|
|
15
|
+
import dayjs from 'dayjs';
|
|
15
16
|
import React, { useEffect } from 'react';
|
|
17
|
+
import weekday from 'dayjs/plugin/weekday';
|
|
18
|
+
import localeData from 'dayjs/plugin/localeData';
|
|
19
|
+
/** dayjs plugins for timezone */
|
|
20
|
+
import utc from 'dayjs/plugin/utc';
|
|
21
|
+
import timezone from 'dayjs/plugin/timezone';
|
|
16
22
|
// Constants
|
|
17
23
|
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
18
24
|
// Style
|
|
19
25
|
import { GlobalStyle } from './GlobalStyle';
|
|
26
|
+
import '@antscorp/antsomi-ui/es/assets/css/main.scss';
|
|
20
27
|
// Initialize languages
|
|
21
28
|
// import '@antscorp/antsomi-ui/es/locales/i18n';
|
|
22
29
|
import i18next from '@antscorp/antsomi-ui/es/locales/i18n';
|
|
30
|
+
// Css
|
|
31
|
+
import 'animate.css';
|
|
32
|
+
// NOTE: HOT fix DatePicker Advanced
|
|
33
|
+
dayjs.extend(weekday);
|
|
34
|
+
dayjs.extend(localeData);
|
|
35
|
+
dayjs.extend(utc);
|
|
36
|
+
dayjs.extend(timezone);
|
|
23
37
|
const ConfigProvider = props => {
|
|
24
38
|
// Props
|
|
25
39
|
const { children, locale } = props, restOfProps = __rest(props, ["children", "locale"]);
|