@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,351 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Store } from "../components/Store.js";
|
|
5
|
+
import { mock, instance, when, anything } from 'ts-mockito';
|
|
6
|
+
import { OptionsCrawler } from "./OptionsCrawler.js";
|
|
7
|
+
import { UniqueIdProvider } from "../adapters/UniqueIdProvider.js";
|
|
8
|
+
describe('OptionsCrawler', () => {
|
|
9
|
+
let uut;
|
|
10
|
+
let mockedStore;
|
|
11
|
+
let mockedUniqueIdProvider;
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
mockedStore = mock(Store);
|
|
14
|
+
mockedUniqueIdProvider = mock(UniqueIdProvider);
|
|
15
|
+
when(mockedUniqueIdProvider.generate(anything())).thenCall(prefix => `${prefix}+UNIQUE_ID`);
|
|
16
|
+
const uniqueIdProvider = instance(mockedUniqueIdProvider);
|
|
17
|
+
uut = new OptionsCrawler(instance(mockedStore), uniqueIdProvider);
|
|
18
|
+
});
|
|
19
|
+
it('Components: injects options object', () => {
|
|
20
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
21
|
+
static options = {
|
|
22
|
+
popGesture: true
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
const layout = {
|
|
26
|
+
component: {
|
|
27
|
+
id: 'testId',
|
|
28
|
+
name: 'theComponentName'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
uut.crawl(layout);
|
|
32
|
+
expect(layout.component.options).toEqual({
|
|
33
|
+
popGesture: true
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it('Components: injects options from original component class static property', () => {
|
|
37
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
38
|
+
static options() {
|
|
39
|
+
return {
|
|
40
|
+
popGesture: true
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const layout = {
|
|
45
|
+
component: {
|
|
46
|
+
id: 'testId',
|
|
47
|
+
name: 'theComponentName'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
uut.crawl(layout);
|
|
51
|
+
expect(layout.component.options).toEqual({
|
|
52
|
+
popGesture: true
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
it('ExternalComponent: does nothing as there is no React component for external component', () => {
|
|
56
|
+
const layout = {
|
|
57
|
+
externalComponent: {
|
|
58
|
+
id: 'testId',
|
|
59
|
+
name: 'theComponentName'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
uut.crawl(layout);
|
|
63
|
+
expect(layout.externalComponent.options).toEqual(undefined);
|
|
64
|
+
});
|
|
65
|
+
it('ExternalComponent: merge options with passed options', () => {
|
|
66
|
+
const layout = {
|
|
67
|
+
externalComponent: {
|
|
68
|
+
id: 'testId',
|
|
69
|
+
name: 'theComponentName',
|
|
70
|
+
options: {
|
|
71
|
+
popGesture: false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
uut.crawl(layout);
|
|
76
|
+
expect(layout.externalComponent.options).toEqual({
|
|
77
|
+
popGesture: false
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
it('Stack: injects options from original component class static property', () => {
|
|
81
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
82
|
+
static options() {
|
|
83
|
+
return {
|
|
84
|
+
popGesture: true
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const layout = {
|
|
89
|
+
stack: {
|
|
90
|
+
children: [{
|
|
91
|
+
component: {
|
|
92
|
+
id: 'testId',
|
|
93
|
+
name: 'theComponentName'
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
uut.crawl(layout);
|
|
99
|
+
expect(layout.stack.children[0].component.options).toEqual({
|
|
100
|
+
popGesture: true
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
it('SideMenu: injects options from original component class static property', () => {
|
|
104
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
105
|
+
static options() {
|
|
106
|
+
return {
|
|
107
|
+
popGesture: true
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
const layout = {
|
|
112
|
+
sideMenu: {
|
|
113
|
+
left: {
|
|
114
|
+
component: {
|
|
115
|
+
id: 'testId',
|
|
116
|
+
name: 'theComponentName'
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
center: {
|
|
120
|
+
component: {
|
|
121
|
+
id: 'testId',
|
|
122
|
+
name: 'theComponentName'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
right: {
|
|
126
|
+
component: {
|
|
127
|
+
id: 'testId',
|
|
128
|
+
name: 'theComponentName'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
uut.crawl(layout);
|
|
134
|
+
expect(layout.sideMenu.center.component.options).toEqual({
|
|
135
|
+
popGesture: true
|
|
136
|
+
});
|
|
137
|
+
expect(layout.sideMenu.left.component.options).toEqual({
|
|
138
|
+
popGesture: true
|
|
139
|
+
});
|
|
140
|
+
expect(layout.sideMenu.right.component.options).toEqual({
|
|
141
|
+
popGesture: true
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
it('SplitView: injects options from original component class static property', () => {
|
|
145
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
146
|
+
static options() {
|
|
147
|
+
return {
|
|
148
|
+
popGesture: true
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
const layout = {
|
|
153
|
+
splitView: {
|
|
154
|
+
master: {
|
|
155
|
+
component: {
|
|
156
|
+
id: 'testId',
|
|
157
|
+
name: 'theComponentName'
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
detail: {
|
|
161
|
+
component: {
|
|
162
|
+
id: 'testId',
|
|
163
|
+
name: 'theComponentName'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
uut.crawl(layout);
|
|
169
|
+
expect(layout.splitView.master.component.options).toEqual({
|
|
170
|
+
popGesture: true
|
|
171
|
+
});
|
|
172
|
+
expect(layout.splitView.detail.component.options).toEqual({
|
|
173
|
+
popGesture: true
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
it('BottomTabs: injects options from original component class static property', () => {
|
|
177
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
178
|
+
static options() {
|
|
179
|
+
return {
|
|
180
|
+
popGesture: true
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
const layout = {
|
|
185
|
+
bottomTabs: {
|
|
186
|
+
children: [{
|
|
187
|
+
component: {
|
|
188
|
+
id: 'testId',
|
|
189
|
+
name: 'theComponentName'
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
component: {
|
|
193
|
+
id: 'testId',
|
|
194
|
+
name: 'theComponentName'
|
|
195
|
+
}
|
|
196
|
+
}]
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
uut.crawl(layout);
|
|
200
|
+
expect(layout.bottomTabs.children[0].component.options).toEqual({
|
|
201
|
+
popGesture: true
|
|
202
|
+
});
|
|
203
|
+
expect(layout.bottomTabs.children[1].component.options).toEqual({
|
|
204
|
+
popGesture: true
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
it('TopTabs: injects options from original component class static property', () => {
|
|
208
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
209
|
+
static options() {
|
|
210
|
+
return {
|
|
211
|
+
popGesture: true
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
const layout = {
|
|
216
|
+
topTabs: {
|
|
217
|
+
children: [{
|
|
218
|
+
component: {
|
|
219
|
+
id: 'testId',
|
|
220
|
+
name: 'theComponentName'
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
component: {
|
|
224
|
+
id: 'testId',
|
|
225
|
+
name: 'theComponentName'
|
|
226
|
+
}
|
|
227
|
+
}]
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
uut.crawl(layout);
|
|
231
|
+
expect(layout.topTabs.children[0].component.options).toEqual({
|
|
232
|
+
popGesture: true
|
|
233
|
+
});
|
|
234
|
+
expect(layout.topTabs.children[1].component.options).toEqual({
|
|
235
|
+
popGesture: true
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
it('Components: merges options from component class static property with passed options, favoring passed options', () => {
|
|
239
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
240
|
+
static options() {
|
|
241
|
+
return {
|
|
242
|
+
topBar: {
|
|
243
|
+
title: {
|
|
244
|
+
text: 'this gets overriden'
|
|
245
|
+
},
|
|
246
|
+
subtitle: {
|
|
247
|
+
text: 'exists only in static'
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
const node = {
|
|
254
|
+
component: {
|
|
255
|
+
id: 'testId',
|
|
256
|
+
name: 'theComponentName',
|
|
257
|
+
options: {
|
|
258
|
+
topBar: {
|
|
259
|
+
title: {
|
|
260
|
+
text: 'exists only in passed'
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
uut.crawl(node);
|
|
267
|
+
expect(node.component.options).toEqual({
|
|
268
|
+
topBar: {
|
|
269
|
+
title: {
|
|
270
|
+
text: 'exists only in passed'
|
|
271
|
+
},
|
|
272
|
+
subtitle: {
|
|
273
|
+
text: 'exists only in static'
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
it('Components: options default obj', () => {
|
|
279
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {});
|
|
280
|
+
const node = {
|
|
281
|
+
component: {
|
|
282
|
+
name: 'theComponentName',
|
|
283
|
+
options: {},
|
|
284
|
+
id: 'testId'
|
|
285
|
+
},
|
|
286
|
+
children: []
|
|
287
|
+
};
|
|
288
|
+
uut.crawl(node);
|
|
289
|
+
expect(node.component.options).toEqual({});
|
|
290
|
+
});
|
|
291
|
+
it('Components: should generate component id', () => {
|
|
292
|
+
let componentIdInProps = '';
|
|
293
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
294
|
+
static options(props) {
|
|
295
|
+
componentIdInProps = props.componentId;
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
const node = {
|
|
299
|
+
component: {
|
|
300
|
+
name: 'theComponentName',
|
|
301
|
+
options: {},
|
|
302
|
+
id: undefined
|
|
303
|
+
},
|
|
304
|
+
children: []
|
|
305
|
+
};
|
|
306
|
+
uut.crawl(node);
|
|
307
|
+
expect(componentIdInProps).toEqual('Component+UNIQUE_ID');
|
|
308
|
+
});
|
|
309
|
+
it('componentId is included in props passed to options generator', () => {
|
|
310
|
+
let componentIdInProps = '';
|
|
311
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
312
|
+
static options(props) {
|
|
313
|
+
componentIdInProps = props.componentId;
|
|
314
|
+
return {};
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
const node = {
|
|
318
|
+
component: {
|
|
319
|
+
id: 'testId',
|
|
320
|
+
name: 'theComponentName',
|
|
321
|
+
passProps: {
|
|
322
|
+
someProp: 'here'
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
uut.crawl(node);
|
|
327
|
+
expect(componentIdInProps).toEqual('testId');
|
|
328
|
+
});
|
|
329
|
+
it('componentId does not override componentId in passProps', () => {
|
|
330
|
+
let componentIdInProps = '';
|
|
331
|
+
when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
|
|
332
|
+
static options(props) {
|
|
333
|
+
componentIdInProps = props.componentId;
|
|
334
|
+
return {};
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const node = {
|
|
338
|
+
component: {
|
|
339
|
+
id: 'testId',
|
|
340
|
+
name: 'theComponentName',
|
|
341
|
+
passProps: {
|
|
342
|
+
someProp: 'here',
|
|
343
|
+
componentId: 'compIdFromPassProps'
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
uut.crawl(node);
|
|
348
|
+
expect(componentIdInProps).toEqual('compIdFromPassProps');
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
//# sourceMappingURL=OptionsCrawler.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Store","mock","instance","when","anything","OptionsCrawler","UniqueIdProvider","describe","uut","mockedStore","mockedUniqueIdProvider","beforeEach","generate","thenCall","prefix","uniqueIdProvider","it","getComponentClassForName","thenReturn","Component","options","popGesture","layout","component","id","name","crawl","expect","toEqual","externalComponent","undefined","stack","children","sideMenu","left","center","right","splitView","master","detail","bottomTabs","topTabs","topBar","title","text","subtitle","node","componentIdInProps","props","componentId","passProps","someProp"],"sourceRoot":"../../../src","sources":["commands/OptionsCrawler.test.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,KAAK,QAAQ,wBAAqB;AAC3C,SAASC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ACF,CAAC;IACDzC,GAAG,CAACkB,KAAK,CAACoB,IAAI,CAAC;IACfnB,MAAM,CAACoB,kBAAkB,CAAC,CAACnB,OAAO,CAAC,qBAAqB,CAAC;EAC3D,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import clone from 'lodash/clone.js';
|
|
4
|
+
import isEqual from 'lodash/isEqual.js';
|
|
5
|
+
import isObject from 'lodash/isObject.js';
|
|
6
|
+
import isArray from 'lodash/isArray.js';
|
|
7
|
+
import isString from 'lodash/isString.js';
|
|
8
|
+
import endsWith from 'lodash/endsWith.js';
|
|
9
|
+
import forEach from 'lodash/forEach.js';
|
|
10
|
+
import has from 'lodash/has.js';
|
|
11
|
+
import { Platform, DynamicColorIOS } from 'react-native';
|
|
12
|
+
export class OptionsProcessor {
|
|
13
|
+
constructor(store, uniqueIdProvider, optionProcessorsRegistry, colorService, assetService, deprecations) {
|
|
14
|
+
this.store = store;
|
|
15
|
+
this.uniqueIdProvider = uniqueIdProvider;
|
|
16
|
+
this.optionProcessorsRegistry = optionProcessorsRegistry;
|
|
17
|
+
this.colorService = colorService;
|
|
18
|
+
this.assetService = assetService;
|
|
19
|
+
this.deprecations = deprecations;
|
|
20
|
+
}
|
|
21
|
+
processOptions(commandName, options, props) {
|
|
22
|
+
if (options) {
|
|
23
|
+
this.processObject(options, clone(options), (key, parentOptions) => {
|
|
24
|
+
this.deprecations.onProcessOptions(key, parentOptions, commandName);
|
|
25
|
+
this.deprecations.checkForDeprecatedOptions(parentOptions);
|
|
26
|
+
}, commandName, props);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
processDefaultOptions(options, commandName) {
|
|
30
|
+
this.processObject(options, clone(options), (key, parentOptions) => {
|
|
31
|
+
this.deprecations.onProcessDefaultOptions(key, parentOptions);
|
|
32
|
+
}, commandName);
|
|
33
|
+
}
|
|
34
|
+
processObject(objectToProcess, parentOptions, onProcess, commandName, props, parentPath) {
|
|
35
|
+
forEach(objectToProcess, (value, key) => {
|
|
36
|
+
const objectPath = this.resolveObjectPath(key, parentPath);
|
|
37
|
+
this.processWithRegisteredProcessor(key, value, objectToProcess, objectPath, commandName, props);
|
|
38
|
+
this.processColor(key, value, objectToProcess);
|
|
39
|
+
if (!value) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.processComponent(key, value, objectToProcess);
|
|
43
|
+
this.processImage(key, value, objectToProcess);
|
|
44
|
+
this.processButtonsPassProps(key, value);
|
|
45
|
+
this.processSearchBar(key, value, objectToProcess);
|
|
46
|
+
this.processInterpolation(key, value, objectToProcess);
|
|
47
|
+
this.processAnimation(key, value, objectToProcess);
|
|
48
|
+
onProcess(key, parentOptions);
|
|
49
|
+
const processedValue = objectToProcess[key];
|
|
50
|
+
if (!isEqual(key, 'passProps') && (isObject(processedValue) || isArray(processedValue))) {
|
|
51
|
+
this.processObject(processedValue, parentOptions, onProcess, commandName, props, objectPath);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
resolveObjectPath(key, path) {
|
|
56
|
+
if (!path) path = key;else path += `.${key}`;
|
|
57
|
+
return path;
|
|
58
|
+
}
|
|
59
|
+
processColor(key, value, options) {
|
|
60
|
+
if ((isEqual(key, 'color') || endsWith(key, 'Color')) && !isEqual(key, 'bkgColor')) {
|
|
61
|
+
if (Platform.OS === 'ios') this.processColorIOS(key, value, options);else this.processColorAndroid(key, value, options);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
processColorIOS(key, value, options) {
|
|
65
|
+
if (value !== undefined) {
|
|
66
|
+
if (value === null) {
|
|
67
|
+
options[key] = 'NoColor';
|
|
68
|
+
} else if (value instanceof Object) {
|
|
69
|
+
if ('semantic' in value) {
|
|
70
|
+
options[key] = value;
|
|
71
|
+
} else if ('dynamic' in value) {
|
|
72
|
+
options[key] = DynamicColorIOS({
|
|
73
|
+
light: this.colorService.toNativeColor(value.dynamic.light),
|
|
74
|
+
dark: this.colorService.toNativeColor(value.dynamic.dark)
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
options[key] = DynamicColorIOS({
|
|
78
|
+
light: this.colorService.toNativeColor(value.light),
|
|
79
|
+
dark: this.colorService.toNativeColor(value.dark)
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
options[key] = this.colorService.toNativeColor(value);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
processColorAndroid(key, value, options) {
|
|
88
|
+
if (value !== undefined) {
|
|
89
|
+
const newColorObj = {
|
|
90
|
+
dark: 'NoColor',
|
|
91
|
+
light: 'NoColor'
|
|
92
|
+
};
|
|
93
|
+
if (value === null) {
|
|
94
|
+
options[key] = newColorObj;
|
|
95
|
+
} else if (value instanceof Object) {
|
|
96
|
+
if ('semantic' in value || 'resource_paths' in value) {
|
|
97
|
+
options[key] = value;
|
|
98
|
+
return;
|
|
99
|
+
} else {
|
|
100
|
+
for (let keyColor in value) {
|
|
101
|
+
newColorObj[keyColor] = this.colorService.toNativeColor(value[keyColor]);
|
|
102
|
+
}
|
|
103
|
+
options[key] = newColorObj;
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
let parsedColor = this.colorService.toNativeColor(value);
|
|
107
|
+
newColorObj.light = parsedColor;
|
|
108
|
+
newColorObj.dark = parsedColor;
|
|
109
|
+
options[key] = newColorObj;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
processWithRegisteredProcessor(key, value, options, path, commandName, passProps) {
|
|
114
|
+
const registeredProcessors = this.optionProcessorsRegistry.getProcessors(path);
|
|
115
|
+
if (registeredProcessors) {
|
|
116
|
+
registeredProcessors.forEach(processor => {
|
|
117
|
+
options[key] = processor(value, commandName, passProps);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
processImage(key, value, options) {
|
|
122
|
+
if (isEqual(key, 'icon') || isEqual(key, 'image') || endsWith(key, 'Icon') || endsWith(key, 'Image')) {
|
|
123
|
+
options[key] = isString(value) ? value : this.assetService.resolveFromRequire(value);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
processButtonsPassProps(key, value) {
|
|
127
|
+
if (endsWith(key, 'Buttons')) {
|
|
128
|
+
forEach(value, button => {
|
|
129
|
+
if (button.passProps && button.id) {
|
|
130
|
+
this.store.setPendingProps(button.id, button.passProps);
|
|
131
|
+
button.passProps = undefined;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
processComponent(key, value, options) {
|
|
137
|
+
if (isEqual(key, 'component')) {
|
|
138
|
+
value.componentId = value.id ? value.id : this.uniqueIdProvider.generate('CustomComponent');
|
|
139
|
+
this.store.ensureClassForName(value.name);
|
|
140
|
+
if (value.passProps) {
|
|
141
|
+
this.store.setPendingProps(value.componentId, value.passProps);
|
|
142
|
+
}
|
|
143
|
+
options[key].passProps = undefined;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
processSearchBar(key, value, options) {
|
|
147
|
+
if (key !== 'searchBar') {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const deprecatedSearchBarOptions = {
|
|
151
|
+
visible: false,
|
|
152
|
+
hideOnScroll: options.searchBarHiddenWhenScrolling ?? false,
|
|
153
|
+
hideTopBarOnFocus: options.hideNavBarOnFocusSearchBar ?? false,
|
|
154
|
+
obscuresBackgroundDuringPresentation: false,
|
|
155
|
+
backgroundColor: options.searchBarBackgroundColor,
|
|
156
|
+
tintColor: options.searchBarTintColor,
|
|
157
|
+
placeholder: options.searchBarPlaceholder ?? ''
|
|
158
|
+
};
|
|
159
|
+
if (typeof value === 'boolean') {
|
|
160
|
+
// Deprecated
|
|
161
|
+
this.deprecations.onProcessOptions(key, options, '');
|
|
162
|
+
options[key] = {
|
|
163
|
+
...deprecatedSearchBarOptions,
|
|
164
|
+
visible: value
|
|
165
|
+
};
|
|
166
|
+
} else {
|
|
167
|
+
options[key] = {
|
|
168
|
+
...deprecatedSearchBarOptions,
|
|
169
|
+
...value
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
processInterpolation(key, value, options) {
|
|
174
|
+
if (isEqual(key, 'interpolation')) {
|
|
175
|
+
if (typeof value === 'string') {
|
|
176
|
+
this.deprecations.onProcessOptions(key, options, '');
|
|
177
|
+
options[key] = {
|
|
178
|
+
type: options[key]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
processAnimation(key, value, options) {
|
|
184
|
+
this.processSetRootAnimation(key, value, options);
|
|
185
|
+
this.processPush(key, value, options);
|
|
186
|
+
this.processPop(key, value, options);
|
|
187
|
+
this.processSetStackRoot(key, value, options);
|
|
188
|
+
this.processShowModal(key, value, options);
|
|
189
|
+
this.processDismissModal(key, value, options);
|
|
190
|
+
}
|
|
191
|
+
processSetStackRoot(key, animation, parentOptions) {
|
|
192
|
+
if (key !== 'setStackRoot') return;
|
|
193
|
+
if (this.isNewStackAnimationApi(animation)) return;
|
|
194
|
+
this.convertDeprecatedViewAnimationApiToNewStackAnimationApi(animation, parentOptions);
|
|
195
|
+
}
|
|
196
|
+
isNewStackAnimationApi(animation) {
|
|
197
|
+
return has(animation, 'content') || has(animation, 'topBar') || has(animation, 'bottomTabs');
|
|
198
|
+
}
|
|
199
|
+
convertDeprecatedViewAnimationApiToNewStackAnimationApi(animation, parentOptions) {
|
|
200
|
+
if (!has(animation, 'content.enter') && !has(animation, 'content.exit')) {
|
|
201
|
+
parentOptions.setStackRoot = {
|
|
202
|
+
content: {
|
|
203
|
+
enter: animation
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
if (has(animation, 'enabled')) {
|
|
207
|
+
parentOptions.setStackRoot.enabled = animation.enabled;
|
|
208
|
+
}
|
|
209
|
+
if (has(animation, 'waitForRender')) {
|
|
210
|
+
parentOptions.setStackRoot.waitForRender = animation.waitForRender;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
processPop(key, animation, parentOptions) {
|
|
215
|
+
if (key !== 'pop') return;
|
|
216
|
+
if (animation.content && !has(animation, 'content.enter') && !has(animation, 'content.exit')) {
|
|
217
|
+
parentOptions.pop.content = {
|
|
218
|
+
exit: animation.content
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
if (animation.topBar && !has(animation, 'topBar.enter') && !has(animation, 'topBar.exit')) {
|
|
222
|
+
parentOptions.pop.topBar = {
|
|
223
|
+
exit: animation.topBar
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
if (animation.bottomTabs && !has(animation, 'bottomTabs.enter') && !has(animation, 'bottomTabs.exit')) {
|
|
227
|
+
parentOptions.pop.bottomTabs = {
|
|
228
|
+
exit: animation.bottomTabs
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
processSetRootAnimation(key, animation, parentOptions) {
|
|
233
|
+
if (key !== 'setRoot') return;
|
|
234
|
+
if (Platform.OS === 'android' && !('enter' in animation)) {
|
|
235
|
+
parentOptions.setRoot = {
|
|
236
|
+
enter: animation
|
|
237
|
+
};
|
|
238
|
+
} else if (Platform.OS === 'ios' && 'enter' in animation) {
|
|
239
|
+
parentOptions.setRoot = animation;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
processShowModal(key, animation, parentOptions) {
|
|
243
|
+
if (key !== 'showModal') return;
|
|
244
|
+
if (!('enter' in animation)) {
|
|
245
|
+
const elementTransitions = animation.elementTransitions;
|
|
246
|
+
const sharedElementTransitions = animation.sharedElementTransitions;
|
|
247
|
+
const enter = {
|
|
248
|
+
...animation
|
|
249
|
+
};
|
|
250
|
+
delete enter.sharedElementTransitions;
|
|
251
|
+
delete enter.elementTransitions;
|
|
252
|
+
parentOptions.showModal = {
|
|
253
|
+
enter,
|
|
254
|
+
sharedElementTransitions,
|
|
255
|
+
elementTransitions
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
processDismissModal(key, animation, parentOptions) {
|
|
260
|
+
if (key !== 'dismissModal') return;
|
|
261
|
+
if (!('exit' in animation)) {
|
|
262
|
+
const elementTransitions = animation.elementTransitions;
|
|
263
|
+
const sharedElementTransitions = animation.sharedElementTransitions;
|
|
264
|
+
const exit = {
|
|
265
|
+
...animation
|
|
266
|
+
};
|
|
267
|
+
delete exit.sharedElementTransitions;
|
|
268
|
+
delete exit.elementTransitions;
|
|
269
|
+
parentOptions.dismissModal = {
|
|
270
|
+
exit,
|
|
271
|
+
sharedElementTransitions,
|
|
272
|
+
elementTransitions
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
processPush(key, animation, parentOptions) {
|
|
277
|
+
if (key !== 'push') return;
|
|
278
|
+
if (animation.content && !has(animation, 'content.enter') && !has(animation, 'content.exit')) {
|
|
279
|
+
parentOptions.push.content = {
|
|
280
|
+
enter: animation.content
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
if (animation.topBar && !has(animation, 'topBar.enter') && !has(animation, 'topBar.exit')) {
|
|
284
|
+
parentOptions.push.topBar = {
|
|
285
|
+
enter: animation.topBar
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
if (animation.statusBar && !has(animation, 'statusBar.enter') && !has(animation, 'statusBar.exit')) {
|
|
289
|
+
parentOptions.push.statusBar = {
|
|
290
|
+
enter: animation.statusBar
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
if (animation.bottomTabs && !has(animation, 'bottomTabs.enter') && !has(animation, 'bottomTabs.exit')) {
|
|
294
|
+
parentOptions.push.bottomTabs = {
|
|
295
|
+
enter: animation.bottomTabs
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
//# sourceMappingURL=OptionsProcessor.js.map
|