@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,1234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { OptionsProcessor } from "./OptionsProcessor.js";
|
|
4
|
+
import { UniqueIdProvider } from "../adapters/UniqueIdProvider.js";
|
|
5
|
+
import { Store } from "../components/Store.js";
|
|
6
|
+
import { OptionProcessorsStore } from "../processors/OptionProcessorsStore.js";
|
|
7
|
+
import { OptionsModalPresentationStyle } from "../interfaces/Options.js";
|
|
8
|
+
import { mock, when, instance, anyNumber, verify, anything } from 'ts-mockito';
|
|
9
|
+
import { ColorService } from "../adapters/ColorService.js";
|
|
10
|
+
import { AssetService } from "../adapters/AssetResolver.js";
|
|
11
|
+
import { Deprecations } from "./Deprecations.js";
|
|
12
|
+
import { CommandName } from "../interfaces/CommandName.js";
|
|
13
|
+
import { DynamicColorIOS, Platform } from 'react-native';
|
|
14
|
+
describe('navigation options', () => {
|
|
15
|
+
let uut;
|
|
16
|
+
let optionProcessorsRegistry;
|
|
17
|
+
const mockedStore = mock(Store);
|
|
18
|
+
const store = instance(mockedStore);
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
const mockedAssetService = mock(AssetService);
|
|
21
|
+
when(mockedAssetService.resolveFromRequire(anyNumber())).thenReturn({
|
|
22
|
+
height: 100,
|
|
23
|
+
scale: 1,
|
|
24
|
+
uri: 'lol',
|
|
25
|
+
width: 100
|
|
26
|
+
});
|
|
27
|
+
const assetService = instance(mockedAssetService);
|
|
28
|
+
const mockedColorService = mock(ColorService);
|
|
29
|
+
when(mockedColorService.toNativeColor('red')).thenReturn(0xffff0000);
|
|
30
|
+
when(mockedColorService.toNativeColor('green')).thenReturn(0xff00ff00);
|
|
31
|
+
when(mockedColorService.toNativeColor('blue')).thenReturn(0xff0000ff);
|
|
32
|
+
const colorService = instance(mockedColorService);
|
|
33
|
+
optionProcessorsRegistry = new OptionProcessorsStore();
|
|
34
|
+
let uuid = 0;
|
|
35
|
+
const mockedUniqueIdProvider = mock(UniqueIdProvider);
|
|
36
|
+
when(mockedUniqueIdProvider.generate(anything())).thenCall(prefix => {
|
|
37
|
+
return `${prefix}${++uuid}`;
|
|
38
|
+
});
|
|
39
|
+
uut = new OptionsProcessor(store, instance(mockedUniqueIdProvider), optionProcessorsRegistry, colorService, assetService, new Deprecations());
|
|
40
|
+
});
|
|
41
|
+
it('processes old setRoot animation value to new enter exit format on Android', () => {
|
|
42
|
+
Platform.OS = 'android';
|
|
43
|
+
const options = {
|
|
44
|
+
animations: {
|
|
45
|
+
setRoot: {
|
|
46
|
+
enabled: false,
|
|
47
|
+
translationY: {
|
|
48
|
+
from: 0,
|
|
49
|
+
to: 1,
|
|
50
|
+
duration: 3
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const expectedOptions = {
|
|
56
|
+
animations: {
|
|
57
|
+
setRoot: {
|
|
58
|
+
enter: {
|
|
59
|
+
enabled: false,
|
|
60
|
+
translationY: {
|
|
61
|
+
from: 0,
|
|
62
|
+
to: 1,
|
|
63
|
+
duration: 3
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
70
|
+
expect(options).toEqual(expectedOptions);
|
|
71
|
+
});
|
|
72
|
+
describe('Modal Animation Options', () => {
|
|
73
|
+
describe('Show Modal', () => {
|
|
74
|
+
it('processes old options into new options,backwards compatibility ', () => {
|
|
75
|
+
const options = {
|
|
76
|
+
animations: {
|
|
77
|
+
showModal: {
|
|
78
|
+
enabled: false,
|
|
79
|
+
translationY: {
|
|
80
|
+
from: 0,
|
|
81
|
+
to: 1,
|
|
82
|
+
duration: 3
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
dismissModal: {
|
|
86
|
+
enabled: true,
|
|
87
|
+
translationY: {
|
|
88
|
+
from: 0,
|
|
89
|
+
to: 1,
|
|
90
|
+
duration: 3
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const expected = {
|
|
96
|
+
animations: {
|
|
97
|
+
showModal: {
|
|
98
|
+
enter: {
|
|
99
|
+
enabled: false,
|
|
100
|
+
translationY: {
|
|
101
|
+
from: 0,
|
|
102
|
+
to: 1,
|
|
103
|
+
duration: 3
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
dismissModal: {
|
|
108
|
+
exit: {
|
|
109
|
+
enabled: true,
|
|
110
|
+
translationY: {
|
|
111
|
+
from: 0,
|
|
112
|
+
to: 1,
|
|
113
|
+
duration: 3
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
uut.processOptions(CommandName.ShowModal, options);
|
|
120
|
+
expect(options).toEqual(expected);
|
|
121
|
+
});
|
|
122
|
+
it('processes old enabled options into new options,backwards compatibility ', () => {
|
|
123
|
+
const options = {
|
|
124
|
+
animations: {
|
|
125
|
+
showModal: {
|
|
126
|
+
enabled: false
|
|
127
|
+
},
|
|
128
|
+
dismissModal: {
|
|
129
|
+
enabled: true
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const expected = {
|
|
134
|
+
animations: {
|
|
135
|
+
showModal: {
|
|
136
|
+
enter: {
|
|
137
|
+
enabled: false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
dismissModal: {
|
|
141
|
+
exit: {
|
|
142
|
+
enabled: true
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
uut.processOptions(CommandName.ShowModal, options);
|
|
148
|
+
expect(options).toEqual(expected);
|
|
149
|
+
});
|
|
150
|
+
it('should not process new options', () => {
|
|
151
|
+
const options = {
|
|
152
|
+
animations: {
|
|
153
|
+
showModal: {
|
|
154
|
+
enter: {
|
|
155
|
+
enabled: false,
|
|
156
|
+
translationY: {
|
|
157
|
+
from: 0,
|
|
158
|
+
to: 1,
|
|
159
|
+
duration: 3
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
dismissModal: {
|
|
164
|
+
exit: {
|
|
165
|
+
enabled: true,
|
|
166
|
+
translationY: {
|
|
167
|
+
from: 0,
|
|
168
|
+
to: 1,
|
|
169
|
+
duration: 3
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const expected = {
|
|
176
|
+
...options
|
|
177
|
+
};
|
|
178
|
+
uut.processOptions(CommandName.ShowModal, options);
|
|
179
|
+
expect(options).toEqual(expected);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe('Dismiss Modal', () => {
|
|
183
|
+
it('processes old options into new options,backwards compatibility ', () => {
|
|
184
|
+
const options = {
|
|
185
|
+
animations: {
|
|
186
|
+
showModal: {
|
|
187
|
+
enabled: false,
|
|
188
|
+
translationY: {
|
|
189
|
+
from: 0,
|
|
190
|
+
to: 1,
|
|
191
|
+
duration: 3
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
dismissModal: {
|
|
195
|
+
enabled: true,
|
|
196
|
+
translationY: {
|
|
197
|
+
from: 0,
|
|
198
|
+
to: 1,
|
|
199
|
+
duration: 3
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const expected = {
|
|
205
|
+
animations: {
|
|
206
|
+
showModal: {
|
|
207
|
+
enter: {
|
|
208
|
+
enabled: false,
|
|
209
|
+
translationY: {
|
|
210
|
+
from: 0,
|
|
211
|
+
to: 1,
|
|
212
|
+
duration: 3
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
dismissModal: {
|
|
217
|
+
exit: {
|
|
218
|
+
enabled: true,
|
|
219
|
+
translationY: {
|
|
220
|
+
from: 0,
|
|
221
|
+
to: 1,
|
|
222
|
+
duration: 3
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
uut.processOptions(CommandName.DismissModal, options);
|
|
229
|
+
expect(options).toEqual(expected);
|
|
230
|
+
});
|
|
231
|
+
it('processes old enabled options into new options,backwards compatibility ', () => {
|
|
232
|
+
const options = {
|
|
233
|
+
animations: {
|
|
234
|
+
showModal: {
|
|
235
|
+
enabled: false
|
|
236
|
+
},
|
|
237
|
+
dismissModal: {
|
|
238
|
+
enabled: true
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const expected = {
|
|
243
|
+
animations: {
|
|
244
|
+
showModal: {
|
|
245
|
+
enter: {
|
|
246
|
+
enabled: false
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
dismissModal: {
|
|
250
|
+
exit: {
|
|
251
|
+
enabled: true
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
uut.processOptions(CommandName.DismissModal, options);
|
|
257
|
+
expect(options).toEqual(expected);
|
|
258
|
+
});
|
|
259
|
+
it('should not process new options', () => {
|
|
260
|
+
const options = {
|
|
261
|
+
animations: {
|
|
262
|
+
showModal: {
|
|
263
|
+
enter: {
|
|
264
|
+
enabled: false,
|
|
265
|
+
translationY: {
|
|
266
|
+
from: 0,
|
|
267
|
+
to: 1,
|
|
268
|
+
duration: 3
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
dismissModal: {
|
|
273
|
+
exit: {
|
|
274
|
+
enabled: true,
|
|
275
|
+
translationY: {
|
|
276
|
+
from: 0,
|
|
277
|
+
to: 1,
|
|
278
|
+
duration: 3
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const expected = {
|
|
285
|
+
...options
|
|
286
|
+
};
|
|
287
|
+
uut.processOptions(CommandName.DismissModal, options);
|
|
288
|
+
expect(options).toEqual(expected);
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
it('keeps original values if values were not processed', () => {
|
|
293
|
+
const options = {
|
|
294
|
+
blurOnUnmount: false,
|
|
295
|
+
popGesture: false,
|
|
296
|
+
modalPresentationStyle: OptionsModalPresentationStyle.fullScreen
|
|
297
|
+
};
|
|
298
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
299
|
+
expect(options).toEqual({
|
|
300
|
+
blurOnUnmount: false,
|
|
301
|
+
popGesture: false,
|
|
302
|
+
modalPresentationStyle: OptionsModalPresentationStyle.fullScreen
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
it('passes value to registered processor', () => {
|
|
306
|
+
const options = {
|
|
307
|
+
topBar: {
|
|
308
|
+
visible: true
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', value => {
|
|
312
|
+
return !value;
|
|
313
|
+
});
|
|
314
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
315
|
+
expect(options).toEqual({
|
|
316
|
+
topBar: {
|
|
317
|
+
visible: false
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
it('process options object with multiple values using registered processor', () => {
|
|
322
|
+
const options = {
|
|
323
|
+
topBar: {
|
|
324
|
+
visible: true,
|
|
325
|
+
background: {
|
|
326
|
+
translucent: true
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', value => {
|
|
331
|
+
return !value;
|
|
332
|
+
});
|
|
333
|
+
optionProcessorsRegistry.addProcessor('topBar.background.translucent', value => {
|
|
334
|
+
return !value;
|
|
335
|
+
});
|
|
336
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
337
|
+
expect(options).toEqual({
|
|
338
|
+
topBar: {
|
|
339
|
+
visible: false,
|
|
340
|
+
background: {
|
|
341
|
+
translucent: false
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
it('passes commandName to registered processor', () => {
|
|
347
|
+
const options = {
|
|
348
|
+
topBar: {
|
|
349
|
+
visible: false
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', (_value, commandName) => {
|
|
353
|
+
expect(commandName).toEqual(CommandName.SetRoot);
|
|
354
|
+
});
|
|
355
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
356
|
+
});
|
|
357
|
+
it('passes props to registered processor', () => {
|
|
358
|
+
const options = {
|
|
359
|
+
topBar: {
|
|
360
|
+
visible: false
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
const props = {
|
|
364
|
+
prop: 'prop'
|
|
365
|
+
};
|
|
366
|
+
const processor = (_value, _commandName, passProps) => {
|
|
367
|
+
expect(passProps).toEqual(props);
|
|
368
|
+
return _value;
|
|
369
|
+
};
|
|
370
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', processor);
|
|
371
|
+
uut.processOptions(CommandName.SetRoot, options, props);
|
|
372
|
+
});
|
|
373
|
+
it('supports multiple registered processors', () => {
|
|
374
|
+
const options = {
|
|
375
|
+
topBar: {
|
|
376
|
+
visible: true
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', () => false);
|
|
380
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', () => true);
|
|
381
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
382
|
+
expect(options).toEqual({
|
|
383
|
+
topBar: {
|
|
384
|
+
visible: true
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
it('supports multiple registered processors deep props', () => {
|
|
389
|
+
const options = {
|
|
390
|
+
topBar: {
|
|
391
|
+
visible: false,
|
|
392
|
+
background: {
|
|
393
|
+
translucent: false
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
bottomTabs: {
|
|
397
|
+
visible: false
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
optionProcessorsRegistry.addProcessor('topBar.visible', () => true);
|
|
401
|
+
optionProcessorsRegistry.addProcessor('bottomTabs.visible', () => true);
|
|
402
|
+
optionProcessorsRegistry.addProcessor('topBar.background.translucent', () => true);
|
|
403
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
404
|
+
expect(options).toEqual({
|
|
405
|
+
topBar: {
|
|
406
|
+
visible: true,
|
|
407
|
+
background: {
|
|
408
|
+
translucent: true
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
bottomTabs: {
|
|
412
|
+
visible: true
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
describe('color processor', () => {
|
|
417
|
+
describe('Android', () => {
|
|
418
|
+
beforeEach(() => {
|
|
419
|
+
Platform.OS = 'android';
|
|
420
|
+
});
|
|
421
|
+
it('should not process undefined color', () => {
|
|
422
|
+
const options = {
|
|
423
|
+
topBar: {
|
|
424
|
+
background: {
|
|
425
|
+
color: undefined
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
430
|
+
expect(options).toEqual({
|
|
431
|
+
topBar: {
|
|
432
|
+
background: {
|
|
433
|
+
color: undefined
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
it('PlatformColor should be passed to native as is', () => {
|
|
439
|
+
const options = {
|
|
440
|
+
topBar: {
|
|
441
|
+
background: {
|
|
442
|
+
color: {
|
|
443
|
+
// @ts-ignore
|
|
444
|
+
resource_paths: ['@color/textColor']
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
450
|
+
expect(options).toEqual({
|
|
451
|
+
topBar: {
|
|
452
|
+
background: {
|
|
453
|
+
color: {
|
|
454
|
+
resource_paths: ['@color/textColor']
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
});
|
|
460
|
+
it('processes color keys', () => {
|
|
461
|
+
const options = {
|
|
462
|
+
statusBar: {
|
|
463
|
+
backgroundColor: 'red'
|
|
464
|
+
},
|
|
465
|
+
topBar: {
|
|
466
|
+
background: {
|
|
467
|
+
color: 'blue'
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
472
|
+
expect(options).toEqual({
|
|
473
|
+
statusBar: {
|
|
474
|
+
backgroundColor: {
|
|
475
|
+
light: 0xffff0000,
|
|
476
|
+
dark: 0xffff0000
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
topBar: {
|
|
480
|
+
background: {
|
|
481
|
+
color: {
|
|
482
|
+
light: 0xff0000ff,
|
|
483
|
+
dark: 0xff0000ff
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
it('processes null color', () => {
|
|
490
|
+
const options = {
|
|
491
|
+
topBar: {
|
|
492
|
+
background: {
|
|
493
|
+
color: null
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
498
|
+
expect(options).toEqual({
|
|
499
|
+
topBar: {
|
|
500
|
+
background: {
|
|
501
|
+
color: {
|
|
502
|
+
light: 'NoColor',
|
|
503
|
+
dark: 'NoColor'
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
it('processes color keys to ThemeColor', () => {
|
|
510
|
+
const options = {
|
|
511
|
+
topBar: {
|
|
512
|
+
background: {
|
|
513
|
+
color: {
|
|
514
|
+
light: 'blue',
|
|
515
|
+
dark: 'red'
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
521
|
+
expect(options).toEqual({
|
|
522
|
+
topBar: {
|
|
523
|
+
background: {
|
|
524
|
+
color: {
|
|
525
|
+
light: 0xff0000ff,
|
|
526
|
+
dark: 0xffff0000
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
describe('iOS', () => {
|
|
534
|
+
beforeEach(() => {
|
|
535
|
+
Platform.OS = 'ios';
|
|
536
|
+
});
|
|
537
|
+
it('processes color keys', () => {
|
|
538
|
+
const options = {
|
|
539
|
+
statusBar: {
|
|
540
|
+
backgroundColor: 'red'
|
|
541
|
+
},
|
|
542
|
+
topBar: {
|
|
543
|
+
background: {
|
|
544
|
+
color: 'blue'
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
549
|
+
expect(options).toEqual({
|
|
550
|
+
statusBar: {
|
|
551
|
+
backgroundColor: 0xffff0000
|
|
552
|
+
},
|
|
553
|
+
topBar: {
|
|
554
|
+
background: {
|
|
555
|
+
color: 0xff0000ff
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
});
|
|
560
|
+
it('should not process undefined color', () => {
|
|
561
|
+
const options = {
|
|
562
|
+
topBar: {
|
|
563
|
+
background: {
|
|
564
|
+
color: undefined
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
569
|
+
expect(options).toEqual({
|
|
570
|
+
topBar: {
|
|
571
|
+
background: {
|
|
572
|
+
color: undefined
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
it('processes null color', () => {
|
|
578
|
+
const options = {
|
|
579
|
+
topBar: {
|
|
580
|
+
background: {
|
|
581
|
+
color: null
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
586
|
+
expect(options).toEqual({
|
|
587
|
+
topBar: {
|
|
588
|
+
background: {
|
|
589
|
+
color: 'NoColor'
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
it('processes color keys to ThemeColor', () => {
|
|
595
|
+
const options = {
|
|
596
|
+
statusBar: {
|
|
597
|
+
backgroundColor: 'red'
|
|
598
|
+
},
|
|
599
|
+
topBar: {
|
|
600
|
+
background: {
|
|
601
|
+
color: {
|
|
602
|
+
light: 'blue',
|
|
603
|
+
dark: 'red'
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
title: {
|
|
607
|
+
color: undefined
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
612
|
+
expect(options).toEqual({
|
|
613
|
+
statusBar: {
|
|
614
|
+
backgroundColor: 0xffff0000
|
|
615
|
+
},
|
|
616
|
+
topBar: {
|
|
617
|
+
background: {
|
|
618
|
+
color: {
|
|
619
|
+
dynamic: {
|
|
620
|
+
light: 0xff0000ff,
|
|
621
|
+
dark: 0xffff0000
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
title: {
|
|
626
|
+
color: undefined
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
it('supports DynamicColorIOS', () => {
|
|
632
|
+
const options = {
|
|
633
|
+
topBar: {
|
|
634
|
+
background: {
|
|
635
|
+
color: DynamicColorIOS({
|
|
636
|
+
light: 'red',
|
|
637
|
+
dark: 'blue'
|
|
638
|
+
})
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
643
|
+
expect(options).toEqual({
|
|
644
|
+
topBar: {
|
|
645
|
+
background: {
|
|
646
|
+
color: {
|
|
647
|
+
dynamic: {
|
|
648
|
+
light: 0xffff0000,
|
|
649
|
+
dark: 0xff0000ff
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
});
|
|
656
|
+
it('should not process undefined value', () => {
|
|
657
|
+
const options = {
|
|
658
|
+
topBar: {
|
|
659
|
+
background: {
|
|
660
|
+
color: undefined
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
665
|
+
expect(options).toEqual({
|
|
666
|
+
topBar: {
|
|
667
|
+
background: {
|
|
668
|
+
color: undefined
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
it('processes image keys', () => {
|
|
676
|
+
const options = {
|
|
677
|
+
backgroundImage: 123,
|
|
678
|
+
rootBackgroundImage: 234,
|
|
679
|
+
bottomTab: {
|
|
680
|
+
icon: 345,
|
|
681
|
+
selectedIcon: 345
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
685
|
+
expect(options).toEqual({
|
|
686
|
+
backgroundImage: {
|
|
687
|
+
height: 100,
|
|
688
|
+
scale: 1,
|
|
689
|
+
uri: 'lol',
|
|
690
|
+
width: 100
|
|
691
|
+
},
|
|
692
|
+
rootBackgroundImage: {
|
|
693
|
+
height: 100,
|
|
694
|
+
scale: 1,
|
|
695
|
+
uri: 'lol',
|
|
696
|
+
width: 100
|
|
697
|
+
},
|
|
698
|
+
bottomTab: {
|
|
699
|
+
icon: {
|
|
700
|
+
height: 100,
|
|
701
|
+
scale: 1,
|
|
702
|
+
uri: 'lol',
|
|
703
|
+
width: 100
|
|
704
|
+
},
|
|
705
|
+
selectedIcon: {
|
|
706
|
+
height: 100,
|
|
707
|
+
scale: 1,
|
|
708
|
+
uri: 'lol',
|
|
709
|
+
width: 100
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
it('calls store if component has passProps', () => {
|
|
715
|
+
const passProps = {
|
|
716
|
+
some: 'thing'
|
|
717
|
+
};
|
|
718
|
+
const options = {
|
|
719
|
+
topBar: {
|
|
720
|
+
title: {
|
|
721
|
+
component: {
|
|
722
|
+
passProps,
|
|
723
|
+
name: 'a'
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
729
|
+
verify(mockedStore.setPendingProps('CustomComponent1', passProps)).called();
|
|
730
|
+
});
|
|
731
|
+
it('generates componentId for component id was not passed', () => {
|
|
732
|
+
const options = {
|
|
733
|
+
topBar: {
|
|
734
|
+
title: {
|
|
735
|
+
component: {
|
|
736
|
+
name: 'a'
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
742
|
+
expect(options).toEqual({
|
|
743
|
+
topBar: {
|
|
744
|
+
title: {
|
|
745
|
+
component: {
|
|
746
|
+
name: 'a',
|
|
747
|
+
componentId: 'CustomComponent1'
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
it('copies passed id to componentId key', () => {
|
|
754
|
+
const options = {
|
|
755
|
+
topBar: {
|
|
756
|
+
title: {
|
|
757
|
+
component: {
|
|
758
|
+
name: 'a',
|
|
759
|
+
id: 'Component1'
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
765
|
+
expect(options).toEqual({
|
|
766
|
+
topBar: {
|
|
767
|
+
title: {
|
|
768
|
+
component: {
|
|
769
|
+
name: 'a',
|
|
770
|
+
id: 'Component1',
|
|
771
|
+
componentId: 'Component1'
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
});
|
|
777
|
+
it('calls store when button has passProps and id', () => {
|
|
778
|
+
const passProps = {
|
|
779
|
+
prop: 'prop'
|
|
780
|
+
};
|
|
781
|
+
const options = {
|
|
782
|
+
topBar: {
|
|
783
|
+
rightButtons: [{
|
|
784
|
+
passProps,
|
|
785
|
+
id: '1'
|
|
786
|
+
}]
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
790
|
+
verify(mockedStore.setPendingProps('1', passProps)).called();
|
|
791
|
+
});
|
|
792
|
+
it('do not touch passProps when id for button is missing', () => {
|
|
793
|
+
const passProps = {
|
|
794
|
+
prop: 'prop'
|
|
795
|
+
};
|
|
796
|
+
const options = {
|
|
797
|
+
topBar: {
|
|
798
|
+
rightButtons: [{
|
|
799
|
+
passProps
|
|
800
|
+
}]
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
804
|
+
expect(options).toEqual({
|
|
805
|
+
topBar: {
|
|
806
|
+
rightButtons: [{
|
|
807
|
+
passProps
|
|
808
|
+
}]
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
});
|
|
812
|
+
it('omits passProps when processing buttons or components', () => {
|
|
813
|
+
const options = {
|
|
814
|
+
topBar: {
|
|
815
|
+
rightButtons: [{
|
|
816
|
+
passProps: {},
|
|
817
|
+
id: 'btn1'
|
|
818
|
+
}],
|
|
819
|
+
leftButtons: [{
|
|
820
|
+
passProps: {},
|
|
821
|
+
id: 'btn2'
|
|
822
|
+
}],
|
|
823
|
+
title: {
|
|
824
|
+
component: {
|
|
825
|
+
name: 'helloThere1',
|
|
826
|
+
passProps: {}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
background: {
|
|
830
|
+
component: {
|
|
831
|
+
name: 'helloThere2',
|
|
832
|
+
passProps: {}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
838
|
+
expect(options.topBar.rightButtons[0].passProps).toBeUndefined();
|
|
839
|
+
expect(options.topBar.leftButtons[0].passProps).toBeUndefined();
|
|
840
|
+
expect(options.topBar.title.component.passProps).toBeUndefined();
|
|
841
|
+
expect(options.topBar.background.component.passProps).toBeUndefined();
|
|
842
|
+
});
|
|
843
|
+
it('Will ensure the store has a chance to lazily load components in options', () => {
|
|
844
|
+
const options = {
|
|
845
|
+
topBar: {
|
|
846
|
+
title: {
|
|
847
|
+
component: {
|
|
848
|
+
name: 'helloThere1',
|
|
849
|
+
passProps: {}
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
background: {
|
|
853
|
+
component: {
|
|
854
|
+
name: 'helloThere2',
|
|
855
|
+
passProps: {}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
861
|
+
verify(mockedStore.ensureClassForName('helloThere1')).called();
|
|
862
|
+
verify(mockedStore.ensureClassForName('helloThere2')).called();
|
|
863
|
+
});
|
|
864
|
+
it('show warning on iOS when toggling bottomTabs visibility through mergeOptions', () => {
|
|
865
|
+
jest.spyOn(console, 'warn');
|
|
866
|
+
uut.processOptions(CommandName.MergeOptions, {
|
|
867
|
+
bottomTabs: {
|
|
868
|
+
visible: false
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
expect(console.warn).toBeCalledWith('toggling bottomTabs visibility is deprecated on iOS. For more information see https://github.com/wix/react-native-navigation/issues/6416', {
|
|
872
|
+
bottomTabs: {
|
|
873
|
+
visible: false
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
describe('searchBar', () => {
|
|
878
|
+
describe('Android', () => {
|
|
879
|
+
beforeEach(() => {
|
|
880
|
+
Platform.OS = 'android';
|
|
881
|
+
});
|
|
882
|
+
it('transform searchBar bool to object', () => {
|
|
883
|
+
const options = {
|
|
884
|
+
topBar: {
|
|
885
|
+
searchBar: true
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
889
|
+
expect(options.topBar.searchBar).toStrictEqual({
|
|
890
|
+
visible: true,
|
|
891
|
+
hideOnScroll: false,
|
|
892
|
+
hideTopBarOnFocus: false,
|
|
893
|
+
obscuresBackgroundDuringPresentation: false,
|
|
894
|
+
backgroundColor: undefined,
|
|
895
|
+
tintColor: undefined,
|
|
896
|
+
placeholder: ''
|
|
897
|
+
});
|
|
898
|
+
});
|
|
899
|
+
it('transform searchBar bool to object and merges in deprecated values', () => {
|
|
900
|
+
const options = {
|
|
901
|
+
topBar: {
|
|
902
|
+
searchBar: true,
|
|
903
|
+
searchBarHiddenWhenScrolling: true,
|
|
904
|
+
hideNavBarOnFocusSearchBar: true,
|
|
905
|
+
searchBarBackgroundColor: 'red',
|
|
906
|
+
searchBarTintColor: 'green',
|
|
907
|
+
searchBarPlaceholder: 'foo'
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
911
|
+
expect(options.topBar.searchBar).toStrictEqual({
|
|
912
|
+
visible: true,
|
|
913
|
+
hideOnScroll: true,
|
|
914
|
+
hideTopBarOnFocus: true,
|
|
915
|
+
obscuresBackgroundDuringPresentation: false,
|
|
916
|
+
backgroundColor: {
|
|
917
|
+
dark: 0xffff0000,
|
|
918
|
+
light: 0xffff0000
|
|
919
|
+
},
|
|
920
|
+
tintColor: {
|
|
921
|
+
dark: 0xff00ff00,
|
|
922
|
+
light: 0xff00ff00
|
|
923
|
+
},
|
|
924
|
+
placeholder: 'foo'
|
|
925
|
+
});
|
|
926
|
+
});
|
|
927
|
+
});
|
|
928
|
+
describe('iOS', () => {
|
|
929
|
+
beforeEach(() => {
|
|
930
|
+
Platform.OS = 'ios';
|
|
931
|
+
});
|
|
932
|
+
it('transform searchBar bool to object', () => {
|
|
933
|
+
const options = {
|
|
934
|
+
topBar: {
|
|
935
|
+
searchBar: true
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
939
|
+
expect(options.topBar.searchBar).toStrictEqual({
|
|
940
|
+
visible: true,
|
|
941
|
+
hideOnScroll: false,
|
|
942
|
+
hideTopBarOnFocus: false,
|
|
943
|
+
obscuresBackgroundDuringPresentation: false,
|
|
944
|
+
backgroundColor: undefined,
|
|
945
|
+
tintColor: undefined,
|
|
946
|
+
placeholder: ''
|
|
947
|
+
});
|
|
948
|
+
});
|
|
949
|
+
it('transform searchBar bool to object and merges in deprecated values', () => {
|
|
950
|
+
const options = {
|
|
951
|
+
topBar: {
|
|
952
|
+
searchBar: true,
|
|
953
|
+
searchBarHiddenWhenScrolling: true,
|
|
954
|
+
hideNavBarOnFocusSearchBar: true,
|
|
955
|
+
searchBarBackgroundColor: 'red',
|
|
956
|
+
searchBarTintColor: 'green',
|
|
957
|
+
searchBarPlaceholder: 'foo'
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
961
|
+
expect(options.topBar.searchBar).toStrictEqual({
|
|
962
|
+
visible: true,
|
|
963
|
+
hideOnScroll: true,
|
|
964
|
+
hideTopBarOnFocus: true,
|
|
965
|
+
obscuresBackgroundDuringPresentation: false,
|
|
966
|
+
backgroundColor: 0xffff0000,
|
|
967
|
+
tintColor: 0xff00ff00,
|
|
968
|
+
placeholder: 'foo'
|
|
969
|
+
});
|
|
970
|
+
});
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
describe('process animations options', () => {
|
|
974
|
+
const performOnViewsInvolvedInStackAnimation = action => ['content', 'topBar', 'bottomTabs'].forEach(action);
|
|
975
|
+
describe('push', () => {
|
|
976
|
+
it('old *.push api is converted into push.*.enter', () => {
|
|
977
|
+
performOnViewsInvolvedInStackAnimation(view => {
|
|
978
|
+
const options = {
|
|
979
|
+
animations: {
|
|
980
|
+
push: {
|
|
981
|
+
[view]: {
|
|
982
|
+
alpha: {
|
|
983
|
+
from: 0,
|
|
984
|
+
to: 1
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
991
|
+
expect(options.animations.push).toStrictEqual({
|
|
992
|
+
[view]: {
|
|
993
|
+
enter: {
|
|
994
|
+
alpha: {
|
|
995
|
+
from: 0,
|
|
996
|
+
to: 1
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
it('StackAnimationOptions based push api is left as is', () => {
|
|
1004
|
+
performOnViewsInvolvedInStackAnimation(view => {
|
|
1005
|
+
const options = {
|
|
1006
|
+
animations: {
|
|
1007
|
+
push: {
|
|
1008
|
+
[view]: {
|
|
1009
|
+
exit: {
|
|
1010
|
+
alpha: {
|
|
1011
|
+
from: 1,
|
|
1012
|
+
to: 0
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
enter: {
|
|
1016
|
+
alpha: {
|
|
1017
|
+
from: 0,
|
|
1018
|
+
to: 1
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1026
|
+
expect(options.animations.push).toStrictEqual({
|
|
1027
|
+
[view]: {
|
|
1028
|
+
exit: {
|
|
1029
|
+
alpha: {
|
|
1030
|
+
from: 1,
|
|
1031
|
+
to: 0
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
enter: {
|
|
1035
|
+
alpha: {
|
|
1036
|
+
from: 0,
|
|
1037
|
+
to: 1
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
});
|
|
1044
|
+
it('Options not related to views are left as is', () => {
|
|
1045
|
+
performOnViewsInvolvedInStackAnimation(() => {
|
|
1046
|
+
const options = {
|
|
1047
|
+
animations: {
|
|
1048
|
+
push: {
|
|
1049
|
+
enabled: false,
|
|
1050
|
+
waitForRender: true,
|
|
1051
|
+
sharedElementTransitions: [],
|
|
1052
|
+
elementTransitions: []
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1057
|
+
expect(options.animations.push).toStrictEqual({
|
|
1058
|
+
enabled: false,
|
|
1059
|
+
waitForRender: true,
|
|
1060
|
+
sharedElementTransitions: [],
|
|
1061
|
+
elementTransitions: []
|
|
1062
|
+
});
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
describe('pop', () => {
|
|
1067
|
+
it('old pop.content api is converted into pop.content.exit', () => {
|
|
1068
|
+
performOnViewsInvolvedInStackAnimation(view => {
|
|
1069
|
+
const options = {
|
|
1070
|
+
animations: {
|
|
1071
|
+
pop: {
|
|
1072
|
+
[view]: {
|
|
1073
|
+
alpha: {
|
|
1074
|
+
from: 0,
|
|
1075
|
+
to: 1
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1082
|
+
expect(options.animations.pop).toStrictEqual({
|
|
1083
|
+
[view]: {
|
|
1084
|
+
exit: {
|
|
1085
|
+
alpha: {
|
|
1086
|
+
from: 0,
|
|
1087
|
+
to: 1
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
it('StackAnimationOptions based pop api is left as is', () => {
|
|
1095
|
+
performOnViewsInvolvedInStackAnimation(view => {
|
|
1096
|
+
const options = {
|
|
1097
|
+
animations: {
|
|
1098
|
+
pop: {
|
|
1099
|
+
[view]: {
|
|
1100
|
+
exit: {
|
|
1101
|
+
alpha: {
|
|
1102
|
+
from: 1,
|
|
1103
|
+
to: 0
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
enter: {
|
|
1107
|
+
alpha: {
|
|
1108
|
+
from: 0,
|
|
1109
|
+
to: 1
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1117
|
+
expect(options.animations.pop).toStrictEqual({
|
|
1118
|
+
[view]: {
|
|
1119
|
+
exit: {
|
|
1120
|
+
alpha: {
|
|
1121
|
+
from: 1,
|
|
1122
|
+
to: 0
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
enter: {
|
|
1126
|
+
alpha: {
|
|
1127
|
+
from: 0,
|
|
1128
|
+
to: 1
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
});
|
|
1135
|
+
it('Options not related to views are left as is', () => {
|
|
1136
|
+
performOnViewsInvolvedInStackAnimation(() => {
|
|
1137
|
+
const options = {
|
|
1138
|
+
animations: {
|
|
1139
|
+
pop: {
|
|
1140
|
+
enabled: false,
|
|
1141
|
+
waitForRender: true,
|
|
1142
|
+
sharedElementTransitions: [],
|
|
1143
|
+
elementTransitions: []
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1148
|
+
expect(options.animations.pop).toStrictEqual({
|
|
1149
|
+
enabled: false,
|
|
1150
|
+
waitForRender: true,
|
|
1151
|
+
sharedElementTransitions: [],
|
|
1152
|
+
elementTransitions: []
|
|
1153
|
+
});
|
|
1154
|
+
});
|
|
1155
|
+
});
|
|
1156
|
+
});
|
|
1157
|
+
describe('setStackRoot', () => {
|
|
1158
|
+
it('ViewAnimationOptions based setStackRoot api is converted to StackAnimationOptions based api', () => {
|
|
1159
|
+
const options = {
|
|
1160
|
+
animations: {
|
|
1161
|
+
setStackRoot: {
|
|
1162
|
+
alpha: {
|
|
1163
|
+
from: 0,
|
|
1164
|
+
to: 1
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1170
|
+
expect(options.animations.setStackRoot).toStrictEqual({
|
|
1171
|
+
content: {
|
|
1172
|
+
enter: {
|
|
1173
|
+
alpha: {
|
|
1174
|
+
from: 0,
|
|
1175
|
+
to: 1
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
});
|
|
1181
|
+
it('Disabled ViewAnimationOptions based setStackRoot api is converted to StackAnimationOptions based api', () => {
|
|
1182
|
+
const options = {
|
|
1183
|
+
animations: {
|
|
1184
|
+
setStackRoot: {
|
|
1185
|
+
enabled: false,
|
|
1186
|
+
waitForRender: true
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1191
|
+
expect(options.animations.setStackRoot).toStrictEqual({
|
|
1192
|
+
enabled: false,
|
|
1193
|
+
waitForRender: true,
|
|
1194
|
+
content: {
|
|
1195
|
+
enter: {
|
|
1196
|
+
enabled: false,
|
|
1197
|
+
waitForRender: true
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
});
|
|
1202
|
+
it('StackAnimationOptions based setStackRoot api is left as is', () => {
|
|
1203
|
+
performOnViewsInvolvedInStackAnimation(view => {
|
|
1204
|
+
const options = {
|
|
1205
|
+
animations: {
|
|
1206
|
+
setStackRoot: {
|
|
1207
|
+
[view]: {
|
|
1208
|
+
enter: {
|
|
1209
|
+
alpha: {
|
|
1210
|
+
from: 0,
|
|
1211
|
+
to: 1
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
uut.processOptions(CommandName.SetRoot, options);
|
|
1219
|
+
expect(options.animations.setStackRoot).toStrictEqual({
|
|
1220
|
+
[view]: {
|
|
1221
|
+
enter: {
|
|
1222
|
+
alpha: {
|
|
1223
|
+
from: 0,
|
|
1224
|
+
to: 1
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
});
|
|
1229
|
+
});
|
|
1230
|
+
});
|
|
1231
|
+
});
|
|
1232
|
+
});
|
|
1233
|
+
});
|
|
1234
|
+
//# sourceMappingURL=OptionsProcessor.test.js.map
|