diff --git a/.DS_Store b/.DS_Store
index 7148006..387dd24 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/package.json b/package.json
index 1a4a340..6817c8e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "create-xp-app",
- "version": "0.3.4",
+ "version": "0.4.0",
"description": "react xp project generator",
"main": "index.js",
"bin": {
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/src/.DS_Store differ
diff --git a/src/README.md b/src/README.md
index b3748b4..aea4d39 100644
--- a/src/README.md
+++ b/src/README.md
@@ -1,4 +1,4 @@
-# RXP
+# RXPHelloWorld
This app works on React Native (iOS, Android) and web. Most of the app's code is contained in `App.tsx`.
@@ -7,10 +7,6 @@ The commands in the instructions below assume you are in the root of this repo.
### Initial Setup
- Run `npm install`. This fetches the dependencies.
-- Open `node_modules/reactxp/dist/native-common/App.js` and replace
-`RN.AppRegistry.registerComponent('RXApp',`
-with
-`RN.AppRegistry.registerComponent('reactXPTest',`
### Building for Web
diff --git a/src/__tests__/index.android.js b/src/__tests__/index.android.js
deleted file mode 100644
index b49b908..0000000
--- a/src/__tests__/index.android.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'react-native';
-import React from 'react';
-import Index from '../index.android.js';
-
-// Note: test renderer must be required after react-native.
-import renderer from 'react-test-renderer';
-
-it('renders correctly', () => {
- const tree = renderer.create(
-
- );
-});
diff --git a/src/__tests__/index.ios.js b/src/__tests__/index.ios.js
deleted file mode 100644
index ba7c5b5..0000000
--- a/src/__tests__/index.ios.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'react-native';
-import React from 'react';
-import Index from '../index.ios.js';
-
-// Note: test renderer must be required after react-native.
-import renderer from 'react-test-renderer';
-
-it('renders correctly', () => {
- const tree = renderer.create(
-
- );
-});
diff --git a/src/android/app/BUCK b/src/android/app/BUCK
index d97d877..0872039 100644
--- a/src/android/app/BUCK
+++ b/src/android/app/BUCK
@@ -1,5 +1,3 @@
-import re
-
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
@@ -11,8 +9,9 @@ import re
#
lib_deps = []
+
for jarfile in glob(['libs/*.jar']):
- name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
+ name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
lib_deps.append(':' + name)
prebuilt_jar(
name = name,
@@ -20,7 +19,7 @@ for jarfile in glob(['libs/*.jar']):
)
for aarfile in glob(['libs/*.aar']):
- name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
+ name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
lib_deps.append(':' + name)
android_prebuilt_aar(
name = name,
@@ -28,39 +27,39 @@ for aarfile in glob(['libs/*.aar']):
)
android_library(
- name = 'all-libs',
- exported_deps = lib_deps
+ name = "all-libs",
+ exported_deps = lib_deps,
)
android_library(
- name = 'app-code',
- srcs = glob([
- 'src/main/java/**/*.java',
- ]),
- deps = [
- ':all-libs',
- ':build_config',
- ':res',
- ],
+ name = "app-code",
+ srcs = glob([
+ "src/main/java/**/*.java",
+ ]),
+ deps = [
+ ":all-libs",
+ ":build_config",
+ ":res",
+ ],
)
android_build_config(
- name = 'build_config',
- package = 'com.rxapp',
+ name = "build_config",
+ package = "com.rxphelloworld",
)
android_resource(
- name = 'res',
- res = 'src/main/res',
- package = 'com.rxapp',
+ name = "res",
+ package = "com.rxphelloworld",
+ res = "src/main/res",
)
android_binary(
- name = 'app',
- package_type = 'debug',
- manifest = 'src/main/AndroidManifest.xml',
- keystore = '//android/keystores:debug',
- deps = [
- ':app-code',
- ],
+ name = "app",
+ keystore = "//android/keystores:debug",
+ manifest = "src/main/AndroidManifest.xml",
+ package_type = "debug",
+ deps = [
+ ":app-code",
+ ],
)
diff --git a/src/android/app/build.gradle b/src/android/app/build.gradle
index 229b5e3..151f7bf 100644
--- a/src/android/app/build.gradle
+++ b/src/android/app/build.gradle
@@ -84,10 +84,10 @@ def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 23
- buildToolsVersion "23.0.1"
+ buildToolsVersion '25.0.0'
defaultConfig {
- applicationId "com.rxapp"
+ applicationId "com.rxphelloworld"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
@@ -126,6 +126,8 @@ android {
}
dependencies {
+ compile project(':react-native-video')
+ compile project(':react-native-svg')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml
index 3def3cf..ccedd85 100644
--- a/src/android/app/src/main/AndroidManifest.xml
+++ b/src/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
diff --git a/src/android/app/src/main/java/com/rxapp/MainActivity.java b/src/android/app/src/main/java/com/rxphelloworld/MainActivity.java
similarity index 92%
rename from src/android/app/src/main/java/com/rxapp/MainActivity.java
rename to src/android/app/src/main/java/com/rxphelloworld/MainActivity.java
index d27010f..beb21b2 100644
--- a/src/android/app/src/main/java/com/rxapp/MainActivity.java
+++ b/src/android/app/src/main/java/com/rxphelloworld/MainActivity.java
@@ -1,4 +1,4 @@
-package com.rxapp;
+package com.rxphelloworld;
import com.facebook.react.ReactActivity;
diff --git a/src/android/app/src/main/java/com/rxapp/MainApplication.java b/src/android/app/src/main/java/com/rxphelloworld/MainApplication.java
similarity index 80%
rename from src/android/app/src/main/java/com/rxapp/MainApplication.java
rename to src/android/app/src/main/java/com/rxphelloworld/MainApplication.java
index f9924a8..56a2713 100644
--- a/src/android/app/src/main/java/com/rxapp/MainApplication.java
+++ b/src/android/app/src/main/java/com/rxphelloworld/MainApplication.java
@@ -1,8 +1,10 @@
-package com.rxapp;
+package com.rxphelloworld;
import android.app.Application;
import com.facebook.react.ReactApplication;
+import com.brentvatne.react.ReactVideoPackage;
+import com.horcrux.svg.RNSvgPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
@@ -22,7 +24,9 @@ public boolean getUseDeveloperSupport() {
@Override
protected List getPackages() {
return Arrays.asList(
- new MainReactPackage()
+ new MainReactPackage(),
+ new ReactVideoPackage(),
+ new RNSvgPackage()
);
}
};
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml
index 4931b25..714eb11 100644
--- a/src/android/app/src/main/res/values/strings.xml
+++ b/src/android/app/src/main/res/values/strings.xml
@@ -1,3 +1,3 @@
- rxapp
+ RXPHelloWorld
diff --git a/src/android/gradle/wrapper/gradle-wrapper.properties b/src/android/gradle/wrapper/gradle-wrapper.properties
index dbdc05d..275d566 100644
--- a/src/android/gradle/wrapper/gradle-wrapper.properties
+++ b/src/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Sun Apr 09 20:23:19 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/src/android/gradlew b/src/android/gradlew
old mode 100755
new mode 100644
diff --git a/src/android/gradlew.bat b/src/android/gradlew.bat
index aec9973..8a0b282 100644
--- a/src/android/gradlew.bat
+++ b/src/android/gradlew.bat
@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/src/android/keystores/BUCK b/src/android/keystores/BUCK
index 15da20e..88e4c31 100644
--- a/src/android/keystores/BUCK
+++ b/src/android/keystores/BUCK
@@ -1,8 +1,8 @@
keystore(
- name = 'debug',
- store = 'debug.keystore',
- properties = 'debug.keystore.properties',
- visibility = [
- 'PUBLIC',
- ],
+ name = "debug",
+ properties = "debug.keystore.properties",
+ store = "debug.keystore",
+ visibility = [
+ "PUBLIC",
+ ],
)
diff --git a/src/android/settings.gradle b/src/android/settings.gradle
index 34ebd29..70def8e 100644
--- a/src/android/settings.gradle
+++ b/src/android/settings.gradle
@@ -1,3 +1,7 @@
-rootProject.name = 'rxapp'
+rootProject.name = 'RXPHelloWorld'
+include ':react-native-video'
+project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
+include ':react-native-svg'
+project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':app'
diff --git a/src/app.json b/src/app.json
deleted file mode 100644
index 5bba725..0000000
--- a/src/app.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "rxapp",
- "displayName": "rxapp"
-}
\ No newline at end of file
diff --git a/src/dist/App.js b/src/dist/App.js
index 7511670..9d31db7 100644
--- a/src/dist/App.js
+++ b/src/dist/App.js
@@ -8,60 +8,56 @@ var __extends = (this && this.__extends) || function (d, b) {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var RX = require("reactxp");
+var MainPanel = require("./MainPanel");
+var SecondPanel = require("./SecondPanel");
+var NavigationRouteId;
+(function (NavigationRouteId) {
+ NavigationRouteId[NavigationRouteId["MainPanel"] = 0] = "MainPanel";
+ NavigationRouteId[NavigationRouteId["SecondPanel"] = 1] = "SecondPanel";
+})(NavigationRouteId || (NavigationRouteId = {}));
var styles = {
- container: RX.Styles.createViewStyle({
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
+ navCardStyle: RX.Styles.createViewStyle({
backgroundColor: '#f5fcff'
- }),
- helloWorld: RX.Styles.createTextStyle({
- fontSize: 48,
- fontWeight: 'bold',
- marginBottom: 28
- }),
- welcome: RX.Styles.createTextStyle({
- fontSize: 32,
- marginBottom: 12
- }),
- instructions: RX.Styles.createTextStyle({
- fontSize: 16,
- color: '#aaa',
- marginBottom: 40
- }),
- docLink: RX.Styles.createLinkStyle({
- fontSize: 16,
- color: 'blue'
})
};
var App = (function (_super) {
__extends(App, _super);
function App() {
- var _this = _super.call(this) || this;
- _this._translationValue = new RX.Animated.Value(-100);
- _this._animatedStyle = RX.Styles.createAnimatedTextStyle({
- transform: [
- {
- translateY: _this._translationValue
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._onNavigatorRef = function (navigator) {
+ _this._navigator = navigator;
+ };
+ _this._renderScene = function (navigatorRoute) {
+ switch (navigatorRoute.routeId) {
+ case NavigationRouteId.MainPanel:
+ return RX.createElement(MainPanel, { onPressNavigate: _this._onPressNavigate });
+ case NavigationRouteId.SecondPanel:
+ return RX.createElement(SecondPanel, { onNavigateBack: _this._onPressBack });
+ }
+ return null;
+ };
+ _this._onPressNavigate = function () {
+ _this._navigator.push({
+ routeId: NavigationRouteId.SecondPanel,
+ sceneConfigType: RX.Types.NavigatorSceneConfigType.FloatFromRight,
+ customSceneConfig: {
+ hideShadow: true
}
- ]
- });
+ });
+ };
+ _this._onPressBack = function () {
+ _this._navigator.pop();
+ };
return _this;
}
App.prototype.componentDidMount = function () {
- var animation = RX.Animated.timing(this._translationValue, {
- toValue: 0,
- easing: RX.Animated.Easing.OutBack(),
- duration: 500
- });
- animation.start();
+ this._navigator.immediatelyResetRouteStack([{
+ routeId: NavigationRouteId.MainPanel,
+ sceneConfigType: RX.Types.NavigatorSceneConfigType.Fade
+ }]);
};
App.prototype.render = function () {
- return (RX.createElement(RX.View, { style: styles.container },
- RX.createElement(RX.Animated.Text, { style: [styles.helloWorld, this._animatedStyle] }, "Hello World"),
- RX.createElement(RX.Text, { style: styles.welcome }, "Welcome to ReactXP"),
- RX.createElement(RX.Text, { style: styles.instructions }, "Edit App.tsx to get started"),
- RX.createElement(RX.Link, { style: styles.docLink, url: 'https://microsoft.github.io/reactxp/docs' }, "View ReactXP documentation")));
+ return (RX.createElement(RX.Navigator, { ref: this._onNavigatorRef, renderScene: this._renderScene, cardStyle: styles.navCardStyle }));
};
return App;
}(RX.Component));
diff --git a/src/dist/App.js.map b/src/dist/App.js.map
index 08b05f7..85e0102 100644
--- a/src/dist/App.js.map
+++ b/src/dist/App.js.map
@@ -1 +1 @@
-{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA;;EAEE;;;;;;;AAEF,4BAA+B;AAE/B,IAAM,MAAM,GAAG;IACX,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACjC,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,SAAS;KAC7B,CAAC;IACF,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC/B,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC/B,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;KAChB,CAAC;CACL,CAAC;AAEF;IAAkB,uBAAwB;IAItC;QAAA,YACI,iBAAO,SAUV;QARG,KAAI,CAAC,iBAAiB,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,KAAI,CAAC,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;YACpD,SAAS,EAAE;gBACP;oBACI,UAAU,EAAE,KAAI,CAAC,iBAAiB;iBACrC;aACJ;SACJ,CAAC,CAAC;;IACP,CAAC;IAED,+BAAiB,GAAjB;QACI,IAAI,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACrD,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE;YACpC,QAAQ,EAAE,GAAG;SACd,CACJ,CAAC;QAEF,SAAS,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED,oBAAM,GAAN;QACI,MAAM,CAAC,CACH,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,SAAS;YAC7B,iBAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAG,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,kBAE/C;YACnB,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,OAAO,yBAErB;YACV,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,YAAY,kCAE1B;YACV,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,OAAO,EAAG,GAAG,EAAG,0CAA0C,iCAExE,CACJ,CACb,CAAC;IACN,CAAC;IACL,UAAC;AAAD,CAAC,AA9CD,CAAkB,EAAE,CAAC,SAAS,GA8C7B;AAED,iBAAS,GAAG,CAAC"}
\ No newline at end of file
+{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA;;EAEE;;;;;;;AAEF,4BAA+B;AAE/B,uCAA0C;AAC1C,2CAA8C;AAE9C,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IAClB,mEAAS,CAAA;IACT,uEAAW,CAAA;AACf,CAAC,EAHI,iBAAiB,KAAjB,iBAAiB,QAGrB;AAED,IAAM,MAAM,GAAG;IACX,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACpC,eAAe,EAAE,SAAS;KAC7B,CAAC;CACL,CAAC;AAEF;IAAkB,uBAAsB;IAAxC;QAAA,qEAiDC;QA7BW,qBAAe,GAAG,UAAC,SAAuB;YAC9C,KAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAChC,CAAC,CAAA;QAEO,kBAAY,GAAG,UAAC,cAAuC;YAC3D,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;gBAC7B,KAAK,iBAAiB,CAAC,SAAS;oBAC5B,MAAM,CAAC,iBAAC,SAAS,IAAC,eAAe,EAAG,KAAI,CAAC,gBAAgB,GAAK,CAAA;gBAElE,KAAK,iBAAiB,CAAC,WAAW;oBAC9B,MAAM,CAAC,iBAAC,WAAW,IAAC,cAAc,EAAG,KAAI,CAAC,YAAY,GAAK,CAAA;YACnE,CAAC;YAED,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC,CAAA;QAEO,sBAAgB,GAAG;YACvB,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,iBAAiB,CAAC,WAAW;gBACtC,eAAe,EAAE,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,cAAc;gBACjE,iBAAiB,EAAE;oBACf,UAAU,EAAE,IAAI;iBACnB;aACJ,CAAC,CAAC;QACP,CAAC,CAAA;QAEO,kBAAY,GAAG;YACnB,KAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC,CAAA;;IACL,CAAC;IA9CG,+BAAiB,GAAjB;QACI,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;gBACxC,OAAO,EAAE,iBAAiB,CAAC,SAAS;gBACpC,eAAe,EAAE,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI;aAC1D,CAAC,CAAC,CAAC;IACR,CAAC;IAED,oBAAM,GAAN;QACI,MAAM,CAAC,CACH,iBAAC,EAAE,CAAC,SAAS,IACT,GAAG,EAAG,IAAI,CAAC,eAAe,EAC1B,WAAW,EAAG,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAG,MAAM,CAAC,YAAY,GACjC,CACL,CAAC;IACN,CAAC;IA+BL,UAAC;AAAD,CAAC,AAjDD,CAAkB,EAAE,CAAC,SAAS,GAiD7B;AAED,iBAAS,GAAG,CAAC"}
\ No newline at end of file
diff --git a/src/dist/MainPanel.js b/src/dist/MainPanel.js
new file mode 100644
index 0000000..91c5d7a
--- /dev/null
+++ b/src/dist/MainPanel.js
@@ -0,0 +1,90 @@
+/*
+* This file demonstrates a basic ReactXP app.
+*/
+"use strict";
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var RX = require("reactxp");
+var styles = {
+ scroll: RX.Styles.createScrollViewStyle({
+ alignSelf: 'stretch',
+ backgroundColor: '#f5fcff'
+ }),
+ container: RX.Styles.createViewStyle({
+ padding: 16,
+ justifyContent: 'center',
+ alignItems: 'center'
+ }),
+ helloWorld: RX.Styles.createTextStyle({
+ fontSize: 48,
+ fontWeight: 'bold',
+ marginBottom: 28
+ }),
+ welcome: RX.Styles.createTextStyle({
+ fontSize: 32,
+ marginBottom: 12
+ }),
+ instructions: RX.Styles.createTextStyle({
+ fontSize: 16,
+ color: '#aaa',
+ marginBottom: 16
+ }),
+ docLink: RX.Styles.createLinkStyle({
+ fontSize: 16,
+ color: 'blue',
+ marginBottom: 16
+ }),
+ roundButton: RX.Styles.createViewStyle({
+ margin: 16,
+ borderRadius: 16,
+ backgroundColor: '#7d88a9'
+ }),
+ buttonText: RX.Styles.createTextStyle({
+ fontSize: 16,
+ marginVertical: 6,
+ marginHorizontal: 12,
+ color: 'white'
+ })
+};
+var MainPanel = (function (_super) {
+ __extends(MainPanel, _super);
+ function MainPanel() {
+ var _this = _super.call(this) || this;
+ _this._onPressNavigate = function () {
+ _this.props.onPressNavigate();
+ };
+ _this._translationValue = new RX.Animated.Value(-100);
+ _this._animatedStyle = RX.Styles.createAnimatedTextStyle({
+ transform: [
+ {
+ translateY: _this._translationValue
+ }
+ ]
+ });
+ return _this;
+ }
+ MainPanel.prototype.componentDidMount = function () {
+ var animation = RX.Animated.timing(this._translationValue, {
+ toValue: 0,
+ easing: RX.Animated.Easing.OutBack(),
+ duration: 500
+ });
+ animation.start();
+ };
+ MainPanel.prototype.render = function () {
+ return (RX.createElement(RX.ScrollView, { style: styles.scroll },
+ RX.createElement(RX.View, { style: styles.container },
+ RX.createElement(RX.Animated.Text, { style: [styles.helloWorld, this._animatedStyle] }, "Hello World"),
+ RX.createElement(RX.Text, { style: styles.welcome }, "Welcome to ReactXP"),
+ RX.createElement(RX.Text, { style: styles.instructions }, "Edit App.tsx to get started"),
+ RX.createElement(RX.Link, { style: styles.docLink, url: 'https://microsoft.github.io/reactxp/docs' }, "View ReactXP documentation"),
+ RX.createElement(RX.Button, { style: styles.roundButton, onPress: this._onPressNavigate },
+ RX.createElement(RX.Text, { style: styles.buttonText }, "See More Examples")))));
+ };
+ return MainPanel;
+}(RX.Component));
+module.exports = MainPanel;
+//# sourceMappingURL=MainPanel.js.map
\ No newline at end of file
diff --git a/src/dist/MainPanel.js.map b/src/dist/MainPanel.js.map
new file mode 100644
index 0000000..06f3491
--- /dev/null
+++ b/src/dist/MainPanel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"MainPanel.js","sourceRoot":"","sources":["../src/MainPanel.tsx"],"names":[],"mappings":"AAAA;;EAEE;;;;;;;AAEF,4BAA+B;AAM/B,IAAM,MAAM,GAAG;IACX,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC;QACpC,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC7B,CAAC;IACF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACjC,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB,CAAC;IACF,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC/B,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC/B,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,WAAW,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACnC,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;KAC7B,CAAC;IACF,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,EAAE;QACpB,KAAK,EAAE,OAAO;KACjB,CAAC;CACL,CAAC;AAEF;IAAwB,6BAAkC;IAItD;QAAA,YACI,iBAAO,SAUV;QAwCO,sBAAgB,GAAG;YACvB,KAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QACjC,CAAC,CAAA;QAlDG,KAAI,CAAC,iBAAiB,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,KAAI,CAAC,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;YACpD,SAAS,EAAE;gBACP;oBACI,UAAU,EAAE,KAAI,CAAC,iBAAiB;iBACrC;aACJ;SACJ,CAAC,CAAC;;IACP,CAAC;IAED,qCAAiB,GAAjB;QACI,IAAI,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;YACrD,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE;YACpC,QAAQ,EAAE,GAAG;SACd,CACJ,CAAC;QAEF,SAAS,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED,0BAAM,GAAN;QACI,MAAM,CAAC,CACH,iBAAC,EAAE,CAAC,UAAU,IAAC,KAAK,EAAG,MAAM,CAAC,MAAM;YAChC,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,SAAS;gBAC7B,iBAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAG,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,kBAE/C;gBACnB,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,OAAO,yBAErB;gBACV,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,YAAY,kCAE1B;gBACV,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,OAAO,EAAG,GAAG,EAAG,0CAA0C,iCAExE;gBAEV,iBAAC,EAAE,CAAC,MAAM,IAAC,KAAK,EAAG,MAAM,CAAC,WAAW,EAAG,OAAO,EAAG,IAAI,CAAC,gBAAgB;oBACnE,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,UAAU,wBAExB,CACF,CACN,CACE,CACnB,CAAC;IACN,CAAC;IAKL,gBAAC;AAAD,CAAC,AA1DD,CAAwB,EAAE,CAAC,SAAS,GA0DnC;AAED,iBAAS,SAAS,CAAC"}
\ No newline at end of file
diff --git a/src/dist/ProgressIndicator.js b/src/dist/ProgressIndicator.js
new file mode 100644
index 0000000..664e228
--- /dev/null
+++ b/src/dist/ProgressIndicator.js
@@ -0,0 +1,40 @@
+/**
+* ProgressIndicator.tsx
+* Copyright: Microsoft 2017
+*
+* Circular progress indicator that shows off the use of ImageSVG
+* ReactXP extension.
+*/
+"use strict";
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var RX = require("reactxp");
+var reactxp_imagesvg_1 = require("reactxp-imagesvg");
+var ProgressIndicator = (function (_super) {
+ __extends(ProgressIndicator, _super);
+ function ProgressIndicator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ ProgressIndicator.prototype.render = function () {
+ var size = this.props.size;
+ var progress = this.props.progress;
+ var radius = size / 2;
+ var deg = progress * 360;
+ var radians = Math.PI * (deg - 90) / 180;
+ var endX = radius + radius * Math.cos(radians);
+ var endY = radius + radius * Math.sin(radians);
+ var path = 'M' + radius + ',' + radius +
+ ' L' + radius + ',0' +
+ ' A' + radius + ',' + radius + ' 0 ' + (deg > 180 ? 1 : 0) + ',1 ' + endX + ',' + endY +
+ 'z';
+ return (RX.createElement(reactxp_imagesvg_1.default, { viewBox: '0 0 ' + size + ' ' + size, style: this.props.style, width: size, height: size },
+ RX.createElement(reactxp_imagesvg_1.SvgPath, { fillColor: this.props.fillColor, d: path })));
+ };
+ return ProgressIndicator;
+}(RX.Component));
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = ProgressIndicator;
+//# sourceMappingURL=ProgressIndicator.js.map
\ No newline at end of file
diff --git a/src/dist/ProgressIndicator.js.map b/src/dist/ProgressIndicator.js.map
new file mode 100644
index 0000000..01bf8d4
--- /dev/null
+++ b/src/dist/ProgressIndicator.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ProgressIndicator.js","sourceRoot":"","sources":["../src/ProgressIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;EAME;;;;;;;AAEF,4BAA+B;AAC/B,qDAA+E;AAQ/E;IAAgC,qCAAwC;IAAxE;;IA2BA,CAAC;IA1BG,kCAAM,GAAN;QACI,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QACrC,IAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC;QACxB,IAAM,GAAG,GAAG,QAAQ,GAAI,GAAG,CAAC;QAC5B,IAAM,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;QAC3C,IAAM,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjD,IAAM,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjD,IAAM,IAAI,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM;YAC3B,IAAI,GAAG,MAAM,GAAG,IAAI;YACpB,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI;YACtF,GAAG,CAAC;QACjB,MAAM,CAAC,CACH,iBAAC,0BAAU,IACP,OAAO,EAAG,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EACpC,KAAK,EAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EACxB,KAAK,EAAG,IAAI,EACZ,MAAM,EAAG,IAAI;YAEb,iBAAC,0BAAS,IACN,SAAS,EAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAChC,CAAC,EAAG,IAAI,GACV,CACO,CAChB,CAAC;IACN,CAAC;IACL,wBAAC;AAAD,CAAC,AA3BD,CAAgC,EAAE,CAAC,SAAS,GA2B3C;;AAED,kBAAe,iBAAiB,CAAC"}
\ No newline at end of file
diff --git a/src/dist/SecondPanel.js b/src/dist/SecondPanel.js
new file mode 100644
index 0000000..17c4a3a
--- /dev/null
+++ b/src/dist/SecondPanel.js
@@ -0,0 +1,114 @@
+/*
+* This file demonstrates a basic ReactXP app.
+*/
+"use strict";
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var RX = require("reactxp");
+var reactxp_video_1 = require("reactxp-video");
+var ProgressIndicator_1 = require("./ProgressIndicator");
+var ToggleSwitch_1 = require("./ToggleSwitch");
+var styles = {
+ scroll: RX.Styles.createScrollViewStyle({
+ alignSelf: 'stretch',
+ backgroundColor: '#f5fcff'
+ }),
+ container: RX.Styles.createViewStyle({
+ padding: 16,
+ justifyContent: 'center',
+ alignItems: 'center'
+ }),
+ titleText: RX.Styles.createTextStyle({
+ fontSize: 16,
+ textAlign: 'center',
+ marginTop: 12,
+ color: 'black'
+ }),
+ videoTitleText: RX.Styles.createTextStyle({
+ marginBottom: 8
+ }),
+ progressMargin: RX.Styles.createViewStyle({
+ margin: 8
+ }),
+ video: RX.Styles.createViewStyle({
+ height: 176,
+ width: 320
+ }),
+ roundButton: RX.Styles.createViewStyle({
+ margin: 16,
+ borderRadius: 16,
+ backgroundColor: '#7d88a9'
+ }),
+ buttonText: RX.Styles.createTextStyle({
+ fontSize: 16,
+ marginVertical: 6,
+ marginHorizontal: 12,
+ color: 'white'
+ })
+};
+var SecondPanel = (function (_super) {
+ __extends(SecondPanel, _super);
+ function SecondPanel() {
+ var _this = _super.call(this) || this;
+ _this._onPressBack = function () {
+ _this.props.onNavigateBack();
+ };
+ _this._playVideo = function () {
+ var video = _this.refs['video'];
+ if (video) {
+ video.mute(true);
+ video.play();
+ }
+ };
+ // Note that we define this as a variable rather than a normal method. Using this
+ // method, we prebind the method to this component instance. This prebinding ensures
+ // that each time we pass the variable as a prop in the render function, it will
+ // not change. We want to avoid unnecessary prop changes because this will trigger
+ // extra work within React's virtual DOM diffing mechanism.
+ _this._onChangeToggle = function (newValue) {
+ _this.setState({ toggleValue: newValue });
+ };
+ _this.state = {
+ toggleValue: true,
+ progressValue: 0
+ };
+ return _this;
+ }
+ SecondPanel.prototype.componentDidMount = function () {
+ this._startProgressIndicator();
+ };
+ SecondPanel.prototype.componentWillUnmount = function () {
+ this._stopProgressIndicator();
+ };
+ SecondPanel.prototype.render = function () {
+ return (RX.createElement(RX.ScrollView, { style: styles.scroll },
+ RX.createElement(RX.View, { style: styles.container },
+ RX.createElement(RX.Button, { style: styles.roundButton, onPress: this._onPressBack },
+ RX.createElement(RX.Text, { style: styles.buttonText }, "Go Back")),
+ RX.createElement(RX.Text, { style: styles.titleText }, "Here is a simple control built using ReactXP"),
+ RX.createElement(ToggleSwitch_1.default, { value: this.state.toggleValue, onChange: this._onChangeToggle }),
+ RX.createElement(RX.Text, { style: styles.titleText }, "Here is an SVG image using the ImageSvg extension"),
+ RX.createElement(ProgressIndicator_1.default, { style: styles.progressMargin, progress: this.state.progressValue, fillColor: '#ddd', size: 32 }),
+ RX.createElement(RX.Text, { style: [styles.titleText, styles.videoTitleText] }, "Here is a video using the Video extension"),
+ RX.createElement(reactxp_video_1.default, { ref: 'video', style: styles.video, source: 'https://www.w3schools.com/html/mov_bbb.mp4', loop: true, onCanPlay: this._playVideo }))));
+ };
+ SecondPanel.prototype._startProgressIndicator = function () {
+ var _this = this;
+ this._progressTimerToken = window.setInterval(function () {
+ var newProgressValue = (_this.state.progressValue + 0.02) % 1;
+ _this.setState({ progressValue: newProgressValue });
+ }, 1000 / 15);
+ };
+ SecondPanel.prototype._stopProgressIndicator = function () {
+ if (this._progressTimerToken) {
+ window.clearInterval(this._progressTimerToken);
+ this._progressTimerToken = undefined;
+ }
+ };
+ return SecondPanel;
+}(RX.Component));
+module.exports = SecondPanel;
+//# sourceMappingURL=SecondPanel.js.map
\ No newline at end of file
diff --git a/src/dist/SecondPanel.js.map b/src/dist/SecondPanel.js.map
new file mode 100644
index 0000000..baf147b
--- /dev/null
+++ b/src/dist/SecondPanel.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"SecondPanel.js","sourceRoot":"","sources":["../src/SecondPanel.tsx"],"names":[],"mappings":"AAAA;;EAEE;;;;;;;AAEF,4BAA+B;AAC/B,+CAAmD;AAEnD,yDAAoD;AACpD,+CAA0C;AAW1C,IAAM,MAAM,GAAG;IACX,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC;QACpC,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC7B,CAAC;IACF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACjC,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB,CAAC;IACF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACjC,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,OAAO;KACjB,CAAC;IACF,cAAc,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACtC,YAAY,EAAE,CAAC;KAClB,CAAC;IACF,cAAc,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACtC,MAAM,EAAE,CAAC;KACZ,CAAC;IACF,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC7B,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;KACb,CAAC;IACF,WAAW,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACnC,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;KAC7B,CAAC;IACF,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,EAAE;QACpB,KAAK,EAAE,OAAO;KACjB,CAAC;CACL,CAAC;AAEF;IAA0B,+BAAgD;IAGtE;QAAA,YACI,iBAAO,SAMV;QAqDO,kBAAY,GAAG;YACnB,KAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAChC,CAAC,CAAA;QAEO,gBAAU,GAAG;YACjB,IAAM,KAAK,GAAG,KAAI,CAAC,IAAI,CAAC,OAAO,CAAY,CAAC;YAC5C,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACjB,KAAK,CAAC,IAAI,EAAE,CAAC;YACjB,CAAC;QACL,CAAC,CAAA;QAgBD,iFAAiF;QACjF,oFAAoF;QACpF,gFAAgF;QAChF,kFAAkF;QAClF,2DAA2D;QACnD,qBAAe,GAAG,UAAC,QAAiB;YACxC,KAAI,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAA;QA1FG,KAAI,CAAC,KAAK,GAAG;YACT,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,CAAC;SACnB,CAAC;;IACN,CAAC;IAED,uCAAiB,GAAjB;QACI,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACnC,CAAC;IAED,0CAAoB,GAApB;QACI,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAClC,CAAC;IAED,4BAAM,GAAN;QACI,MAAM,CAAC,CACH,iBAAC,EAAE,CAAC,UAAU,IAAC,KAAK,EAAG,MAAM,CAAC,MAAM;YAChC,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,SAAS;gBAC7B,iBAAC,EAAE,CAAC,MAAM,IAAC,KAAK,EAAG,MAAM,CAAC,WAAW,EAAG,OAAO,EAAG,IAAI,CAAC,YAAY;oBAC/D,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,UAAU,cAExB,CACF;gBAEZ,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,SAAS,mDAEvB;gBACV,iBAAC,sBAAY,IACT,KAAK,EAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAG,IAAI,CAAC,eAAe,GACjC;gBAEF,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,MAAM,CAAC,SAAS,wDAEvB;gBACV,iBAAC,2BAAiB,IACd,KAAK,EAAG,MAAM,CAAC,cAAc,EAC7B,QAAQ,EAAG,IAAI,CAAC,KAAK,CAAC,aAAa,EACnC,SAAS,EAAG,MAAM,EAClB,IAAI,EAAG,EAAE,GACX;gBAEF,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,gDAEhD;gBACV,iBAAC,uBAAO,IACJ,GAAG,EAAC,OAAO,EACX,KAAK,EAAG,MAAM,CAAC,KAAK,EACpB,MAAM,EAAG,4CAA4C,EACrD,IAAI,EAAG,IAAI,EACX,SAAS,EAAG,IAAI,CAAC,UAAU,GAC7B,CACI,CACE,CACnB,CAAC;IACN,CAAC;IAcO,6CAAuB,GAA/B;QAAA,iBAKC;QAJG,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC;YAC1C,IAAM,gBAAgB,GAAG,CAAC,KAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/D,KAAI,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACvD,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAClB,CAAC;IAEO,4CAAsB,GAA9B;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YAC/C,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;QACzC,CAAC;IACL,CAAC;IAUL,kBAAC;AAAD,CAAC,AAjGD,CAA0B,EAAE,CAAC,SAAS,GAiGrC;AAED,iBAAS,WAAW,CAAC"}
\ No newline at end of file
diff --git a/src/dist/ToggleSwitch.js b/src/dist/ToggleSwitch.js
new file mode 100644
index 0000000..efb30d3
--- /dev/null
+++ b/src/dist/ToggleSwitch.js
@@ -0,0 +1,105 @@
+/**
+* ToggleSwitch.tsx
+* Copyright: Microsoft 2017
+*
+* A simple toggle control built in ReactXP that allows users to
+* pick between two values.
+*/
+"use strict";
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var RX = require("reactxp");
+var _knobLeftOff = 2; // In pixels
+var _knobLeftOn = 22; // In pixels
+var _animationDuration = 250; // In milliseconds
+var _styles = {
+ container: RX.Styles.createButtonStyle({
+ flexDirection: 'row',
+ alignItems: 'center'
+ }),
+ toggleSwitch: RX.Styles.createViewStyle({
+ flexDirection: 'row',
+ borderRadius: 15,
+ marginVertical: 8,
+ height: 30,
+ width: 50,
+ backgroundColor: '#ddd'
+ }),
+ toggleSwitchBackground: RX.Styles.createViewStyle({
+ position: 'absolute',
+ top: 0,
+ bottom: 0,
+ left: 0,
+ right: 0,
+ borderRadius: 15
+ }),
+ toggleKnob: RX.Styles.createViewStyle({
+ top: 2,
+ height: 26,
+ width: 26,
+ borderRadius: 13,
+ backgroundColor: 'white'
+ })
+};
+var ToggleSwitch = (function (_super) {
+ __extends(ToggleSwitch, _super);
+ function ToggleSwitch(props) {
+ var _this = _super.call(this, props) || this;
+ _this._handleClick = function (e) {
+ e.stopPropagation();
+ if (_this.props.onChange) {
+ _this.props.onChange(!_this.props.value);
+ }
+ };
+ // This value controls the left offset of the knob, which we will
+ // animate when the user toggles the control.
+ _this._knobLeftAnimationValue = new RX.Animated.Value(_this.props.value ? _knobLeftOn : _knobLeftOff);
+ _this._knobLeftAnimationStyle = RX.Styles.createAnimatedViewStyle({
+ left: _this._knobLeftAnimationValue
+ });
+ // This value controls the background color of the control. Here we make
+ // use of the interpolate method to smoothly transition between two colors.
+ _this._toggleColorAnimationValue = new RX.Animated.Value(_this.props.value ? 1 : 0);
+ _this._toggleColorAnimationStyle = RX.Styles.createAnimatedTextInputStyle({
+ backgroundColor: _this._toggleColorAnimationValue.interpolate({
+ inputRange: [0, 1],
+ outputRange: ['#66f', '#ddd']
+ })
+ });
+ return _this;
+ }
+ ToggleSwitch.prototype.componentWillUpdate = function (newProps) {
+ // If the value of the toggle changes, animate the toggle sliding
+ // from one side to the other. In parallel, animate the opacity change.
+ if (this.props.value !== newProps.value) {
+ RX.Animated.parallel([
+ RX.Animated.timing(this._knobLeftAnimationValue, {
+ toValue: newProps.value ? _knobLeftOn : _knobLeftOff,
+ duration: _animationDuration,
+ easing: RX.Animated.Easing.InOut()
+ }),
+ RX.Animated.timing(this._toggleColorAnimationValue, {
+ toValue: newProps.value ? 1 : 0,
+ duration: _animationDuration,
+ easing: RX.Animated.Easing.InOut()
+ })
+ ])
+ .start();
+ }
+ };
+ ToggleSwitch.prototype.render = function () {
+ var knobStyles = [_styles.toggleKnob, this._knobLeftAnimationStyle];
+ var backgroundStyle = [_styles.toggleSwitchBackground, this._toggleColorAnimationStyle];
+ return (RX.createElement(RX.Button, { style: _styles.container, onPress: this._handleClick },
+ RX.createElement(RX.View, { style: _styles.toggleSwitch },
+ RX.createElement(RX.Animated.View, { style: backgroundStyle }),
+ RX.createElement(RX.Animated.View, { style: knobStyles }))));
+ };
+ return ToggleSwitch;
+}(RX.Component));
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = ToggleSwitch;
+//# sourceMappingURL=ToggleSwitch.js.map
\ No newline at end of file
diff --git a/src/dist/ToggleSwitch.js.map b/src/dist/ToggleSwitch.js.map
new file mode 100644
index 0000000..e43c905
--- /dev/null
+++ b/src/dist/ToggleSwitch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ToggleSwitch.js","sourceRoot":"","sources":["../src/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA;;;;;;EAME;;;;;;;AAEF,4BAA+B;AAO/B,IAAM,YAAY,GAAG,CAAC,CAAC,CAAC,YAAY;AACpC,IAAM,WAAW,GAAG,EAAE,CAAC,CAAC,YAAY;AACpC,IAAM,kBAAkB,GAAG,GAAG,CAAC,CAAC,kBAAkB;AAElD,IAAM,OAAO,GAAG;IACZ,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC;QACnC,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACvB,CAAC;IACF,YAAY,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACpC,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,CAAC;QACjB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,eAAe,EAAE,MAAM;KAC1B,CAAC;IACF,sBAAsB,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAC9C,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,OAAO;KAC3B,CAAC;CACL,CAAC;AAEF;IAA2B,gCAAqC;IAO5D,sBAAY,KAAwB;QAApC,YACI,kBAAM,KAAK,CAAC,SAkBf;QAqCO,kBAAY,GAAG,UAAC,CAA0B;YAC9C,CAAC,CAAC,eAAe,EAAE,CAAC;YAEpB,EAAE,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACtB,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC3C,CAAC;QACL,CAAC,CAAA;QA3DG,iEAAiE;QACjE,6CAA6C;QAC7C,KAAI,CAAC,uBAAuB,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;QACpG,KAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;YAC7D,IAAI,EAAE,KAAI,CAAC,uBAAuB;SACrC,CAAC,CAAC;QAEH,wEAAwE;QACxE,2EAA2E;QAC3E,KAAI,CAAC,0BAA0B,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAClF,KAAI,CAAC,0BAA0B,GAAG,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC;YACrE,eAAe,EAAE,KAAI,CAAC,0BAA0B,CAAC,WAAW,CAAC;gBACzD,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBAClB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;aAChC,CAAC;SACL,CAAC,CAAC;;IACP,CAAC;IAED,0CAAmB,GAAnB,UAAoB,QAA2B;QAE3C,iEAAiE;QACjE,uEAAuE;QACvE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YACtC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBACjB,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE;oBAC7C,OAAO,EAAE,QAAQ,CAAC,KAAK,GAAG,WAAW,GAAG,YAAY;oBACpD,QAAQ,EAAE,kBAAkB;oBAC5B,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;iBACrC,CAAC;gBACF,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;oBAChD,OAAO,EAAE,QAAQ,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC;oBAC/B,QAAQ,EAAE,kBAAkB;oBAC5B,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;iBACrC,CAAC;aACL,CAAC;iBACD,KAAK,EAAE,CAAC;QACb,CAAC;IACL,CAAC;IAED,6BAAM,GAAN;QACI,IAAM,UAAU,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtE,IAAM,eAAe,GAAG,CAAC,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAE1F,MAAM,CAAC,CACH,iBAAC,EAAE,CAAC,MAAM,IAAC,KAAK,EAAG,OAAO,CAAC,SAAS,EAAG,OAAO,EAAG,IAAI,CAAC,YAAY;YAC9D,iBAAC,EAAE,CAAC,IAAI,IAAC,KAAK,EAAG,OAAO,CAAC,YAAY;gBACjC,iBAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAG,eAAe,GAAI;gBAC7C,iBAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAG,UAAU,GAAI,CAClC,CACD,CAChB,CAAC;IACN,CAAC;IASL,mBAAC;AAAD,CAAC,AAtED,CAA2B,EAAE,CAAC,SAAS,GAsEtC;;AAED,kBAAe,YAAY,CAAC"}
\ No newline at end of file
diff --git a/src/dist/bundle.js b/src/dist/bundle.js
index e4bb92c..437b9c1 100644
--- a/src/dist/bundle.js
+++ b/src/dist/bundle.js
@@ -63,7 +63,7 @@
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 492);
+/******/ return __webpack_require__(__webpack_require__.s = 620);
/******/ })
/************************************************************************/
/******/ ([
@@ -240,6 +240,10 @@ process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
+process.prependListener = noop;
+process.prependOnceListener = noop;
+
+process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
@@ -256,6 +260,26 @@ process.umask = function() { return 0; };
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+
+
+module.exports = __webpack_require__(52);
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = __webpack_require__(427);
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright (c) 2013-present, Facebook, Inc.
@@ -315,7 +339,7 @@ module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 2 */
+/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -331,7 +355,7 @@ module.exports = invariant;
-var emptyFunction = __webpack_require__(17);
+var emptyFunction = __webpack_require__(25);
/**
* Similar to invariant but only logs a warning if the condition is not met.
@@ -388,7 +412,7 @@ module.exports = warning;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 3 */
+/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -432,7 +456,7 @@ function reactProdInvariant(code) {
module.exports = reactProdInvariant;
/***/ }),
-/* 4 */
+/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -451,10 +475,10 @@ var __extends = (this && this.__extends) || function (d, b) {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-var React = __webpack_require__(6);
-var AppConfig_1 = __webpack_require__(195);
-var SubscribableEvent = __webpack_require__(114);
-var Types = __webpack_require__(14);
+var React = __webpack_require__(1);
+var AppConfig_1 = __webpack_require__(241);
+var SubscribableEvent = __webpack_require__(157);
+var Types = __webpack_require__(19);
exports.Types = Types;
var ActivityIndicator = (function (_super) {
__extends(ActivityIndicator, _super);
@@ -512,16 +536,11 @@ var AnimatedView = (function (_super) {
exports.AnimatedView = AnimatedView;
var AnimatedValue = (function () {
function AnimatedValue(val) {
+ // No-op
}
return AnimatedValue;
}());
exports.AnimatedValue = AnimatedValue;
-var Profiling = (function () {
- function Profiling() {
- }
- return Profiling;
-}());
-exports.Profiling = Profiling;
var App = (function () {
function App() {
this.activationStateChangedEvent = new SubscribableEvent.SubscribableEvent();
@@ -643,7 +662,6 @@ var DeviceNetworkType;
DeviceNetworkType[DeviceNetworkType["MOBILE_3G"] = 4] = "MOBILE_3G";
DeviceNetworkType[DeviceNetworkType["MOBILE_4G"] = 5] = "MOBILE_4G";
})(DeviceNetworkType = exports.DeviceNetworkType || (exports.DeviceNetworkType = {}));
-;
var Network = (function () {
function Network() {
this.connectivityChangedEvent = new SubscribableEvent.SubscribableEvent();
@@ -744,209 +762,811 @@ exports.WebView = WebView;
/***/ }),
-/* 5 */
+/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
+/**
+* Interfaces.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Defines the template for the ReactXP interface that needs to be
+* implemented for each platform.
*/
-
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
+var React = __webpack_require__(1);
+var AppConfig_1 = __webpack_require__(250);
+var SubscribableEvent = __webpack_require__(161);
+var Types = __webpack_require__(21);
+exports.Types = Types;
+var ActivityIndicator = (function (_super) {
+ __extends(ActivityIndicator, _super);
+ function ActivityIndicator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ActivityIndicator;
+}(React.Component));
+exports.ActivityIndicator = ActivityIndicator;
+var Alert = (function () {
+ function Alert() {
+ }
+ return Alert;
+}());
+exports.Alert = Alert;
+var AnimatedComponent = (function (_super) {
+ __extends(AnimatedComponent, _super);
+ function AnimatedComponent() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedComponent;
+}(React.Component));
+exports.AnimatedComponent = AnimatedComponent;
+var AnimatedImage = (function (_super) {
+ __extends(AnimatedImage, _super);
+ function AnimatedImage() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedImage;
+}(AnimatedComponent));
+exports.AnimatedImage = AnimatedImage;
+var AnimatedText = (function (_super) {
+ __extends(AnimatedText, _super);
+ function AnimatedText() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedText;
+}(AnimatedComponent));
+exports.AnimatedText = AnimatedText;
+var AnimatedTextInput = (function (_super) {
+ __extends(AnimatedTextInput, _super);
+ function AnimatedTextInput() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedTextInput;
+}(AnimatedComponent));
+exports.AnimatedTextInput = AnimatedTextInput;
+var AnimatedView = (function (_super) {
+ __extends(AnimatedView, _super);
+ function AnimatedView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedView;
+}(AnimatedComponent));
+exports.AnimatedView = AnimatedView;
+var AnimatedValue = (function () {
+ function AnimatedValue(val) {
+ // No-op
+ }
+ return AnimatedValue;
+}());
+exports.AnimatedValue = AnimatedValue;
+var App = (function () {
+ function App() {
+ this.activationStateChangedEvent = new SubscribableEvent.SubscribableEvent();
+ // Memory Warnings
+ this.memoryWarningEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ // Initialization
+ App.prototype.initialize = function (debug, development) {
+ AppConfig_1.default.setAppConfig(debug, development);
+ };
+ return App;
+}());
+exports.App = App;
+var UserInterface = (function () {
+ function UserInterface() {
+ this.contentSizeMultiplierChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return UserInterface;
+}());
+exports.UserInterface = UserInterface;
+var Modal = (function () {
+ function Modal() {
+ }
+ return Modal;
+}());
+exports.Modal = Modal;
+var Popup = (function () {
+ function Popup() {
+ }
+ return Popup;
+}());
+exports.Popup = Popup;
+var Linking = (function () {
+ function Linking() {
+ this.deepLinkRequestEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Linking;
+}());
+exports.Linking = Linking;
+var Accessibility = (function () {
+ function Accessibility() {
+ this.screenReaderChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Accessibility;
+}());
+exports.Accessibility = Accessibility;
+var Button = (function (_super) {
+ __extends(Button, _super);
+ function Button() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Button;
+}(React.Component));
+exports.Button = Button;
+var Picker = (function (_super) {
+ __extends(Picker, _super);
+ function Picker() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Picker;
+}(React.Component));
+exports.Picker = Picker;
+var Component = (function (_super) {
+ __extends(Component, _super);
+ function Component() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Component;
+}(React.Component));
+exports.Component = Component;
+var Image = (function (_super) {
+ __extends(Image, _super);
+ function Image() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Image;
+}(React.Component));
+exports.Image = Image;
+var Clipboard = (function () {
+ function Clipboard() {
+ }
+ return Clipboard;
+}());
+exports.Clipboard = Clipboard;
+var Link = (function (_super) {
+ __extends(Link, _super);
+ function Link() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Link;
+}(React.Component));
+exports.Link = Link;
+var Storage = (function () {
+ function Storage() {
+ }
+ return Storage;
+}());
+exports.Storage = Storage;
+var Location = (function () {
+ function Location() {
+ }
+ return Location;
+}());
+exports.Location = Location;
+var Navigator = (function (_super) {
+ __extends(Navigator, _super);
+ function Navigator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Navigator;
+}(React.Component));
+exports.Navigator = Navigator;
+var DeviceNetworkType;
+(function (DeviceNetworkType) {
+ DeviceNetworkType[DeviceNetworkType["UNKNOWN"] = 0] = "UNKNOWN";
+ DeviceNetworkType[DeviceNetworkType["NONE"] = 1] = "NONE";
+ DeviceNetworkType[DeviceNetworkType["WIFI"] = 2] = "WIFI";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_2G"] = 3] = "MOBILE_2G";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_3G"] = 4] = "MOBILE_3G";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_4G"] = 5] = "MOBILE_4G";
+})(DeviceNetworkType = exports.DeviceNetworkType || (exports.DeviceNetworkType = {}));
+var Network = (function () {
+ function Network() {
+ this.connectivityChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Network;
+}());
+exports.Network = Network;
+var Platform = (function () {
+ function Platform() {
+ }
+ return Platform;
+}());
+exports.Platform = Platform;
+var Input = (function () {
+ function Input() {
+ this.backButtonEvent = new SubscribableEvent.SubscribableEvent();
+ this.keyDownEvent = new SubscribableEvent.SubscribableEvent();
+ this.keyUpEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Input;
+}());
+exports.Input = Input;
+var ScrollView = (function (_super) {
+ __extends(ScrollView, _super);
+ function ScrollView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ScrollView;
+}(React.Component));
+exports.ScrollView = ScrollView;
+var StatusBar = (function () {
+ function StatusBar() {
+ }
+ return StatusBar;
+}());
+exports.StatusBar = StatusBar;
+var Styles = (function () {
+ function Styles() {
+ }
+ return Styles;
+}());
+exports.Styles = Styles;
+var Text = (function (_super) {
+ __extends(Text, _super);
+ function Text() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Text;
+}(React.Component));
+exports.Text = Text;
+var TextInput = (function (_super) {
+ __extends(TextInput, _super);
+ function TextInput() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return TextInput;
+}(React.Component));
+exports.TextInput = TextInput;
+var UserPresence = (function () {
+ function UserPresence() {
+ this.userPresenceChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return UserPresence;
+}());
+exports.UserPresence = UserPresence;
+var ViewBase = (function (_super) {
+ __extends(ViewBase, _super);
+ function ViewBase() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ViewBase;
+}(React.Component));
+exports.ViewBase = ViewBase;
+var View = (function (_super) {
+ __extends(View, _super);
+ function View() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return View;
+}(ViewBase));
+exports.View = View;
+var GestureView = (function (_super) {
+ __extends(GestureView, _super);
+ function GestureView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return GestureView;
+}(ViewBase));
+exports.GestureView = GestureView;
+var WebView = (function (_super) {
+ __extends(WebView, _super);
+ function WebView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return WebView;
+}(ViewBase));
+exports.WebView = WebView;
/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = __webpack_require__(39);
-
-
-/***/ }),
-/* 7 */
+/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var _prodInvariant = __webpack_require__(3);
-
-var DOMProperty = __webpack_require__(27);
-var ReactDOMComponentFlags = __webpack_require__(172);
-
-var invariant = __webpack_require__(1);
-
-var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
-var Flags = ReactDOMComponentFlags;
-
-var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
-
-/**
- * Check if a given node should be cached.
- */
-function shouldPrecacheNode(node, nodeID) {
- return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
-}
-
-/**
- * Drill down (through composites and empty components) until we get a host or
- * host text component.
- *
- * This is pretty polymorphic but unavoidable with the current structure we have
- * for `_renderedChildren`.
- */
-function getRenderedHostOrTextFromComponent(component) {
- var rendered;
- while (rendered = component._renderedComponent) {
- component = rendered;
- }
- return component;
-}
-
/**
- * Populate `_hostNode` on the rendered host/text component with the given
- * DOM node. The passed `inst` can be a composite.
- */
-function precacheNode(inst, node) {
- var hostInst = getRenderedHostOrTextFromComponent(inst);
- hostInst._hostNode = node;
- node[internalInstanceKey] = hostInst;
-}
-
-function uncacheNode(inst) {
- var node = inst._hostNode;
- if (node) {
- delete node[internalInstanceKey];
- inst._hostNode = null;
- }
-}
+* Interfaces.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Defines the template for the ReactXP interface that needs to be
+* implemented for each platform.
+*/
-/**
- * Populate `_hostNode` on each child of `inst`, assuming that the children
- * match up with the DOM (element) children of `node`.
- *
- * We cache entire levels at once to avoid an n^2 problem where we access the
- * children of a node sequentially and have to walk from the start to our target
- * node every time.
- *
- * Since we update `_renderedChildren` and the actual DOM at (slightly)
- * different times, we could race here and see a newer `_renderedChildren` than
- * the DOM nodes we see. To avoid this, ReactMultiChild calls
- * `prepareToManageChildren` before we change `_renderedChildren`, at which
- * time the container's child nodes are always cached (until it unmounts).
- */
-function precacheChildNodes(inst, node) {
- if (inst._flags & Flags.hasCachedChildNodes) {
- return;
- }
- var children = inst._renderedChildren;
- var childNode = node.firstChild;
- outer: for (var name in children) {
- if (!children.hasOwnProperty(name)) {
- continue;
- }
- var childInst = children[name];
- var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
- if (childID === 0) {
- // We're currently unmounting this child in ReactMultiChild; skip it.
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var React = __webpack_require__(1);
+var AppConfig_1 = __webpack_require__(260);
+var SubscribableEvent = __webpack_require__(165);
+var Types = __webpack_require__(23);
+exports.Types = Types;
+var ActivityIndicator = (function (_super) {
+ __extends(ActivityIndicator, _super);
+ function ActivityIndicator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ActivityIndicator;
+}(React.Component));
+exports.ActivityIndicator = ActivityIndicator;
+var Alert = (function () {
+ function Alert() {
+ }
+ return Alert;
+}());
+exports.Alert = Alert;
+var AnimatedComponent = (function (_super) {
+ __extends(AnimatedComponent, _super);
+ function AnimatedComponent() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedComponent;
+}(React.Component));
+exports.AnimatedComponent = AnimatedComponent;
+var AnimatedImage = (function (_super) {
+ __extends(AnimatedImage, _super);
+ function AnimatedImage() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedImage;
+}(AnimatedComponent));
+exports.AnimatedImage = AnimatedImage;
+var AnimatedText = (function (_super) {
+ __extends(AnimatedText, _super);
+ function AnimatedText() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedText;
+}(AnimatedComponent));
+exports.AnimatedText = AnimatedText;
+var AnimatedTextInput = (function (_super) {
+ __extends(AnimatedTextInput, _super);
+ function AnimatedTextInput() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedTextInput;
+}(AnimatedComponent));
+exports.AnimatedTextInput = AnimatedTextInput;
+var AnimatedView = (function (_super) {
+ __extends(AnimatedView, _super);
+ function AnimatedView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return AnimatedView;
+}(AnimatedComponent));
+exports.AnimatedView = AnimatedView;
+var AnimatedValue = (function () {
+ function AnimatedValue(val) {
+ // No-op
+ }
+ return AnimatedValue;
+}());
+exports.AnimatedValue = AnimatedValue;
+var App = (function () {
+ function App() {
+ this.activationStateChangedEvent = new SubscribableEvent.SubscribableEvent();
+ // Memory Warnings
+ this.memoryWarningEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ // Initialization
+ App.prototype.initialize = function (debug, development) {
+ AppConfig_1.default.setAppConfig(debug, development);
+ };
+ return App;
+}());
+exports.App = App;
+var UserInterface = (function () {
+ function UserInterface() {
+ this.contentSizeMultiplierChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return UserInterface;
+}());
+exports.UserInterface = UserInterface;
+var Modal = (function () {
+ function Modal() {
+ }
+ return Modal;
+}());
+exports.Modal = Modal;
+var Popup = (function () {
+ function Popup() {
+ }
+ return Popup;
+}());
+exports.Popup = Popup;
+var Linking = (function () {
+ function Linking() {
+ this.deepLinkRequestEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Linking;
+}());
+exports.Linking = Linking;
+var Accessibility = (function () {
+ function Accessibility() {
+ this.screenReaderChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Accessibility;
+}());
+exports.Accessibility = Accessibility;
+var Button = (function (_super) {
+ __extends(Button, _super);
+ function Button() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Button;
+}(React.Component));
+exports.Button = Button;
+var Picker = (function (_super) {
+ __extends(Picker, _super);
+ function Picker() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Picker;
+}(React.Component));
+exports.Picker = Picker;
+var Component = (function (_super) {
+ __extends(Component, _super);
+ function Component() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Component;
+}(React.Component));
+exports.Component = Component;
+var Image = (function (_super) {
+ __extends(Image, _super);
+ function Image() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Image;
+}(React.Component));
+exports.Image = Image;
+var Clipboard = (function () {
+ function Clipboard() {
+ }
+ return Clipboard;
+}());
+exports.Clipboard = Clipboard;
+var Link = (function (_super) {
+ __extends(Link, _super);
+ function Link() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Link;
+}(React.Component));
+exports.Link = Link;
+var Storage = (function () {
+ function Storage() {
+ }
+ return Storage;
+}());
+exports.Storage = Storage;
+var Location = (function () {
+ function Location() {
+ }
+ return Location;
+}());
+exports.Location = Location;
+var Navigator = (function (_super) {
+ __extends(Navigator, _super);
+ function Navigator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Navigator;
+}(React.Component));
+exports.Navigator = Navigator;
+var DeviceNetworkType;
+(function (DeviceNetworkType) {
+ DeviceNetworkType[DeviceNetworkType["UNKNOWN"] = 0] = "UNKNOWN";
+ DeviceNetworkType[DeviceNetworkType["NONE"] = 1] = "NONE";
+ DeviceNetworkType[DeviceNetworkType["WIFI"] = 2] = "WIFI";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_2G"] = 3] = "MOBILE_2G";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_3G"] = 4] = "MOBILE_3G";
+ DeviceNetworkType[DeviceNetworkType["MOBILE_4G"] = 5] = "MOBILE_4G";
+})(DeviceNetworkType = exports.DeviceNetworkType || (exports.DeviceNetworkType = {}));
+var Network = (function () {
+ function Network() {
+ this.connectivityChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Network;
+}());
+exports.Network = Network;
+var Platform = (function () {
+ function Platform() {
+ }
+ return Platform;
+}());
+exports.Platform = Platform;
+var Input = (function () {
+ function Input() {
+ this.backButtonEvent = new SubscribableEvent.SubscribableEvent();
+ this.keyDownEvent = new SubscribableEvent.SubscribableEvent();
+ this.keyUpEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return Input;
+}());
+exports.Input = Input;
+var ScrollView = (function (_super) {
+ __extends(ScrollView, _super);
+ function ScrollView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ScrollView;
+}(React.Component));
+exports.ScrollView = ScrollView;
+var StatusBar = (function () {
+ function StatusBar() {
+ }
+ return StatusBar;
+}());
+exports.StatusBar = StatusBar;
+var Styles = (function () {
+ function Styles() {
+ }
+ return Styles;
+}());
+exports.Styles = Styles;
+var Text = (function (_super) {
+ __extends(Text, _super);
+ function Text() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return Text;
+}(React.Component));
+exports.Text = Text;
+var TextInput = (function (_super) {
+ __extends(TextInput, _super);
+ function TextInput() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return TextInput;
+}(React.Component));
+exports.TextInput = TextInput;
+var UserPresence = (function () {
+ function UserPresence() {
+ this.userPresenceChangedEvent = new SubscribableEvent.SubscribableEvent();
+ }
+ return UserPresence;
+}());
+exports.UserPresence = UserPresence;
+var ViewBase = (function (_super) {
+ __extends(ViewBase, _super);
+ function ViewBase() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return ViewBase;
+}(React.Component));
+exports.ViewBase = ViewBase;
+var View = (function (_super) {
+ __extends(View, _super);
+ function View() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return View;
+}(ViewBase));
+exports.View = View;
+var GestureView = (function (_super) {
+ __extends(GestureView, _super);
+ function GestureView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return GestureView;
+}(ViewBase));
+exports.GestureView = GestureView;
+var WebView = (function (_super) {
+ __extends(WebView, _super);
+ function WebView() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return WebView;
+}(ViewBase));
+exports.WebView = WebView;
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(5);
+
+var DOMProperty = __webpack_require__(37);
+var ReactDOMComponentFlags = __webpack_require__(216);
+
+var invariant = __webpack_require__(3);
+
+var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
+var Flags = ReactDOMComponentFlags;
+
+var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
+
+/**
+ * Check if a given node should be cached.
+ */
+function shouldPrecacheNode(node, nodeID) {
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
+}
+
+/**
+ * Drill down (through composites and empty components) until we get a host or
+ * host text component.
+ *
+ * This is pretty polymorphic but unavoidable with the current structure we have
+ * for `_renderedChildren`.
+ */
+function getRenderedHostOrTextFromComponent(component) {
+ var rendered;
+ while (rendered = component._renderedComponent) {
+ component = rendered;
+ }
+ return component;
+}
+
+/**
+ * Populate `_hostNode` on the rendered host/text component with the given
+ * DOM node. The passed `inst` can be a composite.
+ */
+function precacheNode(inst, node) {
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
+ hostInst._hostNode = node;
+ node[internalInstanceKey] = hostInst;
+}
+
+function uncacheNode(inst) {
+ var node = inst._hostNode;
+ if (node) {
+ delete node[internalInstanceKey];
+ inst._hostNode = null;
+ }
+}
+
+/**
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
+ * match up with the DOM (element) children of `node`.
+ *
+ * We cache entire levels at once to avoid an n^2 problem where we access the
+ * children of a node sequentially and have to walk from the start to our target
+ * node every time.
+ *
+ * Since we update `_renderedChildren` and the actual DOM at (slightly)
+ * different times, we could race here and see a newer `_renderedChildren` than
+ * the DOM nodes we see. To avoid this, ReactMultiChild calls
+ * `prepareToManageChildren` before we change `_renderedChildren`, at which
+ * time the container's child nodes are always cached (until it unmounts).
+ */
+function precacheChildNodes(inst, node) {
+ if (inst._flags & Flags.hasCachedChildNodes) {
+ return;
+ }
+ var children = inst._renderedChildren;
+ var childNode = node.firstChild;
+ outer: for (var name in children) {
+ if (!children.hasOwnProperty(name)) {
+ continue;
+ }
+ var childInst = children[name];
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
+ if (childID === 0) {
+ // We're currently unmounting this child in ReactMultiChild; skip it.
continue;
}
// We assume the child nodes are in the same order as the child instances.
@@ -1052,120 +1672,476 @@ module.exports = ReactDOMComponentTree;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 8 */
+/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+/* WEBPACK VAR INJECTION */(function(setImmediate) {/**
+ * SyncTasks.ts
+ * Author: David de Regt
+ * Copyright: Microsoft 2015
*
+ * A very simple promise library that resolves all promises synchronously instead of
+ * kicking them back to the main ticking thread. This affirmatively rejects the A+
+ * standard for promises, and is used for a combination of performance (wrapping
+ * things back to the main thread is really slow) and because indexeddb loses
+ * context for its calls if you send them around the event loop and transactions
+ * automatically close.
*/
-
-
-var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-
-/**
- * Simple, lightweight module assisting with the detection and context of
- * Worker. Helps avoid circular dependencies and allows code to reason about
- * whether or not they are in a Worker, even if they never include the main
- * `ReactWorker` dependency.
- */
-var ExecutionEnvironment = {
-
- canUseDOM: canUseDOM,
-
- canUseWorkers: typeof Worker !== 'undefined',
-
- canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
-
- canUseViewport: canUseDOM && !!window.screen,
-
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
-
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.config = {
+ // If we catch exceptions in success/fail blocks, it silently falls back to the fail case of the outer promise.
+ // If this is global variable is true, it will also spit out a console.error with the exception for debugging.
+ exceptionsToConsole: true,
+ // Whether or not to actually attempt to catch exceptions with try/catch blocks inside the resolution cases.
+ // Disable this for debugging when you'd rather the debugger caught the exception synchronously rather than
+ // digging through a stack trace.
+ catchExceptions: true,
+ // Use this option in order to debug double resolution asserts locally.
+ // Enabling this option in the release would have a negative impact on the application performance.
+ traceEnabled: false,
+ exceptionHandler: null,
+ // If an ErrorFunc is not added to the task (then, catch, always) before the task rejects or synchonously
+ // after that, then this function is called with the error. Default throws the error.
+ unhandledErrorHandler: (function (err) { throw err; })
};
-
-module.exports = ExecutionEnvironment;
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+function fromThenable(thenable) {
+ var deferred = Defer();
+ // NOTE: The {} around the error handling is critical to ensure that
+ // we do not trigger "Possible unhandled rejection" warnings. By adding
+ // the braces, the error handler rejects the outer promise, but returns
+ // void. If we remove the braces, it would *also* return something which
+ // would be unhandled
+ thenable.then(function (value) { deferred.resolve(value); return undefined; }, function (err) { deferred.reject(err); });
+ return deferred.promise();
+}
+exports.fromThenable = fromThenable;
+function isThenable(object) {
+ return object !== null && object !== void 0 && typeof object.then === 'function';
+}
+function isCancelable(object) {
+ return object !== null && object !== void 0 && typeof object.cancel === 'function';
+}
+// Runs trier(). If config.catchExceptions is set then any exception is caught and handed to catcher.
+function run(trier, catcher) {
+ if (exports.config.catchExceptions) {
+ // Any try/catch/finally block in a function makes the entire function ineligible for optimization is most JS engines.
+ // Make sure this stays in a small/quick function, or break out into its own function.
+ try {
+ return trier();
+ }
+ catch (e) {
+ return catcher(e);
+ }
+ }
+ else {
+ return trier();
+ }
+}
+var asyncCallbacks = [];
+// Ideally, we use setImmediate, but that's only supported on some environments.
+// Suggestion: Use the "setimmediate" NPM package to polyfill where it's not available.
+var useSetImmediate = typeof setImmediate !== 'undefined';
/**
-* lodashMini.ts
-*
-* Copyright (c) Microsoft Corporation. All rights reserved.
-* Licensed under the MIT license.
-*
-* Import and re-export of part of the lodash module. This helps reduce bundle size.
-*/
-
-var assign = __webpack_require__(326);
-exports.assign = assign;
-var clone = __webpack_require__(158);
-exports.clone = clone;
-var cloneDeep = __webpack_require__(328);
-exports.cloneDeep = cloneDeep;
-var defer = __webpack_require__(332);
-exports.defer = defer;
-var each = __webpack_require__(333);
-exports.each = each;
-var endsWith = __webpack_require__(334);
-exports.endsWith = endsWith;
-var extend = __webpack_require__(335);
-exports.extend = extend;
-var filter = __webpack_require__(159);
-exports.filter = filter;
-var findIndex = __webpack_require__(336);
-exports.findIndex = findIndex;
-var findLast = __webpack_require__(337);
-exports.findLast = findLast;
-var flatten = __webpack_require__(160);
-exports.flatten = flatten;
-var get = __webpack_require__(161);
-exports.get = get;
-var isArray = __webpack_require__(10);
-exports.isArray = isArray;
-var isEmpty = __webpack_require__(341);
-exports.isEmpty = isEmpty;
-var isEqual = __webpack_require__(342);
-exports.isEqual = isEqual;
-var isNumber = __webpack_require__(343);
-exports.isNumber = isNumber;
-var isObject = __webpack_require__(12);
-exports.isObject = isObject;
-var kebabCase = __webpack_require__(344);
-exports.kebabCase = kebabCase;
-var keys = __webpack_require__(26);
-exports.keys = keys;
-var map = __webpack_require__(346);
-exports.map = map;
-var mapValues = __webpack_require__(347);
-exports.mapValues = mapValues;
-var max = __webpack_require__(348);
-exports.max = max;
-var memoize = __webpack_require__(164);
-exports.memoize = memoize;
-var merge = __webpack_require__(349);
-exports.merge = merge;
-var omit = __webpack_require__(352);
-exports.omit = omit;
-var remove = __webpack_require__(356);
-exports.remove = remove;
-var throttle = __webpack_require__(359);
-exports.throttle = throttle;
-var union = __webpack_require__(362);
-exports.union = union;
+ * This function will defer callback of the specified callback lambda until the next JS tick, simulating standard A+ promise behavior
+ */
+function asyncCallback(callback) {
+ asyncCallbacks.push(callback);
+ if (asyncCallbacks.length === 1) {
+ // Start a callback for the next tick
+ if (useSetImmediate) {
+ setImmediate(resolveAsyncCallbacks);
+ }
+ else {
+ setTimeout(resolveAsyncCallbacks, 0);
+ }
+ }
+}
+exports.asyncCallback = asyncCallback;
+function resolveAsyncCallbacks() {
+ var savedCallbacks = asyncCallbacks;
+ asyncCallbacks = [];
+ for (var i = 0; i < savedCallbacks.length; i++) {
+ savedCallbacks[i]();
+ }
+}
+function Defer() {
+ return new Internal.SyncTask();
+}
+exports.Defer = Defer;
+function Resolved(val) {
+ return new Internal.SyncTask().resolve(val).promise();
+}
+exports.Resolved = Resolved;
+function Rejected(val) {
+ return new Internal.SyncTask().reject(val).promise();
+}
+exports.Rejected = Rejected;
+var Internal;
+(function (Internal) {
+ var SyncTask = (function () {
+ function SyncTask() {
+ this._completedSuccess = false;
+ this._completedFail = false;
+ this._traceEnabled = false;
+ this._cancelCallbacks = [];
+ this._wasCanceled = false;
+ this._resolving = false;
+ this._storedCallbackSets = [];
+ // 'Handled' just means there was a callback set added.
+ // Note: If that callback does not handle the error then that callback's task will be 'unhandled' instead of this one.
+ this._mustHandleError = true;
+ }
+ SyncTask.prototype._addCallbackSet = function (set, callbackWillChain) {
+ var task = new SyncTask();
+ task.onCancel(this.cancel.bind(this));
+ set.task = task;
+ this._storedCallbackSets.push(set);
+ if (callbackWillChain) {
+ // The callback inherits responsibility for "handling" errors.
+ this._mustHandleError = false;
+ }
+ else {
+ // The callback can never "handle" errors since nothing can chain to it.
+ task._mustHandleError = false;
+ }
+ // The _resolve* functions handle callbacks being added while they are running.
+ if (!this._resolving) {
+ if (this._completedSuccess) {
+ this._resolveSuccesses();
+ }
+ else if (this._completedFail) {
+ this._resolveFailures();
+ }
+ }
+ return task.promise();
+ };
+ SyncTask.prototype.onCancel = function (callback) {
+ // Only register cancel callback handler on promise that hasn't been completed
+ if (!this._completedSuccess && !this._completedFail) {
+ if (this._wasCanceled) {
+ callback(this._cancelContext);
+ }
+ else {
+ this._cancelCallbacks.push(callback);
+ }
+ }
+ return this;
+ };
+ SyncTask.prototype.then = function (successFunc, errorFunc) {
+ return this._addCallbackSet({
+ successFunc: successFunc,
+ failFunc: errorFunc
+ }, true);
+ };
+ SyncTask.prototype.thenAsync = function (successFunc, errorFunc) {
+ return this._addCallbackSet({
+ successFunc: successFunc,
+ failFunc: errorFunc,
+ asyncCallback: true
+ }, true);
+ };
+ SyncTask.prototype.catch = function (errorFunc) {
+ return this._addCallbackSet({
+ failFunc: errorFunc
+ }, true);
+ };
+ SyncTask.prototype.always = function (func) {
+ return this._addCallbackSet({
+ successFunc: func,
+ failFunc: func
+ }, true);
+ };
+ SyncTask.prototype.setTracingEnabled = function (enabled) {
+ this._traceEnabled = enabled;
+ return this;
+ };
+ // Finally should let you inspect the value of the promise as it passes through without affecting the then chaining
+ // i.e. a failed promise with a finally after it should then chain to the fail case of the next then
+ SyncTask.prototype.finally = function (func) {
+ this._addCallbackSet({
+ successFunc: func,
+ failFunc: func
+ }, false);
+ return this;
+ };
+ SyncTask.prototype.done = function (successFunc) {
+ this._addCallbackSet({
+ successFunc: successFunc
+ }, false);
+ return this;
+ };
+ SyncTask.prototype.fail = function (errorFunc) {
+ this._addCallbackSet({
+ failFunc: errorFunc
+ }, false);
+ return this;
+ };
+ SyncTask.prototype.resolve = function (obj) {
+ this._checkState(true);
+ this._completedSuccess = true;
+ this._storedResolution = obj;
+ this._resolveSuccesses();
+ return this;
+ };
+ SyncTask.prototype.reject = function (obj) {
+ this._checkState(false);
+ this._completedFail = true;
+ this._storedErrResolution = obj;
+ this._resolveFailures();
+ SyncTask._enforceErrorHandled(this);
+ return this;
+ };
+ SyncTask.prototype._checkState = function (resolve) {
+ if (this._completedSuccess || this._completedFail) {
+ if (this._completeStack) {
+ console.error(this._completeStack.message, this._completeStack.stack);
+ }
+ var message = 'Failed to ' + (resolve ? 'resolve' : 'reject') +
+ ': the task is already ' + (this._completedSuccess ? 'resolved' : 'rejected');
+ throw new Error(message);
+ }
+ if (exports.config.traceEnabled || this._traceEnabled) {
+ this._completeStack = new Error( true ? 'resolve' : 'reject');
+ }
+ };
+ // Make sure any rejected task has its failured handled.
+ SyncTask._enforceErrorHandled = function (task) {
+ if (!task._mustHandleError) {
+ return;
+ }
+ SyncTask._rejectedTasks.push(task);
+ // Wait for some async time in the future to check these tasks.
+ if (!SyncTask._enforceErrorHandledTimer) {
+ SyncTask._enforceErrorHandledTimer = setTimeout(function () {
+ SyncTask._enforceErrorHandledTimer = null;
+ var rejectedTasks = SyncTask._rejectedTasks;
+ SyncTask._rejectedTasks = [];
+ rejectedTasks.forEach(function (rejectedTask, i) {
+ if (rejectedTask._mustHandleError) {
+ // Unhandled!
+ exports.config.unhandledErrorHandler(rejectedTask._storedErrResolution);
+ }
+ });
+ }, 0);
+ }
+ };
+ SyncTask.prototype.cancel = function (context) {
+ var _this = this;
+ if (this._wasCanceled) {
+ throw new Error('Already Canceled');
+ }
+ this._wasCanceled = true;
+ this._cancelContext = context;
+ if (this._cancelCallbacks.length > 0) {
+ this._cancelCallbacks.forEach(function (callback) {
+ if (!_this._completedSuccess && !_this._completedFail) {
+ callback(_this._cancelContext);
+ }
+ });
+ }
+ };
+ SyncTask.prototype.promise = function () {
+ return this;
+ };
+ SyncTask.prototype._resolveSuccesses = function () {
+ var _this = this;
+ this._resolving = true;
+ // New callbacks can be added as the current callbacks run: use a loop to get through all of them.
+ while (this._storedCallbackSets.length) {
+ // Only iterate over the current list of callbacks.
+ var callbacks = this._storedCallbackSets;
+ this._storedCallbackSets = [];
+ callbacks.forEach(function (callback) {
+ if (callback.asyncCallback) {
+ asyncCallback(_this._resolveCallback.bind(_this, callback));
+ }
+ else {
+ _this._resolveCallback(callback);
+ }
+ });
+ }
+ this._resolving = false;
+ };
+ SyncTask.prototype._resolveCallback = function (callback) {
+ var _this = this;
+ if (callback.successFunc) {
+ run(function () {
+ var ret = callback.successFunc(_this._storedResolution);
+ if (isCancelable(ret)) {
+ _this._cancelCallbacks.push(ret.cancel.bind(ret));
+ if (_this._wasCanceled) {
+ ret.cancel(_this._cancelContext);
+ }
+ }
+ if (isThenable(ret)) {
+ // The success block of a then returned a new promise, so
+ ret.then(function (r) { callback.task.resolve(r); }, function (e) { callback.task.reject(e); });
+ }
+ else {
+ callback.task.resolve(ret);
+ }
+ }, function (e) {
+ _this._handleException(e, 'SyncTask caught exception in success block: ' + e.toString());
+ callback.task.reject(e);
+ });
+ }
+ else {
+ callback.task.resolve(this._storedResolution);
+ }
+ };
+ SyncTask.prototype._resolveFailures = function () {
+ var _this = this;
+ this._resolving = true;
+ // New callbacks can be added as the current callbacks run: use a loop to get through all of them.
+ while (this._storedCallbackSets.length) {
+ // Only iterate over the current list of callbacks.
+ var callbacks = this._storedCallbackSets;
+ this._storedCallbackSets = [];
+ callbacks.forEach(function (callback) {
+ if (callback.failFunc) {
+ run(function () {
+ var ret = callback.failFunc(_this._storedErrResolution);
+ if (isCancelable(ret)) {
+ _this._cancelCallbacks.push(ret.cancel.bind(ret));
+ if (_this._wasCanceled) {
+ ret.cancel(_this._cancelContext);
+ }
+ }
+ if (isThenable(ret)) {
+ ret.then(function (r) { callback.task.resolve(r); }, function (e) { callback.task.reject(e); });
+ }
+ else {
+ // The failure has been handled: ret is the resolved value.
+ callback.task.resolve(ret);
+ }
+ }, function (e) {
+ _this._handleException(e, 'SyncTask caught exception in failure block: ' + e.toString());
+ callback.task.reject(e);
+ });
+ }
+ else {
+ callback.task.reject(_this._storedErrResolution);
+ }
+ });
+ }
+ this._resolving = false;
+ };
+ SyncTask.prototype._handleException = function (e, message) {
+ if (exports.config.exceptionsToConsole) {
+ console.error(message);
+ }
+ if (exports.config.exceptionHandler) {
+ exports.config.exceptionHandler(e);
+ }
+ };
+ return SyncTask;
+ }());
+ SyncTask._rejectedTasks = [];
+ SyncTask._enforceErrorHandledTimer = null;
+ Internal.SyncTask = SyncTask;
+})(Internal || (Internal = {}));
+function all(items) {
+ if (items.length === 0) {
+ return Resolved([]);
+ }
+ var outTask = Defer();
+ var countRemaining = items.length;
+ var foundError = null;
+ var results = Array(items.length);
+ outTask.onCancel(function (val) {
+ items.forEach(function (item) {
+ if (isCancelable(item)) {
+ item.cancel(val);
+ }
+ });
+ });
+ var checkFinish = function () {
+ if (--countRemaining === 0) {
+ if (foundError !== null) {
+ outTask.reject(foundError);
+ }
+ else {
+ outTask.resolve(results);
+ }
+ }
+ };
+ items.forEach(function (item, index) {
+ if (isThenable(item)) {
+ var task = item;
+ task.then(function (res) {
+ results[index] = res;
+ checkFinish();
+ }, function (err) {
+ if (foundError === null) {
+ foundError = (err !== null) ? err : true;
+ }
+ checkFinish();
+ });
+ }
+ else {
+ // Not a task, so resolve directly with the item
+ results[index] = item;
+ checkFinish();
+ }
+ });
+ return outTask.promise();
+}
+exports.all = all;
+function race(items) {
+ var outTask = Defer();
+ var hasSettled = false;
+ outTask.onCancel(function (val) {
+ items.forEach(function (item) {
+ if (isCancelable(item)) {
+ item.cancel(val);
+ }
+ });
+ });
+ items.forEach(function (item) {
+ if (isThenable(item)) {
+ var task = item;
+ task.then(function (res) {
+ if (!hasSettled) {
+ hasSettled = true;
+ outTask.resolve(res);
+ }
+ }, function (err) {
+ if (!hasSettled) {
+ hasSettled = true;
+ outTask.reject(err);
+ }
+ });
+ }
+ else {
+ // Not a task, so resolve directly with the item
+ if (!hasSettled) {
+ hasSettled = true;
+ outTask.resolve(item);
+ }
+ }
+ });
+ return outTask.promise();
+}
+exports.race = race;
+function raceTimer(promise, timeMs) {
+ var timerDef = Defer();
+ var token = setTimeout(function () {
+ timerDef.resolve({ timedOut: true });
+ }, timeMs);
+ var adaptedPromise = promise.then(function (resp) {
+ clearTimeout(token);
+ return { timedOut: false, result: resp };
+ });
+ return race([adaptedPromise, timerDef.promise()]);
+}
+exports.raceTimer = raceTimer;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(269).setImmediate))
/***/ }),
-/* 10 */
+/* 12 */
/***/ (function(module, exports) {
/**
@@ -1197,18 +2173,265 @@ module.exports = isArray;
/***/ }),
-/* 11 */
+/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
-module.exports = __webpack_require__(380);
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-/***/ }),
-/* 12 */
-/***/ (function(module, exports) {
+/**
+ * Simple, lightweight module assisting with the detection and context of
+ * Worker. Helps avoid circular dependencies and allows code to reason about
+ * whether or not they are in a Worker, even if they never include the main
+ * `ReactWorker` dependency.
+ */
+var ExecutionEnvironment = {
+
+ canUseDOM: canUseDOM,
+
+ canUseWorkers: typeof Worker !== 'undefined',
+
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
+
+ canUseViewport: canUseDOM && !!window.screen,
+
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
+
+};
+
+module.exports = ExecutionEnvironment;
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* lodashMini.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Import and re-export of part of the lodash module. This helps reduce bundle size.
+*/
+
+var assign = __webpack_require__(116);
+exports.assign = assign;
+var clone = __webpack_require__(46);
+exports.clone = clone;
+var cloneDeep = __webpack_require__(117);
+exports.cloneDeep = cloneDeep;
+var defer = __webpack_require__(118);
+exports.defer = defer;
+var each = __webpack_require__(119);
+exports.each = each;
+var endsWith = __webpack_require__(120);
+exports.endsWith = endsWith;
+var extend = __webpack_require__(76);
+exports.extend = extend;
+var filter = __webpack_require__(47);
+exports.filter = filter;
+var findIndex = __webpack_require__(121);
+exports.findIndex = findIndex;
+var findLast = __webpack_require__(122);
+exports.findLast = findLast;
+var flatten = __webpack_require__(77);
+exports.flatten = flatten;
+var get = __webpack_require__(78);
+exports.get = get;
+var isArray = __webpack_require__(12);
+exports.isArray = isArray;
+var isEmpty = __webpack_require__(123);
+exports.isEmpty = isEmpty;
+var isEqual = __webpack_require__(124);
+exports.isEqual = isEqual;
+var isNumber = __webpack_require__(127);
+exports.isNumber = isNumber;
+var isObject = __webpack_require__(17);
+exports.isObject = isObject;
+var kebabCase = __webpack_require__(128);
+exports.kebabCase = kebabCase;
+var keys = __webpack_require__(28);
+exports.keys = keys;
+var map = __webpack_require__(129);
+exports.map = map;
+var mapValues = __webpack_require__(130);
+exports.mapValues = mapValues;
+var max = __webpack_require__(131);
+exports.max = max;
+var memoize = __webpack_require__(80);
+exports.memoize = memoize;
+var merge = __webpack_require__(132);
+exports.merge = merge;
+var omit = __webpack_require__(133);
+exports.omit = omit;
+var remove = __webpack_require__(135);
+exports.remove = remove;
+var throttle = __webpack_require__(137);
+exports.throttle = throttle;
+var union = __webpack_require__(139);
+exports.union = union;
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* lodashMini.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Import and re-export of part of the lodash module. This helps reduce bundle size.
+*/
+
+var assign = __webpack_require__(116);
+exports.assign = assign;
+var clone = __webpack_require__(46);
+exports.clone = clone;
+var cloneDeep = __webpack_require__(117);
+exports.cloneDeep = cloneDeep;
+var defer = __webpack_require__(118);
+exports.defer = defer;
+var each = __webpack_require__(119);
+exports.each = each;
+var endsWith = __webpack_require__(120);
+exports.endsWith = endsWith;
+var extend = __webpack_require__(76);
+exports.extend = extend;
+var filter = __webpack_require__(47);
+exports.filter = filter;
+var findIndex = __webpack_require__(121);
+exports.findIndex = findIndex;
+var findLast = __webpack_require__(122);
+exports.findLast = findLast;
+var flatten = __webpack_require__(77);
+exports.flatten = flatten;
+var get = __webpack_require__(78);
+exports.get = get;
+var isArray = __webpack_require__(12);
+exports.isArray = isArray;
+var isEmpty = __webpack_require__(123);
+exports.isEmpty = isEmpty;
+var isEqual = __webpack_require__(124);
+exports.isEqual = isEqual;
+var isNumber = __webpack_require__(127);
+exports.isNumber = isNumber;
+var isObject = __webpack_require__(17);
+exports.isObject = isObject;
+var kebabCase = __webpack_require__(128);
+exports.kebabCase = kebabCase;
+var keys = __webpack_require__(28);
+exports.keys = keys;
+var map = __webpack_require__(129);
+exports.map = map;
+var mapValues = __webpack_require__(130);
+exports.mapValues = mapValues;
+var max = __webpack_require__(131);
+exports.max = max;
+var memoize = __webpack_require__(80);
+exports.memoize = memoize;
+var merge = __webpack_require__(132);
+exports.merge = merge;
+var omit = __webpack_require__(133);
+exports.omit = omit;
+var remove = __webpack_require__(135);
+exports.remove = remove;
+var throttle = __webpack_require__(137);
+exports.throttle = throttle;
+var union = __webpack_require__(139);
+exports.union = union;
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* lodashMini.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Import and re-export of part of the lodash module. This helps reduce bundle size.
+*/
+
+var assign = __webpack_require__(116);
+exports.assign = assign;
+var clone = __webpack_require__(46);
+exports.clone = clone;
+var cloneDeep = __webpack_require__(117);
+exports.cloneDeep = cloneDeep;
+var defer = __webpack_require__(118);
+exports.defer = defer;
+var each = __webpack_require__(119);
+exports.each = each;
+var endsWith = __webpack_require__(120);
+exports.endsWith = endsWith;
+var extend = __webpack_require__(76);
+exports.extend = extend;
+var filter = __webpack_require__(47);
+exports.filter = filter;
+var findIndex = __webpack_require__(121);
+exports.findIndex = findIndex;
+var findLast = __webpack_require__(122);
+exports.findLast = findLast;
+var flatten = __webpack_require__(77);
+exports.flatten = flatten;
+var get = __webpack_require__(78);
+exports.get = get;
+var isArray = __webpack_require__(12);
+exports.isArray = isArray;
+var isEmpty = __webpack_require__(123);
+exports.isEmpty = isEmpty;
+var isEqual = __webpack_require__(124);
+exports.isEqual = isEqual;
+var isNumber = __webpack_require__(127);
+exports.isNumber = isNumber;
+var isObject = __webpack_require__(17);
+exports.isObject = isObject;
+var kebabCase = __webpack_require__(128);
+exports.kebabCase = kebabCase;
+var keys = __webpack_require__(28);
+exports.keys = keys;
+var map = __webpack_require__(129);
+exports.map = map;
+var mapValues = __webpack_require__(130);
+exports.mapValues = mapValues;
+var max = __webpack_require__(131);
+exports.max = max;
+var memoize = __webpack_require__(80);
+exports.memoize = memoize;
+var merge = __webpack_require__(132);
+exports.merge = merge;
+var omit = __webpack_require__(133);
+exports.omit = omit;
+var remove = __webpack_require__(135);
+exports.remove = remove;
+var throttle = __webpack_require__(137);
+exports.throttle = throttle;
+var union = __webpack_require__(139);
+exports.union = union;
+
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports) {
/**
* Checks if `value` is the
@@ -1244,7 +2467,7 @@ module.exports = isObject;
/***/ }),
-/* 13 */
+/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1261,12 +2484,12 @@ module.exports = isObject;
-var _prodInvariant = __webpack_require__(32);
+var _prodInvariant = __webpack_require__(53);
-var ReactCurrentOwner = __webpack_require__(20);
+var ReactCurrentOwner = __webpack_require__(30);
-var invariant = __webpack_require__(1);
-var warning = __webpack_require__(2);
+var invariant = __webpack_require__(3);
+var warning = __webpack_require__(4);
function isNative(fn) {
// Based on isNative() from Lodash
@@ -1274,11 +2497,11 @@ function isNative(fn) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
var reIsNative = RegExp('^' + funcToString
// Take an example native function source for comparison
- .call(hasOwnProperty)
+ .call(hasOwnProperty
// Strip regex characters so we can use it for regex
- .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
// Remove hasOwnProperty from the template to make it generic
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
+ ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
try {
var source = funcToString.call(fn);
return reIsNative.test(source);
@@ -1577,14 +2800,59 @@ var ReactComponentTreeHook = {
getRootIDs: getRootIDs,
- getRegisteredIDs: getItemIDs
+ getRegisteredIDs: getItemIDs,
+
+ pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
+ if (typeof console.reactStack !== 'function') {
+ return;
+ }
+
+ var stack = [];
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ try {
+ if (isCreatingElement) {
+ stack.push({
+ name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
+ fileName: currentSource ? currentSource.fileName : null,
+ lineNumber: currentSource ? currentSource.lineNumber : null
+ });
+ }
+
+ while (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ var parentID = ReactComponentTreeHook.getParentID(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
+ var source = element && element._source;
+ stack.push({
+ name: ownerName,
+ fileName: source ? source.fileName : null,
+ lineNumber: source ? source.lineNumber : null
+ });
+ id = parentID;
+ }
+ } catch (err) {
+ // Internal state is messed up.
+ // Stop building the stack (it's just a nice to have).
+ }
+
+ console.reactStack(stack);
+ },
+ popNonStandardWarningStack: function () {
+ if (typeof console.reactStackEnd !== 'function') {
+ return;
+ }
+ console.reactStackEnd();
+ }
};
module.exports = ReactComponentTreeHook;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 14 */
+/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1597,7 +2865,7 @@ module.exports = ReactComponentTreeHook;
* Type definitions for ReactXP framework.
*/
-var SubscribableEvent_1 = __webpack_require__(114);
+var SubscribableEvent_1 = __webpack_require__(157);
exports.SubscribableEvent = SubscribableEvent_1.SubscribableEvent;
exports.SubscriptionToken = SubscribableEvent_1.SubscriptionToken;
// Auto, Yes, No - iOS & Android.
@@ -1664,7 +2932,6 @@ var AccessibilityTrait;
// is the highest priority trait.
AccessibilityTrait[AccessibilityTrait["None"] = 32] = "None";
})(AccessibilityTrait = exports.AccessibilityTrait || (exports.AccessibilityTrait = {}));
-;
var GestureMouseCursor;
(function (GestureMouseCursor) {
GestureMouseCursor[GestureMouseCursor["Default"] = 0] = "Default";
@@ -1716,7 +2983,6 @@ var LocationErrorType;
// ----------------------------------------------------------------------
var Animated;
(function (Animated) {
- ;
})(Animated = exports.Animated || (exports.Animated = {}));
var LinkingErrorCode;
(function (LinkingErrorCode) {
@@ -1737,7 +3003,7 @@ var AppActivationState;
/***/ }),
-/* 15 */
+/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1755,9 +3021,9 @@ var __extends = (this && this.__extends) || function (d, b) {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-var _ = __webpack_require__(9);
-var RX = __webpack_require__(4);
-var StyleLeakDetector_1 = __webpack_require__(457);
+var _ = __webpack_require__(14);
+var RX = __webpack_require__(6);
+var StyleLeakDetector_1 = __webpack_require__(508);
var Styles = (function (_super) {
__extends(Styles, _super);
function Styles() {
@@ -2102,403 +3368,1476 @@ exports.default = new Styles();
/***/ }),
-/* 16 */
+/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright 2016-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-
-
-// Trust the developer to only use ReactInstrumentation with a __DEV__ check
-
-var debugTool = null;
+/**
+* Types.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Type definitions for ReactXP framework.
+*/
-if (process.env.NODE_ENV !== 'production') {
- var ReactDebugTool = __webpack_require__(174);
- debugTool = ReactDebugTool;
-}
+var SubscribableEvent_1 = __webpack_require__(161);
+exports.SubscribableEvent = SubscribableEvent_1.SubscribableEvent;
+exports.SubscriptionToken = SubscribableEvent_1.SubscriptionToken;
+// Auto, Yes, No - iOS & Android.
+// NoHideDescendants - iOS, Android, & Desktop.
+var ImportantForAccessibility;
+(function (ImportantForAccessibility) {
+ ImportantForAccessibility[ImportantForAccessibility["Auto"] = 1] = "Auto";
+ ImportantForAccessibility[ImportantForAccessibility["Yes"] = 2] = "Yes";
+ ImportantForAccessibility[ImportantForAccessibility["No"] = 3] = "No";
+ ImportantForAccessibility[ImportantForAccessibility["NoHideDescendants"] = 4] = "NoHideDescendants";
+})(ImportantForAccessibility = exports.ImportantForAccessibility || (exports.ImportantForAccessibility = {}));
+// Android & Desktop supported prop, which allows screen-reader to inform its users when a
+// component has dynamically changed. For example, the content of an inApp toast.
+var AccessibilityLiveRegion;
+(function (AccessibilityLiveRegion) {
+ AccessibilityLiveRegion[AccessibilityLiveRegion["None"] = 0] = "None";
+ AccessibilityLiveRegion[AccessibilityLiveRegion["Polite"] = 1] = "Polite";
+ AccessibilityLiveRegion[AccessibilityLiveRegion["Assertive"] = 2] = "Assertive";
+})(AccessibilityLiveRegion = exports.AccessibilityLiveRegion || (exports.AccessibilityLiveRegion = {}));
+// NOTE: This enum is organized based on priority of these traits (0 is the lowest),
+// which can be assigned to an accessible object. On native, all traits are combined as
+// a list. On desktop, trait with the maximum value is picked. Whenever you are adding
+// a new trait add it in the right priority order in the list.
+var AccessibilityTrait;
+(function (AccessibilityTrait) {
+ // Desktop and iOS.
+ AccessibilityTrait[AccessibilityTrait["Summary"] = 0] = "Summary";
+ AccessibilityTrait[AccessibilityTrait["Adjustable"] = 1] = "Adjustable";
+ // Desktop, iOS, and Android.
+ AccessibilityTrait[AccessibilityTrait["Button"] = 2] = "Button";
+ AccessibilityTrait[AccessibilityTrait["Tab"] = 3] = "Tab";
+ AccessibilityTrait[AccessibilityTrait["Selected"] = 4] = "Selected";
+ // Android only.
+ AccessibilityTrait[AccessibilityTrait["Radio_button_checked"] = 5] = "Radio_button_checked";
+ AccessibilityTrait[AccessibilityTrait["Radio_button_unchecked"] = 6] = "Radio_button_unchecked";
+ // iOS only.
+ AccessibilityTrait[AccessibilityTrait["Link"] = 7] = "Link";
+ AccessibilityTrait[AccessibilityTrait["Header"] = 8] = "Header";
+ AccessibilityTrait[AccessibilityTrait["Search"] = 9] = "Search";
+ AccessibilityTrait[AccessibilityTrait["Image"] = 10] = "Image";
+ AccessibilityTrait[AccessibilityTrait["Plays"] = 11] = "Plays";
+ AccessibilityTrait[AccessibilityTrait["Key"] = 12] = "Key";
+ AccessibilityTrait[AccessibilityTrait["Text"] = 13] = "Text";
+ AccessibilityTrait[AccessibilityTrait["Disabled"] = 14] = "Disabled";
+ AccessibilityTrait[AccessibilityTrait["FrequentUpdates"] = 15] = "FrequentUpdates";
+ AccessibilityTrait[AccessibilityTrait["StartsMedia"] = 16] = "StartsMedia";
+ AccessibilityTrait[AccessibilityTrait["AllowsDirectInteraction"] = 17] = "AllowsDirectInteraction";
+ AccessibilityTrait[AccessibilityTrait["PageTurn"] = 18] = "PageTurn";
+ // Desktop only.
+ AccessibilityTrait[AccessibilityTrait["Menu"] = 19] = "Menu";
+ AccessibilityTrait[AccessibilityTrait["MenuItem"] = 20] = "MenuItem";
+ AccessibilityTrait[AccessibilityTrait["MenuBar"] = 21] = "MenuBar";
+ AccessibilityTrait[AccessibilityTrait["TabList"] = 22] = "TabList";
+ AccessibilityTrait[AccessibilityTrait["List"] = 23] = "List";
+ AccessibilityTrait[AccessibilityTrait["ListItem"] = 24] = "ListItem";
+ AccessibilityTrait[AccessibilityTrait["ListBox"] = 25] = "ListBox";
+ AccessibilityTrait[AccessibilityTrait["Group"] = 26] = "Group";
+ AccessibilityTrait[AccessibilityTrait["CheckBox"] = 27] = "CheckBox";
+ AccessibilityTrait[AccessibilityTrait["ComboBox"] = 28] = "ComboBox";
+ AccessibilityTrait[AccessibilityTrait["Log"] = 29] = "Log";
+ AccessibilityTrait[AccessibilityTrait["Status"] = 30] = "Status";
+ AccessibilityTrait[AccessibilityTrait["Dialog"] = 31] = "Dialog";
+ // Desktop & mobile. This is at the end because this
+ // is the highest priority trait.
+ AccessibilityTrait[AccessibilityTrait["None"] = 32] = "None";
+})(AccessibilityTrait = exports.AccessibilityTrait || (exports.AccessibilityTrait = {}));
+var GestureMouseCursor;
+(function (GestureMouseCursor) {
+ GestureMouseCursor[GestureMouseCursor["Default"] = 0] = "Default";
+ GestureMouseCursor[GestureMouseCursor["Pointer"] = 1] = "Pointer";
+ GestureMouseCursor[GestureMouseCursor["Grab"] = 2] = "Grab";
+ GestureMouseCursor[GestureMouseCursor["Move"] = 3] = "Move";
+})(GestureMouseCursor = exports.GestureMouseCursor || (exports.GestureMouseCursor = {}));
+var PreferredPanGesture;
+(function (PreferredPanGesture) {
+ PreferredPanGesture[PreferredPanGesture["Horizontal"] = 0] = "Horizontal";
+ PreferredPanGesture[PreferredPanGesture["Vertical"] = 1] = "Vertical";
+})(PreferredPanGesture = exports.PreferredPanGesture || (exports.PreferredPanGesture = {}));
+var WebViewSandboxMode;
+(function (WebViewSandboxMode) {
+ WebViewSandboxMode[WebViewSandboxMode["None"] = 0] = "None";
+ WebViewSandboxMode[WebViewSandboxMode["AllowForms"] = 1] = "AllowForms";
+ WebViewSandboxMode[WebViewSandboxMode["AllowModals"] = 2] = "AllowModals";
+ WebViewSandboxMode[WebViewSandboxMode["AllowOrientationLock"] = 4] = "AllowOrientationLock";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPointerLock"] = 8] = "AllowPointerLock";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPopups"] = 16] = "AllowPopups";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPopupsToEscapeSandbox"] = 32] = "AllowPopupsToEscapeSandbox";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPresentation"] = 64] = "AllowPresentation";
+ WebViewSandboxMode[WebViewSandboxMode["AllowSameOrigin"] = 128] = "AllowSameOrigin";
+ WebViewSandboxMode[WebViewSandboxMode["AllowScripts"] = 256] = "AllowScripts";
+ WebViewSandboxMode[WebViewSandboxMode["AllowTopNavigation"] = 512] = "AllowTopNavigation";
+})(WebViewSandboxMode = exports.WebViewSandboxMode || (exports.WebViewSandboxMode = {}));
+//
+// Navigator
+// ----------------------------------------------------------------------
+var NavigatorSceneConfigType;
+(function (NavigatorSceneConfigType) {
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromRight"] = 0] = "FloatFromRight";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromLeft"] = 1] = "FloatFromLeft";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromBottom"] = 2] = "FloatFromBottom";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["Fade"] = 3] = "Fade";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FadeWithSlide"] = 4] = "FadeWithSlide";
+})(NavigatorSceneConfigType = exports.NavigatorSceneConfigType || (exports.NavigatorSceneConfigType = {}));
+//
+// Location
+// ----------------------------------------------------------------------
+var LocationErrorType;
+(function (LocationErrorType) {
+ LocationErrorType[LocationErrorType["PermissionDenied"] = 1] = "PermissionDenied";
+ LocationErrorType[LocationErrorType["PositionUnavailable"] = 2] = "PositionUnavailable";
+ LocationErrorType[LocationErrorType["Timeout"] = 3] = "Timeout";
+})(LocationErrorType = exports.LocationErrorType || (exports.LocationErrorType = {}));
+//
+// Animated
+// ----------------------------------------------------------------------
+var Animated;
+(function (Animated) {
+})(Animated = exports.Animated || (exports.Animated = {}));
+var LinkingErrorCode;
+(function (LinkingErrorCode) {
+ LinkingErrorCode[LinkingErrorCode["NoAppFound"] = 0] = "NoAppFound";
+ LinkingErrorCode[LinkingErrorCode["UnexpectedFailure"] = 1] = "UnexpectedFailure";
+ LinkingErrorCode[LinkingErrorCode["Blocked"] = 2] = "Blocked";
+ LinkingErrorCode[LinkingErrorCode["InitialUrlNotFound"] = 3] = "InitialUrlNotFound";
+})(LinkingErrorCode = exports.LinkingErrorCode || (exports.LinkingErrorCode = {}));
+//
+// App
+// ----------------------------------------------------------------------
+var AppActivationState;
+(function (AppActivationState) {
+ AppActivationState[AppActivationState["Active"] = 1] = "Active";
+ AppActivationState[AppActivationState["Background"] = 2] = "Background";
+ AppActivationState[AppActivationState["Inactive"] = 3] = "Inactive";
+})(AppActivationState = exports.AppActivationState || (exports.AppActivationState = {}));
-module.exports = { debugTool: debugTool };
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 17 */
+/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-function makeEmptyFunction(arg) {
- return function () {
- return arg;
- };
-}
-
-/**
- * This function accepts and discards inputs; it has no side effects. This is
- * primarily useful idiomatically for overridable function endpoints which
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
- */
-var emptyFunction = function emptyFunction() {};
+* Styles.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of style functions.
+*/
-emptyFunction.thatReturns = makeEmptyFunction;
-emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
-emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
-emptyFunction.thatReturnsNull = makeEmptyFunction(null);
-emptyFunction.thatReturnsThis = function () {
- return this;
-};
-emptyFunction.thatReturnsArgument = function (arg) {
- return arg;
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-
-module.exports = emptyFunction;
-
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var freeGlobal = __webpack_require__(145);
-
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
-/** Used as a reference to the global object. */
-var root = freeGlobal || freeSelf || Function('return this')();
-
-module.exports = root;
-
-
-/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var _prodInvariant = __webpack_require__(3),
- _assign = __webpack_require__(5);
-
-var CallbackQueue = __webpack_require__(170);
-var PooledClass = __webpack_require__(30);
-var ReactFeatureFlags = __webpack_require__(176);
-var ReactReconciler = __webpack_require__(38);
-var Transaction = __webpack_require__(67);
-
-var invariant = __webpack_require__(1);
-
-var dirtyComponents = [];
-var updateBatchNumber = 0;
-var asapCallbackQueue = CallbackQueue.getPooled();
-var asapEnqueued = false;
-
-var batchingStrategy = null;
-
-function ensureInjected() {
- !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
-}
-
-var NESTED_UPDATES = {
- initialize: function () {
- this.dirtyComponentsLength = dirtyComponents.length;
- },
- close: function () {
- if (this.dirtyComponentsLength !== dirtyComponents.length) {
- // Additional updates were enqueued by componentDidUpdate handlers or
- // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
- // these new updates so that if A's componentDidUpdate calls setState on
- // B, B will update before the callback A's updater provided when calling
- // setState.
- dirtyComponents.splice(0, this.dirtyComponentsLength);
- flushBatchedUpdates();
- } else {
- dirtyComponents.length = 0;
+var _ = __webpack_require__(15);
+var RX = __webpack_require__(7);
+var StyleLeakDetector_1 = __webpack_require__(550);
+var Styles = (function (_super) {
+ __extends(Styles, _super);
+ function Styles() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ // Use memoize to cache the result after the first call.
+ _this._createDummyElement = _.memoize(function () {
+ return document.createElement('testCss');
+ });
+ _this._getCssPropertyAliasesJsStyle = _.memoize(function () {
+ var props = [
+ 'flex',
+ 'flexDirection',
+ 'alignItems',
+ 'justifyContent',
+ 'alignSelf',
+ 'transform',
+ 'transition',
+ 'animationDuration',
+ 'animationTimingFunction',
+ 'animationDirection',
+ 'animationDelay',
+ 'animationIterationCount',
+ 'animationName',
+ 'hyphens',
+ 'filter',
+ 'appRegion'
+ ];
+ var aliases = {};
+ props.forEach(function (prop) {
+ var alias = _this._getCssPropertyAlias(prop);
+ if (prop !== alias) {
+ aliases[prop] = alias;
+ }
+ });
+ return aliases;
+ });
+ _this.getCssPropertyAliasesCssStyle = memoize(function () {
+ var jsStyleAliases = _this._getCssPropertyAliasesJsStyle();
+ var aliases = {};
+ _.each(_.keys(jsStyleAliases), function (prop) {
+ aliases[prop] = _this._convertJsToCssStyle(jsStyleAliases[prop]);
+ });
+ return aliases;
+ });
+ return _this;
}
- }
-};
-
-var UPDATE_QUEUEING = {
- initialize: function () {
- this.callbackQueue.reset();
- },
- close: function () {
- this.callbackQueue.notifyAll();
- }
-};
-
-var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
-
-function ReactUpdatesFlushTransaction() {
- this.reinitializeTransaction();
- this.dirtyComponentsLength = null;
- this.callbackQueue = CallbackQueue.getPooled();
- this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
- /* useCreateElement */true);
-}
-
-_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
- getTransactionWrappers: function () {
- return TRANSACTION_WRAPPERS;
- },
-
- destructor: function () {
- this.dirtyComponentsLength = null;
- CallbackQueue.release(this.callbackQueue);
- this.callbackQueue = null;
- ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
- this.reconcileTransaction = null;
- },
-
- perform: function (method, scope, a) {
- // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
- // with this transaction's wrappers around it.
- return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
- }
-});
-
-PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
-
-function batchedUpdates(callback, a, b, c, d, e) {
- ensureInjected();
- return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
-}
-
-/**
- * Array comparator for ReactComponents by mount ordering.
- *
- * @param {ReactComponent} c1 first component you're comparing
- * @param {ReactComponent} c2 second component you're comparing
- * @return {number} Return value usable by Array.prototype.sort().
- */
-function mountOrderComparator(c1, c2) {
- return c1._mountOrder - c2._mountOrder;
-}
-
-function runBatchedUpdates(transaction) {
- var len = transaction.dirtyComponentsLength;
- !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
-
- // Since reconciling a component higher in the owner hierarchy usually (not
- // always -- see shouldComponentUpdate()) will reconcile children, reconcile
- // them before their children by sorting the array.
- dirtyComponents.sort(mountOrderComparator);
-
- // Any updates enqueued while reconciling must be performed after this entire
- // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
- // C, B could update twice in a single batch if C's render enqueues an update
- // to B (since B would have already updated, we should skip it, and the only
- // way we can know to do so is by checking the batch counter).
- updateBatchNumber++;
-
- for (var i = 0; i < len; i++) {
- // If a component is unmounted before pending changes apply, it will still
- // be here, but we assume that it has cleared its _pendingCallbacks and
- // that performUpdateIfNecessary is a noop.
- var component = dirtyComponents[i];
-
- // If performUpdateIfNecessary happens to enqueue any new updates, we
- // shouldn't execute the callbacks until the next render happens, so
- // stash the callbacks first
- var callbacks = component._pendingCallbacks;
- component._pendingCallbacks = null;
-
- var markerName;
- if (ReactFeatureFlags.logTopLevelRenders) {
- var namedComponent = component;
- // Duck type TopLevelWrapper. This is probably always true.
- if (component._currentElement.type.isReactTopLevelWrapper) {
- namedComponent = component._renderedComponent;
- }
- markerName = 'React update: ' + namedComponent.getName();
- console.time(markerName);
- }
-
- ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
-
- if (markerName) {
- console.timeEnd(markerName);
- }
-
- if (callbacks) {
- for (var j = 0; j < callbacks.length; j++) {
- transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
- }
- }
- }
-}
-
-var flushBatchedUpdates = function () {
- // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
- // array and perform any updates enqueued by mount-ready handlers (i.e.,
- // componentDidUpdate) but we need to check here too in order to catch
- // updates enqueued by setState callbacks and asap calls.
- while (dirtyComponents.length || asapEnqueued) {
- if (dirtyComponents.length) {
- var transaction = ReactUpdatesFlushTransaction.getPooled();
- transaction.perform(runBatchedUpdates, null, transaction);
- ReactUpdatesFlushTransaction.release(transaction);
- }
-
- if (asapEnqueued) {
- asapEnqueued = false;
- var queue = asapCallbackQueue;
- asapCallbackQueue = CallbackQueue.getPooled();
- queue.notifyAll();
- CallbackQueue.release(queue);
- }
- }
-};
-
-/**
- * Mark a component as needing a rerender, adding an optional callback to a
- * list of functions which will be executed once the rerender occurs.
- */
-function enqueueUpdate(component) {
- ensureInjected();
-
- // Various parts of our code (such as ReactCompositeComponent's
- // _renderValidatedComponent) assume that calls to render aren't nested;
- // verify that that's the case. (This is called by each top-level update
- // function, like setState, forceUpdate, etc.; creation and
- // destruction of top-level components is guarded in ReactMount.)
-
- if (!batchingStrategy.isBatchingUpdates) {
- batchingStrategy.batchedUpdates(enqueueUpdate, component);
- return;
- }
-
- dirtyComponents.push(component);
- if (component._updateBatchNumber == null) {
- component._updateBatchNumber = updateBatchNumber + 1;
- }
-}
-
-/**
- * Enqueue a callback to be run at the end of the current batching cycle. Throws
- * if no updates are currently being performed.
- */
-function asap(callback, context) {
- !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
- asapCallbackQueue.enqueue(callback, context);
- asapEnqueued = true;
+ // Combines a set of styles
+ Styles.prototype.combine = function (defaultStyle, ruleSet) {
+ var combinedStyles = {};
+ if (defaultStyle) {
+ combinedStyles = _.extend(combinedStyles, defaultStyle);
+ }
+ if (ruleSet) {
+ combinedStyles = _.extend.apply(_, [combinedStyles].concat(ruleSet));
+ }
+ if ((combinedStyles.marginLeft !== undefined || combinedStyles.marginRight !== undefined ||
+ combinedStyles.marginTop !== undefined || combinedStyles.marginBottom !== undefined) &&
+ combinedStyles.margin !== undefined) {
+ console.error('Conflicting rules for margin specified.');
+ delete combinedStyles.margin;
+ }
+ if ((combinedStyles.paddingLeft !== undefined || combinedStyles.paddingRight !== undefined ||
+ combinedStyles.paddingTop !== undefined || combinedStyles.paddingBottom !== undefined) &&
+ combinedStyles.padding !== undefined) {
+ console.error('Conflicting rules for padding specified.');
+ delete combinedStyles.padding;
+ }
+ return combinedStyles;
+ };
+ // Creates opaque styles that can be used for View
+ Styles.prototype.createViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for View
+ Styles.prototype.createAnimatedViewStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for ScrollView
+ Styles.prototype.createScrollViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Button
+ Styles.prototype.createButtonStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for WebView
+ Styles.prototype.createWebViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Text
+ Styles.prototype.createTextStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Text
+ Styles.prototype.createAnimatedTextStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for TextInput
+ Styles.prototype.createTextInputStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for TextInput
+ Styles.prototype.createAnimatedTextInputStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for Link
+ Styles.prototype.createLinkStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Image
+ Styles.prototype.createImageStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Image
+ Styles.prototype.createAnimatedImageStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for Picker
+ Styles.prototype.createPickerStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Returns the name of a CSS property or its alias. Returns null if the property is not supported.
+ Styles.prototype._getCssPropertyAlias = function (name) {
+ // If we're inside unit tests, document may not be defined yet. We don't need prefixes for tests
+ if (typeof document === 'undefined') {
+ return null;
+ }
+ var upperName = name.charAt(0).toUpperCase() + name.slice(1);
+ var propsToTest = [name, upperName];
+ propsToTest = propsToTest.concat(['Webkit', 'webkit', 'Moz', 'O', 'ms'].map(function (prefix) { return prefix + upperName; }));
+ var testElement = this._createDummyElement();
+ var styleObj = testElement.style;
+ for (var i = 0; i < propsToTest.length; i++) {
+ var prop = propsToTest[i];
+ if (styleObj[prop] !== undefined) {
+ return prop;
+ }
+ }
+ return null;
+ };
+ // Converts a property from JavaScript style (camel-case) to CSS style (lowercase with hyphens).
+ Styles.prototype._convertJsToCssStyle = function (prop) {
+ var cssString = '';
+ if (prop) {
+ for (var i = 0; i < prop.length; i++) {
+ var lowerChar = prop[i].toLowerCase();
+ if (lowerChar === prop[i]) {
+ cssString += lowerChar;
+ }
+ else {
+ cssString += '-' + lowerChar;
+ }
+ }
+ }
+ return cssString;
+ };
+ Styles.prototype.getParentComponentName = function (component) {
+ var parentConstructor;
+ var internalInstance = component['_reactInternalInstance'];
+ if (internalInstance && internalInstance._currentElement &&
+ internalInstance._currentElement._owner && internalInstance._currentElement._owner._instance) {
+ parentConstructor = internalInstance._currentElement._owner._instance.constructor;
+ }
+ if (!parentConstructor) {
+ return '';
+ }
+ return parentConstructor.name ? parentConstructor.name : parentConstructor;
+ };
+ Styles.prototype._adaptStyles = function (def, validate) {
+ if (validate) {
+ StyleLeakDetector_1.default.detectLeaks(def);
+ }
+ // Expand composite types.
+ if (def.font) {
+ if (def.font.fontFamily !== undefined) {
+ def.fontFamily = def.font.fontFamily;
+ }
+ if (def.font.fontWeight !== undefined) {
+ def.fontWeight = def.font.fontWeight;
+ }
+ if (def.font.fontStyle !== undefined) {
+ def.fontStyle = def.font.fontStyle;
+ }
+ delete def.font;
+ }
+ if (def.flex !== undefined) {
+ var flexValue = def.flex;
+ delete def.flex;
+ if (flexValue > 0) {
+ def.flex = flexValue.toString() + ' 1 auto';
+ }
+ else if (flexValue < 0) {
+ def.flex = '0 1 auto';
+ }
+ else {
+ def.flex = '0 0 auto';
+ }
+ }
+ if (def.transform) {
+ var transformStrings_1 = [];
+ var animatedTransforms_1 = [];
+ _.each(def.transform, function (t) {
+ _.each(_.keys(t), function (key) {
+ // Animated transforms use AnimatedValue objects rather
+ // than strings. We need to store these separately.
+ if (typeof t[key] === 'object') {
+ animatedTransforms_1.push({ type: key, value: t[key] });
+ }
+ else {
+ var value = t[key].toString();
+ if (key.indexOf('rotate') === 0) {
+ value += 'deg';
+ }
+ else if (key.indexOf('translate') === 0) {
+ value += 'px';
+ }
+ transformStrings_1.push(key + '(' + value + ')');
+ }
+ });
+ });
+ delete def.transform;
+ if (transformStrings_1.length > 0) {
+ def['transform'] = transformStrings_1.join(' ');
+ }
+ if (animatedTransforms_1.length > 0) {
+ def['animatedTransform'] = animatedTransforms_1;
+ }
+ }
+ if (def.shadowOffset !== undefined || def.shadowRadius !== undefined || def.shadowColor !== undefined) {
+ var width = 0;
+ var height = 0;
+ var radius = 0;
+ var color = 'black';
+ if (def.shadowOffset !== undefined) {
+ width = def.shadowOffset.width;
+ height = def.shadowOffset.height;
+ delete def.shadowOffset;
+ }
+ if (def.shadowRadius !== undefined) {
+ radius = def.shadowRadius;
+ delete def.shadowRadius;
+ }
+ if (def.shadowColor !== undefined) {
+ color = def.shadowColor;
+ delete def.shadowColor;
+ }
+ def['boxShadow'] = width + 'px ' + height + 'px ' + radius + 'px 0px ' + color;
+ }
+ // CSS (and React JS) support lineHeight defined as either a multiple of the font
+ // size or a pixel count. The Types interface always uses a pixel count. We need to
+ // convert to the string notation to make CSS happy.
+ if (def.lineHeight !== undefined) {
+ def['lineHeight'] = def.lineHeight + 'px';
+ }
+ // Add default border width if border style was provided. Otherwise
+ // the browser will default to a one-pixel border.
+ if (def.borderStyle) {
+ if (def.borderWidth === undefined) {
+ if (def.borderTopWidth === undefined) {
+ def.borderTopWidth = 0;
+ }
+ if (def.borderRightWidth === undefined) {
+ def.borderRightWidth = 0;
+ }
+ if (def.borderBottomWidth === undefined) {
+ def.borderBottomWidth = 0;
+ }
+ if (def.borderLeftWidth === undefined) {
+ def.borderLeftWidth = 0;
+ }
+ }
+ }
+ // CSS doesn't support vertical/horizontal margins or padding.
+ if (def.marginVertical !== undefined) {
+ def.marginTop = def.marginVertical;
+ def.marginBottom = def.marginVertical;
+ delete def.marginVertical;
+ }
+ if (def.marginHorizontal !== undefined) {
+ def.marginLeft = def.marginHorizontal;
+ def.marginRight = def.marginHorizontal;
+ delete def.marginHorizontal;
+ }
+ if ((def.marginHorizontal !== undefined || def.marginVertical !== undefined ||
+ def.marginLeft !== undefined || def.marginRight !== undefined ||
+ def.marginTop !== undefined || def.marginBottom !== undefined) && def.margin !== undefined) {
+ console.error('Conflicting rules for margin specified.');
+ delete def.margin;
+ }
+ if (def.paddingVertical !== undefined) {
+ def.paddingTop = def.paddingVertical;
+ def.paddingBottom = def.paddingVertical;
+ delete def.paddingVertical;
+ }
+ if (def.paddingHorizontal !== undefined) {
+ def.paddingLeft = def.paddingHorizontal;
+ def.paddingRight = def.paddingHorizontal;
+ delete def.paddingHorizontal;
+ }
+ if ((def.paddingHorizontal !== undefined || def.paddingVertical !== undefined ||
+ def.paddingLeft !== undefined || def.paddingRight !== undefined ||
+ def.paddingTop !== undefined || def.paddingBottom !== undefined) && def.padding !== undefined) {
+ console.error('Conflicting rules for padding specified.');
+ delete def.padding;
+ }
+ // CSS doesn't support 'textDecorationLine'
+ if (def.textDecorationLine !== undefined) {
+ def['textDecoration'] = def.textDecorationLine;
+ delete def.textDecorationLine;
+ }
+ // Add common aliases if necessary.
+ var jsAliases = this._getCssPropertyAliasesJsStyle();
+ for (var prop in jsAliases) {
+ if (def[prop] !== undefined && jsAliases[prop]) {
+ def[jsAliases[prop]] = def[prop];
+ }
+ }
+ // Add IE-specific word wrap property.
+ if (def.wordBreak === 'break-word') {
+ def['wordWrap'] = 'break-word';
+ }
+ return def;
+ };
+ return Styles;
+}(RX.Styles));
+exports.Styles = Styles;
+function memoize(func, resolver) {
+ return _.memoize(func, resolver);
}
+exports.memoize = memoize;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = new Styles();
-var ReactUpdatesInjection = {
- injectReconcileTransaction: function (ReconcileTransaction) {
- !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
- ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
- },
-
- injectBatchingStrategy: function (_batchingStrategy) {
- !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
- !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
- !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
- batchingStrategy = _batchingStrategy;
- }
-};
-
-var ReactUpdates = {
- /**
- * React references `ReactReconcileTransaction` using this property in order
- * to allow dependency injection.
- *
- * @internal
- */
- ReactReconcileTransaction: null,
-
- batchedUpdates: batchedUpdates,
- enqueueUpdate: enqueueUpdate,
- flushBatchedUpdates: flushBatchedUpdates,
- injection: ReactUpdatesInjection,
- asap: asap
-};
-
-module.exports = ReactUpdates;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 20 */
+/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-
-
-/**
- * Keeps track of the current owner.
- *
- * The current owner is the component who should own any components that are
- * currently being constructed.
- */
-var ReactCurrentOwner = {
+* Types.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Type definitions for ReactXP framework.
+*/
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
+var SubscribableEvent_1 = __webpack_require__(165);
+exports.SubscribableEvent = SubscribableEvent_1.SubscribableEvent;
+exports.SubscriptionToken = SubscribableEvent_1.SubscriptionToken;
+// Auto, Yes, No - iOS & Android.
+// NoHideDescendants - iOS, Android, & Desktop.
+var ImportantForAccessibility;
+(function (ImportantForAccessibility) {
+ ImportantForAccessibility[ImportantForAccessibility["Auto"] = 1] = "Auto";
+ ImportantForAccessibility[ImportantForAccessibility["Yes"] = 2] = "Yes";
+ ImportantForAccessibility[ImportantForAccessibility["No"] = 3] = "No";
+ ImportantForAccessibility[ImportantForAccessibility["NoHideDescendants"] = 4] = "NoHideDescendants";
+})(ImportantForAccessibility = exports.ImportantForAccessibility || (exports.ImportantForAccessibility = {}));
+// Android & Desktop supported prop, which allows screen-reader to inform its users when a
+// component has dynamically changed. For example, the content of an inApp toast.
+var AccessibilityLiveRegion;
+(function (AccessibilityLiveRegion) {
+ AccessibilityLiveRegion[AccessibilityLiveRegion["None"] = 0] = "None";
+ AccessibilityLiveRegion[AccessibilityLiveRegion["Polite"] = 1] = "Polite";
+ AccessibilityLiveRegion[AccessibilityLiveRegion["Assertive"] = 2] = "Assertive";
+})(AccessibilityLiveRegion = exports.AccessibilityLiveRegion || (exports.AccessibilityLiveRegion = {}));
+// NOTE: This enum is organized based on priority of these traits (0 is the lowest),
+// which can be assigned to an accessible object. On native, all traits are combined as
+// a list. On desktop, trait with the maximum value is picked. Whenever you are adding
+// a new trait add it in the right priority order in the list.
+var AccessibilityTrait;
+(function (AccessibilityTrait) {
+ // Desktop and iOS.
+ AccessibilityTrait[AccessibilityTrait["Summary"] = 0] = "Summary";
+ AccessibilityTrait[AccessibilityTrait["Adjustable"] = 1] = "Adjustable";
+ // Desktop, iOS, and Android.
+ AccessibilityTrait[AccessibilityTrait["Button"] = 2] = "Button";
+ AccessibilityTrait[AccessibilityTrait["Tab"] = 3] = "Tab";
+ AccessibilityTrait[AccessibilityTrait["Selected"] = 4] = "Selected";
+ // Android only.
+ AccessibilityTrait[AccessibilityTrait["Radio_button_checked"] = 5] = "Radio_button_checked";
+ AccessibilityTrait[AccessibilityTrait["Radio_button_unchecked"] = 6] = "Radio_button_unchecked";
+ // iOS only.
+ AccessibilityTrait[AccessibilityTrait["Link"] = 7] = "Link";
+ AccessibilityTrait[AccessibilityTrait["Header"] = 8] = "Header";
+ AccessibilityTrait[AccessibilityTrait["Search"] = 9] = "Search";
+ AccessibilityTrait[AccessibilityTrait["Image"] = 10] = "Image";
+ AccessibilityTrait[AccessibilityTrait["Plays"] = 11] = "Plays";
+ AccessibilityTrait[AccessibilityTrait["Key"] = 12] = "Key";
+ AccessibilityTrait[AccessibilityTrait["Text"] = 13] = "Text";
+ AccessibilityTrait[AccessibilityTrait["Disabled"] = 14] = "Disabled";
+ AccessibilityTrait[AccessibilityTrait["FrequentUpdates"] = 15] = "FrequentUpdates";
+ AccessibilityTrait[AccessibilityTrait["StartsMedia"] = 16] = "StartsMedia";
+ AccessibilityTrait[AccessibilityTrait["AllowsDirectInteraction"] = 17] = "AllowsDirectInteraction";
+ AccessibilityTrait[AccessibilityTrait["PageTurn"] = 18] = "PageTurn";
+ // Desktop only.
+ AccessibilityTrait[AccessibilityTrait["Menu"] = 19] = "Menu";
+ AccessibilityTrait[AccessibilityTrait["MenuItem"] = 20] = "MenuItem";
+ AccessibilityTrait[AccessibilityTrait["MenuBar"] = 21] = "MenuBar";
+ AccessibilityTrait[AccessibilityTrait["TabList"] = 22] = "TabList";
+ AccessibilityTrait[AccessibilityTrait["List"] = 23] = "List";
+ AccessibilityTrait[AccessibilityTrait["ListItem"] = 24] = "ListItem";
+ AccessibilityTrait[AccessibilityTrait["ListBox"] = 25] = "ListBox";
+ AccessibilityTrait[AccessibilityTrait["Group"] = 26] = "Group";
+ AccessibilityTrait[AccessibilityTrait["CheckBox"] = 27] = "CheckBox";
+ AccessibilityTrait[AccessibilityTrait["ComboBox"] = 28] = "ComboBox";
+ AccessibilityTrait[AccessibilityTrait["Log"] = 29] = "Log";
+ AccessibilityTrait[AccessibilityTrait["Status"] = 30] = "Status";
+ AccessibilityTrait[AccessibilityTrait["Dialog"] = 31] = "Dialog";
+ // Desktop & mobile. This is at the end because this
+ // is the highest priority trait.
+ AccessibilityTrait[AccessibilityTrait["None"] = 32] = "None";
+})(AccessibilityTrait = exports.AccessibilityTrait || (exports.AccessibilityTrait = {}));
+var GestureMouseCursor;
+(function (GestureMouseCursor) {
+ GestureMouseCursor[GestureMouseCursor["Default"] = 0] = "Default";
+ GestureMouseCursor[GestureMouseCursor["Pointer"] = 1] = "Pointer";
+ GestureMouseCursor[GestureMouseCursor["Grab"] = 2] = "Grab";
+ GestureMouseCursor[GestureMouseCursor["Move"] = 3] = "Move";
+})(GestureMouseCursor = exports.GestureMouseCursor || (exports.GestureMouseCursor = {}));
+var PreferredPanGesture;
+(function (PreferredPanGesture) {
+ PreferredPanGesture[PreferredPanGesture["Horizontal"] = 0] = "Horizontal";
+ PreferredPanGesture[PreferredPanGesture["Vertical"] = 1] = "Vertical";
+})(PreferredPanGesture = exports.PreferredPanGesture || (exports.PreferredPanGesture = {}));
+var WebViewSandboxMode;
+(function (WebViewSandboxMode) {
+ WebViewSandboxMode[WebViewSandboxMode["None"] = 0] = "None";
+ WebViewSandboxMode[WebViewSandboxMode["AllowForms"] = 1] = "AllowForms";
+ WebViewSandboxMode[WebViewSandboxMode["AllowModals"] = 2] = "AllowModals";
+ WebViewSandboxMode[WebViewSandboxMode["AllowOrientationLock"] = 4] = "AllowOrientationLock";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPointerLock"] = 8] = "AllowPointerLock";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPopups"] = 16] = "AllowPopups";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPopupsToEscapeSandbox"] = 32] = "AllowPopupsToEscapeSandbox";
+ WebViewSandboxMode[WebViewSandboxMode["AllowPresentation"] = 64] = "AllowPresentation";
+ WebViewSandboxMode[WebViewSandboxMode["AllowSameOrigin"] = 128] = "AllowSameOrigin";
+ WebViewSandboxMode[WebViewSandboxMode["AllowScripts"] = 256] = "AllowScripts";
+ WebViewSandboxMode[WebViewSandboxMode["AllowTopNavigation"] = 512] = "AllowTopNavigation";
+})(WebViewSandboxMode = exports.WebViewSandboxMode || (exports.WebViewSandboxMode = {}));
+//
+// Navigator
+// ----------------------------------------------------------------------
+var NavigatorSceneConfigType;
+(function (NavigatorSceneConfigType) {
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromRight"] = 0] = "FloatFromRight";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromLeft"] = 1] = "FloatFromLeft";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FloatFromBottom"] = 2] = "FloatFromBottom";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["Fade"] = 3] = "Fade";
+ NavigatorSceneConfigType[NavigatorSceneConfigType["FadeWithSlide"] = 4] = "FadeWithSlide";
+})(NavigatorSceneConfigType = exports.NavigatorSceneConfigType || (exports.NavigatorSceneConfigType = {}));
+//
+// Location
+// ----------------------------------------------------------------------
+var LocationErrorType;
+(function (LocationErrorType) {
+ LocationErrorType[LocationErrorType["PermissionDenied"] = 1] = "PermissionDenied";
+ LocationErrorType[LocationErrorType["PositionUnavailable"] = 2] = "PositionUnavailable";
+ LocationErrorType[LocationErrorType["Timeout"] = 3] = "Timeout";
+})(LocationErrorType = exports.LocationErrorType || (exports.LocationErrorType = {}));
+//
+// Animated
+// ----------------------------------------------------------------------
+var Animated;
+(function (Animated) {
+})(Animated = exports.Animated || (exports.Animated = {}));
+var LinkingErrorCode;
+(function (LinkingErrorCode) {
+ LinkingErrorCode[LinkingErrorCode["NoAppFound"] = 0] = "NoAppFound";
+ LinkingErrorCode[LinkingErrorCode["UnexpectedFailure"] = 1] = "UnexpectedFailure";
+ LinkingErrorCode[LinkingErrorCode["Blocked"] = 2] = "Blocked";
+ LinkingErrorCode[LinkingErrorCode["InitialUrlNotFound"] = 3] = "InitialUrlNotFound";
+})(LinkingErrorCode = exports.LinkingErrorCode || (exports.LinkingErrorCode = {}));
+//
+// App
+// ----------------------------------------------------------------------
+var AppActivationState;
+(function (AppActivationState) {
+ AppActivationState[AppActivationState["Active"] = 1] = "Active";
+ AppActivationState[AppActivationState["Background"] = 2] = "Background";
+ AppActivationState[AppActivationState["Inactive"] = 3] = "Inactive";
+})(AppActivationState = exports.AppActivationState || (exports.AppActivationState = {}));
+
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* Styles.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of style functions.
+*/
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
+var _ = __webpack_require__(16);
+var RX = __webpack_require__(8);
+var StyleLeakDetector_1 = __webpack_require__(586);
+var Styles = (function (_super) {
+ __extends(Styles, _super);
+ function Styles() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ // Use memoize to cache the result after the first call.
+ _this._createDummyElement = _.memoize(function () {
+ return document.createElement('testCss');
+ });
+ _this._getCssPropertyAliasesJsStyle = _.memoize(function () {
+ var props = [
+ 'flex',
+ 'flexDirection',
+ 'alignItems',
+ 'justifyContent',
+ 'alignSelf',
+ 'transform',
+ 'transition',
+ 'animationDuration',
+ 'animationTimingFunction',
+ 'animationDirection',
+ 'animationDelay',
+ 'animationIterationCount',
+ 'animationName',
+ 'hyphens',
+ 'filter',
+ 'appRegion'
+ ];
+ var aliases = {};
+ props.forEach(function (prop) {
+ var alias = _this._getCssPropertyAlias(prop);
+ if (prop !== alias) {
+ aliases[prop] = alias;
+ }
+ });
+ return aliases;
+ });
+ _this.getCssPropertyAliasesCssStyle = memoize(function () {
+ var jsStyleAliases = _this._getCssPropertyAliasesJsStyle();
+ var aliases = {};
+ _.each(_.keys(jsStyleAliases), function (prop) {
+ aliases[prop] = _this._convertJsToCssStyle(jsStyleAliases[prop]);
+ });
+ return aliases;
+ });
+ return _this;
+ }
+ // Combines a set of styles
+ Styles.prototype.combine = function (defaultStyle, ruleSet) {
+ var combinedStyles = {};
+ if (defaultStyle) {
+ combinedStyles = _.extend(combinedStyles, defaultStyle);
+ }
+ if (ruleSet) {
+ combinedStyles = _.extend.apply(_, [combinedStyles].concat(ruleSet));
+ }
+ if ((combinedStyles.marginLeft !== undefined || combinedStyles.marginRight !== undefined ||
+ combinedStyles.marginTop !== undefined || combinedStyles.marginBottom !== undefined) &&
+ combinedStyles.margin !== undefined) {
+ console.error('Conflicting rules for margin specified.');
+ delete combinedStyles.margin;
+ }
+ if ((combinedStyles.paddingLeft !== undefined || combinedStyles.paddingRight !== undefined ||
+ combinedStyles.paddingTop !== undefined || combinedStyles.paddingBottom !== undefined) &&
+ combinedStyles.padding !== undefined) {
+ console.error('Conflicting rules for padding specified.');
+ delete combinedStyles.padding;
+ }
+ return combinedStyles;
+ };
+ // Creates opaque styles that can be used for View
+ Styles.prototype.createViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for View
+ Styles.prototype.createAnimatedViewStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for ScrollView
+ Styles.prototype.createScrollViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Button
+ Styles.prototype.createButtonStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for WebView
+ Styles.prototype.createWebViewStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Text
+ Styles.prototype.createTextStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Text
+ Styles.prototype.createAnimatedTextStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for TextInput
+ Styles.prototype.createTextInputStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for TextInput
+ Styles.prototype.createAnimatedTextInputStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for Link
+ Styles.prototype.createLinkStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Image
+ Styles.prototype.createImageStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Creates opaque styles that can be used for Image
+ Styles.prototype.createAnimatedImageStyle = function (ruleSet) {
+ return this._adaptStyles(ruleSet, false);
+ };
+ // Creates opaque styles that can be used for Picker
+ Styles.prototype.createPickerStyle = function (ruleSet, cacheStyle) {
+ if (cacheStyle === void 0) { cacheStyle = true; }
+ return this._adaptStyles(ruleSet, cacheStyle);
+ };
+ // Returns the name of a CSS property or its alias. Returns null if the property is not supported.
+ Styles.prototype._getCssPropertyAlias = function (name) {
+ // If we're inside unit tests, document may not be defined yet. We don't need prefixes for tests
+ if (typeof document === 'undefined') {
+ return null;
+ }
+ var upperName = name.charAt(0).toUpperCase() + name.slice(1);
+ var propsToTest = [name, upperName];
+ propsToTest = propsToTest.concat(['Webkit', 'webkit', 'Moz', 'O', 'ms'].map(function (prefix) { return prefix + upperName; }));
+ var testElement = this._createDummyElement();
+ var styleObj = testElement.style;
+ for (var i = 0; i < propsToTest.length; i++) {
+ var prop = propsToTest[i];
+ if (styleObj[prop] !== undefined) {
+ return prop;
+ }
+ }
+ return null;
+ };
+ // Converts a property from JavaScript style (camel-case) to CSS style (lowercase with hyphens).
+ Styles.prototype._convertJsToCssStyle = function (prop) {
+ var cssString = '';
+ if (prop) {
+ for (var i = 0; i < prop.length; i++) {
+ var lowerChar = prop[i].toLowerCase();
+ if (lowerChar === prop[i]) {
+ cssString += lowerChar;
+ }
+ else {
+ cssString += '-' + lowerChar;
+ }
+ }
+ }
+ return cssString;
+ };
+ Styles.prototype.getParentComponentName = function (component) {
+ var parentConstructor;
+ var internalInstance = component['_reactInternalInstance'];
+ if (internalInstance && internalInstance._currentElement &&
+ internalInstance._currentElement._owner && internalInstance._currentElement._owner._instance) {
+ parentConstructor = internalInstance._currentElement._owner._instance.constructor;
+ }
+ if (!parentConstructor) {
+ return '';
+ }
+ return parentConstructor.name ? parentConstructor.name : parentConstructor;
+ };
+ Styles.prototype._adaptStyles = function (def, validate) {
+ if (validate) {
+ StyleLeakDetector_1.default.detectLeaks(def);
+ }
+ // Expand composite types.
+ if (def.font) {
+ if (def.font.fontFamily !== undefined) {
+ def.fontFamily = def.font.fontFamily;
+ }
+ if (def.font.fontWeight !== undefined) {
+ def.fontWeight = def.font.fontWeight;
+ }
+ if (def.font.fontStyle !== undefined) {
+ def.fontStyle = def.font.fontStyle;
+ }
+ delete def.font;
+ }
+ if (def.flex !== undefined) {
+ var flexValue = def.flex;
+ delete def.flex;
+ if (flexValue > 0) {
+ def.flex = flexValue.toString() + ' 1 auto';
+ }
+ else if (flexValue < 0) {
+ def.flex = '0 1 auto';
+ }
+ else {
+ def.flex = '0 0 auto';
+ }
+ }
+ if (def.transform) {
+ var transformStrings_1 = [];
+ var animatedTransforms_1 = [];
+ _.each(def.transform, function (t) {
+ _.each(_.keys(t), function (key) {
+ // Animated transforms use AnimatedValue objects rather
+ // than strings. We need to store these separately.
+ if (typeof t[key] === 'object') {
+ animatedTransforms_1.push({ type: key, value: t[key] });
+ }
+ else {
+ var value = t[key].toString();
+ if (key.indexOf('rotate') === 0) {
+ value += 'deg';
+ }
+ else if (key.indexOf('translate') === 0) {
+ value += 'px';
+ }
+ transformStrings_1.push(key + '(' + value + ')');
+ }
+ });
+ });
+ delete def.transform;
+ if (transformStrings_1.length > 0) {
+ def['transform'] = transformStrings_1.join(' ');
+ }
+ if (animatedTransforms_1.length > 0) {
+ def['animatedTransform'] = animatedTransforms_1;
+ }
+ }
+ if (def.shadowOffset !== undefined || def.shadowRadius !== undefined || def.shadowColor !== undefined) {
+ var width = 0;
+ var height = 0;
+ var radius = 0;
+ var color = 'black';
+ if (def.shadowOffset !== undefined) {
+ width = def.shadowOffset.width;
+ height = def.shadowOffset.height;
+ delete def.shadowOffset;
+ }
+ if (def.shadowRadius !== undefined) {
+ radius = def.shadowRadius;
+ delete def.shadowRadius;
+ }
+ if (def.shadowColor !== undefined) {
+ color = def.shadowColor;
+ delete def.shadowColor;
+ }
+ def['boxShadow'] = width + 'px ' + height + 'px ' + radius + 'px 0px ' + color;
+ }
+ // CSS (and React JS) support lineHeight defined as either a multiple of the font
+ // size or a pixel count. The Types interface always uses a pixel count. We need to
+ // convert to the string notation to make CSS happy.
+ if (def.lineHeight !== undefined) {
+ def['lineHeight'] = def.lineHeight + 'px';
+ }
+ // Add default border width if border style was provided. Otherwise
+ // the browser will default to a one-pixel border.
+ if (def.borderStyle) {
+ if (def.borderWidth === undefined) {
+ if (def.borderTopWidth === undefined) {
+ def.borderTopWidth = 0;
+ }
+ if (def.borderRightWidth === undefined) {
+ def.borderRightWidth = 0;
+ }
+ if (def.borderBottomWidth === undefined) {
+ def.borderBottomWidth = 0;
+ }
+ if (def.borderLeftWidth === undefined) {
+ def.borderLeftWidth = 0;
+ }
+ }
+ }
+ // CSS doesn't support vertical/horizontal margins or padding.
+ if (def.marginVertical !== undefined) {
+ def.marginTop = def.marginVertical;
+ def.marginBottom = def.marginVertical;
+ delete def.marginVertical;
+ }
+ if (def.marginHorizontal !== undefined) {
+ def.marginLeft = def.marginHorizontal;
+ def.marginRight = def.marginHorizontal;
+ delete def.marginHorizontal;
+ }
+ if ((def.marginHorizontal !== undefined || def.marginVertical !== undefined ||
+ def.marginLeft !== undefined || def.marginRight !== undefined ||
+ def.marginTop !== undefined || def.marginBottom !== undefined) && def.margin !== undefined) {
+ console.error('Conflicting rules for margin specified.');
+ delete def.margin;
+ }
+ if (def.paddingVertical !== undefined) {
+ def.paddingTop = def.paddingVertical;
+ def.paddingBottom = def.paddingVertical;
+ delete def.paddingVertical;
+ }
+ if (def.paddingHorizontal !== undefined) {
+ def.paddingLeft = def.paddingHorizontal;
+ def.paddingRight = def.paddingHorizontal;
+ delete def.paddingHorizontal;
+ }
+ if ((def.paddingHorizontal !== undefined || def.paddingVertical !== undefined ||
+ def.paddingLeft !== undefined || def.paddingRight !== undefined ||
+ def.paddingTop !== undefined || def.paddingBottom !== undefined) && def.padding !== undefined) {
+ console.error('Conflicting rules for padding specified.');
+ delete def.padding;
+ }
+ // CSS doesn't support 'textDecorationLine'
+ if (def.textDecorationLine !== undefined) {
+ def['textDecoration'] = def.textDecorationLine;
+ delete def.textDecorationLine;
+ }
+ // Add common aliases if necessary.
+ var jsAliases = this._getCssPropertyAliasesJsStyle();
+ for (var prop in jsAliases) {
+ if (def[prop] !== undefined && jsAliases[prop]) {
+ def[jsAliases[prop]] = def[prop];
+ }
+ }
+ // Add IE-specific word wrap property.
+ if (def.wordBreak === 'break-word') {
+ def['wordWrap'] = 'break-word';
+ }
+ return def;
+ };
+ return Styles;
+}(RX.Styles));
+exports.Styles = Styles;
+function memoize(func, resolver) {
+ return _.memoize(func, resolver);
+}
+exports.memoize = memoize;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = new Styles();
-module.exports = ReactCurrentOwner;
/***/ }),
-/* 21 */
+/* 25 */
/***/ (function(module, exports, __webpack_require__) {
-var isFunction = __webpack_require__(94),
- isLength = __webpack_require__(95);
+"use strict";
+
/**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
*
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+function makeEmptyFunction(arg) {
+ return function () {
+ return arg;
+ };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+ return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+ return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2016-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+// Trust the developer to only use ReactInstrumentation with a __DEV__ check
+
+var debugTool = null;
+
+if (process.env.NODE_ENV !== 'production') {
+ var ReactDebugTool = __webpack_require__(442);
+ debugTool = ReactDebugTool;
+}
+
+module.exports = { debugTool: debugTool };
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var freeGlobal = __webpack_require__(194);
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+module.exports = root;
+
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayLikeKeys = __webpack_require__(179),
+ baseKeys = __webpack_require__(185),
+ isArrayLike = __webpack_require__(31);
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+module.exports = keys;
+
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(5),
+ _assign = __webpack_require__(9);
+
+var CallbackQueue = __webpack_require__(214);
+var PooledClass = __webpack_require__(41);
+var ReactFeatureFlags = __webpack_require__(219);
+var ReactReconciler = __webpack_require__(51);
+var Transaction = __webpack_require__(85);
+
+var invariant = __webpack_require__(3);
+
+var dirtyComponents = [];
+var updateBatchNumber = 0;
+var asapCallbackQueue = CallbackQueue.getPooled();
+var asapEnqueued = false;
+
+var batchingStrategy = null;
+
+function ensureInjected() {
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
+}
+
+var NESTED_UPDATES = {
+ initialize: function () {
+ this.dirtyComponentsLength = dirtyComponents.length;
+ },
+ close: function () {
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
+ // Additional updates were enqueued by componentDidUpdate handlers or
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
+ // these new updates so that if A's componentDidUpdate calls setState on
+ // B, B will update before the callback A's updater provided when calling
+ // setState.
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
+ flushBatchedUpdates();
+ } else {
+ dirtyComponents.length = 0;
+ }
+ }
+};
+
+var UPDATE_QUEUEING = {
+ initialize: function () {
+ this.callbackQueue.reset();
+ },
+ close: function () {
+ this.callbackQueue.notifyAll();
+ }
+};
+
+var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
+
+function ReactUpdatesFlushTransaction() {
+ this.reinitializeTransaction();
+ this.dirtyComponentsLength = null;
+ this.callbackQueue = CallbackQueue.getPooled();
+ this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
+ /* useCreateElement */true);
+}
+
+_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
+ getTransactionWrappers: function () {
+ return TRANSACTION_WRAPPERS;
+ },
+
+ destructor: function () {
+ this.dirtyComponentsLength = null;
+ CallbackQueue.release(this.callbackQueue);
+ this.callbackQueue = null;
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
+ this.reconcileTransaction = null;
+ },
+
+ perform: function (method, scope, a) {
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
+ // with this transaction's wrappers around it.
+ return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
+ }
+});
+
+PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
+
+function batchedUpdates(callback, a, b, c, d, e) {
+ ensureInjected();
+ return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
+}
+
+/**
+ * Array comparator for ReactComponents by mount ordering.
+ *
+ * @param {ReactComponent} c1 first component you're comparing
+ * @param {ReactComponent} c2 second component you're comparing
+ * @return {number} Return value usable by Array.prototype.sort().
+ */
+function mountOrderComparator(c1, c2) {
+ return c1._mountOrder - c2._mountOrder;
+}
+
+function runBatchedUpdates(transaction) {
+ var len = transaction.dirtyComponentsLength;
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
+
+ // Since reconciling a component higher in the owner hierarchy usually (not
+ // always -- see shouldComponentUpdate()) will reconcile children, reconcile
+ // them before their children by sorting the array.
+ dirtyComponents.sort(mountOrderComparator);
+
+ // Any updates enqueued while reconciling must be performed after this entire
+ // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
+ // C, B could update twice in a single batch if C's render enqueues an update
+ // to B (since B would have already updated, we should skip it, and the only
+ // way we can know to do so is by checking the batch counter).
+ updateBatchNumber++;
+
+ for (var i = 0; i < len; i++) {
+ // If a component is unmounted before pending changes apply, it will still
+ // be here, but we assume that it has cleared its _pendingCallbacks and
+ // that performUpdateIfNecessary is a noop.
+ var component = dirtyComponents[i];
+
+ // If performUpdateIfNecessary happens to enqueue any new updates, we
+ // shouldn't execute the callbacks until the next render happens, so
+ // stash the callbacks first
+ var callbacks = component._pendingCallbacks;
+ component._pendingCallbacks = null;
+
+ var markerName;
+ if (ReactFeatureFlags.logTopLevelRenders) {
+ var namedComponent = component;
+ // Duck type TopLevelWrapper. This is probably always true.
+ if (component._currentElement.type.isReactTopLevelWrapper) {
+ namedComponent = component._renderedComponent;
+ }
+ markerName = 'React update: ' + namedComponent.getName();
+ console.time(markerName);
+ }
+
+ ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
+
+ if (markerName) {
+ console.timeEnd(markerName);
+ }
+
+ if (callbacks) {
+ for (var j = 0; j < callbacks.length; j++) {
+ transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
+ }
+ }
+ }
+}
+
+var flushBatchedUpdates = function () {
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
+ // componentDidUpdate) but we need to check here too in order to catch
+ // updates enqueued by setState callbacks and asap calls.
+ while (dirtyComponents.length || asapEnqueued) {
+ if (dirtyComponents.length) {
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
+ transaction.perform(runBatchedUpdates, null, transaction);
+ ReactUpdatesFlushTransaction.release(transaction);
+ }
+
+ if (asapEnqueued) {
+ asapEnqueued = false;
+ var queue = asapCallbackQueue;
+ asapCallbackQueue = CallbackQueue.getPooled();
+ queue.notifyAll();
+ CallbackQueue.release(queue);
+ }
+ }
+};
+
+/**
+ * Mark a component as needing a rerender, adding an optional callback to a
+ * list of functions which will be executed once the rerender occurs.
+ */
+function enqueueUpdate(component) {
+ ensureInjected();
+
+ // Various parts of our code (such as ReactCompositeComponent's
+ // _renderValidatedComponent) assume that calls to render aren't nested;
+ // verify that that's the case. (This is called by each top-level update
+ // function, like setState, forceUpdate, etc.; creation and
+ // destruction of top-level components is guarded in ReactMount.)
+
+ if (!batchingStrategy.isBatchingUpdates) {
+ batchingStrategy.batchedUpdates(enqueueUpdate, component);
+ return;
+ }
+
+ dirtyComponents.push(component);
+ if (component._updateBatchNumber == null) {
+ component._updateBatchNumber = updateBatchNumber + 1;
+ }
+}
+
+/**
+ * Enqueue a callback to be run at the end of the current batching cycle. Throws
+ * if no updates are currently being performed.
+ */
+function asap(callback, context) {
+ !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
+ asapCallbackQueue.enqueue(callback, context);
+ asapEnqueued = true;
+}
+
+var ReactUpdatesInjection = {
+ injectReconcileTransaction: function (ReconcileTransaction) {
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
+ },
+
+ injectBatchingStrategy: function (_batchingStrategy) {
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
+ batchingStrategy = _batchingStrategy;
+ }
+};
+
+var ReactUpdates = {
+ /**
+ * React references `ReactReconcileTransaction` using this property in order
+ * to allow dependency injection.
+ *
+ * @internal
+ */
+ ReactReconcileTransaction: null,
+
+ batchedUpdates: batchedUpdates,
+ enqueueUpdate: enqueueUpdate,
+ flushBatchedUpdates: flushBatchedUpdates,
+ injection: ReactUpdatesInjection,
+ asap: asap
+};
+
+module.exports = ReactUpdates;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+module.exports = ReactCurrentOwner;
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isFunction = __webpack_require__(125),
+ isLength = __webpack_require__(126);
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
@@ -2523,7 +4862,44 @@ module.exports = isArrayLike;
/***/ }),
-/* 22 */
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+if (process.env.NODE_ENV !== 'production') {
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+ Symbol.for &&
+ Symbol.for('react.element')) ||
+ 0xeac7;
+
+ var isValidElement = function(object) {
+ return typeof object === 'object' &&
+ object !== null &&
+ object.$$typeof === REACT_ELEMENT_TYPE;
+ };
+
+ // By explicitly using `prop-types` you are opting into new development behavior.
+ // http://fb.me/prop-types-in-prod
+ var throwOnDirectAccess = true;
+ module.exports = __webpack_require__(212)(isValidElement, throwOnDirectAccess);
+} else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = __webpack_require__(413)();
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2539,12 +4915,12 @@ module.exports = isArrayLike;
-var _assign = __webpack_require__(5);
+var _assign = __webpack_require__(9);
-var PooledClass = __webpack_require__(30);
+var PooledClass = __webpack_require__(41);
-var emptyFunction = __webpack_require__(17);
-var warning = __webpack_require__(2);
+var emptyFunction = __webpack_require__(25);
+var warning = __webpack_require__(4);
var didWarnForAddedNewProperty = false;
var isProxySupported = typeof Proxy === 'function';
@@ -2631,7 +5007,6 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg
}
_assign(SyntheticEvent.prototype, {
-
preventDefault: function () {
this.defaultPrevented = true;
var event = this.nativeEvent;
@@ -2641,8 +5016,8 @@ _assign(SyntheticEvent.prototype, {
if (event.preventDefault) {
event.preventDefault();
+ // eslint-disable-next-line valid-typeof
} else if (typeof event.returnValue !== 'unknown') {
- // eslint-disable-line valid-typeof
event.returnValue = false;
}
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -2656,8 +5031,8 @@ _assign(SyntheticEvent.prototype, {
if (event.stopPropagation) {
event.stopPropagation();
+ // eslint-disable-next-line valid-typeof
} else if (typeof event.cancelBubble !== 'unknown') {
- // eslint-disable-line valid-typeof
// The ChangeEventPlugin registers a "propertychange" event for
// IE. This event does not support bubbling or cancelling, and
// any references to cancelBubble throw "Member not found". A
@@ -2706,7 +5081,6 @@ _assign(SyntheticEvent.prototype, {
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
}
}
-
});
SyntheticEvent.Interface = EventInterface;
@@ -2722,7 +5096,7 @@ if (process.env.NODE_ENV !== 'production') {
return new Proxy(constructor.apply(that, args), {
set: function (target, prop, value) {
if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
- process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
didWarnForAddedNewProperty = true;
}
target[prop] = value;
@@ -2791,20 +5165,20 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
function warn(action, result) {
var warningCondition = false;
- process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 23 */
+/* 34 */
/***/ (function(module, exports, __webpack_require__) {
-var baseMatches = __webpack_require__(248),
- baseMatchesProperty = __webpack_require__(249),
- identity = __webpack_require__(35),
- isArray = __webpack_require__(10),
- property = __webpack_require__(353);
+var baseMatches = __webpack_require__(318),
+ baseMatchesProperty = __webpack_require__(319),
+ identity = __webpack_require__(48),
+ isArray = __webpack_require__(12),
+ property = __webpack_require__(406);
/**
* The base implementation of `_.iteratee`.
@@ -2834,11 +5208,11 @@ module.exports = baseIteratee;
/***/ }),
-/* 24 */
+/* 35 */
/***/ (function(module, exports, __webpack_require__) {
-var assignValue = __webpack_require__(79),
- baseAssignValue = __webpack_require__(56);
+var assignValue = __webpack_require__(101),
+ baseAssignValue = __webpack_require__(70);
/**
* Copies properties of `source` to `object`.
@@ -2880,7 +5254,7 @@ module.exports = copyObject;
/***/ }),
-/* 25 */
+/* 36 */
/***/ (function(module, exports) {
/**
@@ -2915,50 +5289,7 @@ module.exports = isObjectLike;
/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var arrayLikeKeys = __webpack_require__(130),
- baseKeys = __webpack_require__(136),
- isArrayLike = __webpack_require__(21);
-
-/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
-function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
-}
-
-module.exports = keys;
-
-
-/***/ }),
-/* 27 */
+/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2974,9 +5305,9 @@ module.exports = keys;
-var _prodInvariant = __webpack_require__(3);
+var _prodInvariant = __webpack_require__(5);
-var invariant = __webpack_require__(1);
+var invariant = __webpack_require__(3);
function checkMask(value, bitmask) {
return (value & bitmask) === bitmask;
@@ -3100,7 +5431,6 @@ var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\
* @see http://jsperf.com/key-missing
*/
var DOMProperty = {
-
ID_ATTRIBUTE_NAME: 'data-reactid',
ROOT_ATTRIBUTE_NAME: 'data-reactroot',
@@ -3174,31 +5504,529 @@ module.exports = DOMProperty;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 28 */
+/* 38 */
/***/ (function(module, exports, __webpack_require__) {
-var Symbol = __webpack_require__(34),
- getRawTag = __webpack_require__(285),
- objectToString = __webpack_require__(313);
-
-/** `Object#toString` result references. */
-var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
-/** Built-in value references. */
-var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
+// original notice:
-/**
- * The base implementation of `getTag` without fallbacks for buggy environments.
+/*!
+ * The buffer module from node.js, for the browser.
*
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
+ * @author Feross Aboukhadijeh
+ * @license MIT
*/
-function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
+function compare(a, b) {
+ if (a === b) {
+ return 0;
+ }
+
+ var x = a.length;
+ var y = b.length;
+
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+ if (a[i] !== b[i]) {
+ x = a[i];
+ y = b[i];
+ break;
+ }
+ }
+
+ if (x < y) {
+ return -1;
+ }
+ if (y < x) {
+ return 1;
+ }
+ return 0;
+}
+function isBuffer(b) {
+ if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {
+ return global.Buffer.isBuffer(b);
+ }
+ return !!(b != null && b._isBuffer);
+}
+
+// based on node assert, original notice:
+
+// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
+//
+// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
+//
+// Originally from narwhal.js (http://narwhaljs.org)
+// Copyright (c) 2009 Thomas Robinson <280north.com>
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the 'Software'), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var util = __webpack_require__(619);
+var hasOwn = Object.prototype.hasOwnProperty;
+var pSlice = Array.prototype.slice;
+var functionsHaveNames = (function () {
+ return function foo() {}.name === 'foo';
+}());
+function pToString (obj) {
+ return Object.prototype.toString.call(obj);
+}
+function isView(arrbuf) {
+ if (isBuffer(arrbuf)) {
+ return false;
+ }
+ if (typeof global.ArrayBuffer !== 'function') {
+ return false;
+ }
+ if (typeof ArrayBuffer.isView === 'function') {
+ return ArrayBuffer.isView(arrbuf);
+ }
+ if (!arrbuf) {
+ return false;
+ }
+ if (arrbuf instanceof DataView) {
+ return true;
+ }
+ if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
+ return true;
+ }
+ return false;
+}
+// 1. The assert module provides functions that throw
+// AssertionError's when particular conditions are not met. The
+// assert module must conform to the following interface.
+
+var assert = module.exports = ok;
+
+// 2. The AssertionError is defined in assert.
+// new assert.AssertionError({ message: message,
+// actual: actual,
+// expected: expected })
+
+var regex = /\s*function\s+([^\(\s]*)\s*/;
+// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
+function getName(func) {
+ if (!util.isFunction(func)) {
+ return;
+ }
+ if (functionsHaveNames) {
+ return func.name;
+ }
+ var str = func.toString();
+ var match = str.match(regex);
+ return match && match[1];
+}
+assert.AssertionError = function AssertionError(options) {
+ this.name = 'AssertionError';
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+ if (options.message) {
+ this.message = options.message;
+ this.generatedMessage = false;
+ } else {
+ this.message = getMessage(this);
+ this.generatedMessage = true;
+ }
+ var stackStartFunction = options.stackStartFunction || fail;
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, stackStartFunction);
+ } else {
+ // non v8 browsers so we can have a stacktrace
+ var err = new Error();
+ if (err.stack) {
+ var out = err.stack;
+
+ // try to strip useless frames
+ var fn_name = getName(stackStartFunction);
+ var idx = out.indexOf('\n' + fn_name);
+ if (idx >= 0) {
+ // once we have located the function frame
+ // we need to strip out everything before it (and its line)
+ var next_line = out.indexOf('\n', idx + 1);
+ out = out.substring(next_line + 1);
+ }
+
+ this.stack = out;
+ }
+ }
+};
+
+// assert.AssertionError instanceof Error
+util.inherits(assert.AssertionError, Error);
+
+function truncate(s, n) {
+ if (typeof s === 'string') {
+ return s.length < n ? s : s.slice(0, n);
+ } else {
+ return s;
+ }
+}
+function inspect(something) {
+ if (functionsHaveNames || !util.isFunction(something)) {
+ return util.inspect(something);
+ }
+ var rawname = getName(something);
+ var name = rawname ? ': ' + rawname : '';
+ return '[Function' + name + ']';
+}
+function getMessage(self) {
+ return truncate(inspect(self.actual), 128) + ' ' +
+ self.operator + ' ' +
+ truncate(inspect(self.expected), 128);
+}
+
+// At present only the three keys mentioned above are used and
+// understood by the spec. Implementations or sub modules can pass
+// other keys to the AssertionError's constructor - they will be
+// ignored.
+
+// 3. All of the following functions must throw an AssertionError
+// when a corresponding condition is not met, with a message that
+// may be undefined if not provided. All assertion methods provide
+// both the actual and expected values to the assertion error for
+// display purposes.
+
+function fail(actual, expected, message, operator, stackStartFunction) {
+ throw new assert.AssertionError({
+ message: message,
+ actual: actual,
+ expected: expected,
+ operator: operator,
+ stackStartFunction: stackStartFunction
+ });
+}
+
+// EXTENSION! allows for well behaved errors defined elsewhere.
+assert.fail = fail;
+
+// 4. Pure assertion tests whether a value is truthy, as determined
+// by !!guard.
+// assert.ok(guard, message_opt);
+// This statement is equivalent to assert.equal(true, !!guard,
+// message_opt);. To test strictly for the value true, use
+// assert.strictEqual(true, guard, message_opt);.
+
+function ok(value, message) {
+ if (!value) fail(value, true, message, '==', assert.ok);
+}
+assert.ok = ok;
+
+// 5. The equality assertion tests shallow, coercive equality with
+// ==.
+// assert.equal(actual, expected, message_opt);
+
+assert.equal = function equal(actual, expected, message) {
+ if (actual != expected) fail(actual, expected, message, '==', assert.equal);
+};
+
+// 6. The non-equality assertion tests for whether two objects are not equal
+// with != assert.notEqual(actual, expected, message_opt);
+
+assert.notEqual = function notEqual(actual, expected, message) {
+ if (actual == expected) {
+ fail(actual, expected, message, '!=', assert.notEqual);
+ }
+};
+
+// 7. The equivalence assertion tests a deep equality relation.
+// assert.deepEqual(actual, expected, message_opt);
+
+assert.deepEqual = function deepEqual(actual, expected, message) {
+ if (!_deepEqual(actual, expected, false)) {
+ fail(actual, expected, message, 'deepEqual', assert.deepEqual);
+ }
+};
+
+assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
+ if (!_deepEqual(actual, expected, true)) {
+ fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
+ }
+};
+
+function _deepEqual(actual, expected, strict, memos) {
+ // 7.1. All identical values are equivalent, as determined by ===.
+ if (actual === expected) {
+ return true;
+ } else if (isBuffer(actual) && isBuffer(expected)) {
+ return compare(actual, expected) === 0;
+
+ // 7.2. If the expected value is a Date object, the actual value is
+ // equivalent if it is also a Date object that refers to the same time.
+ } else if (util.isDate(actual) && util.isDate(expected)) {
+ return actual.getTime() === expected.getTime();
+
+ // 7.3 If the expected value is a RegExp object, the actual value is
+ // equivalent if it is also a RegExp object with the same source and
+ // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
+ } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
+ return actual.source === expected.source &&
+ actual.global === expected.global &&
+ actual.multiline === expected.multiline &&
+ actual.lastIndex === expected.lastIndex &&
+ actual.ignoreCase === expected.ignoreCase;
+
+ // 7.4. Other pairs that do not both pass typeof value == 'object',
+ // equivalence is determined by ==.
+ } else if ((actual === null || typeof actual !== 'object') &&
+ (expected === null || typeof expected !== 'object')) {
+ return strict ? actual === expected : actual == expected;
+
+ // If both values are instances of typed arrays, wrap their underlying
+ // ArrayBuffers in a Buffer each to increase performance
+ // This optimization requires the arrays to have the same type as checked by
+ // Object.prototype.toString (aka pToString). Never perform binary
+ // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
+ // bit patterns are not identical.
+ } else if (isView(actual) && isView(expected) &&
+ pToString(actual) === pToString(expected) &&
+ !(actual instanceof Float32Array ||
+ actual instanceof Float64Array)) {
+ return compare(new Uint8Array(actual.buffer),
+ new Uint8Array(expected.buffer)) === 0;
+
+ // 7.5 For all other Object pairs, including Array objects, equivalence is
+ // determined by having the same number of owned properties (as verified
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
+ // (although not necessarily the same order), equivalent values for every
+ // corresponding key, and an identical 'prototype' property. Note: this
+ // accounts for both named and indexed properties on Arrays.
+ } else if (isBuffer(actual) !== isBuffer(expected)) {
+ return false;
+ } else {
+ memos = memos || {actual: [], expected: []};
+
+ var actualIndex = memos.actual.indexOf(actual);
+ if (actualIndex !== -1) {
+ if (actualIndex === memos.expected.indexOf(expected)) {
+ return true;
+ }
+ }
+
+ memos.actual.push(actual);
+ memos.expected.push(expected);
+
+ return objEquiv(actual, expected, strict, memos);
+ }
+}
+
+function isArguments(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+}
+
+function objEquiv(a, b, strict, actualVisitedObjects) {
+ if (a === null || a === undefined || b === null || b === undefined)
+ return false;
+ // if one is a primitive, the other must be same
+ if (util.isPrimitive(a) || util.isPrimitive(b))
+ return a === b;
+ if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
+ return false;
+ var aIsArgs = isArguments(a);
+ var bIsArgs = isArguments(b);
+ if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
+ return false;
+ if (aIsArgs) {
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return _deepEqual(a, b, strict);
+ }
+ var ka = objectKeys(a);
+ var kb = objectKeys(b);
+ var key, i;
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length !== kb.length)
+ return false;
+ //the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+ //~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] !== kb[i])
+ return false;
+ }
+ //equivalent values for every corresponding key, and
+ //~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))
+ return false;
+ }
+ return true;
+}
+
+// 8. The non-equivalence assertion tests for any deep inequality.
+// assert.notDeepEqual(actual, expected, message_opt);
+
+assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
+ if (_deepEqual(actual, expected, false)) {
+ fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
+ }
+};
+
+assert.notDeepStrictEqual = notDeepStrictEqual;
+function notDeepStrictEqual(actual, expected, message) {
+ if (_deepEqual(actual, expected, true)) {
+ fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
+ }
+}
+
+
+// 9. The strict equality assertion tests strict equality, as determined by ===.
+// assert.strictEqual(actual, expected, message_opt);
+
+assert.strictEqual = function strictEqual(actual, expected, message) {
+ if (actual !== expected) {
+ fail(actual, expected, message, '===', assert.strictEqual);
+ }
+};
+
+// 10. The strict non-equality assertion tests for strict inequality, as
+// determined by !==. assert.notStrictEqual(actual, expected, message_opt);
+
+assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
+ if (actual === expected) {
+ fail(actual, expected, message, '!==', assert.notStrictEqual);
+ }
+};
+
+function expectedException(actual, expected) {
+ if (!actual || !expected) {
+ return false;
+ }
+
+ if (Object.prototype.toString.call(expected) == '[object RegExp]') {
+ return expected.test(actual);
+ }
+
+ try {
+ if (actual instanceof expected) {
+ return true;
+ }
+ } catch (e) {
+ // Ignore. The instanceof check doesn't work for arrow functions.
+ }
+
+ if (Error.isPrototypeOf(expected)) {
+ return false;
+ }
+
+ return expected.call({}, actual) === true;
+}
+
+function _tryBlock(block) {
+ var error;
+ try {
+ block();
+ } catch (e) {
+ error = e;
+ }
+ return error;
+}
+
+function _throws(shouldThrow, block, expected, message) {
+ var actual;
+
+ if (typeof block !== 'function') {
+ throw new TypeError('"block" argument must be a function');
+ }
+
+ if (typeof expected === 'string') {
+ message = expected;
+ expected = null;
+ }
+
+ actual = _tryBlock(block);
+
+ message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
+ (message ? ' ' + message : '.');
+
+ if (shouldThrow && !actual) {
+ fail(actual, expected, 'Missing expected exception' + message);
+ }
+
+ var userProvidedMessage = typeof message === 'string';
+ var isUnwantedException = !shouldThrow && util.isError(actual);
+ var isUnexpectedException = !shouldThrow && actual && !expected;
+
+ if ((isUnwantedException &&
+ userProvidedMessage &&
+ expectedException(actual, expected)) ||
+ isUnexpectedException) {
+ fail(actual, expected, 'Got unwanted exception' + message);
+ }
+
+ if ((shouldThrow && actual && expected &&
+ !expectedException(actual, expected)) || (!shouldThrow && actual)) {
+ throw actual;
+ }
+}
+
+// 11. Expected to throw an error:
+// assert.throws(block, Error_opt, message_opt);
+
+assert.throws = function(block, /*optional*/error, /*optional*/message) {
+ _throws(true, block, error, message);
+};
+
+// EXTENSION! This is annoying to write outside this module.
+assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
+ _throws(false, block, error, message);
+};
+
+assert.ifError = function(err) { if (err) throw err; };
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ if (hasOwn.call(obj, key)) keys.push(key);
+ }
+ return keys;
+};
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(95)))
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(45),
+ getRawTag = __webpack_require__(355),
+ objectToString = __webpack_require__(383);
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
@@ -3208,11 +6036,11 @@ module.exports = baseGetTag;
/***/ }),
-/* 29 */
+/* 40 */
/***/ (function(module, exports, __webpack_require__) {
-var baseIsNative = __webpack_require__(245),
- getValue = __webpack_require__(286);
+var baseIsNative = __webpack_require__(315),
+ getValue = __webpack_require__(356);
/**
* Gets the native function at `key` of `object`.
@@ -3231,7 +6059,7 @@ module.exports = getNative;
/***/ }),
-/* 30 */
+/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -3248,9 +6076,9 @@ module.exports = getNative;
-var _prodInvariant = __webpack_require__(3);
+var _prodInvariant = __webpack_require__(5);
-var invariant = __webpack_require__(1);
+var invariant = __webpack_require__(3);
/**
* Static poolers. Several custom versions for each potential number of
@@ -3349,7 +6177,7 @@ module.exports = PooledClass;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 31 */
+/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -3365,15 +6193,15 @@ module.exports = PooledClass;
-var _assign = __webpack_require__(5);
+var _assign = __webpack_require__(9);
-var ReactCurrentOwner = __webpack_require__(20);
+var ReactCurrentOwner = __webpack_require__(30);
-var warning = __webpack_require__(2);
-var canDefineProperty = __webpack_require__(70);
+var warning = __webpack_require__(4);
+var canDefineProperty = __webpack_require__(88);
var hasOwnProperty = Object.prototype.hasOwnProperty;
-var REACT_ELEMENT_TYPE = __webpack_require__(191);
+var REACT_ELEMENT_TYPE = __webpack_require__(236);
var RESERVED_PROPS = {
key: true,
@@ -3696,647 +6524,563 @@ module.exports = ReactElement;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 32 */
+/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
+
+
+// Export web by default. Other platforms have custom index.[platform].js files
+module.exports = __webpack_require__(605);
+
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_RESULT__;(function() {
+ (function(root, factory) {
+ if (true) {
+ return !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
+ return factory();
+ }.call(exports, __webpack_require__, exports, module),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else if (typeof exports === 'object') {
+ return module.exports = factory();
+ } else {
+ return root.ifvisible = factory();
+ }
+ })(this, function() {
+ var addEvent, customEvent, doc, fireEvent, hidden, idleStartedTime, idleTime, ie, ifvisible, init, initialized, status, trackIdleStatus, visibilityChange;
+ ifvisible = {};
+ doc = document;
+ initialized = false;
+ status = "active";
+ idleTime = 60000;
+ idleStartedTime = false;
+ customEvent = (function() {
+ var S4, addCustomEvent, cgid, fireCustomEvent, guid, listeners, removeCustomEvent;
+ S4 = function() {
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+ };
+ guid = function() {
+ return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
+ };
+ listeners = {};
+ cgid = '__ceGUID';
+ addCustomEvent = function(obj, event, callback) {
+ obj[cgid] = undefined;
+ if (!obj[cgid]) {
+ obj[cgid] = "ifvisible.object.event.identifier";
+ }
+ if (!listeners[obj[cgid]]) {
+ listeners[obj[cgid]] = {};
+ }
+ if (!listeners[obj[cgid]][event]) {
+ listeners[obj[cgid]][event] = [];
+ }
+ return listeners[obj[cgid]][event].push(callback);
+ };
+ fireCustomEvent = function(obj, event, memo) {
+ var ev, j, len, ref, results;
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ results = [];
+ for (j = 0, len = ref.length; j < len; j++) {
+ ev = ref[j];
+ results.push(ev(memo || {}));
+ }
+ return results;
+ }
+ };
+ removeCustomEvent = function(obj, event, callback) {
+ var cl, i, j, len, ref;
+ if (callback) {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ ref = listeners[obj[cgid]][event];
+ for (i = j = 0, len = ref.length; j < len; i = ++j) {
+ cl = ref[i];
+ if (cl === callback) {
+ listeners[obj[cgid]][event].splice(i, 1);
+ return cl;
+ }
+ }
+ }
+ } else {
+ if (obj[cgid] && listeners[obj[cgid]] && listeners[obj[cgid]][event]) {
+ return delete listeners[obj[cgid]][event];
+ }
+ }
+ };
+ return {
+ add: addCustomEvent,
+ remove: removeCustomEvent,
+ fire: fireCustomEvent
+ };
+ })();
+ addEvent = (function() {
+ var setListener;
+ setListener = false;
+ return function(el, ev, fn) {
+ if (!setListener) {
+ if (el.addEventListener) {
+ setListener = function(el, ev, fn) {
+ return el.addEventListener(ev, fn, false);
+ };
+ } else if (el.attachEvent) {
+ setListener = function(el, ev, fn) {
+ return el.attachEvent('on' + ev, fn, false);
+ };
+ } else {
+ setListener = function(el, ev, fn) {
+ return el['on' + ev] = fn;
+ };
+ }
+ }
+ return setListener(el, ev, fn);
+ };
+ })();
+ fireEvent = function(element, event) {
+ var evt;
+ if (doc.createEventObject) {
+ return element.fireEvent('on' + event, evt);
+ } else {
+ evt = doc.createEvent('HTMLEvents');
+ evt.initEvent(event, true, true);
+ return !element.dispatchEvent(evt);
+ }
+ };
+ ie = (function() {
+ var all, check, div, undef, v;
+ undef = void 0;
+ v = 3;
+ div = doc.createElement("div");
+ all = div.getElementsByTagName("i");
+ check = function() {
+ return (div.innerHTML = "", all[0]);
+ };
+ while (check()) {
+ continue;
+ }
+ if (v > 4) {
+ return v;
+ } else {
+ return undef;
+ }
+ })();
+ hidden = false;
+ visibilityChange = void 0;
+ if (typeof doc.hidden !== "undefined") {
+ hidden = "hidden";
+ visibilityChange = "visibilitychange";
+ } else if (typeof doc.mozHidden !== "undefined") {
+ hidden = "mozHidden";
+ visibilityChange = "mozvisibilitychange";
+ } else if (typeof doc.msHidden !== "undefined") {
+ hidden = "msHidden";
+ visibilityChange = "msvisibilitychange";
+ } else if (typeof doc.webkitHidden !== "undefined") {
+ hidden = "webkitHidden";
+ visibilityChange = "webkitvisibilitychange";
+ }
+ trackIdleStatus = function() {
+ var timer, wakeUp;
+ timer = false;
+ wakeUp = function() {
+ clearTimeout(timer);
+ if (status !== "active") {
+ ifvisible.wakeup();
+ }
+ idleStartedTime = +(new Date());
+ return timer = setTimeout(function() {
+ if (status === "active") {
+ return ifvisible.idle();
+ }
+ }, idleTime);
+ };
+ wakeUp();
+ addEvent(doc, "mousemove", wakeUp);
+ addEvent(doc, "keyup", wakeUp);
+ addEvent(doc, "touchstart", wakeUp);
+ addEvent(window, "scroll", wakeUp);
+ ifvisible.focus(wakeUp);
+ return ifvisible.wakeup(wakeUp);
+ };
+ init = function() {
+ var blur;
+ if (initialized) {
+ return true;
+ }
+ if (hidden === false) {
+ blur = "blur";
+ if (ie < 9) {
+ blur = "focusout";
+ }
+ addEvent(window, blur, function() {
+ return ifvisible.blur();
+ });
+ addEvent(window, "focus", function() {
+ return ifvisible.focus();
+ });
+ } else {
+ addEvent(doc, visibilityChange, function() {
+ if (doc[hidden]) {
+ return ifvisible.blur();
+ } else {
+ return ifvisible.focus();
+ }
+ }, false);
+ }
+ initialized = true;
+ return trackIdleStatus();
+ };
+ ifvisible = {
+ setIdleDuration: function(seconds) {
+ return idleTime = seconds * 1000;
+ },
+ getIdleDuration: function() {
+ return idleTime;
+ },
+ getIdleInfo: function() {
+ var now, res;
+ now = +(new Date());
+ res = {};
+ if (status === "idle") {
+ res.isIdle = true;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = 0;
+ res.timeLeftPer = 100;
+ } else {
+ res.isIdle = false;
+ res.idleFor = now - idleStartedTime;
+ res.timeLeft = (idleStartedTime + idleTime) - now;
+ res.timeLeftPer = (100 - (res.timeLeft * 100 / idleTime)).toFixed(2);
+ }
+ return res;
+ },
+ focus: function(callback) {
+ if (typeof callback === "function") {
+ this.on("focus", callback);
+ } else {
+ status = "active";
+ customEvent.fire(this, "focus");
+ customEvent.fire(this, "wakeup");
+ customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ }
+ return this;
+ },
+ blur: function(callback) {
+ if (typeof callback === "function") {
+ this.on("blur", callback);
+ } else {
+ status = "hidden";
+ customEvent.fire(this, "blur");
+ customEvent.fire(this, "idle");
+ customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ }
+ return this;
+ },
+ idle: function(callback) {
+ if (typeof callback === "function") {
+ this.on("idle", callback);
+ } else {
+ status = "idle";
+ customEvent.fire(this, "idle");
+ customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ }
+ return this;
+ },
+ wakeup: function(callback) {
+ if (typeof callback === "function") {
+ this.on("wakeup", callback);
+ } else {
+ status = "active";
+ customEvent.fire(this, "wakeup");
+ customEvent.fire(this, "statusChanged", {
+ status: status
+ });
+ }
+ return this;
+ },
+ on: function(name, callback) {
+ init();
+ customEvent.add(this, name, callback);
+ return this;
+ },
+ off: function(name, callback) {
+ init();
+ customEvent.remove(this, name, callback);
+ return this;
+ },
+ onEvery: function(seconds, callback) {
+ var paused, t;
+ init();
+ paused = false;
+ if (callback) {
+ t = setInterval(function() {
+ if (status === "active" && paused === false) {
+ return callback();
+ }
+ }, seconds * 1000);
+ }
+ return {
+ stop: function() {
+ return clearInterval(t);
+ },
+ pause: function() {
+ return paused = true;
+ },
+ resume: function() {
+ return paused = false;
+ },
+ code: t,
+ callback: callback
+ };
+ },
+ now: function(check) {
+ init();
+ return status === (check || "active");
+ }
+ };
+ return ifvisible;
+ });
+
+}).call(this);
+
+//# sourceMappingURL=ifvisible.js.map
+
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var root = __webpack_require__(27);
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
+
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseClone = __webpack_require__(102);
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * Creates a shallow clone of `value`.
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
*
- *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = clone;
+
+
+/***/ }),
+/* 47 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayFilter = __webpack_require__(178),
+ baseFilter = __webpack_require__(307),
+ baseIteratee = __webpack_require__(34),
+ isArray = __webpack_require__(12);
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
*/
+function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, baseIteratee(predicate, 3));
+}
+module.exports = filter;
+
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports) {
/**
- * WARNING: DO NOT manually require this module.
- * This is a replacement for `invariant(...)` used by the error code system
- * and will _only_ be required by the corresponding babel pass.
- * It always throws.
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
*/
+function identity(value) {
+ return value;
+}
-function reactProdInvariant(code) {
- var argCount = arguments.length - 1;
+module.exports = identity;
- var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
- for (var argIdx = 0; argIdx < argCount; argIdx++) {
- message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
- }
+/***/ }),
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
- message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+var baseGetTag = __webpack_require__(39),
+ isObjectLike = __webpack_require__(36);
- var error = new Error(message);
- error.name = 'Invariant Violation';
- error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
- throw error;
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
}
-module.exports = reactProdInvariant;
+module.exports = isSymbol;
+
/***/ }),
-/* 33 */
+/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(setImmediate) {/**
- * SyncTasks.ts
- * Author: David de Regt
- * Copyright: Microsoft 2015
+/**
+ * Copyright 2015-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- * A very simple promise library that resolves all promises synchronously instead of
- * kicking them back to the main ticking thread. This affirmatively rejects the A+
- * standard for promises, and is used for a combination of performance (wrapping
- * things back to the main thread is really slow) and because indexeddb loses
- * context for its calls if you send them around the event loop and transactions
- * automatically close.
- */
-
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.config = {
- // If we catch exceptions in success/fail blocks, it silently falls back to the fail case of the outer promise.
- // If this is global variable is true, it will also spit out a console.error with the exception for debugging.
- exceptionsToConsole: true,
- // Whether or not to actually attempt to catch exceptions with try/catch blocks inside the resolution cases.
- // Disable this for debugging when you'd rather the debugger caught the exception synchronously rather than
- // digging through a stack trace.
- catchExceptions: true,
- // Use this option in order to debug double resolution asserts locally.
- // Enabling this option in the release would have a negative impact on the application performance.
- traceEnabled: false,
- exceptionHandler: null,
- // If an ErrorFunc is not added to the task (then, catch, always) before the task rejects or synchonously
- // after that, then this function is called with the error. Default throws the error.
- unhandledErrorHandler: (function (err) { throw err; })
-};
-function fromThenable(thenable) {
- var deferred = Defer();
- // NOTE: The {} around the error handling is critical to ensure that
- // we do not trigger "Possible unhandled rejection" warnings. By adding
- // the braces, the error handler rejects the outer promise, but returns
- // void. If we remove the braces, it would *also* return something which
- // would be unhandled
- thenable.then(function (value) { deferred.resolve(value); return undefined; }, function (err) { deferred.reject(err); });
- return deferred.promise();
-}
-exports.fromThenable = fromThenable;
-function isThenable(object) {
- return object !== null && object !== void 0 && typeof object.then === 'function';
-}
-function isCancelable(object) {
- return object !== null && object !== void 0 && typeof object.cancel === 'function';
-}
-// Runs trier(). If config.catchExceptions is set then any exception is caught and handed to catcher.
-function run(trier, catcher) {
- if (exports.config.catchExceptions) {
- // Any try/catch/finally block in a function makes the entire function ineligible for optimization is most JS engines.
- // Make sure this stays in a small/quick function, or break out into its own function.
- try {
- return trier();
- }
- catch (e) {
- return catcher(e);
- }
- }
- else {
- return trier();
- }
-}
-var asyncCallbacks = [];
-// Ideally, we use setImmediate, but that's only supported on some environments.
-// Suggestion: Use the "setimmediate" NPM package to polyfill where it's not available.
-var useSetImmediate = typeof setImmediate !== 'undefined';
-/**
- * This function will defer callback of the specified callback lambda until the next JS tick, simulating standard A+ promise behavior
*/
-function asyncCallback(callback) {
- asyncCallbacks.push(callback);
- if (asyncCallbacks.length === 1) {
- // Start a callback for the next tick
- if (useSetImmediate) {
- setImmediate(resolveAsyncCallbacks);
- }
- else {
- setTimeout(resolveAsyncCallbacks, 0);
- }
- }
-}
-exports.asyncCallback = asyncCallback;
-function resolveAsyncCallbacks() {
- var savedCallbacks = asyncCallbacks;
- asyncCallbacks = [];
- for (var i = 0; i < savedCallbacks.length; i++) {
- savedCallbacks[i]();
- }
-}
-function Defer() {
- return new Internal.SyncTask();
-}
-exports.Defer = Defer;
-function Resolved(val) {
- return new Internal.SyncTask().resolve(val).promise();
-}
-exports.Resolved = Resolved;
-function Rejected(val) {
- return new Internal.SyncTask().reject(val).promise();
-}
-exports.Rejected = Rejected;
-var Internal;
-(function (Internal) {
- var SyncTask = (function () {
- function SyncTask() {
- this._completedSuccess = false;
- this._completedFail = false;
- this._traceEnabled = false;
- this._cancelCallbacks = [];
- this._wasCanceled = false;
- this._resolving = false;
- this._storedCallbackSets = [];
- // 'Handled' just means there was a callback set added.
- // Note: If that callback does not handle the error then that callback's task will be 'unhandled' instead of this one.
- this._mustHandleError = true;
- }
- SyncTask.prototype._addCallbackSet = function (set, callbackWillChain) {
- var task = new SyncTask();
- task.onCancel(this.cancel.bind(this));
- set.task = task;
- this._storedCallbackSets.push(set);
- if (callbackWillChain) {
- // The callback inherits responsibility for "handling" errors.
- this._mustHandleError = false;
- }
- else {
- // The callback can never "handle" errors since nothing can chain to it.
- task._mustHandleError = false;
- }
- // The _resolve* functions handle callbacks being added while they are running.
- if (!this._resolving) {
- if (this._completedSuccess) {
- this._resolveSuccesses();
- }
- else if (this._completedFail) {
- this._resolveFailures();
- }
- }
- return task.promise();
- };
- SyncTask.prototype.onCancel = function (callback) {
- // Only register cancel callback handler on promise that hasn't been completed
- if (!this._completedSuccess && !this._completedFail) {
- if (this._wasCanceled) {
- callback(this._cancelContext);
- }
- else {
- this._cancelCallbacks.push(callback);
- }
- }
- return this;
- };
- SyncTask.prototype.then = function (successFunc, errorFunc) {
- return this._addCallbackSet({
- successFunc: successFunc,
- failFunc: errorFunc
- }, true);
- };
- SyncTask.prototype.thenAsync = function (successFunc, errorFunc) {
- return this._addCallbackSet({
- successFunc: successFunc,
- failFunc: errorFunc,
- asyncCallback: true
- }, true);
- };
- SyncTask.prototype.catch = function (errorFunc) {
- return this._addCallbackSet({
- failFunc: errorFunc
- }, true);
- };
- SyncTask.prototype.always = function (func) {
- return this._addCallbackSet({
- successFunc: func,
- failFunc: func
- }, true);
- };
- SyncTask.prototype.setTracingEnabled = function (enabled) {
- this._traceEnabled = enabled;
- return this;
- };
- // Finally should let you inspect the value of the promise as it passes through without affecting the then chaining
- // i.e. a failed promise with a finally after it should then chain to the fail case of the next then
- SyncTask.prototype.finally = function (func) {
- this._addCallbackSet({
- successFunc: func,
- failFunc: func
- }, false);
- return this;
- };
- SyncTask.prototype.done = function (successFunc) {
- this._addCallbackSet({
- successFunc: successFunc
- }, false);
- return this;
- };
- SyncTask.prototype.fail = function (errorFunc) {
- this._addCallbackSet({
- failFunc: errorFunc
- }, false);
- return this;
- };
- SyncTask.prototype.resolve = function (obj) {
- this._checkState(true);
- this._completedSuccess = true;
- this._storedResolution = obj;
- this._resolveSuccesses();
- return this;
- };
- SyncTask.prototype.reject = function (obj) {
- this._checkState(false);
- this._completedFail = true;
- this._storedErrResolution = obj;
- this._resolveFailures();
- SyncTask._enforceErrorHandled(this);
- return this;
- };
- SyncTask.prototype._checkState = function (resolve) {
- if (this._completedSuccess || this._completedFail) {
- if (this._completeStack) {
- console.error(this._completeStack.message, this._completeStack.stack);
- }
- var message = 'Failed to ' + (resolve ? 'resolve' : 'reject') +
- ': the task is already ' + (this._completedSuccess ? 'resolved' : 'rejected');
- throw new Error(message);
- }
- if (exports.config.traceEnabled || this._traceEnabled) {
- this._completeStack = new Error( true ? 'resolve' : 'reject');
- }
- };
- // Make sure any rejected task has its failured handled.
- SyncTask._enforceErrorHandled = function (task) {
- if (!task._mustHandleError) {
- return;
- }
- SyncTask._rejectedTasks.push(task);
- // Wait for some async time in the future to check these tasks.
- if (!SyncTask._enforceErrorHandledTimer) {
- SyncTask._enforceErrorHandledTimer = setTimeout(function () {
- SyncTask._enforceErrorHandledTimer = null;
- var rejectedTasks = SyncTask._rejectedTasks;
- SyncTask._rejectedTasks = [];
- rejectedTasks.forEach(function (rejectedTask, i) {
- if (rejectedTask._mustHandleError) {
- // Unhandled!
- exports.config.unhandledErrorHandler(rejectedTask._storedErrResolution);
- }
- });
- }, 0);
- }
- };
- SyncTask.prototype.cancel = function (context) {
- var _this = this;
- if (this._wasCanceled) {
- throw new Error('Already Canceled');
- }
- this._wasCanceled = true;
- this._cancelContext = context;
- if (this._cancelCallbacks.length > 0) {
- this._cancelCallbacks.forEach(function (callback) {
- if (!_this._completedSuccess && !_this._completedFail) {
- callback(_this._cancelContext);
- }
- });
- }
- };
- SyncTask.prototype.promise = function () {
- return this;
- };
- SyncTask.prototype._resolveSuccesses = function () {
- var _this = this;
- this._resolving = true;
- // New callbacks can be added as the current callbacks run: use a loop to get through all of them.
- while (this._storedCallbackSets.length) {
- // Only iterate over the current list of callbacks.
- var callbacks = this._storedCallbackSets;
- this._storedCallbackSets = [];
- callbacks.forEach(function (callback) {
- if (callback.asyncCallback) {
- asyncCallback(_this._resolveCallback.bind(_this, callback));
- }
- else {
- _this._resolveCallback(callback);
- }
- });
- }
- this._resolving = false;
- };
- SyncTask.prototype._resolveCallback = function (callback) {
- var _this = this;
- if (callback.successFunc) {
- run(function () {
- var ret = callback.successFunc(_this._storedResolution);
- if (isCancelable(ret)) {
- _this._cancelCallbacks.push(ret.cancel.bind(ret));
- if (_this._wasCanceled) {
- ret.cancel(_this._cancelContext);
- }
- }
- if (isThenable(ret)) {
- // The success block of a then returned a new promise, so
- ret.then(function (r) { callback.task.resolve(r); }, function (e) { callback.task.reject(e); });
- }
- else {
- callback.task.resolve(ret);
- }
- }, function (e) {
- _this._handleException(e, 'SyncTask caught exception in success block: ' + e.toString());
- callback.task.reject(e);
- });
- }
- else {
- callback.task.resolve(this._storedResolution);
- }
- };
- SyncTask.prototype._resolveFailures = function () {
- var _this = this;
- this._resolving = true;
- // New callbacks can be added as the current callbacks run: use a loop to get through all of them.
- while (this._storedCallbackSets.length) {
- // Only iterate over the current list of callbacks.
- var callbacks = this._storedCallbackSets;
- this._storedCallbackSets = [];
- callbacks.forEach(function (callback) {
- if (callback.failFunc) {
- run(function () {
- var ret = callback.failFunc(_this._storedErrResolution);
- if (isCancelable(ret)) {
- _this._cancelCallbacks.push(ret.cancel.bind(ret));
- if (_this._wasCanceled) {
- ret.cancel(_this._cancelContext);
- }
- }
- if (isThenable(ret)) {
- ret.then(function (r) { callback.task.resolve(r); }, function (e) { callback.task.reject(e); });
- }
- else {
- // The failure has been handled: ret is the resolved value.
- callback.task.resolve(ret);
- }
- }, function (e) {
- _this._handleException(e, 'SyncTask caught exception in failure block: ' + e.toString());
- callback.task.reject(e);
- });
- }
- else {
- callback.task.reject(_this._storedErrResolution);
- }
- });
- }
- this._resolving = false;
- };
- SyncTask.prototype._handleException = function (e, message) {
- if (exports.config.exceptionsToConsole) {
- console.error(message);
- }
- if (exports.config.exceptionHandler) {
- exports.config.exceptionHandler(e);
- }
- };
- return SyncTask;
- }());
- SyncTask._rejectedTasks = [];
- SyncTask._enforceErrorHandledTimer = null;
- Internal.SyncTask = SyncTask;
-})(Internal || (Internal = {}));
-function all(items) {
- if (items.length === 0) {
- return Resolved([]);
- }
- var outTask = Defer();
- var countRemaining = items.length;
- var foundError = null;
- var results = Array(items.length);
- outTask.onCancel(function (val) {
- items.forEach(function (item) {
- if (isCancelable(item)) {
- item.cancel(val);
- }
- });
- });
- var checkFinish = function () {
- if (--countRemaining === 0) {
- if (foundError !== null) {
- outTask.reject(foundError);
- }
- else {
- outTask.resolve(results);
- }
- }
- };
- items.forEach(function (item, index) {
- if (isThenable(item)) {
- var task = item;
- task.then(function (res) {
- results[index] = res;
- checkFinish();
- }, function (err) {
- if (foundError === null) {
- foundError = (err !== null) ? err : true;
- }
- checkFinish();
- });
- }
- else {
- // Not a task, so resolve directly with the item
- results[index] = item;
- checkFinish();
- }
- });
- return outTask.promise();
-}
-exports.all = all;
-function race(items) {
- var outTask = Defer();
- var hasSettled = false;
- outTask.onCancel(function (val) {
- items.forEach(function (item) {
- if (isCancelable(item)) {
- item.cancel(val);
- }
- });
- });
- items.forEach(function (item) {
- if (isThenable(item)) {
- var task = item;
- task.then(function (res) {
- if (!hasSettled) {
- hasSettled = true;
- outTask.resolve(res);
- }
- }, function (err) {
- if (!hasSettled) {
- hasSettled = true;
- outTask.reject(err);
- }
- });
- }
- else {
- // Not a task, so resolve directly with the item
- if (!hasSettled) {
- hasSettled = true;
- outTask.resolve(item);
- }
- }
- });
- return outTask.promise();
-}
-exports.race = race;
-function raceTimer(promise, timeMs) {
- var timerDef = Defer();
- var token = setTimeout(function () {
- timerDef.resolve({ timedOut: true });
- }, timeMs);
- var adaptedPromise = promise.then(function (resp) {
- clearTimeout(token);
- return { timedOut: false, result: resp };
- });
- return race([adaptedPromise, timerDef.promise()]);
-}
-exports.raceTimer = raceTimer;
-
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(204).setImmediate))
-
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-var root = __webpack_require__(18);
-/** Built-in value references. */
-var Symbol = root.Symbol;
-module.exports = Symbol;
+var DOMNamespaces = __webpack_require__(142);
+var setInnerHTML = __webpack_require__(87);
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(149);
+var setTextContent = __webpack_require__(233);
-/***/ }),
-/* 35 */
-/***/ (function(module, exports) {
+var ELEMENT_NODE_TYPE = 1;
+var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
+ * In IE (8-11) and Edge, appending nodes with no children is dramatically
+ * faster than appending a full subtree, so we essentially queue up the
+ * .appendChild calls here and apply them so each node is added to its parent
+ * before any children are added.
*
- * var object = { 'a': 1 };
+ * In other browsers, doing so is slower or neutral compared to the other order
+ * (in Firefox, twice as slow) so we only do this inversion in IE.
*
- * console.log(_.identity(object) === object);
- * // => true
+ * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
*/
-function identity(value) {
- return value;
-}
-
-module.exports = identity;
-
-
-/***/ }),
-/* 36 */
-/***/ (function(module, exports, __webpack_require__) {
+var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
-var baseGetTag = __webpack_require__(28),
- isObjectLike = __webpack_require__(25);
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
-}
-
-module.exports = isSymbol;
-
-
-/***/ }),
-/* 37 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2015-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var DOMNamespaces = __webpack_require__(98);
-var setInnerHTML = __webpack_require__(69);
-
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(105);
-var setTextContent = __webpack_require__(189);
-
-var ELEMENT_NODE_TYPE = 1;
-var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
-
-/**
- * In IE (8-11) and Edge, appending nodes with no children is dramatically
- * faster than appending a full subtree, so we essentially queue up the
- * .appendChild calls here and apply them so each node is added to its parent
- * before any children are added.
- *
- * In other browsers, doing so is slower or neutral compared to the other order
- * (in Firefox, twice as slow) so we only do this inversion in IE.
- *
- * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
- */
-var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
-
-function insertTreeChildren(tree) {
- if (!enableLazy) {
- return;
- }
- var node = tree.node;
- var children = tree.children;
- if (children.length) {
- for (var i = 0; i < children.length; i++) {
- insertTreeBefore(node, children[i], null);
- }
- } else if (tree.html != null) {
- setInnerHTML(node, tree.html);
- } else if (tree.text != null) {
- setTextContent(node, tree.text);
- }
-}
+function insertTreeChildren(tree) {
+ if (!enableLazy) {
+ return;
+ }
+ var node = tree.node;
+ var children = tree.children;
+ if (children.length) {
+ for (var i = 0; i < children.length; i++) {
+ insertTreeBefore(node, children[i], null);
+ }
+ } else if (tree.html != null) {
+ setInnerHTML(node, tree.html);
+ } else if (tree.text != null) {
+ setTextContent(node, tree.text);
+ }
+}
var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
// DocumentFragments aren't actually part of the DOM after insertion so
@@ -4406,7 +7150,7 @@ DOMLazyTree.queueText = queueText;
module.exports = DOMLazyTree;
/***/ }),
-/* 38 */
+/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4422,10 +7166,10 @@ module.exports = DOMLazyTree;
-var ReactRef = __webpack_require__(409);
-var ReactInstrumentation = __webpack_require__(16);
+var ReactRef = __webpack_require__(456);
+var ReactInstrumentation = __webpack_require__(26);
-var warning = __webpack_require__(2);
+var warning = __webpack_require__(4);
/**
* Helper to call ReactRef.attachRefs with this composite component, split out
@@ -4436,7 +7180,6 @@ function attachRefs() {
}
var ReactReconciler = {
-
/**
* Initializes the component, renders markup, and registers event listeners.
*
@@ -4448,8 +7191,8 @@ var ReactReconciler = {
* @final
* @internal
*/
- mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
- ) {
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
+ {
if (process.env.NODE_ENV !== 'production') {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
@@ -4573,14 +7316,13 @@ var ReactReconciler = {
}
}
}
-
};
module.exports = ReactReconciler;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 39 */
+/* 52 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4596,27 +7338,26 @@ module.exports = ReactReconciler;
-var _assign = __webpack_require__(5);
+var _assign = __webpack_require__(9);
-var ReactChildren = __webpack_require__(439);
-var ReactComponent = __webpack_require__(112);
-var ReactPureComponent = __webpack_require__(444);
-var ReactClass = __webpack_require__(440);
-var ReactDOMFactories = __webpack_require__(441);
-var ReactElement = __webpack_require__(31);
-var ReactPropTypes = __webpack_require__(442);
-var ReactVersion = __webpack_require__(445);
+var ReactBaseClasses = __webpack_require__(235);
+var ReactChildren = __webpack_require__(486);
+var ReactDOMFactories = __webpack_require__(487);
+var ReactElement = __webpack_require__(42);
+var ReactPropTypes = __webpack_require__(489);
+var ReactVersion = __webpack_require__(491);
-var onlyChild = __webpack_require__(448);
-var warning = __webpack_require__(2);
+var createReactClass = __webpack_require__(493);
+var onlyChild = __webpack_require__(495);
var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;
var cloneElement = ReactElement.cloneElement;
if (process.env.NODE_ENV !== 'production') {
- var canDefineProperty = __webpack_require__(70);
- var ReactElementValidator = __webpack_require__(192);
+ var lowPriorityWarning = __webpack_require__(156);
+ var canDefineProperty = __webpack_require__(88);
+ var ReactElementValidator = __webpack_require__(237);
var didWarnPropTypesDeprecated = false;
createElement = ReactElementValidator.createElement;
createFactory = ReactElementValidator.createFactory;
@@ -4624,18 +7365,27 @@ if (process.env.NODE_ENV !== 'production') {
}
var __spread = _assign;
+var createMixin = function (mixin) {
+ return mixin;
+};
if (process.env.NODE_ENV !== 'production') {
- var warned = false;
+ var warnedForSpread = false;
+ var warnedForCreateMixin = false;
__spread = function () {
- process.env.NODE_ENV !== 'production' ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
- warned = true;
+ lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
+ warnedForSpread = true;
return _assign.apply(null, arguments);
};
+
+ createMixin = function (mixin) {
+ lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
+ warnedForCreateMixin = true;
+ return mixin;
+ };
}
var React = {
-
// Modern
Children: {
@@ -4646,8 +7396,8 @@ var React = {
only: onlyChild
},
- Component: ReactComponent,
- PureComponent: ReactPureComponent,
+ Component: ReactBaseClasses.Component,
+ PureComponent: ReactBaseClasses.PureComponent,
createElement: createElement,
cloneElement: cloneElement,
@@ -4656,12 +7406,9 @@ var React = {
// Classic
PropTypes: ReactPropTypes,
- createClass: ReactClass.createClass,
+ createClass: createReactClass,
createFactory: createFactory,
- createMixin: function (mixin) {
- // Currently a noop. Will be used to validate and trace mixins.
- return mixin;
- },
+ createMixin: createMixin,
// This looks DOM specific but these are actually isomorphic helpers
// since they are just generating DOM strings.
@@ -4673,28 +7420,51 @@ var React = {
__spread: __spread
};
-// TODO: Fix tests so that this deprecation warning doesn't cause failures.
if (process.env.NODE_ENV !== 'production') {
+ var warnedForCreateClass = false;
if (canDefineProperty) {
Object.defineProperty(React, 'PropTypes', {
get: function () {
- process.env.NODE_ENV !== 'production' ? warning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated. Use ' + 'the prop-types package from npm instead.') : void 0;
+ lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
didWarnPropTypesDeprecated = true;
return ReactPropTypes;
}
});
+
+ Object.defineProperty(React, 'createClass', {
+ get: function () {
+ lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
+ warnedForCreateClass = true;
+ return createReactClass;
+ }
+ });
}
+
+ // React.DOM factories are deprecated. Wrap these methods so that
+ // invocations of the React.DOM namespace and alert users to switch
+ // to the `react-dom-factories` package.
+ React.DOM = {};
+ var warnedForFactories = false;
+ Object.keys(ReactDOMFactories).forEach(function (factory) {
+ React.DOM[factory] = function () {
+ if (!warnedForFactories) {
+ lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
+ warnedForFactories = true;
+ }
+ return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
+ };
+ });
}
module.exports = React;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 40 */
+/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
+/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
@@ -4702,21 +7472,39 @@ module.exports = React;
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
+ *
*/
+/**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
-var emptyObject = {};
+function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
-if (process.env.NODE_ENV !== 'production') {
- Object.freeze(emptyObject);
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
}
-module.exports = emptyObject;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+module.exports = reactProdInvariant;
/***/ }),
-/* 41 */
+/* 54 */
/***/ (function(module, exports) {
/**
@@ -4743,12 +7531,12 @@ module.exports = arrayMap;
/***/ }),
-/* 42 */
+/* 55 */
/***/ (function(module, exports, __webpack_require__) {
-var identity = __webpack_require__(35),
- overRest = __webpack_require__(155),
- setToString = __webpack_require__(156);
+var identity = __webpack_require__(48),
+ overRest = __webpack_require__(204),
+ setToString = __webpack_require__(205);
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
@@ -4766,7 +7554,7 @@ module.exports = baseRest;
/***/ }),
-/* 43 */
+/* 56 */
/***/ (function(module, exports) {
/** Used for built-in method references. */
@@ -4790,10 +7578,10 @@ module.exports = isPrototype;
/***/ }),
-/* 44 */
+/* 57 */
/***/ (function(module, exports, __webpack_require__) {
-var isSymbol = __webpack_require__(36);
+var isSymbol = __webpack_require__(49);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
@@ -4817,7 +7605,7 @@ module.exports = toKey;
/***/ }),
-/* 45 */
+/* 58 */
/***/ (function(module, exports) {
/**
@@ -4860,11 +7648,11 @@ module.exports = eq;
/***/ }),
-/* 46 */
+/* 59 */
/***/ (function(module, exports, __webpack_require__) {
-var baseIsArguments = __webpack_require__(241),
- isObjectLike = __webpack_require__(25);
+var baseIsArguments = __webpack_require__(311),
+ isObjectLike = __webpack_require__(36);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -4902,11 +7690,11 @@ module.exports = isArguments;
/***/ }),
-/* 47 */
+/* 60 */
/***/ (function(module, exports, __webpack_require__) {
-/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(18),
- stubFalse = __webpack_require__(358);
+/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(27),
+ stubFalse = __webpack_require__(408);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
@@ -4944,15 +7732,15 @@ var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(118)(module)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(170)(module)))
/***/ }),
-/* 48 */
+/* 61 */
/***/ (function(module, exports, __webpack_require__) {
-var arrayLikeKeys = __webpack_require__(130),
- baseKeysIn = __webpack_require__(247),
- isArrayLike = __webpack_require__(21);
+var arrayLikeKeys = __webpack_require__(179),
+ baseKeysIn = __webpack_require__(317),
+ isArrayLike = __webpack_require__(31);
/**
* Creates an array of the own and inherited enumerable property names of `object`.
@@ -4985,7 +7773,7 @@ module.exports = keysIn;
/***/ }),
-/* 49 */
+/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5001,15 +7789,15 @@ module.exports = keysIn;
-var _prodInvariant = __webpack_require__(3);
+var _prodInvariant = __webpack_require__(5);
-var EventPluginRegistry = __webpack_require__(64);
-var EventPluginUtils = __webpack_require__(99);
-var ReactErrorUtils = __webpack_require__(103);
+var EventPluginRegistry = __webpack_require__(82);
+var EventPluginUtils = __webpack_require__(143);
+var ReactErrorUtils = __webpack_require__(147);
-var accumulateInto = __webpack_require__(183);
-var forEachAccumulated = __webpack_require__(184);
-var invariant = __webpack_require__(1);
+var accumulateInto = __webpack_require__(226);
+var forEachAccumulated = __webpack_require__(227);
+var invariant = __webpack_require__(3);
/**
* Internal store for event listeners
@@ -5096,12 +7884,10 @@ function shouldPreventMouseEvent(name, type, props) {
* @public
*/
var EventPluginHub = {
-
/**
* Methods for injecting dependencies.
*/
injection: {
-
/**
* @param {array} InjectedEventPluginOrder
* @public
@@ -5112,7 +7898,6 @@ var EventPluginHub = {
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
*/
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
-
},
/**
@@ -5262,14 +8047,13 @@ var EventPluginHub = {
__getListenerBank: function () {
return listenerBank;
}
-
};
module.exports = EventPluginHub;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 50 */
+/* 63 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5285,12 +8069,12 @@ module.exports = EventPluginHub;
-var EventPluginHub = __webpack_require__(49);
-var EventPluginUtils = __webpack_require__(99);
+var EventPluginHub = __webpack_require__(62);
+var EventPluginUtils = __webpack_require__(143);
-var accumulateInto = __webpack_require__(183);
-var forEachAccumulated = __webpack_require__(184);
-var warning = __webpack_require__(2);
+var accumulateInto = __webpack_require__(226);
+var forEachAccumulated = __webpack_require__(227);
+var warning = __webpack_require__(4);
var getListener = EventPluginHub.getListener;
@@ -5409,7 +8193,7 @@ module.exports = EventPropagators;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 51 */
+/* 64 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5435,7 +8219,6 @@ module.exports = EventPropagators;
// TODO: Replace this with ES6: var ReactInstanceMap = new Map();
var ReactInstanceMap = {
-
/**
* This API should be called `delete` but we'd have to make sure to always
* transform these to strings for IE support. When this transform is fully
@@ -5456,13 +8239,12 @@ var ReactInstanceMap = {
set: function (key, value) {
key._reactInternalInstance = value;
}
-
};
module.exports = ReactInstanceMap;
/***/ }),
-/* 52 */
+/* 65 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5478,9 +8260,9 @@ module.exports = ReactInstanceMap;
-var SyntheticEvent = __webpack_require__(22);
+var SyntheticEvent = __webpack_require__(33);
-var getEventTarget = __webpack_require__(108);
+var getEventTarget = __webpack_require__(152);
/**
* @interface UIEvent
@@ -5526,14 +8308,40 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
module.exports = SyntheticUIEvent;
/***/ }),
-/* 53 */
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var emptyObject = {};
+
+if (process.env.NODE_ENV !== 'production') {
+ Object.freeze(emptyObject);
+}
+
+module.exports = emptyObject;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 67 */
/***/ (function(module, exports, __webpack_require__) {
-var listCacheClear = __webpack_require__(299),
- listCacheDelete = __webpack_require__(300),
- listCacheGet = __webpack_require__(301),
- listCacheHas = __webpack_require__(302),
- listCacheSet = __webpack_require__(303);
+var listCacheClear = __webpack_require__(369),
+ listCacheDelete = __webpack_require__(370),
+ listCacheGet = __webpack_require__(371),
+ listCacheHas = __webpack_require__(372),
+ listCacheSet = __webpack_require__(373);
/**
* Creates an list cache object.
@@ -5564,15 +8372,15 @@ module.exports = ListCache;
/***/ }),
-/* 54 */
+/* 68 */
/***/ (function(module, exports, __webpack_require__) {
-var ListCache = __webpack_require__(53),
- stackClear = __webpack_require__(318),
- stackDelete = __webpack_require__(319),
- stackGet = __webpack_require__(320),
- stackHas = __webpack_require__(321),
- stackSet = __webpack_require__(322);
+var ListCache = __webpack_require__(67),
+ stackClear = __webpack_require__(388),
+ stackDelete = __webpack_require__(389),
+ stackGet = __webpack_require__(390),
+ stackHas = __webpack_require__(391),
+ stackSet = __webpack_require__(392);
/**
* Creates a stack cache object to store key-value pairs.
@@ -5597,10 +8405,10 @@ module.exports = Stack;
/***/ }),
-/* 55 */
+/* 69 */
/***/ (function(module, exports, __webpack_require__) {
-var eq = __webpack_require__(45);
+var eq = __webpack_require__(58);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
@@ -5624,10 +8432,10 @@ module.exports = assocIndexOf;
/***/ }),
-/* 56 */
+/* 70 */
/***/ (function(module, exports, __webpack_require__) {
-var defineProperty = __webpack_require__(143);
+var defineProperty = __webpack_require__(192);
/**
* The base implementation of `assignValue` and `assignMergeValue` without
@@ -5655,13 +8463,13 @@ module.exports = baseAssignValue;
/***/ }),
-/* 57 */
+/* 71 */
/***/ (function(module, exports, __webpack_require__) {
-var isArray = __webpack_require__(10),
- isKey = __webpack_require__(93),
- stringToPath = __webpack_require__(324),
- toString = __webpack_require__(63);
+var isArray = __webpack_require__(12),
+ isKey = __webpack_require__(115),
+ stringToPath = __webpack_require__(394),
+ toString = __webpack_require__(81);
/**
* Casts `value` to a path array if it's not one.
@@ -5682,10 +8490,10 @@ module.exports = castPath;
/***/ }),
-/* 58 */
+/* 72 */
/***/ (function(module, exports, __webpack_require__) {
-var isKeyable = __webpack_require__(297);
+var isKeyable = __webpack_require__(367);
/**
* Gets the data for `map`.
@@ -5706,7 +8514,7 @@ module.exports = getMapData;
/***/ }),
-/* 59 */
+/* 73 */
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
@@ -5734,10 +8542,10 @@ module.exports = isIndex;
/***/ }),
-/* 60 */
+/* 74 */
/***/ (function(module, exports, __webpack_require__) {
-var getNative = __webpack_require__(29);
+var getNative = __webpack_require__(40);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
@@ -5746,7 +8554,7 @@ module.exports = nativeCreate;
/***/ }),
-/* 61 */
+/* 75 */
/***/ (function(module, exports) {
/**
@@ -5770,12 +8578,86 @@ module.exports = setToArray;
/***/ }),
-/* 62 */
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(396);
+
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseFlatten = __webpack_require__(105);
+
+/**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+}
+
+module.exports = flatten;
+
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGet = __webpack_require__(106);
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
+
+
+/***/ }),
+/* 79 */
/***/ (function(module, exports, __webpack_require__) {
-var baseIsTypedArray = __webpack_require__(246),
- baseUnary = __webpack_require__(86),
- nodeUtil = __webpack_require__(312);
+var baseIsTypedArray = __webpack_require__(316),
+ baseUnary = __webpack_require__(108),
+ nodeUtil = __webpack_require__(382);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
@@ -5803,10 +8685,89 @@ module.exports = isTypedArray;
/***/ }),
-/* 63 */
+/* 80 */
/***/ (function(module, exports, __webpack_require__) {
-var baseToString = __webpack_require__(138);
+var MapCache = __webpack_require__(98);
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
+
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
+
+
+/***/ }),
+/* 81 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseToString = __webpack_require__(187);
/**
* Converts `value` to a string. An empty string is returned for `null`
@@ -5837,7 +8798,7 @@ module.exports = toString;
/***/ }),
-/* 64 */
+/* 82 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5854,9 +8815,9 @@ module.exports = toString;
-var _prodInvariant = __webpack_require__(3);
+var _prodInvariant = __webpack_require__(5);
-var invariant = __webpack_require__(1);
+var invariant = __webpack_require__(3);
/**
* Injectable ordering of event plugins.
@@ -5951,7 +8912,6 @@ function publishRegistrationName(registrationName, pluginModule, eventName) {
* @see {EventPluginHub}
*/
var EventPluginRegistry = {
-
/**
* Ordered list of injected plugins.
*/
@@ -6091,14 +9051,13 @@ var EventPluginRegistry = {
}
}
}
-
};
module.exports = EventPluginRegistry;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 65 */
+/* 83 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6114,14 +9073,14 @@ module.exports = EventPluginRegistry;
-var _assign = __webpack_require__(5);
+var _assign = __webpack_require__(9);
-var EventPluginRegistry = __webpack_require__(64);
-var ReactEventEmitterMixin = __webpack_require__(398);
-var ViewportMetrics = __webpack_require__(182);
+var EventPluginRegistry = __webpack_require__(82);
+var ReactEventEmitterMixin = __webpack_require__(446);
+var ViewportMetrics = __webpack_require__(225);
-var getVendorPrefixedEventName = __webpack_require__(434);
-var isEventSupported = __webpack_require__(109);
+var getVendorPrefixedEventName = __webpack_require__(481);
+var isEventSupported = __webpack_require__(153);
/**
* Summary of `ReactBrowserEventEmitter` event handling:
@@ -6279,7 +9238,6 @@ function getListeningForDocument(mountAt) {
* @internal
*/
var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
-
/**
* Injectable event backend
*/
@@ -6353,14 +9311,12 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
}
} else if (dependency === 'topScroll') {
-
if (isEventSupported('scroll', true)) {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
} else {
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
}
} else if (dependency === 'topFocus' || dependency === 'topBlur') {
-
if (isEventSupported('focus', true)) {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
@@ -6425,13 +9381,12 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
isMonitoringScrollValue = true;
}
}
-
});
module.exports = ReactBrowserEventEmitter;
/***/ }),
-/* 66 */
+/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6447,10 +9402,10 @@ module.exports = ReactBrowserEventEmitter;
-var SyntheticUIEvent = __webpack_require__(52);
-var ViewportMetrics = __webpack_require__(182);
+var SyntheticUIEvent = __webpack_require__(65);
+var ViewportMetrics = __webpack_require__(225);
-var getEventModifierState = __webpack_require__(107);
+var getEventModifierState = __webpack_require__(151);
/**
* @interface MouseEvent
@@ -6508,7 +9463,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
module.exports = SyntheticMouseEvent;
/***/ }),
-/* 67 */
+/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6525,9 +9480,9 @@ module.exports = SyntheticMouseEvent;
-var _prodInvariant = __webpack_require__(3);
+var _prodInvariant = __webpack_require__(5);
-var invariant = __webpack_require__(1);
+var invariant = __webpack_require__(3);
var OBSERVED_ERROR = {};
@@ -6622,6 +9577,8 @@ var TransactionImpl = {
return !!this._isInTransaction;
},
+ /* eslint-disable space-before-function-paren */
+
/**
* Executes the function within a safety window. Use this for the top level
* methods that result in large amounts of computation/mutations that would
@@ -6640,6 +9597,7 @@ var TransactionImpl = {
* @return {*} Return value from `method`.
*/
perform: function (method, scope, a, b, c, d, e, f) {
+ /* eslint-enable space-before-function-paren */
!!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
var errorThrown;
var ret;
@@ -6739,7 +9697,7 @@ module.exports = TransactionImpl;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 68 */
+/* 86 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6847,7 +9805,6 @@ function escapeHtml(string) {
}
// end code copied and modified from escape-html
-
/**
* Escapes text to prevent scripting attacks.
*
@@ -6867,7 +9824,7 @@ function escapeTextContentForBrowser(text) {
module.exports = escapeTextContentForBrowser;
/***/ }),
-/* 69 */
+/* 87 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6883,13 +9840,13 @@ module.exports = escapeTextContentForBrowser;
-var ExecutionEnvironment = __webpack_require__(8);
-var DOMNamespaces = __webpack_require__(98);
+var ExecutionEnvironment = __webpack_require__(13);
+var DOMNamespaces = __webpack_require__(142);
var WHITESPACE_TEST = /^[ \r\n\t\f]/;
var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(105);
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(149);
// SVG temp container for IE lacking innerHTML
var reusableSVGContainer;
@@ -6949,7 +9906,7 @@ if (ExecutionEnvironment.canUseDOM) {
// in hopes that this is preserved even if "\uFEFF" is transformed to
// the actual Unicode character (by Babel, for example).
// https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
- node.innerHTML = String.fromCharCode(0xFEFF) + html;
+ node.innerHTML = String.fromCharCode(0xfeff) + html;
// deleteData leaves an empty `TextNode` which offsets the index of all
// children. Definitely want to avoid this.
@@ -6970,7 +9927,7 @@ if (ExecutionEnvironment.canUseDOM) {
module.exports = setInnerHTML;
/***/ }),
-/* 70 */
+/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7002,7 +9959,7 @@ module.exports = canDefineProperty;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
/***/ }),
-/* 71 */
+/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7021,9 +9978,9 @@ var __extends = (this && this.__extends) || function (d, b) {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-var _ = __webpack_require__(9);
-var AccessibilityUtil_1 = __webpack_require__(451);
-var Types = __webpack_require__(14);
+var _ = __webpack_require__(14);
+var AccessibilityUtil_1 = __webpack_require__(503);
+var Types = __webpack_require__(19);
// Map of accessibility trait to an aria role attribute.
// What's a role attribute? https://www.w3.org/wiki/PF/XTech/HTML5/RoleAttribute
var roleMap = (_a = {},
@@ -7088,7 +10045,7 @@ var AccessibilityUtil = (function (_super) {
return traits.indexOf(Types.AccessibilityTrait.Selected) !== -1 ? true : undefined;
}
// Here we are returning undefined if the above condtion is not met
- // as we dont want to poluute the dom with "aria-selected = false" for every falsy condition
+ // as we dont want to pollute the dom with "aria-selected = false" for every falsy condition
return undefined;
};
return AccessibilityUtil;
@@ -7100,7 +10057,7 @@ var _a, _b;
/***/ }),
-/* 72 */
+/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7126,12 +10083,14 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {
}
return t;
};
-var React = __webpack_require__(6);
-var AccessibilityUtil_1 = __webpack_require__(71);
-var AnimateListEdits_1 = __webpack_require__(484);
-var restyleForInlineText = __webpack_require__(203);
-var Styles_1 = __webpack_require__(15);
-var ViewBase_1 = __webpack_require__(117);
+var React = __webpack_require__(1);
+var ReactDOM = __webpack_require__(2);
+var PropTypes = __webpack_require__(32);
+var AccessibilityUtil_1 = __webpack_require__(89);
+var AnimateListEdits_1 = __webpack_require__(535);
+var restyleForInlineText = __webpack_require__(249);
+var Styles_1 = __webpack_require__(20);
+var ViewBase_1 = __webpack_require__(160);
var _styles = {
defaultStyle: {
position: 'relative',
@@ -7140,6 +10099,29 @@ var _styles = {
flex: '0 0 auto',
overflow: 'hidden',
alignItems: 'stretch'
+ },
+ // See resize detector comments in renderResizeDetectorIfNeeded() method below.
+ resizeDetectorContainerStyles: {
+ position: 'absolute',
+ left: '0',
+ top: '0',
+ right: '0',
+ bottom: '0',
+ overflow: 'scroll',
+ zIndex: '-1',
+ visibility: 'hidden'
+ },
+ resizeGrowDetectorStyles: {
+ position: 'absolute',
+ left: '100500px',
+ top: '100500px',
+ width: '1px',
+ height: '1px'
+ },
+ resizeShrinkDetectorStyles: {
+ position: 'absolute',
+ width: '150%',
+ height: '150%'
}
};
if (typeof document !== 'undefined') {
@@ -7150,12 +10132,393 @@ if (typeof document !== 'undefined') {
style.appendChild(document.createTextNode(ignorePointerEvents));
head.appendChild(style);
}
-;
var View = (function (_super) {
__extends(View, _super);
function View() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.resizeDetectorNodes = {};
+ return _this;
+ }
+ View.prototype.renderResizeDetectorIfNeeded = function (containerStyles) {
+ // If needed, additional invisible DOM elements will be added inside the
+ // view to track the size changes that are performed behind our back by
+ // the browser's layout engine faster (ViewBase checks for the layout
+ // updates once a second and sometimes it's not fast enough).
+ var _this = this;
+ // Unfortunately
doesn't have `resize` event, so we're trying to
+ // detect the fact that the view has been resized with `scroll` events.
+ // To do that, we create two scrollable
s and we put them into a
+ // state in which `scroll` event is triggered by the browser when the
+ // container gets resized (one element triggers `scroll` when the
+ // container gets bigger, another triggers `scroll` when the container
+ // gets smaller).
+ if (!this.props.importantForLayout) {
+ return null;
+ }
+ if (containerStyles.position !== 'relative') {
+ console.error('View: importantForLayout property is applicable only for a view with relative position');
+ return null;
+ }
+ var initResizer = function (key, ref) {
+ var cur = _this.resizeDetectorNodes[key];
+ var element = ReactDOM.findDOMNode(ref);
+ if (cur) {
+ delete _this.resizeDetectorNodes[key];
+ }
+ if (element) {
+ _this.resizeDetectorNodes[key] = element;
+ }
+ _this.resizeDetectorOnScroll();
+ };
+ return [
+ (React.createElement("div", { key: 'grow', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('grow', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeGrowDetectorStyles }))),
+ (React.createElement("div", { key: 'shrink', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('shrink', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeShrinkDetectorStyles })))
+ ];
+ };
+ View.prototype.resizeDetectorReset = function () {
+ // Scroll the detectors to the bottom-right corner so
+ // that `scroll` events will be triggered when the container
+ // is resized.
+ var scrollMax = 100500;
+ var node = this.resizeDetectorNodes.grow;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ node = this.resizeDetectorNodes.shrink;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ };
+ View.prototype.resizeDetectorOnScroll = function () {
+ var _this = this;
+ if (this.resizeDetectorAnimationFrame) {
+ // Do not execute action more often than once per animation frame.
+ return;
+ }
+ this.resizeDetectorAnimationFrame = window.requestAnimationFrame(function () {
+ _this.resizeDetectorReset();
+ _this.resizeDetectorAnimationFrame = undefined;
+ ViewBase_1.default._checkViews();
+ });
+ };
+ View.prototype.getChildContext = function () {
+ // Let descendant Types components know that their nearest Types ancestor is not an Types.Text.
+ // Because they're in an Types.View, they should use their normal styling rather than their
+ // special styling for appearing inline with text.
+ return { isRxParentAText: false };
+ };
+ View.prototype._getContainerRef = function () {
+ return this;
+ };
+ View.prototype.render = function () {
+ var combinedStyles = Styles_1.default.combine(_styles.defaultStyle, this.props.style);
+ var ariaRole = AccessibilityUtil_1.default.accessibilityTraitToString(this.props.accessibilityTraits);
+ var ariaSelected = AccessibilityUtil_1.default.accessibilityTraitToAriaSelected(this.props.accessibilityTraits);
+ var isAriaHidden = AccessibilityUtil_1.default.isHidden(this.props.importantForAccessibility);
+ var props = {
+ role: ariaRole,
+ tabIndex: this.props.tabIndex,
+ style: combinedStyles,
+ title: this.props.title,
+ 'aria-label': this.props.accessibilityLabel,
+ 'aria-hidden': isAriaHidden,
+ 'aria-selected': ariaSelected,
+ onContextMenu: this.props.onContextMenu,
+ onMouseEnter: this.props.onMouseEnter,
+ onMouseLeave: this.props.onMouseLeave,
+ onMouseOver: this.props.onMouseOver,
+ onMouseMove: this.props.onMouseMove,
+ onDragEnter: this.props.onDragEnter,
+ onDragOver: this.props.onDragOver,
+ onDragLeave: this.props.onDragLeave,
+ onDrop: this.props.onDrop,
+ onClick: this.props.onPress,
+ onFocus: this.props.onFocus,
+ onBlur: this.props.onBlur,
+ onKeyDown: this.props.onKeyPress,
+ };
+ if (this.props.ignorePointerEvents) {
+ props.className = 'reactxp-ignore-pointer-events';
+ combinedStyles['pointerEvents'] = 'none';
+ }
+ var reactElement;
+ var childAnimationsEnabled = this.props.animateChildEnter || this.props.animateChildMove || this.props.animateChildLeave;
+ if (childAnimationsEnabled) {
+ reactElement = (React.createElement(AnimateListEdits_1.default, __assign({}, props, { animateChildEnter: this.props.animateChildEnter, animateChildMove: this.props.animateChildMove, animateChildLeave: this.props.animateChildLeave }), this.props.children));
+ }
+ else {
+ reactElement = (React.createElement("div", __assign({}, props),
+ this.renderResizeDetectorIfNeeded(combinedStyles),
+ this.props.children));
+ }
+ return this.context.isRxParentAText ?
+ restyleForInlineText(reactElement) :
+ reactElement;
+ };
+ return View;
+}(ViewBase_1.default));
+View.contextTypes = {
+ isRxParentAText: PropTypes.bool
+};
+View.childContextTypes = {
+ isRxParentAText: PropTypes.bool.isRequired
+};
+exports.View = View;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = View;
+
+
+/***/ }),
+/* 91 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* AccessibilityUtil.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of accessiblity functions for cross-platform
+* ReactXP framework.
+*/
+
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var _ = __webpack_require__(15);
+var AccessibilityUtil_1 = __webpack_require__(545);
+var Types = __webpack_require__(21);
+// Map of accessibility trait to an aria role attribute.
+// What's a role attribute? https://www.w3.org/wiki/PF/XTech/HTML5/RoleAttribute
+var roleMap = (_a = {},
+ _a[Types.AccessibilityTrait.None] = 'presentation',
+ _a[Types.AccessibilityTrait.Button] = 'button',
+ _a[Types.AccessibilityTrait.Link] = 'link',
+ _a[Types.AccessibilityTrait.Header] = 'heading',
+ _a[Types.AccessibilityTrait.Search] = 'search',
+ _a[Types.AccessibilityTrait.Image] = 'img',
+ _a[Types.AccessibilityTrait.Summary] = 'region',
+ _a[Types.AccessibilityTrait.Adjustable] = 'slider',
+ _a[Types.AccessibilityTrait.Menu] = 'menu',
+ _a[Types.AccessibilityTrait.MenuItem] = 'menuitem',
+ _a[Types.AccessibilityTrait.MenuBar] = 'menubar',
+ _a[Types.AccessibilityTrait.Tab] = 'tab',
+ _a[Types.AccessibilityTrait.TabList] = 'tablist',
+ _a[Types.AccessibilityTrait.List] = 'list',
+ _a[Types.AccessibilityTrait.ListItem] = 'listitem',
+ _a[Types.AccessibilityTrait.ListBox] = 'listbox',
+ _a[Types.AccessibilityTrait.Group] = 'group',
+ _a[Types.AccessibilityTrait.CheckBox] = 'checkbox',
+ _a[Types.AccessibilityTrait.ComboBox] = 'combobox',
+ _a[Types.AccessibilityTrait.Log] = 'log',
+ _a[Types.AccessibilityTrait.Status] = 'status',
+ _a[Types.AccessibilityTrait.Dialog] = 'dialog',
+ _a);
+// Map of accesssibility live region to an aria-live property.
+var liveRegionMap = (_b = {},
+ _b[Types.AccessibilityLiveRegion.None] = 'off',
+ _b[Types.AccessibilityLiveRegion.Assertive] = 'assertive',
+ _b[Types.AccessibilityLiveRegion.Polite] = 'polite',
+ _b);
+var AccessibilityUtil = (function (_super) {
+ __extends(AccessibilityUtil, _super);
+ function AccessibilityUtil() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ // Web equivalent value for aria-live property.
+ AccessibilityUtil.prototype.accessibilityLiveRegionToString = function (liveRegion) {
+ if (liveRegion) {
+ return liveRegionMap[liveRegion];
+ }
+ return undefined;
+ };
+ // Web equivalent value for role property.
+ // NOTE: Web only supports a single aria-role on a component.
+ AccessibilityUtil.prototype.accessibilityTraitToString = function (traits, defaultTrait) {
+ // Combine & remove duplicate traits.
+ var combinedTraits = defaultTrait ? [defaultTrait] : [];
+ if (traits) {
+ combinedTraits = _.union(combinedTraits, _.isArray(traits) ? traits : [traits]);
+ }
+ // Max enum value in this array of traits is role for web. Return corresponding
+ // role string from roleMap.
+ return combinedTraits.length > 0 ?
+ roleMap[_.max(_.filter(combinedTraits, function (t) { return roleMap.hasOwnProperty(t); }))]
+ : undefined;
+ };
+ AccessibilityUtil.prototype.accessibilityTraitToAriaSelected = function (traits) {
+ // Walk through each trait and check if there's a selected trait. Return if one is found.
+ if (traits && _.isArray(traits) && traits.indexOf(Types.AccessibilityTrait.Tab) !== -1) {
+ return traits.indexOf(Types.AccessibilityTrait.Selected) !== -1 ? true : undefined;
+ }
+ // Here we are returning undefined if the above condtion is not met
+ // as we dont want to pollute the dom with "aria-selected = false" for every falsy condition
+ return undefined;
+ };
+ return AccessibilityUtil;
+}(AccessibilityUtil_1.AccessibilityUtil));
+exports.AccessibilityUtil = AccessibilityUtil;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = new AccessibilityUtil();
+var _a, _b;
+
+
+/***/ }),
+/* 92 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* View.tsx
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of the cross-platform View abstraction.
+*/
+
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var __assign = (this && this.__assign) || Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+};
+var React = __webpack_require__(1);
+var ReactDOM = __webpack_require__(2);
+var PropTypes = __webpack_require__(32);
+var AccessibilityUtil_1 = __webpack_require__(91);
+var AnimateListEdits_1 = __webpack_require__(577);
+var restyleForInlineText = __webpack_require__(258);
+var Styles_1 = __webpack_require__(22);
+var ViewBase_1 = __webpack_require__(164);
+var _styles = {
+ defaultStyle: {
+ position: 'relative',
+ display: 'flex',
+ flexDirection: 'column',
+ flex: '0 0 auto',
+ overflow: 'hidden',
+ alignItems: 'stretch'
+ },
+ // See resize detector comments in renderResizeDetectorIfNeeded() method below.
+ resizeDetectorContainerStyles: {
+ position: 'absolute',
+ left: '0',
+ top: '0',
+ right: '0',
+ bottom: '0',
+ overflow: 'scroll',
+ zIndex: '-1',
+ visibility: 'hidden'
+ },
+ resizeGrowDetectorStyles: {
+ position: 'absolute',
+ left: '100500px',
+ top: '100500px',
+ width: '1px',
+ height: '1px'
+ },
+ resizeShrinkDetectorStyles: {
+ position: 'absolute',
+ width: '150%',
+ height: '150%'
+ }
+};
+if (typeof document !== 'undefined') {
+ var ignorePointerEvents = '.reactxp-ignore-pointer-events * { pointer-events: auto; }';
+ var head = document.head;
+ var style = document.createElement('style');
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode(ignorePointerEvents));
+ head.appendChild(style);
+}
+var View = (function (_super) {
+ __extends(View, _super);
+ function View() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.resizeDetectorNodes = {};
+ return _this;
+ }
+ View.prototype.renderResizeDetectorIfNeeded = function (containerStyles) {
+ // If needed, additional invisible DOM elements will be added inside the
+ // view to track the size changes that are performed behind our back by
+ // the browser's layout engine faster (ViewBase checks for the layout
+ // updates once a second and sometimes it's not fast enough).
+ var _this = this;
+ // Unfortunately
doesn't have `resize` event, so we're trying to
+ // detect the fact that the view has been resized with `scroll` events.
+ // To do that, we create two scrollable
s and we put them into a
+ // state in which `scroll` event is triggered by the browser when the
+ // container gets resized (one element triggers `scroll` when the
+ // container gets bigger, another triggers `scroll` when the container
+ // gets smaller).
+ if (!this.props.importantForLayout) {
+ return null;
+ }
+ if (containerStyles.position !== 'relative') {
+ console.error('View: importantForLayout property is applicable only for a view with relative position');
+ return null;
+ }
+ var initResizer = function (key, ref) {
+ var cur = _this.resizeDetectorNodes[key];
+ var element = ReactDOM.findDOMNode(ref);
+ if (cur) {
+ delete _this.resizeDetectorNodes[key];
+ }
+ if (element) {
+ _this.resizeDetectorNodes[key] = element;
+ }
+ _this.resizeDetectorOnScroll();
+ };
+ return [
+ (React.createElement("div", { key: 'grow', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('grow', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeGrowDetectorStyles }))),
+ (React.createElement("div", { key: 'shrink', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('shrink', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeShrinkDetectorStyles })))
+ ];
+ };
+ View.prototype.resizeDetectorReset = function () {
+ // Scroll the detectors to the bottom-right corner so
+ // that `scroll` events will be triggered when the container
+ // is resized.
+ var scrollMax = 100500;
+ var node = this.resizeDetectorNodes.grow;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ node = this.resizeDetectorNodes.shrink;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ };
+ View.prototype.resizeDetectorOnScroll = function () {
+ var _this = this;
+ if (this.resizeDetectorAnimationFrame) {
+ // Do not execute action more often than once per animation frame.
+ return;
+ }
+ this.resizeDetectorAnimationFrame = window.requestAnimationFrame(function () {
+ _this.resizeDetectorReset();
+ _this.resizeDetectorAnimationFrame = undefined;
+ ViewBase_1.default._checkViews();
+ });
+ };
View.prototype.getChildContext = function () {
// Let descendant Types components know that their nearest Types ancestor is not an Types.Text.
// Because they're in an Types.View, they should use their normal styling rather than their
@@ -7202,7 +10565,9 @@ var View = (function (_super) {
reactElement = (React.createElement(AnimateListEdits_1.default, __assign({}, props, { animateChildEnter: this.props.animateChildEnter, animateChildMove: this.props.animateChildMove, animateChildLeave: this.props.animateChildLeave }), this.props.children));
}
else {
- reactElement = (React.createElement("div", __assign({}, props), this.props.children));
+ reactElement = (React.createElement("div", __assign({}, props),
+ this.renderResizeDetectorIfNeeded(combinedStyles),
+ this.props.children));
}
return this.context.isRxParentAText ?
restyleForInlineText(reactElement) :
@@ -7211,10 +10576,10 @@ var View = (function (_super) {
return View;
}(ViewBase_1.default));
View.contextTypes = {
- isRxParentAText: React.PropTypes.bool
+ isRxParentAText: PropTypes.bool
};
View.childContextTypes = {
- isRxParentAText: React.PropTypes.bool.isRequired
+ isRxParentAText: PropTypes.bool.isRequired
};
exports.View = View;
Object.defineProperty(exports, "__esModule", { value: true });
@@ -7222,7 +10587,321 @@ exports.default = View;
/***/ }),
-/* 73 */
+/* 93 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* AccessibilityUtil.ts
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of accessiblity functions for cross-platform
+* ReactXP framework.
+*/
+
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var _ = __webpack_require__(16);
+var AccessibilityUtil_1 = __webpack_require__(581);
+var Types = __webpack_require__(23);
+// Map of accessibility trait to an aria role attribute.
+// What's a role attribute? https://www.w3.org/wiki/PF/XTech/HTML5/RoleAttribute
+var roleMap = (_a = {},
+ _a[Types.AccessibilityTrait.None] = 'presentation',
+ _a[Types.AccessibilityTrait.Button] = 'button',
+ _a[Types.AccessibilityTrait.Link] = 'link',
+ _a[Types.AccessibilityTrait.Header] = 'heading',
+ _a[Types.AccessibilityTrait.Search] = 'search',
+ _a[Types.AccessibilityTrait.Image] = 'img',
+ _a[Types.AccessibilityTrait.Summary] = 'region',
+ _a[Types.AccessibilityTrait.Adjustable] = 'slider',
+ _a[Types.AccessibilityTrait.Menu] = 'menu',
+ _a[Types.AccessibilityTrait.MenuItem] = 'menuitem',
+ _a[Types.AccessibilityTrait.MenuBar] = 'menubar',
+ _a[Types.AccessibilityTrait.Tab] = 'tab',
+ _a[Types.AccessibilityTrait.TabList] = 'tablist',
+ _a[Types.AccessibilityTrait.List] = 'list',
+ _a[Types.AccessibilityTrait.ListItem] = 'listitem',
+ _a[Types.AccessibilityTrait.ListBox] = 'listbox',
+ _a[Types.AccessibilityTrait.Group] = 'group',
+ _a[Types.AccessibilityTrait.CheckBox] = 'checkbox',
+ _a[Types.AccessibilityTrait.ComboBox] = 'combobox',
+ _a[Types.AccessibilityTrait.Log] = 'log',
+ _a[Types.AccessibilityTrait.Status] = 'status',
+ _a[Types.AccessibilityTrait.Dialog] = 'dialog',
+ _a);
+// Map of accesssibility live region to an aria-live property.
+var liveRegionMap = (_b = {},
+ _b[Types.AccessibilityLiveRegion.None] = 'off',
+ _b[Types.AccessibilityLiveRegion.Assertive] = 'assertive',
+ _b[Types.AccessibilityLiveRegion.Polite] = 'polite',
+ _b);
+var AccessibilityUtil = (function (_super) {
+ __extends(AccessibilityUtil, _super);
+ function AccessibilityUtil() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ // Web equivalent value for aria-live property.
+ AccessibilityUtil.prototype.accessibilityLiveRegionToString = function (liveRegion) {
+ if (liveRegion) {
+ return liveRegionMap[liveRegion];
+ }
+ return undefined;
+ };
+ // Web equivalent value for role property.
+ // NOTE: Web only supports a single aria-role on a component.
+ AccessibilityUtil.prototype.accessibilityTraitToString = function (traits, defaultTrait) {
+ // Combine & remove duplicate traits.
+ var combinedTraits = defaultTrait ? [defaultTrait] : [];
+ if (traits) {
+ combinedTraits = _.union(combinedTraits, _.isArray(traits) ? traits : [traits]);
+ }
+ // Max enum value in this array of traits is role for web. Return corresponding
+ // role string from roleMap.
+ return combinedTraits.length > 0 ?
+ roleMap[_.max(_.filter(combinedTraits, function (t) { return roleMap.hasOwnProperty(t); }))]
+ : undefined;
+ };
+ AccessibilityUtil.prototype.accessibilityTraitToAriaSelected = function (traits) {
+ // Walk through each trait and check if there's a selected trait. Return if one is found.
+ if (traits && _.isArray(traits) && traits.indexOf(Types.AccessibilityTrait.Tab) !== -1) {
+ return traits.indexOf(Types.AccessibilityTrait.Selected) !== -1 ? true : undefined;
+ }
+ // Here we are returning undefined if the above condtion is not met
+ // as we dont want to pollute the dom with "aria-selected = false" for every falsy condition
+ return undefined;
+ };
+ return AccessibilityUtil;
+}(AccessibilityUtil_1.AccessibilityUtil));
+exports.AccessibilityUtil = AccessibilityUtil;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = new AccessibilityUtil();
+var _a, _b;
+
+
+/***/ }),
+/* 94 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+* View.tsx
+*
+* Copyright (c) Microsoft Corporation. All rights reserved.
+* Licensed under the MIT license.
+*
+* Web-specific implementation of the cross-platform View abstraction.
+*/
+
+var __extends = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+};
+var __assign = (this && this.__assign) || Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+};
+var React = __webpack_require__(1);
+var ReactDOM = __webpack_require__(2);
+var PropTypes = __webpack_require__(32);
+var AccessibilityUtil_1 = __webpack_require__(93);
+var AnimateListEdits_1 = __webpack_require__(613);
+var restyleForInlineText = __webpack_require__(268);
+var Styles_1 = __webpack_require__(24);
+var ViewBase_1 = __webpack_require__(168);
+var _styles = {
+ defaultStyle: {
+ position: 'relative',
+ display: 'flex',
+ flexDirection: 'column',
+ flex: '0 0 auto',
+ overflow: 'hidden',
+ alignItems: 'stretch'
+ },
+ // See resize detector comments in renderResizeDetectorIfNeeded() method below.
+ resizeDetectorContainerStyles: {
+ position: 'absolute',
+ left: '0',
+ top: '0',
+ right: '0',
+ bottom: '0',
+ overflow: 'scroll',
+ zIndex: '-1',
+ visibility: 'hidden'
+ },
+ resizeGrowDetectorStyles: {
+ position: 'absolute',
+ left: '100500px',
+ top: '100500px',
+ width: '1px',
+ height: '1px'
+ },
+ resizeShrinkDetectorStyles: {
+ position: 'absolute',
+ width: '150%',
+ height: '150%'
+ }
+};
+if (typeof document !== 'undefined') {
+ var ignorePointerEvents = '.reactxp-ignore-pointer-events * { pointer-events: auto; }';
+ var head = document.head;
+ var style = document.createElement('style');
+ style.type = 'text/css';
+ style.appendChild(document.createTextNode(ignorePointerEvents));
+ head.appendChild(style);
+}
+var View = (function (_super) {
+ __extends(View, _super);
+ function View() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.resizeDetectorNodes = {};
+ return _this;
+ }
+ View.prototype.renderResizeDetectorIfNeeded = function (containerStyles) {
+ // If needed, additional invisible DOM elements will be added inside the
+ // view to track the size changes that are performed behind our back by
+ // the browser's layout engine faster (ViewBase checks for the layout
+ // updates once a second and sometimes it's not fast enough).
+ var _this = this;
+ // Unfortunately
doesn't have `resize` event, so we're trying to
+ // detect the fact that the view has been resized with `scroll` events.
+ // To do that, we create two scrollable
s and we put them into a
+ // state in which `scroll` event is triggered by the browser when the
+ // container gets resized (one element triggers `scroll` when the
+ // container gets bigger, another triggers `scroll` when the container
+ // gets smaller).
+ if (!this.props.importantForLayout) {
+ return null;
+ }
+ if (containerStyles.position !== 'relative') {
+ console.error('View: importantForLayout property is applicable only for a view with relative position');
+ return null;
+ }
+ var initResizer = function (key, ref) {
+ var cur = _this.resizeDetectorNodes[key];
+ var element = ReactDOM.findDOMNode(ref);
+ if (cur) {
+ delete _this.resizeDetectorNodes[key];
+ }
+ if (element) {
+ _this.resizeDetectorNodes[key] = element;
+ }
+ _this.resizeDetectorOnScroll();
+ };
+ return [
+ (React.createElement("div", { key: 'grow', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('grow', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeGrowDetectorStyles }))),
+ (React.createElement("div", { key: 'shrink', style: _styles.resizeDetectorContainerStyles, ref: function (ref) { return initResizer('shrink', ref); }, onScroll: function () { return _this.resizeDetectorOnScroll(); } },
+ React.createElement("div", { style: _styles.resizeShrinkDetectorStyles })))
+ ];
+ };
+ View.prototype.resizeDetectorReset = function () {
+ // Scroll the detectors to the bottom-right corner so
+ // that `scroll` events will be triggered when the container
+ // is resized.
+ var scrollMax = 100500;
+ var node = this.resizeDetectorNodes.grow;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ node = this.resizeDetectorNodes.shrink;
+ if (node) {
+ node.scrollLeft = scrollMax;
+ node.scrollTop = scrollMax;
+ }
+ };
+ View.prototype.resizeDetectorOnScroll = function () {
+ var _this = this;
+ if (this.resizeDetectorAnimationFrame) {
+ // Do not execute action more often than once per animation frame.
+ return;
+ }
+ this.resizeDetectorAnimationFrame = window.requestAnimationFrame(function () {
+ _this.resizeDetectorReset();
+ _this.resizeDetectorAnimationFrame = undefined;
+ ViewBase_1.default._checkViews();
+ });
+ };
+ View.prototype.getChildContext = function () {
+ // Let descendant Types components know that their nearest Types ancestor is not an Types.Text.
+ // Because they're in an Types.View, they should use their normal styling rather than their
+ // special styling for appearing inline with text.
+ return { isRxParentAText: false };
+ };
+ View.prototype._getContainerRef = function () {
+ return this;
+ };
+ View.prototype.render = function () {
+ var combinedStyles = Styles_1.default.combine(_styles.defaultStyle, this.props.style);
+ var ariaRole = AccessibilityUtil_1.default.accessibilityTraitToString(this.props.accessibilityTraits);
+ var ariaSelected = AccessibilityUtil_1.default.accessibilityTraitToAriaSelected(this.props.accessibilityTraits);
+ var isAriaHidden = AccessibilityUtil_1.default.isHidden(this.props.importantForAccessibility);
+ var props = {
+ role: ariaRole,
+ tabIndex: this.props.tabIndex,
+ style: combinedStyles,
+ title: this.props.title,
+ 'aria-label': this.props.accessibilityLabel,
+ 'aria-hidden': isAriaHidden,
+ 'aria-selected': ariaSelected,
+ onContextMenu: this.props.onContextMenu,
+ onMouseEnter: this.props.onMouseEnter,
+ onMouseLeave: this.props.onMouseLeave,
+ onMouseOver: this.props.onMouseOver,
+ onMouseMove: this.props.onMouseMove,
+ onDragEnter: this.props.onDragEnter,
+ onDragOver: this.props.onDragOver,
+ onDragLeave: this.props.onDragLeave,
+ onDrop: this.props.onDrop,
+ onClick: this.props.onPress,
+ onFocus: this.props.onFocus,
+ onBlur: this.props.onBlur,
+ onKeyDown: this.props.onKeyPress,
+ };
+ if (this.props.ignorePointerEvents) {
+ props.className = 'reactxp-ignore-pointer-events';
+ combinedStyles['pointerEvents'] = 'none';
+ }
+ var reactElement;
+ var childAnimationsEnabled = this.props.animateChildEnter || this.props.animateChildMove || this.props.animateChildLeave;
+ if (childAnimationsEnabled) {
+ reactElement = (React.createElement(AnimateListEdits_1.default, __assign({}, props, { animateChildEnter: this.props.animateChildEnter, animateChildMove: this.props.animateChildMove, animateChildLeave: this.props.animateChildLeave }), this.props.children));
+ }
+ else {
+ reactElement = (React.createElement("div", __assign({}, props),
+ this.renderResizeDetectorIfNeeded(combinedStyles),
+ this.props.children));
+ }
+ return this.context.isRxParentAText ?
+ restyleForInlineText(reactElement) :
+ reactElement;
+ };
+ return View;
+}(ViewBase_1.default));
+View.contextTypes = {
+ isRxParentAText: PropTypes.bool
+};
+View.childContextTypes = {
+ isRxParentAText: PropTypes.bool.isRequired
+};
+exports.View = View;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = View;
+
+
+/***/ }),
+/* 95 */
/***/ (function(module, exports) {
var g;
@@ -7249,7 +10928,7 @@ module.exports = g;
/***/ }),
-/* 74 */
+/* 96 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7322,11 +11001,11 @@ function shallowEqual(objA, objB) {
module.exports = shallowEqual;
/***/ }),
-/* 75 */
+/* 97 */
/***/ (function(module, exports, __webpack_require__) {
-var getNative = __webpack_require__(29),
- root = __webpack_require__(18);
+var getNative = __webpack_require__(40),
+ root = __webpack_require__(27);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
@@ -7335,14 +11014,14 @@ module.exports = Map;
/***/ }),
-/* 76 */
+/* 98 */
/***/ (function(module, exports, __webpack_require__) {
-var mapCacheClear = __webpack_require__(304),
- mapCacheDelete = __webpack_require__(305),
- mapCacheGet = __webpack_require__(306),
- mapCacheHas = __webpack_require__(307),
- mapCacheSet = __webpack_require__(308);
+var mapCacheClear = __webpack_require__(374),
+ mapCacheDelete = __webpack_require__(375),
+ mapCacheGet = __webpack_require__(376),
+ mapCacheHas = __webpack_require__(377),
+ mapCacheSet = __webpack_require__(378);
/**
* Creates a map cache object to store key-value pairs.
@@ -7373,7 +11052,7 @@ module.exports = MapCache;
/***/ }),
-/* 77 */
+/* 99 */
/***/ (function(module, exports) {
/**
@@ -7399,7 +11078,7 @@ module.exports = arrayPush;
/***/ }),
-/* 78 */
+/* 100 */
/***/ (function(module, exports) {
/**
@@ -7431,11 +11110,11 @@ module.exports = arrayReduce;
/***/ }),
-/* 79 */
+/* 101 */
/***/ (function(module, exports, __webpack_require__) {
-var baseAssignValue = __webpack_require__(56),
- eq = __webpack_require__(45);
+var baseAssignValue = __webpack_require__(70),
+ eq = __webpack_require__(58);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -7465,28 +11144,28 @@ module.exports = assignValue;
/***/ }),
-/* 80 */
+/* 102 */
/***/ (function(module, exports, __webpack_require__) {
-var Stack = __webpack_require__(54),
- arrayEach = __webpack_require__(128),
- assignValue = __webpack_require__(79),
- baseAssign = __webpack_require__(231),
- baseAssignIn = __webpack_require__(232),
- cloneBuffer = __webpack_require__(141),
- copyArray = __webpack_require__(88),
- copySymbols = __webpack_require__(271),
- copySymbolsIn = __webpack_require__(272),
- getAllKeys = __webpack_require__(146),
- getAllKeysIn = __webpack_require__(147),
- getTag = __webpack_require__(92),
- initCloneArray = __webpack_require__(294),
- initCloneByTag = __webpack_require__(295),
- initCloneObject = __webpack_require__(149),
- isArray = __webpack_require__(10),
- isBuffer = __webpack_require__(47),
- isObject = __webpack_require__(12),
- keys = __webpack_require__(26);
+var Stack = __webpack_require__(68),
+ arrayEach = __webpack_require__(177),
+ assignValue = __webpack_require__(101),
+ baseAssign = __webpack_require__(301),
+ baseAssignIn = __webpack_require__(302),
+ cloneBuffer = __webpack_require__(190),
+ copyArray = __webpack_require__(110),
+ copySymbols = __webpack_require__(341),
+ copySymbolsIn = __webpack_require__(342),
+ getAllKeys = __webpack_require__(195),
+ getAllKeysIn = __webpack_require__(196),
+ getTag = __webpack_require__(114),
+ initCloneArray = __webpack_require__(364),
+ initCloneByTag = __webpack_require__(365),
+ initCloneObject = __webpack_require__(198),
+ isArray = __webpack_require__(12),
+ isBuffer = __webpack_require__(60),
+ isObject = __webpack_require__(17),
+ keys = __webpack_require__(28);
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
@@ -7624,11 +11303,11 @@ module.exports = baseClone;
/***/ }),
-/* 81 */
+/* 103 */
/***/ (function(module, exports, __webpack_require__) {
-var baseForOwn = __webpack_require__(133),
- createBaseEach = __webpack_require__(274);
+var baseForOwn = __webpack_require__(182),
+ createBaseEach = __webpack_require__(344);
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
@@ -7644,7 +11323,7 @@ module.exports = baseEach;
/***/ }),
-/* 82 */
+/* 104 */
/***/ (function(module, exports) {
/**
@@ -7674,11 +11353,11 @@ module.exports = baseFindIndex;
/***/ }),
-/* 83 */
+/* 105 */
/***/ (function(module, exports, __webpack_require__) {
-var arrayPush = __webpack_require__(77),
- isFlattenable = __webpack_require__(296);
+var arrayPush = __webpack_require__(99),
+ isFlattenable = __webpack_require__(366);
/**
* The base implementation of `_.flatten` with support for restricting flattening.
@@ -7718,11 +11397,11 @@ module.exports = baseFlatten;
/***/ }),
-/* 84 */
+/* 106 */
/***/ (function(module, exports, __webpack_require__) {
-var castPath = __webpack_require__(57),
- toKey = __webpack_require__(44);
+var castPath = __webpack_require__(71),
+ toKey = __webpack_require__(57);
/**
* The base implementation of `_.get` without support for default values.
@@ -7748,11 +11427,11 @@ module.exports = baseGet;
/***/ }),
-/* 85 */
+/* 107 */
/***/ (function(module, exports, __webpack_require__) {
-var baseIsEqualDeep = __webpack_require__(242),
- isObjectLike = __webpack_require__(25);
+var baseIsEqualDeep = __webpack_require__(312),
+ isObjectLike = __webpack_require__(36);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
@@ -7782,7 +11461,7 @@ module.exports = baseIsEqual;
/***/ }),
-/* 86 */
+/* 108 */
/***/ (function(module, exports) {
/**
@@ -7802,10 +11481,10 @@ module.exports = baseUnary;
/***/ }),
-/* 87 */
+/* 109 */
/***/ (function(module, exports, __webpack_require__) {
-var Uint8Array = __webpack_require__(127);
+var Uint8Array = __webpack_require__(176);
/**
* Creates a clone of `arrayBuffer`.
@@ -7824,7 +11503,7 @@ module.exports = cloneArrayBuffer;
/***/ }),
-/* 88 */
+/* 110 */
/***/ (function(module, exports) {
/**
@@ -7850,11 +11529,11 @@ module.exports = copyArray;
/***/ }),
-/* 89 */
+/* 111 */
/***/ (function(module, exports, __webpack_require__) {
-var baseRest = __webpack_require__(42),
- isIterateeCall = __webpack_require__(150);
+var baseRest = __webpack_require__(55),
+ isIterateeCall = __webpack_require__(199);
/**
* Creates a function like `_.assign`.
@@ -7893,10 +11572,10 @@ module.exports = createAssigner;
/***/ }),
-/* 90 */
+/* 112 */
/***/ (function(module, exports, __webpack_require__) {
-var overArg = __webpack_require__(154);
+var overArg = __webpack_require__(203);
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
@@ -7905,11 +11584,11 @@ module.exports = getPrototype;
/***/ }),
-/* 91 */
+/* 113 */
/***/ (function(module, exports, __webpack_require__) {
-var arrayFilter = __webpack_require__(129),
- stubArray = __webpack_require__(165);
+var arrayFilter = __webpack_require__(178),
+ stubArray = __webpack_require__(209);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -7941,16 +11620,16 @@ module.exports = getSymbols;
/***/ }),
-/* 92 */
+/* 114 */
/***/ (function(module, exports, __webpack_require__) {
-var DataView = __webpack_require__(220),
- Map = __webpack_require__(75),
- Promise = __webpack_require__(222),
- Set = __webpack_require__(125),
- WeakMap = __webpack_require__(223),
- baseGetTag = __webpack_require__(28),
- toSource = __webpack_require__(157);
+var DataView = __webpack_require__(290),
+ Map = __webpack_require__(97),
+ Promise = __webpack_require__(292),
+ Set = __webpack_require__(174),
+ WeakMap = __webpack_require__(293),
+ baseGetTag = __webpack_require__(39),
+ toSource = __webpack_require__(206);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
@@ -8005,11 +11684,11 @@ module.exports = getTag;
/***/ }),
-/* 93 */
+/* 115 */
/***/ (function(module, exports, __webpack_require__) {
-var isArray = __webpack_require__(10),
- isSymbol = __webpack_require__(36);
+var isArray = __webpack_require__(12),
+ isSymbol = __webpack_require__(49);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
@@ -8040,11 +11719,414 @@ module.exports = isKey;
/***/ }),
-/* 94 */
+/* 116 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assignValue = __webpack_require__(101),
+ copyObject = __webpack_require__(35),
+ createAssigner = __webpack_require__(111),
+ isArrayLike = __webpack_require__(31),
+ isPrototype = __webpack_require__(56),
+ keys = __webpack_require__(28);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+});
+
+module.exports = assign;
+
+
+/***/ }),
+/* 117 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseClone = __webpack_require__(102);
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = cloneDeep;
+
+
+/***/ }),
+/* 118 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseDelay = __webpack_require__(305),
+ baseRest = __webpack_require__(55);
+
+/**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+});
+
+module.exports = defer;
+
+
+/***/ }),
+/* 119 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(401);
+
+
+/***/ }),
+/* 120 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseClamp = __webpack_require__(303),
+ baseToString = __webpack_require__(187),
+ toInteger = __webpack_require__(138),
+ toString = __webpack_require__(81);
+
+/**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+}
+
+module.exports = endsWith;
+
+
+/***/ }),
+/* 121 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseFindIndex = __webpack_require__(104),
+ baseIteratee = __webpack_require__(34),
+ toInteger = __webpack_require__(138);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+}
+
+module.exports = findIndex;
+
+
+/***/ }),
+/* 122 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var createFind = __webpack_require__(347),
+ findLastIndex = __webpack_require__(400);
+
+/**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+var findLast = createFind(findLastIndex);
+
+module.exports = findLast;
+
+
+/***/ }),
+/* 123 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseKeys = __webpack_require__(185),
+ getTag = __webpack_require__(114),
+ isArguments = __webpack_require__(59),
+ isArray = __webpack_require__(12),
+ isArrayLike = __webpack_require__(31),
+ isBuffer = __webpack_require__(60),
+ isPrototype = __webpack_require__(56),
+ isTypedArray = __webpack_require__(79);
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = isEmpty;
+
+
+/***/ }),
+/* 124 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsEqual = __webpack_require__(107);
+
+/**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+function isEqual(value, other) {
+ return baseIsEqual(value, other);
+}
+
+module.exports = isEqual;
+
+
+/***/ }),
+/* 125 */
/***/ (function(module, exports, __webpack_require__) {
-var baseGetTag = __webpack_require__(28),
- isObject = __webpack_require__(12);
+var baseGetTag = __webpack_require__(39),
+ isObject = __webpack_require__(17);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
@@ -8083,7 +12165,7 @@ module.exports = isFunction;
/***/ }),
-/* 95 */
+/* 126 */
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
@@ -8124,537 +12206,633 @@ module.exports = isLength;
/***/ }),
-/* 96 */
+/* 127 */
/***/ (function(module, exports, __webpack_require__) {
-var toFinite = __webpack_require__(360);
+var baseGetTag = __webpack_require__(39),
+ isObjectLike = __webpack_require__(36);
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
/**
- * Converts `value` to an integer.
+ * Checks if `value` is classified as a `Number` primitive or object.
*
- * **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
- * @since 4.0.0
+ * @since 0.1.0
* @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
- * _.toInteger(3.2);
- * // => 3
+ * _.isNumber(3);
+ * // => true
*
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
*
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
+ * _.isNumber(Infinity);
+ * // => true
*
- * _.toInteger('3.2');
- * // => 3
+ * _.isNumber('3');
+ * // => false
*/
-function toInteger(value) {
- var result = toFinite(value),
- remainder = result % 1;
-
- return result === result ? (remainder ? result - remainder : result) : 0;
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
}
-module.exports = toInteger;
+module.exports = isNumber;
/***/ }),
-/* 97 */
+/* 128 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
+var createCompounder = __webpack_require__(346);
+
+/**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
*
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
*/
+var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+});
+module.exports = kebabCase;
-var DOMLazyTree = __webpack_require__(37);
-var Danger = __webpack_require__(372);
-var ReactDOMComponentTree = __webpack_require__(7);
-var ReactInstrumentation = __webpack_require__(16);
-
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(105);
-var setInnerHTML = __webpack_require__(69);
-var setTextContent = __webpack_require__(189);
+/***/ }),
+/* 129 */
+/***/ (function(module, exports, __webpack_require__) {
-function getNodeAfter(parentNode, node) {
- // Special case for text components, which return [open, close] comments
- // from getHostNode.
- if (Array.isArray(node)) {
- node = node[1];
- }
- return node ? node.nextSibling : parentNode.firstChild;
-}
+var arrayMap = __webpack_require__(54),
+ baseIteratee = __webpack_require__(34),
+ baseMap = __webpack_require__(186),
+ isArray = __webpack_require__(12);
/**
- * Inserts `childNode` as a child of `parentNode` at the `index`.
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
*
- * @param {DOMElement} parentNode Parent node in which to insert.
- * @param {DOMElement} childNode Child node to insert.
- * @param {number} index Index at which to insert the child.
- * @internal
- */
-var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
- // We rely exclusively on `insertBefore(node, null)` instead of also using
- // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
- // we are careful to use `null`.)
- parentNode.insertBefore(childNode, referenceNode);
-});
-
-function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
- DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
-}
-
-function moveChild(parentNode, childNode, referenceNode) {
- if (Array.isArray(childNode)) {
- moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
- } else {
- insertChildAt(parentNode, childNode, referenceNode);
- }
-}
-
-function removeChild(parentNode, childNode) {
- if (Array.isArray(childNode)) {
- var closingComment = childNode[1];
- childNode = childNode[0];
- removeDelimitedText(parentNode, childNode, closingComment);
- parentNode.removeChild(closingComment);
- }
- parentNode.removeChild(childNode);
-}
-
-function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
- var node = openingComment;
- while (true) {
- var nextNode = node.nextSibling;
- insertChildAt(parentNode, node, referenceNode);
- if (node === closingComment) {
- break;
- }
- node = nextNode;
- }
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, baseIteratee(iteratee, 3));
}
-function removeDelimitedText(parentNode, startNode, closingComment) {
- while (true) {
- var node = startNode.nextSibling;
- if (node === closingComment) {
- // The closing comment is removed by ReactMultiChild.
- break;
- } else {
- parentNode.removeChild(node);
- }
- }
-}
+module.exports = map;
-function replaceDelimitedText(openingComment, closingComment, stringText) {
- var parentNode = openingComment.parentNode;
- var nodeAfterComment = openingComment.nextSibling;
- if (nodeAfterComment === closingComment) {
- // There are no text nodes between the opening and closing comments; insert
- // a new one if stringText isn't empty.
- if (stringText) {
- insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
- }
- } else {
- if (stringText) {
- // Set the text content of the first node after the opening comment, and
- // remove all following nodes up until the closing comment.
- setTextContent(nodeAfterComment, stringText);
- removeDelimitedText(parentNode, nodeAfterComment, closingComment);
- } else {
- removeDelimitedText(parentNode, openingComment, closingComment);
- }
- }
- if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onHostOperation({
- instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
- type: 'replace text',
- payload: stringText
- });
- }
-}
+/***/ }),
+/* 130 */
+/***/ (function(module, exports, __webpack_require__) {
-var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
-if (process.env.NODE_ENV !== 'production') {
- dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
- Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
- if (prevInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onHostOperation({
- instanceID: prevInstance._debugID,
- type: 'replace with',
- payload: markup.toString()
- });
- } else {
- var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
- if (nextInstance._debugID !== 0) {
- ReactInstrumentation.debugTool.onHostOperation({
- instanceID: nextInstance._debugID,
- type: 'mount',
- payload: markup.toString()
- });
- }
- }
- };
-}
+var baseAssignValue = __webpack_require__(70),
+ baseForOwn = __webpack_require__(182),
+ baseIteratee = __webpack_require__(34);
/**
- * Operations for updating with DOM children.
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
-var DOMChildrenOperations = {
-
- dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
-
- replaceDelimitedText: replaceDelimitedText,
-
- /**
- * Updates a component's children by processing a series of updates. The
- * update configurations are each expected to have a `parentNode` property.
- *
- * @param {array