feat(web/RN): update React to v16 and React Native to 0.49

This commit is contained in:
paweldomas 2017-10-24 17:26:56 -05:00 committed by Saúl Ibarra Corretgé
parent e520319af2
commit b74bede0e7
60 changed files with 3327 additions and 557 deletions

View File

@ -14,12 +14,20 @@
.*/Libraries/react-native/React.js .*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js .*/Libraries/react-native/ReactNative.js
; Ignore polyfills
.*/Libraries/polyfills/.*
; Ignore packages in node_modules which we (i.e. the jitsi-meet project) have ; Ignore packages in node_modules which we (i.e. the jitsi-meet project) have
; seen to cause errors and we have chosen not to fix. ; seen to cause errors and we have chosen not to fix.
.*/node_modules/babel-.* .*/node_modules/@atlassian
.*/node_modules/bower/.* .*/node_modules/bower/lib/node_modules/bower-json/test/.*
.*/node_modules/jsonlint/.* .*/node_modules/jsonlint/test/.*
.*/node_modules/promise/index.js.flow
; FIXME Remove once we update past this commit:
; https://github.com/facebook/react-native/commit/df8d0d1db9203cc87ad3682e6138b2a9ed714365
.*/node_modules/react-native/local-cli/link/link.js
.*/node_modules/react-native-keep-awake/.*
.*/node_modules/styled-components/.* .*/node_modules/styled-components/.*
.*/\.git/.* .*/\.git/.*
@ -29,15 +37,12 @@
[libs] [libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow node_modules/react-native/flow
flow/
[options] [options]
emoji=true emoji=true
module.system=haste module.system=haste
experimental.strict_type_args=true
; FIXME: munge_underscores should be false but right now there are some errors ; FIXME: munge_underscores should be false but right now there are some errors
; if we change the value to false ; if we change the value to false
; Treats class properties with underscore as private. Disabled because currently ; Treats class properties with underscore as private. Disabled because currently
@ -45,15 +50,22 @@ experimental.strict_type_args=true
; munge_underscores=false ; munge_underscores=false
munge_underscores=true munge_underscores=true
; FIXME Remove once we update past this commit:
; https://github.com/facebook/react-native/commit/df8d0d1db9203cc87ad3682e6138b2a9ed714365
module.name_mapper='^./link/link$' -> 'emptyObject'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
suppress_type=$FlowIssue suppress_type=$FlowIssue
suppress_type=$FlowFixMe suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
suppress_comment=\\(.\\|\n\\)*\\$FlowDisableNextLine suppress_comment=\\(.\\|\n\\)*\\$FlowDisableNextLine
unsafe.enable_getters_and_setters=true unsafe.enable_getters_and_setters=true
@ -71,4 +83,4 @@ module.file_ext=.jsx
module.file_ext=.json module.file_ext=.json
[version] [version]
^0.38.0 ^0.53.0

View File

@ -94,7 +94,7 @@ public class JitsiMeetView extends FrameLayout {
= ReactInstanceManager.builder() = ReactInstanceManager.builder()
.setApplication(application) .setApplication(application)
.setBundleAssetName("index.android.bundle") .setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android") .setJSMainModulePath("index.android")
.addPackage(new com.corbt.keepawake.KCKeepAwakePackage()) .addPackage(new com.corbt.keepawake.KCKeepAwakePackage())
.addPackage(new com.facebook.react.shell.MainReactPackage()) .addPackage(new com.facebook.react.shell.MainReactPackage())
.addPackage(new com.oblador.vectoricons.VectorIconsPackage()) .addPackage(new com.oblador.vectoricons.VectorIconsPackage())

View File

@ -26,11 +26,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
public class ReactPackageAdapter implements ReactPackage { public class ReactPackageAdapter implements ReactPackage {
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
@Override @Override
public List<NativeModule> createNativeModules( public List<NativeModule> createNativeModules(
ReactApplicationContext reactContext) { ReactApplicationContext reactContext) {

6
app.js
View File

@ -1,5 +1,11 @@
/* application specific logic */ /* application specific logic */
// FIXME: remove once atlaskit work with React 16
// It seems that @atlaskit/icon is importing PropTypes from React, but it
// happens through some glyph coffee script template. It could be that more
// things are broken there (not only the icon).
import './react/features/base/react/prop-types-polyfill.js';
import 'jquery'; import 'jquery';
import 'jquery-contextmenu'; import 'jquery-contextmenu';
import 'jquery-ui'; import 'jquery-ui';

File diff suppressed because it is too large Load Diff

34
flow-typed/npm/prop-types_v15.x.x.js vendored Normal file
View File

@ -0,0 +1,34 @@
// flow-typed signature: 3eaa1f24c7397b78a7481992d2cddcb2
// flow-typed version: a1a20d4928/prop-types_v15.x.x/flow_>=v0.41.x
type $npm$propTypes$ReactPropsCheckType = (
props: any,
propName: string,
componentName: string,
href?: string) => ?Error;
declare module 'prop-types' {
declare var array: React$PropType$Primitive<Array<any>>;
declare var bool: React$PropType$Primitive<boolean>;
declare var func: React$PropType$Primitive<Function>;
declare var number: React$PropType$Primitive<number>;
declare var object: React$PropType$Primitive<Object>;
declare var string: React$PropType$Primitive<string>;
declare var any: React$PropType$Primitive<any>;
declare var arrayOf: React$PropType$ArrayOf;
declare var element: React$PropType$Primitive<any>; /* TODO */
declare var instanceOf: React$PropType$InstanceOf;
declare var node: React$PropType$Primitive<any>; /* TODO */
declare var objectOf: React$PropType$ObjectOf;
declare var oneOf: React$PropType$OneOf;
declare var oneOfType: React$PropType$OneOfType;
declare var shape: React$PropType$Shape;
declare function checkPropTypes<V>(
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
values: V,
location: string,
componentName: string,
getStack: ?(() => ?string)
) : void;
}

View File

@ -1,5 +1,8 @@
// flow-typed signature: c0e8d9867aff7576bb7cf63fe60a6af3 // flow-typed signature: 4e93c65cedbfbf7f1ab3fe4e800943d3
// flow-typed version: 83053e4020/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x // flow-typed version: 9092387fd2/react-redux_v5.x.x/flow_>=v0.53.x <=v0.53.x
// flow-typed signature: 8db7b853f57c51094bf0ab8b2650fd9c
// flow-typed version: ab8db5f14d/react-redux_v5.x.x/flow_>=v0.30.x
import type { Dispatch, Store } from "redux"; import type { Dispatch, Store } from "redux";
@ -31,41 +34,30 @@ declare module "react-redux" {
declare type Context = { store: Store<*, *> }; declare type Context = { store: Store<*, *> };
declare type StatelessComponent<P> = ( declare class ConnectedComponent<OP, P> extends React$Component<OP> {
props: P, static WrappedComponent: Class<React$Component<P>>,
context: Context getWrappedInstance(): React$Component<P>,
) => ?React$Element<any>;
declare class ConnectedComponent<OP, P, Def, St> extends React$Component<
void,
OP,
void
> {
static WrappedComponent: Class<React$Component<Def, P, St>>,
getWrappedInstance(): React$Component<Def, P, St>,
static defaultProps: void,
props: OP, props: OP,
state: void state: void
} }
declare type ConnectedComponentClass<OP, P, Def, St> = Class< declare type ConnectedComponentClass<OP, P> = Class<
ConnectedComponent<OP, P, Def, St> ConnectedComponent<OP, P>
>; >;
declare type Connector<OP, P> = { declare type Connector<OP, P> = (
( component: React$ComponentType<P>
component: StatelessComponent<P> ) => ConnectedComponentClass<OP, P>;
): ConnectedComponentClass<OP, P, void, void>,
<Def, St>(
component: Class<React$Component<Def, P, St>>
): ConnectedComponentClass<OP, P, Def, St>
};
declare class Provider<S, A> extends React$Component< declare class Provider<S, A> extends React$Component<{
void, store: Store<S, A>,
{ store: Store<S, A>, children?: any }, children?: any
void }> {}
> {}
declare function createProvider(
storeKey?: string,
subKey?: string
): Provider<*, *>;
declare type ConnectOptions = { declare type ConnectOptions = {
pure?: boolean, pure?: boolean,

View File

@ -1,5 +1,5 @@
// flow-typed signature: 86993bd000012d3e1ef10d757d16952d // flow-typed signature: 33b83b6284653250e74578cf4dbe6124
// flow-typed version: a165222d28/redux_v3.x.x/flow_>=v0.33.x // flow-typed version: e282e4128f/redux_v3.x.x/flow_>=v0.33.x
declare module 'redux' { declare module 'redux' {
@ -11,15 +11,15 @@ declare module 'redux' {
*/ */
declare type DispatchAPI<A> = (action: A) => A; declare export type DispatchAPI<A> = (action: A) => A;
declare type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>; declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
declare type MiddlewareAPI<S, A, D = Dispatch<A>> = { declare export type MiddlewareAPI<S, A, D = Dispatch<A>> = {
dispatch: D; dispatch: D;
getState(): S; getState(): S;
}; };
declare type Store<S, A, D = Dispatch<A>> = { declare export type Store<S, A, D = Dispatch<A>> = {
// rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages)
dispatch: D; dispatch: D;
getState(): S; getState(): S;
@ -27,58 +27,58 @@ declare module 'redux' {
replaceReducer(nextReducer: Reducer<S, A>): void replaceReducer(nextReducer: Reducer<S, A>): void
}; };
declare type Reducer<S, A> = (state: S, action: A) => S; declare export type Reducer<S, A> = (state: S, action: A) => S;
declare type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S; declare export type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S;
declare type Middleware<S, A, D = Dispatch<A>> = declare export type Middleware<S, A, D = Dispatch<A>> =
(api: MiddlewareAPI<S, A, D>) => (api: MiddlewareAPI<S, A, D>) =>
(next: D) => D; (next: D) => D;
declare type StoreCreator<S, A, D = Dispatch<A>> = { declare export type StoreCreator<S, A, D = Dispatch<A>> = {
(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>; (reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>; (reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
}; };
declare type StoreEnhancer<S, A, D = Dispatch<A>> = (next: StoreCreator<S, A, D>) => StoreCreator<S, A, D>; declare export type StoreEnhancer<S, A, D = Dispatch<A>> = (next: StoreCreator<S, A, D>) => StoreCreator<S, A, D>;
declare function createStore<S, A, D>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>; declare export function createStore<S, A, D>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
declare function createStore<S, A, D>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>; declare export function createStore<S, A, D>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
declare function applyMiddleware<S, A, D>(...middlewares: Array<Middleware<S, A, D>>): StoreEnhancer<S, A, D>; declare export function applyMiddleware<S, A, D>(...middlewares: Array<Middleware<S, A, D>>): StoreEnhancer<S, A, D>;
declare type ActionCreator<A, B> = (...args: Array<B>) => A; declare export type ActionCreator<A, B> = (...args: Array<B>) => A;
declare type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> }; declare export type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> };
declare function bindActionCreators<A, C: ActionCreator<A, any>, D: DispatchAPI<A>>(actionCreator: C, dispatch: D): C; declare export function bindActionCreators<A, C: ActionCreator<A, any>, D: DispatchAPI<A>>(actionCreator: C, dispatch: D): C;
declare function bindActionCreators<A, K, C: ActionCreators<K, A>, D: DispatchAPI<A>>(actionCreators: C, dispatch: D): C; declare export function bindActionCreators<A, K, C: ActionCreators<K, A>, D: DispatchAPI<A>>(actionCreators: C, dispatch: D): C;
declare function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>; declare export function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;
declare function compose<A, B>(ab: (a: A) => B): (a: A) => B declare export function compose<A, B>(ab: (a: A) => B): (a: A) => B
declare function compose<A, B, C>( declare export function compose<A, B, C>(
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => C ): (a: A) => C
declare function compose<A, B, C, D>( declare export function compose<A, B, C, D>(
cd: (c: C) => D, cd: (c: C) => D,
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => D ): (a: A) => D
declare function compose<A, B, C, D, E>( declare export function compose<A, B, C, D, E>(
de: (d: D) => E, de: (d: D) => E,
cd: (c: C) => D, cd: (c: C) => D,
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => E ): (a: A) => E
declare function compose<A, B, C, D, E, F>( declare export function compose<A, B, C, D, E, F>(
ef: (e: E) => F, ef: (e: E) => F,
de: (d: D) => E, de: (d: D) => E,
cd: (c: C) => D, cd: (c: C) => D,
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => F ): (a: A) => F
declare function compose<A, B, C, D, E, F, G>( declare export function compose<A, B, C, D, E, F, G>(
fg: (f: F) => G, fg: (f: F) => G,
ef: (e: E) => F, ef: (e: E) => F,
de: (d: D) => E, de: (d: D) => E,
@ -86,7 +86,7 @@ declare module 'redux' {
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => G ): (a: A) => G
declare function compose<A, B, C, D, E, F, G, H>( declare export function compose<A, B, C, D, E, F, G, H>(
gh: (g: G) => H, gh: (g: G) => H,
fg: (f: F) => G, fg: (f: F) => G,
ef: (e: E) => F, ef: (e: E) => F,
@ -95,7 +95,7 @@ declare module 'redux' {
bc: (b: B) => C, bc: (b: B) => C,
ab: (a: A) => B ab: (a: A) => B
): (a: A) => H ): (a: A) => H
declare function compose<A, B, C, D, E, F, G, H, I>( declare export function compose<A, B, C, D, E, F, G, H, I>(
hi: (h: H) => I, hi: (h: H) => I,
gh: (g: G) => H, gh: (g: G) => H,
fg: (f: F) => G, fg: (f: F) => G,

View File

@ -1 +1,26 @@
export * from './react/index.native'; // The type field of react-native application loader's React Element is created
// as number and not Symbol, because it's not been defined by the polyfill yet.
// We import the application renderer, before Symbol is defined, in order to use
// number types as well. Otherwise this will result in the invariant exception,
// because fiber thingy will not recognise root react-native component as React
// Element, but as an Object.
//
// See node_modules/react-native/Libraries/polyfills/babelHelpers.js
// :babelHelpers.createRawReactElement - that's where first react-native element
// is created (super early - it's the app loader).
//
// See node_modules/react-native/Libraries/Renderer/ReactNativeFiber-dev.js
// and look for REACT_ELEMENT_TYPE definition - it's defined later when Symbol
// has been defined and type will not match.
//
// As an alternative solution we could stop using/polyfilling Symbols and
// replace with classpath string constants or some kind of a wrapper around
// that.
import 'react-native/Libraries/ReactNative/renderApplication';
// Android doesn't provide Symbol
import 'es6-symbol/implement';
import './react/index.native';

View File

@ -1 +1,2 @@
export * from './react/index.native'; import './react/index.native';

View File

@ -7,6 +7,8 @@ target 'JitsiMeet' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [ pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core', 'Core',
'BatchedBridge',
'DevSupport',
'RCTActionSheet', 'RCTActionSheet',
'RCTAnimation', 'RCTAnimation',
'RCTImage', 'RCTImage',
@ -15,7 +17,7 @@ target 'JitsiMeet' do
'RCTText', 'RCTText',
'RCTWebSocket', 'RCTWebSocket',
] ]
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'react-native-background-timer', pod 'react-native-background-timer',
:path => '../node_modules/react-native-background-timer' :path => '../node_modules/react-native-background-timer'

View File

@ -11,6 +11,6 @@ if [[ "$CONFIGURATION" = "Debug" ]]; then
exit 2 exit 2
fi fi
else else
open -g "$SRCROOT/../../node_modules/react-native/packager/launchPackager.command" || echo "Can't start packager automatically" open -g "$SRCROOT/../../node_modules/react-native/scripts/launchPackager.command" || echo "Can't start packager automatically"
fi fi
fi fi

View File

@ -232,7 +232,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/packager/react-native-xcode.sh"; shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/scripts/react-native-xcode.sh";
}; };
26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */ = { 26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;

View File

@ -53,10 +53,10 @@
"nuclear-js": "1.4.0", "nuclear-js": "1.4.0",
"postis": "2.2.0", "postis": "2.2.0",
"prop-types": "15.6.0", "prop-types": "15.6.0",
"react": "15.6.1", "react": "16.0.0",
"react-dom": "15.6.1", "react-dom": "16.0.0",
"react-i18next": "4.8.0", "react-i18next": "4.8.0",
"react-native": "0.42.3", "react-native": "0.49.5",
"react-native-background-timer": "1.3.0", "react-native-background-timer": "1.3.0",
"react-native-callstats": "3.24.6", "react-native-callstats": "3.24.6",
"react-native-fetch-blob": "0.10.8", "react-native-fetch-blob": "0.10.8",
@ -94,7 +94,7 @@
"eslint-plugin-react-native": "3.1.0", "eslint-plugin-react-native": "3.1.0",
"expose-loader": "0.7.3", "expose-loader": "0.7.3",
"file-loader": "1.1.4", "file-loader": "1.1.4",
"flow-bin": "0.38.0", "flow-bin": "0.53.0",
"imports-loader": "0.7.1", "imports-loader": "0.7.1",
"node-sass": "3.13.1", "node-sass": "3.13.1",
"precommit-hook": "3.0.0", "precommit-hook": "3.0.0",

View File

@ -59,7 +59,7 @@ const toolbarButtons = {
* @class AlwaysOnTop * @class AlwaysOnTop
* @extends Component * @extends Component
*/ */
export default class AlwaysOnTop extends Component { export default class AlwaysOnTop extends Component<*> {
/** /**
* Initializes new AlwaysOnTop instance. * Initializes new AlwaysOnTop instance.
* *

View File

@ -39,7 +39,8 @@ const _INTERCEPT_COMPONENT_RULES = [
* @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then * @returns {UnsupportedMobileBrowser|void} If the rule is satisfied then
* we should intercept existing component by UnsupportedMobileBrowser. * we should intercept existing component by UnsupportedMobileBrowser.
*/ */
() => { // eslint-disable-next-line no-unused-vars
state => {
const OS = Platform.OS; const OS = Platform.OS;
if (OS === 'android' || OS === 'ios') { if (OS === 'android' || OS === 'ios') {
@ -103,7 +104,7 @@ export function _getRouteToRender(stateOrGetState: Object | Function) {
*/ */
function _interceptComponent( function _interceptComponent(
stateOrGetState: Object | Function, stateOrGetState: Object | Function,
component: ReactElement<*>) { component: React$Element<*>) {
let result; let result;
const state = toState(stateOrGetState); const state = toState(stateOrGetState);

View File

@ -17,7 +17,7 @@ import styles from './styles';
* *
* See {@link LoginDialog} description for more details. * See {@link LoginDialog} description for more details.
*/ */
class WaitForOwnerDialog extends Component { class WaitForOwnerDialog extends Component<*> {
/** /**
* WaitForOwnerDialog component's property types. * WaitForOwnerDialog component's property types.
* *

View File

@ -9,7 +9,7 @@ import { DIALOG_PROP_TYPES } from '../constants';
/** /**
* An abstract implementation of a dialog on Web/React and mobile/react-native. * An abstract implementation of a dialog on Web/React and mobile/react-native.
*/ */
export default class AbstractDialog extends Component { export default class AbstractDialog extends Component<*, *> {
/** /**
* {@code AbstractDialog} React {@code Component}'s prop types. * {@code AbstractDialog} React {@code Component}'s prop types.
* *

View File

@ -21,7 +21,7 @@ declare var interfaceConfig: Object;
* *
* @extends Component * @extends Component
*/ */
class CallOverlay extends Component { class CallOverlay extends Component<*, *> {
/** /**
* The (reference to the) {@link Audio} which plays/renders the audio * The (reference to the) {@link Audio} which plays/renders the audio
* depicting the ringing phase of the call establishment represented by this * depicting the ringing phase of the call establishment represented by this

View File

@ -11,7 +11,7 @@ import styles from './styles';
* {@code HTMLVideoElement} and wraps around react-native-webrtc's * {@code HTMLVideoElement} and wraps around react-native-webrtc's
* {@link RTCView}. * {@link RTCView}.
*/ */
export default class Video extends Component { export default class Video extends Component<*> {
/** /**
* {@code Video} component's property types. * {@code Video} component's property types.
* *

View File

@ -9,7 +9,7 @@ import React, { Component } from 'react';
* *
* @extends Component * @extends Component
*/ */
export default class AbstractContainer extends Component { export default class AbstractContainer extends Component<*> {
/** /**
* {@code AbstractContainer} component's property types. * {@code AbstractContainer} component's property types.
* *

View File

@ -10,7 +10,7 @@ import { ColorPalette } from '../../../styles';
* a suitable visualization of long-running processes with indeterminate amounts * a suitable visualization of long-running processes with indeterminate amounts
* of work to be done. * of work to be done.
*/ */
export default class LoadingIndicator extends Component { export default class LoadingIndicator extends Component<*> {
/** /**
* Implements React's {@link Component#render()}. * Implements React's {@link Component#render()}.
* *

View File

@ -11,7 +11,7 @@ declare var interfaceConfig: Object;
/** /**
* Inline dialog that represents a failure and allows a retry. * Inline dialog that represents a failure and allows a retry.
*/ */
class InlineDialogFailure extends Component { class InlineDialogFailure extends Component<*> {
/** /**
* {@code InlineDialogFailure}'s property types. * {@code InlineDialogFailure}'s property types.
* *

View File

@ -21,7 +21,7 @@ const _RIGHT_WATERMARK_STYLE = {
* A Web Component which renders watermarks such as Jits, brand, powered by, * A Web Component which renders watermarks such as Jits, brand, powered by,
* etc. * etc.
*/ */
class Watermarks extends Component { class Watermarks extends Component<*, *> {
static propTypes = { static propTypes = {
_isGuest: PropTypes.bool, _isGuest: PropTypes.bool,
t: PropTypes.func t: PropTypes.func

View File

@ -0,0 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
/* eslint-disable react/no-deprecated */
if (typeof React.PropTypes === 'undefined') {
React.PropTypes = PropTypes;
}
/* eslint-enable react/no-deprecated */

View File

@ -21,7 +21,7 @@ declare var interfaceConfig: Object;
/** /**
* The conference page of the Web application. * The conference page of the Web application.
*/ */
class Conference extends Component { class Conference extends Component<*> {
_onShowToolbar: Function; _onShowToolbar: Function;
_originalOnShowToolbar: Function; _originalOnShowToolbar: Function;

View File

@ -16,7 +16,7 @@ declare var interfaceConfig: Object;
* *
* @extends Component * @extends Component
*/ */
class ContactListPanel extends Component { class ContactListPanel extends Component<*> {
/** /**
* Default values for {@code ContactListPanel} component's properties. * Default values for {@code ContactListPanel} component's properties.
* *

View File

@ -47,7 +47,7 @@ const VALID_TYPES = Object.keys(TAB_LABELS);
* *
* @extends Component * @extends Component
*/ */
class DesktopPicker extends Component { class DesktopPicker extends Component<*, *> {
/** /**
* DesktopPicker component's property types. * DesktopPicker component's property types.
* *

View File

@ -12,7 +12,7 @@ import { openFeedbackDialog } from '../actions';
/** /**
* Implements a Web/React Component which renders a feedback button. * Implements a Web/React Component which renders a feedback button.
*/ */
class FeedbackButton extends Component { class FeedbackButton extends Component<*> {
_onClick: Function; _onClick: Function;
static propTypes = { static propTypes = {

View File

@ -16,7 +16,7 @@ import { styles } from './_';
* *
* @extends Component * @extends Component
*/ */
class Filmstrip extends Component { class Filmstrip extends Component<*> {
/** /**
* Filmstrip component's property types. * Filmstrip component's property types.
* *

View File

@ -17,7 +17,7 @@ import { shouldRemoteVideosBeVisible } from '../functions';
* *
* @extends Component * @extends Component
*/ */
class Filmstrip extends Component { class Filmstrip extends Component<*> {
_isHovered: boolean; _isHovered: boolean;
_notifyOfHoveredStateUpdate: Function; _notifyOfHoveredStateUpdate: Function;

View File

@ -19,7 +19,7 @@ declare var interfaceConfig: Object;
/** /**
* The dialog that allows to invite people to the call. * The dialog that allows to invite people to the call.
*/ */
class AddPeopleDialog extends Component { class AddPeopleDialog extends Component<*, *> {
/** /**
* {@code AddPeopleDialog}'s property types. * {@code AddPeopleDialog}'s property types.
* *
@ -311,7 +311,7 @@ class AddPeopleDialog extends Component {
); );
} }
_setMultiSelectElement: (Object) => void; _setMultiSelectElement: (React$ElementRef<*> | null) => mixed;
/** /**
* Sets the instance variable for the multi select component * Sets the instance variable for the multi select component

View File

@ -14,7 +14,7 @@ import styles from './styles';
* *
* @extends Component * @extends Component
*/ */
class LargeVideo extends Component { class LargeVideo extends Component<*> {
/** /**
* LargeVideo component's property types. * LargeVideo component's property types.
* *

View File

@ -14,7 +14,7 @@ declare var interfaceConfig: Object;
* *
* @extends Component * @extends Component
*/ */
export default class LargeVideo extends Component { export default class LargeVideo extends Component<*> {
/** /**
* Implements React's {@link Component#render()}. * Implements React's {@link Component#render()}.
* *

View File

@ -10,7 +10,7 @@ import { LoadingIndicator } from '../../../base/react';
* The React {@code Component} which renders a progress indicator when there * The React {@code Component} which renders a progress indicator when there
* are ongoing network requests. * are ongoing network requests.
*/ */
class NetworkActivityIndicator extends Component { class NetworkActivityIndicator extends Component<*> {
/** /**
* {@code NetworkActivityIndicator} React {@code Component}'s prop types. * {@code NetworkActivityIndicator} React {@code Component}'s prop types.
* *

View File

@ -16,7 +16,7 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Implements abstract React Component for the page reload overlays. * Implements abstract React Component for the page reload overlays.
*/ */
export default class AbstractPageReloadOverlay extends Component { export default class AbstractPageReloadOverlay extends Component<*, *> {
/** /**
* AbstractPageReloadOverlay component's property types. * AbstractPageReloadOverlay component's property types.
* *

View File

@ -12,7 +12,7 @@ import { _reloadNow } from '../actions';
* Implements a React Component for button for the overlays that will reload * Implements a React Component for button for the overlays that will reload
* the page. * the page.
*/ */
class ReloadButton extends Component { class ReloadButton extends Component<*> {
/** /**
* PageReloadOverlay component's property types. * PageReloadOverlay component's property types.
* *

View File

@ -29,7 +29,7 @@ ReducerRegistry.register('features/overlay', (state = {}, action) => {
return _conferenceFailed(state, action); return _conferenceFailed(state, action);
case CONNECTION_ESTABLISHED: case CONNECTION_ESTABLISHED:
return _connectionEstablished(state, action); return _connectionEstablished(state);
case CONNECTION_FAILED: case CONNECTION_FAILED:
return _connectionFailed(state, action); return _connectionFailed(state, action);
@ -41,7 +41,7 @@ ReducerRegistry.register('features/overlay', (state = {}, action) => {
return _mediaPermissionPromptVisibilityChanged(state, action); return _mediaPermissionPromptVisibilityChanged(state, action);
case SUSPEND_DETECTED: case SUSPEND_DETECTED:
return _suspendDetected(state, action); return _suspendDetected(state);
} }
return state; return state;

View File

@ -36,7 +36,7 @@ const _TEXT_INPUT_PROPS = {
* Implements a React {@code Component} which prompts the user when a password * Implements a React {@code Component} which prompts the user when a password
* is required to join a conference. * is required to join a conference.
*/ */
class PasswordRequiredPrompt extends Component { class PasswordRequiredPrompt extends Component<Props> {
/** /**
* {@code PasswordRequiredPrompt}'s React {@code Component} prop types. * {@code PasswordRequiredPrompt}'s React {@code Component} prop types.
* *

View File

@ -12,7 +12,7 @@ import { translate } from '../../base/i18n';
* Implements a React Component which prompts the user when a password is * Implements a React Component which prompts the user when a password is
* required to join a conference. * required to join a conference.
*/ */
class PasswordRequiredPrompt extends Component { class PasswordRequiredPrompt extends Component<*, *> {
/** /**
* PasswordRequiredPrompt component's property types. * PasswordRequiredPrompt component's property types.
* *

View File

@ -22,7 +22,7 @@ const _TEXT_INPUT_PROPS = {
* Implements a React Component which prompts the user for a password to lock a * Implements a React Component which prompts the user for a password to lock a
* conference/room. * conference/room.
*/ */
class RoomLockPrompt extends Component { class RoomLockPrompt extends Component<*> {
/** /**
* RoomLockPrompt component's property types. * RoomLockPrompt component's property types.
* *

View File

@ -17,7 +17,7 @@ declare var interfaceConfig: Object;
* *
* @extends Component * @extends Component
*/ */
class SpeakerStats extends Component { class SpeakerStats extends Component<*, *> {
/** /**
* SpeakerStats component's property types. * SpeakerStats component's property types.
* *

View File

@ -9,7 +9,7 @@ declare var config: Object;
* *
* @class Notice * @class Notice
*/ */
export default class Notice extends Component { export default class Notice extends Component<*, *> {
state: Object; state: Object;
/** /**

View File

@ -15,7 +15,7 @@ declare var interfaceConfig: Object;
* @class PrimaryToolbar * @class PrimaryToolbar
* @extends Component * @extends Component
*/ */
class PrimaryToolbar extends Component { class PrimaryToolbar extends Component<*, *> {
static propTypes = { static propTypes = {
/** /**
@ -36,7 +36,7 @@ class PrimaryToolbar extends Component {
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> | null { render(): React$Element<*> | null {
const { _primaryToolbarButtons } = this.props; const { _primaryToolbarButtons } = this.props;
// The number of buttons to show in the toolbar isn't fixed, it depends // The number of buttons to show in the toolbar isn't fixed, it depends

View File

@ -30,7 +30,7 @@ const DEFAULT_BUTTON_CONFIGURATION = {
* *
* @extends Component * @extends Component
*/ */
class ProfileButton extends Component { class ProfileButton extends Component<*> {
_onClick: Function; _onClick: Function;
/** /**

View File

@ -22,7 +22,7 @@ declare var config: Object;
* @class SecondaryToolbar * @class SecondaryToolbar
* @extends Component * @extends Component
*/ */
class SecondaryToolbar extends Component { class SecondaryToolbar extends Component<*, *> {
state: Object; state: Object;
/** /**
@ -86,7 +86,7 @@ class SecondaryToolbar extends Component {
* *
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> | null { render(): React$Element<*> | null {
const { _callStatsID, _secondaryToolbarButtons } = this.props; const { _callStatsID, _secondaryToolbarButtons } = this.props;
// The number of buttons to show in the toolbar isn't fixed, it depends // The number of buttons to show in the toolbar isn't fixed, it depends

View File

@ -10,7 +10,7 @@ import React, { Component } from 'react';
* @class StatelessToolbar * @class StatelessToolbar
* @extends Component * @extends Component
*/ */
export default class StatelessToolbar extends Component { export default class StatelessToolbar extends Component<*> {
/** /**
* Base toolbar component's property types. * Base toolbar component's property types.
* *
@ -44,7 +44,7 @@ export default class StatelessToolbar extends Component {
* @inheritdoc * @inheritdoc
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> { render(): React$Element<*> {
const { const {
className, className,
onMouseOut, onMouseOut,

View File

@ -91,7 +91,7 @@ export default class StatelessToolbarButton extends AbstractToolbarButton {
* @inheritdoc * @inheritdoc
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> { render(): React$Element<*> {
const { button } = this.props; const { button } = this.props;
const attributes = getButtonAttributesByProps(button); const attributes = getButtonAttributesByProps(button);

View File

@ -17,7 +17,7 @@ import ToolbarButton from './ToolbarButton';
* @class Toolbar * @class Toolbar
* @extends Component * @extends Component
*/ */
class Toolbar extends Component { class Toolbar extends Component<*> {
_onMouseOut: Function; _onMouseOut: Function;
_onMouseOver: Function; _onMouseOver: Function;
_renderToolbarButton: Function; _renderToolbarButton: Function;
@ -75,7 +75,7 @@ class Toolbar extends Component {
* @inheritdoc * @inheritdoc
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> { render(): React$Element<*> {
const props = { const props = {
className: this.props.className, className: this.props.className,
onMouseOut: this._onMouseOut, onMouseOut: this._onMouseOut,
@ -123,7 +123,7 @@ class Toolbar extends Component {
* @private * @private
* @returns {ReactElement} A toolbar button. * @returns {ReactElement} A toolbar button.
*/ */
_renderToolbarButton(keyValuePair: Array<*>): ReactElement<*> { _renderToolbarButton(keyValuePair: Array<*>): React$Element<*> {
const [ key, button ] = keyValuePair; const [ key, button ] = keyValuePair;
if (button.component) { if (button.component) {

View File

@ -18,7 +18,7 @@ declare var APP: Object;
* @class ToolbarButton * @class ToolbarButton
* @extends AbstractToolbarButton * @extends AbstractToolbarButton
*/ */
class ToolbarButton extends Component { class ToolbarButton extends Component<*> {
button: Object; button: Object;
_onClick: Function; _onClick: Function;
@ -103,7 +103,7 @@ class ToolbarButton extends Component {
* @inheritdoc * @inheritdoc
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> { render(): React$Element<*> {
const { button, t, tooltipPosition } = this.props; const { button, t, tooltipPosition } = this.props;
const props = { const props = {
...this.props, ...this.props,

View File

@ -22,7 +22,7 @@ declare var interfaceConfig: Object;
/** /**
* Implements the conference toolbox on React/Web. * Implements the conference toolbox on React/Web.
*/ */
class Toolbox extends Component { class Toolbox extends Component<*> {
/** /**
* App component's property types. * App component's property types.
* *
@ -89,7 +89,7 @@ class Toolbox extends Component {
* @inheritdoc * @inheritdoc
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render(): ReactElement<*> { render(): React$Element<*> {
return ( return (
<div className = 'toolbox'> <div className = 'toolbox'>
{ {
@ -109,7 +109,7 @@ class Toolbox extends Component {
* @returns {ReactElement} * @returns {ReactElement}
* @private * @private
*/ */
_renderSubject(): ReactElement<*> | null { _renderSubject(): React$Element<*> | null {
const { _subjectSlideIn, _subject } = this.props; const { _subjectSlideIn, _subject } = this.props;
const classNames = [ 'subject' ]; const classNames = [ 'subject' ];
@ -146,7 +146,7 @@ class Toolbox extends Component {
* @returns {ReactElement} * @returns {ReactElement}
* @private * @private
*/ */
_renderToolbars(): ReactElement<*> | null { _renderToolbars(): React$Element<*> | null {
// In case we're not in alwaysVisible mode the toolbox should not be // In case we're not in alwaysVisible mode the toolbox should not be
// shown until timeoutID is initialized. // shown until timeoutID is initialized.
if (!this.props._alwaysVisible && this.props._timeoutID === null) { if (!this.props._alwaysVisible && this.props._timeoutID === null) {

View File

@ -9,7 +9,7 @@ import React, { Component } from 'react';
* @private * @private
* @returns {ReactElement} * @returns {ReactElement}
*/ */
export default class HideNotificationBarStyles extends Component { export default class HideNotificationBarStyles extends Component<*> {
/** /**
* Implements React's {@link Component#render()}. * Implements React's {@link Component#render()}.

View File

@ -11,7 +11,7 @@ declare var interfaceConfig: Object;
* *
* @class NoMobileApp * @class NoMobileApp
*/ */
export default class NoMobileApp extends Component { export default class NoMobileApp extends Component<*> {
/** /**
* Renders the component. * Renders the component.
* *

View File

@ -9,7 +9,7 @@ import { CHROME, CHROMIUM, FIREFOX } from './browserLinks';
* *
* @class PluginRequiredBrowser * @class PluginRequiredBrowser
*/ */
export default class PluginRequiredBrowser extends Component { export default class PluginRequiredBrowser extends Component<*> {
/** /**
* Renders the component. * Renders the component.

View File

@ -22,7 +22,7 @@ const _SNS = 'unsupported-desktop-browser';
* *
* @class UnsupportedDesktopBrowser * @class UnsupportedDesktopBrowser
*/ */
class UnsupportedDesktopBrowser extends Component { class UnsupportedDesktopBrowser extends Component<*> {
/** /**
* UnsupportedDesktopBrowser component's property types. * UnsupportedDesktopBrowser component's property types.
* *

View File

@ -42,7 +42,7 @@ const _URLS = {
* *
* @class UnsupportedMobileBrowser * @class UnsupportedMobileBrowser
*/ */
class UnsupportedMobileBrowser extends Component { class UnsupportedMobileBrowser extends Component<*, *> {
state: Object; state: Object;
/** /**

View File

@ -21,7 +21,7 @@ type Props = {
* *
* @abstract * @abstract
*/ */
export class AbstractWelcomePage extends Component { export class AbstractWelcomePage extends Component<*, *> {
/** /**
* {@code AbstractWelcomePage}'s React {@code Component} prop types. * {@code AbstractWelcomePage}'s React {@code Component} prop types.
* *

View File

@ -16,7 +16,7 @@ import styles from './styles';
* {@code Route} to render. Renders a progress indicator when there are ongoing * {@code Route} to render. Renders a progress indicator when there are ongoing
* network requests. * network requests.
*/ */
class BlankPage extends Component { class BlankPage extends Component<*> {
/** /**
* {@code BlankPage} React {@code Component}'s prop types. * {@code BlankPage} React {@code Component}'s prop types.
* *

View File

@ -14,7 +14,7 @@ import styles from './styles';
* Implements a React {@code Component} which underlays the local video track, * Implements a React {@code Component} which underlays the local video track,
* if any, underneath its children. * if any, underneath its children.
*/ */
class LocalVideoTrackUnderlay extends Component { class LocalVideoTrackUnderlay extends Component<*, *> {
state: { state: {
/** /**

View File

@ -1,4 +1,7 @@
import 'es6-symbol/implement'; // FIXME: remove once react-native-webrtc and react-native-prompt imports
// PropTypes from the 'prop-types' lib instead of 'react'.
import './features/base/react/prop-types-polyfill.js';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { AppRegistry, Linking } from 'react-native'; import { AppRegistry, Linking } from 'react-native';