@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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSpec = useSpec;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const hooks_1 = require("@nascentdigital/funnel-ui/hooks");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const SpecSourceContext_1 = require("./SpecSourceContext");
|
|
8
|
+
// hook
|
|
9
|
+
function useSpec() {
|
|
10
|
+
// bind context
|
|
11
|
+
const { specSource } = (0, react_1.useContext)(SpecSourceContext_1.SpecSourceContext);
|
|
12
|
+
const touch = (0, hooks_1.useTouch)();
|
|
13
|
+
// sync on touch
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
// skip if there's not source
|
|
16
|
+
if (!specSource) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// touch when result changes
|
|
20
|
+
const subscription = specSource.result$.subscribe(touch);
|
|
21
|
+
// unsubscribe on unmount
|
|
22
|
+
return () => subscription.unsubscribe();
|
|
23
|
+
}, [specSource, touch]);
|
|
24
|
+
// throw if the there's no source
|
|
25
|
+
if (!specSource) {
|
|
26
|
+
throw new funnel_core_1.InvalidOperationError('Attempt to call useSpec() outside of SpecSourceContext');
|
|
27
|
+
}
|
|
28
|
+
// return spec (might be undefined)
|
|
29
|
+
return specSource.result;
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Screen } from './Screen';
|
|
2
|
+
import type { Tabs } from './Tabs';
|
|
3
|
+
import type { Stack } from './Stack';
|
|
4
|
+
export declare class Modal {
|
|
5
|
+
readonly __type: "modal";
|
|
6
|
+
readonly variant: Modal.Variant;
|
|
7
|
+
readonly content: Modal.Content;
|
|
8
|
+
constructor(args: Modal.ConstructorArgs);
|
|
9
|
+
toData(): Modal.Data;
|
|
10
|
+
toJSON(): any;
|
|
11
|
+
static create(args: Modal.ConstructorArgs): Modal;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Modal {
|
|
14
|
+
type Variant = 'full' | 'partial';
|
|
15
|
+
type Content = Stack | Tabs | Screen;
|
|
16
|
+
type Data = {
|
|
17
|
+
__type: 'modal';
|
|
18
|
+
variant: Variant;
|
|
19
|
+
content: Stack.Data | Tabs.Data | Screen.Data;
|
|
20
|
+
};
|
|
21
|
+
type ConstructorArgs = {
|
|
22
|
+
variant?: Variant;
|
|
23
|
+
content: Content;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Modal = void 0;
|
|
4
|
+
// class
|
|
5
|
+
class Modal {
|
|
6
|
+
constructor(args) {
|
|
7
|
+
var _a;
|
|
8
|
+
this.__type = 'modal';
|
|
9
|
+
// initialize instance variables
|
|
10
|
+
this.variant = (_a = args.variant) !== null && _a !== void 0 ? _a : 'full';
|
|
11
|
+
this.content = args.content;
|
|
12
|
+
}
|
|
13
|
+
toData() {
|
|
14
|
+
const { __type, variant, content } = this;
|
|
15
|
+
return {
|
|
16
|
+
__type,
|
|
17
|
+
variant,
|
|
18
|
+
content: content.toJSON()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
toJSON() {
|
|
22
|
+
return JSON.parse(JSON.stringify(this.toData()));
|
|
23
|
+
}
|
|
24
|
+
static create(args) {
|
|
25
|
+
return new Modal(args);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Modal = Modal;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StringKeyOf } from 'type-fest';
|
|
2
|
+
import type { Modal } from './Modal';
|
|
3
|
+
import type { Tabs } from './Tabs';
|
|
4
|
+
import type { Stack } from './Stack';
|
|
5
|
+
export type Navigation = Record<string, Navigation.Item>;
|
|
6
|
+
export declare namespace Navigation {
|
|
7
|
+
type Item = Stack | Tabs | Modal;
|
|
8
|
+
namespace Item {
|
|
9
|
+
type Data = Stack.Data | Tabs.Data | Modal.Data;
|
|
10
|
+
}
|
|
11
|
+
type Root<TNavigation extends Navigation = Navigation> = StringKeyOf<TNavigation>;
|
|
12
|
+
type Data = Record<string, Navigation.Item.Data>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type NavigationCommand = NavigationCommand.Push | NavigationCommand.Replace | NavigationCommand.Back;
|
|
2
|
+
export declare namespace NavigationCommand {
|
|
3
|
+
type Push = {
|
|
4
|
+
__type: 'push';
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
type Replace = {
|
|
8
|
+
__type: 'replace';
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
type Back = {
|
|
12
|
+
__type: 'back';
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Navigation } from './Navigation';
|
|
2
|
+
import { Screen } from './Screen';
|
|
3
|
+
export type Route = {
|
|
4
|
+
readonly navigation: ReadonlyArray<Route.Component>;
|
|
5
|
+
readonly screen: Screen;
|
|
6
|
+
};
|
|
7
|
+
export declare namespace Route {
|
|
8
|
+
type Component = {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly navigation: Navigation.Item;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Routes = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
// namespace
|
|
6
|
+
var Routes;
|
|
7
|
+
(function (Routes) {
|
|
8
|
+
// helpers
|
|
9
|
+
function fromSpec(spec) {
|
|
10
|
+
// create routes + context
|
|
11
|
+
const routes = {};
|
|
12
|
+
// recursively process all spec navigation routes
|
|
13
|
+
Object.entries(spec.navigation)
|
|
14
|
+
.forEach(([id, item]) => walkItem(id, item, { routes, navigation: [] }));
|
|
15
|
+
// return routes
|
|
16
|
+
return routes;
|
|
17
|
+
}
|
|
18
|
+
Routes.fromSpec = fromSpec;
|
|
19
|
+
})(Routes || (exports.Routes = Routes = {}));
|
|
20
|
+
function walkItem(id, item, context) {
|
|
21
|
+
// process item
|
|
22
|
+
switch (item.__type) {
|
|
23
|
+
case 'tabs':
|
|
24
|
+
return walkTabs(id, item, context);
|
|
25
|
+
case 'stack':
|
|
26
|
+
return walkStack(id, item, context);
|
|
27
|
+
case 'modal':
|
|
28
|
+
return walkModal(id, item, context);
|
|
29
|
+
case 'screen':
|
|
30
|
+
return walkScreen(item, context);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function walkTabs(id, tabs, { routes, navigation }) {
|
|
34
|
+
// create new context
|
|
35
|
+
const context = {
|
|
36
|
+
routes,
|
|
37
|
+
navigation: [...navigation, { id, navigation: tabs }]
|
|
38
|
+
};
|
|
39
|
+
// walk each tab
|
|
40
|
+
Object.entries(tabs.items)
|
|
41
|
+
.forEach(([key, item]) => walkItem(key, item.content, context));
|
|
42
|
+
}
|
|
43
|
+
function walkStack(id, stack, { routes, navigation }) {
|
|
44
|
+
// create new context
|
|
45
|
+
const context = {
|
|
46
|
+
routes,
|
|
47
|
+
navigation: [...navigation, { id, navigation: stack }]
|
|
48
|
+
};
|
|
49
|
+
// walk each item in stack
|
|
50
|
+
Object.entries(stack.items)
|
|
51
|
+
.forEach(([key, item]) => walkItem(key, item.content, context));
|
|
52
|
+
}
|
|
53
|
+
function walkModal(id, modal, { routes, navigation }) {
|
|
54
|
+
// fail if not first item
|
|
55
|
+
if (navigation.length !== 0) {
|
|
56
|
+
throw new funnel_core_1.IllegalStateError('Modal instances can only be a navigation root');
|
|
57
|
+
}
|
|
58
|
+
// recurse over content
|
|
59
|
+
walkItem('root', modal.content, {
|
|
60
|
+
routes,
|
|
61
|
+
navigation: [...navigation, { id, navigation: modal }]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function walkScreen(screen, { routes, navigation }) {
|
|
65
|
+
// fail if screen is root
|
|
66
|
+
if (navigation.length === 0) {
|
|
67
|
+
throw new funnel_core_1.IllegalStateError('Screen instances can\'t be used as a navigation root');
|
|
68
|
+
}
|
|
69
|
+
// bind screen to routes
|
|
70
|
+
routes[screen.route] = {
|
|
71
|
+
navigation,
|
|
72
|
+
screen
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Skeleton } from './Skeleton';
|
|
2
|
+
export declare class Screen {
|
|
3
|
+
readonly __type: "screen";
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly route: string;
|
|
6
|
+
readonly skeleton?: Skeleton;
|
|
7
|
+
constructor(args: Screen.ConstructorArgs);
|
|
8
|
+
toData(): Screen.Data;
|
|
9
|
+
toJSON(): any;
|
|
10
|
+
static create(args: Screen.ConstructorArgs): Screen;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace Screen {
|
|
13
|
+
type Data = {
|
|
14
|
+
__type: 'screen';
|
|
15
|
+
id: string;
|
|
16
|
+
route: string;
|
|
17
|
+
skeleton?: Skeleton;
|
|
18
|
+
};
|
|
19
|
+
type ConstructorArgs = {
|
|
20
|
+
id: string;
|
|
21
|
+
route: string;
|
|
22
|
+
skeleton?: Skeleton;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Screen = void 0;
|
|
4
|
+
class Screen {
|
|
5
|
+
constructor(args) {
|
|
6
|
+
this.__type = 'screen';
|
|
7
|
+
// initialize instance variables
|
|
8
|
+
this.id = args.id;
|
|
9
|
+
this.route = args.route;
|
|
10
|
+
this.skeleton = args.skeleton;
|
|
11
|
+
}
|
|
12
|
+
toData() {
|
|
13
|
+
const { __type, id, route, skeleton } = this;
|
|
14
|
+
return {
|
|
15
|
+
__type,
|
|
16
|
+
id,
|
|
17
|
+
route,
|
|
18
|
+
skeleton
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
toJSON() {
|
|
22
|
+
return JSON.parse(JSON.stringify(this.toData()));
|
|
23
|
+
}
|
|
24
|
+
static create(args) {
|
|
25
|
+
return new Screen(args);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Screen = Screen;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Skeleton = {
|
|
2
|
+
padding?: number | [number, number];
|
|
3
|
+
background?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
items: ReadonlyArray<Skeleton.Item>;
|
|
6
|
+
};
|
|
7
|
+
export declare namespace Skeleton {
|
|
8
|
+
type Item = Text | Image;
|
|
9
|
+
type Text = {
|
|
10
|
+
__type: 'text';
|
|
11
|
+
width?: string | number;
|
|
12
|
+
lines?: number;
|
|
13
|
+
lineGap?: number;
|
|
14
|
+
size?: number;
|
|
15
|
+
radius?: number;
|
|
16
|
+
margin?: number;
|
|
17
|
+
};
|
|
18
|
+
type Image = {
|
|
19
|
+
__type: 'image';
|
|
20
|
+
width?: string | number;
|
|
21
|
+
height?: number;
|
|
22
|
+
aspectRatio?: number;
|
|
23
|
+
radius?: number;
|
|
24
|
+
margin?: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AppService } from '../../app/domain';
|
|
2
|
+
import type { Navigation } from './Navigation';
|
|
3
|
+
export declare class Spec<TNavigation extends Navigation = Navigation> {
|
|
4
|
+
readonly backgroundColor: string;
|
|
5
|
+
readonly skeletonColor: string;
|
|
6
|
+
readonly root: Navigation.Root<TNavigation>;
|
|
7
|
+
readonly navigation: Readonly<TNavigation>;
|
|
8
|
+
constructor(args: Spec.ConstructorArgs<TNavigation>);
|
|
9
|
+
static fromData<TNavigation extends Navigation = Navigation>(data: Spec.Data): Spec<TNavigation>;
|
|
10
|
+
toData(): Spec.Data;
|
|
11
|
+
toJSON(): any;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Spec {
|
|
14
|
+
type Request = Request.GetSpec;
|
|
15
|
+
namespace Request {
|
|
16
|
+
const appId: "_nd-nav";
|
|
17
|
+
type AppId = typeof appId;
|
|
18
|
+
type GetSpec = AppService.Request<AppId, typeof GetSpecMethod, null>;
|
|
19
|
+
const GetSpecMethod: "getSpec";
|
|
20
|
+
}
|
|
21
|
+
type Data = {
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
skeletonColor: string;
|
|
24
|
+
root: string;
|
|
25
|
+
navigation: Navigation.Data;
|
|
26
|
+
};
|
|
27
|
+
type ConstructorArgs<TNavigation extends Navigation = Navigation> = {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
skeletonColor: string;
|
|
30
|
+
root: Navigation.Root<TNavigation>;
|
|
31
|
+
navigation: TNavigation;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Spec = void 0;
|
|
4
|
+
const Modal_1 = require("./Modal");
|
|
5
|
+
const Screen_1 = require("./Screen");
|
|
6
|
+
const Stack_1 = require("./Stack");
|
|
7
|
+
const Tabs_1 = require("./Tabs");
|
|
8
|
+
// class
|
|
9
|
+
class Spec {
|
|
10
|
+
constructor(args) {
|
|
11
|
+
// initialize instance variables
|
|
12
|
+
this.backgroundColor = args.backgroundColor;
|
|
13
|
+
this.skeletonColor = args.skeletonColor;
|
|
14
|
+
this.root = args.root;
|
|
15
|
+
this.navigation = args.navigation;
|
|
16
|
+
}
|
|
17
|
+
static fromData(data) {
|
|
18
|
+
return parseSpec(data);
|
|
19
|
+
}
|
|
20
|
+
toData() {
|
|
21
|
+
const { backgroundColor, skeletonColor, root, navigation } = this;
|
|
22
|
+
return {
|
|
23
|
+
backgroundColor,
|
|
24
|
+
skeletonColor,
|
|
25
|
+
root,
|
|
26
|
+
navigation: Object.entries(navigation).reduce((data, [key, itemRaw]) => {
|
|
27
|
+
// map item
|
|
28
|
+
const item = itemRaw;
|
|
29
|
+
data[key] = item.toData();
|
|
30
|
+
// keep reducing
|
|
31
|
+
return data;
|
|
32
|
+
}, {})
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
toJSON() {
|
|
36
|
+
return JSON.parse(JSON.stringify(this.toData()));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Spec = Spec;
|
|
40
|
+
// extension
|
|
41
|
+
(function (Spec) {
|
|
42
|
+
let Request;
|
|
43
|
+
(function (Request) {
|
|
44
|
+
// app id
|
|
45
|
+
Request.appId = '_nd-nav';
|
|
46
|
+
Request.GetSpecMethod = 'getSpec';
|
|
47
|
+
})(Request = Spec.Request || (Spec.Request = {}));
|
|
48
|
+
})(Spec || (exports.Spec = Spec = {}));
|
|
49
|
+
// helpers
|
|
50
|
+
function parseSpec({ backgroundColor, skeletonColor, root, navigation }) {
|
|
51
|
+
return new Spec({
|
|
52
|
+
backgroundColor,
|
|
53
|
+
skeletonColor,
|
|
54
|
+
root,
|
|
55
|
+
navigation: Object.entries(navigation).reduce((navigation, [key, itemData]) => {
|
|
56
|
+
// map next item
|
|
57
|
+
navigation[key] = parseItem(itemData);
|
|
58
|
+
// keep reducing
|
|
59
|
+
return navigation;
|
|
60
|
+
}, {})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function parseItem(data) {
|
|
64
|
+
switch (data.__type) {
|
|
65
|
+
case 'tabs':
|
|
66
|
+
return parseTabs(data);
|
|
67
|
+
case 'stack':
|
|
68
|
+
return parseStack(data);
|
|
69
|
+
case 'modal':
|
|
70
|
+
return parseModal(data);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function parseTabs({ variant, items }) {
|
|
74
|
+
return new Tabs_1.Tabs({
|
|
75
|
+
variant,
|
|
76
|
+
items: Object.entries(items).reduce((items, [key, itemData]) => {
|
|
77
|
+
// map next item
|
|
78
|
+
const { label, content } = itemData;
|
|
79
|
+
items[key] = {
|
|
80
|
+
label,
|
|
81
|
+
icon: {},
|
|
82
|
+
content: content.__type === 'screen'
|
|
83
|
+
? parseScreen(content)
|
|
84
|
+
: parseStack(content)
|
|
85
|
+
};
|
|
86
|
+
// keep reducing
|
|
87
|
+
return items;
|
|
88
|
+
}, {})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function parseStack({ root, items }) {
|
|
92
|
+
return new Stack_1.Stack({
|
|
93
|
+
root,
|
|
94
|
+
items: Object.entries(items).reduce((items, [key, itemData]) => {
|
|
95
|
+
// map next item
|
|
96
|
+
const { label, content } = itemData;
|
|
97
|
+
items[key] = {
|
|
98
|
+
label,
|
|
99
|
+
content: content.__type === 'screen'
|
|
100
|
+
? parseScreen(content)
|
|
101
|
+
: parseTabs(content)
|
|
102
|
+
};
|
|
103
|
+
// keep reducing
|
|
104
|
+
return items;
|
|
105
|
+
}, {})
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function parseModal({ variant, content }) {
|
|
109
|
+
return new Modal_1.Modal({
|
|
110
|
+
variant,
|
|
111
|
+
content: content.__type === 'screen'
|
|
112
|
+
? parseScreen(content)
|
|
113
|
+
: content.__type === 'stack'
|
|
114
|
+
? parseStack(content)
|
|
115
|
+
: parseTabs(content)
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function parseScreen({ id, route, skeleton }) {
|
|
119
|
+
return new Screen_1.Screen({
|
|
120
|
+
id,
|
|
121
|
+
route,
|
|
122
|
+
skeleton
|
|
123
|
+
});
|
|
124
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Result } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import type { Identity } from '../../identity/domain';
|
|
4
|
+
import type { Profile } from '../../profile/domain';
|
|
5
|
+
import type { Navigation } from './Navigation';
|
|
6
|
+
import type { Spec } from './Spec';
|
|
7
|
+
export interface SpecSource<TNavigation extends Navigation = Navigation> {
|
|
8
|
+
readonly result$: Observable<Result<Spec<TNavigation>>>;
|
|
9
|
+
readonly result: Result<Spec<TNavigation>>;
|
|
10
|
+
sync(args: SpecSource.Sync.Args): Promise<Result.Completion<Spec<TNavigation>>>;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace SpecSource {
|
|
13
|
+
namespace Sync {
|
|
14
|
+
type Args = {
|
|
15
|
+
identity?: Identity;
|
|
16
|
+
profile?: Profile;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function get(): SpecSource<Navigation>;
|
|
20
|
+
function set(provider: SpecSource): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpecSource = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
// extension
|
|
6
|
+
var SpecSource;
|
|
7
|
+
(function (SpecSource) {
|
|
8
|
+
// helpers
|
|
9
|
+
function get() {
|
|
10
|
+
// throw if already set
|
|
11
|
+
if (!_provider) {
|
|
12
|
+
throw new funnel_core_1.InvalidOperationError('Attempt to access AppNav.SpecSource before binding');
|
|
13
|
+
}
|
|
14
|
+
// set client
|
|
15
|
+
return _provider;
|
|
16
|
+
}
|
|
17
|
+
SpecSource.get = get;
|
|
18
|
+
function set(provider) {
|
|
19
|
+
// throw if already set
|
|
20
|
+
if (_provider) {
|
|
21
|
+
throw new funnel_core_1.InvalidOperationError('Cannot bind AppNav.SpecSource multiple times');
|
|
22
|
+
}
|
|
23
|
+
// set client
|
|
24
|
+
_provider = provider;
|
|
25
|
+
}
|
|
26
|
+
SpecSource.set = set;
|
|
27
|
+
})(SpecSource || (exports.SpecSource = SpecSource = {}));
|
|
28
|
+
let _provider = undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StringKeyOf } from 'type-fest';
|
|
2
|
+
import type { Screen } from './Screen';
|
|
3
|
+
import type { Tabs } from './Tabs';
|
|
4
|
+
export declare class Stack<TItems extends Stack.Items = Stack.Items> {
|
|
5
|
+
readonly __type: "stack";
|
|
6
|
+
readonly root: StringKeyOf<TItems>;
|
|
7
|
+
readonly items: Readonly<TItems>;
|
|
8
|
+
constructor(args: Stack.ConstructorArgs<TItems>);
|
|
9
|
+
toData(): Stack.Data;
|
|
10
|
+
toJSON(): any;
|
|
11
|
+
static create<TItems extends Stack.Items>(args: Stack.ConstructorArgs<TItems>): Stack<TItems>;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Stack {
|
|
14
|
+
type Items = Record<string, Item>;
|
|
15
|
+
type Item = {
|
|
16
|
+
label: string;
|
|
17
|
+
content: Content;
|
|
18
|
+
};
|
|
19
|
+
namespace Item {
|
|
20
|
+
type Data = {
|
|
21
|
+
label: string;
|
|
22
|
+
content: Tabs.Data | Screen.Data;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
type Content = Tabs | Screen;
|
|
26
|
+
type Data = {
|
|
27
|
+
__type: 'stack';
|
|
28
|
+
root: string;
|
|
29
|
+
items: Record<string, Item.Data>;
|
|
30
|
+
};
|
|
31
|
+
type ConstructorArgs<TItems extends Items = Items> = {
|
|
32
|
+
root: StringKeyOf<TItems>;
|
|
33
|
+
items: Readonly<TItems>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Stack = void 0;
|
|
15
|
+
// class
|
|
16
|
+
class Stack {
|
|
17
|
+
constructor(args) {
|
|
18
|
+
this.__type = 'stack';
|
|
19
|
+
// initialize instance variables
|
|
20
|
+
this.root = args.root;
|
|
21
|
+
this.items = args.items;
|
|
22
|
+
}
|
|
23
|
+
toData() {
|
|
24
|
+
const { __type, root, items } = this;
|
|
25
|
+
return {
|
|
26
|
+
__type,
|
|
27
|
+
root,
|
|
28
|
+
items: Object.entries(items).reduce((data, [key, itemRaw]) => {
|
|
29
|
+
// map item
|
|
30
|
+
const _a = itemRaw, { content } = _a, item = __rest(_a, ["content"]);
|
|
31
|
+
data[key] = Object.assign(Object.assign({}, item), { content: content.toData() });
|
|
32
|
+
// keep reducing
|
|
33
|
+
return data;
|
|
34
|
+
}, {})
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
toJSON() {
|
|
38
|
+
return JSON.parse(JSON.stringify(this.toData()));
|
|
39
|
+
}
|
|
40
|
+
static create(args) {
|
|
41
|
+
return new Stack(args);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.Stack = Stack;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Icon } from './Icon';
|
|
2
|
+
import type { Screen } from './Screen';
|
|
3
|
+
import type { Stack } from './Stack';
|
|
4
|
+
export declare class Tabs {
|
|
5
|
+
readonly __type: "tabs";
|
|
6
|
+
readonly variant: Tabs.Variant;
|
|
7
|
+
readonly items: Readonly<Tabs.Items>;
|
|
8
|
+
constructor(args: Tabs.ConstructorArgs);
|
|
9
|
+
toData(): Tabs.Data;
|
|
10
|
+
toJSON(): any;
|
|
11
|
+
static create(args: Tabs.ConstructorArgs): Tabs;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Tabs {
|
|
14
|
+
type Variant = 'bottom' | 'top';
|
|
15
|
+
type Items = Record<string, Item>;
|
|
16
|
+
type Item = {
|
|
17
|
+
label: string;
|
|
18
|
+
icon: Icon;
|
|
19
|
+
content: Content;
|
|
20
|
+
};
|
|
21
|
+
namespace Item {
|
|
22
|
+
type Data = {
|
|
23
|
+
label: string;
|
|
24
|
+
content: Stack.Data | Screen.Data;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
type Content = Stack | Screen;
|
|
28
|
+
type Data = {
|
|
29
|
+
__type: 'tabs';
|
|
30
|
+
variant: Variant;
|
|
31
|
+
items: Record<string, Item.Data>;
|
|
32
|
+
};
|
|
33
|
+
type ConstructorArgs = {
|
|
34
|
+
variant?: Variant;
|
|
35
|
+
items: Items;
|
|
36
|
+
};
|
|
37
|
+
}
|