@aic-kits/react-native 0.0.3 → 0.0.5
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/lib/auth/components/SocialAuthButton/constants.d.ts +7 -0
- package/lib/auth/components/SocialAuthButton/constants.d.ts.map +1 -0
- package/lib/auth/components/SocialAuthButton/constants.js +14 -0
- package/lib/auth/components/SocialAuthButton/index.d.ts +22 -0
- package/lib/auth/components/SocialAuthButton/index.d.ts.map +1 -0
- package/lib/auth/components/SocialAuthButton/index.js +37 -0
- package/lib/auth/components/SocialSignIn/constants.d.ts +3 -0
- package/lib/auth/components/SocialSignIn/constants.d.ts.map +1 -0
- package/lib/auth/components/SocialSignIn/constants.js +1 -0
- package/lib/auth/components/SocialSignIn/index.d.ts +16 -0
- package/lib/auth/components/SocialSignIn/index.d.ts.map +1 -0
- package/lib/auth/components/SocialSignIn/index.js +11 -0
- package/lib/auth/components/index.d.ts +3 -0
- package/lib/auth/components/index.d.ts.map +1 -0
- package/lib/auth/components/index.js +2 -0
- package/lib/auth/hooks/index.d.ts +2 -0
- package/lib/auth/hooks/index.d.ts.map +1 -0
- package/lib/auth/hooks/index.js +1 -0
- package/lib/auth/hooks/useAuthListener.d.ts +6 -0
- package/lib/auth/hooks/useAuthListener.d.ts.map +1 -0
- package/lib/auth/hooks/useAuthListener.js +40 -0
- package/lib/auth/index.d.ts +7 -0
- package/lib/auth/index.d.ts.map +1 -0
- package/lib/auth/index.js +6 -0
- package/lib/auth/types.d.ts +26 -0
- package/lib/auth/types.d.ts.map +1 -0
- package/lib/auth/types.js +1 -0
- package/lib/auth/utils/apple.d.ts +4 -0
- package/lib/auth/utils/apple.d.ts.map +1 -0
- package/lib/auth/utils/apple.js +90 -0
- package/lib/auth/utils/email.d.ts +11 -0
- package/lib/auth/utils/email.d.ts.map +1 -0
- package/lib/auth/utils/email.js +33 -0
- package/lib/auth/utils/facebook.d.ts +4 -0
- package/lib/auth/utils/facebook.d.ts.map +1 -0
- package/lib/auth/utils/facebook.js +59 -0
- package/lib/auth/utils/google.d.ts +3 -0
- package/lib/auth/utils/google.d.ts.map +1 -0
- package/lib/auth/utils/google.js +33 -0
- package/lib/auth/utils/index.d.ts +8 -0
- package/lib/auth/utils/index.d.ts.map +1 -0
- package/lib/auth/utils/index.js +55 -0
- package/lib/components/Art/BrandArt.d.ts +3 -0
- package/lib/components/Art/BrandArt.d.ts.map +1 -0
- package/lib/components/Art/BrandArt.js +6 -0
- package/lib/components/Art/EmojiArt.d.ts +3 -0
- package/lib/components/Art/EmojiArt.d.ts.map +1 -0
- package/lib/components/Art/EmojiArt.js +25 -0
- package/lib/components/Art/IconArt.d.ts +3 -0
- package/lib/components/Art/IconArt.d.ts.map +1 -0
- package/lib/components/Art/IconArt.js +26 -0
- package/lib/components/Art/ImageArt.d.ts +3 -0
- package/lib/components/Art/ImageArt.d.ts.map +1 -0
- package/lib/components/Art/ImageArt.js +24 -0
- package/lib/components/Art/SvgArt.d.ts +3 -0
- package/lib/components/Art/SvgArt.d.ts.map +1 -0
- package/lib/components/Art/SvgArt.js +51 -0
- package/lib/components/Art/constants.d.ts +5 -0
- package/lib/components/Art/constants.d.ts.map +1 -0
- package/lib/components/Art/constants.js +6 -0
- package/lib/components/Art/hooks.d.ts +3 -0
- package/lib/components/Art/hooks.d.ts.map +1 -0
- package/lib/components/Art/hooks.js +8 -0
- package/lib/components/Art/index.d.ts +10 -0
- package/lib/components/Art/index.d.ts.map +1 -0
- package/lib/components/Art/index.js +29 -0
- package/lib/components/Art/types.d.ts +157 -0
- package/lib/components/Art/types.d.ts.map +1 -0
- package/lib/components/Art/types.js +1 -0
- package/lib/components/Art/utils.d.ts +40 -0
- package/lib/components/Art/utils.d.ts.map +1 -0
- package/lib/components/Art/utils.js +68 -0
- package/lib/components/Avatar/Wrapper.d.ts +11 -0
- package/lib/components/Avatar/Wrapper.d.ts.map +1 -0
- package/lib/components/Avatar/Wrapper.js +67 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.d.ts +14 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.d.ts.map +1 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.js +24 -0
- package/lib/components/Avatar/index.d.ts +3 -0
- package/lib/components/Avatar/index.d.ts.map +1 -0
- package/lib/components/Avatar/index.js +37 -0
- package/lib/components/Avatar/types.d.ts +51 -0
- package/lib/components/Avatar/types.d.ts.map +1 -0
- package/lib/components/Avatar/types.js +1 -0
- package/lib/components/Avatar/utils.d.ts +6 -0
- package/lib/components/Avatar/utils.d.ts.map +1 -0
- package/lib/components/Avatar/utils.js +9 -0
- package/lib/components/Base/BaseFooter.d.ts +8 -0
- package/lib/components/Base/BaseFooter.d.ts.map +1 -0
- package/lib/components/Base/BaseFooter.js +18 -0
- package/lib/components/Base/index.d.ts +4 -0
- package/lib/components/Base/index.d.ts.map +1 -0
- package/lib/components/Base/index.js +49 -0
- package/lib/components/Base/types.d.ts +83 -0
- package/lib/components/Base/types.d.ts.map +1 -0
- package/lib/components/Base/types.js +1 -0
- package/lib/components/Box/StyledBox.d.ts +254 -0
- package/lib/components/Box/StyledBox.d.ts.map +1 -0
- package/lib/components/Box/StyledBox.js +53 -0
- package/lib/components/Box/config.d.ts +359 -0
- package/lib/components/Box/config.d.ts.map +1 -0
- package/lib/components/Box/config.js +227 -0
- package/lib/components/Box/index.d.ts +11 -0
- package/lib/components/Box/index.d.ts.map +1 -0
- package/lib/components/Box/index.js +14 -0
- package/lib/components/Box/types.d.ts +53 -0
- package/lib/components/Box/types.d.ts.map +1 -0
- package/lib/components/Box/types.js +1 -0
- package/lib/components/Bubble/index.d.ts +8 -0
- package/lib/components/Bubble/index.d.ts.map +1 -0
- package/lib/components/Bubble/index.js +20 -0
- package/lib/components/Bubble/type.d.ts +18 -0
- package/lib/components/Bubble/type.d.ts.map +1 -0
- package/lib/components/Bubble/type.js +1 -0
- package/lib/components/Bubble/utils.d.ts +12 -0
- package/lib/components/Bubble/utils.d.ts.map +1 -0
- package/lib/components/Bubble/utils.js +33 -0
- package/lib/components/Button/StyledButton.d.ts +34 -0
- package/lib/components/Button/StyledButton.d.ts.map +1 -0
- package/lib/components/Button/StyledButton.js +49 -0
- package/lib/components/Button/index.d.ts +64 -0
- package/lib/components/Button/index.d.ts.map +1 -0
- package/lib/components/Button/index.js +20 -0
- package/lib/components/Button/utils.d.ts +4 -0
- package/lib/components/Button/utils.d.ts.map +1 -0
- package/lib/components/Button/utils.js +10 -0
- package/lib/components/Card/StyledCard.d.ts +226 -0
- package/lib/components/Card/StyledCard.d.ts.map +1 -0
- package/lib/components/Card/StyledCard.js +17 -0
- package/lib/components/Card/index.d.ts +27 -0
- package/lib/components/Card/index.d.ts.map +1 -0
- package/lib/components/Card/index.js +44 -0
- package/lib/components/Chart/LineChart.d.ts +3 -0
- package/lib/components/Chart/LineChart.d.ts.map +1 -0
- package/lib/components/Chart/LineChart.js +27 -0
- package/lib/components/Chart/constants.d.ts +2 -0
- package/lib/components/Chart/constants.d.ts.map +1 -0
- package/lib/components/Chart/constants.js +47 -0
- package/lib/components/Chart/index.d.ts +3 -0
- package/lib/components/Chart/index.d.ts.map +1 -0
- package/lib/components/Chart/index.js +10 -0
- package/lib/components/Chart/types.d.ts +32 -0
- package/lib/components/Chart/types.d.ts.map +1 -0
- package/lib/components/Chart/types.js +1 -0
- package/lib/components/Chart/utils.d.ts +6 -0
- package/lib/components/Chart/utils.d.ts.map +1 -0
- package/lib/components/Chart/utils.js +8 -0
- package/lib/components/Chat/ImageChat.d.ts +8 -0
- package/lib/components/Chat/ImageChat.d.ts.map +1 -0
- package/lib/components/Chat/ImageChat.js +24 -0
- package/lib/components/Chat/TextChat.d.ts +8 -0
- package/lib/components/Chat/TextChat.d.ts.map +1 -0
- package/lib/components/Chat/TextChat.js +37 -0
- package/lib/components/Chat/VideoChat.d.ts +6 -0
- package/lib/components/Chat/VideoChat.d.ts.map +1 -0
- package/lib/components/Chat/VideoChat.js +56 -0
- package/lib/components/Chat/index.d.ts +4 -0
- package/lib/components/Chat/index.d.ts.map +1 -0
- package/lib/components/Chat/index.js +26 -0
- package/lib/components/Chat/type.d.ts +95 -0
- package/lib/components/Chat/type.d.ts.map +1 -0
- package/lib/components/Chat/type.js +1 -0
- package/lib/components/ChatCluster/index.d.ts +4 -0
- package/lib/components/ChatCluster/index.d.ts.map +1 -0
- package/lib/components/ChatCluster/index.js +22 -0
- package/lib/components/ChatCluster/types.d.ts +11 -0
- package/lib/components/ChatCluster/types.d.ts.map +1 -0
- package/lib/components/ChatCluster/types.js +1 -0
- package/lib/components/ChatCluster/utils.d.ts +5 -0
- package/lib/components/ChatCluster/utils.d.ts.map +1 -0
- package/lib/components/ChatCluster/utils.js +15 -0
- package/lib/components/Chip/index.d.ts +3 -0
- package/lib/components/Chip/index.d.ts.map +1 -0
- package/lib/components/Chip/index.js +16 -0
- package/lib/components/Chip/types.d.ts +50 -0
- package/lib/components/Chip/types.d.ts.map +1 -0
- package/lib/components/Chip/types.js +1 -0
- package/lib/components/Divider/StyledDivider.d.ts +12 -0
- package/lib/components/Divider/StyledDivider.d.ts.map +1 -0
- package/lib/components/Divider/StyledDivider.js +17 -0
- package/lib/components/Divider/index.d.ts +15 -0
- package/lib/components/Divider/index.d.ts.map +1 -0
- package/lib/components/Divider/index.js +4 -0
- package/lib/components/FastList/index.d.ts +25 -0
- package/lib/components/FastList/index.d.ts.map +1 -0
- package/lib/components/FastList/index.js +13 -0
- package/lib/components/Filter/index.d.ts +40 -0
- package/lib/components/Filter/index.d.ts.map +1 -0
- package/lib/components/Filter/index.js +23 -0
- package/lib/components/Gradient/index.d.ts +11 -0
- package/lib/components/Gradient/index.d.ts.map +1 -0
- package/lib/components/Gradient/index.js +10 -0
- package/lib/components/Header/BackButton.d.ts +5 -0
- package/lib/components/Header/BackButton.d.ts.map +1 -0
- package/lib/components/Header/BackButton.js +22 -0
- package/lib/components/Header/DefaultHeader.d.ts +8 -0
- package/lib/components/Header/DefaultHeader.d.ts.map +1 -0
- package/lib/components/Header/DefaultHeader.js +13 -0
- package/lib/components/Header/HeaderContent.d.ts +6 -0
- package/lib/components/Header/HeaderContent.d.ts.map +1 -0
- package/lib/components/Header/HeaderContent.js +18 -0
- package/lib/components/Header/IconButton.d.ts +13 -0
- package/lib/components/Header/IconButton.d.ts.map +1 -0
- package/lib/components/Header/IconButton.js +6 -0
- package/lib/components/Header/ProgressHeader.d.ts +7 -0
- package/lib/components/Header/ProgressHeader.d.ts.map +1 -0
- package/lib/components/Header/ProgressHeader.js +18 -0
- package/lib/components/Header/RightButton.d.ts +3 -0
- package/lib/components/Header/RightButton.d.ts.map +1 -0
- package/lib/components/Header/RightButton.js +15 -0
- package/lib/components/Header/index.d.ts +4 -0
- package/lib/components/Header/index.d.ts.map +1 -0
- package/lib/components/Header/index.js +12 -0
- package/lib/components/Header/types.d.ts +86 -0
- package/lib/components/Header/types.d.ts.map +1 -0
- package/lib/components/Header/types.js +1 -0
- package/lib/components/Header/utils.d.ts +10 -0
- package/lib/components/Header/utils.d.ts.map +1 -0
- package/lib/components/Header/utils.js +3 -0
- package/lib/components/Icon/AnimatedIcon.d.ts +6 -0
- package/lib/components/Icon/AnimatedIcon.d.ts.map +1 -0
- package/lib/components/Icon/AnimatedIcon.js +34 -0
- package/lib/components/Icon/PlainIcon.d.ts +16 -0
- package/lib/components/Icon/PlainIcon.d.ts.map +1 -0
- package/lib/components/Icon/PlainIcon.js +13 -0
- package/lib/components/Icon/constants.d.ts +703 -0
- package/lib/components/Icon/constants.d.ts.map +1 -0
- package/lib/components/Icon/constants.js +702 -0
- package/lib/components/Icon/index.d.ts +34 -0
- package/lib/components/Icon/index.d.ts.map +1 -0
- package/lib/components/Icon/index.js +24 -0
- package/lib/components/Icon/utils.d.ts +3 -0
- package/lib/components/Icon/utils.d.ts.map +1 -0
- package/lib/components/Icon/utils.js +2 -0
- package/lib/components/Image/ImageDetail.d.ts +11 -0
- package/lib/components/Image/ImageDetail.d.ts.map +1 -0
- package/lib/components/Image/ImageDetail.js +33 -0
- package/lib/components/Image/index.d.ts +11 -0
- package/lib/components/Image/index.d.ts.map +1 -0
- package/lib/components/Image/index.js +5 -0
- package/lib/components/Image/utils.d.ts +6 -0
- package/lib/components/Image/utils.d.ts.map +1 -0
- package/lib/components/Image/utils.js +12 -0
- package/lib/components/InfoCard/BasicInfoCard.d.ts +19 -0
- package/lib/components/InfoCard/BasicInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/BasicInfoCard.js +18 -0
- package/lib/components/InfoCard/NewsInfoCard.d.ts +22 -0
- package/lib/components/InfoCard/NewsInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/NewsInfoCard.js +15 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.d.ts +33 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.js +24 -0
- package/lib/components/InfoCard/index.d.ts +15 -0
- package/lib/components/InfoCard/index.d.ts.map +1 -0
- package/lib/components/InfoCard/index.js +16 -0
- package/lib/components/Input/StyledInput.d.ts +13 -0
- package/lib/components/Input/StyledInput.d.ts.map +1 -0
- package/lib/components/Input/StyledInput.js +14 -0
- package/lib/components/Input/index.d.ts +34 -0
- package/lib/components/Input/index.d.ts.map +1 -0
- package/lib/components/Input/index.js +15 -0
- package/lib/components/LevelStep/CircularProgress.d.ts +12 -0
- package/lib/components/LevelStep/CircularProgress.d.ts.map +1 -0
- package/lib/components/LevelStep/CircularProgress.js +27 -0
- package/lib/components/LevelStep/TransformedSvg.d.ts +13 -0
- package/lib/components/LevelStep/TransformedSvg.d.ts.map +1 -0
- package/lib/components/LevelStep/TransformedSvg.js +9 -0
- package/lib/components/LevelStep/constants.d.ts +8 -0
- package/lib/components/LevelStep/constants.d.ts.map +1 -0
- package/lib/components/LevelStep/constants.js +17 -0
- package/lib/components/LevelStep/index.d.ts +3 -0
- package/lib/components/LevelStep/index.d.ts.map +1 -0
- package/lib/components/LevelStep/index.js +78 -0
- package/lib/components/LevelStep/types.d.ts +7 -0
- package/lib/components/LevelStep/types.d.ts.map +1 -0
- package/lib/components/LevelStep/types.js +1 -0
- package/lib/components/List/index.d.ts +13 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +13 -0
- package/lib/components/Loading/Loading.d.ts +3 -0
- package/lib/components/Loading/Loading.d.ts.map +1 -0
- package/lib/components/Loading/Loading.js +61 -0
- package/lib/components/Loading/StyledLoading.d.ts +14 -0
- package/lib/components/Loading/StyledLoading.d.ts.map +1 -0
- package/lib/components/Loading/StyledLoading.js +18 -0
- package/lib/components/Loading/index.d.ts +3 -0
- package/lib/components/Loading/index.d.ts.map +1 -0
- package/lib/components/Loading/index.js +26 -0
- package/lib/components/Loading/types.d.ts +25 -0
- package/lib/components/Loading/types.d.ts.map +1 -0
- package/lib/components/Loading/types.js +1 -0
- package/lib/components/Notification/Notification.d.ts +6 -0
- package/lib/components/Notification/Notification.d.ts.map +1 -0
- package/lib/components/Notification/Notification.js +13 -0
- package/lib/components/Notification/NotificationProvider.d.ts +4 -0
- package/lib/components/Notification/NotificationProvider.d.ts.map +1 -0
- package/lib/components/Notification/NotificationProvider.js +13 -0
- package/lib/components/Notification/Toast.d.ts +8 -0
- package/lib/components/Notification/Toast.d.ts.map +1 -0
- package/lib/components/Notification/Toast.js +32 -0
- package/lib/components/Notification/context.d.ts +7 -0
- package/lib/components/Notification/context.d.ts.map +1 -0
- package/lib/components/Notification/context.js +9 -0
- package/lib/components/Notification/index.d.ts +3 -0
- package/lib/components/Notification/index.d.ts.map +1 -0
- package/lib/components/Notification/index.js +2 -0
- package/lib/components/PlaySwitch/index.d.ts +4 -0
- package/lib/components/PlaySwitch/index.d.ts.map +1 -0
- package/lib/components/PlaySwitch/index.js +62 -0
- package/lib/components/PlaySwitch/types.d.ts +23 -0
- package/lib/components/PlaySwitch/types.d.ts.map +1 -0
- package/lib/components/PlaySwitch/types.js +1 -0
- package/lib/components/Progress/StyledProgress.d.ts +225 -0
- package/lib/components/Progress/StyledProgress.d.ts.map +1 -0
- package/lib/components/Progress/StyledProgress.js +22 -0
- package/lib/components/Progress/index.d.ts +25 -0
- package/lib/components/Progress/index.d.ts.map +1 -0
- package/lib/components/Progress/index.js +33 -0
- package/lib/components/Scrollable/StyledScrollable.d.ts +33 -0
- package/lib/components/Scrollable/StyledScrollable.d.ts.map +1 -0
- package/lib/components/Scrollable/StyledScrollable.js +56 -0
- package/lib/components/Scrollable/index.d.ts +6 -0
- package/lib/components/Scrollable/index.d.ts.map +1 -0
- package/lib/components/Scrollable/index.js +15 -0
- package/lib/components/Scrollable/types.d.ts +5 -0
- package/lib/components/Scrollable/types.d.ts.map +1 -0
- package/lib/components/Scrollable/types.js +1 -0
- package/lib/components/Sectional/Item.d.ts +13 -0
- package/lib/components/Sectional/Item.d.ts.map +1 -0
- package/lib/components/Sectional/Item.js +21 -0
- package/lib/components/Sectional/index.d.ts +9 -0
- package/lib/components/Sectional/index.d.ts.map +1 -0
- package/lib/components/Sectional/index.js +25 -0
- package/lib/components/Sectional/types.d.ts +33 -0
- package/lib/components/Sectional/types.d.ts.map +1 -0
- package/lib/components/Sectional/types.js +1 -0
- package/lib/components/Sectional/utils.d.ts +11 -0
- package/lib/components/Sectional/utils.d.ts.map +1 -0
- package/lib/components/Sectional/utils.js +37 -0
- package/lib/components/Selection/index.d.ts +17 -0
- package/lib/components/Selection/index.d.ts.map +1 -0
- package/lib/components/Selection/index.js +24 -0
- package/lib/components/Skeleton/SkeletonBackground.d.ts +6 -0
- package/lib/components/Skeleton/SkeletonBackground.d.ts.map +1 -0
- package/lib/components/Skeleton/SkeletonBackground.js +23 -0
- package/lib/components/Skeleton/SkeletonWrapper.d.ts +8 -0
- package/lib/components/Skeleton/SkeletonWrapper.d.ts.map +1 -0
- package/lib/components/Skeleton/SkeletonWrapper.js +50 -0
- package/lib/components/Skeleton/index.d.ts +4 -0
- package/lib/components/Skeleton/index.d.ts.map +1 -0
- package/lib/components/Skeleton/index.js +16 -0
- package/lib/components/Skeleton/types.d.ts +16 -0
- package/lib/components/Skeleton/types.d.ts.map +1 -0
- package/lib/components/Skeleton/types.js +1 -0
- package/lib/components/Slides/index.d.ts +14 -0
- package/lib/components/Slides/index.d.ts.map +1 -0
- package/lib/components/Slides/index.js +46 -0
- package/lib/components/Squircle/index.d.ts +35 -0
- package/lib/components/Squircle/index.d.ts.map +1 -0
- package/lib/components/Squircle/index.js +21 -0
- package/lib/components/Squircle/types.d.ts +20 -0
- package/lib/components/Squircle/types.d.ts.map +1 -0
- package/lib/components/Squircle/types.js +1 -0
- package/lib/components/Squircle/utils.d.ts +4 -0
- package/lib/components/Squircle/utils.d.ts.map +1 -0
- package/lib/components/Squircle/utils.js +86 -0
- package/lib/components/Text/StyledText.d.ts +18 -0
- package/lib/components/Text/StyledText.d.ts.map +1 -0
- package/lib/components/Text/StyledText.js +19 -0
- package/lib/components/Text/constants.d.ts +3 -0
- package/lib/components/Text/constants.d.ts.map +1 -0
- package/lib/components/Text/constants.js +6 -0
- package/lib/components/Text/index.d.ts +6 -0
- package/lib/components/Text/index.d.ts.map +1 -0
- package/lib/components/Text/index.js +7 -0
- package/lib/components/Text/types.d.ts +55 -0
- package/lib/components/Text/types.d.ts.map +1 -0
- package/lib/components/Text/types.js +1 -0
- package/lib/components/Text/withRichText.d.ts +6 -0
- package/lib/components/Text/withRichText.d.ts.map +1 -0
- package/lib/components/Text/withRichText.js +38 -0
- package/lib/components/Touchable/index.d.ts +5 -0
- package/lib/components/Touchable/index.d.ts.map +1 -0
- package/lib/components/Touchable/index.js +56 -0
- package/lib/components/Touchable/types.d.ts +22 -0
- package/lib/components/Touchable/types.d.ts.map +1 -0
- package/lib/components/Touchable/types.js +1 -0
- package/lib/components/Video/StyledVideoControlManager.d.ts +49 -0
- package/lib/components/Video/StyledVideoControlManager.d.ts.map +1 -0
- package/lib/components/Video/StyledVideoControlManager.js +64 -0
- package/lib/components/Video/StyledVideoDetail.d.ts +16 -0
- package/lib/components/Video/StyledVideoDetail.d.ts.map +1 -0
- package/lib/components/Video/StyledVideoDetail.js +23 -0
- package/lib/components/Video/VideoControlManager.d.ts +10 -0
- package/lib/components/Video/VideoControlManager.d.ts.map +1 -0
- package/lib/components/Video/VideoControlManager.js +67 -0
- package/lib/components/Video/VideoDetail.d.ts +11 -0
- package/lib/components/Video/VideoDetail.d.ts.map +1 -0
- package/lib/components/Video/VideoDetail.js +102 -0
- package/lib/components/Video/index.d.ts +25 -0
- package/lib/components/Video/index.d.ts.map +1 -0
- package/lib/components/Video/index.js +49 -0
- package/lib/components/Vimeo/Player.d.ts +4 -0
- package/lib/components/Vimeo/Player.d.ts.map +1 -0
- package/lib/components/Vimeo/Player.js +30 -0
- package/lib/components/Vimeo/constants.d.ts +2 -0
- package/lib/components/Vimeo/constants.d.ts.map +1 -0
- package/lib/components/Vimeo/constants.js +23 -0
- package/lib/components/Vimeo/index.d.ts +10 -0
- package/lib/components/Vimeo/index.d.ts.map +1 -0
- package/lib/components/Vimeo/index.js +35 -0
- package/lib/components/Vimeo/types.d.ts +74 -0
- package/lib/components/Vimeo/types.d.ts.map +1 -0
- package/lib/components/Vimeo/types.js +1 -0
- package/lib/components/Vimeo/utils.d.ts +4 -0
- package/lib/components/Vimeo/utils.d.ts.map +1 -0
- package/lib/components/Vimeo/utils.js +126 -0
- package/lib/components/index.d.ts +33 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +32 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/useKeyboard.d.ts +10 -0
- package/lib/hooks/useKeyboard.d.ts.map +1 -0
- package/lib/hooks/useKeyboard.js +54 -0
- package/lib/hooks/usePrevious.d.ts +3 -0
- package/lib/hooks/usePrevious.d.ts.map +1 -0
- package/lib/hooks/usePrevious.js +9 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/services/base/BaseResponse.d.ts +12 -0
- package/lib/services/base/BaseResponse.d.ts.map +1 -0
- package/lib/services/base/BaseResponse.js +9 -0
- package/lib/services/base/BaseService.d.ts +8 -0
- package/lib/services/base/BaseService.d.ts.map +1 -0
- package/lib/services/base/BaseService.js +61 -0
- package/lib/services/base/index.d.ts +3 -0
- package/lib/services/base/index.d.ts.map +1 -0
- package/lib/services/base/index.js +2 -0
- package/lib/services/hooks/index.d.ts +2 -0
- package/lib/services/hooks/index.d.ts.map +1 -0
- package/lib/services/hooks/index.js +1 -0
- package/lib/services/hooks/useRequest.d.ts +14 -0
- package/lib/services/hooks/useRequest.d.ts.map +1 -0
- package/lib/services/hooks/useRequest.js +30 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +2 -0
- package/lib/theme/ThemeProvider.d.ts +13 -0
- package/lib/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/theme/ThemeProvider.js +5 -0
- package/lib/theme/ThemeSwitcher.d.ts +9 -0
- package/lib/theme/ThemeSwitcher.d.ts.map +1 -0
- package/lib/theme/ThemeSwitcher.js +19 -0
- package/lib/theme/common/borders.d.ts +9 -0
- package/lib/theme/common/borders.d.ts.map +1 -0
- package/lib/theme/common/borders.js +27 -0
- package/lib/theme/common/colors.d.ts +74 -0
- package/lib/theme/common/colors.d.ts.map +1 -0
- package/lib/theme/common/colors.js +73 -0
- package/lib/theme/common/gradient.d.ts +13 -0
- package/lib/theme/common/gradient.d.ts.map +1 -0
- package/lib/theme/common/gradient.js +12 -0
- package/lib/theme/common/index.d.ts +50 -0
- package/lib/theme/common/index.d.ts.map +1 -0
- package/lib/theme/common/index.js +37 -0
- package/lib/theme/common/scale.d.ts +12 -0
- package/lib/theme/common/scale.d.ts.map +1 -0
- package/lib/theme/common/scale.js +16 -0
- package/lib/theme/common/shadows.d.ts +17 -0
- package/lib/theme/common/shadows.d.ts.map +1 -0
- package/lib/theme/common/shadows.js +13 -0
- package/lib/theme/common/sizes.d.ts +6 -0
- package/lib/theme/common/sizes.d.ts.map +1 -0
- package/lib/theme/common/sizes.js +26 -0
- package/lib/theme/common/spaces.d.ts +5 -0
- package/lib/theme/common/spaces.d.ts.map +1 -0
- package/lib/theme/common/spaces.js +31 -0
- package/lib/theme/common/text.d.ts +14 -0
- package/lib/theme/common/text.d.ts.map +1 -0
- package/lib/theme/common/text.js +70 -0
- package/lib/theme/components/art.d.ts +17 -0
- package/lib/theme/components/art.d.ts.map +1 -0
- package/lib/theme/components/art.js +15 -0
- package/lib/theme/components/avatar.d.ts +11 -0
- package/lib/theme/components/avatar.d.ts.map +1 -0
- package/lib/theme/components/avatar.js +20 -0
- package/lib/theme/components/base.d.ts +14 -0
- package/lib/theme/components/base.d.ts.map +1 -0
- package/lib/theme/components/base.js +17 -0
- package/lib/theme/components/bubble.d.ts +6 -0
- package/lib/theme/components/bubble.d.ts.map +1 -0
- package/lib/theme/components/bubble.js +10 -0
- package/lib/theme/components/button.d.ts +12 -0
- package/lib/theme/components/button.d.ts.map +1 -0
- package/lib/theme/components/button.js +22 -0
- package/lib/theme/components/card.d.ts +8 -0
- package/lib/theme/components/card.d.ts.map +1 -0
- package/lib/theme/components/card.js +16 -0
- package/lib/theme/components/chart.d.ts +16 -0
- package/lib/theme/components/chart.d.ts.map +1 -0
- package/lib/theme/components/chart.js +22 -0
- package/lib/theme/components/chat.d.ts +11 -0
- package/lib/theme/components/chat.d.ts.map +1 -0
- package/lib/theme/components/chat.js +20 -0
- package/lib/theme/components/chip.d.ts +18 -0
- package/lib/theme/components/chip.d.ts.map +1 -0
- package/lib/theme/components/chip.js +43 -0
- package/lib/theme/components/divider.d.ts +12 -0
- package/lib/theme/components/divider.d.ts.map +1 -0
- package/lib/theme/components/divider.js +16 -0
- package/lib/theme/components/filter.d.ts +5 -0
- package/lib/theme/components/filter.d.ts.map +1 -0
- package/lib/theme/components/filter.js +8 -0
- package/lib/theme/components/header.d.ts +30 -0
- package/lib/theme/components/header.d.ts.map +1 -0
- package/lib/theme/components/header.js +36 -0
- package/lib/theme/components/image.d.ts +4 -0
- package/lib/theme/components/image.d.ts.map +1 -0
- package/lib/theme/components/image.js +6 -0
- package/lib/theme/components/index.d.ts +27 -0
- package/lib/theme/components/index.d.ts.map +1 -0
- package/lib/theme/components/index.js +26 -0
- package/lib/theme/components/infoCard.d.ts +25 -0
- package/lib/theme/components/infoCard.d.ts.map +1 -0
- package/lib/theme/components/infoCard.js +32 -0
- package/lib/theme/components/input.d.ts +21 -0
- package/lib/theme/components/input.d.ts.map +1 -0
- package/lib/theme/components/input.js +34 -0
- package/lib/theme/components/levelStep.d.ts +48 -0
- package/lib/theme/components/levelStep.d.ts.map +1 -0
- package/lib/theme/components/levelStep.js +56 -0
- package/lib/theme/components/loading.d.ts +16 -0
- package/lib/theme/components/loading.d.ts.map +1 -0
- package/lib/theme/components/loading.js +27 -0
- package/lib/theme/components/notification.d.ts +23 -0
- package/lib/theme/components/notification.d.ts.map +1 -0
- package/lib/theme/components/notification.js +38 -0
- package/lib/theme/components/playSwitch.d.ts +10 -0
- package/lib/theme/components/playSwitch.d.ts.map +1 -0
- package/lib/theme/components/playSwitch.js +14 -0
- package/lib/theme/components/progress.d.ts +10 -0
- package/lib/theme/components/progress.d.ts.map +1 -0
- package/lib/theme/components/progress.js +14 -0
- package/lib/theme/components/selection.d.ts +9 -0
- package/lib/theme/components/selection.d.ts.map +1 -0
- package/lib/theme/components/selection.js +21 -0
- package/lib/theme/components/skeleton.d.ts +11 -0
- package/lib/theme/components/skeleton.d.ts.map +1 -0
- package/lib/theme/components/skeleton.js +18 -0
- package/lib/theme/components/slides.d.ts +7 -0
- package/lib/theme/components/slides.d.ts.map +1 -0
- package/lib/theme/components/slides.js +10 -0
- package/lib/theme/components/text.d.ts +21 -0
- package/lib/theme/components/text.d.ts.map +1 -0
- package/lib/theme/components/text.js +22 -0
- package/lib/theme/components/touchable.d.ts +15 -0
- package/lib/theme/components/touchable.d.ts.map +1 -0
- package/lib/theme/components/touchable.js +41 -0
- package/lib/theme/components/video.d.ts +18 -0
- package/lib/theme/components/video.d.ts.map +1 -0
- package/lib/theme/components/video.js +47 -0
- package/lib/theme/getTheme.d.ts +34 -0
- package/lib/theme/getTheme.d.ts.map +1 -0
- package/lib/theme/getTheme.js +36 -0
- package/lib/theme/index.d.ts +10 -0
- package/lib/theme/index.d.ts.map +1 -0
- package/lib/theme/index.js +7 -0
- package/lib/utils/api/index.d.ts +3 -0
- package/lib/utils/api/index.d.ts.map +1 -0
- package/lib/utils/api/index.js +2 -0
- package/lib/utils/api/keys.d.ts +3 -0
- package/lib/utils/api/keys.d.ts.map +1 -0
- package/lib/utils/api/keys.js +11 -0
- package/lib/utils/api/urls.d.ts +3 -0
- package/lib/utils/api/urls.d.ts.map +1 -0
- package/lib/utils/api/urls.js +8 -0
- package/lib/utils/format/index.d.ts +3 -0
- package/lib/utils/format/index.d.ts.map +1 -0
- package/lib/utils/format/index.js +2 -0
- package/lib/utils/format/text.d.ts +4 -0
- package/lib/utils/format/text.d.ts.map +1 -0
- package/lib/utils/format/text.js +13 -0
- package/lib/utils/haptic/index.d.ts +4 -0
- package/lib/utils/haptic/index.d.ts.map +1 -0
- package/lib/utils/haptic/index.js +3 -0
- package/lib/utils/haptic/types.d.ts +25 -0
- package/lib/utils/haptic/types.d.ts.map +1 -0
- package/lib/utils/haptic/types.js +25 -0
- package/lib/utils/haptic/utils.d.ts +3 -0
- package/lib/utils/haptic/utils.d.ts.map +1 -0
- package/lib/utils/haptic/utils.js +8 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/intl/IntlProvider.d.ts +7 -0
- package/lib/utils/intl/IntlProvider.d.ts.map +1 -0
- package/lib/utils/intl/IntlProvider.js +16 -0
- package/lib/utils/intl/context.d.ts +15 -0
- package/lib/utils/intl/context.d.ts.map +1 -0
- package/lib/utils/intl/context.js +9 -0
- package/lib/utils/intl/global.d.ts +7 -0
- package/lib/utils/intl/global.d.ts.map +1 -0
- package/lib/utils/intl/global.js +1 -0
- package/lib/utils/intl/hooks.d.ts +7 -0
- package/lib/utils/intl/hooks.d.ts.map +1 -0
- package/lib/utils/intl/hooks.js +10 -0
- package/lib/utils/intl/index.d.ts +5 -0
- package/lib/utils/intl/index.d.ts.map +1 -0
- package/lib/utils/intl/index.js +4 -0
- package/lib/utils/intl/state.d.ts +12 -0
- package/lib/utils/intl/state.d.ts.map +1 -0
- package/lib/utils/intl/state.js +14 -0
- package/lib/utils/intl/utils.d.ts +6 -0
- package/lib/utils/intl/utils.d.ts.map +1 -0
- package/lib/utils/intl/utils.js +7 -0
- package/lib/utils/notification/index.d.ts +2 -0
- package/lib/utils/notification/index.d.ts.map +1 -0
- package/lib/utils/notification/index.js +1 -0
- package/lib/utils/notification/toast/constants.d.ts +4 -0
- package/lib/utils/notification/toast/constants.d.ts.map +1 -0
- package/lib/utils/notification/toast/constants.js +7 -0
- package/lib/utils/notification/toast/index.d.ts +3 -0
- package/lib/utils/notification/toast/index.d.ts.map +1 -0
- package/lib/utils/notification/toast/index.js +2 -0
- package/lib/utils/notification/toast/types.d.ts +2 -0
- package/lib/utils/notification/toast/types.d.ts.map +1 -0
- package/lib/utils/notification/toast/types.js +1 -0
- package/lib/utils/notification/toast/utils.d.ts +6 -0
- package/lib/utils/notification/toast/utils.d.ts.map +1 -0
- package/lib/utils/notification/toast/utils.js +23 -0
- package/lib/utils/routes/index.d.ts +4 -0
- package/lib/utils/routes/index.d.ts.map +1 -0
- package/lib/utils/routes/index.js +3 -0
- package/lib/utils/routes/types.d.ts +10 -0
- package/lib/utils/routes/types.d.ts.map +1 -0
- package/lib/utils/routes/types.js +1 -0
- package/lib/utils/routes/utils.d.ts +5 -0
- package/lib/utils/routes/utils.d.ts.map +1 -0
- package/lib/utils/routes/utils.js +3 -0
- package/lib/utils/scale.d.ts +4 -0
- package/lib/utils/scale.d.ts.map +1 -0
- package/lib/utils/scale.js +15 -0
- package/lib/utils/ui/color/index.d.ts +3 -0
- package/lib/utils/ui/color/index.d.ts.map +1 -0
- package/lib/utils/ui/color/index.js +2 -0
- package/lib/utils/ui/color/utils.d.ts +2 -0
- package/lib/utils/ui/color/utils.d.ts.map +1 -0
- package/lib/utils/ui/color/utils.js +9 -0
- package/lib/utils/ui/index.d.ts +2 -0
- package/lib/utils/ui/index.d.ts.map +1 -0
- package/lib/utils/ui/index.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/auth/components/SocialAuthButton/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,cAAc,EACd;IAAE,eAAe,EAAE,KAAK,GAAG,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAclD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type BrandArtProps, type TouchableProps } from '../../../components';
|
|
2
|
+
import type { SocialProvider } from '../../types';
|
|
3
|
+
export interface SocialAuthButtonProps extends Omit<BrandArtProps, 'type' | 'art'>, Omit<TouchableProps, 'children' | 'onPress'> {
|
|
4
|
+
/**
|
|
5
|
+
* Provider of the social authentication.
|
|
6
|
+
*/
|
|
7
|
+
provider: SocialProvider;
|
|
8
|
+
/**
|
|
9
|
+
* Type of the authentication.
|
|
10
|
+
*/
|
|
11
|
+
authenticationType: 'signIn' | 'linkAccount';
|
|
12
|
+
/**
|
|
13
|
+
* Function to be called when the social sign in is successful.
|
|
14
|
+
*/
|
|
15
|
+
onSuccess: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Function to be called when the social sign in is successful.
|
|
18
|
+
*/
|
|
19
|
+
onError: (error: Error) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const SocialAuthButton: ({ provider, authenticationType, size, onSuccess, onError, ...otherProps }: SocialAuthButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/components/SocialAuthButton/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,aAAa,EAGlB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,MAAM,WAAW,qBAAsB,SACtC,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,CAAC,EACnC,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC;IAC5C;;KAEI;IACJ,QAAQ,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,kBAAkB,EAAE,QAAQ,GAAG,aAAa,CAAC;IAE7C;;OAEG;IACJ,SAAS,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACJ,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC;AAeD,eAAO,MAAM,gBAAgB,8EAO1B,qBAAqB,4CAmCvB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/native';
|
|
3
|
+
import isString from 'lodash/fp/isString';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Art, Loading, Touchable, } from '../../../components';
|
|
6
|
+
import { isColor, isSize } from '../../../theme';
|
|
7
|
+
import { linkAccount, signIn } from '../../utils';
|
|
8
|
+
import { PROVIDER_COLORS } from './constants';
|
|
9
|
+
const StyledContainer = styled.View(({ backgroundColor, size, theme }) => ({
|
|
10
|
+
backgroundColor: isColor(backgroundColor)
|
|
11
|
+
? theme.colors[backgroundColor]
|
|
12
|
+
: backgroundColor,
|
|
13
|
+
borderRadius: isString(size) && isSize(size) ?
|
|
14
|
+
theme.sizes[size] / 2 : size / 2,
|
|
15
|
+
}));
|
|
16
|
+
export const SocialAuthButton = ({ provider, authenticationType, size = 'xxxxlarge', onSuccess, onError, ...otherProps }) => {
|
|
17
|
+
const [loading, setLoading] = useState(false);
|
|
18
|
+
const handlePress = async () => {
|
|
19
|
+
try {
|
|
20
|
+
setLoading(true);
|
|
21
|
+
if (authenticationType === 'signIn') {
|
|
22
|
+
await signIn({ type: provider });
|
|
23
|
+
}
|
|
24
|
+
else if (authenticationType === 'linkAccount') {
|
|
25
|
+
await linkAccount({ type: provider });
|
|
26
|
+
}
|
|
27
|
+
onSuccess();
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
onError(error);
|
|
31
|
+
}
|
|
32
|
+
finally {
|
|
33
|
+
setLoading(false);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return (_jsx(Touchable, { ...otherProps, onPress: handlePress, children: _jsx(StyledContainer, { backgroundColor: PROVIDER_COLORS[provider].backgroundColor, size: size, children: _jsx(Loading, { size: "small", loading: loading, color: PROVIDER_COLORS[provider].color, children: _jsx(Art, { type: "brand", art: provider, size: size }) }) }) }));
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/auth/components/SocialSignIn/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,cAAc,EAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SOCIAL_AUTH_PROVIDERS = ['google', 'apple', 'facebook'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SocialSignInProps {
|
|
2
|
+
/**
|
|
3
|
+
* Function to be called when the social sign in is successful.
|
|
4
|
+
*/
|
|
5
|
+
onSuccess: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Function to be called when the social sign in is successful.
|
|
8
|
+
*/
|
|
9
|
+
onError: (error: Error) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Description to be displayed above the divider.
|
|
12
|
+
*/
|
|
13
|
+
dividerDescription?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const SocialSignIn: ({ onSuccess, onError, dividerDescription, }: SocialSignInProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/components/SocialSignIn/index.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IACjC;;KAEI;IACJ,SAAS,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACJ,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAE/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,gDAItB,iBAAiB,4CA2BnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Divider, Text } from '../../../components';
|
|
3
|
+
import { useIntl } from '../../../utils';
|
|
4
|
+
import { SocialAuthButton } from '../SocialAuthButton';
|
|
5
|
+
import { SOCIAL_AUTH_PROVIDERS } from './constants';
|
|
6
|
+
export const SocialSignIn = ({ onSuccess, onError, dividerDescription, }) => {
|
|
7
|
+
const intl = useIntl();
|
|
8
|
+
return (_jsxs(Box, { marginTop: "large", gap: "mediumLarge", children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", gap: "small", children: [_jsx(Divider, { flex: 1, color: "blue" }), _jsx(Text, { fontWeight: "bold", fontSize: "xlarge", children: dividerDescription || intl.formatMessage({
|
|
9
|
+
id: 'authentication.signIn.orSignInWith',
|
|
10
|
+
}) }), _jsx(Divider, { flex: 1, color: "blue" })] }), _jsx(Box, { flexDirection: "row", justifyContent: "center", gap: "xxxlarge", children: SOCIAL_AUTH_PROVIDERS.map(provider => (_jsx(SocialAuthButton, { provider: provider, authenticationType: "signIn", onSuccess: onSuccess, onError: onError }, provider))) })] }));
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useAuthListener';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuthListener.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useAuthListener.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,eAAe;;;CA2C3B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import auth from '@react-native-firebase/auth';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
export const useAuthListener = () => {
|
|
4
|
+
const [isInitializing, setIsInitializing] = useState(true);
|
|
5
|
+
const [user, setUser] = useState(null);
|
|
6
|
+
const [isListeningUser, setIsListeningUser] = useState(false);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const subscriber = auth().onAuthStateChanged(result => {
|
|
9
|
+
setUser(result);
|
|
10
|
+
if (isInitializing && !isListeningUser) {
|
|
11
|
+
setIsInitializing(false);
|
|
12
|
+
setIsListeningUser(true);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
if (subscriber) {
|
|
17
|
+
subscriber();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}, [isInitializing, isListeningUser]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
let userListener;
|
|
23
|
+
if (isListeningUser) {
|
|
24
|
+
// TODO @react-native-firebase/auth provides `onUserChanged` which is this and more.
|
|
25
|
+
// what else can we add and still be web-compatible?
|
|
26
|
+
userListener = auth().onIdTokenChanged(result => {
|
|
27
|
+
setUser(result);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return () => {
|
|
31
|
+
if (userListener) {
|
|
32
|
+
userListener();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}, [isListeningUser]);
|
|
36
|
+
return {
|
|
37
|
+
isInitializing,
|
|
38
|
+
user,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as firebaseAuth from '@react-native-firebase/auth';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './hooks';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export declare const auth: firebaseAuth.FirebaseAuthTypes.Module;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,IAAI,uCAAyB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FirebaseAuthTypes } from '@react-native-firebase/auth';
|
|
2
|
+
export type User = FirebaseAuthTypes.User | null;
|
|
3
|
+
export type SocialProvider = 'facebook' | 'google' | 'apple';
|
|
4
|
+
export type SignInParams = {
|
|
5
|
+
type: 'email';
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'google';
|
|
10
|
+
} | {
|
|
11
|
+
type: 'apple';
|
|
12
|
+
} | {
|
|
13
|
+
type: 'facebook';
|
|
14
|
+
};
|
|
15
|
+
export type LinkAccountParams = {
|
|
16
|
+
type: 'email';
|
|
17
|
+
email: string;
|
|
18
|
+
password: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'google';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'apple';
|
|
23
|
+
} | {
|
|
24
|
+
type: 'facebook';
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB,GAAG;IACH,IAAI,EAAE,QAAQ,CAAC;CACf,GAAG;IACH,IAAI,EAAE,OAAO,CAAC;CACd,GAAG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB,GAAG;IACH,IAAI,EAAE,QAAQ,CAAC;CACf,GAAG;IACH,IAAI,EAAE,OAAO,CAAC;CACd,GAAG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { FirebaseAuthTypes } from '@react-native-firebase/auth';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/apple.ts"],"names":[],"mappings":"AAIA,OAAO,gCAAgC,CAAC;AAgExC,eAAO,MAAM,MAAM,qBAalB,CAAC;AAEF,eAAO,MAAM,WAAW,qBAcvB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { FirebaseError } from '@firebase/util';
|
|
2
|
+
import { appleAuth, appleAuthAndroid } from '@invertase/react-native-apple-authentication';
|
|
3
|
+
import auth from '@react-native-firebase/auth';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import 'react-native-get-random-values';
|
|
6
|
+
import { v4 as uuid } from 'uuid';
|
|
7
|
+
import { HapticFeedback, HapticFeedbackTypes, TextFormat, Toast, } from '../../utils';
|
|
8
|
+
const getAppleSignInCredential = async () => {
|
|
9
|
+
if (Platform.OS === 'ios') {
|
|
10
|
+
const appleAuthRequestResponse = await appleAuth.performRequest({
|
|
11
|
+
requestedOperation: appleAuth.Operation.LOGIN,
|
|
12
|
+
requestedScopes: [appleAuth.Scope.EMAIL, appleAuth.Scope.FULL_NAME],
|
|
13
|
+
});
|
|
14
|
+
const { identityToken, nonce } = appleAuthRequestResponse;
|
|
15
|
+
if (!identityToken) {
|
|
16
|
+
throw new Error('Apple Sign-In failed - no identify token returned');
|
|
17
|
+
}
|
|
18
|
+
return auth.AppleAuthProvider.credential(identityToken, nonce);
|
|
19
|
+
}
|
|
20
|
+
else if (Platform.OS === 'android') {
|
|
21
|
+
const rawNonce = uuid();
|
|
22
|
+
const state = uuid();
|
|
23
|
+
try {
|
|
24
|
+
appleAuthAndroid.configure({
|
|
25
|
+
clientId: 'com.simpleaiglobal.firebase.auth',
|
|
26
|
+
redirectUri: 'https://simpleai-eb83b.firebaseapp.com/__/auth/handler',
|
|
27
|
+
scope: appleAuthAndroid.Scope.ALL,
|
|
28
|
+
responseType: appleAuthAndroid.ResponseType.ALL,
|
|
29
|
+
nonce: rawNonce,
|
|
30
|
+
state,
|
|
31
|
+
});
|
|
32
|
+
const response = await appleAuthAndroid.signIn();
|
|
33
|
+
if (response && response.id_token) {
|
|
34
|
+
return auth.AppleAuthProvider.credential(response.id_token, rawNonce);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throw new Error('Apple Sign-In failed - no id token returned');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
if (error instanceof Error && error.message) {
|
|
42
|
+
switch (error.message) {
|
|
43
|
+
case appleAuthAndroid.Error.NOT_CONFIGURED:
|
|
44
|
+
throw new Error('Apple Sign-In not configured');
|
|
45
|
+
case appleAuthAndroid.Error.SIGNIN_FAILED:
|
|
46
|
+
throw new Error('Apple Sign-In failed');
|
|
47
|
+
case appleAuthAndroid.Error.SIGNIN_CANCELLED:
|
|
48
|
+
throw new Error('Apple Sign-In cancelled');
|
|
49
|
+
default:
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
};
|
|
58
|
+
export const signIn = async () => {
|
|
59
|
+
try {
|
|
60
|
+
const credential = await getAppleSignInCredential();
|
|
61
|
+
if (credential) {
|
|
62
|
+
await auth().signInWithCredential(credential);
|
|
63
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
throw new Error('Failed to get Apple Sign-In credential');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export const linkAccount = async () => {
|
|
75
|
+
try {
|
|
76
|
+
const credential = await getAppleSignInCredential();
|
|
77
|
+
if (credential) {
|
|
78
|
+
await auth().currentUser?.linkWithCredential(credential);
|
|
79
|
+
await auth().currentUser?.reload();
|
|
80
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
throw new Error('Failed to get Apple Sign-In credential');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (e) {
|
|
87
|
+
console.error(e);
|
|
88
|
+
throw e;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LinkAccountParams, SignInParams } from '../types';
|
|
2
|
+
export declare const signIn: ({ email, password, }: SignInParams & {
|
|
3
|
+
type: "email";
|
|
4
|
+
}) => Promise<void>;
|
|
5
|
+
export declare const signUp: ({ email, password, }: SignInParams & {
|
|
6
|
+
type: "email";
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare const linkAccount: ({ email, password, }: LinkAccountParams & {
|
|
9
|
+
type: "email";
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/email.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhE,eAAO,MAAM,MAAM,yBAGhB,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,kBAOlC,CAAC;AAEF,eAAO,MAAM,MAAM,yBAGhB,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,kBAQlC,CAAC;AAEF,eAAO,MAAM,WAAW,yBAGrB,iBAAiB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,kBASvC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FirebaseError } from '@firebase/util';
|
|
2
|
+
import auth from '@react-native-firebase/auth';
|
|
3
|
+
import { HapticFeedback, HapticFeedbackTypes, TextFormat, Toast, } from '../../utils';
|
|
4
|
+
export const signIn = async ({ email, password, }) => {
|
|
5
|
+
try {
|
|
6
|
+
await auth().signInWithEmailAndPassword(email, password);
|
|
7
|
+
}
|
|
8
|
+
catch (e) {
|
|
9
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
10
|
+
throw e;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export const signUp = async ({ email, password, }) => {
|
|
14
|
+
try {
|
|
15
|
+
await auth().createUserWithEmailAndPassword(email, password);
|
|
16
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
20
|
+
throw e;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export const linkAccount = async ({ email, password, }) => {
|
|
24
|
+
try {
|
|
25
|
+
await auth().currentUser?.updateEmail(email);
|
|
26
|
+
await auth().currentUser?.updatePassword(password);
|
|
27
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
31
|
+
throw e;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facebook.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/facebook.ts"],"names":[],"mappings":"AAMA,OAAO,gCAAgC,CAAC;AAqDxC,eAAO,MAAM,MAAM,qBAUlB,CAAC;AAEF,eAAO,MAAM,WAAW,qBAUvB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { FirebaseError } from '@firebase/util';
|
|
2
|
+
import auth from '@react-native-firebase/auth';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { LoginManager, AccessToken, AuthenticationToken } from 'react-native-fbsdk-next';
|
|
5
|
+
// eslint-disable-next-line import/namespace
|
|
6
|
+
import { sha256 } from 'react-native-sha256';
|
|
7
|
+
import 'react-native-get-random-values';
|
|
8
|
+
import { v4 as uuid } from 'uuid';
|
|
9
|
+
import { HapticFeedback, HapticFeedbackTypes, TextFormat, Toast, } from '../../utils';
|
|
10
|
+
const getFacebookSignInCredential = async () => {
|
|
11
|
+
if (Platform.OS === 'android') {
|
|
12
|
+
const result = await LoginManager.logInWithPermissions(['public_profile', 'email']);
|
|
13
|
+
if (result.isCancelled) {
|
|
14
|
+
throw new Error('User cancelled the login process');
|
|
15
|
+
}
|
|
16
|
+
const data = await AccessToken.getCurrentAccessToken();
|
|
17
|
+
if (!data) {
|
|
18
|
+
throw new Error('Something went wrong obtaining the access token');
|
|
19
|
+
}
|
|
20
|
+
return auth.FacebookAuthProvider.credential(data.accessToken);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const nonce = uuid();
|
|
24
|
+
const nonceSha256 = await sha256(nonce);
|
|
25
|
+
const result = await LoginManager.logInWithPermissions(['public_profile', 'email'], 'limited', nonceSha256);
|
|
26
|
+
if (result.isCancelled) {
|
|
27
|
+
throw 'User cancelled the login process';
|
|
28
|
+
}
|
|
29
|
+
const data = await AuthenticationToken.getAuthenticationTokenIOS();
|
|
30
|
+
if (!data) {
|
|
31
|
+
throw 'Something went wrong obtaining authentication token';
|
|
32
|
+
}
|
|
33
|
+
return auth.FacebookAuthProvider.credential(data.authenticationToken, nonce);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const signIn = async () => {
|
|
37
|
+
try {
|
|
38
|
+
const credential = await getFacebookSignInCredential();
|
|
39
|
+
console.log('signInWithCredential', credential);
|
|
40
|
+
await auth().signInWithCredential(credential);
|
|
41
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
45
|
+
throw e;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export const linkAccount = async () => {
|
|
49
|
+
try {
|
|
50
|
+
const credential = await getFacebookSignInCredential();
|
|
51
|
+
await auth().currentUser?.linkWithCredential(credential);
|
|
52
|
+
await auth().currentUser?.reload();
|
|
53
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
console.error(e);
|
|
57
|
+
throw e;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/google.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,MAAM,qBASlB,CAAC;AAEF,eAAO,MAAM,WAAW,qBAUvB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FirebaseError } from '@firebase/util';
|
|
2
|
+
import auth from '@react-native-firebase/auth';
|
|
3
|
+
import { GoogleSignin } from '@react-native-google-signin/google-signin';
|
|
4
|
+
import { HapticFeedback, HapticFeedbackTypes, TextFormat, Toast, } from '../../utils';
|
|
5
|
+
const getGoogleSignInCredential = async () => {
|
|
6
|
+
await GoogleSignin.hasPlayServices();
|
|
7
|
+
await GoogleSignin.signIn();
|
|
8
|
+
const { accessToken, idToken } = await GoogleSignin.getTokens();
|
|
9
|
+
return auth.GoogleAuthProvider.credential(idToken, accessToken);
|
|
10
|
+
};
|
|
11
|
+
export const signIn = async () => {
|
|
12
|
+
try {
|
|
13
|
+
const credential = await getGoogleSignInCredential();
|
|
14
|
+
await auth().signInWithCredential(credential);
|
|
15
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
Toast.error(TextFormat.formatFirebaseErrorMessage(e));
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const linkAccount = async () => {
|
|
23
|
+
try {
|
|
24
|
+
const credential = await getGoogleSignInCredential();
|
|
25
|
+
await auth().currentUser?.linkWithCredential(credential);
|
|
26
|
+
await auth().currentUser?.reload();
|
|
27
|
+
HapticFeedback.trigger(HapticFeedbackTypes.notificationSuccess);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
console.error(e);
|
|
31
|
+
throw e;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LinkAccountParams, SignInParams } from '../types';
|
|
2
|
+
export declare const signIn: (params: SignInParams) => Promise<void>;
|
|
3
|
+
export declare const signUp: ({ email, password, }: SignInParams & {
|
|
4
|
+
type: "email";
|
|
5
|
+
}) => Promise<void>;
|
|
6
|
+
export declare const linkAccount: (params: LinkAccountParams) => Promise<void>;
|
|
7
|
+
export declare const signOut: () => Promise<void>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/utils/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOhE,eAAO,MAAM,MAAM,WAAkB,YAAY,kBAahD,CAAC;AAEF,eAAO,MAAM,MAAM;;mBAAmB,CAAC;AAEvC,eAAO,MAAM,WAAW,WAAkB,iBAAiB,kBAa1D,CAAC;AAEF,eAAO,MAAM,OAAO,qBAmBnB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import auth from '@react-native-firebase/auth';
|
|
2
|
+
import { GoogleSignin } from '@react-native-google-signin/google-signin';
|
|
3
|
+
import * as AppleAuth from './apple';
|
|
4
|
+
import * as EmailAuth from './email';
|
|
5
|
+
import * as FacebookAuth from './facebook';
|
|
6
|
+
import * as GoogleAuth from './google';
|
|
7
|
+
export const signIn = async (params) => {
|
|
8
|
+
switch (params.type) {
|
|
9
|
+
case 'google':
|
|
10
|
+
return GoogleAuth.signIn();
|
|
11
|
+
case 'email':
|
|
12
|
+
return EmailAuth.signIn(params);
|
|
13
|
+
case 'facebook':
|
|
14
|
+
return FacebookAuth.signIn();
|
|
15
|
+
case 'apple':
|
|
16
|
+
return AppleAuth.signIn();
|
|
17
|
+
default:
|
|
18
|
+
throw new Error('Invalid sign in type');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const signUp = EmailAuth.signUp;
|
|
22
|
+
export const linkAccount = async (params) => {
|
|
23
|
+
switch (params.type) {
|
|
24
|
+
case 'google':
|
|
25
|
+
return GoogleAuth.linkAccount();
|
|
26
|
+
case 'email':
|
|
27
|
+
return EmailAuth.linkAccount(params);
|
|
28
|
+
case 'facebook':
|
|
29
|
+
return FacebookAuth.linkAccount();
|
|
30
|
+
case 'apple':
|
|
31
|
+
return AppleAuth.linkAccount();
|
|
32
|
+
default:
|
|
33
|
+
throw new Error('Invalid sign in type');
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const signOut = async () => {
|
|
37
|
+
try {
|
|
38
|
+
auth().currentUser?.providerData.forEach(provider => {
|
|
39
|
+
if (provider.providerId === 'google.com') {
|
|
40
|
+
return GoogleSignin.signOut();
|
|
41
|
+
}
|
|
42
|
+
if (provider.providerId === 'facebook.com') {
|
|
43
|
+
//return FacebookAuth.signOut();
|
|
44
|
+
}
|
|
45
|
+
if (provider.providerId === 'apple.com') {
|
|
46
|
+
// no needs for signing out for Apple provider
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
49
|
+
});
|
|
50
|
+
await auth().signOut();
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
console.error(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandArt.d.ts","sourceRoot":"","sources":["../../../src/components/Art/BrandArt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,kBAAmB,aAAa,4CAEpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmojiArt.d.ts","sourceRoot":"","sources":["../../../src/components/Art/EmojiArt.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgB7C,eAAO,MAAM,QAAQ,uDAMlB,aAAa,4CA+Bf,CAAC"}
|