@bigbinary/neeto-commons-rn 1.8.4 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -0
- package/eslint-config/index.js +366 -0
- package/eslint-config/rules/no-dangling-constants.js +35 -0
- package/eslint-config/rules/no-redundant-string-templates.js +85 -0
- package/lib/typescript/api/app_version.d.ts +10 -0
- package/lib/typescript/api/app_version.d.ts.map +1 -0
- package/lib/typescript/api/auth.d.ts +26 -0
- package/lib/typescript/api/auth.d.ts.map +1 -0
- package/lib/typescript/api/global_roles.d.ts +10 -0
- package/lib/typescript/api/global_roles.d.ts.map +1 -0
- package/lib/typescript/api/notifications.d.ts +38 -0
- package/lib/typescript/api/notifications.d.ts.map +1 -0
- package/lib/typescript/api/organization_roles.d.ts +11 -0
- package/lib/typescript/api/organization_roles.d.ts.map +1 -0
- package/lib/typescript/api/profile.d.ts +15 -0
- package/lib/typescript/api/profile.d.ts.map +1 -0
- package/lib/typescript/api/team_members.d.ts +34 -0
- package/lib/typescript/api/team_members.d.ts.map +1 -0
- package/lib/typescript/auth/index.d.ts +3 -0
- package/lib/typescript/auth/index.d.ts.map +1 -0
- package/lib/typescript/components/AppVersion.d.ts +2 -0
- package/lib/typescript/components/AppVersion.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet.d.ts +9 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheetMenu.d.ts +7 -0
- package/lib/typescript/components/BottomSheetMenu.d.ts.map +1 -0
- package/lib/typescript/components/ConfirmSheet.d.ts +15 -0
- package/lib/typescript/components/ConfirmSheet.d.ts.map +1 -0
- package/lib/typescript/components/EmptyView.d.ts +19 -0
- package/lib/typescript/components/EmptyView.d.ts.map +1 -0
- package/lib/typescript/components/Header/BaseHeader.d.ts +7 -0
- package/lib/typescript/components/Header/BaseHeader.d.ts.map +1 -0
- package/lib/typescript/components/Header/ScreenHeader.d.ts +7 -0
- package/lib/typescript/components/Header/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/components/Header.d.ts +22 -0
- package/lib/typescript/components/Header.d.ts.map +1 -0
- package/lib/typescript/components/HyperlinkText.d.ts +17 -0
- package/lib/typescript/components/HyperlinkText.d.ts.map +1 -0
- package/lib/typescript/components/LineLoader.d.ts +13 -0
- package/lib/typescript/components/LineLoader.d.ts.map +1 -0
- package/lib/typescript/components/NotificationIcon.d.ts +6 -0
- package/lib/typescript/components/NotificationIcon.d.ts.map +1 -0
- package/lib/typescript/components/NotificationPreferenceList.d.ts +14 -0
- package/lib/typescript/components/NotificationPreferenceList.d.ts.map +1 -0
- package/lib/typescript/components/OfflineScreen.d.ts +7 -0
- package/lib/typescript/components/OfflineScreen.d.ts.map +1 -0
- package/lib/typescript/components/OrganizationItem.d.ts +8 -0
- package/lib/typescript/components/OrganizationItem.d.ts.map +1 -0
- package/lib/typescript/components/SocialButton.d.ts +11 -0
- package/lib/typescript/components/SocialButton.d.ts.map +1 -0
- package/lib/typescript/components/TextWithUrl.d.ts +7 -0
- package/lib/typescript/components/TextWithUrl.d.ts.map +1 -0
- package/lib/typescript/components/ToggleSwitch.d.ts +8 -0
- package/lib/typescript/components/ToggleSwitch.d.ts.map +1 -0
- package/lib/typescript/components/WorkspaceSwitcherPane.d.ts +9 -0
- package/lib/typescript/components/WorkspaceSwitcherPane.d.ts.map +1 -0
- package/lib/typescript/components/constants.d.ts +7 -0
- package/lib/typescript/components/constants.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +14 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/config/axios/caseConversion.d.ts +4 -0
- package/lib/typescript/config/axios/caseConversion.d.ts.map +1 -0
- package/lib/typescript/config/axios/constants.d.ts +4 -0
- package/lib/typescript/config/axios/constants.d.ts.map +1 -0
- package/lib/typescript/config/axios/index.d.ts +13 -0
- package/lib/typescript/config/axios/index.d.ts.map +1 -0
- package/lib/typescript/config/axios/networkErrorHandler.d.ts +5 -0
- package/lib/typescript/config/axios/networkErrorHandler.d.ts.map +1 -0
- package/lib/typescript/config/axios/paramsSerializer.d.ts +3 -0
- package/lib/typescript/config/axios/paramsSerializer.d.ts.map +1 -0
- package/lib/typescript/config/axios/types.d.ts +10 -0
- package/lib/typescript/config/axios/types.d.ts.map +1 -0
- package/lib/typescript/config/bugsnag.d.ts +4 -0
- package/lib/typescript/config/bugsnag.d.ts.map +1 -0
- package/lib/typescript/config/dayjs.d.ts +23 -0
- package/lib/typescript/config/dayjs.d.ts.map +1 -0
- package/lib/typescript/config/googleSignin.d.ts +2 -0
- package/lib/typescript/config/googleSignin.d.ts.map +1 -0
- package/lib/typescript/config/index.d.ts +2 -0
- package/lib/typescript/config/index.d.ts.map +1 -0
- package/lib/typescript/config/validations.d.ts +2 -0
- package/lib/typescript/config/validations.d.ts.map +1 -0
- package/lib/typescript/constants/index.d.ts +8 -0
- package/lib/typescript/constants/index.d.ts.map +1 -0
- package/lib/typescript/contexts/index.d.ts +2 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -0
- package/lib/typescript/contexts/localization.d.ts +26 -0
- package/lib/typescript/contexts/localization.d.ts.map +1 -0
- package/lib/typescript/helpers/asyncStore.d.ts +6 -0
- package/lib/typescript/helpers/asyncStore.d.ts.map +1 -0
- package/lib/typescript/helpers/index.d.ts +2 -0
- package/lib/typescript/helpers/index.d.ts.map +1 -0
- package/lib/typescript/helpers/keychain.d.ts +4 -0
- package/lib/typescript/helpers/keychain.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/apnsToken.d.ts +2 -0
- package/lib/typescript/helpers/notifications/apnsToken.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/constants.d.ts +5 -0
- package/lib/typescript/helpers/notifications/constants.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/getDeviceToken.d.ts +2 -0
- package/lib/typescript/helpers/notifications/getDeviceToken.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/index.d.ts +4 -0
- package/lib/typescript/helpers/notifications/index.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/registerBackgroundHandlers.d.ts +3 -0
- package/lib/typescript/helpers/notifications/registerBackgroundHandlers.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/types.d.ts +19 -0
- package/lib/typescript/helpers/notifications/types.d.ts.map +1 -0
- package/lib/typescript/helpers/notifications/usePushNotification.d.ts +7 -0
- package/lib/typescript/helpers/notifications/usePushNotification.d.ts.map +1 -0
- package/lib/typescript/helpers/scale.d.ts +2 -0
- package/lib/typescript/helpers/scale.d.ts.map +1 -0
- package/lib/typescript/helpers/utils.d.ts +5 -0
- package/lib/typescript/helpers/utils.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +3 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/query/queryKeys.d.ts +9 -0
- package/lib/typescript/hooks/query/queryKeys.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useAppVersionApi.d.ts +2 -0
- package/lib/typescript/hooks/query/useAppVersionApi.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useAuth.d.ts +27 -0
- package/lib/typescript/hooks/query/useAuth.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useNotification.d.ts +19 -0
- package/lib/typescript/hooks/query/useNotification.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useProfile.d.ts +9 -0
- package/lib/typescript/hooks/query/useProfile.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useRolesApi.d.ts +4 -0
- package/lib/typescript/hooks/query/useRolesApi.d.ts.map +1 -0
- package/lib/typescript/hooks/query/useTeamMembersApi.d.ts +23 -0
- package/lib/typescript/hooks/query/useTeamMembersApi.d.ts.map +1 -0
- package/lib/typescript/hooks/useAppState.d.ts +2 -0
- package/lib/typescript/hooks/useAppState.d.ts.map +1 -0
- package/lib/typescript/hooks/usePushNotificationPermissions.d.ts +2 -0
- package/lib/typescript/hooks/usePushNotificationPermissions.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/initializers/index.d.ts +3 -0
- package/lib/typescript/initializers/index.d.ts.map +1 -0
- package/lib/typescript/initializers/logRocket.d.ts +2 -0
- package/lib/typescript/initializers/logRocket.d.ts.map +1 -0
- package/lib/typescript/localization/i18n.d.ts +4 -0
- package/lib/typescript/localization/i18n.d.ts.map +1 -0
- package/lib/typescript/localization/index.d.ts +7 -0
- package/lib/typescript/localization/index.d.ts.map +1 -0
- package/lib/typescript/navigation/navigationService.d.ts +14 -0
- package/lib/typescript/navigation/navigationService.d.ts.map +1 -0
- package/lib/typescript/navigation/screenNames.d.ts +10 -0
- package/lib/typescript/navigation/screenNames.d.ts.map +1 -0
- package/lib/typescript/navigation/stacks.d.ts +3 -0
- package/lib/typescript/navigation/stacks.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +24 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/providers/NeetoCommonsRNProvider.d.ts +14 -0
- package/lib/typescript/providers/NeetoCommonsRNProvider.d.ts.map +1 -0
- package/lib/typescript/providers/index.d.ts +2 -0
- package/lib/typescript/providers/index.d.ts.map +1 -0
- package/lib/typescript/screens/NotificationsScreen.d.ts +11 -0
- package/lib/typescript/screens/NotificationsScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/AuthOptions.d.ts +7 -0
- package/lib/typescript/screens/authentication/AuthOptions.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/IncompleteOnboardingInfo.d.ts +4 -0
- package/lib/typescript/screens/authentication/IncompleteOnboardingInfo.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/LoginScreen.d.ts +3 -0
- package/lib/typescript/screens/authentication/LoginScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/OTPVerificationScreen.d.ts +4 -0
- package/lib/typescript/screens/authentication/OTPVerificationScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/Organization.d.ts +11 -0
- package/lib/typescript/screens/authentication/Organization.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/SubDomainScreen.d.ts +4 -0
- package/lib/typescript/screens/authentication/SubDomainScreen.d.ts.map +1 -0
- package/lib/typescript/screens/authentication/constants.d.ts +17 -0
- package/lib/typescript/screens/authentication/constants.d.ts.map +1 -0
- package/lib/typescript/screens/index.d.ts +11 -0
- package/lib/typescript/screens/index.d.ts.map +1 -0
- package/lib/typescript/screens/profile/ChatWidget.d.ts +3 -0
- package/lib/typescript/screens/profile/ChatWidget.d.ts.map +1 -0
- package/lib/typescript/screens/profile/ProfileScreen.d.ts +12 -0
- package/lib/typescript/screens/profile/ProfileScreen.d.ts.map +1 -0
- package/lib/typescript/screens/profile/UserData.d.ts +21 -0
- package/lib/typescript/screens/profile/UserData.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Add.d.ts +4 -0
- package/lib/typescript/screens/team_members/Add.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Card.d.ts +9 -0
- package/lib/typescript/screens/team_members/Card.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Checkbox.d.ts +11 -0
- package/lib/typescript/screens/team_members/Checkbox.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Edit.d.ts +5 -0
- package/lib/typescript/screens/team_members/Edit.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/Email.d.ts +11 -0
- package/lib/typescript/screens/team_members/Email.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/LoadingCard.d.ts +6 -0
- package/lib/typescript/screens/team_members/LoadingCard.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/ProductSelect.d.ts +11 -0
- package/lib/typescript/screens/team_members/ProductSelect.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/RolesRadioGroup.d.ts +14 -0
- package/lib/typescript/screens/team_members/RolesRadioGroup.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/SaveButtons.d.ts +10 -0
- package/lib/typescript/screens/team_members/SaveButtons.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/constants.d.ts +16 -0
- package/lib/typescript/screens/team_members/constants.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/index.d.ts +16 -0
- package/lib/typescript/screens/team_members/index.d.ts.map +1 -0
- package/lib/typescript/screens/team_members/utils.d.ts +20 -0
- package/lib/typescript/screens/team_members/utils.d.ts.map +1 -0
- package/lib/typescript/slices/auth.d.ts +31 -0
- package/lib/typescript/slices/auth.d.ts.map +1 -0
- package/lib/typescript/slices/index.d.ts +6 -0
- package/lib/typescript/slices/index.d.ts.map +1 -0
- package/lib/typescript/store/hooks.d.ts +6 -0
- package/lib/typescript/store/hooks.d.ts.map +1 -0
- package/lib/typescript/store/index.d.ts +18 -0
- package/lib/typescript/store/index.d.ts.map +1 -0
- package/lib/typescript/store/utils.d.ts +8 -0
- package/lib/typescript/store/utils.d.ts.map +1 -0
- package/lib/typescript/utils/apiHelpers.d.ts +5 -0
- package/lib/typescript/utils/apiHelpers.d.ts.map +1 -0
- package/package.json +267 -71
- package/src/api/app_version.ts +24 -0
- package/src/api/auth.ts +68 -0
- package/src/api/global_roles.ts +15 -0
- package/src/api/notifications.ts +66 -0
- package/src/api/organization_roles.ts +17 -0
- package/src/api/profile.ts +17 -0
- package/src/api/team_members.ts +39 -0
- package/src/assets/images/apple-logo.svg +3 -0
- package/src/assets/images/google-logo.svg +6 -0
- package/src/auth/index.ts +2 -0
- package/src/components/AppVersion.ts +154 -0
- package/src/components/BottomSheet.ts +9 -0
- package/src/components/BottomSheetMenu.ts +6 -0
- package/src/components/ConfirmSheet.ts +15 -0
- package/src/components/EmptyView.tsx +40 -0
- package/src/components/Header/BaseHeader.ts +6 -0
- package/src/components/Header/ScreenHeader.ts +6 -0
- package/src/components/Header.tsx +139 -0
- package/src/components/HyperlinkText.tsx +34 -0
- package/src/components/LineLoader.tsx +23 -0
- package/src/components/NotificationIcon.tsx +53 -0
- package/src/components/NotificationPreferenceList.tsx +132 -0
- package/src/components/OfflineScreen.tsx +89 -0
- package/src/components/OrganizationItem.tsx +67 -0
- package/src/components/SocialButton.tsx +78 -0
- package/src/components/TextWithUrl.ts +6 -0
- package/src/components/ToggleSwitch.tsx +89 -0
- package/src/components/WorkspaceSwitcherPane.tsx +113 -0
- package/src/components/constants.ts +16 -0
- package/src/components/index.ts +13 -0
- package/src/config/axios/caseConversion.ts +60 -0
- package/src/config/axios/constants.ts +17 -0
- package/src/config/axios/index.ts +291 -0
- package/src/config/axios/networkErrorHandler.ts +47 -0
- package/src/config/axios/paramsSerializer.ts +9 -0
- package/src/config/axios/types.ts +13 -0
- package/src/config/bugsnag.ts +48 -0
- package/src/config/dayjs.ts +42 -0
- package/src/config/googleSignin.ts +36 -0
- package/src/config/index.ts +11 -0
- package/src/config/validations.ts +15 -0
- package/src/constants/index.ts +9 -0
- package/src/contexts/index.ts +4 -0
- package/src/contexts/localization.tsx +183 -0
- package/src/helpers/asyncStore.ts +39 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/keychain.ts +46 -0
- package/src/helpers/notifications/apnsToken.ts +69 -0
- package/src/helpers/notifications/constants.ts +34 -0
- package/src/helpers/notifications/getDeviceToken.ts +17 -0
- package/src/helpers/notifications/index.ts +3 -0
- package/src/helpers/notifications/registerBackgroundHandlers.ts +62 -0
- package/src/helpers/notifications/types.ts +27 -0
- package/src/helpers/notifications/usePushNotification.ts +208 -0
- package/src/helpers/scale.ts +4 -0
- package/src/helpers/utils.ts +68 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/query/queryKeys.ts +8 -0
- package/src/hooks/query/useAppVersionApi.ts +12 -0
- package/src/hooks/query/useAuth.ts +253 -0
- package/src/hooks/query/useNotification.ts +130 -0
- package/src/hooks/query/useProfile.ts +21 -0
- package/src/hooks/query/useRolesApi.ts +25 -0
- package/src/hooks/query/useTeamMembersApi.ts +109 -0
- package/src/hooks/useAppState.ts +16 -0
- package/src/hooks/usePushNotificationPermissions.ts +111 -0
- package/src/index.ts +8 -0
- package/src/initializers/index.ts +3 -0
- package/src/initializers/logRocket.ts +25 -0
- package/src/localization/i18n.ts +19 -0
- package/src/localization/index.ts +14 -0
- package/src/navigation/navigationService.ts +37 -0
- package/src/navigation/screenNames.ts +11 -0
- package/src/navigation/stacks.tsx +30 -0
- package/src/navigation/types.ts +19 -0
- package/src/providers/NeetoCommonsRNProvider.tsx +77 -0
- package/src/providers/index.ts +1 -0
- package/src/screens/NotificationsScreen.tsx +290 -0
- package/src/screens/authentication/AuthOptions.tsx +254 -0
- package/src/screens/authentication/IncompleteOnboardingInfo.tsx +110 -0
- package/src/screens/authentication/LoginScreen.tsx +170 -0
- package/src/screens/authentication/OTPVerificationScreen.tsx +235 -0
- package/src/screens/authentication/Organization.tsx +102 -0
- package/src/screens/authentication/SubDomainScreen.tsx +176 -0
- package/src/screens/authentication/constants.ts +30 -0
- package/src/screens/index.ts +10 -0
- package/src/screens/profile/ChatWidget.tsx +8 -0
- package/src/screens/profile/ProfileScreen.tsx +251 -0
- package/src/screens/profile/UserData.tsx +92 -0
- package/src/screens/team_members/Add.tsx +248 -0
- package/src/screens/team_members/Card.tsx +124 -0
- package/src/screens/team_members/Checkbox.tsx +88 -0
- package/src/screens/team_members/Edit.tsx +171 -0
- package/src/screens/team_members/Email.tsx +59 -0
- package/src/screens/team_members/LoadingCard.tsx +75 -0
- package/src/screens/team_members/ProductSelect.tsx +218 -0
- package/src/screens/team_members/RolesRadioGroup.tsx +135 -0
- package/src/screens/team_members/SaveButtons.tsx +62 -0
- package/src/screens/team_members/constants.ts +33 -0
- package/src/screens/team_members/index.tsx +223 -0
- package/src/screens/team_members/utils.ts +84 -0
- package/src/slices/auth.ts +86 -0
- package/src/slices/index.ts +7 -0
- package/src/store/hooks.ts +8 -0
- package/src/store/index.ts +47 -0
- package/src/store/utils.ts +36 -0
- package/src/utils/apiHelpers.ts +7 -0
- package/types/assets.d.ts +38 -0
- package/types/neeto-icons-rn.d.ts +548 -0
- package/api/app_version.js +0 -1
- package/api/auth.js +0 -1
- package/api/global_roles.js +0 -1
- package/api/notifications.js +0 -1
- package/api/organization_roles.js +0 -1
- package/api/profile.js +0 -1
- package/api/team_members.js +0 -1
- package/auth/index.d.ts +0 -9
- package/auth/index.js +0 -1
- package/components/AppVersion.js +0 -1
- package/components/BottomSheet.js +0 -1
- package/components/BottomSheetMenu.js +0 -1
- package/components/ConfirmSheet.js +0 -1
- package/components/EmptyView.js +0 -1
- package/components/Header/BaseHeader.js +0 -1
- package/components/Header/ScreenHeader.js +0 -1
- package/components/Header.js +0 -1
- package/components/HyperlinkText.js +0 -1
- package/components/LineLoader.js +0 -1
- package/components/NotificationIcon.js +0 -1
- package/components/OfflineScreen.js +0 -1
- package/components/TextWithUrl.js +0 -1
- package/components/WorkspaceSwitcherPane.js +0 -1
- package/components/constants.js +0 -1
- package/components/index.js +0 -1
- package/config/axios/caseConversion.js +0 -1
- package/config/axios/constants.js +0 -1
- package/config/axios/index.js +0 -1
- package/config/axios/networkErrorHandler.js +0 -1
- package/config/axios/paramsSerializer.js +0 -1
- package/config/bugsnag.js +0 -1
- package/config/dayjs.js +0 -1
- package/config/googleSignin.js +0 -1
- package/config/index.js +0 -1
- package/config/validations.js +0 -1
- package/constants/index.d.ts +0 -5
- package/constants/index.js +0 -1
- package/contexts/index.js +0 -0
- package/contexts/localization.js +0 -1
- package/helpers/asyncStore.js +0 -1
- package/helpers/index.d.ts +0 -13
- package/helpers/index.js +0 -1
- package/helpers/keychain.d.ts +0 -4
- package/helpers/keychain.js +0 -1
- package/helpers/notifications/index.d.ts +0 -8
- package/helpers/notifications/index.js +0 -1
- package/helpers/notifications/usePushNotification.js +0 -1
- package/helpers/scale.js +0 -1
- package/helpers/utils.js +0 -1
- package/hooks/index.d.ts +0 -11
- package/hooks/index.js +0 -1
- package/hooks/query/constants.js +0 -1
- package/hooks/query/queryKeys.js +0 -1
- package/hooks/query/useAppVersionApi.js +0 -1
- package/hooks/query/useAuth.js +0 -1
- package/hooks/query/useNotification.js +0 -1
- package/hooks/query/useProfile.js +0 -1
- package/hooks/query/useRolesApi.js +0 -1
- package/hooks/query/useTeamMembersApi.js +0 -1
- package/hooks/useAppState.js +0 -1
- package/hooks/usePushNotificationPermissions.js +0 -1
- package/initializers/index.js +0 -1
- package/initializers/logRocket.js +0 -1
- package/localization/index.js +0 -1
- package/localization/translations/it.json +0 -13
- package/navigation/navigationService.js +0 -1
- package/navigation/screenNames.js +0 -1
- package/navigation/stacks.js +0 -1
- package/providers/NeetoCommonsRNProvider.js +0 -1
- package/providers/index.d.ts +0 -16
- package/providers/index.js +0 -1
- package/screens/NotificationsScreen.js +0 -1
- package/screens/authentication/AuthOptions.js +0 -1
- package/screens/authentication/IncompleteOnboardingInfo.js +0 -1
- package/screens/authentication/LoginScreen.js +0 -1
- package/screens/authentication/OTPVerificationScreen.js +0 -1
- package/screens/authentication/Organization.js +0 -1
- package/screens/authentication/SubDomainScreen.js +0 -1
- package/screens/authentication/constants.js +0 -1
- package/screens/index.js +0 -1
- package/screens/profile/ChatWidget.js +0 -1
- package/screens/profile/ProfileScreen.js +0 -1
- package/screens/profile/UserData.js +0 -1
- package/screens/team_members/Add.js +0 -1
- package/screens/team_members/Card.js +0 -1
- package/screens/team_members/Checkbox.js +0 -1
- package/screens/team_members/Edit.js +0 -1
- package/screens/team_members/Email.js +0 -1
- package/screens/team_members/LoadingCard.js +0 -1
- package/screens/team_members/ProductSelect.js +0 -1
- package/screens/team_members/RolesRadioGroup.js +0 -1
- package/screens/team_members/SaveButtons.js +0 -1
- package/screens/team_members/constants.js +0 -1
- package/screens/team_members/index.js +0 -1
- package/screens/team_members/utils.js +0 -1
- package/slices/auth.js +0 -1
- package/slices/index.js +0 -1
- package/store/index.d.ts +0 -7
- package/store/index.js +0 -1
- package/store/utils.js +0 -1
- package/utils/apiHelpers.js +0 -1
- /package/{assets → src/assets}/images/empty.svg +0 -0
- /package/{assets → src/assets}/images/wifi.png +0 -0
- /package/{localization → src/localization}/translations/en.json +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback, useRef } from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
Container,
|
|
7
|
+
Input,
|
|
8
|
+
ParentView,
|
|
9
|
+
Toast,
|
|
10
|
+
Touchable,
|
|
11
|
+
Typography,
|
|
12
|
+
lightTheme,
|
|
13
|
+
} from "@bigbinary/neetoui-rn";
|
|
14
|
+
import { useFocusEffect } from "@react-navigation/native";
|
|
15
|
+
import Icon from "react-native-remix-icon";
|
|
16
|
+
|
|
17
|
+
import { useLocalization } from "../../contexts/localization";
|
|
18
|
+
import { useAuth } from "../../hooks/query/useAuth";
|
|
19
|
+
import { type CommonsScreenProps } from "../../navigation/types";
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @bigbinary/neeto/no-dangling-constants
|
|
22
|
+
const RESEND_TIMER = 30;
|
|
23
|
+
let interval: ReturnType<typeof setInterval> | null = null;
|
|
24
|
+
|
|
25
|
+
export const OTPVerificationScreen = ({
|
|
26
|
+
navigation,
|
|
27
|
+
route: { params },
|
|
28
|
+
}: CommonsScreenProps<"OTPVerification">) => {
|
|
29
|
+
const [code, setCode] = useState("");
|
|
30
|
+
const [resendTimer, setResendTimer] = useState(RESEND_TIMER);
|
|
31
|
+
const [startTimer, setStartTimer] = useState(false);
|
|
32
|
+
|
|
33
|
+
const isSubmittingRef = useRef(false);
|
|
34
|
+
|
|
35
|
+
const { email, userId } = params;
|
|
36
|
+
const { strings } = useLocalization();
|
|
37
|
+
const t = strings.commons.verificationScreen;
|
|
38
|
+
|
|
39
|
+
const { useVerifyOTPMutation, useGenerateOTPMutation } = useAuth();
|
|
40
|
+
const { mutate: mutateVerifyOTP, isPending: isVerifyingOTP } =
|
|
41
|
+
useVerifyOTPMutation();
|
|
42
|
+
|
|
43
|
+
const { mutateAsync: generateOTP, isPending: isGeneratingOTP } =
|
|
44
|
+
useGenerateOTPMutation();
|
|
45
|
+
|
|
46
|
+
const resendOTP = async () => {
|
|
47
|
+
try {
|
|
48
|
+
await generateOTP({ email, showCodeSentToast: true });
|
|
49
|
+
setResendTimer(RESEND_TIMER);
|
|
50
|
+
} catch {
|
|
51
|
+
// pass
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const onHandleTextChange = (otp: string) => {
|
|
56
|
+
setCode(otp);
|
|
57
|
+
if (otp.length === 6) verifyOTP(otp);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const verifyOTP = (code: string) => {
|
|
61
|
+
if (isVerifyingOTP || isSubmittingRef.current) return;
|
|
62
|
+
|
|
63
|
+
if (code.length !== 6) {
|
|
64
|
+
Toast.show({
|
|
65
|
+
type: "warning",
|
|
66
|
+
text2: t.OTPRequired,
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
isSubmittingRef.current = true;
|
|
70
|
+
mutateVerifyOTP(
|
|
71
|
+
{ code, userId },
|
|
72
|
+
{
|
|
73
|
+
onSettled: () => {
|
|
74
|
+
isSubmittingRef.current = false;
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (startTimer) {
|
|
83
|
+
interval = setInterval(() => {
|
|
84
|
+
setResendTimer(prev => {
|
|
85
|
+
if (prev === 1) {
|
|
86
|
+
clearInterval(interval as ReturnType<typeof setInterval>);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return prev - 1;
|
|
90
|
+
});
|
|
91
|
+
}, 1000);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// `interval` is null until the first tick is scheduled; clearing a null
|
|
95
|
+
// handle has always been the no-op it is today.
|
|
96
|
+
return () => clearInterval(interval as ReturnType<typeof setInterval>);
|
|
97
|
+
}, [startTimer]);
|
|
98
|
+
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
if (resendTimer === RESEND_TIMER) {
|
|
101
|
+
setStartTimer(true);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (resendTimer === 0) {
|
|
105
|
+
setStartTimer(false);
|
|
106
|
+
}
|
|
107
|
+
}, [resendTimer]);
|
|
108
|
+
|
|
109
|
+
useFocusEffect(
|
|
110
|
+
useCallback(() => {
|
|
111
|
+
setResendTimer(RESEND_TIMER);
|
|
112
|
+
}, [])
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<ParentView
|
|
117
|
+
backgroundColor={lightTheme.colors.white}
|
|
118
|
+
barStyle="dark-content"
|
|
119
|
+
style={styles.screen}
|
|
120
|
+
>
|
|
121
|
+
<Container style={styles.body}>
|
|
122
|
+
<Container style={styles.backRow}>
|
|
123
|
+
<Touchable
|
|
124
|
+
style={styles.backButton}
|
|
125
|
+
onPress={() => navigation?.goBack()}
|
|
126
|
+
>
|
|
127
|
+
<Icon
|
|
128
|
+
color={lightTheme.colors.palette.grey600}
|
|
129
|
+
name="arrow-left-s-line"
|
|
130
|
+
size={25}
|
|
131
|
+
/>
|
|
132
|
+
</Touchable>
|
|
133
|
+
</Container>
|
|
134
|
+
<Typography
|
|
135
|
+
color={lightTheme.colors.palette.grey800}
|
|
136
|
+
style={styles.heading}
|
|
137
|
+
variant="header"
|
|
138
|
+
weight="semibold"
|
|
139
|
+
>
|
|
140
|
+
{strings.commons.headers.otpVerification}
|
|
141
|
+
</Typography>
|
|
142
|
+
<Typography
|
|
143
|
+
color={lightTheme.colors.palette.grey700}
|
|
144
|
+
size="s"
|
|
145
|
+
style={styles.description}
|
|
146
|
+
weight="regular"
|
|
147
|
+
>
|
|
148
|
+
{t.codeDescription1}
|
|
149
|
+
<Typography weight="semibold">{email}</Typography>
|
|
150
|
+
{t.codeDescription2}
|
|
151
|
+
</Typography>
|
|
152
|
+
<Input
|
|
153
|
+
autoFocus
|
|
154
|
+
keyboardType="phone-pad"
|
|
155
|
+
label={t.enterLoginCode}
|
|
156
|
+
maxLength={6}
|
|
157
|
+
value={code}
|
|
158
|
+
onChangeText={onHandleTextChange}
|
|
159
|
+
/>
|
|
160
|
+
<Container style={styles.resendRow}>
|
|
161
|
+
{/*
|
|
162
|
+
v3's Button renders a spinner while loading and has no
|
|
163
|
+
`loadingText` slot, so `t.sendingOTP` no longer has a home.
|
|
164
|
+
*/}
|
|
165
|
+
<Button
|
|
166
|
+
disabled={Boolean(resendTimer)}
|
|
167
|
+
isLoading={isGeneratingOTP}
|
|
168
|
+
variant="text"
|
|
169
|
+
// `formatString` returns a plain string whenever every argument is
|
|
170
|
+
// one, which is the case here.
|
|
171
|
+
label={
|
|
172
|
+
strings.formatString(
|
|
173
|
+
t.resendCode,
|
|
174
|
+
resendTimer ? `(${resendTimer})` : ""
|
|
175
|
+
) as string
|
|
176
|
+
}
|
|
177
|
+
labelStyle={[
|
|
178
|
+
styles.resendLabel,
|
|
179
|
+
resendTimer ? styles.resendLabelWaiting : styles.resendLabelReady,
|
|
180
|
+
]}
|
|
181
|
+
onPress={resendOTP}
|
|
182
|
+
/>
|
|
183
|
+
</Container>
|
|
184
|
+
<Container>
|
|
185
|
+
<Button
|
|
186
|
+
disabled={code.length !== 6}
|
|
187
|
+
isLoading={isVerifyingOTP}
|
|
188
|
+
label={strings.commons.buttons.continue}
|
|
189
|
+
onPress={() => verifyOTP(code)}
|
|
190
|
+
/>
|
|
191
|
+
</Container>
|
|
192
|
+
</Container>
|
|
193
|
+
</ParentView>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const styles = StyleSheet.create({
|
|
198
|
+
screen: {
|
|
199
|
+
flex: 1,
|
|
200
|
+
},
|
|
201
|
+
body: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
marginHorizontal: 16,
|
|
204
|
+
},
|
|
205
|
+
backRow: {
|
|
206
|
+
justifyContent: "center",
|
|
207
|
+
height: 42,
|
|
208
|
+
marginBottom: 18,
|
|
209
|
+
},
|
|
210
|
+
backButton: {
|
|
211
|
+
marginLeft: -14,
|
|
212
|
+
padding: 2,
|
|
213
|
+
width: 42,
|
|
214
|
+
},
|
|
215
|
+
heading: {
|
|
216
|
+
marginBottom: 2,
|
|
217
|
+
},
|
|
218
|
+
description: {
|
|
219
|
+
marginBottom: 24,
|
|
220
|
+
},
|
|
221
|
+
resendRow: {
|
|
222
|
+
alignItems: "center",
|
|
223
|
+
marginVertical: 16,
|
|
224
|
+
},
|
|
225
|
+
resendLabel: {
|
|
226
|
+
fontFamily: lightTheme.fonts.regular,
|
|
227
|
+
fontSize: lightTheme.fontSizes.s,
|
|
228
|
+
},
|
|
229
|
+
resendLabelWaiting: {
|
|
230
|
+
color: lightTheme.colors.palette.grey600,
|
|
231
|
+
},
|
|
232
|
+
resendLabelReady: {
|
|
233
|
+
color: lightTheme.colors.text.primary,
|
|
234
|
+
},
|
|
235
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Avatar,
|
|
6
|
+
Container,
|
|
7
|
+
Touchable,
|
|
8
|
+
Typography,
|
|
9
|
+
lightTheme,
|
|
10
|
+
} from "@bigbinary/neetoui-rn";
|
|
11
|
+
import Icon from "react-native-remix-icon";
|
|
12
|
+
|
|
13
|
+
import { moderateScale } from "../../helpers/scale";
|
|
14
|
+
import { type Organization as OrganizationEntity } from "../../slices/auth";
|
|
15
|
+
|
|
16
|
+
export interface OrganizationProps {
|
|
17
|
+
organization: OrganizationEntity;
|
|
18
|
+
onOrganizationSelect: (args: { organization: OrganizationEntity }) => void;
|
|
19
|
+
isSidePane?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Organization = ({
|
|
23
|
+
organization,
|
|
24
|
+
onOrganizationSelect,
|
|
25
|
+
isSidePane = false,
|
|
26
|
+
}: OrganizationProps) => {
|
|
27
|
+
const { organization_name, subdomain } = organization;
|
|
28
|
+
|
|
29
|
+
const showOrganizationDetails = () => (
|
|
30
|
+
<Container style={styles.details}>
|
|
31
|
+
<Typography
|
|
32
|
+
color={lightTheme.colors.text.primary}
|
|
33
|
+
size="xl"
|
|
34
|
+
weight="regular"
|
|
35
|
+
>
|
|
36
|
+
{organization_name}
|
|
37
|
+
</Typography>
|
|
38
|
+
<Typography
|
|
39
|
+
color={lightTheme.colors.palette.grey600}
|
|
40
|
+
size="xs"
|
|
41
|
+
weight="regular"
|
|
42
|
+
>
|
|
43
|
+
{subdomain}
|
|
44
|
+
</Typography>
|
|
45
|
+
</Container>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<Touchable
|
|
50
|
+
style={styles.card}
|
|
51
|
+
onPress={() => onOrganizationSelect({ organization })}
|
|
52
|
+
>
|
|
53
|
+
{isSidePane ? (
|
|
54
|
+
<Container style={styles.sidePaneRow}>
|
|
55
|
+
<Container style={styles.avatar}>
|
|
56
|
+
<Avatar
|
|
57
|
+
imageUrl=""
|
|
58
|
+
name={organization_name ? organization_name.charAt(0) : ""}
|
|
59
|
+
variant="small"
|
|
60
|
+
/>
|
|
61
|
+
</Container>
|
|
62
|
+
{showOrganizationDetails()}
|
|
63
|
+
</Container>
|
|
64
|
+
) : (
|
|
65
|
+
showOrganizationDetails()
|
|
66
|
+
)}
|
|
67
|
+
<Icon
|
|
68
|
+
color={lightTheme.colors.primary}
|
|
69
|
+
name="arrow-right-s-line"
|
|
70
|
+
size={25}
|
|
71
|
+
/>
|
|
72
|
+
</Touchable>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
card: {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
justifyContent: "space-between",
|
|
81
|
+
// v2 passed the CSS `border={1}` shorthand, which React Native has no
|
|
82
|
+
// equivalent for; `borderWidth` is what it was reaching for alongside
|
|
83
|
+
// the borderColor/borderRadius below.
|
|
84
|
+
borderColor: lightTheme.colors.border.primary,
|
|
85
|
+
borderRadius: 8,
|
|
86
|
+
borderWidth: 1,
|
|
87
|
+
marginBottom: 18,
|
|
88
|
+
paddingHorizontal: 12,
|
|
89
|
+
paddingVertical: 10,
|
|
90
|
+
},
|
|
91
|
+
details: {
|
|
92
|
+
justifyContent: "center",
|
|
93
|
+
},
|
|
94
|
+
sidePaneRow: {
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
flexDirection: "row",
|
|
97
|
+
justifyContent: "space-between",
|
|
98
|
+
},
|
|
99
|
+
avatar: {
|
|
100
|
+
marginRight: moderateScale(4),
|
|
101
|
+
},
|
|
102
|
+
});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Container,
|
|
6
|
+
FlashList,
|
|
7
|
+
ParentView,
|
|
8
|
+
SearchBar,
|
|
9
|
+
Touchable,
|
|
10
|
+
Typography,
|
|
11
|
+
lightTheme,
|
|
12
|
+
} from "@bigbinary/neetoui-rn";
|
|
13
|
+
import Icon from "react-native-remix-icon";
|
|
14
|
+
|
|
15
|
+
import { Organization } from "./Organization";
|
|
16
|
+
|
|
17
|
+
import { LineLoader } from "../../components";
|
|
18
|
+
import { useLocalization } from "../../contexts/localization";
|
|
19
|
+
import { moderateScale } from "../../helpers/scale";
|
|
20
|
+
import { useAuth } from "../../hooks/query/useAuth";
|
|
21
|
+
import { type CommonsScreenProps } from "../../navigation/types";
|
|
22
|
+
import { type Organization as OrganizationEntity } from "../../slices/auth";
|
|
23
|
+
|
|
24
|
+
export const SubDomainScreen = ({
|
|
25
|
+
navigation,
|
|
26
|
+
route: {
|
|
27
|
+
params: { organizations },
|
|
28
|
+
},
|
|
29
|
+
}: CommonsScreenProps<"SubDomain">) => {
|
|
30
|
+
const { strings } = useLocalization();
|
|
31
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
32
|
+
const { useSelectOrganizationMutation } = useAuth();
|
|
33
|
+
const { mutate: selectOrganization, isPending: isSelectingOrganization } =
|
|
34
|
+
useSelectOrganizationMutation();
|
|
35
|
+
|
|
36
|
+
const onBackPress = useCallback(() => {
|
|
37
|
+
if (navigation.canGoBack()) {
|
|
38
|
+
navigation.goBack();
|
|
39
|
+
}
|
|
40
|
+
}, [navigation]);
|
|
41
|
+
|
|
42
|
+
const onOrganizationSelect = ({
|
|
43
|
+
organization,
|
|
44
|
+
}: {
|
|
45
|
+
organization: OrganizationEntity;
|
|
46
|
+
}) => {
|
|
47
|
+
selectOrganization({ organization });
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const searchTermLowerCase = searchTerm.toLowerCase().trim();
|
|
51
|
+
|
|
52
|
+
const filteredOrganizations = !searchTermLowerCase
|
|
53
|
+
? [...organizations]
|
|
54
|
+
: [...organizations].filter(
|
|
55
|
+
org =>
|
|
56
|
+
org.organization_name.toLowerCase().includes(searchTermLowerCase) ||
|
|
57
|
+
org.subdomain.toLowerCase().includes(searchTermLowerCase)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const renderHeader = () => (
|
|
61
|
+
<Container style={styles.header}>
|
|
62
|
+
<Typography
|
|
63
|
+
color={lightTheme.colors.palette.grey800}
|
|
64
|
+
style={styles.headerTitle}
|
|
65
|
+
variant="header"
|
|
66
|
+
weight="semibold"
|
|
67
|
+
>
|
|
68
|
+
{strings.commons.headers.subDomain}
|
|
69
|
+
</Typography>
|
|
70
|
+
<Container>
|
|
71
|
+
<Typography
|
|
72
|
+
color={lightTheme.colors.palette.grey600}
|
|
73
|
+
size="s"
|
|
74
|
+
style={styles.headerDescription}
|
|
75
|
+
weight="regular"
|
|
76
|
+
>
|
|
77
|
+
{strings.commons.subdomain.description1}
|
|
78
|
+
<Typography color={lightTheme.colors.text.primary} weight="bold">
|
|
79
|
+
{organizations[0].email}
|
|
80
|
+
</Typography>
|
|
81
|
+
{strings.commons.subdomain.description2}
|
|
82
|
+
</Typography>
|
|
83
|
+
{/*
|
|
84
|
+
v3's SearchBar owns its text; it has no `value` prop, so the screen
|
|
85
|
+
only mirrors it through onChangeText.
|
|
86
|
+
*/}
|
|
87
|
+
<SearchBar
|
|
88
|
+
// `formatString` returns a plain string whenever every argument is
|
|
89
|
+
// one, which is the case here.
|
|
90
|
+
placeholder={
|
|
91
|
+
strings.formatString(
|
|
92
|
+
strings.commons.placeholders.search,
|
|
93
|
+
strings.commons.labels.Workspaces.toLowerCase()
|
|
94
|
+
) as string
|
|
95
|
+
}
|
|
96
|
+
onChangeText={setSearchTerm}
|
|
97
|
+
/>
|
|
98
|
+
</Container>
|
|
99
|
+
</Container>
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<ParentView
|
|
104
|
+
backgroundColor={lightTheme.colors.white}
|
|
105
|
+
barStyle="dark-content"
|
|
106
|
+
style={styles.screen}
|
|
107
|
+
>
|
|
108
|
+
<Container>
|
|
109
|
+
<Container style={styles.navBar}>
|
|
110
|
+
{/* v3's ripple config dropped `isCentered`; nothing replaces it. */}
|
|
111
|
+
<Touchable
|
|
112
|
+
hitSlop={10}
|
|
113
|
+
rippleConfig={{ shouldOverflowContainer: true }}
|
|
114
|
+
style={styles.backButton}
|
|
115
|
+
onPress={onBackPress}
|
|
116
|
+
>
|
|
117
|
+
<Icon name="arrow-left-s-line" size={moderateScale(24)} />
|
|
118
|
+
</Touchable>
|
|
119
|
+
</Container>
|
|
120
|
+
<LineLoader isLoading={isSelectingOrganization} />
|
|
121
|
+
</Container>
|
|
122
|
+
<Container style={styles.body}>
|
|
123
|
+
{renderHeader()}
|
|
124
|
+
<FlashList
|
|
125
|
+
contentContainerStyle={styles.contentContainerStyle}
|
|
126
|
+
data={filteredOrganizations}
|
|
127
|
+
keyExtractor={item => item.id}
|
|
128
|
+
style={styles.flatListStyle}
|
|
129
|
+
renderItem={({ item }) => (
|
|
130
|
+
<Organization
|
|
131
|
+
organization={item}
|
|
132
|
+
onOrganizationSelect={onOrganizationSelect}
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
/>
|
|
136
|
+
</Container>
|
|
137
|
+
</ParentView>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const styles = StyleSheet.create({
|
|
142
|
+
screen: {
|
|
143
|
+
flex: 1,
|
|
144
|
+
},
|
|
145
|
+
navBar: {
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
flexDirection: "row",
|
|
148
|
+
height: moderateScale(44),
|
|
149
|
+
paddingHorizontal: moderateScale(16),
|
|
150
|
+
},
|
|
151
|
+
backButton: {
|
|
152
|
+
marginLeft: moderateScale(-8),
|
|
153
|
+
},
|
|
154
|
+
body: {
|
|
155
|
+
flex: 1,
|
|
156
|
+
marginHorizontal: moderateScale(16),
|
|
157
|
+
marginTop: moderateScale(16),
|
|
158
|
+
},
|
|
159
|
+
header: {
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
marginBottom: 18,
|
|
162
|
+
},
|
|
163
|
+
headerTitle: {
|
|
164
|
+
lineHeight: moderateScale(28),
|
|
165
|
+
marginBottom: moderateScale(8),
|
|
166
|
+
},
|
|
167
|
+
headerDescription: {
|
|
168
|
+
marginBottom: moderateScale(8),
|
|
169
|
+
},
|
|
170
|
+
flatListStyle: {
|
|
171
|
+
marginBottom: 20,
|
|
172
|
+
},
|
|
173
|
+
contentContainerStyle: {
|
|
174
|
+
justifyContent: "center",
|
|
175
|
+
},
|
|
176
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { statusCodes } from "@react-native-google-signin/google-signin";
|
|
2
|
+
|
|
3
|
+
export const MAX_RETRY_ATTEMPTS = 3;
|
|
4
|
+
|
|
5
|
+
export const GOOGLE_LOGIN_ERRORS = {
|
|
6
|
+
// Platform-independent codes exported by the library (values differ per
|
|
7
|
+
// platform — never hardcode them)
|
|
8
|
+
IN_PROGRESS: statusCodes.IN_PROGRESS,
|
|
9
|
+
PLAY_SERVICES_NOT_AVAILABLE: statusCodes.PLAY_SERVICES_NOT_AVAILABLE,
|
|
10
|
+
SIGN_IN_CANCELLED: statusCodes.SIGN_IN_CANCELLED,
|
|
11
|
+
SIGN_IN_REQUIRED: statusCodes.SIGN_IN_REQUIRED,
|
|
12
|
+
// Raw CommonStatusCodes the library does not export; still surface as
|
|
13
|
+
// error.code strings on Android
|
|
14
|
+
// Ref: https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes#constants_1
|
|
15
|
+
INVALID_ACCOUNT: "5",
|
|
16
|
+
RESOLUTION_REQUIRED: "6",
|
|
17
|
+
NETWORK_ERROR: "7",
|
|
18
|
+
INTERNAL_ERROR: "8",
|
|
19
|
+
DEVELOPER_ERROR: "10",
|
|
20
|
+
INTERRUPTED: "14",
|
|
21
|
+
TIMEOUT: "15",
|
|
22
|
+
API_NOT_CONNECTED: "17",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const RETRYABLE_ERROR_CODES = [
|
|
26
|
+
GOOGLE_LOGIN_ERRORS.NETWORK_ERROR,
|
|
27
|
+
GOOGLE_LOGIN_ERRORS.INTERRUPTED,
|
|
28
|
+
GOOGLE_LOGIN_ERRORS.TIMEOUT,
|
|
29
|
+
GOOGLE_LOGIN_ERRORS.INTERNAL_ERROR,
|
|
30
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { LoginScreen } from "./authentication/LoginScreen";
|
|
2
|
+
export { OTPVerificationScreen } from "./authentication/OTPVerificationScreen";
|
|
3
|
+
export { SubDomainScreen } from "./authentication/SubDomainScreen";
|
|
4
|
+
export { IncompleteOnboardingInfo } from "./authentication/IncompleteOnboardingInfo";
|
|
5
|
+
export { ProfileScreen } from "./profile/ProfileScreen";
|
|
6
|
+
export { NotificationsScreen } from "./NotificationsScreen";
|
|
7
|
+
export { ChatWidget } from "./profile/ChatWidget";
|
|
8
|
+
export { default as TeamMembersScreen } from "./team_members";
|
|
9
|
+
export { default as AddTeamMemberScreen } from "./team_members/Add";
|
|
10
|
+
export { default as EditTeamMemberScreen } from "./team_members/Edit";
|