@nascentdigital/funnel-apps 4.4.18
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/dist/react/app/domain/AppService.d.ts +19 -0
- package/dist/react/app/domain/AppService.js +19 -0
- package/dist/react/app/domain/AppServiceClient.d.ts +7 -0
- package/dist/react/app/domain/AppServiceClient.js +57 -0
- package/dist/react/app/domain/AppState.d.ts +1 -0
- package/dist/react/app/domain/AppState.js +2 -0
- package/dist/react/app/domain/index.d.ts +3 -0
- package/dist/react/app/domain/index.js +19 -0
- package/dist/react/app/server/AbstractAppService.d.ts +17 -0
- package/dist/react/app/server/AbstractAppService.js +24 -0
- package/dist/react/app/server/AppServices.d.ts +11 -0
- package/dist/react/app/server/AppServices.js +92 -0
- package/dist/react/app/server/index.d.ts +4 -0
- package/dist/react/app/server/index.js +20 -0
- package/dist/react/app/web/App.d.ts +38 -0
- package/dist/react/app/web/App.js +116 -0
- package/dist/react/app/web/AppContainer.d.ts +16 -0
- package/dist/react/app/web/AppContainer.js +109 -0
- package/dist/react/app/web/AppContext.d.ts +7 -0
- package/dist/react/app/web/AppContext.js +6 -0
- package/dist/react/app/web/AppLayout.d.ts +7 -0
- package/dist/react/app/web/AppLayout.js +34 -0
- package/dist/react/app/web/AppPage.d.ts +13 -0
- package/dist/react/app/web/AppPage.js +30 -0
- package/dist/react/app/web/AppRoot.d.ts +7 -0
- package/dist/react/app/web/AppRoot.js +43 -0
- package/dist/react/app/web/index.d.ts +5 -0
- package/dist/react/app/web/index.js +21 -0
- package/dist/react/app/web/useApp.d.ts +2 -0
- package/dist/react/app/web/useApp.js +33 -0
- package/dist/react/auth0/server/Auth0IdentityService.d.ts +25 -0
- package/dist/react/auth0/server/Auth0IdentityService.js +84 -0
- package/dist/react/auth0/server/Auth0Profile.d.ts +19 -0
- package/dist/react/auth0/server/Auth0Profile.js +108 -0
- package/dist/react/auth0/server/Auth0ProfileFactory.d.ts +15 -0
- package/dist/react/auth0/server/Auth0ProfileFactory.js +51 -0
- package/dist/react/auth0/server/Auth0ProfileManagementService.d.ts +17 -0
- package/dist/react/auth0/server/Auth0ProfileManagementService.js +127 -0
- package/dist/react/auth0/server/Auth0ProfileServices.d.ts +13 -0
- package/dist/react/auth0/server/Auth0ProfileServices.js +19 -0
- package/dist/react/auth0/server/Auth0ProfileStore.d.ts +17 -0
- package/dist/react/auth0/server/Auth0ProfileStore.js +83 -0
- package/dist/react/auth0/server/Auth0ProfileUserService.d.ts +16 -0
- package/dist/react/auth0/server/Auth0ProfileUserService.js +48 -0
- package/dist/react/auth0/server/index.d.ts +4 -0
- package/dist/react/auth0/server/index.js +20 -0
- package/dist/react/auth0/web/Auth0IdentityClient.d.ts +34 -0
- package/dist/react/auth0/web/Auth0IdentityClient.js +200 -0
- package/dist/react/auth0/web/Auth0IdentityClientProvider.d.ts +35 -0
- package/dist/react/auth0/web/Auth0IdentityClientProvider.js +67 -0
- package/dist/react/auth0/web/index.d.ts +1 -0
- package/dist/react/auth0/web/index.js +17 -0
- package/dist/react/bridge/core/BridgeConnection.d.ts +6 -0
- package/dist/react/bridge/core/BridgeConnection.js +2 -0
- package/dist/react/bridge/core/BridgeConstants.d.ts +7 -0
- package/dist/react/bridge/core/BridgeConstants.js +15 -0
- package/dist/react/bridge/core/BridgeEvent.d.ts +52 -0
- package/dist/react/bridge/core/BridgeEvent.js +28 -0
- package/dist/react/bridge/core/BridgeMethod.d.ts +12 -0
- package/dist/react/bridge/core/BridgeMethod.js +2 -0
- package/dist/react/bridge/core/BridgeMethodCall.d.ts +23 -0
- package/dist/react/bridge/core/BridgeMethodCall.js +37 -0
- package/dist/react/bridge/core/BridgeMethods.d.ts +35 -0
- package/dist/react/bridge/core/BridgeMethods.js +2 -0
- package/dist/react/bridge/core/BridgeState.d.ts +24 -0
- package/dist/react/bridge/core/BridgeState.js +2 -0
- package/dist/react/bridge/core/index.d.ts +7 -0
- package/dist/react/bridge/core/index.js +23 -0
- package/dist/react/bridge/web/Bridge.d.ts +32 -0
- package/dist/react/bridge/web/Bridge.js +183 -0
- package/dist/react/bridge/web/BridgeContext.d.ts +8 -0
- package/dist/react/bridge/web/BridgeContext.js +6 -0
- package/dist/react/bridge/web/BridgeGlobals.d.ts +12 -0
- package/dist/react/bridge/web/BridgeGlobals.js +2 -0
- package/dist/react/bridge/web/BridgeProvider.d.ts +7 -0
- package/dist/react/bridge/web/BridgeProvider.js +36 -0
- package/dist/react/bridge/web/index.d.ts +6 -0
- package/dist/react/bridge/web/index.js +22 -0
- package/dist/react/bridge/web/useBridge.d.ts +3 -0
- package/dist/react/bridge/web/useBridge.js +39 -0
- package/dist/react/bridge/web/useBridgeState.d.ts +2 -0
- package/dist/react/bridge/web/useBridgeState.js +43 -0
- package/dist/react/bridge/web/useSafeArea.d.ts +1 -0
- package/dist/react/bridge/web/useSafeArea.js +11 -0
- package/dist/react/content/core/AppContentClient.d.ts +14 -0
- package/dist/react/content/core/AppContentClient.js +51 -0
- package/dist/react/content/core/ContentClientContext.d.ts +7 -0
- package/dist/react/content/core/ContentClientContext.js +6 -0
- package/dist/react/content/core/index.d.ts +1 -0
- package/dist/react/content/core/index.js +17 -0
- package/dist/react/content/domain/ContentAppRequest.d.ts +20 -0
- package/dist/react/content/domain/ContentAppRequest.js +11 -0
- package/dist/react/content/domain/index.d.ts +1 -0
- package/dist/react/content/domain/index.js +17 -0
- package/dist/react/content/server/ContentAppService.d.ts +11 -0
- package/dist/react/content/server/ContentAppService.js +34 -0
- package/dist/react/content/server/index.d.ts +1 -0
- package/dist/react/content/server/index.js +17 -0
- package/dist/react/content/web/ContentProvider.d.ts +5 -0
- package/dist/react/content/web/ContentProvider.js +17 -0
- package/dist/react/content/web/index.d.ts +6 -0
- package/dist/react/content/web/index.js +22 -0
- package/dist/react/content/web/useCollection.d.ts +10 -0
- package/dist/react/content/web/useCollection.js +22 -0
- package/dist/react/content/web/useCollections.d.ts +10 -0
- package/dist/react/content/web/useCollections.js +32 -0
- package/dist/react/content/web/useContentClient.d.ts +1 -0
- package/dist/react/content/web/useContentClient.js +9 -0
- package/dist/react/cookies/web/CookieService.d.ts +25 -0
- package/dist/react/cookies/web/CookieService.js +45 -0
- package/dist/react/cookies/web/CookieServiceContext.d.ts +7 -0
- package/dist/react/cookies/web/CookieServiceContext.js +6 -0
- package/dist/react/cookies/web/CookieServiceProvider.d.ts +6 -0
- package/dist/react/cookies/web/CookieServiceProvider.js +16 -0
- package/dist/react/cookies/web/index.d.ts +3 -0
- package/dist/react/cookies/web/index.js +19 -0
- package/dist/react/cookies/web/useCookieService.d.ts +2 -0
- package/dist/react/cookies/web/useCookieService.js +29 -0
- package/dist/react/identity/core/AbstractIdentityClient.d.ts +22 -0
- package/dist/react/identity/core/AbstractIdentityClient.js +31 -0
- package/dist/react/identity/core/IdentityClient.d.ts +22 -0
- package/dist/react/identity/core/IdentityClient.js +13 -0
- package/dist/react/identity/core/IdentityClientContext.d.ts +7 -0
- package/dist/react/identity/core/IdentityClientContext.js +6 -0
- package/dist/react/identity/core/index.d.ts +6 -0
- package/dist/react/identity/core/index.js +22 -0
- package/dist/react/identity/core/useIdentity.d.ts +10 -0
- package/dist/react/identity/core/useIdentity.js +39 -0
- package/dist/react/identity/core/useIdentityClient.d.ts +2 -0
- package/dist/react/identity/core/useIdentityClient.js +17 -0
- package/dist/react/identity/domain/AnonymousIdentity.d.ts +15 -0
- package/dist/react/identity/domain/AnonymousIdentity.js +27 -0
- package/dist/react/identity/domain/AuthenticatedIdentity.d.ts +25 -0
- package/dist/react/identity/domain/AuthenticatedIdentity.js +32 -0
- package/dist/react/identity/domain/Identity.d.ts +6 -0
- package/dist/react/identity/domain/Identity.js +2 -0
- package/dist/react/identity/domain/IdentityAppRequest.d.ts +8 -0
- package/dist/react/identity/domain/IdentityAppRequest.js +10 -0
- package/dist/react/identity/domain/index.d.ts +4 -0
- package/dist/react/identity/domain/index.js +20 -0
- package/dist/react/identity/server/IdentityAppService.d.ts +9 -0
- package/dist/react/identity/server/IdentityAppService.js +32 -0
- package/dist/react/identity/server/IdentityService.d.ts +17 -0
- package/dist/react/identity/server/IdentityService.js +25 -0
- package/dist/react/identity/server/index.d.ts +4 -0
- package/dist/react/identity/server/index.js +20 -0
- package/dist/react/identity/web/WebIdentityClientProvider.d.ts +8 -0
- package/dist/react/identity/web/WebIdentityClientProvider.js +27 -0
- package/dist/react/identity/web/WebIdentityProvider.d.ts +5 -0
- package/dist/react/identity/web/WebIdentityProvider.js +21 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClient.d.ts +14 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClient.js +47 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.d.ts +2 -0
- package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.js +28 -0
- package/dist/react/identity/web/bridge/index.d.ts +1 -0
- package/dist/react/identity/web/bridge/index.js +17 -0
- package/dist/react/identity/web/index.d.ts +3 -0
- package/dist/react/identity/web/index.js +19 -0
- package/dist/react/nav/core/SpecSourceContext.d.ts +7 -0
- package/dist/react/nav/core/SpecSourceContext.js +6 -0
- package/dist/react/nav/core/index.d.ts +2 -0
- package/dist/react/nav/core/index.js +18 -0
- package/dist/react/nav/core/useSpec.d.ts +3 -0
- package/dist/react/nav/core/useSpec.js +30 -0
- package/dist/react/nav/domain/Icon.d.ts +2 -0
- package/dist/react/nav/domain/Icon.js +2 -0
- package/dist/react/nav/domain/Modal.d.ts +25 -0
- package/dist/react/nav/domain/Modal.js +28 -0
- package/dist/react/nav/domain/Navigation.d.ts +13 -0
- package/dist/react/nav/domain/Navigation.js +2 -0
- package/dist/react/nav/domain/NavigationCommand.d.ts +14 -0
- package/dist/react/nav/domain/NavigationCommand.js +2 -0
- package/dist/react/nav/domain/Route.d.ts +12 -0
- package/dist/react/nav/domain/Route.js +2 -0
- package/dist/react/nav/domain/Routes.d.ts +6 -0
- package/dist/react/nav/domain/Routes.js +74 -0
- package/dist/react/nav/domain/Screen.d.ts +24 -0
- package/dist/react/nav/domain/Screen.js +28 -0
- package/dist/react/nav/domain/Skeleton.d.ts +26 -0
- package/dist/react/nav/domain/Skeleton.js +2 -0
- package/dist/react/nav/domain/Spec.d.ts +33 -0
- package/dist/react/nav/domain/Spec.js +124 -0
- package/dist/react/nav/domain/SpecSource.d.ts +21 -0
- package/dist/react/nav/domain/SpecSource.js +28 -0
- package/dist/react/nav/domain/Stack.d.ts +35 -0
- package/dist/react/nav/domain/Stack.js +44 -0
- package/dist/react/nav/domain/Tabs.d.ts +37 -0
- package/dist/react/nav/domain/Tabs.js +45 -0
- package/dist/react/nav/domain/icons/ImageIcon.d.ts +2 -0
- package/dist/react/nav/domain/icons/ImageIcon.js +7 -0
- package/dist/react/nav/domain/icons/LucideIcon.d.ts +2 -0
- package/dist/react/nav/domain/icons/LucideIcon.js +7 -0
- package/dist/react/nav/domain/icons/index.d.ts +2 -0
- package/dist/react/nav/domain/icons/index.js +18 -0
- package/dist/react/nav/domain/index.d.ts +14 -0
- package/dist/react/nav/domain/index.js +30 -0
- package/dist/react/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
- package/dist/react/nav/domain/sources/AbstractSpecSource.js +64 -0
- package/dist/react/nav/domain/sources/StaticSpecSource.d.ts +9 -0
- package/dist/react/nav/domain/sources/StaticSpecSource.js +16 -0
- package/dist/react/nav/domain/sources/index.d.ts +2 -0
- package/dist/react/nav/domain/sources/index.js +18 -0
- package/dist/react/nav/server/SpecService.d.ts +9 -0
- package/dist/react/nav/server/SpecService.js +31 -0
- package/dist/react/nav/server/exports.d.ts +1 -0
- package/dist/react/nav/server/exports.js +17 -0
- package/dist/react/nav/server/index.d.ts +2 -0
- package/dist/react/nav/server/index.js +38 -0
- package/dist/react/nav/web/WebSpecProvider.d.ts +2 -0
- package/dist/react/nav/web/WebSpecProvider.js +41 -0
- package/dist/react/nav/web/index.d.ts +3 -0
- package/dist/react/nav/web/index.js +19 -0
- package/dist/react/nav/web/navigator/NativeNavigator.d.ts +13 -0
- package/dist/react/nav/web/navigator/NativeNavigator.js +47 -0
- package/dist/react/nav/web/navigator/Navigator.d.ts +7 -0
- package/dist/react/nav/web/navigator/Navigator.js +2 -0
- package/dist/react/nav/web/navigator/NavigatorContext.d.ts +7 -0
- package/dist/react/nav/web/navigator/NavigatorContext.js +6 -0
- package/dist/react/nav/web/navigator/WebNavigator.d.ts +13 -0
- package/dist/react/nav/web/navigator/WebNavigator.js +38 -0
- package/dist/react/nav/web/navigator/index.d.ts +5 -0
- package/dist/react/nav/web/navigator/index.js +21 -0
- package/dist/react/nav/web/navigator/useNavigator.d.ts +1 -0
- package/dist/react/nav/web/navigator/useNavigator.js +17 -0
- package/dist/react/nav.d.ts +1 -0
- package/dist/react/nav.js +37 -0
- package/dist/react/profile/core/AbstractProfileClient.d.ts +18 -0
- package/dist/react/profile/core/AbstractProfileClient.js +31 -0
- package/dist/react/profile/core/ProfileClient.d.ts +21 -0
- package/dist/react/profile/core/ProfileClient.js +2 -0
- package/dist/react/profile/core/ProfileClientContext.d.ts +7 -0
- package/dist/react/profile/core/ProfileClientContext.js +6 -0
- package/dist/react/profile/core/index.d.ts +6 -0
- package/dist/react/profile/core/index.js +22 -0
- package/dist/react/profile/core/useProfile.d.ts +9 -0
- package/dist/react/profile/core/useProfile.js +47 -0
- package/dist/react/profile/core/useProfileClient.d.ts +2 -0
- package/dist/react/profile/core/useProfileClient.js +17 -0
- package/dist/react/profile/core/useProfileStore.d.ts +2 -0
- package/dist/react/profile/core/useProfileStore.js +28 -0
- package/dist/react/profile/domain/Profile.d.ts +80 -0
- package/dist/react/profile/domain/Profile.js +209 -0
- package/dist/react/profile/domain/ProfileAppRequest.d.ts +15 -0
- package/dist/react/profile/domain/ProfileAppRequest.js +12 -0
- package/dist/react/profile/domain/ProfileStore.d.ts +65 -0
- package/dist/react/profile/domain/ProfileStore.js +180 -0
- package/dist/react/profile/domain/index.d.ts +3 -0
- package/dist/react/profile/domain/index.js +19 -0
- package/dist/react/profile/server/ProfileAppService.d.ts +11 -0
- package/dist/react/profile/server/ProfileAppService.js +49 -0
- package/dist/react/profile/server/ProfileManagementService.d.ts +28 -0
- package/dist/react/profile/server/ProfileManagementService.js +3 -0
- package/dist/react/profile/server/ProfileServices.d.ts +22 -0
- package/dist/react/profile/server/ProfileServices.js +24 -0
- package/dist/react/profile/server/ProfileUserService.d.ts +5 -0
- package/dist/react/profile/server/ProfileUserService.js +2 -0
- package/dist/react/profile/server/index.d.ts +5 -0
- package/dist/react/profile/server/index.js +21 -0
- package/dist/react/profile/web/WebProfile.d.ts +11 -0
- package/dist/react/profile/web/WebProfile.js +37 -0
- package/dist/react/profile/web/WebProfileClient.d.ts +9 -0
- package/dist/react/profile/web/WebProfileClient.js +76 -0
- package/dist/react/profile/web/WebProfileProvider.d.ts +5 -0
- package/dist/react/profile/web/WebProfileProvider.js +62 -0
- package/dist/react/profile/web/WebProfileStore.d.ts +8 -0
- package/dist/react/profile/web/WebProfileStore.js +32 -0
- package/dist/react/profile/web/index.d.ts +3 -0
- package/dist/react/profile/web/index.js +19 -0
- package/dist/react/push/domain/PushAppRequest.d.ts +13 -0
- package/dist/react/push/domain/PushAppRequest.js +12 -0
- package/dist/react/push/domain/PushStore.d.ts +7 -0
- package/dist/react/push/domain/PushStore.js +9 -0
- package/dist/react/push/domain/index.d.ts +2 -0
- package/dist/react/push/domain/index.js +18 -0
- package/dist/react/push/server/PushService.d.ts +22 -0
- package/dist/react/push/server/PushService.js +57 -0
- package/dist/react/push/server/index.d.ts +3 -0
- package/dist/react/push/server/index.js +19 -0
- package/dist/react/push/server/keygen.d.ts +1 -0
- package/dist/react/push/server/keygen.js +8 -0
- package/dist/react/push/web/PushClient.d.ts +35 -0
- package/dist/react/push/web/PushClient.js +204 -0
- package/dist/react/push/web/PushContext.d.ts +7 -0
- package/dist/react/push/web/PushContext.js +6 -0
- package/dist/react/push/web/PushProvider.d.ts +6 -0
- package/dist/react/push/web/PushProvider.js +42 -0
- package/dist/react/push/web/index.d.ts +4 -0
- package/dist/react/push/web/index.js +20 -0
- package/dist/react/push/web/usePushClient.d.ts +3 -0
- package/dist/react/push/web/usePushClient.js +40 -0
- package/dist/react/server.d.ts +7 -0
- package/dist/react/server.js +23 -0
- package/dist/react/ui/web/HideSplash.d.ts +1 -0
- package/dist/react/ui/web/HideSplash.js +28 -0
- package/dist/react/ui/web/Link.d.ts +6 -0
- package/dist/react/ui/web/Link.js +12 -0
- package/dist/react/ui/web/SafeArea.d.ts +9 -0
- package/dist/react/ui/web/SafeArea.js +26 -0
- package/dist/react/ui/web/index.d.ts +3 -0
- package/dist/react/ui/web/index.js +19 -0
- package/dist/react/web.d.ts +10 -0
- package/dist/react/web.js +26 -0
- package/dist/reactnative/app/domain/AppService.d.ts +19 -0
- package/dist/reactnative/app/domain/AppService.js +19 -0
- package/dist/reactnative/app/domain/AppServiceClient.d.ts +7 -0
- package/dist/reactnative/app/domain/AppServiceClient.js +57 -0
- package/dist/reactnative/app/domain/AppState.d.ts +1 -0
- package/dist/reactnative/app/domain/AppState.js +2 -0
- package/dist/reactnative/app/domain/index.d.ts +3 -0
- package/dist/reactnative/app/domain/index.js +19 -0
- package/dist/reactnative/app/rn/AppContainer.d.ts +10 -0
- package/dist/reactnative/app/rn/AppContainer.js +77 -0
- package/dist/reactnative/app/rn/AppRoot.d.ts +5 -0
- package/dist/reactnative/app/rn/AppRoot.js +22 -0
- package/dist/reactnative/app/rn/AppServiceClient.d.ts +4 -0
- package/dist/reactnative/app/rn/AppServiceClient.js +44 -0
- package/dist/reactnative/app/rn/index.d.ts +5 -0
- package/dist/reactnative/app/rn/index.js +22 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClient.d.ts +33 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClient.js +234 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.d.ts +27 -0
- package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.js +60 -0
- package/dist/reactnative/auth0/rn/index.d.ts +2 -0
- package/dist/reactnative/auth0/rn/index.js +18 -0
- package/dist/reactnative/bridge/core/BridgeConnection.d.ts +6 -0
- package/dist/reactnative/bridge/core/BridgeConnection.js +2 -0
- package/dist/reactnative/bridge/core/BridgeConstants.d.ts +7 -0
- package/dist/reactnative/bridge/core/BridgeConstants.js +15 -0
- package/dist/reactnative/bridge/core/BridgeEvent.d.ts +52 -0
- package/dist/reactnative/bridge/core/BridgeEvent.js +28 -0
- package/dist/reactnative/bridge/core/BridgeMethod.d.ts +12 -0
- package/dist/reactnative/bridge/core/BridgeMethod.js +2 -0
- package/dist/reactnative/bridge/core/BridgeMethodCall.d.ts +23 -0
- package/dist/reactnative/bridge/core/BridgeMethodCall.js +37 -0
- package/dist/reactnative/bridge/core/BridgeMethods.d.ts +35 -0
- package/dist/reactnative/bridge/core/BridgeMethods.js +2 -0
- package/dist/reactnative/bridge/core/BridgeState.d.ts +24 -0
- package/dist/reactnative/bridge/core/BridgeState.js +2 -0
- package/dist/reactnative/bridge/core/index.d.ts +7 -0
- package/dist/reactnative/bridge/core/index.js +23 -0
- package/dist/reactnative/bridge/rn/BridgeProxy.d.ts +35 -0
- package/dist/reactnative/bridge/rn/BridgeProxy.js +331 -0
- package/dist/reactnative/bridge/rn/BridgeProxyContext.d.ts +8 -0
- package/dist/reactnative/bridge/rn/BridgeProxyContext.js +6 -0
- package/dist/reactnative/bridge/rn/BridgeProxyProvider.d.ts +8 -0
- package/dist/reactnative/bridge/rn/BridgeProxyProvider.js +39 -0
- package/dist/reactnative/bridge/rn/BridgeWebview.d.ts +7 -0
- package/dist/reactnative/bridge/rn/BridgeWebview.js +51 -0
- package/dist/reactnative/bridge/rn/index.d.ts +7 -0
- package/dist/reactnative/bridge/rn/index.js +23 -0
- package/dist/reactnative/bridge/rn/useBridgeProxy.d.ts +3 -0
- package/dist/reactnative/bridge/rn/useBridgeProxy.js +38 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyCalls.d.ts +3 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyCalls.js +32 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyState.d.ts +2 -0
- package/dist/reactnative/bridge/rn/useBridgeProxyState.js +46 -0
- package/dist/reactnative/identity/core/AbstractIdentityClient.d.ts +22 -0
- package/dist/reactnative/identity/core/AbstractIdentityClient.js +31 -0
- package/dist/reactnative/identity/core/IdentityClient.d.ts +22 -0
- package/dist/reactnative/identity/core/IdentityClient.js +13 -0
- package/dist/reactnative/identity/core/IdentityClientContext.d.ts +7 -0
- package/dist/reactnative/identity/core/IdentityClientContext.js +6 -0
- package/dist/reactnative/identity/core/index.d.ts +6 -0
- package/dist/reactnative/identity/core/index.js +22 -0
- package/dist/reactnative/identity/core/useIdentity.d.ts +10 -0
- package/dist/reactnative/identity/core/useIdentity.js +39 -0
- package/dist/reactnative/identity/core/useIdentityClient.d.ts +2 -0
- package/dist/reactnative/identity/core/useIdentityClient.js +17 -0
- package/dist/reactnative/identity/domain/AnonymousIdentity.d.ts +15 -0
- package/dist/reactnative/identity/domain/AnonymousIdentity.js +27 -0
- package/dist/reactnative/identity/domain/AuthenticatedIdentity.d.ts +25 -0
- package/dist/reactnative/identity/domain/AuthenticatedIdentity.js +32 -0
- package/dist/reactnative/identity/domain/Identity.d.ts +6 -0
- package/dist/reactnative/identity/domain/Identity.js +2 -0
- package/dist/reactnative/identity/domain/IdentityAppRequest.d.ts +8 -0
- package/dist/reactnative/identity/domain/IdentityAppRequest.js +10 -0
- package/dist/reactnative/identity/domain/index.d.ts +4 -0
- package/dist/reactnative/identity/domain/index.js +20 -0
- package/dist/reactnative/identity/rn/RNIdentityClientProvider.d.ts +8 -0
- package/dist/reactnative/identity/rn/RNIdentityClientProvider.js +22 -0
- package/dist/reactnative/identity/rn/RNIdentityProvider.d.ts +5 -0
- package/dist/reactnative/identity/rn/RNIdentityProvider.js +14 -0
- package/dist/reactnative/identity/rn/index.d.ts +3 -0
- package/dist/reactnative/identity/rn/index.js +19 -0
- package/dist/reactnative/nav/core/SpecSourceContext.d.ts +7 -0
- package/dist/reactnative/nav/core/SpecSourceContext.js +6 -0
- package/dist/reactnative/nav/core/index.d.ts +2 -0
- package/dist/reactnative/nav/core/index.js +18 -0
- package/dist/reactnative/nav/core/useSpec.d.ts +3 -0
- package/dist/reactnative/nav/core/useSpec.js +30 -0
- package/dist/reactnative/nav/domain/Icon.d.ts +2 -0
- package/dist/reactnative/nav/domain/Icon.js +2 -0
- package/dist/reactnative/nav/domain/Modal.d.ts +25 -0
- package/dist/reactnative/nav/domain/Modal.js +28 -0
- package/dist/reactnative/nav/domain/Navigation.d.ts +13 -0
- package/dist/reactnative/nav/domain/Navigation.js +2 -0
- package/dist/reactnative/nav/domain/NavigationCommand.d.ts +14 -0
- package/dist/reactnative/nav/domain/NavigationCommand.js +2 -0
- package/dist/reactnative/nav/domain/Route.d.ts +12 -0
- package/dist/reactnative/nav/domain/Route.js +2 -0
- package/dist/reactnative/nav/domain/Routes.d.ts +6 -0
- package/dist/reactnative/nav/domain/Routes.js +74 -0
- package/dist/reactnative/nav/domain/Screen.d.ts +24 -0
- package/dist/reactnative/nav/domain/Screen.js +28 -0
- package/dist/reactnative/nav/domain/Skeleton.d.ts +26 -0
- package/dist/reactnative/nav/domain/Skeleton.js +2 -0
- package/dist/reactnative/nav/domain/Spec.d.ts +33 -0
- package/dist/reactnative/nav/domain/Spec.js +124 -0
- package/dist/reactnative/nav/domain/SpecSource.d.ts +21 -0
- package/dist/reactnative/nav/domain/SpecSource.js +28 -0
- package/dist/reactnative/nav/domain/Stack.d.ts +35 -0
- package/dist/reactnative/nav/domain/Stack.js +44 -0
- package/dist/reactnative/nav/domain/Tabs.d.ts +37 -0
- package/dist/reactnative/nav/domain/Tabs.js +45 -0
- package/dist/reactnative/nav/domain/icons/ImageIcon.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/ImageIcon.js +7 -0
- package/dist/reactnative/nav/domain/icons/LucideIcon.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/LucideIcon.js +7 -0
- package/dist/reactnative/nav/domain/icons/index.d.ts +2 -0
- package/dist/reactnative/nav/domain/icons/index.js +18 -0
- package/dist/reactnative/nav/domain/index.d.ts +14 -0
- package/dist/reactnative/nav/domain/index.js +30 -0
- package/dist/reactnative/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
- package/dist/reactnative/nav/domain/sources/AbstractSpecSource.js +64 -0
- package/dist/reactnative/nav/domain/sources/StaticSpecSource.d.ts +9 -0
- package/dist/reactnative/nav/domain/sources/StaticSpecSource.js +16 -0
- package/dist/reactnative/nav/domain/sources/index.d.ts +2 -0
- package/dist/reactnative/nav/domain/sources/index.js +18 -0
- package/dist/reactnative/nav/rn/NavigationEngine.d.ts +1 -0
- package/dist/reactnative/nav/rn/NavigationEngine.js +155 -0
- package/dist/reactnative/nav/rn/NavigationScreen.d.ts +9 -0
- package/dist/reactnative/nav/rn/NavigationScreen.js +215 -0
- package/dist/reactnative/nav/rn/RNSpecProvider.d.ts +2 -0
- package/dist/reactnative/nav/rn/RNSpecProvider.js +30 -0
- package/dist/reactnative/nav/rn/RNSpecSource.d.ts +5 -0
- package/dist/reactnative/nav/rn/RNSpecSource.js +30 -0
- package/dist/reactnative/nav/rn/index.d.ts +4 -0
- package/dist/reactnative/nav/rn/index.js +20 -0
- package/dist/reactnative/profile/domain/Profile.d.ts +80 -0
- package/dist/reactnative/profile/domain/Profile.js +209 -0
- package/dist/reactnative/profile/domain/ProfileAppRequest.d.ts +15 -0
- package/dist/reactnative/profile/domain/ProfileAppRequest.js +12 -0
- package/dist/reactnative/profile/domain/ProfileStore.d.ts +65 -0
- package/dist/reactnative/profile/domain/ProfileStore.js +180 -0
- package/dist/reactnative/profile/domain/index.d.ts +3 -0
- package/dist/reactnative/profile/domain/index.js +19 -0
- package/dist/reactnative/push/domain/PushAppRequest.d.ts +13 -0
- package/dist/reactnative/push/domain/PushAppRequest.js +12 -0
- package/dist/reactnative/push/domain/PushStore.d.ts +7 -0
- package/dist/reactnative/push/domain/PushStore.js +9 -0
- package/dist/reactnative/push/domain/index.d.ts +2 -0
- package/dist/reactnative/push/domain/index.js +18 -0
- package/dist/reactnative/push/rn/PushClient.d.ts +32 -0
- package/dist/reactnative/push/rn/PushClient.js +247 -0
- package/dist/reactnative/push/rn/PushContext.d.ts +7 -0
- package/dist/reactnative/push/rn/PushContext.js +6 -0
- package/dist/reactnative/push/rn/PushProvider.d.ts +2 -0
- package/dist/reactnative/push/rn/PushProvider.js +45 -0
- package/dist/reactnative/push/rn/index.d.ts +3 -0
- package/dist/reactnative/push/rn/index.js +19 -0
- package/dist/reactnative/push/rn/usePushClient.d.ts +3 -0
- package/dist/reactnative/push/rn/usePushClient.js +40 -0
- package/dist/reactnative/rn.d.ts +7 -0
- package/dist/reactnative/rn.js +23 -0
- package/dist/reactnative/ui/rn/Tailwind.d.ts +175 -0
- package/dist/reactnative/ui/rn/Tailwind.js +211 -0
- package/dist/reactnative/ui/rn/atomic/Button.d.ts +97 -0
- package/dist/reactnative/ui/rn/atomic/Button.js +75 -0
- package/dist/reactnative/ui/rn/atomic/TextField.d.ts +112 -0
- package/dist/reactnative/ui/rn/atomic/TextField.js +135 -0
- package/dist/reactnative/ui/rn/atomic/index.d.ts +2 -0
- package/dist/reactnative/ui/rn/atomic/index.js +18 -0
- package/dist/reactnative/ui/rn/index.d.ts +1 -0
- package/dist/reactnative/ui/rn/index.js +17 -0
- package/dist/styles/rn/_index.css +2 -0
- package/dist/styles/rn/atomic/Button.css +54 -0
- package/dist/styles/rn/atomic/TextField.css +77 -0
- package/dist/styles/rn/atomic/_index.css +2 -0
- package/dist/styles/rn/base/_index.css +1 -0
- package/dist/styles/rn/base/tailwind.css +3 -0
- package/dist/styles/rn.css +1 -0
- package/dist/styles/web/_index.css +1 -0
- package/dist/styles/web/layout/SafeArea.css +17 -0
- package/dist/styles/web/layout/_index.css +1 -0
- package/dist/styles/web.css +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Notifications from 'expo-notifications';
|
|
2
|
+
export declare class PushClient {
|
|
3
|
+
private readonly _state$;
|
|
4
|
+
private readonly _token$;
|
|
5
|
+
private readonly _pushNotification$;
|
|
6
|
+
private readonly _pushResponse$;
|
|
7
|
+
private _onPushNotificationSubscription?;
|
|
8
|
+
private _onPushResponseSubscription?;
|
|
9
|
+
private _tokenSynced;
|
|
10
|
+
constructor(_: PushClient.Args);
|
|
11
|
+
get state$(): import("rxjs").Observable<PushClient.State>;
|
|
12
|
+
get state(): PushClient.State;
|
|
13
|
+
private set state(value);
|
|
14
|
+
get stableState(): Promise<PushClient.State>;
|
|
15
|
+
get token$(): import("rxjs").Observable<Notifications.ExpoPushToken | null | undefined>;
|
|
16
|
+
get token(): Notifications.ExpoPushToken | null | undefined;
|
|
17
|
+
private set token(value);
|
|
18
|
+
get tokenSynced(): boolean;
|
|
19
|
+
onTokenSynced(): void;
|
|
20
|
+
get pushNotification$(): import("rxjs").Observable<Notifications.Notification>;
|
|
21
|
+
get pushResponse$(): import("rxjs").Observable<Notifications.NotificationResponse>;
|
|
22
|
+
connect(): Promise<void>;
|
|
23
|
+
disconnect(): void;
|
|
24
|
+
sendNotification(content: Notifications.NotificationContent): Promise<void>;
|
|
25
|
+
private onNotification;
|
|
26
|
+
private onNotificationSuccess;
|
|
27
|
+
private onNotificationError;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace PushClient {
|
|
30
|
+
type Args = {};
|
|
31
|
+
type State = 'disconnected' | 'connecting' | 'connected' | 'error.config' | 'error.unsupported' | 'error.blocked' | 'error.unknown';
|
|
32
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PushClient = void 0;
|
|
40
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
41
|
+
const expo_constants_1 = __importDefault(require("expo-constants"));
|
|
42
|
+
const Device = __importStar(require("expo-device"));
|
|
43
|
+
const Notifications = __importStar(require("expo-notifications"));
|
|
44
|
+
const react_native_1 = require("react-native");
|
|
45
|
+
const rxjs_1 = require("rxjs");
|
|
46
|
+
// client
|
|
47
|
+
class PushClient {
|
|
48
|
+
constructor(_) {
|
|
49
|
+
// initialize instance variables
|
|
50
|
+
this._state$ = new rxjs_1.BehaviorSubject('disconnected');
|
|
51
|
+
this._token$ = new rxjs_1.BehaviorSubject(undefined);
|
|
52
|
+
this._pushNotification$ = new rxjs_1.Subject();
|
|
53
|
+
this._pushResponse$ = new rxjs_1.Subject();
|
|
54
|
+
this._tokenSynced = false;
|
|
55
|
+
}
|
|
56
|
+
get state$() {
|
|
57
|
+
return this._state$.asObservable();
|
|
58
|
+
}
|
|
59
|
+
get state() {
|
|
60
|
+
return this._state$.getValue();
|
|
61
|
+
}
|
|
62
|
+
set state(state) {
|
|
63
|
+
// update only if changed
|
|
64
|
+
if (state !== this.state) {
|
|
65
|
+
this._state$.next(state);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
get stableState() {
|
|
69
|
+
return (0, rxjs_1.firstValueFrom)(this._state$
|
|
70
|
+
.pipe((0, rxjs_1.filter)(state => state !== 'disconnected' && state !== 'connecting')));
|
|
71
|
+
}
|
|
72
|
+
get token$() {
|
|
73
|
+
return this._token$.asObservable();
|
|
74
|
+
}
|
|
75
|
+
get token() {
|
|
76
|
+
return this._token$.getValue();
|
|
77
|
+
}
|
|
78
|
+
set token(token) {
|
|
79
|
+
this._token$.next(token);
|
|
80
|
+
}
|
|
81
|
+
get tokenSynced() {
|
|
82
|
+
return this._tokenSynced;
|
|
83
|
+
}
|
|
84
|
+
onTokenSynced() {
|
|
85
|
+
this._tokenSynced = true;
|
|
86
|
+
}
|
|
87
|
+
get pushNotification$() {
|
|
88
|
+
return this._pushNotification$.asObservable();
|
|
89
|
+
}
|
|
90
|
+
get pushResponse$() {
|
|
91
|
+
return this._pushResponse$.asObservable();
|
|
92
|
+
}
|
|
93
|
+
async connect() {
|
|
94
|
+
var _a, _b, _c, _d, _e;
|
|
95
|
+
// skip if not uninitialized
|
|
96
|
+
if (this.state !== 'disconnected') {
|
|
97
|
+
console.warn('[PushClient/connect] attempt to initialize multiple times');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// fail if on device
|
|
101
|
+
if (!Device.isDevice) {
|
|
102
|
+
console.warn('[PushClient/connect] push not supported in simulator - please deploy to device');
|
|
103
|
+
// update state
|
|
104
|
+
this.state = 'error.unsupported';
|
|
105
|
+
// mark token as unavailable
|
|
106
|
+
this.token = null;
|
|
107
|
+
// stop
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// or fail if we can't determine the project id
|
|
111
|
+
const projectId = (_d = (_c = (_b = (_a = expo_constants_1.default === null || expo_constants_1.default === void 0 ? void 0 : expo_constants_1.default.expoConfig) === null || _a === void 0 ? void 0 : _a.extra) === null || _b === void 0 ? void 0 : _b.eas) === null || _c === void 0 ? void 0 : _c.projectId) !== null && _d !== void 0 ? _d : (_e = expo_constants_1.default === null || expo_constants_1.default === void 0 ? void 0 : expo_constants_1.default.easConfig) === null || _e === void 0 ? void 0 : _e.projectId;
|
|
112
|
+
if (!projectId) {
|
|
113
|
+
console.warn('[PushClient/connect] Project ID cannot be resolved');
|
|
114
|
+
// update state
|
|
115
|
+
this.state = 'error.config';
|
|
116
|
+
// mark token as unavailable
|
|
117
|
+
this.token = null;
|
|
118
|
+
// stop
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
// try to initialize/register push
|
|
122
|
+
try {
|
|
123
|
+
// mark initializing
|
|
124
|
+
this.state = 'connecting';
|
|
125
|
+
// register handler
|
|
126
|
+
Notifications.setNotificationHandler({
|
|
127
|
+
handleNotification: notification => this.onNotification(notification),
|
|
128
|
+
handleSuccess: notificationId => this.onNotificationSuccess(notificationId),
|
|
129
|
+
handleError: (notificationId, error) => this.onNotificationError(notificationId, error)
|
|
130
|
+
});
|
|
131
|
+
// TODO: allow this to be configured
|
|
132
|
+
// bind android notification channel
|
|
133
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
134
|
+
await Notifications.setNotificationChannelAsync('default', {
|
|
135
|
+
name: 'default',
|
|
136
|
+
importance: Notifications.AndroidImportance.MAX,
|
|
137
|
+
vibrationPattern: [0, 250, 250, 250],
|
|
138
|
+
lightColor: '#FF231F7C'
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// get current permissions
|
|
142
|
+
const { status: existingStatus } = await Notifications.getPermissionsAsync();
|
|
143
|
+
// try to request (again) if we don't have it
|
|
144
|
+
let finalStatus = existingStatus;
|
|
145
|
+
if (existingStatus !== 'granted') {
|
|
146
|
+
const { status } = await Notifications.requestPermissionsAsync();
|
|
147
|
+
finalStatus = status;
|
|
148
|
+
}
|
|
149
|
+
// handle blocked status (requires settings)
|
|
150
|
+
if (finalStatus !== 'granted') {
|
|
151
|
+
// update state
|
|
152
|
+
this.state = 'error.blocked';
|
|
153
|
+
this.token = null;
|
|
154
|
+
}
|
|
155
|
+
// or fetch/bind push token
|
|
156
|
+
else {
|
|
157
|
+
console.debug('[PushClient/initialize] fetching push token');
|
|
158
|
+
// fetch token
|
|
159
|
+
const token = await Notifications.getExpoPushTokenAsync({ projectId });
|
|
160
|
+
console.debug('[PushClient/initialize] retrieved token:', token.data);
|
|
161
|
+
// update state
|
|
162
|
+
this.state = 'connected';
|
|
163
|
+
// bind token
|
|
164
|
+
this.token = token;
|
|
165
|
+
// add notification listeners
|
|
166
|
+
this._onPushNotificationSubscription = Notifications.addNotificationReceivedListener(notification => {
|
|
167
|
+
console.debug('[PushClient] received notification', notification);
|
|
168
|
+
this._pushNotification$.next(notification);
|
|
169
|
+
});
|
|
170
|
+
this._onPushResponseSubscription = Notifications.addNotificationResponseReceivedListener(response => {
|
|
171
|
+
console.debug('[PushClient] received response', response);
|
|
172
|
+
this._pushResponse$.next(response);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// handle errors
|
|
177
|
+
catch (e) {
|
|
178
|
+
console.error('[PushClient/initialize] push registration failed', e);
|
|
179
|
+
// set state
|
|
180
|
+
this.state = 'error.unknown';
|
|
181
|
+
// mark token as unavailable
|
|
182
|
+
this.token = null;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
disconnect() {
|
|
186
|
+
// unsubscribe
|
|
187
|
+
if (this._onPushNotificationSubscription) {
|
|
188
|
+
this._onPushNotificationSubscription.remove();
|
|
189
|
+
delete this._onPushNotificationSubscription;
|
|
190
|
+
}
|
|
191
|
+
if (this._onPushResponseSubscription) {
|
|
192
|
+
this._onPushResponseSubscription.remove();
|
|
193
|
+
delete this._onPushResponseSubscription;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async sendNotification(content) {
|
|
197
|
+
// fail if we're not ready
|
|
198
|
+
const state = await this.stableState;
|
|
199
|
+
if (state !== 'connected') {
|
|
200
|
+
console.warn('[PushClient/sendNotification] cannot send push in error state:', state);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
// fail if there's np token (shouldn't happen)
|
|
204
|
+
const { token } = this;
|
|
205
|
+
if (!token) {
|
|
206
|
+
console.warn('[PushClient/sendNotification] push token missing - unable to send');
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
// send notification
|
|
210
|
+
try {
|
|
211
|
+
console.debug('[PushClient/sendNotification] sending token', { token, content });
|
|
212
|
+
// send to server
|
|
213
|
+
await fetch('https://exp.host/--/api/v2/push/send', {
|
|
214
|
+
method: 'POST',
|
|
215
|
+
headers: {
|
|
216
|
+
Accept: 'application/json',
|
|
217
|
+
'Accept-encoding': 'gzip, deflate',
|
|
218
|
+
'Content-Type': 'application/json'
|
|
219
|
+
},
|
|
220
|
+
body: JSON.stringify(Object.assign({ to: token }, content))
|
|
221
|
+
});
|
|
222
|
+
console.debug('[PushClient/sendNotification] sent local push', content);
|
|
223
|
+
}
|
|
224
|
+
catch (e) {
|
|
225
|
+
console.error('[PushClient/sendNotification] failed to send push', e);
|
|
226
|
+
// rethrow
|
|
227
|
+
throw new funnel_core_1.ServerError('Failed to send push notification');
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
async onNotification(notification) {
|
|
231
|
+
console.debug('[PushClient/onNotification] ', notification);
|
|
232
|
+
// TODO: evaluate message OR app state and decide
|
|
233
|
+
return {
|
|
234
|
+
shouldPlaySound: true,
|
|
235
|
+
shouldSetBadge: true,
|
|
236
|
+
shouldShowBanner: true,
|
|
237
|
+
shouldShowList: true
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
onNotificationSuccess(notificationId) {
|
|
241
|
+
console.debug('[PushClient/onNotificationSuccess] ', notificationId);
|
|
242
|
+
}
|
|
243
|
+
onNotificationError(notificationId, error) {
|
|
244
|
+
console.debug('[PushClient/onNotificationError] ', notificationId);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
exports.PushClient = PushClient;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PushProvider = PushProvider;
|
|
4
|
+
const hooks_1 = require("@nascentdigital/funnel-ui/hooks");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const AppServiceClient_1 = require("../../app/rn/AppServiceClient");
|
|
7
|
+
const core_1 = require("../../identity/core");
|
|
8
|
+
const PushClient_1 = require("./PushClient");
|
|
9
|
+
const PushContext_1 = require("./PushContext");
|
|
10
|
+
// container
|
|
11
|
+
function PushProvider({ children }) {
|
|
12
|
+
// bind context
|
|
13
|
+
const pushClient = (0, react_1.useMemo)(() => new PushClient_1.PushClient({}), []);
|
|
14
|
+
const context = (0, react_1.useMemo)(() => ({ pushClient }), [pushClient]);
|
|
15
|
+
const { identity } = (0, core_1.useIdentity)();
|
|
16
|
+
const touch = (0, hooks_1.useTouch)();
|
|
17
|
+
const { token } = pushClient;
|
|
18
|
+
// initialize push client on mount
|
|
19
|
+
(0, react_1.useEffect)(() => {
|
|
20
|
+
// handle connect
|
|
21
|
+
pushClient.connect()
|
|
22
|
+
.then(touch);
|
|
23
|
+
// disconnect on unmount
|
|
24
|
+
return () => pushClient.disconnect();
|
|
25
|
+
}, [pushClient, touch]);
|
|
26
|
+
// sync token
|
|
27
|
+
(0, react_1.useEffect)(() => {
|
|
28
|
+
// sync push if we have authenticated identity + a token
|
|
29
|
+
if (token && identity && identity instanceof core_1.AuthenticatedIdentity) {
|
|
30
|
+
AppServiceClient_1.AppServiceClient
|
|
31
|
+
.post({
|
|
32
|
+
apiToken: identity.apiToken,
|
|
33
|
+
id: '_nd-push',
|
|
34
|
+
method: 'subscribe.expo',
|
|
35
|
+
data: token.data
|
|
36
|
+
})
|
|
37
|
+
.then(() => console.error('[PushProvider] push token synced'))
|
|
38
|
+
.catch(e => console.error('[PushProvider] failed to sync expo push token', e));
|
|
39
|
+
}
|
|
40
|
+
}, [identity, token]);
|
|
41
|
+
// render
|
|
42
|
+
return (<PushContext_1.PushContext.Provider value={context}>
|
|
43
|
+
{children}
|
|
44
|
+
</PushContext_1.PushContext.Provider>);
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../domain"), exports);
|
|
18
|
+
__exportStar(require("./PushProvider"), exports);
|
|
19
|
+
__exportStar(require("./usePushClient"), exports);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePossiblePushClient = usePossiblePushClient;
|
|
4
|
+
exports.usePushClient = usePushClient;
|
|
5
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
6
|
+
const hooks_1 = require("@nascentdigital/funnel-ui/hooks");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const PushContext_1 = require("./PushContext");
|
|
9
|
+
// hook
|
|
10
|
+
function usePossiblePushClient() {
|
|
11
|
+
// bind memos + hooks
|
|
12
|
+
const { pushClient } = (0, react_1.useContext)(PushContext_1.PushContext);
|
|
13
|
+
const touch = (0, hooks_1.useTouch)();
|
|
14
|
+
// bind worker
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
// skip if there's no client
|
|
17
|
+
if (!pushClient) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// bind client
|
|
21
|
+
const subscriptions = [
|
|
22
|
+
pushClient.state$.subscribe(() => touch()),
|
|
23
|
+
pushClient.token$.subscribe(() => touch()),
|
|
24
|
+
];
|
|
25
|
+
// clear subscription on unmount
|
|
26
|
+
return () => subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
27
|
+
}, [pushClient, touch]);
|
|
28
|
+
console.debug('[usePossiblePushClient] client:', pushClient);
|
|
29
|
+
// return client
|
|
30
|
+
return pushClient;
|
|
31
|
+
}
|
|
32
|
+
function usePushClient() {
|
|
33
|
+
// bind client (throw if not bound)
|
|
34
|
+
const client = usePossiblePushClient();
|
|
35
|
+
if (!client) {
|
|
36
|
+
throw new funnel_core_1.InvalidOperationError('Cannot access usePushClient() outside of PushProvider scope');
|
|
37
|
+
}
|
|
38
|
+
// return client
|
|
39
|
+
return client;
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./app/rn"), exports);
|
|
18
|
+
__exportStar(require("./auth0/rn"), exports);
|
|
19
|
+
__exportStar(require("./bridge/rn"), exports);
|
|
20
|
+
__exportStar(require("./identity/rn"), exports);
|
|
21
|
+
__exportStar(require("./nav/rn"), exports);
|
|
22
|
+
__exportStar(require("./push/rn"), exports);
|
|
23
|
+
__exportStar(require("./ui/rn"), exports);
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { Breakpoint, Breakpoints, PixelSize } from '@nascentdigital/funnel-core';
|
|
2
|
+
import type { Config } from 'tailwindcss';
|
|
3
|
+
export declare namespace Tailwind {
|
|
4
|
+
type CreateConfigArgs = {
|
|
5
|
+
content?: string[];
|
|
6
|
+
colors?: Record<string, string>;
|
|
7
|
+
safelist?: Config['safelist'];
|
|
8
|
+
};
|
|
9
|
+
function createConfig({ content, colors, safelist }: CreateConfigArgs): {
|
|
10
|
+
presets: any[];
|
|
11
|
+
content: string[];
|
|
12
|
+
safelist: import("tailwindcss/types/config").SafelistConfig[];
|
|
13
|
+
theme: {
|
|
14
|
+
screens: Record<Breakpoint, string>;
|
|
15
|
+
spacing: {
|
|
16
|
+
l1: string;
|
|
17
|
+
l2: string;
|
|
18
|
+
l3: string;
|
|
19
|
+
l4: string;
|
|
20
|
+
l5: string;
|
|
21
|
+
l6: string;
|
|
22
|
+
l7: string;
|
|
23
|
+
l8: string;
|
|
24
|
+
l9: string;
|
|
25
|
+
l10: string;
|
|
26
|
+
l11: string;
|
|
27
|
+
l12: string;
|
|
28
|
+
l13: string;
|
|
29
|
+
l14: string;
|
|
30
|
+
l15: string;
|
|
31
|
+
l16: string;
|
|
32
|
+
l17: string;
|
|
33
|
+
l18: string;
|
|
34
|
+
l19: string;
|
|
35
|
+
touchable: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
"screen-md": `${number}px`;
|
|
38
|
+
"screen-sm": `${number}px`;
|
|
39
|
+
"screen-lg": `${number}px`;
|
|
40
|
+
"screen-xs": `${number}px`;
|
|
41
|
+
"screen-xl": `${number}px`;
|
|
42
|
+
initial: string;
|
|
43
|
+
revert: string;
|
|
44
|
+
unset: string;
|
|
45
|
+
'0': string;
|
|
46
|
+
px: string;
|
|
47
|
+
};
|
|
48
|
+
zIndex: {
|
|
49
|
+
tooltip: string;
|
|
50
|
+
popup: string;
|
|
51
|
+
dialogFab: string;
|
|
52
|
+
dialog: string;
|
|
53
|
+
superbackdrop: string;
|
|
54
|
+
superheader: string;
|
|
55
|
+
header: string;
|
|
56
|
+
subheader: string;
|
|
57
|
+
backdrop: string;
|
|
58
|
+
fab: string;
|
|
59
|
+
superoverlay: string;
|
|
60
|
+
overlay: string;
|
|
61
|
+
supersurface: string;
|
|
62
|
+
surface: string;
|
|
63
|
+
tint: string;
|
|
64
|
+
background: string;
|
|
65
|
+
};
|
|
66
|
+
rotate: {
|
|
67
|
+
'0': string;
|
|
68
|
+
'45': string;
|
|
69
|
+
'90': string;
|
|
70
|
+
'135': string;
|
|
71
|
+
'180': string;
|
|
72
|
+
'225': string;
|
|
73
|
+
'270': string;
|
|
74
|
+
'315': string;
|
|
75
|
+
};
|
|
76
|
+
aspectRatio: {
|
|
77
|
+
auto: string;
|
|
78
|
+
square: string;
|
|
79
|
+
camera: string;
|
|
80
|
+
cameraAlt: string;
|
|
81
|
+
video: string;
|
|
82
|
+
phone: string;
|
|
83
|
+
tv: string;
|
|
84
|
+
tvAlt: string;
|
|
85
|
+
computer: string;
|
|
86
|
+
widescreen: string;
|
|
87
|
+
cinema: string;
|
|
88
|
+
cinemascope: string;
|
|
89
|
+
};
|
|
90
|
+
colors: {
|
|
91
|
+
inherit: string;
|
|
92
|
+
current: string;
|
|
93
|
+
transparent: string;
|
|
94
|
+
};
|
|
95
|
+
opacity: {
|
|
96
|
+
l1: string;
|
|
97
|
+
l2: string;
|
|
98
|
+
l3: string;
|
|
99
|
+
l4: string;
|
|
100
|
+
l5: string;
|
|
101
|
+
hover: string;
|
|
102
|
+
focus: string;
|
|
103
|
+
press: string;
|
|
104
|
+
press_invert: string;
|
|
105
|
+
drag: string;
|
|
106
|
+
disabled: string;
|
|
107
|
+
faded: string;
|
|
108
|
+
backdrop: string;
|
|
109
|
+
none: string;
|
|
110
|
+
full: string;
|
|
111
|
+
};
|
|
112
|
+
fontFamily: {};
|
|
113
|
+
leading: {
|
|
114
|
+
none: string;
|
|
115
|
+
tight: string;
|
|
116
|
+
normal: string;
|
|
117
|
+
loose: string;
|
|
118
|
+
};
|
|
119
|
+
borderWidth: {
|
|
120
|
+
DEFAULT: string;
|
|
121
|
+
'0': string;
|
|
122
|
+
'2': string;
|
|
123
|
+
'3': string;
|
|
124
|
+
'4': string;
|
|
125
|
+
'8': string;
|
|
126
|
+
};
|
|
127
|
+
borderRadius: {
|
|
128
|
+
DEFAULT: string;
|
|
129
|
+
none: string;
|
|
130
|
+
xs: string;
|
|
131
|
+
sm: string;
|
|
132
|
+
md: string;
|
|
133
|
+
lg: string;
|
|
134
|
+
xl: string;
|
|
135
|
+
full: string;
|
|
136
|
+
};
|
|
137
|
+
boxShadow: {
|
|
138
|
+
none: string;
|
|
139
|
+
l1: string;
|
|
140
|
+
l2: string;
|
|
141
|
+
l3: string;
|
|
142
|
+
l4: string;
|
|
143
|
+
l5: string;
|
|
144
|
+
l6: string;
|
|
145
|
+
popup: string;
|
|
146
|
+
menu: string;
|
|
147
|
+
card: string;
|
|
148
|
+
};
|
|
149
|
+
extend: {
|
|
150
|
+
animation: {
|
|
151
|
+
'spin-slow': string;
|
|
152
|
+
};
|
|
153
|
+
content: {
|
|
154
|
+
empty: string;
|
|
155
|
+
};
|
|
156
|
+
transitionDuration: {
|
|
157
|
+
'150': string;
|
|
158
|
+
'250': string;
|
|
159
|
+
'350': string;
|
|
160
|
+
'400': string;
|
|
161
|
+
'450': string;
|
|
162
|
+
'500': string;
|
|
163
|
+
'600': string;
|
|
164
|
+
'800': string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
plugins: any[];
|
|
169
|
+
};
|
|
170
|
+
function toPixel(value: number): PixelSize;
|
|
171
|
+
function getScreens(breakpoints: Breakpoints): Record<Breakpoint, string>;
|
|
172
|
+
type ScreenSize = `screen-${Breakpoint}`;
|
|
173
|
+
function getScreenSizes(breakpoints: Breakpoints): Record<ScreenSize, PixelSize>;
|
|
174
|
+
function transformToRGB(colors: Record<string, string>): Record<string, string>;
|
|
175
|
+
}
|