@ohos-ports/react-native-navigation 8.9.0-beta.0
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/LICENSE +21 -0
- package/README.md +37 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt +212 -0
- package/lib/module/ARCHITECTURE.md +331 -0
- package/lib/module/Mock/Application.js +33 -0
- package/lib/module/Mock/Application.js.map +1 -0
- package/lib/module/Mock/ComponentProps.js +4 -0
- package/lib/module/Mock/ComponentProps.js.map +1 -0
- package/lib/module/Mock/Components/BottomTabs.js +16 -0
- package/lib/module/Mock/Components/BottomTabs.js.map +1 -0
- package/lib/module/Mock/Components/ComponentScreen.js +101 -0
- package/lib/module/Mock/Components/ComponentScreen.js.map +1 -0
- package/lib/module/Mock/Components/LayoutComponent.js +50 -0
- package/lib/module/Mock/Components/LayoutComponent.js.map +1 -0
- package/lib/module/Mock/Components/Modals.js +22 -0
- package/lib/module/Mock/Components/Modals.js.map +1 -0
- package/lib/module/Mock/Components/NavigationButton.js +72 -0
- package/lib/module/Mock/Components/NavigationButton.js.map +1 -0
- package/lib/module/Mock/Components/Overlays.js +23 -0
- package/lib/module/Mock/Components/Overlays.js.map +1 -0
- package/lib/module/Mock/Components/SideMenu.js +29 -0
- package/lib/module/Mock/Components/SideMenu.js.map +1 -0
- package/lib/module/Mock/Components/Stack.js +18 -0
- package/lib/module/Mock/Components/Stack.js.map +1 -0
- package/lib/module/Mock/Components/TopBar.js +81 -0
- package/lib/module/Mock/Components/TopBar.js.map +1 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js +30 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js.map +1 -0
- package/lib/module/Mock/Layouts/ComponentNode.js +102 -0
- package/lib/module/Mock/Layouts/ComponentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js +28 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js.map +1 -0
- package/lib/module/Mock/Layouts/Node.js +14 -0
- package/lib/module/Mock/Layouts/Node.js.map +1 -0
- package/lib/module/Mock/Layouts/ParentNode.js +66 -0
- package/lib/module/Mock/Layouts/ParentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/SideMenu.js +72 -0
- package/lib/module/Mock/Layouts/SideMenu.js.map +1 -0
- package/lib/module/Mock/Layouts/StackNode.js +12 -0
- package/lib/module/Mock/Layouts/StackNode.js.map +1 -0
- package/lib/module/Mock/Stores/EventsStore.js +53 -0
- package/lib/module/Mock/Stores/EventsStore.js.map +1 -0
- package/lib/module/Mock/Stores/LayoutStore.js +176 -0
- package/lib/module/Mock/Stores/LayoutStore.js.map +1 -0
- package/lib/module/Mock/actions/layoutActions.js +19 -0
- package/lib/module/Mock/actions/layoutActions.js.map +1 -0
- package/lib/module/Mock/connect.js +8 -0
- package/lib/module/Mock/connect.js.map +1 -0
- package/lib/module/Mock/constants.js +5 -0
- package/lib/module/Mock/constants.js.map +1 -0
- package/lib/module/Mock/index.js +20 -0
- package/lib/module/Mock/index.js.map +1 -0
- package/lib/module/Mock/mocks/AppRegistryService.js +6 -0
- package/lib/module/Mock/mocks/AppRegistryService.js.map +1 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js +146 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js.map +1 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js +103 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js.map +1 -0
- package/lib/module/Navigation.js +250 -0
- package/lib/module/Navigation.js.map +1 -0
- package/lib/module/NavigationDelegate.js +210 -0
- package/lib/module/NavigationDelegate.js.map +1 -0
- package/lib/module/adapters/AndroidCustomRowForwarder.js +75 -0
- package/lib/module/adapters/AndroidCustomRowForwarder.js.map +1 -0
- package/lib/module/adapters/AppRegistryService.js +9 -0
- package/lib/module/adapters/AppRegistryService.js.map +1 -0
- package/lib/module/adapters/AssetResolver.js +9 -0
- package/lib/module/adapters/AssetResolver.js.map +1 -0
- package/lib/module/adapters/ColorService.js +9 -0
- package/lib/module/adapters/ColorService.js.map +1 -0
- package/lib/module/adapters/Constants.js +19 -0
- package/lib/module/adapters/Constants.js.map +1 -0
- package/lib/module/adapters/NativeCommandsSender.js +60 -0
- package/lib/module/adapters/NativeCommandsSender.js.map +1 -0
- package/lib/module/adapters/NativeEventsReceiver.js +65 -0
- package/lib/module/adapters/NativeEventsReceiver.js.map +1 -0
- package/lib/module/adapters/NativeEventsReceiver.mock.js +6 -0
- package/lib/module/adapters/NativeEventsReceiver.mock.js.map +1 -0
- package/lib/module/adapters/NativeRNNTurboEventEmitter.js +7 -0
- package/lib/module/adapters/NativeRNNTurboEventEmitter.js.map +1 -0
- package/lib/module/adapters/NativeRNNTurboModule.js +6 -0
- package/lib/module/adapters/NativeRNNTurboModule.js.map +1 -0
- package/lib/module/adapters/TouchablePreview.js +115 -0
- package/lib/module/adapters/TouchablePreview.js.map +1 -0
- package/lib/module/adapters/UniqueIdProvider.js +9 -0
- package/lib/module/adapters/UniqueIdProvider.js.map +1 -0
- package/lib/module/commands/Commands.js +241 -0
- package/lib/module/commands/Commands.js.map +1 -0
- package/lib/module/commands/Commands.test.js +759 -0
- package/lib/module/commands/Commands.test.js.map +1 -0
- package/lib/module/commands/Deprecations.js +66 -0
- package/lib/module/commands/Deprecations.js.map +1 -0
- package/lib/module/commands/LayoutTreeCrawler.js +32 -0
- package/lib/module/commands/LayoutTreeCrawler.js.map +1 -0
- package/lib/module/commands/LayoutTreeCrawler.test.js +82 -0
- package/lib/module/commands/LayoutTreeCrawler.test.js.map +1 -0
- package/lib/module/commands/LayoutTreeParser.js +130 -0
- package/lib/module/commands/LayoutTreeParser.js.map +1 -0
- package/lib/module/commands/LayoutTreeParser.test.js +359 -0
- package/lib/module/commands/LayoutTreeParser.test.js.map +1 -0
- package/lib/module/commands/LayoutType.js +16 -0
- package/lib/module/commands/LayoutType.js.map +1 -0
- package/lib/module/commands/LayoutType.test.js +12 -0
- package/lib/module/commands/LayoutType.test.js.map +1 -0
- package/lib/module/commands/OptionsCrawler.js +72 -0
- package/lib/module/commands/OptionsCrawler.js.map +1 -0
- package/lib/module/commands/OptionsCrawler.test.js +351 -0
- package/lib/module/commands/OptionsCrawler.test.js.map +1 -0
- package/lib/module/commands/OptionsProcessor.js +300 -0
- package/lib/module/commands/OptionsProcessor.js.map +1 -0
- package/lib/module/commands/OptionsProcessor.test.js +1234 -0
- package/lib/module/commands/OptionsProcessor.test.js.map +1 -0
- package/lib/module/components/ComponentRegistry.js +25 -0
- package/lib/module/components/ComponentRegistry.js.map +1 -0
- package/lib/module/components/ComponentRegistry.test.js +57 -0
- package/lib/module/components/ComponentRegistry.test.js.map +1 -0
- package/lib/module/components/ComponentWrapper.js +80 -0
- package/lib/module/components/ComponentWrapper.js.map +1 -0
- package/lib/module/components/ComponentWrapper.test.js +333 -0
- package/lib/module/components/ComponentWrapper.test.js.map +1 -0
- package/lib/module/components/Modal.js +125 -0
- package/lib/module/components/Modal.js.map +1 -0
- package/lib/module/components/Store.js +71 -0
- package/lib/module/components/Store.js.map +1 -0
- package/lib/module/components/Store.test.js +148 -0
- package/lib/module/components/Store.test.js.map +1 -0
- package/lib/module/events/CommandsObserver.js +19 -0
- package/lib/module/events/CommandsObserver.js.map +1 -0
- package/lib/module/events/CommandsObserver.test.js +43 -0
- package/lib/module/events/CommandsObserver.test.js.map +1 -0
- package/lib/module/events/ComponentEventsObserver.js +94 -0
- package/lib/module/events/ComponentEventsObserver.js.map +1 -0
- package/lib/module/events/ComponentEventsObserver.test.js +391 -0
- package/lib/module/events/ComponentEventsObserver.test.js.map +1 -0
- package/lib/module/events/EventsRegistry.js +64 -0
- package/lib/module/events/EventsRegistry.js.map +1 -0
- package/lib/module/events/EventsRegistry.test.js +131 -0
- package/lib/module/events/EventsRegistry.test.js.map +1 -0
- package/lib/module/index.js +22 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/interfaces/CommandName.js +22 -0
- package/lib/module/interfaces/CommandName.js.map +1 -0
- package/lib/module/interfaces/ComponentEvents.js +2 -0
- package/lib/module/interfaces/ComponentEvents.js.map +1 -0
- package/lib/module/interfaces/EventSubscription.js +2 -0
- package/lib/module/interfaces/EventSubscription.js.map +1 -0
- package/lib/module/interfaces/Events.js +2 -0
- package/lib/module/interfaces/Events.js.map +1 -0
- package/lib/module/interfaces/Layout.js +4 -0
- package/lib/module/interfaces/Layout.js.map +1 -0
- package/lib/module/interfaces/NavigationComponent.js +21 -0
- package/lib/module/interfaces/NavigationComponent.js.map +1 -0
- package/lib/module/interfaces/NavigationComponentListener.js +4 -0
- package/lib/module/interfaces/NavigationComponentListener.js.map +1 -0
- package/lib/module/interfaces/NavigationComponentProps.js +2 -0
- package/lib/module/interfaces/NavigationComponentProps.js.map +1 -0
- package/lib/module/interfaces/NavigationFunctionComponent.js +4 -0
- package/lib/module/interfaces/NavigationFunctionComponent.js.map +1 -0
- package/lib/module/interfaces/Options.js +47 -0
- package/lib/module/interfaces/Options.js.map +1 -0
- package/lib/module/interfaces/ProcessorSubscription.js +2 -0
- package/lib/module/interfaces/ProcessorSubscription.js.map +1 -0
- package/lib/module/interfaces/Processors.js +4 -0
- package/lib/module/interfaces/Processors.js.map +1 -0
- package/lib/module/linking/DeferredLinkQueue.js +52 -0
- package/lib/module/linking/DeferredLinkQueue.js.map +1 -0
- package/lib/module/linking/DeferredLinkQueue.test.js +54 -0
- package/lib/module/linking/DeferredLinkQueue.test.js.map +1 -0
- package/lib/module/linking/LinkingHandler.js +139 -0
- package/lib/module/linking/LinkingHandler.js.map +1 -0
- package/lib/module/linking/LinkingHandler.test.js +384 -0
- package/lib/module/linking/LinkingHandler.test.js.map +1 -0
- package/lib/module/linking/ModalLayoutBuilder.js +56 -0
- package/lib/module/linking/ModalLayoutBuilder.js.map +1 -0
- package/lib/module/linking/ModalLayoutBuilder.test.js +154 -0
- package/lib/module/linking/ModalLayoutBuilder.test.js.map +1 -0
- package/lib/module/linking/RouteMatcher.js +104 -0
- package/lib/module/linking/RouteMatcher.js.map +1 -0
- package/lib/module/linking/RouteMatcher.test.js +164 -0
- package/lib/module/linking/RouteMatcher.test.js.map +1 -0
- package/lib/module/linking/URLParser.js +56 -0
- package/lib/module/linking/URLParser.js.map +1 -0
- package/lib/module/linking/URLParser.test.js +100 -0
- package/lib/module/linking/URLParser.test.js.map +1 -0
- package/lib/module/linking/types.js +4 -0
- package/lib/module/linking/types.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/processors/LayoutProcessor.js +15 -0
- package/lib/module/processors/LayoutProcessor.js.map +1 -0
- package/lib/module/processors/LayoutProcessor.test.js +53 -0
- package/lib/module/processors/LayoutProcessor.test.js.map +1 -0
- package/lib/module/processors/LayoutProcessorsStore.js +18 -0
- package/lib/module/processors/LayoutProcessorsStore.js.map +1 -0
- package/lib/module/processors/LayoutProcessorsStore.test.js +31 -0
- package/lib/module/processors/LayoutProcessorsStore.test.js.map +1 -0
- package/lib/module/processors/OptionProcessorsStore.js +19 -0
- package/lib/module/processors/OptionProcessorsStore.js.map +1 -0
- package/lib/module/processors/OptionProcessorsStore.test.js +31 -0
- package/lib/module/processors/OptionProcessorsStore.test.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/Mock/Application.d.ts +30 -0
- package/lib/typescript/Mock/Application.d.ts.map +1 -0
- package/lib/typescript/Mock/ComponentProps.d.ts +6 -0
- package/lib/typescript/Mock/ComponentProps.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/BottomTabs.d.ts +47 -0
- package/lib/typescript/Mock/Components/BottomTabs.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/ComponentScreen.d.ts +29 -0
- package/lib/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/LayoutComponent.d.ts +47 -0
- package/lib/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/Modals.d.ts +47 -0
- package/lib/typescript/Mock/Components/Modals.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/NavigationButton.d.ts +58 -0
- package/lib/typescript/Mock/Components/NavigationButton.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/Overlays.d.ts +47 -0
- package/lib/typescript/Mock/Components/Overlays.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/SideMenu.d.ts +179 -0
- package/lib/typescript/Mock/Components/SideMenu.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/Stack.d.ts +47 -0
- package/lib/typescript/Mock/Components/Stack.d.ts.map +1 -0
- package/lib/typescript/Mock/Components/TopBar.d.ts +37 -0
- package/lib/typescript/Mock/Components/TopBar.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts +9 -0
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts +16 -0
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts +9 -0
- package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/Node.d.ts +16 -0
- package/lib/typescript/Mock/Layouts/Node.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts +21 -0
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts +32 -0
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -0
- package/lib/typescript/Mock/Layouts/StackNode.d.ts +6 -0
- package/lib/typescript/Mock/Layouts/StackNode.d.ts.map +1 -0
- package/lib/typescript/Mock/Stores/EventsStore.d.ts +22 -0
- package/lib/typescript/Mock/Stores/EventsStore.d.ts.map +1 -0
- package/lib/typescript/Mock/Stores/LayoutStore.d.ts +2 -0
- package/lib/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -0
- package/lib/typescript/Mock/actions/layoutActions.d.ts +6 -0
- package/lib/typescript/Mock/actions/layoutActions.d.ts.map +1 -0
- package/lib/typescript/Mock/connect.d.ts +2 -0
- package/lib/typescript/Mock/connect.d.ts.map +1 -0
- package/lib/typescript/Mock/constants.d.ts +3 -0
- package/lib/typescript/Mock/constants.d.ts.map +1 -0
- package/lib/typescript/Mock/index.d.ts +4 -0
- package/lib/typescript/Mock/index.d.ts.map +1 -0
- package/lib/typescript/Mock/mocks/AppRegistryService.d.ts +5 -0
- package/lib/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts +28 -0
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts +21 -0
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/Navigation.d.ts +152 -0
- package/lib/typescript/Navigation.d.ts.map +1 -0
- package/lib/typescript/NavigationDelegate.d.ts +128 -0
- package/lib/typescript/NavigationDelegate.d.ts.map +1 -0
- package/lib/typescript/adapters/AndroidCustomRowForwarder.d.ts +23 -0
- package/lib/typescript/adapters/AndroidCustomRowForwarder.d.ts.map +1 -0
- package/lib/typescript/adapters/AppRegistryService.d.ts +5 -0
- package/lib/typescript/adapters/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/adapters/AssetResolver.d.ts +5 -0
- package/lib/typescript/adapters/AssetResolver.d.ts.map +1 -0
- package/lib/typescript/adapters/ColorService.d.ts +4 -0
- package/lib/typescript/adapters/ColorService.d.ts.map +1 -0
- package/lib/typescript/adapters/Constants.d.ts +17 -0
- package/lib/typescript/adapters/Constants.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeCommandsSender.d.ts +62 -0
- package/lib/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.d.ts +23 -0
- package/lib/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts +2 -0
- package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts +8 -0
- package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboModule.d.ts +28 -0
- package/lib/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
- package/lib/typescript/adapters/TouchablePreview.d.ts +44 -0
- package/lib/typescript/adapters/TouchablePreview.d.ts.map +1 -0
- package/lib/typescript/adapters/UniqueIdProvider.d.ts +4 -0
- package/lib/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.d.ts +41 -0
- package/lib/typescript/commands/Commands.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.test.d.ts +2 -0
- package/lib/typescript/commands/Commands.test.d.ts.map +1 -0
- package/lib/typescript/commands/Deprecations.d.ts +10 -0
- package/lib/typescript/commands/Deprecations.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.d.ts +25 -0
- package/lib/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts +2 -0
- package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.d.ts +17 -0
- package/lib/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.test.d.ts +2 -0
- package/lib/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.d.ts +13 -0
- package/lib/typescript/commands/LayoutType.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.test.d.ts +2 -0
- package/lib/typescript/commands/LayoutType.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.d.ts +20 -0
- package/lib/typescript/commands/OptionsCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.test.d.ts +2 -0
- package/lib/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.d.ts +40 -0
- package/lib/typescript/commands/OptionsProcessor.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.test.d.ts +2 -0
- package/lib/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.d.ts +14 -0
- package/lib/typescript/components/ComponentRegistry.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.test.d.ts +2 -0
- package/lib/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.d.ts +13 -0
- package/lib/typescript/components/ComponentWrapper.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.test.d.ts +2 -0
- package/lib/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
- package/lib/typescript/components/Modal.d.ts +21 -0
- package/lib/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/components/Store.d.ts +27 -0
- package/lib/typescript/components/Store.d.ts.map +1 -0
- package/lib/typescript/components/Store.test.d.ts +2 -0
- package/lib/typescript/components/Store.test.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.d.ts +11 -0
- package/lib/typescript/events/CommandsObserver.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.test.d.ts +2 -0
- package/lib/typescript/events/CommandsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.d.ts +29 -0
- package/lib/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.test.d.ts +2 -0
- package/lib/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.d.ts +34 -0
- package/lib/typescript/events/EventsRegistry.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.test.d.ts +2 -0
- package/lib/typescript/events/EventsRegistry.test.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +19 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/interfaces/CommandName.d.ts +19 -0
- package/lib/typescript/interfaces/CommandName.d.ts.map +1 -0
- package/lib/typescript/interfaces/ComponentEvents.d.ts +43 -0
- package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
- package/lib/typescript/interfaces/EventSubscription.d.ts +4 -0
- package/lib/typescript/interfaces/EventSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Events.d.ts +16 -0
- package/lib/typescript/interfaces/Events.d.ts.map +1 -0
- package/lib/typescript/interfaces/Layout.d.ts +190 -0
- package/lib/typescript/interfaces/Layout.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponent.d.ts +22 -0
- package/lib/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentListener.d.ts +14 -0
- package/lib/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentProps.d.ts +11 -0
- package/lib/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts +7 -0
- package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
- package/lib/typescript/interfaces/Options.d.ts +1738 -0
- package/lib/typescript/interfaces/Options.d.ts.map +1 -0
- package/lib/typescript/interfaces/ProcessorSubscription.d.ts +4 -0
- package/lib/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Processors.d.ts +9 -0
- package/lib/typescript/interfaces/Processors.d.ts.map +1 -0
- package/lib/typescript/linking/DeferredLinkQueue.d.ts +26 -0
- package/lib/typescript/linking/DeferredLinkQueue.d.ts.map +1 -0
- package/lib/typescript/linking/DeferredLinkQueue.test.d.ts +2 -0
- package/lib/typescript/linking/DeferredLinkQueue.test.d.ts.map +1 -0
- package/lib/typescript/linking/LinkingHandler.d.ts +71 -0
- package/lib/typescript/linking/LinkingHandler.d.ts.map +1 -0
- package/lib/typescript/linking/LinkingHandler.test.d.ts +2 -0
- package/lib/typescript/linking/LinkingHandler.test.d.ts.map +1 -0
- package/lib/typescript/linking/ModalLayoutBuilder.d.ts +21 -0
- package/lib/typescript/linking/ModalLayoutBuilder.d.ts.map +1 -0
- package/lib/typescript/linking/ModalLayoutBuilder.test.d.ts +2 -0
- package/lib/typescript/linking/ModalLayoutBuilder.test.d.ts.map +1 -0
- package/lib/typescript/linking/RouteMatcher.d.ts +23 -0
- package/lib/typescript/linking/RouteMatcher.d.ts.map +1 -0
- package/lib/typescript/linking/RouteMatcher.test.d.ts +2 -0
- package/lib/typescript/linking/RouteMatcher.test.d.ts.map +1 -0
- package/lib/typescript/linking/URLParser.d.ts +16 -0
- package/lib/typescript/linking/URLParser.d.ts.map +1 -0
- package/lib/typescript/linking/URLParser.test.d.ts +2 -0
- package/lib/typescript/linking/URLParser.test.d.ts.map +1 -0
- package/lib/typescript/linking/types.d.ts +107 -0
- package/lib/typescript/linking/types.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/processors/LayoutProcessor.d.ts +9 -0
- package/lib/typescript/processors/LayoutProcessor.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessor.test.d.ts +2 -0
- package/lib/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.d.ts +9 -0
- package/lib/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts +2 -0
- package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.d.ts +9 -0
- package/lib/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.test.d.ts +2 -0
- package/lib/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +5 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Application.d.ts +30 -0
- package/lib/typescript/typescript/Mock/Application.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/ComponentProps.d.ts +6 -0
- package/lib/typescript/typescript/Mock/ComponentProps.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/BottomTabs.d.ts +47 -0
- package/lib/typescript/typescript/Mock/Components/BottomTabs.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/ComponentScreen.d.ts +29 -0
- package/lib/typescript/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/LayoutComponent.d.ts +47 -0
- package/lib/typescript/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/Modals.d.ts +47 -0
- package/lib/typescript/typescript/Mock/Components/Modals.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/NavigationButton.d.ts +58 -0
- package/lib/typescript/typescript/Mock/Components/NavigationButton.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/Overlays.d.ts +47 -0
- package/lib/typescript/typescript/Mock/Components/Overlays.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/SideMenu.d.ts +179 -0
- package/lib/typescript/typescript/Mock/Components/SideMenu.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/Stack.d.ts +47 -0
- package/lib/typescript/typescript/Mock/Components/Stack.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Components/TopBar.d.ts +37 -0
- package/lib/typescript/typescript/Mock/Components/TopBar.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/BottomTabsNode.d.ts +9 -0
- package/lib/typescript/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/ComponentNode.d.ts +16 -0
- package/lib/typescript/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/LayoutNodeFactory.d.ts +9 -0
- package/lib/typescript/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/Node.d.ts +16 -0
- package/lib/typescript/typescript/Mock/Layouts/Node.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/ParentNode.d.ts +21 -0
- package/lib/typescript/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/SideMenu.d.ts +32 -0
- package/lib/typescript/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Layouts/StackNode.d.ts +6 -0
- package/lib/typescript/typescript/Mock/Layouts/StackNode.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Stores/EventsStore.d.ts +22 -0
- package/lib/typescript/typescript/Mock/Stores/EventsStore.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/Stores/LayoutStore.d.ts +2 -0
- package/lib/typescript/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/actions/layoutActions.d.ts +6 -0
- package/lib/typescript/typescript/Mock/actions/layoutActions.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/connect.d.ts +2 -0
- package/lib/typescript/typescript/Mock/connect.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/constants.d.ts +3 -0
- package/lib/typescript/typescript/Mock/constants.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/index.d.ts +4 -0
- package/lib/typescript/typescript/Mock/index.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/mocks/AppRegistryService.d.ts +5 -0
- package/lib/typescript/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/mocks/NativeCommandsSender.d.ts +28 -0
- package/lib/typescript/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/typescript/Mock/mocks/NativeEventsReceiver.d.ts +21 -0
- package/lib/typescript/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/typescript/Navigation.d.ts +152 -0
- package/lib/typescript/typescript/Navigation.d.ts.map +1 -0
- package/lib/typescript/typescript/NavigationDelegate.d.ts +128 -0
- package/lib/typescript/typescript/NavigationDelegate.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/AndroidCustomRowForwarder.d.ts +23 -0
- package/lib/typescript/typescript/adapters/AndroidCustomRowForwarder.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/AppRegistryService.d.ts +5 -0
- package/lib/typescript/typescript/adapters/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/AssetResolver.d.ts +5 -0
- package/lib/typescript/typescript/adapters/AssetResolver.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/ColorService.d.ts +4 -0
- package/lib/typescript/typescript/adapters/ColorService.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/Constants.d.ts +17 -0
- package/lib/typescript/typescript/adapters/Constants.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/NativeCommandsSender.d.ts +62 -0
- package/lib/typescript/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/NativeEventsReceiver.d.ts +23 -0
- package/lib/typescript/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/NativeEventsReceiver.mock.d.ts +2 -0
- package/lib/typescript/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/NativeRNNTurboEventEmitter.d.ts +8 -0
- package/lib/typescript/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/NativeRNNTurboModule.d.ts +28 -0
- package/lib/typescript/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/TouchablePreview.d.ts +44 -0
- package/lib/typescript/typescript/adapters/TouchablePreview.d.ts.map +1 -0
- package/lib/typescript/typescript/adapters/UniqueIdProvider.d.ts +4 -0
- package/lib/typescript/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/Commands.d.ts +41 -0
- package/lib/typescript/typescript/commands/Commands.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/Commands.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/Commands.test.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/Deprecations.d.ts +10 -0
- package/lib/typescript/typescript/commands/Deprecations.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutTreeCrawler.d.ts +25 -0
- package/lib/typescript/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutTreeCrawler.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutTreeParser.d.ts +17 -0
- package/lib/typescript/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutTreeParser.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutType.d.ts +13 -0
- package/lib/typescript/typescript/commands/LayoutType.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/LayoutType.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/LayoutType.test.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/OptionsCrawler.d.ts +20 -0
- package/lib/typescript/typescript/commands/OptionsCrawler.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/OptionsCrawler.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/OptionsProcessor.d.ts +40 -0
- package/lib/typescript/typescript/commands/OptionsProcessor.d.ts.map +1 -0
- package/lib/typescript/typescript/commands/OptionsProcessor.test.d.ts +2 -0
- package/lib/typescript/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
- package/lib/typescript/typescript/components/ComponentRegistry.d.ts +14 -0
- package/lib/typescript/typescript/components/ComponentRegistry.d.ts.map +1 -0
- package/lib/typescript/typescript/components/ComponentRegistry.test.d.ts +2 -0
- package/lib/typescript/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
- package/lib/typescript/typescript/components/ComponentWrapper.d.ts +13 -0
- package/lib/typescript/typescript/components/ComponentWrapper.d.ts.map +1 -0
- package/lib/typescript/typescript/components/ComponentWrapper.test.d.ts +2 -0
- package/lib/typescript/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
- package/lib/typescript/typescript/components/Modal.d.ts +21 -0
- package/lib/typescript/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/typescript/components/Store.d.ts +27 -0
- package/lib/typescript/typescript/components/Store.d.ts.map +1 -0
- package/lib/typescript/typescript/components/Store.test.d.ts +2 -0
- package/lib/typescript/typescript/components/Store.test.d.ts.map +1 -0
- package/lib/typescript/typescript/events/CommandsObserver.d.ts +11 -0
- package/lib/typescript/typescript/events/CommandsObserver.d.ts.map +1 -0
- package/lib/typescript/typescript/events/CommandsObserver.test.d.ts +2 -0
- package/lib/typescript/typescript/events/CommandsObserver.test.d.ts.map +1 -0
- package/lib/typescript/typescript/events/ComponentEventsObserver.d.ts +29 -0
- package/lib/typescript/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
- package/lib/typescript/typescript/events/ComponentEventsObserver.test.d.ts +2 -0
- package/lib/typescript/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
- package/lib/typescript/typescript/events/EventsRegistry.d.ts +34 -0
- package/lib/typescript/typescript/events/EventsRegistry.d.ts.map +1 -0
- package/lib/typescript/typescript/events/EventsRegistry.test.d.ts +2 -0
- package/lib/typescript/typescript/events/EventsRegistry.test.d.ts.map +1 -0
- package/lib/typescript/typescript/index.d.ts +19 -0
- package/lib/typescript/typescript/index.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/CommandName.d.ts +19 -0
- package/lib/typescript/typescript/interfaces/CommandName.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/ComponentEvents.d.ts +43 -0
- package/lib/typescript/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/EventSubscription.d.ts +4 -0
- package/lib/typescript/typescript/interfaces/EventSubscription.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/Events.d.ts +16 -0
- package/lib/typescript/typescript/interfaces/Events.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/Layout.d.ts +190 -0
- package/lib/typescript/typescript/interfaces/Layout.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/NavigationComponent.d.ts +22 -0
- package/lib/typescript/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/NavigationComponentListener.d.ts +14 -0
- package/lib/typescript/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/NavigationComponentProps.d.ts +11 -0
- package/lib/typescript/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/NavigationFunctionComponent.d.ts +7 -0
- package/lib/typescript/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/Options.d.ts +1738 -0
- package/lib/typescript/typescript/interfaces/Options.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/ProcessorSubscription.d.ts +4 -0
- package/lib/typescript/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
- package/lib/typescript/typescript/interfaces/Processors.d.ts +9 -0
- package/lib/typescript/typescript/interfaces/Processors.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/DeferredLinkQueue.d.ts +26 -0
- package/lib/typescript/typescript/linking/DeferredLinkQueue.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/DeferredLinkQueue.test.d.ts +2 -0
- package/lib/typescript/typescript/linking/DeferredLinkQueue.test.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/LinkingHandler.d.ts +71 -0
- package/lib/typescript/typescript/linking/LinkingHandler.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/LinkingHandler.test.d.ts +2 -0
- package/lib/typescript/typescript/linking/LinkingHandler.test.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/ModalLayoutBuilder.d.ts +21 -0
- package/lib/typescript/typescript/linking/ModalLayoutBuilder.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/ModalLayoutBuilder.test.d.ts +2 -0
- package/lib/typescript/typescript/linking/ModalLayoutBuilder.test.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/RouteMatcher.d.ts +23 -0
- package/lib/typescript/typescript/linking/RouteMatcher.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/RouteMatcher.test.d.ts +2 -0
- package/lib/typescript/typescript/linking/RouteMatcher.test.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/URLParser.d.ts +16 -0
- package/lib/typescript/typescript/linking/URLParser.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/URLParser.test.d.ts +2 -0
- package/lib/typescript/typescript/linking/URLParser.test.d.ts.map +1 -0
- package/lib/typescript/typescript/linking/types.d.ts +107 -0
- package/lib/typescript/typescript/linking/types.d.ts.map +1 -0
- package/lib/typescript/typescript/package.json +1 -0
- package/lib/typescript/typescript/processors/LayoutProcessor.d.ts +9 -0
- package/lib/typescript/typescript/processors/LayoutProcessor.d.ts.map +1 -0
- package/lib/typescript/typescript/processors/LayoutProcessor.test.d.ts +2 -0
- package/lib/typescript/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
- package/lib/typescript/typescript/processors/LayoutProcessorsStore.d.ts +9 -0
- package/lib/typescript/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/typescript/processors/LayoutProcessorsStore.test.d.ts +2 -0
- package/lib/typescript/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/typescript/processors/OptionProcessorsStore.d.ts +9 -0
- package/lib/typescript/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/typescript/processors/OptionProcessorsStore.test.d.ts +2 -0
- package/lib/typescript/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/typescript/types.d.ts +5 -0
- package/lib/typescript/typescript/types.d.ts.map +1 -0
- package/package.json +56 -0
- package/scripts/setup-esm-shim.js +102 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NavigationRoot } from "./Navigation.js";
|
|
4
|
+
import { NativeCommandsSender } from "./adapters/NativeCommandsSender.js";
|
|
5
|
+
import { NativeEventsReceiver } from "./adapters/NativeEventsReceiver.js";
|
|
6
|
+
import { AppRegistryService } from "./adapters/AppRegistryService.js";
|
|
7
|
+
export class NavigationDelegate {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.concreteNavigation = this.createConcreteNavigation(new NativeCommandsSender(), new NativeEventsReceiver(), new AppRegistryService());
|
|
10
|
+
}
|
|
11
|
+
createConcreteNavigation(nativeCommandsSender, nativeEventsReceiver, appRegistryService) {
|
|
12
|
+
return new NavigationRoot(nativeCommandsSender, nativeEventsReceiver, appRegistryService);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Every navigation component in your app must be registered with a unique name.
|
|
17
|
+
* The component itself is a traditional React component extending React.Component.
|
|
18
|
+
*/
|
|
19
|
+
registerComponent(componentName, componentProvider, concreteComponentProvider) {
|
|
20
|
+
return this.concreteNavigation.registerComponent(componentName, componentProvider, concreteComponentProvider);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Adds an option processor which allows option interpolation by optionPath.
|
|
25
|
+
*/
|
|
26
|
+
addOptionProcessor(optionPath, processor) {
|
|
27
|
+
return this.concreteNavigation.addOptionProcessor(optionPath, processor);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Method to be invoked when a layout is processed and is about to be created. This can be used to change layout options or even inject props to components.
|
|
32
|
+
*/
|
|
33
|
+
addLayoutProcessor(processor) {
|
|
34
|
+
return this.concreteNavigation.addLayoutProcessor(processor);
|
|
35
|
+
}
|
|
36
|
+
setLazyComponentRegistrator(lazyRegistratorFn) {
|
|
37
|
+
this.concreteNavigation.setLazyComponentRegistrator(lazyRegistratorFn);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Utility helper function like registerComponent,
|
|
42
|
+
* wraps the provided component with a react-redux Provider with the passed redux store
|
|
43
|
+
* @deprecated
|
|
44
|
+
*/
|
|
45
|
+
registerComponentWithRedux(componentName, getComponentClassFunc, ReduxProvider, reduxStore) {
|
|
46
|
+
return this.concreteNavigation.registerComponentWithRedux(componentName, getComponentClassFunc, ReduxProvider, reduxStore);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Reset the app to a new layout
|
|
51
|
+
*/
|
|
52
|
+
setRoot(layout) {
|
|
53
|
+
return this.concreteNavigation.setRoot(layout);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Set default options to all screens. Useful for declaring a consistent style across the app.
|
|
58
|
+
*/
|
|
59
|
+
setDefaultOptions(options) {
|
|
60
|
+
this.concreteNavigation.setDefaultOptions(options);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Change a component's navigation options
|
|
65
|
+
*/
|
|
66
|
+
mergeOptions(componentId, options) {
|
|
67
|
+
this.concreteNavigation.mergeOptions(componentId, options);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Update a mounted component's props
|
|
72
|
+
*/
|
|
73
|
+
updateProps(componentId, props, callback) {
|
|
74
|
+
this.concreteNavigation.updateProps(componentId, props, callback);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Show a screen as a modal.
|
|
79
|
+
*/
|
|
80
|
+
showModal(layout) {
|
|
81
|
+
return this.concreteNavigation.showModal(layout);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
|
|
86
|
+
*/
|
|
87
|
+
dismissModal(componentId, mergeOptions) {
|
|
88
|
+
return this.concreteNavigation.dismissModal(componentId, mergeOptions);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Dismiss all Modals
|
|
93
|
+
*/
|
|
94
|
+
dismissAllModals(mergeOptions) {
|
|
95
|
+
return this.concreteNavigation.dismissAllModals(mergeOptions);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Push a new layout into this screen's navigation stack.
|
|
100
|
+
*/
|
|
101
|
+
push(componentId, layout) {
|
|
102
|
+
return this.concreteNavigation.push(componentId, layout);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Pop a component from the stack, regardless of it's position.
|
|
107
|
+
*/
|
|
108
|
+
pop(componentId, mergeOptions) {
|
|
109
|
+
return this.concreteNavigation.pop(componentId, mergeOptions);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Pop the stack to a given component
|
|
114
|
+
*/
|
|
115
|
+
popTo(componentId, mergeOptions) {
|
|
116
|
+
return this.concreteNavigation.popTo(componentId, mergeOptions);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Pop the component's stack to root.
|
|
121
|
+
*/
|
|
122
|
+
popToRoot(componentId, mergeOptions) {
|
|
123
|
+
return this.concreteNavigation.popToRoot(componentId, mergeOptions);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sets new root component to stack.
|
|
128
|
+
*/
|
|
129
|
+
setStackRoot(componentId, layout) {
|
|
130
|
+
return this.concreteNavigation.setStackRoot(componentId, layout);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Show overlay on top of the entire app
|
|
135
|
+
*/
|
|
136
|
+
showOverlay(layout) {
|
|
137
|
+
return this.concreteNavigation.showOverlay(layout);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* dismiss overlay by componentId
|
|
142
|
+
*/
|
|
143
|
+
dismissOverlay(componentId) {
|
|
144
|
+
return this.concreteNavigation.dismissOverlay(componentId);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* dismiss all overlays
|
|
149
|
+
*/
|
|
150
|
+
dismissAllOverlays() {
|
|
151
|
+
return this.concreteNavigation.dismissAllOverlays();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Resolves arguments passed on launch
|
|
156
|
+
*/
|
|
157
|
+
getLaunchArgs() {
|
|
158
|
+
return this.concreteNavigation.getLaunchArgs();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Configure deep link handling.
|
|
163
|
+
*/
|
|
164
|
+
setLinking(config) {
|
|
165
|
+
this.concreteNavigation.setLinking(config);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Manually feed a URL into the deep link pipeline.
|
|
170
|
+
*/
|
|
171
|
+
handleDeepLink(url) {
|
|
172
|
+
this.concreteNavigation.handleDeepLink(url);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Signal readiness to process deep links. Flushes any queued links.
|
|
177
|
+
*/
|
|
178
|
+
setLinkingReady(ready) {
|
|
179
|
+
this.concreteNavigation.setLinkingReady(ready);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Obtain the events registry instance
|
|
184
|
+
*/
|
|
185
|
+
events() {
|
|
186
|
+
return this.concreteNavigation.events();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Constants coming from native
|
|
191
|
+
*/
|
|
192
|
+
async constants() {
|
|
193
|
+
return await this.concreteNavigation.constants();
|
|
194
|
+
}
|
|
195
|
+
constantsSync() {
|
|
196
|
+
return this.concreteNavigation.constantsSync();
|
|
197
|
+
}
|
|
198
|
+
get TouchablePreview() {
|
|
199
|
+
return this.concreteNavigation.TouchablePreview;
|
|
200
|
+
}
|
|
201
|
+
mockNativeComponents(mockedNativeCommandsSender, mockedNativeEventsReceiver, mockedAppRegistryService) {
|
|
202
|
+
this.concreteNavigation = this.createConcreteNavigation(mockedNativeCommandsSender, mockedNativeEventsReceiver, mockedAppRegistryService);
|
|
203
|
+
}
|
|
204
|
+
get mock() {
|
|
205
|
+
return {
|
|
206
|
+
store: this.concreteNavigation.store
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=NavigationDelegate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NavigationRoot","NativeCommandsSender","NativeEventsReceiver","AppRegistryService","NavigationDelegate","constructor","concreteNavigation","createConcreteNavigation","nativeCommandsSender","nativeEventsReceiver","appRegistryService","registerComponent","componentName","componentProvider","concreteComponentProvider","addOptionProcessor","optionPath","processor","addLayoutProcessor","setLazyComponentRegistrator","lazyRegistratorFn","registerComponentWithRedux","getComponentClassFunc","ReduxProvider","reduxStore","setRoot","layout","setDefaultOptions","options","mergeOptions","componentId","updateProps","props","callback","showModal","dismissModal","dismissAllModals","push","pop","popTo","popToRoot","setStackRoot","showOverlay","dismissOverlay","dismissAllOverlays","getLaunchArgs","setLinking","config","handleDeepLink","url","setLinkingReady","ready","events","constants","constantsSync","TouchablePreview","mockNativeComponents","mockedNativeCommandsSender","mockedNativeEventsReceiver","mockedAppRegistryService","mock","store"],"sourceRoot":"../../src","sources":["NavigationDelegate.ts"],"mappings":";;AAQA,SAASA,cAAc,QAAQ,iBAAc;AAC7C,SAASC,oBAAoB,Q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;AACA;EACSC,eAAeA,CAACC,KAAc,EAAQ;IAC3C,IAAI,CAAC7C,kBAAkB,CAAC4C,eAAe,CAACC,KAAK,CAAC;EAChD;;EAEA;AACF;AACA;EACSC,MAAMA,CAAA,EAAmB;IAC9B,OAAO,IAAI,CAAC9C,kBAAkB,CAAC8C,MAAM,CAAC,CAAC;EACzC;;EAEA;AACF;AACA;EACE,MAAaC,SAASA,CAAA,EAAiC;IACrD,OAAO,MAAM,IAAI,CAAC/C,kBAAkB,CAAC+C,SAAS,CAAC,CAAC;EAClD;EAEOC,aAAaA,CAAA,EAAwB;IAC1C,OAAO,IAAI,CAAChD,kBAAkB,CAACgD,aAAa,CAAC,CAAC;EAChD;EAEA,IAAIC,gBAAgBA,CAAA,EAAG;IACrB,OAAO,IAAI,CAACjD,kBAAkB,CAACiD,gBAAgB;EACjD;EAEOC,oBAAoBA,CACzBC,0BAAgD,EAChDC,0BAAgD,EAChDC,wBAA4C,EAC5C;IACA,IAAI,CAACrD,kBAAkB,GAAG,IAAI,CAACC,wBAAwB,CACrDkD,0BAA0B,EAC1BC,0BAA0B,EAC1BC,wBACF,CAAC;EACH;EAEA,IAAWC,IAAIA,CAAA,EAAG;IAChB,OAAO;MACLC,KAAK,EAAE,IAAI,CAACvD,kBAAkB,CAACuD;IACjC,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
4
|
+
/**
|
|
5
|
+
* Walks a Layout / Options tree looking for `bottomTabs.customRow`
|
|
6
|
+
* configuration and forwards it to the Android-only native module
|
|
7
|
+
* `RNNBottomTabsCustomRowModule`.
|
|
8
|
+
*
|
|
9
|
+
* On iOS this is a no-op — the existing native options parser already picks
|
|
10
|
+
* up `bottomTabs.customRow` and applies it to the iOS custom row.
|
|
11
|
+
*
|
|
12
|
+
* The original layout/options object is *never* modified — both pipelines
|
|
13
|
+
* (iOS native parser, Android native parser which currently ignores the
|
|
14
|
+
* field) keep seeing the same data.
|
|
15
|
+
*/
|
|
16
|
+
export class AndroidCustomRowForwarder {
|
|
17
|
+
forwardFromLayout(layout) {
|
|
18
|
+
if (!this.shouldForward()) return;
|
|
19
|
+
const config = this.findCustomRowInLayout(layout);
|
|
20
|
+
if (config) this.send(config);
|
|
21
|
+
}
|
|
22
|
+
forwardFromLayouts(layouts) {
|
|
23
|
+
if (!this.shouldForward()) return;
|
|
24
|
+
for (const layout of layouts) {
|
|
25
|
+
const config = this.findCustomRowInLayout(layout);
|
|
26
|
+
if (config) {
|
|
27
|
+
this.send(config);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
forwardFromOptions(options) {
|
|
33
|
+
if (!this.shouldForward() || !options) return;
|
|
34
|
+
const config = this.extractFromOptions(options);
|
|
35
|
+
if (config) this.send(config);
|
|
36
|
+
}
|
|
37
|
+
shouldForward() {
|
|
38
|
+
return Platform.OS === 'android';
|
|
39
|
+
}
|
|
40
|
+
findCustomRowInLayout(layout) {
|
|
41
|
+
if (!layout || typeof layout !== 'object') return null;
|
|
42
|
+
// Walk both the raw layout shape (`layout.options`) and the
|
|
43
|
+
// post-`layoutTreeParser.parse` shape (`layout.data.options`).
|
|
44
|
+
const direct = this.extractFromOptions(layout.options) ?? this.extractFromOptions(layout.data?.options);
|
|
45
|
+
if (direct) return direct;
|
|
46
|
+
const children = layout.children;
|
|
47
|
+
if (Array.isArray(children)) {
|
|
48
|
+
for (const child of children) {
|
|
49
|
+
const found = this.findCustomRowInLayout(child);
|
|
50
|
+
if (found) return found;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
extractFromOptions(options) {
|
|
56
|
+
if (!options || typeof options !== 'object') return null;
|
|
57
|
+
const bottomTabs = options.bottomTabs;
|
|
58
|
+
if (!bottomTabs || typeof bottomTabs !== 'object') return null;
|
|
59
|
+
const customRow = bottomTabs.customRow;
|
|
60
|
+
if (!customRow || typeof customRow !== 'object') return null;
|
|
61
|
+
return customRow;
|
|
62
|
+
}
|
|
63
|
+
send(config) {
|
|
64
|
+
const nativeModule = NativeModules.RNNBottomTabsCustomRowModule;
|
|
65
|
+
if (!nativeModule || typeof nativeModule.configure !== 'function') {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
nativeModule.configure(config);
|
|
70
|
+
} catch {
|
|
71
|
+
// Native module not ready yet; attacher will pick up config on next rescan.
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=AndroidCustomRowForwarder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","AndroidCustomRowForwarder","forwardFromLayout","layout","shouldForward","config","findCustomRowInLayout","send","forwardFromLayouts","layouts","forwardFromOptions","options","extractFromOptions","OS","direct","data","children","Array","isArray","child","found","bottomTabs","customRow","nativeModule","RNNBottomTabsCustomRowModule","configure"],"sourceRoot":"../../../src","sources":["adapters/AndroidCustomRowForwarder.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAItD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,CAAC;EACrCC,iBAAiBA,CAACC,MAAW,EAAE;IAC7B,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,CAAC,EAAE;IAC3B,MAAMC,MAAM,GAAG,IAAI,CAACC,qBAAqB,CAACH,MAAM,CAAC;IACjD,IAAIE,MAAM,EAAE,IAAI,CAACE,IAAI,CAACF,MAAM,CAAC;EAC/B;EAEAG,kBAAkBA,CAACC,OAAc,EAAE;IACjC,IAAI,CAAC,IAAI,CAACL,aAAa,CAAC,CAAC,EAAE;IAC3B,KAAK,MAAMD,MAAM,IAAIM,OAAO,EAAE;MAC5B,MAAMJ,MAAM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I,OAAOA,UAAU,KAAK,QAAQ,EAAE,OAAO,IAAI;IAC9D,MAAMC,SAAS,GAAGD,UAAU,CAACC,SAAS;IACtC,IAAI,CAACA,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE,OAAO,IAAI;IAC5D,OAAOA,SAAS;EAClB;EAEQf,IAAIA,CAACF,MAAc,EAAQ;IACjC,MAAMkB,YAAY,GAAIxB,aAAa,CAASyB,4BAA4B;IACxE,IAAI,CAACD,YAAY,IAAI,OAAOA,YAAY,CAACE,SAAS,KAAK,UAAU,EAAE;MACjE;IACF;IACA,IAAI;MACFF,YAAY,CAACE,SAAS,CAACpB,MAAM,CAAC;IAChC,CAAC,CAAC,MAAM;MACN;IAAA;EAEJ;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AppRegistry","AppRegistryService","registerComponent","appKey","getComponentFunc"],"sourceRoot":"../../../src","sources":["adapters/AppRegistryService.ts"],"mappings":";;AAAA,SAA4BA,WAAW,QAAQ,cAAc;AAE7D,OAAO,MAAMC,kBAAkB,CAAC;EAC9BC,iBAAiBA,CAACC,MAAc,EAAEC,gBAAmC,EAAE;IACrEJ,WAAW,CAACE,iBAAiB,CAACC,MAAM,EAAEC,gBAAgB,CAAC;EACzD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Image","AssetService","resolveFromRequire","value","resolveAssetSource"],"sourceRoot":"../../../src","sources":["adapters/AssetResolver.ts"],"mappings":";;AAAA,SAASA,KAAK,QAA6B,cAAc;AAEzD,OAAO,MAAMC,YAAY,CAAC;EACxBC,kBAAkBA,CAACC,KAA0B,EAAE;IAC7C,OAAOH,KAAK,CAACI,kBAAkB,CAACD,KAAK,CAAC;EACxC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["processColor","ColorService","toNativeColor","inputColor"],"sourceRoot":"../../../src","sources":["adapters/ColorService.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,YAAY,CAAC;EACxBC,aAAaA,CAACC,UAAkB,EAAE;IAChC,OAAOH,YAAY,CAACG,UAAU,CAAC;EACjC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export class Constants {
|
|
4
|
+
static async get(nativeCommandSender) {
|
|
5
|
+
const constants = await nativeCommandSender.getNavigationConstants();
|
|
6
|
+
return new Constants(constants);
|
|
7
|
+
}
|
|
8
|
+
static getSync(nativeCommandSender) {
|
|
9
|
+
const constants = nativeCommandSender.getNavigationConstantsSync();
|
|
10
|
+
return new Constants(constants);
|
|
11
|
+
}
|
|
12
|
+
constructor(constants) {
|
|
13
|
+
this.statusBarHeight = constants.statusBarHeight;
|
|
14
|
+
this.topBarHeight = constants.topBarHeight;
|
|
15
|
+
this.backButtonId = constants.backButtonId;
|
|
16
|
+
this.bottomTabsHeight = constants.bottomTabsHeight;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=Constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Constants","get","nativeCommandSender","constants","getNavigationConstants","getSync","getNavigationConstantsSync","constructor","statusBarHeight","topBarHeight","backButtonId","bottomTabsHeight"],"sourceRoot":"../../../src","sources":["adapters/Constants.ts"],"mappings":";;AASA,OAAO,MAAMA,SAAS,CAAC;EACrB,aAAaC,GAAGA,CAACC,mBAAyC,EAAgC;IACxF,MAAMC,SAA8B,GAAG,MAAMD,mBAAmB,CAACE,sBAAsB,CAAC,CAAC;IACzF,OAAO,IAAIJ,SAAS,CAACG,SAAS,CAAC;EACjC;EAEA,OAAOE,OAAOA,CAACH,mBAAyC,EAAuB;IAC7E,MAAMC,SAA8B,GAAGD,mBAAmB,CAACI,0BAA0B,CAAC,CAAC;IACvF,OAAO,IAAIN,SAAS,CAACG,SAAS,CAAC;EACjC;EAOQI,WAAWA,CAACJ,SAA8B,EAAE;IAClD,IAAI,CAACK,eAAe,GAAGL,SAAS,CAACK,eAAe;IAChD,IAAI,CAACC,YAAY,GAAGN,SAAS,CAACM,YAAY;IAC1C,IAAI,CAACC,YAAY,GAAGP,SAAS,CAACO,YAAY;IAC1C,IAAI,CAACC,gBAAgB,GAAGR,SAAS,CAACQ,gBAAgB;EACpD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import RNNCommandsModule from "./NativeRNNTurboModule.js";
|
|
4
|
+
export class NativeCommandsSender {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.nativeCommandsModule = RNNCommandsModule;
|
|
7
|
+
}
|
|
8
|
+
setRoot(commandId, layout) {
|
|
9
|
+
return this.nativeCommandsModule.setRoot(commandId, layout);
|
|
10
|
+
}
|
|
11
|
+
setDefaultOptions(options) {
|
|
12
|
+
return this.nativeCommandsModule.setDefaultOptions(options);
|
|
13
|
+
}
|
|
14
|
+
mergeOptions(componentId, options) {
|
|
15
|
+
return this.nativeCommandsModule.mergeOptions(componentId, options);
|
|
16
|
+
}
|
|
17
|
+
push(commandId, onComponentId, layout) {
|
|
18
|
+
return this.nativeCommandsModule.push(commandId, onComponentId, layout);
|
|
19
|
+
}
|
|
20
|
+
pop(commandId, componentId, options) {
|
|
21
|
+
return this.nativeCommandsModule.pop(commandId, componentId, options);
|
|
22
|
+
}
|
|
23
|
+
popTo(commandId, componentId, options) {
|
|
24
|
+
return this.nativeCommandsModule.popTo(commandId, componentId, options);
|
|
25
|
+
}
|
|
26
|
+
popToRoot(commandId, componentId, options) {
|
|
27
|
+
return this.nativeCommandsModule.popToRoot(commandId, componentId, options);
|
|
28
|
+
}
|
|
29
|
+
setStackRoot(commandId, onComponentId, layout) {
|
|
30
|
+
return this.nativeCommandsModule.setStackRoot(commandId, onComponentId, layout);
|
|
31
|
+
}
|
|
32
|
+
showModal(commandId, layout) {
|
|
33
|
+
return this.nativeCommandsModule.showModal(commandId, layout);
|
|
34
|
+
}
|
|
35
|
+
dismissModal(commandId, componentId, options) {
|
|
36
|
+
return this.nativeCommandsModule.dismissModal(commandId, componentId, options);
|
|
37
|
+
}
|
|
38
|
+
dismissAllModals(commandId, options) {
|
|
39
|
+
return this.nativeCommandsModule.dismissAllModals(commandId, options);
|
|
40
|
+
}
|
|
41
|
+
showOverlay(commandId, layout) {
|
|
42
|
+
return this.nativeCommandsModule.showOverlay(commandId, layout);
|
|
43
|
+
}
|
|
44
|
+
dismissOverlay(commandId, componentId) {
|
|
45
|
+
return this.nativeCommandsModule.dismissOverlay(commandId, componentId);
|
|
46
|
+
}
|
|
47
|
+
dismissAllOverlays(commandId) {
|
|
48
|
+
return this.nativeCommandsModule.dismissAllOverlays(commandId);
|
|
49
|
+
}
|
|
50
|
+
getLaunchArgs(commandId) {
|
|
51
|
+
return this.nativeCommandsModule.getLaunchArgs(commandId);
|
|
52
|
+
}
|
|
53
|
+
getNavigationConstants() {
|
|
54
|
+
return Promise.resolve(this.nativeCommandsModule.getConstants());
|
|
55
|
+
}
|
|
56
|
+
getNavigationConstantsSync() {
|
|
57
|
+
return this.nativeCommandsModule.getConstants();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=NativeCommandsSender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RNNCommandsModule","NativeCommandsSender","constructor","nativeCommandsModule","setRoot","commandId","layout","setDefaultOptions","options","mergeOptions","componentId","push","onComponentId","pop","popTo","popToRoot","setStackRoot","showModal","dismissModal","dismissAllModals","showOverlay","dismissOverlay","dismissAllOverlays","getLaunchArgs","getNavigationConstants","Promise","resolve","getConstants","getNavigationConstantsSync"],"sourceRoot":"../../../src","sources":["adapters/NativeCommandsSender.ts"],"mappings":";;AACA,OAAOA,iBAAiB,MAAgB,2BAAwB;AAwBhE,OAAO,MAAMC,oBAAoB,CAAi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EventEmitter } from 'react-native';
|
|
4
|
+
import RNNEventEmitter from "./NativeRNNTurboEventEmitter.js";
|
|
5
|
+
export class NativeEventsReceiver {
|
|
6
|
+
constructor() {
|
|
7
|
+
try {
|
|
8
|
+
this.emitter = new NativeEventEmitter(RNNEventEmitter);
|
|
9
|
+
} catch (e) {
|
|
10
|
+
this.emitter = {
|
|
11
|
+
addListener: () => {
|
|
12
|
+
return {
|
|
13
|
+
remove: () => undefined
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
registerAppLaunchedListener(callback) {
|
|
20
|
+
return this.emitter.addListener('RNN.AppLaunched', callback);
|
|
21
|
+
}
|
|
22
|
+
registerComponentWillAppearListener(callback) {
|
|
23
|
+
return this.emitter.addListener('RNN.ComponentWillAppear', callback);
|
|
24
|
+
}
|
|
25
|
+
registerComponentDidAppearListener(callback) {
|
|
26
|
+
return this.emitter.addListener('RNN.ComponentDidAppear', callback);
|
|
27
|
+
}
|
|
28
|
+
registerComponentDidDisappearListener(callback) {
|
|
29
|
+
return this.emitter.addListener('RNN.ComponentDidDisappear', callback);
|
|
30
|
+
}
|
|
31
|
+
registerNavigationButtonPressedListener(callback) {
|
|
32
|
+
return this.emitter.addListener('RNN.NavigationButtonPressed', callback);
|
|
33
|
+
}
|
|
34
|
+
registerBottomTabPressedListener(callback) {
|
|
35
|
+
return this.emitter.addListener('RNN.BottomTabPressed', callback);
|
|
36
|
+
}
|
|
37
|
+
registerModalDismissedListener(callback) {
|
|
38
|
+
return this.emitter.addListener('RNN.ModalDismissed', callback);
|
|
39
|
+
}
|
|
40
|
+
registerModalAttemptedToDismissListener(callback) {
|
|
41
|
+
return this.emitter.addListener('RNN.ModalAttemptedToDismiss', callback);
|
|
42
|
+
}
|
|
43
|
+
registerSearchBarUpdatedListener(callback) {
|
|
44
|
+
return this.emitter.addListener('RNN.SearchBarUpdated', callback);
|
|
45
|
+
}
|
|
46
|
+
registerSearchBarCancelPressedListener(callback) {
|
|
47
|
+
return this.emitter.addListener('RNN.SearchBarCancelPressed', callback);
|
|
48
|
+
}
|
|
49
|
+
registerPreviewCompletedListener(callback) {
|
|
50
|
+
return this.emitter.addListener('RNN.PreviewCompleted', callback);
|
|
51
|
+
}
|
|
52
|
+
registerCommandCompletedListener(callback) {
|
|
53
|
+
return this.emitter.addListener('RNN.CommandCompleted', callback);
|
|
54
|
+
}
|
|
55
|
+
registerBottomTabSelectedListener(callback) {
|
|
56
|
+
return this.emitter.addListener('RNN.BottomTabSelected', callback);
|
|
57
|
+
}
|
|
58
|
+
registerBottomTabLongPressedListener(callback) {
|
|
59
|
+
return this.emitter.addListener('RNN.BottomTabLongPressed', callback);
|
|
60
|
+
}
|
|
61
|
+
registerScreenPoppedListener(callback) {
|
|
62
|
+
return this.emitter.addListener('RNN.ScreenPopped', callback);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=NativeEventsReceiver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","RNNEventEmitter","NativeEventsReceiver","constructor","emitter","e","addListener","remove","undefined","registerAppLaunchedListener","callback","registerComponentWillAppearListener","registerComponentDidAppearListener","registerComponentDidDisappearListener","registerNavigationButtonPressedListener","registerBottomTabPressedListener","registerModalDismissedListener","registerModalAttemptedToDismissListener","registerSearchBarUpdatedListener","registerSearchBarCancelPressedListener","registerPreviewCompletedListener","registerCommandCompletedListener","registerBottomTabSelectedListener","registerBottomTabLongPressedListener","registerScreenPoppedListener"],"sourceRoot":"../../../src","sources":["adapters/NativeEventsReceiver.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAA6B,cAAc;AAmBtE,OAAOC,eAAe,MAAM,iCAA8B;AAE1D,OAAO,MAAMC,oBAAoB,CAAC;EAEhCC,WAAWA,CAAA,EAAG;IACZ,IAAI;MACF,IAAI,CAACC,OAAO,GAAG,IAAIJ,kBAAkB,CAACC,eAAe,CAA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ACE,WAAW,CAAC,sBAAsB,EAAEI,QAAQ,CAAC;EACnE;EAEOS,sCAAsCA,CAC3CT,QAAsD,EACjC;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,4BAA4B,EAAEI,QAAQ,CAAC;EACzE;EAEOU,gCAAgCA,CACrCV,QAAgD,EAC3B;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,sBAAsB,EAAEI,QAAQ,CAAC;EACnE;EAEOW,gCAAgCA,CACrCX,QAA+C,EAC1B;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,sBAAsB,EAAEI,QAAQ,CAAC;EACnE;EAEOY,iCAAiCA,CACtCZ,QAAgD,EAC3B;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,uBAAuB,EAAEI,QAAQ,CAAC;EACpE;EAEOa,oCAAoCA,CACzCb,QAAmD,EAC9B;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,0BAA0B,EAAEI,QAAQ,CAAC;EACvE;EAEOc,4BAA4BA,CACjCd,QAA4C,EACvB;IACrB,OAAO,IAAI,CAACN,OAAO,CAACE,WAAW,CAAC,kBAAkB,EAAEI,QAAQ,CAAC;EAC/D;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeEventsReceiver","jest","genMockFromModule"],"sourceRoot":"../../../src","sources":["adapters/NativeEventsReceiver.mock.ts"],"mappings":";;AAAA,OAAO,MAAM;EAAEA;AAAqB,CAAC,GAAGC,IAAI,CAACC,iBAAiB,CAC5D,wBACF,CAA4C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","eventEmitter","get"],"sourceRoot":"../../../src","sources":["adapters/NativeRNNTurboEventEmitter.ts"],"mappings":";;AAAA,SAAsBA,mBAAmB,QAAsB,cAAc;AAO7E,IAAIC,YAAyB;AAC7BA,YAAY,GAAGD,mBAAmB,CAACE,GAAG,CAAO,sBAAsB,CAAC;AAGpE,eAAeD,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","commands","get"],"sourceRoot":"../../../src","sources":["adapters/NativeRNNTurboModule.ts"],"mappings":";;AAAA,SAAsBA,mBAAmB,QAAQ,cAAc;AA8C/D,MAAMC,QAAQ,GAAGD,mBAAmB,CAACE,GAAG,CAAO,gBAAgB,CAAE;AAEjE,eAAeD,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as PropTypes from 'prop-types';
|
|
5
|
+
import { View, Platform, findNodeHandle, TouchableNativeFeedback, TouchableWithoutFeedback } from 'react-native';
|
|
6
|
+
|
|
7
|
+
// Polyfill GestureResponderEvent type with additional `force` property (iOS)
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const PREVIEW_DELAY = 350;
|
|
10
|
+
const PREVIEW_MIN_FORCE = 0.1;
|
|
11
|
+
const PREVIEW_TIMEOUT = 1250;
|
|
12
|
+
export class TouchablePreview extends React.PureComponent {
|
|
13
|
+
static propTypes = {
|
|
14
|
+
children: PropTypes.node,
|
|
15
|
+
touchableComponent: PropTypes.func,
|
|
16
|
+
onPress: PropTypes.func,
|
|
17
|
+
onPressIn: PropTypes.func,
|
|
18
|
+
onPeekIn: PropTypes.func,
|
|
19
|
+
onPeekOut: PropTypes.func,
|
|
20
|
+
label: PropTypes.string
|
|
21
|
+
};
|
|
22
|
+
static defaultProps = {
|
|
23
|
+
touchableComponent: TouchableWithoutFeedback
|
|
24
|
+
};
|
|
25
|
+
static peeking = false;
|
|
26
|
+
touchStartedAt = 0;
|
|
27
|
+
onRef = /*#__PURE__*/React.createRef();
|
|
28
|
+
onPress = () => {
|
|
29
|
+
const {
|
|
30
|
+
onPress
|
|
31
|
+
} = this.props;
|
|
32
|
+
if (typeof onPress !== 'function' || TouchablePreview.peeking) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
return onPress();
|
|
36
|
+
};
|
|
37
|
+
onPressIn = () => {
|
|
38
|
+
if (Platform.OS === 'ios') {
|
|
39
|
+
const {
|
|
40
|
+
onPressIn
|
|
41
|
+
} = this.props;
|
|
42
|
+
if (!onPressIn) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const reactTag = findNodeHandle(this.onRef.current);
|
|
46
|
+
return onPressIn({
|
|
47
|
+
reactTag
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Other platforms don't support 3D Touch Preview API
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
onTouchStart = event => {
|
|
55
|
+
// Store a timestamp of the initial touch start
|
|
56
|
+
this.touchStartedAt = event.nativeEvent.timestamp;
|
|
57
|
+
};
|
|
58
|
+
onTouchMove = event => {
|
|
59
|
+
clearTimeout(this.timeout);
|
|
60
|
+
const {
|
|
61
|
+
force,
|
|
62
|
+
timestamp
|
|
63
|
+
} = event.nativeEvent;
|
|
64
|
+
const diff = timestamp - this.touchStartedAt;
|
|
65
|
+
if (force > PREVIEW_MIN_FORCE && diff > PREVIEW_DELAY) {
|
|
66
|
+
TouchablePreview.peeking = true;
|
|
67
|
+
if (typeof this.props.onPeekIn === 'function') {
|
|
68
|
+
this.props.onPeekIn();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//@ts-ignore
|
|
72
|
+
this.timeout = setTimeout(this.onTouchEnd, PREVIEW_TIMEOUT);
|
|
73
|
+
};
|
|
74
|
+
onTouchEnd = () => {
|
|
75
|
+
clearTimeout(this.timeout);
|
|
76
|
+
TouchablePreview.peeking = false;
|
|
77
|
+
if (typeof this.props.onPeekOut === 'function') {
|
|
78
|
+
this.props.onPeekOut();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
render() {
|
|
82
|
+
const {
|
|
83
|
+
children,
|
|
84
|
+
touchableComponent,
|
|
85
|
+
...props
|
|
86
|
+
} = this.props;
|
|
87
|
+
|
|
88
|
+
// Default to TouchableWithoutFeedback for iOS if set to TouchableNativeFeedback
|
|
89
|
+
const Touchable = Platform.OS === 'ios' && touchableComponent instanceof TouchableNativeFeedback ? TouchableWithoutFeedback : touchableComponent;
|
|
90
|
+
|
|
91
|
+
// Wrap component with Touchable for handling platform touches
|
|
92
|
+
// and a single react View for detecting force and timing.
|
|
93
|
+
return (
|
|
94
|
+
/*#__PURE__*/
|
|
95
|
+
/**
|
|
96
|
+
* @TODO (Jin Shin 25 June 2020)
|
|
97
|
+
* Ignoring this for now so that it builds.
|
|
98
|
+
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
_jsx(Touchable, {
|
|
101
|
+
...props,
|
|
102
|
+
ref: this.onRef,
|
|
103
|
+
onPress: this.onPress,
|
|
104
|
+
onPressIn: this.onPressIn,
|
|
105
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
106
|
+
onTouchStart: this.onTouchStart,
|
|
107
|
+
onTouchMove: this.onTouchMove,
|
|
108
|
+
onTouchEnd: this.onTouchEnd,
|
|
109
|
+
children: children
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=TouchablePreview.js.map
|