react-native-navigation 7.23.1-snapshot.440 → 7.24.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.
Files changed (161) hide show
  1. package/Mock.d.ts +1 -0
  2. package/Mock.js +4 -0
  3. package/Mock.ts +1 -1
  4. package/jest.config.js +1 -1
  5. package/lib/{src/Mock → Mock}/Application.tsx +0 -0
  6. package/lib/{src/Mock → Mock}/ComponentProps.tsx +0 -0
  7. package/lib/{src/Mock → Mock}/Components/BottomTabs.tsx +0 -0
  8. package/lib/{src/Mock → Mock}/Components/ComponentScreen.tsx +1 -1
  9. package/lib/{src/Mock → Mock}/Components/LayoutComponent.tsx +0 -0
  10. package/lib/{src/Mock → Mock}/Components/Modals.tsx +0 -0
  11. package/lib/{src/Mock → Mock}/Components/NavigationButton.tsx +1 -1
  12. package/lib/{src/Mock → Mock}/Components/Overlays.tsx +0 -0
  13. package/lib/{src/Mock → Mock}/Components/Stack.tsx +0 -0
  14. package/lib/{src/Mock → Mock}/Components/TopBar.tsx +2 -2
  15. package/lib/{src/Mock → Mock}/Layouts/BottomTabsNode.ts +1 -1
  16. package/lib/{src/Mock → Mock}/Layouts/ComponentNode.ts +1 -1
  17. package/lib/{src/Mock → Mock}/Layouts/LayoutNodeFactory.ts +0 -0
  18. package/lib/{src/Mock → Mock}/Layouts/Node.ts +1 -1
  19. package/lib/{src/Mock → Mock}/Layouts/ParentNode.ts +2 -2
  20. package/lib/{src/Mock → Mock}/Layouts/StackNode.ts +0 -0
  21. package/lib/{src/Mock → Mock}/Stores/EventsStore.ts +3 -3
  22. package/lib/{src/Mock → Mock}/Stores/LayoutStore.ts +1 -1
  23. package/lib/{src/Mock → Mock}/connect.ts +0 -0
  24. package/lib/Mock/constants.d.ts +2 -0
  25. package/lib/Mock/constants.js +5 -0
  26. package/lib/{src/Mock → Mock}/constants.ts +0 -0
  27. package/lib/Mock/index.d.ts +3 -0
  28. package/lib/Mock/index.js +14 -0
  29. package/lib/{src/Mock → Mock}/index.ts +0 -0
  30. package/lib/{src/Mock → Mock}/mocks/AppRegistryService.ts +0 -0
  31. package/lib/{src/Mock → Mock}/mocks/NativeCommandsSender.tsx +1 -1
  32. package/lib/{src/Mock → Mock}/mocks/NativeEventsReceiver.ts +2 -2
  33. package/lib/dist/Mock/Application.js +2 -2
  34. package/lib/dist/Mock/Components/BottomTabs.js +2 -2
  35. package/lib/dist/Mock/Components/ComponentScreen.js +5 -5
  36. package/lib/dist/Mock/Components/LayoutComponent.js +3 -2
  37. package/lib/dist/Mock/Components/Modals.js +2 -2
  38. package/lib/dist/Mock/Components/NavigationButton.d.ts +1 -1
  39. package/lib/dist/Mock/Components/NavigationButton.js +8 -10
  40. package/lib/dist/Mock/Components/Overlays.js +2 -2
  41. package/lib/dist/Mock/Components/Stack.js +2 -2
  42. package/lib/dist/Mock/Components/TopBar.d.ts +2 -2
  43. package/lib/dist/Mock/Components/TopBar.js +7 -6
  44. package/lib/dist/Mock/Layouts/BottomTabsNode.d.ts +1 -1
  45. package/lib/dist/Mock/Layouts/BottomTabsNode.js +3 -3
  46. package/lib/dist/Mock/Layouts/ComponentNode.d.ts +1 -1
  47. package/lib/dist/Mock/Layouts/ComponentNode.js +4 -4
  48. package/lib/dist/Mock/Layouts/LayoutNodeFactory.js +3 -3
  49. package/lib/dist/Mock/Layouts/Node.d.ts +1 -1
  50. package/lib/dist/Mock/Layouts/Node.js +5 -0
  51. package/lib/dist/Mock/Layouts/ParentNode.d.ts +2 -2
  52. package/lib/dist/Mock/Layouts/ParentNode.js +4 -3
  53. package/lib/dist/Mock/Layouts/StackNode.js +1 -1
  54. package/lib/dist/Mock/Stores/EventsStore.d.ts +3 -3
  55. package/lib/dist/Mock/Stores/LayoutStore.js +2 -2
  56. package/lib/dist/Mock/connect.js +1 -1
  57. package/lib/dist/Mock/index.js +1 -1
  58. package/lib/dist/Mock/mocks/NativeCommandsSender.d.ts +1 -1
  59. package/lib/dist/Mock/mocks/NativeCommandsSender.js +2 -2
  60. package/lib/dist/Mock/mocks/NativeEventsReceiver.d.ts +2 -2
  61. package/lib/dist/Mock/mocks/NativeEventsReceiver.js +1 -1
  62. package/lib/dist/{Navigation.d.ts → src/Navigation.d.ts} +0 -0
  63. package/lib/dist/{Navigation.js → src/Navigation.js} +19 -3
  64. package/lib/dist/{NavigationDelegate.d.ts → src/NavigationDelegate.d.ts} +0 -0
  65. package/lib/dist/{NavigationDelegate.js → src/NavigationDelegate.js} +1 -0
  66. package/lib/dist/{adapters → src/adapters}/AppRegistryService.d.ts +0 -0
  67. package/lib/dist/{adapters → src/adapters}/AppRegistryService.js +0 -0
  68. package/lib/dist/{adapters → src/adapters}/AssetResolver.d.ts +0 -0
  69. package/lib/dist/{adapters → src/adapters}/AssetResolver.js +0 -0
  70. package/lib/dist/src/adapters/ColorService.d.ts +3 -0
  71. package/lib/dist/{adapters → src/adapters}/ColorService.js +1 -1
  72. package/lib/dist/{adapters → src/adapters}/Constants.d.ts +0 -0
  73. package/lib/dist/{adapters → src/adapters}/Constants.js +10 -6
  74. package/lib/dist/{adapters → src/adapters}/NativeCommandsSender.d.ts +0 -0
  75. package/lib/dist/{adapters → src/adapters}/NativeCommandsSender.js +1 -0
  76. package/lib/dist/{adapters → src/adapters}/NativeEventsReceiver.d.ts +0 -0
  77. package/lib/dist/{adapters → src/adapters}/NativeEventsReceiver.js +1 -0
  78. package/lib/dist/{adapters → src/adapters}/NativeEventsReceiver.mock.d.ts +0 -0
  79. package/lib/dist/{adapters → src/adapters}/NativeEventsReceiver.mock.js +0 -0
  80. package/lib/dist/{adapters → src/adapters}/TouchablePreview.d.ts +0 -0
  81. package/lib/dist/src/adapters/TouchablePreview.js +89 -0
  82. package/lib/dist/{adapters → src/adapters}/UniqueIdProvider.d.ts +0 -0
  83. package/lib/dist/{adapters → src/adapters}/UniqueIdProvider.js +2 -2
  84. package/lib/dist/{commands → src/commands}/Commands.d.ts +0 -0
  85. package/lib/dist/{commands → src/commands}/Commands.js +18 -9
  86. package/lib/dist/{commands → src/commands}/Deprecations.d.ts +0 -0
  87. package/lib/dist/src/commands/Deprecations.js +80 -0
  88. package/lib/dist/{commands → src/commands}/LayoutTreeCrawler.d.ts +0 -0
  89. package/lib/dist/{commands → src/commands}/LayoutTreeCrawler.js +2 -0
  90. package/lib/dist/{commands → src/commands}/LayoutTreeParser.d.ts +0 -0
  91. package/lib/dist/{commands → src/commands}/LayoutTreeParser.js +1 -0
  92. package/lib/dist/{commands → src/commands}/LayoutType.d.ts +0 -0
  93. package/lib/dist/{commands → src/commands}/LayoutType.js +0 -0
  94. package/lib/dist/{commands → src/commands}/OptionsCrawler.d.ts +0 -0
  95. package/lib/dist/{commands → src/commands}/OptionsCrawler.js +6 -4
  96. package/lib/dist/{commands → src/commands}/OptionsProcessor.d.ts +0 -0
  97. package/lib/dist/{commands → src/commands}/OptionsProcessor.js +42 -36
  98. package/lib/dist/{components → src/components}/ComponentRegistry.d.ts +0 -0
  99. package/lib/dist/{components → src/components}/ComponentRegistry.js +4 -0
  100. package/lib/dist/{components → src/components}/ComponentWrapper.d.ts +0 -0
  101. package/lib/dist/{components → src/components}/ComponentWrapper.js +17 -17
  102. package/lib/dist/{components → src/components}/Modal.d.ts +0 -0
  103. package/lib/dist/{components → src/components}/Modal.js +8 -8
  104. package/lib/dist/{components → src/components}/Store.d.ts +0 -0
  105. package/lib/dist/{components → src/components}/Store.js +6 -7
  106. package/lib/dist/{events → src/events}/CommandsObserver.d.ts +0 -0
  107. package/lib/dist/{events → src/events}/CommandsObserver.js +2 -1
  108. package/lib/dist/{events → src/events}/ComponentEventsObserver.d.ts +4 -2
  109. package/lib/dist/{events → src/events}/ComponentEventsObserver.js +16 -14
  110. package/lib/dist/{events → src/events}/EventsRegistry.d.ts +2 -2
  111. package/lib/dist/{events → src/events}/EventsRegistry.js +3 -0
  112. package/lib/dist/{index.d.ts → src/index.d.ts} +0 -0
  113. package/lib/dist/src/index.js +22 -0
  114. package/lib/dist/{interfaces → src/interfaces}/CommandName.d.ts +0 -0
  115. package/lib/dist/{interfaces → src/interfaces}/CommandName.js +0 -0
  116. package/lib/dist/{interfaces → src/interfaces}/ComponentEvents.d.ts +0 -0
  117. package/lib/dist/{interfaces → src/interfaces}/ComponentEvents.js +0 -0
  118. package/lib/dist/{interfaces → src/interfaces}/EventSubscription.d.ts +0 -0
  119. package/lib/dist/{interfaces → src/interfaces}/EventSubscription.js +0 -0
  120. package/lib/dist/{interfaces → src/interfaces}/Events.d.ts +0 -0
  121. package/lib/dist/{interfaces → src/interfaces}/Events.js +0 -0
  122. package/lib/dist/{interfaces → src/interfaces}/Layout.d.ts +0 -0
  123. package/lib/dist/{interfaces → src/interfaces}/Layout.js +0 -0
  124. package/lib/dist/{interfaces → src/interfaces}/NavigationComponent.d.ts +0 -0
  125. package/lib/dist/{interfaces → src/interfaces}/NavigationComponent.js +8 -1
  126. package/lib/dist/{interfaces → src/interfaces}/NavigationComponentListener.d.ts +0 -0
  127. package/lib/dist/{interfaces → src/interfaces}/NavigationComponentListener.js +0 -0
  128. package/lib/dist/{interfaces → src/interfaces}/NavigationComponentProps.d.ts +0 -0
  129. package/lib/dist/{interfaces → src/interfaces}/NavigationComponentProps.js +0 -0
  130. package/lib/dist/{interfaces → src/interfaces}/NavigationFunctionComponent.d.ts +0 -0
  131. package/lib/dist/{interfaces → src/interfaces}/NavigationFunctionComponent.js +0 -0
  132. package/lib/dist/{interfaces → src/interfaces}/Options.d.ts +0 -0
  133. package/lib/dist/{interfaces → src/interfaces}/Options.js +0 -0
  134. package/lib/dist/{interfaces → src/interfaces}/ProcessorSubscription.d.ts +0 -0
  135. package/lib/dist/{interfaces → src/interfaces}/ProcessorSubscription.js +0 -0
  136. package/lib/dist/{interfaces → src/interfaces}/Processors.d.ts +0 -0
  137. package/lib/dist/{interfaces → src/interfaces}/Processors.js +0 -0
  138. package/lib/dist/{processors → src/processors}/LayoutProcessor.d.ts +0 -0
  139. package/lib/dist/{processors → src/processors}/LayoutProcessor.js +1 -0
  140. package/lib/dist/{processors → src/processors}/LayoutProcessorsStore.d.ts +0 -0
  141. package/lib/dist/{processors → src/processors}/LayoutProcessorsStore.js +1 -3
  142. package/lib/dist/{processors → src/processors}/OptionProcessorsStore.d.ts +0 -0
  143. package/lib/dist/{processors → src/processors}/OptionProcessorsStore.js +1 -3
  144. package/lib/dist/{types.d.ts → src/types.d.ts} +0 -0
  145. package/lib/dist/{types.js → src/types.js} +0 -0
  146. package/lib/ios/AnimationObserver.h +17 -0
  147. package/lib/ios/AnimationObserver.m +41 -0
  148. package/lib/ios/RNNCommandsHandler.m +14 -4
  149. package/lib/ios/RNNComponentViewController.m +2 -0
  150. package/lib/ios/RNNExternalViewController.m +2 -0
  151. package/lib/ios/RNNSwizzles.m +20 -0
  152. package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +8 -0
  153. package/lib/src/commands/OptionsCrawler.ts +2 -1
  154. package/lib/src/events/ComponentEventsObserver.ts +5 -1
  155. package/lib/src/events/EventsRegistry.ts +2 -1
  156. package/package.json +6 -6
  157. package/tsconfig.mocks.json +7 -0
  158. package/lib/dist/adapters/ColorService.d.ts +0 -3
  159. package/lib/dist/adapters/TouchablePreview.js +0 -91
  160. package/lib/dist/commands/Deprecations.js +0 -82
  161. package/lib/dist/index.js +0 -22
package/Mock.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/Mock';
package/Mock.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./lib/Mock"), exports);
package/Mock.ts CHANGED
@@ -1 +1 @@
1
- export * from './lib/dist/Mock';
1
+ export * from './lib/Mock';
package/jest.config.js CHANGED
@@ -16,7 +16,7 @@ module.exports = {
16
16
  setupFilesAfterEnv: ['./jest-setup.js'],
17
17
  testPathIgnorePatterns: ['/node_modules/'],
18
18
  moduleNameMapper: {
19
- 'react-native-navigation/Mock': '<rootDir>/lib/src/Mock',
19
+ 'react-native-navigation/Mock': '<rootDir>/lib/Mock',
20
20
  'react-native-navigation': '<rootDir>/lib/src',
21
21
  '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
22
22
  '<rootDir>/playground/img/layouts@2x.png',
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Button, View, Text } from 'react-native';
3
- import { Navigation } from '../..';
3
+ import { Navigation } from '../../src';
4
4
  import { ComponentProps } from '../ComponentProps';
5
5
  import { VISIBLE_SCREEN_TEST_ID } from '../constants';
6
6
  import { LayoutStore } from '../Stores/LayoutStore';
File without changes
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Button, TouchableOpacity } from 'react-native';
3
- import { Navigation, OptionsTopBarButton } from '../../';
3
+ import { Navigation, OptionsTopBarButton } from '../../src';
4
4
  import { events } from '../Stores/EventsStore';
5
5
 
6
6
  interface ButtonProps {
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Button, View, Text } from 'react-native';
3
- import { Navigation, OptionsTopBarButton } from '../..';
4
- import { OptionsTopBar, OptionsTopBarBackButton } from '../../interfaces/Options';
3
+ import { Navigation, OptionsTopBarButton } from '../../src';
4
+ import { OptionsTopBar, OptionsTopBarBackButton } from '../../src/interfaces/Options';
5
5
  import ParentNode from '../Layouts/ParentNode';
6
6
  import { LayoutStore } from '../Stores/LayoutStore';
7
7
  import { NavigationButton } from './NavigationButton';
@@ -1,5 +1,5 @@
1
1
  import _ from 'lodash';
2
- import { Options } from '../../index';
2
+ import { Options } from '../../src/index';
3
3
  import { LayoutStore } from '../Stores/LayoutStore';
4
4
  import ParentNode from './ParentNode';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import _ from 'lodash';
2
- import { OptionsTopBarButton } from 'react-native-navigation/interfaces/Options';
2
+ import { OptionsTopBarButton } from '../../src';
3
3
  import { events } from '../Stores/EventsStore';
4
4
  import ParentNode from './ParentNode';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Options } from '../../index';
1
+ import { Options } from '../../src/index';
2
2
  import ParentNode from './ParentNode';
3
3
 
4
4
  interface Data {
@@ -1,6 +1,6 @@
1
1
  import _ from 'lodash';
2
- import { OptionsTopBarButton } from '../../interfaces/Options';
3
- import { Options } from '../../index';
2
+ import { OptionsTopBarButton } from '../../src/interfaces/Options';
3
+ import { Options } from '../../src/index';
4
4
  import { LayoutStore } from '../Stores/LayoutStore';
5
5
  import ComponentNode from './ComponentNode';
6
6
  import LayoutNodeFactory from './LayoutNodeFactory';
File without changes
@@ -2,9 +2,9 @@ import {
2
2
  ComponentDidDisappearEvent,
3
3
  ComponentWillAppearEvent,
4
4
  ModalDismissedEvent,
5
- } from '../../interfaces/ComponentEvents';
6
- import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../index';
7
- import { BottomTabPressedEvent } from '../../interfaces/Events';
5
+ } from '../../src/interfaces/ComponentEvents';
6
+ import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../src/index';
7
+ import { BottomTabPressedEvent } from '../../src/interfaces/Events';
8
8
 
9
9
  export const events = {
10
10
  navigationButtonPressed: [(_event: NavigationButtonPressedEvent) => {}],
@@ -2,7 +2,7 @@ import _ from 'lodash';
2
2
  import BottomTabsNode from '../Layouts/BottomTabsNode';
3
3
  import ParentNode from '../Layouts/ParentNode';
4
4
  import LayoutNodeFactory from '../Layouts/LayoutNodeFactory';
5
- import { Options } from '../../interfaces/Options';
5
+ import { Options } from '../../src/interfaces/Options';
6
6
  import StackNode from '../Layouts/StackNode';
7
7
 
8
8
  const remx = require('remx');
File without changes
@@ -0,0 +1,2 @@
1
+ export declare const VISIBLE_SCREEN_TEST_ID = "VISIBLE_SCREEN_TEST_ID";
2
+ export declare const VISIBLE_OVERLAY_TEST_ID = "VISIBLE_OVERLAY_TEST_ID";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VISIBLE_OVERLAY_TEST_ID = exports.VISIBLE_SCREEN_TEST_ID = void 0;
4
+ exports.VISIBLE_SCREEN_TEST_ID = 'VISIBLE_SCREEN_TEST_ID';
5
+ exports.VISIBLE_OVERLAY_TEST_ID = 'VISIBLE_OVERLAY_TEST_ID';
File without changes
@@ -0,0 +1,3 @@
1
+ export declare const ApplicationMock: any;
2
+ export * from './constants';
3
+ export declare function mockNativeComponents(): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockNativeComponents = exports.ApplicationMock = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.ApplicationMock = require('./Application').Application;
6
+ (0, tslib_1.__exportStar)(require("./constants"), exports);
7
+ function mockNativeComponents() {
8
+ const { NativeCommandsSender } = require('./mocks/NativeCommandsSender');
9
+ const { NativeEventsReceiver } = require('./mocks/NativeEventsReceiver');
10
+ const { AppRegistryService } = require('./mocks/AppRegistryService');
11
+ const { Navigation } = require('react-native-navigation');
12
+ Navigation.mockNativeComponents(new NativeCommandsSender(), new NativeEventsReceiver(), new AppRegistryService());
13
+ }
14
+ exports.mockNativeComponents = mockNativeComponents;
File without changes
@@ -1,6 +1,6 @@
1
1
  import { LayoutStore } from '../Stores/LayoutStore';
2
2
  import LayoutNodeFactory from '../Layouts/LayoutNodeFactory';
3
- import { LayoutNode } from 'react-native-navigation/commands/LayoutTreeCrawler';
3
+ import { LayoutNode } from '../../src/commands/LayoutTreeCrawler';
4
4
  import { events } from '../Stores/EventsStore';
5
5
  import _ from 'lodash';
6
6
  import ComponentNode from '../Layouts/ComponentNode';
@@ -11,13 +11,13 @@ import {
11
11
  ModalDismissedEvent,
12
12
  ScreenPoppedEvent,
13
13
  ModalAttemptedToDismissEvent,
14
- } from '../../interfaces/ComponentEvents';
14
+ } from '../../src/interfaces/ComponentEvents';
15
15
  import {
16
16
  CommandCompletedEvent,
17
17
  BottomTabSelectedEvent,
18
18
  BottomTabLongPressedEvent,
19
19
  BottomTabPressedEvent,
20
- } from '../../interfaces/Events';
20
+ } from '../../src/interfaces/Events';
21
21
  import { events } from './../Stores/EventsStore';
22
22
 
23
23
  export class NativeEventsReceiver {
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Application = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
5
+ const React = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
7
  const connect_1 = require("./connect");
8
- exports.Application = connect_1.connect(class extends React.Component {
8
+ exports.Application = (0, connect_1.connect)(class extends React.Component {
9
9
  constructor(props) {
10
10
  super(props);
11
11
  props.entryPoint();
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BottomTabs = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const LayoutComponent_1 = require("./LayoutComponent");
7
7
  const connect_1 = require("../connect");
8
- exports.BottomTabs = connect_1.connect(class extends react_1.Component {
8
+ exports.BottomTabs = (0, connect_1.connect)(class extends react_1.Component {
9
9
  render() {
10
10
  return this.props.layoutNode.children.map((child) => {
11
11
  return react_1.default.createElement(LayoutComponent_1.LayoutComponent, { key: child.nodeId, layoutNode: child });
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ComponentScreen = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
- const __1 = require("../..");
7
+ const src_1 = require("../../src");
8
8
  const constants_1 = require("../constants");
9
9
  const LayoutStore_1 = require("../Stores/LayoutStore");
10
10
  const connect_1 = require("../connect");
11
11
  const TopBar_1 = require("./TopBar");
12
12
  const EventsStore_1 = require("../Stores/EventsStore");
13
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
14
- exports.ComponentScreen = connect_1.connect(class extends react_1.Component {
13
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
14
+ exports.ComponentScreen = (0, connect_1.connect)(class extends react_1.Component {
15
15
  constructor(props) {
16
16
  super(props);
17
17
  }
@@ -43,7 +43,7 @@ exports.ComponentScreen = connect_1.connect(class extends react_1.Component {
43
43
  return react_1.default.createElement(react_native_1.View, { testID: bottomTabsOptions?.testID }, buttons);
44
44
  }
45
45
  render() {
46
- const Component = __1.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
46
+ const Component = src_1.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
47
47
  if (!Component)
48
48
  throw new Error(`${this.props.layoutNode.data.name} has not been registered.`);
49
49
  return (react_1.default.createElement(react_native_1.View, { testID: this.isVisible() ? constants_1.VISIBLE_SCREEN_TEST_ID : undefined },
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LayoutComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
7
  const BottomTabs_1 = require("./BottomTabs");
8
8
  const ComponentScreen_1 = require("./ComponentScreen");
9
9
  const Stack_1 = require("./Stack");
10
- exports.LayoutComponent = class extends react_1.Component {
10
+ const LayoutComponent = class extends react_1.Component {
11
11
  render() {
12
12
  switch (this.props.layoutNode.type) {
13
13
  case 'BottomTabs':
@@ -20,3 +20,4 @@ exports.LayoutComponent = class extends react_1.Component {
20
20
  return react_1.default.createElement(react_native_1.View, null);
21
21
  }
22
22
  };
23
+ exports.LayoutComponent = LayoutComponent;
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Modals = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
7
  const LayoutComponent_1 = require("./LayoutComponent");
8
8
  const LayoutStore_1 = require("../Stores/LayoutStore");
9
9
  const connect_1 = require("../connect");
10
- exports.Modals = connect_1.connect(class extends react_1.Component {
10
+ exports.Modals = (0, connect_1.connect)(class extends react_1.Component {
11
11
  render() {
12
12
  const children = LayoutStore_1.LayoutStore.getModals();
13
13
  return (react_1.default.createElement(react_native_1.View, { testID: 'MODALS' }, children.map((child) => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { OptionsTopBarButton } from '../../';
2
+ import { OptionsTopBarButton } from '../../src';
3
3
  interface ButtonProps {
4
4
  button: OptionsTopBarButton;
5
5
  componentId: string;
@@ -2,15 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NavigationButton = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
- const __1 = require("../../");
7
+ const src_1 = require("../../src");
8
8
  const EventsStore_1 = require("../Stores/EventsStore");
9
- exports.NavigationButton = class extends react_1.Component {
10
- constructor() {
11
- super(...arguments);
12
- this.ref = undefined;
13
- }
9
+ const NavigationButton = class extends react_1.Component {
10
+ ref = undefined;
14
11
  render() {
15
12
  const { button, componentId } = this.props;
16
13
  if (button.component)
@@ -26,8 +23,8 @@ exports.NavigationButton = class extends react_1.Component {
26
23
  //@ts-ignore
27
24
  const buttonComponentId = button.component.componentId;
28
25
  //@ts-ignore
29
- const Component = __1.Navigation.mock.store.getComponentClassForName(button.component.name)();
30
- const props = __1.Navigation.mock.store.getPropsForId(buttonComponentId);
26
+ const Component = src_1.Navigation.mock.store.getComponentClassForName(button.component.name)();
27
+ const props = src_1.Navigation.mock.store.getPropsForId(buttonComponentId);
31
28
  return (react_1.default.createElement(react_native_1.TouchableOpacity, { onPress: () => {
32
29
  if (this.ref) {
33
30
  // @ts-ignore
@@ -38,7 +35,7 @@ exports.NavigationButton = class extends react_1.Component {
38
35
  componentId: componentId,
39
36
  });
40
37
  }, testID: button.testID },
41
- react_1.default.createElement(Component, Object.assign({ key: buttonComponentId }, props, { componentId: buttonComponentId, ref: (ref) => (this.ref = ref) }))));
38
+ react_1.default.createElement(Component, { key: buttonComponentId, ...props, componentId: buttonComponentId, ref: (ref) => (this.ref = ref) })));
42
39
  }
43
40
  invokeOnClick(stateNode) {
44
41
  if (stateNode.children) {
@@ -53,3 +50,4 @@ exports.NavigationButton = class extends react_1.Component {
53
50
  }
54
51
  }
55
52
  };
53
+ exports.NavigationButton = NavigationButton;
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Overlays = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
7
  const constants_1 = require("../constants");
8
8
  const LayoutComponent_1 = require("./LayoutComponent");
9
9
  const LayoutStore_1 = require("../Stores/LayoutStore");
10
10
  const connect_1 = require("../connect");
11
- exports.Overlays = connect_1.connect(class extends react_1.Component {
11
+ exports.Overlays = (0, connect_1.connect)(class extends react_1.Component {
12
12
  render() {
13
13
  const children = LayoutStore_1.LayoutStore.getOverlays();
14
14
  return (react_1.default.createElement(react_native_1.View, { testID: constants_1.VISIBLE_OVERLAY_TEST_ID }, children.map((child) => {
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Stack = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const LayoutComponent_1 = require("./LayoutComponent");
7
7
  const connect_1 = require("../connect");
8
- exports.Stack = connect_1.connect(class extends react_1.Component {
8
+ exports.Stack = (0, connect_1.connect)(class extends react_1.Component {
9
9
  render() {
10
10
  const children = this.props.layoutNode.children;
11
11
  return children.map((child, i) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { OptionsTopBarButton } from '../..';
3
- import { OptionsTopBar, OptionsTopBarBackButton } from '../../interfaces/Options';
2
+ import { OptionsTopBarButton } from '../../src';
3
+ import { OptionsTopBar, OptionsTopBarBackButton } from '../../src/interfaces/Options';
4
4
  import ParentNode from '../Layouts/ParentNode';
5
5
  export interface TopBarProps {
6
6
  layoutNode: ParentNode;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TopBar = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
5
+ const react_1 = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_native_1 = require("react-native");
7
- const __1 = require("../..");
7
+ const src_1 = require("../../src");
8
8
  const LayoutStore_1 = require("../Stores/LayoutStore");
9
9
  const NavigationButton_1 = require("./NavigationButton");
10
10
  const EventsStore_1 = require("../Stores/EventsStore");
11
11
  const DEFAULT_BACK_BUTTON_ID = 'RNN.back';
12
- exports.TopBar = class extends react_1.Component {
12
+ const TopBar = class extends react_1.Component {
13
13
  constructor(props) {
14
14
  super(props);
15
15
  }
@@ -54,9 +54,10 @@ exports.TopBar = class extends react_1.Component {
54
54
  } }));
55
55
  }
56
56
  renderComponent(id, name, testID) {
57
- const Component = __1.Navigation.mock.store.getComponentClassForName(name)();
58
- const props = __1.Navigation.mock.store.getPropsForId(id);
57
+ const Component = src_1.Navigation.mock.store.getComponentClassForName(name)();
58
+ const props = src_1.Navigation.mock.store.getPropsForId(id);
59
59
  return (react_1.default.createElement(react_native_1.View, { key: id, testID: testID },
60
- react_1.default.createElement(Component, Object.assign({}, props, { componentId: id }))));
60
+ react_1.default.createElement(Component, { ...props, componentId: id })));
61
61
  }
62
62
  };
63
+ exports.TopBar = TopBar;
@@ -1,4 +1,4 @@
1
- import { Options } from '../../index';
1
+ import { Options } from '../../src/index';
2
2
  import ParentNode from './ParentNode';
3
3
  export default class BottomTabsNode extends ParentNode {
4
4
  selectedIndex: number;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
4
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
5
5
  const LayoutStore_1 = require("../Stores/LayoutStore");
6
- const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
6
+ const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
7
7
  class BottomTabsNode extends ParentNode_1.default {
8
+ selectedIndex = 0;
8
9
  constructor(layout, parentNode) {
9
10
  super(layout, 'BottomTabs', parentNode);
10
- this.selectedIndex = 0;
11
11
  }
12
12
  mergeOptions(options) {
13
13
  super.mergeOptions(options);
@@ -1,4 +1,4 @@
1
- import { OptionsTopBarButton } from 'react-native-navigation/interfaces/Options';
1
+ import { OptionsTopBarButton } from '../../src';
2
2
  import ParentNode from './ParentNode';
3
3
  export default class ComponentNode extends ParentNode {
4
4
  componentDidMountOnce: boolean;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
4
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
5
5
  const EventsStore_1 = require("../Stores/EventsStore");
6
- const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
6
+ const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
7
7
  class ComponentNode extends ParentNode_1.default {
8
+ componentDidMountOnce = false;
9
+ componentDidAppearPending = false;
8
10
  constructor(layout, parentNode) {
9
11
  super(layout, 'Component', parentNode);
10
- this.componentDidMountOnce = false;
11
- this.componentDidAppearPending = false;
12
12
  }
13
13
  componentDidMount() {
14
14
  this.componentDidMountOnce = true;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const BottomTabsNode_1 = tslib_1.__importDefault(require("./BottomTabsNode"));
5
- const ComponentNode_1 = tslib_1.__importDefault(require("./ComponentNode"));
6
- const StackNode_1 = tslib_1.__importDefault(require("./StackNode"));
4
+ const BottomTabsNode_1 = (0, tslib_1.__importDefault)(require("./BottomTabsNode"));
5
+ const ComponentNode_1 = (0, tslib_1.__importDefault)(require("./ComponentNode"));
6
+ const StackNode_1 = (0, tslib_1.__importDefault)(require("./StackNode"));
7
7
  class LayoutNodeFactory {
8
8
  static create(layout, parentNode) {
9
9
  switch (layout.type) {
@@ -1,4 +1,4 @@
1
- import { Options } from '../../index';
1
+ import { Options } from '../../src/index';
2
2
  import ParentNode from './ParentNode';
3
3
  interface Data {
4
4
  name: string;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class Node {
4
+ nodeId;
5
+ data;
6
+ type;
7
+ // options: Options;
8
+ parentNode;
4
9
  constructor(layout, type, parentNode) {
5
10
  this.nodeId = layout.id;
6
11
  this.data = layout.data;
@@ -1,5 +1,5 @@
1
- import { OptionsTopBarButton } from '../../interfaces/Options';
2
- import { Options } from '../../index';
1
+ import { OptionsTopBarButton } from '../../src/interfaces/Options';
2
+ import { Options } from '../../src/index';
3
3
  import ComponentNode from './ComponentNode';
4
4
  import Node, { NodeType } from './Node';
5
5
  export default class ParentNode extends Node {
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
4
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
5
5
  const LayoutStore_1 = require("../Stores/LayoutStore");
6
- const LayoutNodeFactory_1 = tslib_1.__importDefault(require("./LayoutNodeFactory"));
7
- const Node_1 = tslib_1.__importDefault(require("./Node"));
6
+ const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("./LayoutNodeFactory"));
7
+ const Node_1 = (0, tslib_1.__importDefault)(require("./Node"));
8
8
  class ParentNode extends Node_1.default {
9
+ children;
9
10
  constructor(layout, type, parentNode) {
10
11
  super(layout, type, parentNode);
11
12
  this.children = layout.children.map((childLayout) => LayoutNodeFactory_1.default.create(childLayout, this));
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
4
+ const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
5
5
  class StackNode extends ParentNode_1.default {
6
6
  constructor(layout, parentNode) {
7
7
  super(layout, 'Stack', parentNode);
@@ -1,6 +1,6 @@
1
- import { ComponentDidDisappearEvent, ComponentWillAppearEvent, ModalDismissedEvent } from '../../interfaces/ComponentEvents';
2
- import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../index';
3
- import { BottomTabPressedEvent } from '../../interfaces/Events';
1
+ import { ComponentDidDisappearEvent, ComponentWillAppearEvent, ModalDismissedEvent } from '../../src/interfaces/ComponentEvents';
2
+ import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../src/index';
3
+ import { BottomTabPressedEvent } from '../../src/interfaces/Events';
4
4
  export declare const events: {
5
5
  navigationButtonPressed: ((_event: NavigationButtonPressedEvent) => void)[];
6
6
  componentWillAppear: ((_event: ComponentWillAppearEvent) => void)[];
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LayoutStore = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
- const LayoutNodeFactory_1 = tslib_1.__importDefault(require("../Layouts/LayoutNodeFactory"));
5
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
6
+ const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("../Layouts/LayoutNodeFactory"));
7
7
  const remx = require('remx');
8
8
  const state = remx.state({
9
9
  root: {},
@@ -4,6 +4,6 @@ exports.connect = void 0;
4
4
  const remx_1 = require("remx");
5
5
  function connect(component) {
6
6
  // @ts-ignore
7
- return remx_1.connect()(component);
7
+ return (0, remx_1.connect)()(component);
8
8
  }
9
9
  exports.connect = connect;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mockNativeComponents = exports.ApplicationMock = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  exports.ApplicationMock = require('./Application').Application;
6
- tslib_1.__exportStar(require("./constants"), exports);
6
+ (0, tslib_1.__exportStar)(require("./constants"), exports);
7
7
  function mockNativeComponents() {
8
8
  const { NativeCommandsSender } = require('./mocks/NativeCommandsSender');
9
9
  const { NativeEventsReceiver } = require('./mocks/NativeEventsReceiver');
@@ -1,4 +1,4 @@
1
- import { LayoutNode } from 'react-native-navigation/commands/LayoutTreeCrawler';
1
+ import { LayoutNode } from '../../src/commands/LayoutTreeCrawler';
2
2
  export declare class NativeCommandsSender {
3
3
  constructor();
4
4
  setRoot(_commandId: string, layout: {
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NativeCommandsSender = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const LayoutStore_1 = require("../Stores/LayoutStore");
6
- const LayoutNodeFactory_1 = tslib_1.__importDefault(require("../Layouts/LayoutNodeFactory"));
6
+ const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("../Layouts/LayoutNodeFactory"));
7
7
  const EventsStore_1 = require("../Stores/EventsStore");
8
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
8
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
9
9
  class NativeCommandsSender {
10
10
  constructor() { }
11
11
  setRoot(_commandId, layout) {