Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Mock.ts

This file was deleted.

3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = {
},
roots: [
'<rootDir>/src/',
'<rootDir>/Mock/',
'<rootDir>/playground/src/',
'<rootDir>/integration/',
'<rootDir>/scripts/',
Expand All @@ -21,7 +20,7 @@ module.exports = {
'^react-native$': '<rootDir>/node_modules/react-native',
'^react-native-gesture-handler$': '<rootDir>/node_modules/react-native-gesture-handler',
'^react-native-webview$': '<rootDir>/__mocks__/react-native-webview.js',
'react-native-navigation/Mock': '<rootDir>/Mock/index',
'react-native-navigation/Mock': '<rootDir>/src/Mock/index',
'react-native-navigation': '<rootDir>/src',
'^src$': '<rootDir>/src',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@
"rnn-link": "./autolink/postlink/run.js"
},
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
"types": "./lib/typescript/index.d.ts",
"react-native": "./src/index.ts",
"exports": {
".": {
"react-native": "./src/index.ts",
"types": "./lib/typescript/index.d.ts",
"default": "./lib/module/index.js",
"source": "./src/index.ts",
"types": "./lib/typescript/src/index.d.ts",
"default": "./lib/module/index.js"
"react-native": "./src/index.ts"
},
"./Mock": {
"types": "./lib/typescript/Mock/index.d.ts",
"default": "./lib/module/Mock/index.js",
"source": "./src/Mock/index.ts",
"react-native": "./src/Mock/index.ts"
},
"./package.json": "./package.json"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { View, Text, TouchableOpacity, Image, ImageURISource } from 'react-native';
import { Navigation, ImageResource } from 'src';
import { Navigation, ImageResource } from 'react-native-navigation';
import { ComponentProps } from '../ComponentProps';
import { VISIBLE_SCREEN_TEST_ID } from '../constants';
import { LayoutStore } from '../Stores/LayoutStore';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Button, TouchableOpacity } from 'react-native';
import { Navigation, OptionsTopBarButton } from 'src';
import { Navigation, OptionsTopBarButton } from 'react-native-navigation';
import { events } from '../Stores/EventsStore';

interface ButtonProps {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
OptionsTopBar,
OptionsTopBarBackButton,
OptionsTopBarButton,
} from 'src';
} from 'react-native-navigation';
import ParentNode from '../Layouts/ParentNode';
import { LayoutStore } from '../Stores/LayoutStore';
import { NavigationButton } from './NavigationButton';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { Options } from '../../src';
import { Options } from '../../index';
import { switchTabByIndex } from '../actions/layoutActions';
import ParentNode from './ParentNode';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { OptionsTopBarButton } from '../../src';
import { OptionsTopBarButton } from '../../index';
import { events } from '../Stores/EventsStore';
import ParentNode from './ParentNode';

Expand Down
2 changes: 1 addition & 1 deletion Mock/Layouts/Node.ts → src/Mock/Layouts/Node.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Options } from '../../src';
import { Options } from '../../index';
import ParentNode from './ParentNode';

interface Data {
Expand Down
4 changes: 2 additions & 2 deletions Mock/Layouts/ParentNode.ts → src/Mock/Layouts/ParentNode.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'lodash';
import { OptionsTopBarButton } from '../../src/interfaces/Options';
import { Options } from '../../src';
import { OptionsTopBarButton } from '../../interfaces/Options';
import { Options } from '../../index';
import { LayoutStore } from '../Stores/LayoutStore';
import ComponentNode from './ComponentNode';
import LayoutNodeFactory from './LayoutNodeFactory';
Expand Down
2 changes: 1 addition & 1 deletion Mock/Layouts/SideMenu.ts → src/Mock/Layouts/SideMenu.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ParentNode from './ParentNode';
import ComponentNode from './ComponentNode';
import { Options } from '../../src';
import { Options } from '../../index';
import * as layoutActions from '../actions/layoutActions';
import { NodeType } from './Node';

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions Mock/Stores/EventsStore.ts → src/Mock/Stores/EventsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
ComponentWillAppearEvent,
ModalDismissedEvent,
ScreenPoppedEvent,
} from '../../src/interfaces/ComponentEvents';
import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../src';
import { BottomTabPressedEvent, CommandCompletedEvent } from '../../src/interfaces/Events';
} from '../../interfaces/ComponentEvents';
import { ComponentDidAppearEvent, NavigationButtonPressedEvent } from '../../index';
import { BottomTabPressedEvent, CommandCompletedEvent } from '../../interfaces/Events';

export const events = {
navigationButtonPressed: [(_event: NavigationButtonPressedEvent) => {}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ParentNode from '../Layouts/ParentNode';
import LayoutNodeFactory from '../Layouts/LayoutNodeFactory';
import { SideMenuNode } from '../Layouts/SideMenu';
import StackNode from '../Layouts/StackNode';
import { Options } from '../../src/interfaces/Options';
import { Options } from '../../interfaces/Options';

const remx = require('remx');

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Mock/index.ts → src/Mock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function mockNativeComponents() {
const { NativeCommandsSender } = require('./mocks/NativeCommandsSender');
const { NativeEventsReceiver } = require('./mocks/NativeEventsReceiver');
const { AppRegistryService } = require('./mocks/AppRegistryService');
const { Navigation } = require('src');
const { Navigation } = require('react-native-navigation');

Navigation.mockNativeComponents(
new NativeCommandsSender(),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LayoutStore } from '../Stores/LayoutStore';
import LayoutNodeFactory from '../Layouts/LayoutNodeFactory';
import { LayoutNode } from '../../src/commands/LayoutTreeCrawler';
import { LayoutNode } from '../../commands/LayoutTreeCrawler';
import { events } from '../Stores/EventsStore';
import _ from 'lodash';
import ComponentNode from '../Layouts/ComponentNode';
import { Constants } from '../../src/adapters/Constants';
import { CommandName } from '../../src/interfaces/CommandName';
import { Constants } from '../../adapters/Constants';
import { CommandName } from '../../interfaces/CommandName';

export class NativeCommandsSender {
constructor() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
ModalDismissedEvent,
ScreenPoppedEvent,
ModalAttemptedToDismissEvent,
} from '../../src/interfaces/ComponentEvents';
} from '../../interfaces/ComponentEvents';
import {
CommandCompletedEvent,
BottomTabSelectedEvent,
BottomTabLongPressedEvent,
BottomTabPressedEvent,
} from '../../src/interfaces/Events';
} from '../../interfaces/Events';
import { events } from '../Stores/EventsStore';

export class NativeEventsReceiver {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
}
},
"include": [
"./src/**/*", "./playground/**/*",
"Mock"
"./src/**/*", "./playground/**/*"
]
}
7 changes: 0 additions & 7 deletions tsconfig.mocks.json

This file was deleted.