@antscorp/antsomi-ui 1.3.3-beta.7 → 1.3.3-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/images/iphone-top-bar.png +0 -0
- package/es/assets/images/iphone.png +0 -0
- package/es/assets/images/stars_slider.png +0 -0
- package/es/components/atoms/Button/index.d.ts +1 -8
- package/es/components/atoms/Empty/Empty.d.ts +6 -5
- package/es/components/atoms/Empty/Empty.js +7 -1
- package/es/components/atoms/Flex/Flex.d.ts +2 -0
- package/es/components/atoms/Flex/Flex.js +1 -0
- package/es/components/atoms/Flex/index.d.ts +1 -0
- package/es/components/atoms/Flex/index.js +1 -0
- package/es/components/atoms/Input/Input.d.ts +14 -3
- package/es/components/atoms/Input/Input.js +7 -3
- package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -0
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -0
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +10 -0
- package/es/components/atoms/InputDynamic/InputDynamic.js +484 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -0
- package/es/components/atoms/InputDynamic/constants.d.ts +71 -0
- package/es/components/atoms/InputDynamic/constants.js +71 -0
- package/es/components/atoms/InputDynamic/index.d.ts +2 -0
- package/es/components/atoms/InputDynamic/index.js +1 -0
- package/es/components/atoms/InputDynamic/styled.d.ts +13 -0
- package/es/components/atoms/InputDynamic/styled.js +293 -0
- package/es/components/atoms/InputDynamic/types.d.ts +113 -0
- package/es/components/atoms/InputDynamic/types.js +1 -0
- package/es/components/atoms/InputDynamic/utils.d.ts +30 -0
- package/es/components/atoms/InputDynamic/utils.js +872 -0
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -0
- package/es/components/atoms/MobileFrame/MobileFrame.js +22 -0
- package/es/components/atoms/MobileFrame/constants.d.ts +4 -0
- package/es/components/atoms/MobileFrame/constants.js +4 -0
- package/es/components/atoms/MobileFrame/index.d.ts +2 -0
- package/es/components/atoms/MobileFrame/index.js +1 -0
- package/es/components/atoms/MobileFrame/styled.d.ts +3 -0
- package/es/components/atoms/MobileFrame/styled.js +33 -0
- package/es/components/atoms/Pagination/index.d.ts +1 -0
- package/es/components/atoms/Popover/Popover.d.ts +1 -1
- package/es/components/atoms/Popover/styled.d.ts +1 -1
- package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -0
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -0
- package/es/components/atoms/PreviewTabs/index.d.ts +2 -0
- package/es/components/atoms/PreviewTabs/index.js +1 -0
- package/es/components/atoms/PreviewTabs/styled.d.ts +6 -0
- package/es/components/atoms/PreviewTabs/styled.js +79 -0
- package/es/components/atoms/Progress/Progress.d.ts +1 -1
- package/es/components/atoms/Radio/index.d.ts +3 -3
- package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
- package/es/components/atoms/RateV2/RateV2.js +73 -0
- package/es/components/atoms/RateV2/index.d.ts +1 -0
- package/es/components/atoms/RateV2/index.js +1 -0
- package/es/components/atoms/RequiredLabel/index.d.ts +1 -0
- package/es/components/atoms/RequiredLabel/index.js +4 -3
- package/es/components/atoms/Slider/index.d.ts +2 -1
- package/es/components/atoms/Slider/index.js +7 -14
- package/es/components/atoms/SliderV2/index.d.ts +6 -0
- package/es/components/atoms/SliderV2/index.js +21 -0
- package/es/components/atoms/Space/Space.d.ts +1 -1
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
- package/es/components/atoms/index.d.ts +8 -0
- package/es/components/atoms/index.js +6 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +6 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +281 -27
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
- package/es/components/icons/AudioRecordIcon.d.ts +2 -1
- package/es/components/icons/BugIcon.d.ts +2 -1
- package/es/components/icons/CameraIcon.d.ts +2 -1
- package/es/components/icons/CaptureIcon.d.ts +2 -1
- package/es/components/icons/CheckSlimIcon.d.ts +2 -1
- package/es/components/icons/CloseIcon.d.ts +2 -1
- package/es/components/icons/CommentIcon.d.ts +2 -1
- package/es/components/icons/EventIcon.d.ts +2 -1
- package/es/components/icons/FreeDrawIcon.d.ts +2 -1
- package/es/components/icons/GPTIcon.d.ts +2 -1
- package/es/components/icons/GPTIconV2.d.ts +2 -1
- package/es/components/icons/GPTIconV3.d.ts +2 -1
- package/es/components/icons/HighlightIcon.d.ts +2 -1
- package/es/components/icons/IdeaIcon.d.ts +2 -1
- package/es/components/icons/InvisibleIcon.d.ts +2 -1
- package/es/components/icons/MuteIcon.d.ts +2 -1
- package/es/components/icons/OpenUrlIcon.d.ts +2 -1
- package/es/components/icons/PauseIcon.d.ts +2 -1
- package/es/components/icons/PlaneIcon.d.ts +2 -1
- package/es/components/icons/RequestIcon.d.ts +2 -1
- package/es/components/icons/StopRecordIcon.d.ts +2 -1
- package/es/components/icons/UserIcon.d.ts +2 -1
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
- package/es/components/icons/WarningIcon.d.ts +2 -1
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.d.ts +35 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +1248 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +12 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.js +25 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.d.ts +19 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/FormatDatetime.js +100 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatDatetime/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.d.ts +52 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/FormatNumber.js +132 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/components/FormatNumber/index.js +1 -0
- package/es/components/molecules/AddDynamicContent/components/index.d.ts +3 -0
- package/es/components/molecules/AddDynamicContent/components/index.js +3 -0
- package/es/components/molecules/AddDynamicContent/constants.d.ts +101 -0
- package/es/components/molecules/AddDynamicContent/constants.js +152 -0
- package/es/components/molecules/AddDynamicContent/currencies.json +1523 -0
- package/es/components/molecules/AddDynamicContent/index.d.ts +2 -0
- package/es/components/molecules/AddDynamicContent/index.js +2 -0
- package/es/components/molecules/AddDynamicContent/styled.d.ts +12 -0
- package/es/components/molecules/AddDynamicContent/styled.js +30 -0
- package/es/components/molecules/AddDynamicContent/types.d.ts +13 -0
- package/es/components/molecules/AddDynamicContent/types.js +1 -0
- package/es/components/molecules/AddDynamicContent/utils.d.ts +41 -0
- package/es/components/molecules/AddDynamicContent/utils.js +396 -0
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +9 -0
- package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +260 -113
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +66 -25
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +109 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +48 -4
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +20 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +90 -1
- package/es/components/molecules/Drawer/Drawer.d.ts +5 -1
- package/es/components/molecules/Drawer/Drawer.js +3 -1
- package/es/components/molecules/Drawer/index.d.ts +1 -0
- package/es/components/molecules/EditorScript/EditorScript.d.ts +14 -0
- package/es/components/molecules/EditorScript/EditorScript.js +89 -0
- package/es/components/molecules/EditorScript/index.d.ts +1 -0
- package/es/components/molecules/EditorScript/index.js +1 -0
- package/es/components/molecules/EditorScript/styled.d.ts +1 -0
- package/es/components/molecules/EditorScript/styled.js +3 -0
- package/es/components/molecules/Form/Form.d.ts +1 -0
- package/es/components/molecules/Form/Form.js +1 -0
- package/es/components/molecules/Form/index.d.ts +1 -0
- package/es/components/molecules/Form/index.js +1 -0
- package/es/components/molecules/IconSelection/styled.d.ts +1 -8
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/index.d.ts +1 -0
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Modal/styled.js +2 -0
- package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -0
- package/es/components/molecules/ModalV2/ModalV2.js +26 -0
- package/es/components/molecules/ModalV2/index.d.ts +2 -0
- package/es/components/molecules/ModalV2/index.js +1 -0
- package/es/components/molecules/ModalV2/styled.d.ts +7 -0
- package/es/components/molecules/ModalV2/styled.js +22 -0
- package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
- package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -0
- package/es/components/molecules/PreviewModal/PreviewModal.js +30 -0
- package/es/components/molecules/PreviewModal/index.d.ts +2 -0
- package/es/components/molecules/PreviewModal/index.js +1 -0
- package/es/components/molecules/PreviewModal/styled.d.ts +4 -0
- package/es/components/molecules/PreviewModal/styled.js +39 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +728 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -0
- package/es/components/molecules/ResizeGrid/constant.d.ts +35 -0
- package/es/components/molecules/ResizeGrid/constant.js +111 -0
- package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
- package/es/components/molecules/ResizeGrid/index.js +1 -0
- package/es/components/molecules/ResizeGrid/styled.d.ts +10 -0
- package/es/components/molecules/ResizeGrid/styled.js +56 -0
- package/es/components/molecules/ResizeGrid/types.d.ts +147 -0
- package/es/components/molecules/ResizeGrid/types.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +12 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +17 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +108 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -0
- package/es/components/molecules/RichMenu/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/index.js +3 -0
- package/es/components/molecules/Select/Select.d.ts +6 -4
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -0
- package/es/components/molecules/ShareAccess/ShareAccess.js +23 -0
- package/es/components/molecules/ShareAccess/actions.d.ts +16 -0
- package/es/components/molecules/ShareAccess/actions.js +12 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +78 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +19 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.d.ts +0 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +97 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -0
- package/es/components/molecules/ShareAccess/components/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/index.js +1 -0
- package/es/components/molecules/ShareAccess/constants.d.ts +67 -0
- package/es/components/molecules/ShareAccess/constants.js +85 -0
- package/es/components/molecules/ShareAccess/context.d.ts +4 -0
- package/es/components/molecules/ShareAccess/context.js +3 -0
- package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/hooks/index.js +1 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +18 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +29 -0
- package/es/components/molecules/ShareAccess/index.d.ts +4 -0
- package/es/components/molecules/ShareAccess/index.js +4 -0
- package/es/components/molecules/ShareAccess/reducer.d.ts +2 -0
- package/es/components/molecules/ShareAccess/reducer.js +19 -0
- package/es/components/molecules/ShareAccess/types.d.ts +54 -0
- package/es/components/molecules/ShareAccess/types.js +1 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +38 -0
- package/es/components/molecules/ShareAccess/utils.js +57 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -5
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
- package/es/components/molecules/UploadImage/MediaThumb.d.ts +11 -0
- package/es/components/molecules/UploadImage/MediaThumb.js +31 -0
- package/es/components/molecules/UploadImage/index.d.ts +6 -2
- package/es/components/molecules/UploadImage/index.js +111 -84
- package/es/components/molecules/UploadImage/styled.js +0 -4
- package/es/components/molecules/UploadImage/utils.d.ts +3 -0
- package/es/components/molecules/UploadImage/utils.js +24 -0
- package/es/components/molecules/index.d.ts +11 -3
- package/es/components/molecules/index.js +9 -3
- package/es/components/organism/Help/styled.d.ts +6 -16
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.js +1 -0
- package/es/constants/queries.d.ts +14 -0
- package/es/constants/queries.js +21 -0
- package/es/constants/richMenu.d.ts +19 -0
- package/es/constants/richMenu.js +19 -0
- package/es/constants/storybook.d.ts +7 -1
- package/es/constants/storybook.js +12 -0
- package/es/constants/theme.js +30 -3
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useDebounceCallback.d.ts +1 -0
- package/es/hooks/useDebounceCallback.js +5 -0
- package/es/hooks/useDebounceV2.d.ts +1 -0
- package/es/hooks/useDebounceV2.js +11 -0
- package/es/hooks/useDeepCompareEffect.d.ts +1 -0
- package/es/hooks/useDeepCompareEffect.js +21 -0
- package/es/hooks/useDeepCompareMemo.d.ts +2 -0
- package/es/hooks/useDeepCompareMemo.js +21 -0
- package/es/hooks/usePrevious.d.ts +2 -0
- package/es/hooks/usePrevious.js +9 -0
- package/es/locales/en/translation.json +160 -3
- package/es/locales/i18n.d.ts +158 -0
- package/es/locales/translations.d.ts +157 -0
- package/es/locales/vi/translation.json +2 -1
- package/es/models/BusinessObject.d.ts +116 -0
- package/es/models/BusinessObject.js +113 -0
- package/es/models/Currency.d.ts +9 -0
- package/es/models/Currency.js +10 -0
- package/es/models/CustomFunction.d.ts +19 -0
- package/es/models/CustomFunction.js +25 -0
- package/es/models/DynamicContentAttribute.d.ts +34 -0
- package/es/models/DynamicContentAttribute.js +9 -0
- package/es/models/EventTrackingAttribute.d.ts +11 -0
- package/es/models/EventTrackingAttribute.js +13 -0
- package/es/models/PromotionPool.d.ts +11 -0
- package/es/models/PromotionPool.js +12 -0
- package/es/models/{SavedImage.d.ts → SavedMedia.d.ts} +5 -5
- package/es/models/{SavedImage.js → SavedMedia.js} +3 -3
- package/es/queries/BusinessObject/index.d.ts +6 -0
- package/es/queries/BusinessObject/index.js +6 -0
- package/es/queries/BusinessObject/useGetListAllEvents.d.ts +11 -0
- package/es/queries/BusinessObject/useGetListAllEvents.js +14 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +17 -0
- package/es/queries/BusinessObject/useGetListAttributeBO.js +41 -0
- package/es/queries/BusinessObject/useGetListBO.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListBO.js +19 -0
- package/es/queries/BusinessObject/useGetListEventAttr.d.ts +4 -0
- package/es/queries/BusinessObject/useGetListEventAttr.js +15 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +6 -0
- package/es/queries/BusinessObject/useGetListPromotionCodeAttr.js +26 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.d.ts +13 -0
- package/es/queries/BusinessObject/useGetListSourceByEvent.js +11 -0
- package/es/queries/CustomFunction/index.d.ts +2 -0
- package/es/queries/CustomFunction/index.js +2 -0
- package/es/queries/CustomFunction/useCustomFunction.d.ts +19 -0
- package/es/queries/CustomFunction/useCustomFunction.js +53 -0
- package/es/queries/DynamicContentAttribute/index.d.ts +1 -0
- package/es/queries/DynamicContentAttribute/index.js +1 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +10 -0
- package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.js +21 -0
- package/es/queries/PromotionPool/index.d.ts +1 -0
- package/es/queries/PromotionPool/index.js +1 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +9 -0
- package/es/queries/PromotionPool/useGetListPromotionPool.js +62 -0
- package/es/queries/ThirdParty/index.d.ts +1 -0
- package/es/queries/ThirdParty/index.js +1 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.d.ts +14 -0
- package/es/queries/ThirdParty/useGetEventTrackingAttributes.js +15 -0
- package/es/queries/configs.d.ts +4 -0
- package/es/queries/configs.js +13 -0
- package/es/queries/index.d.ts +6 -0
- package/es/queries/index.js +6 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +8 -0
- package/es/services/MediaTemplateDesign/BusinessObject/index.js +100 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.d.ts +15 -0
- package/es/services/MediaTemplateDesign/CustomFunction/index.js +135 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.d.ts +4 -0
- package/es/services/MediaTemplateDesign/DynamicContentAttribute/index.js +39 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.d.ts +6 -0
- package/es/services/MediaTemplateDesign/ListCurrency/index.js +34 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.d.ts +3 -0
- package/es/services/MediaTemplateDesign/PromotionPool/index.js +31 -0
- package/es/services/MediaTemplateDesign/UploadFile/index.d.ts +5 -5
- package/es/services/MediaTemplateDesign/UploadFile/index.js +36 -19
- package/es/services/ThirParty/index.d.ts +8 -0
- package/es/services/ThirParty/index.js +26 -0
- package/es/services/index.d.ts +14 -5
- package/es/services/index.js +45 -1
- package/es/test.d.ts +2 -1
- package/es/test.js +201 -63
- package/es/types/index.d.ts +17 -0
- package/es/types/index.js +2 -1
- package/es/types/richMenu.d.ts +214 -0
- package/es/types/richMenu.js +1 -0
- package/es/types/variables.d.ts +2 -0
- package/es/types/variables.js +1 -0
- package/es/utils/common.d.ts +4 -0
- package/es/utils/common.js +21 -0
- package/es/utils/handleError.d.ts +32 -2
- package/es/utils/handleError.js +42 -4
- package/package.json +18 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RichMenu } from '@antscorp/antsomi-ui/es/types';
|
|
2
|
+
interface StyledRichMenuProps {
|
|
3
|
+
$isCompact?: boolean;
|
|
4
|
+
$gridTemplateRows?: RichMenu['gridTemplateRows'];
|
|
5
|
+
$gridTemplateCols?: RichMenu['gridTemplateCols'];
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledRichMenu: import("styled-components").StyledComponent<"div", any, StyledRichMenuProps, never>;
|
|
8
|
+
export declare const StyledCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const StyledRichMenu = styled.div `
|
|
4
|
+
display: grid;
|
|
5
|
+
width: 100%;
|
|
6
|
+
grid-gap: 1px;
|
|
7
|
+
aspect-ratio: ${({ $isCompact }) => ($isCompact ? '3 / 1' : '3/ 2')};
|
|
8
|
+
grid-template-columns: ${({ $gridTemplateCols }) => $gridTemplateCols === null || $gridTemplateCols === void 0 ? void 0 : $gridTemplateCols.map(col => col).join(' ')};
|
|
9
|
+
grid-template-rows: ${({ $gridTemplateRows }) => $gridTemplateRows === null || $gridTemplateRows === void 0 ? void 0 : $gridTemplateRows.map(row => row).join(' ')};
|
|
10
|
+
`;
|
|
11
|
+
export const StyledCell = styled.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
outline: 1px solid var(--primary-color);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface RichMenuChatBarProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
showRichMenu?: boolean;
|
|
5
|
+
showTypingChat?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onToggleRichMenu?: (toggle: boolean) => void;
|
|
8
|
+
onToggleTypingChat?: (toggle: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const RichMenuChatBar: React.FC<RichMenuChatBarProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
// Libraries
|
|
13
|
+
import React from 'react';
|
|
14
|
+
// Components
|
|
15
|
+
import { Icon, Typography } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
16
|
+
// Styles
|
|
17
|
+
import { ChatBarMenuBox, ChatBarWrapper } from './styled';
|
|
18
|
+
import { TypingChat } from './TypingChat';
|
|
19
|
+
const defaultProps = {
|
|
20
|
+
label: 'Menu',
|
|
21
|
+
showRichMenu: true,
|
|
22
|
+
showTypingChat: false,
|
|
23
|
+
};
|
|
24
|
+
export const RichMenuChatBar = props => {
|
|
25
|
+
const { disabled, label, showRichMenu, showTypingChat, className, onToggleRichMenu, onToggleTypingChat = () => { } } = props, restOfProps = __rest(props, ["disabled", "label", "showRichMenu", "showTypingChat", "className", "onToggleRichMenu", "onToggleTypingChat"]);
|
|
26
|
+
return (React.createElement(ChatBarWrapper, Object.assign({ "$showRichMenu": showRichMenu, "$showTypingChat": showTypingChat, "$disabled": disabled, className: `antsomi-chat-bar ${className}` }, restOfProps), showTypingChat ? (React.createElement(TypingChat, { onClickMenu: () => onToggleTypingChat(!showTypingChat) })) : (React.createElement(React.Fragment, null,
|
|
27
|
+
React.createElement(Icon, { type: "icon-ants-keyboard", className: "icon-keyboard", onClick: () => onToggleTypingChat(!showTypingChat) }),
|
|
28
|
+
React.createElement(ChatBarMenuBox, { onClick: () => onToggleRichMenu && onToggleRichMenu(!showRichMenu) },
|
|
29
|
+
React.createElement(Typography.Text, { className: "ants-text-sm" }, label),
|
|
30
|
+
React.createElement(Icon, { className: "icon-caret", type: "icon-ants-caret-down", size: 10 }))))));
|
|
31
|
+
};
|
|
32
|
+
RichMenuChatBar.defaultProps = defaultProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import { Icon } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
3
|
+
import React, { memo } from 'react';
|
|
4
|
+
// Styled
|
|
5
|
+
import { TypingChatWrapper, TypingInput, TypingWrapper } from './styled';
|
|
6
|
+
export const TypingChat = memo(props => {
|
|
7
|
+
const { onClickMenu } = props;
|
|
8
|
+
return (React.createElement(TypingChatWrapper, { gap: 8, justify: "space-between", align: "center" },
|
|
9
|
+
React.createElement(Icon, { type: "icon-ants-list-view-thumbnail", className: "ants-cursor-pointer", onClick: () => onClickMenu && onClickMenu() }),
|
|
10
|
+
React.createElement(Icon, { type: "icon-ants-angle-right", className: "icon-angle", size: 14 }),
|
|
11
|
+
React.createElement(TypingWrapper, null,
|
|
12
|
+
React.createElement(TypingInput, { placeholder: "Aa" }),
|
|
13
|
+
React.createElement(Icon, { type: "icon-ants-smile-face", size: 16 })),
|
|
14
|
+
React.createElement(Icon, { type: "icon-ants-big-search", className: "icon-search" })));
|
|
15
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const TypingInput: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
3
|
+
export declare const TypingWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const TypingChatWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
3
|
+
// Styled
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
export const TypingInput = styled.input `
|
|
6
|
+
width: 100%;
|
|
7
|
+
border-radius: 18px;
|
|
8
|
+
height: 28px;
|
|
9
|
+
font-size: 15px;
|
|
10
|
+
outline: none;
|
|
11
|
+
border: none;
|
|
12
|
+
padding: 0px 30px 0px 10px;
|
|
13
|
+
|
|
14
|
+
&::placeholder {
|
|
15
|
+
color: var(--accent-5);
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
export const TypingWrapper = styled.div `
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex: 1 1 0%;
|
|
22
|
+
|
|
23
|
+
i {
|
|
24
|
+
top: 50%;
|
|
25
|
+
transform: translateY(-50%);
|
|
26
|
+
position: absolute;
|
|
27
|
+
right: 10px;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const TypingChatWrapper = styled(Flex) `
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: fit-content;
|
|
33
|
+
color: #747474;
|
|
34
|
+
|
|
35
|
+
> i {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.icon-angle {
|
|
40
|
+
padding: 0 16px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.icon-search {
|
|
44
|
+
position: relative;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RichMenuChatBar } from './RichMenuChatBar';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ChatBarWrapperProps {
|
|
3
|
+
$showRichMenu?: boolean;
|
|
4
|
+
$showTypingChat?: boolean;
|
|
5
|
+
$disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ChatBarWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, ChatBarWrapperProps, never>;
|
|
8
|
+
export declare const ChatBarMenuBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
// Components
|
|
4
|
+
import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
5
|
+
export const ChatBarWrapper = styled(Flex) `
|
|
6
|
+
position: relative;
|
|
7
|
+
height: 84px;
|
|
8
|
+
padding: 10px 20px;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
z-index: 10;
|
|
11
|
+
|
|
12
|
+
${({ $disabled }) => css `
|
|
13
|
+
pointer-events: ${$disabled ? 'none' : 'auto'};
|
|
14
|
+
`}
|
|
15
|
+
|
|
16
|
+
.icon-caret {
|
|
17
|
+
transition: all 300ms;
|
|
18
|
+
${({ $showRichMenu }) => css `
|
|
19
|
+
transform: ${$showRichMenu ? 'rotate(0deg)' : 'rotate(180deg)'};
|
|
20
|
+
`}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.icon-keyboard {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
export const ChatBarMenuBox = styled(Flex) `
|
|
28
|
+
position: absolute;
|
|
29
|
+
transform: translateX(-50%);
|
|
30
|
+
top: 10px;
|
|
31
|
+
left: 50%;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
`;
|
|
34
|
+
ChatBarMenuBox.defaultProps = {
|
|
35
|
+
align: 'center',
|
|
36
|
+
gap: 20,
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RichMenu } from '@antscorp/antsomi-ui/es/types';
|
|
3
|
+
interface RichMenuMobileViewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
richMenu: RichMenu;
|
|
5
|
+
isPreview?: boolean;
|
|
6
|
+
onChangeRichMenu?: (richMenu: RichMenu, source?: 'user' | 'system') => void;
|
|
7
|
+
onClickCell?: (cellIndex: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const RichMenuMobileView: React.FC<RichMenuMobileViewProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
// Libraries
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
// Assets
|
|
15
|
+
import IphoneTopBar from '@antscorp/antsomi-ui/es/assets/images/iphone-top-bar.png';
|
|
16
|
+
// Components
|
|
17
|
+
import { MobileFrame } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
18
|
+
import { RichMenuChatBar } from '../RichMenuChatBar';
|
|
19
|
+
import { RichMenuBlock } from '../RichMenuBlock';
|
|
20
|
+
// Styles
|
|
21
|
+
import { MobileContent, RichMenuWrapper, TopBar } from './styled';
|
|
22
|
+
export const RichMenuMobileView = props => {
|
|
23
|
+
const { richMenu, className, isPreview, onChangeRichMenu, onClickCell } = props, restOfProps = __rest(props, ["richMenu", "className", "isPreview", "onChangeRichMenu", "onClickCell"]);
|
|
24
|
+
// State
|
|
25
|
+
const [state, setState] = useState({
|
|
26
|
+
showRichMenu: true,
|
|
27
|
+
showTypingChat: false,
|
|
28
|
+
currentRichMenuIdx: 0,
|
|
29
|
+
});
|
|
30
|
+
// Variables
|
|
31
|
+
const { showRichMenu, showTypingChat } = state;
|
|
32
|
+
return (React.createElement(MobileFrame, Object.assign({ className: `ants-mx-auto ${className}` }, restOfProps),
|
|
33
|
+
isPreview && React.createElement(TopBar, { src: IphoneTopBar, width: "100%", height: "auto" }),
|
|
34
|
+
React.createElement(MobileContent, null,
|
|
35
|
+
React.createElement(RichMenuWrapper, { "$showRichMenu": showRichMenu && !showTypingChat, "$isPreview": !!isPreview }, richMenu && (React.createElement(RichMenuBlock, { richMenu: richMenu, isPreview: isPreview, onChange: onChangeRichMenu, onClickCell: onClickCell }))),
|
|
36
|
+
React.createElement(RichMenuChatBar, { disabled: !isPreview, label: richMenu === null || richMenu === void 0 ? void 0 : richMenu.chatBar.label, showRichMenu: showRichMenu, showTypingChat: showTypingChat, onToggleRichMenu: showRichMenu => setState(prevState => (Object.assign(Object.assign({}, prevState), { showRichMenu: !!showRichMenu }))), onToggleTypingChat: showTypingChat => setState(prevState => (Object.assign(Object.assign({}, prevState), { showTypingChat: !!showTypingChat }))) }))));
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RichMenuMobileView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RichMenuMobileView';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MobileContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const RichMenuWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$showRichMenu: boolean;
|
|
4
|
+
$isPreview: boolean;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const TopBar: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
export const MobileContent = styled.div `
|
|
4
|
+
position: absolute;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
.antsomi-chat-bar {
|
|
9
|
+
background-color: #f8f8f8;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
export const RichMenuWrapper = styled.div `
|
|
13
|
+
transition: all 200ms;
|
|
14
|
+
|
|
15
|
+
${({ $showRichMenu, $isPreview }) => css `
|
|
16
|
+
transform: ${$showRichMenu ? 'translateY(0)' : 'translateY(101%)'};
|
|
17
|
+
pointer-events: ${$isPreview ? 'none' : 'auto'};
|
|
18
|
+
`}
|
|
19
|
+
`;
|
|
20
|
+
export const TopBar = styled.img ``;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { SelectProps as AntdSelectProps } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { TextProps } from '../../atoms/Text';
|
|
3
4
|
export interface SelectProps extends AntdSelectProps {
|
|
5
|
+
label?: string | React.ReactNode;
|
|
6
|
+
labelProps?: TextProps;
|
|
4
7
|
}
|
|
5
8
|
declare const Select: (<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: AntdSelectProps<ValueType, OptionType> & {
|
|
6
9
|
children?: React.ReactNode;
|
|
7
|
-
} & {
|
|
8
|
-
|
|
9
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
10
|
+
} & React.RefAttributes<import("antd").RefSelectProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
11
|
+
displayName?: string | undefined;
|
|
10
12
|
SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
|
|
11
13
|
Option: import("rc-select/lib/Option").OptionFC;
|
|
12
14
|
OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
|
|
13
|
-
_InternalPanelDoNotUseOrYouWillBeFired:
|
|
15
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
|
|
14
16
|
} & React.FC<SelectProps>;
|
|
15
17
|
export { Select };
|
|
@@ -1,11 +1,26 @@
|
|
|
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
|
+
};
|
|
1
12
|
var _a;
|
|
2
13
|
// Libraries
|
|
3
14
|
import { Select as AntdSelect } from 'antd';
|
|
4
15
|
import React from 'react';
|
|
16
|
+
// Components
|
|
17
|
+
import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
18
|
+
import { Text } from '../../atoms/Text';
|
|
5
19
|
// Icons
|
|
6
20
|
import Icon from '@antscorp/icons';
|
|
7
21
|
// Constants
|
|
8
|
-
import { THEME } from '
|
|
22
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
23
|
+
// Styled
|
|
9
24
|
import { StyledTag, TagCloseBtn } from './styled';
|
|
10
25
|
const tagRender = (props) => {
|
|
11
26
|
const { label, closable, onClose } = props;
|
|
@@ -18,11 +33,17 @@ const tagRender = (props) => {
|
|
|
18
33
|
fontSize: 10,
|
|
19
34
|
} })) }, label));
|
|
20
35
|
};
|
|
21
|
-
const CustomSelect = props =>
|
|
36
|
+
const CustomSelect = props => {
|
|
37
|
+
const { label, labelProps } = props, rest = __rest(props, ["label", "labelProps"]);
|
|
38
|
+
return (React.createElement(Flex, { vertical: true, gap: 4 },
|
|
39
|
+
typeof label === 'string' ? React.createElement(Text, Object.assign({}, labelProps), label) : label,
|
|
40
|
+
React.createElement(AntdSelect, Object.assign({}, rest))));
|
|
41
|
+
};
|
|
22
42
|
const Select = CustomSelect;
|
|
23
43
|
Select.OptGroup = AntdSelect.OptGroup;
|
|
24
44
|
Select.Option = AntdSelect.Option;
|
|
25
45
|
Select.defaultProps = {
|
|
46
|
+
labelProps: { color: '#66666' },
|
|
26
47
|
suffixIcon: (React.createElement(Icon, { type: "icon-ants-expand-more", style: { fontSize: 16, color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw10 } })),
|
|
27
48
|
tagRender,
|
|
28
49
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
2
|
+
import React, { useEffect, useReducer } from 'react';
|
|
3
|
+
import { ShareAccessDispatchContext, ShareAccessStateContext } from './context';
|
|
4
|
+
import { LayoutContent } from './components';
|
|
5
|
+
import { shareAccessReducer } from './reducer';
|
|
6
|
+
import { updateObjAccessInfo } from './actions';
|
|
7
|
+
export const ShareAccess = (props) => {
|
|
8
|
+
const { accessInfo, userId, onChange, userPermission } = props;
|
|
9
|
+
const [state, dispatch] = useReducer(shareAccessReducer(onChange), {
|
|
10
|
+
modalTransferOwnership: {
|
|
11
|
+
open: false,
|
|
12
|
+
userToOwnerShipId: -1,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!accessInfo)
|
|
17
|
+
return;
|
|
18
|
+
dispatch(updateObjAccessInfo(accessInfo));
|
|
19
|
+
}, [accessInfo]);
|
|
20
|
+
return (React.createElement(ShareAccessStateContext.Provider, { value: Object.assign(Object.assign({}, state), { accessUserId: userId, accessUserPermission: userPermission }) },
|
|
21
|
+
React.createElement(ShareAccessDispatchContext.Provider, { value: dispatch },
|
|
22
|
+
React.createElement(LayoutContent, Object.assign({}, props)))));
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectAccessInfo, ShareAccessState } from './types';
|
|
2
|
+
export declare const TYPES: {
|
|
3
|
+
readonly UPDATE_OBJECT_ACCESS_INFO: "UPDATE_OBJECT_ACCESS_INFO";
|
|
4
|
+
readonly UPDATE_MODAL_TRANSTER_OWNERSHIP: "UPDATE_MODAL_TRANSTER_OWNERSHIP";
|
|
5
|
+
};
|
|
6
|
+
export declare const updateObjAccessInfo: (objectAccessInfo: ObjectAccessInfo) => {
|
|
7
|
+
type: "UPDATE_OBJECT_ACCESS_INFO";
|
|
8
|
+
payload: ObjectAccessInfo;
|
|
9
|
+
};
|
|
10
|
+
export declare const updateModalTransferOwnership: (modalState: Partial<ShareAccessState['modalTransferOwnership']>) => {
|
|
11
|
+
type: "UPDATE_MODAL_TRANSTER_OWNERSHIP";
|
|
12
|
+
payload: Partial<{
|
|
13
|
+
open: boolean;
|
|
14
|
+
userToOwnerShipId: number;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const TYPES = {
|
|
2
|
+
UPDATE_OBJECT_ACCESS_INFO: 'UPDATE_OBJECT_ACCESS_INFO',
|
|
3
|
+
UPDATE_MODAL_TRANSTER_OWNERSHIP: 'UPDATE_MODAL_TRANSTER_OWNERSHIP',
|
|
4
|
+
};
|
|
5
|
+
export const updateObjAccessInfo = (objectAccessInfo) => ({
|
|
6
|
+
type: TYPES.UPDATE_OBJECT_ACCESS_INFO,
|
|
7
|
+
payload: objectAccessInfo,
|
|
8
|
+
});
|
|
9
|
+
export const updateModalTransferOwnership = (modalState) => ({
|
|
10
|
+
type: TYPES.UPDATE_MODAL_TRANSTER_OWNERSHIP,
|
|
11
|
+
payload: modalState,
|
|
12
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import Icon from '@antscorp/icons';
|
|
2
|
+
import { Dropdown } from 'antd';
|
|
3
|
+
import produce from 'immer';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { updateObjAccessInfo } from '../../actions';
|
|
6
|
+
import { GENERAL_ACCESS, PUBLIC_ROLE, ROLE_ACCESS_LABEL } from '../../constants';
|
|
7
|
+
import { useShareAccess } from '../../hooks';
|
|
8
|
+
import { StyledGeneralAccessRoot } from './styled';
|
|
9
|
+
export const GeneralAccess = () => {
|
|
10
|
+
const { state, dispatch } = useShareAccess();
|
|
11
|
+
const { accessInfo, allowEdit } = state;
|
|
12
|
+
if (!accessInfo)
|
|
13
|
+
return null;
|
|
14
|
+
const { isPublic, publicRole } = accessInfo;
|
|
15
|
+
const handleChangeGeneralAccess = (value) => {
|
|
16
|
+
if (!accessInfo || !dispatch || !allowEdit)
|
|
17
|
+
return;
|
|
18
|
+
const updated = produce(accessInfo, draft => {
|
|
19
|
+
draft.isPublic = value;
|
|
20
|
+
if (!isPublic && value === GENERAL_ACCESS.PUBLIC) {
|
|
21
|
+
draft.publicRole = PUBLIC_ROLE.ONLY_VIEWER;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
dispatch(updateObjAccessInfo(updated));
|
|
25
|
+
};
|
|
26
|
+
const handleChangePublicRole = (value) => {
|
|
27
|
+
if (!accessInfo || !dispatch || !allowEdit)
|
|
28
|
+
return;
|
|
29
|
+
const updated = produce(accessInfo, draft => {
|
|
30
|
+
draft.publicRole = value;
|
|
31
|
+
});
|
|
32
|
+
dispatch(updateObjAccessInfo(updated));
|
|
33
|
+
};
|
|
34
|
+
const renderDescription = () => {
|
|
35
|
+
let description = 'Only people with access can open this item.';
|
|
36
|
+
if (isPublic && publicRole === PUBLIC_ROLE.ONLY_VIEWER) {
|
|
37
|
+
description = 'Anyone on the portal can view this item.';
|
|
38
|
+
}
|
|
39
|
+
if (isPublic && publicRole === PUBLIC_ROLE.ONLY_EDITOR) {
|
|
40
|
+
description = 'Anyone on the portal can edit this item.';
|
|
41
|
+
}
|
|
42
|
+
return description;
|
|
43
|
+
};
|
|
44
|
+
return (React.createElement(StyledGeneralAccessRoot, null,
|
|
45
|
+
React.createElement("div", { className: "title" }, "General access"),
|
|
46
|
+
React.createElement("div", { className: "setting" },
|
|
47
|
+
React.createElement(Icon, { className: "accessable-icon", type: isPublic ? 'icon-ants-mui-lock-open' : 'icon-ants-mui-lock' }),
|
|
48
|
+
React.createElement("div", { className: "general-info" },
|
|
49
|
+
React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
50
|
+
items: [
|
|
51
|
+
isPublic
|
|
52
|
+
? { key: GENERAL_ACCESS.RESTRICTED, label: React.createElement("div", null, "Restricted ") }
|
|
53
|
+
: { key: GENERAL_ACCESS.PUBLIC, label: React.createElement("div", null, "Public") },
|
|
54
|
+
],
|
|
55
|
+
onClick: v => handleChangeGeneralAccess(+v.key),
|
|
56
|
+
} },
|
|
57
|
+
React.createElement("div", { className: "general-dropdown-wrapper" },
|
|
58
|
+
React.createElement("div", { className: "accessable-title" }, isPublic ? 'Public' : 'Restricted'),
|
|
59
|
+
allowEdit && React.createElement(Icon, { className: "icon-angle", type: "icon-ants-angle-down" }))),
|
|
60
|
+
React.createElement("div", { className: "description" }, renderDescription())),
|
|
61
|
+
!!isPublic && publicRole && (React.createElement(Dropdown, { placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true, disabled: !allowEdit, menu: {
|
|
62
|
+
items: [
|
|
63
|
+
publicRole === PUBLIC_ROLE.ONLY_VIEWER
|
|
64
|
+
? {
|
|
65
|
+
key: PUBLIC_ROLE.ONLY_EDITOR,
|
|
66
|
+
label: ROLE_ACCESS_LABEL[PUBLIC_ROLE.ONLY_EDITOR],
|
|
67
|
+
}
|
|
68
|
+
: {
|
|
69
|
+
key: PUBLIC_ROLE.ONLY_VIEWER,
|
|
70
|
+
label: ROLE_ACCESS_LABEL[PUBLIC_ROLE.ONLY_VIEWER],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
onClick: v => handleChangePublicRole(+v.key),
|
|
74
|
+
} },
|
|
75
|
+
React.createElement("div", { className: "public-role-dropdown-wrapper" },
|
|
76
|
+
React.createElement("div", { className: "for-title" }, ROLE_ACCESS_LABEL[publicRole]),
|
|
77
|
+
allowEdit && React.createElement(Icon, { className: "icon-angle", type: "icon-ants-angle-down" })))))));
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GeneralAccess';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GeneralAccess';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledGeneralAccessRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
export const StyledGeneralAccessRoot = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
.title {
|
|
9
|
+
margin-bottom: 12px;
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.setting {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
border: 1px solid #e6e6e6;
|
|
17
|
+
padding: 8px;
|
|
18
|
+
|
|
19
|
+
.icon-angle {
|
|
20
|
+
font-size: 10px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.accessable-icon {
|
|
26
|
+
font-size: 28px;
|
|
27
|
+
color: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary};
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.general-info {
|
|
33
|
+
flex: 1;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 4px;
|
|
37
|
+
margin-left: 15px;
|
|
38
|
+
|
|
39
|
+
.general-dropdown-wrapper {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 4px;
|
|
43
|
+
width: fit-content;
|
|
44
|
+
|
|
45
|
+
.accessable-title {
|
|
46
|
+
font-weight: bold;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.public-role-dropdown-wrapper {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 4px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useShareAccess } from '../../hooks';
|
|
3
|
+
import { GeneralAccess } from '../GeneralAccess';
|
|
4
|
+
import { ModalTransferOwnership } from '../ModalTransferOwnerShip/ModalTransferOwnerShip';
|
|
5
|
+
import { PeopleAccess } from '../PeopleAccess';
|
|
6
|
+
import { SearchUser } from '../SearchUser';
|
|
7
|
+
import { StyledLayoutContentRoot } from './styled';
|
|
8
|
+
export const LayoutContent = (props) => {
|
|
9
|
+
const { getUserInfo, allowChangeOnwership = true } = props;
|
|
10
|
+
const { state } = useShareAccess();
|
|
11
|
+
const { allowEdit, allowView } = state;
|
|
12
|
+
if (!allowEdit && !allowView)
|
|
13
|
+
return null;
|
|
14
|
+
return (React.createElement(StyledLayoutContentRoot, null,
|
|
15
|
+
React.createElement(SearchUser, { getUserInfo: getUserInfo }),
|
|
16
|
+
React.createElement(PeopleAccess, { allowChangeOnwership: allowChangeOnwership }),
|
|
17
|
+
React.createElement(GeneralAccess, null),
|
|
18
|
+
React.createElement(ModalTransferOwnership, null)));
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LayoutContent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LayoutContent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledLayoutContentRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
|