Compare commits

...
127 Commits
Author SHA1 Message Date
Tadeu Valentt 2a41509480 Fix #17610, Add fixtures to metro blacklist
Summary:
Include a default blacklist into the build settings to prevent
processing of incorrect fixture files by Metro.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Fix #17610 issue, preventing metro from processing fixture files

1. Have a working demo
2. Install https://github.com/oblador/react-native-vector-icons
3. Use in a component
4. Start the app
5. The app starts successfully and display the icons

[ GENERAL  ]  [ BUGFIX ]  [local-cli/util/Config.js] - Add default file blacklist
Closes https://github.com/facebook/react-native/pull/17672

Differential Revision: D7014627

Pulled By: hramos

fbshipit-source-id: 20974e6fdd0977eeeb1048c29c9d621c803c26e9
2018-02-21 12:55:00 +01:00
Mike Grabowski 2563503d0c [0.53.3] Bump version numbers 2018-02-20 11:35:21 +01:00
Johan Ruokangas ee60c11f75 Pass port when running on device (fix #17973)
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Building for iOS device `react-native run-ios --device [id]` fails since port is not passed. This is a blocker for us and prevents us from updating to latest React Native stable.

I've tested this in our app and also in fresh app using RN master and verified that it works.

None.

[CLI] [BUGFIX] [local-cli/runIOS/runIOS.js] - Pass metro port when running on device
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17983

Differential Revision: D6988299

Pulled By: hramos

fbshipit-source-id: 5169706600f87f13b9c9c105eb7d6db7a40194f1
2018-02-20 11:35:02 +01:00
Mike Grabowski 847a6f9eec [0.53.2] Bump version numbers 2018-02-19 14:10:55 +01:00
Mike Grabowski f7f400fb7e [0.53.1] Bump version numbers 2018-02-14 15:46:43 +01:00
Eric Rozell 2f70001c6c Uses a single code path to link and unlink all platforms
Summary:
This commit removes special cases for linking iOS and Android platforms.

A previous commit opened up link and other commands for other platforms to provide their own behaviors. It left special cases in tact for iOS and Android. This PR removes the special case.

- Added jest tests related to the link command.
- Ran the `link` and `unlink` commands for iOS and Android and confirmed no changes.

https://github.com/facebook/react-native/pull/17745

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/link/link.js] - Removes special cases for linking in iOS and Android.
Closes https://github.com/facebook/react-native/pull/17961

Differential Revision: D6975951

Pulled By: hramos

fbshipit-source-id: 8dd5da35619e2124ce4b3b18db8b694757792363
2018-02-14 15:46:38 +01:00
Eric Rozell 9775308458 Enable platforms to configure CLI commands
Summary:
This change adds hooks via the `package.json` for a platform plugin to specify hooks for generating platform configurations. This change also adds hooks to allow platform plugins to participate in `link` and `unlink` commands. The goal is to move platform-specific code for platform plugins into their own repositories / node_modules.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

We need to be able to configure the CLI commands for plugin platforms (e.g., react-native-windows) in their own repositories.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

- All jest tests, including new tests, pass.
- `link` and `unlink` commands are successful on iOS and Android.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

https://github.com/Microsoft/react-native-windows/pull/1601

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/core/index.js] - Allow platform plugins to contribute to the RNConfig.
[CLI][FEATURE][local-cli/link/link.js] - Allow platform plugins to participate in the `link` command.
[CLI][FEATURE][local-cli/link/unlink.js] - Allow platform plugins to participate in the `unlink` command.
Closes https://github.com/facebook/react-native/pull/17745

Differential Revision: D6883558

Pulled By: hramos

fbshipit-source-id: ea32fe21cedd4cc02c5c0d48229f2cdb2ac8142b
2018-02-14 15:46:38 +01:00
Hovhannes Safaryan 2c63f49269 Update React.podspec for RCTText
Summary:
Some of the classes of RCTText are now in the subfolders, this will fix pod integration for texts

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I have integrated React Native into my project with [this guide](https://facebook.github.io/react-native/docs/integration-with-existing-apps.html) and got the error `No component found for view with name RCTText`. Searching in the web did not give any useful information so I started to dig into the code and found out that there is now subfolders and pod taking only root classes. After making this change project started to compile again.

Create empty project with pods integrated add `RCTText` subspec and in `.js` file add  some `<Text>` element

Fixed `RCTText` subspec integration.
Closes https://github.com/facebook/react-native/pull/17655

Differential Revision: D6751039

Pulled By: hramos

fbshipit-source-id: f4538d1125af2b45f36e2fa535382e032dbc8f4e
2018-02-05 21:14:14 -08:00
Mike Grabowski f7bd2a333c [0.53.0] Bump version numbers 2018-02-05 15:07:44 +01:00
Vojtech Novak 9b877d6692 Make sure refreshControl shows up on initial render if specified
Summary:
[this commit](https://github.com/facebook/react-native/commit/2e1707d0e600a30057511390dd87c18c00f19a59) which was just a small refactor broke refreshControl behavior - if we render FlatList with refreshing=true, the refreshControl won't be visible on initial render.

The problem is, the [previous beginRefreshing method](https://github.com/facebook/react-native/commit/2e1707d0e600a30057511390dd87c18c00f19a59#diff-cfafa8d7e42ab87ab863f917e187a4aeL51) was renamed to `beginRefreshingProgramatically` and the old call was left in one place [here](https://github.com/facebook/react-native/commit/2e1707d0e600a30057511390dd87c18c00f19a59#diff-cfafa8d7e42ab87ab863f917e187a4aeR47).

Now, I am not sure what kind of jumping the mentioned commit was fixing, but since this fix only concerns the initial render, I believe it will not influence the jumping fix.

I have tested this locally in my app, can provide a video if needed.

none

 [IOS] [BUGFIX] [RefreshControl] - Make sure refreshControl shows up on initial render if specified
Closes https://github.com/facebook/react-native/pull/17727

Differential Revision: D6827402

Pulled By: shergin

fbshipit-source-id: 25849244e87af54f25d636b6ade7adcf88958980
2018-01-31 07:02:02 -08:00
Kevin Cassidy Jr cf19833ad8 Use boost-for-react-native CocoaPod
Summary:
Use the same header-only distribution of Boost that Android and the automatic ios-install-third-party.sh script uses. Greatly speeds up `pod install`, even when the distribution was already cached.

The dependency tree looks like this:

* React
  * cxxreact subspec
    * **Boost** (versioned, 1.63.0)
    * Folly
      * **Boost** (any version, will resolve to 1.63.0 from above)

Alternative implementation of PR https://github.com/facebook/react-native/pull/16756. Fixes issue #16381.

(same as https://github.com/facebook/react-native/pull/16756)
* Install react-native via Cocoapods (or move a helloWorld react-native application over to use Cocoapods for dependency management)
* Add CxxBridge instead of BatchedBridge to your Podfile
* run pod install
* run react-native run-ios

[Add boost.podspec speed up download time & reduce size of the package](https://github.com/facebook/react-native/pull/16756)

[IOS] [BUGFIX] [third-party-podspecs] - optimize CocoaPods installation (Boost distribution)
Closes https://github.com/facebook/react-native/pull/17476

Differential Revision: D6746095

Pulled By: hramos

fbshipit-source-id: 55b2b5a698691f7fca0bf4c31c4376c2b9eb5379
2018-01-31 07:01:50 -08:00
Nico df8da3b6c4 Prevents JS Debugger issues with CORS
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

See #17618

On certain networks, `xip.io` is used, but as the debugger will always using localhost a change upstream has resulted in a CORS issue (see screenshots in #17618). This change ensures that the debugger will always open with whatever configuration.

> This should be merged in as a patch of `0.52.x` as it affects current release, and `0.51.x` didn't have this issue.

Tested locally, could do with the people having the same issue in #17618 testing it out prior to merging.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI] [BUGFIX] [local-cli/server/middleware/getDevToolsMiddleware.js] - Prevents JS Debugger issues with CORS
Closes https://github.com/facebook/react-native/pull/17720

Differential Revision: D6828205

Pulled By: hramos

fbshipit-source-id: 7e5d43db9faf7edc9444ba4214aca1a18e25dbd2
2018-01-31 07:00:35 -08:00
James Ide 997bfb50e1 [0.53.0-rc.1] Bump version numbers 2018-01-18 12:15:56 -08:00
James Ide b4375b4606 Fix HMR syntax error messages (message instead of description)
Summary:
The code to display HMR errors on the client was reading the `description` field from Metro payloads. Metro does not include `description` in the body of its error payloads -- only in its `body.errors[]` items. This commit changes RN's HMR code to show `body.message` (set consistently with https://github.com/facebook/metro/pull/124) instead of the non-existent `body.description`.

Open a test RN app, enable HMR, and then introduce a syntax error in an app source file. See that the redbox provides information about the syntax error instead of just saying "TransformError undefined".

- https://github.com/facebook/metro/pull/124

[GENERAL][ENHANCEMENT][HMR] - Fix display of syntax error messages when HMR is enabled
Closes https://github.com/facebook/react-native/pull/17619

Differential Revision: D6726516

Pulled By: mjesun

fbshipit-source-id: b1d1008d6f1aa8f88ff8a2aa1374724a305c773b
2018-01-16 12:11:10 -08:00
Mike Grabowski 0b996577e3 [0.53.0-rc.0] Bump version numbers 2018-01-10 18:02:02 +01:00
Mike Grabowski 49cbca7464 Add missing tvOS header 2018-01-10 18:01:55 +01:00
Mike Grabowski dd4611721d Fix typo 2018-01-10 16:01:44 +01:00
Mike Grabowski 82b123e744 Remove remaining 2018-01-10 15:50:10 +01:00
Mike Grabowski 7c3a61f3b6 Downgrade Buck hoping to get build fixed 2018-01-10 15:25:11 +01:00
Mike Grabowski 796122d8f3 Revert "Automated fixups for Instagram"
This reverts commit dd016f334c.
2018-01-10 15:24:16 +01:00
Mike Grabowski aebb34a294 Revert "Replace native cxx_library with fb-specific macros."
This reverts commit ba31d29dc9.
2018-01-10 15:02:37 +01:00
Antonio Corrado ab972708a8 Add explicit componentControllerClass to CKComponent
Reviewed By: gkassabli

Differential Revision: D6675255

fbshipit-source-id: 761fea66bf8b5fb5e3d45792627afaaf2a407c97
2018-01-10 02:48:09 -08:00
James Ide 7f58189605 Change inlined okhttp3.Headers references to a Java import
Summary:
In BundleDownloader.java, there were references to `okhttp3.Headers` instead of importing the class at the top of the file. This PR is a simple change to use an import instead.

Compile the Android app

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

[ANDROID][MINOR][BundleDownloader] - Use Java import instead of fully qualified class name
Closes https://github.com/facebook/react-native/pull/17507

Differential Revision: D6691593

Pulled By: hramos

fbshipit-source-id: 81b366db608b7be8a903d2f25b36ca5642d9eec3
2018-01-09 23:54:57 -08:00
Valentin Shergin b9b7fabf98 Revert D6641403: [RN] Refined -[RCTUIManager createView:]
Differential Revision: D6641403

fbshipit-source-id: f478810413aa49b44c060db898e7e8698bddb8e1
2018-01-09 22:36:31 -08:00
Andrew Chen (Eng) b0319f3293 Fix ReactScrollView lints
Differential Revision: D6689492

fbshipit-source-id: c55f98f3ed25757ec192a023d2dd60c73aae8df2
2018-01-09 18:52:38 -08:00
Taym Haddadi bbedf2da9a Fix documentation links
Summary:
Old link gives `404 File not found`.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->
Closes https://github.com/facebook/react-native/pull/17501

Differential Revision: D6688183

Pulled By: hramos

fbshipit-source-id: d17cea84d3cbab551041c9bb15e328aa5826b6ea
2018-01-09 15:46:47 -08:00
Douglas 3bd89867d6 Import RCTTVRemoteHandler only on tvOS
Summary:
Fix issue #17027 (`RCTModalHostView` has a tvOS dependency that was not wrapped in `TARGET_OS_TV`)

Existing test automation should pass.

[GENERAL] [BUGFIX] [tvOS] Fix cocoapods compile issue in RCTModalHostView
Closes https://github.com/facebook/react-native/pull/17502

Differential Revision: D6688166

Pulled By: hramos

fbshipit-source-id: 38297f439f75a8303f59f83b92e004c6c73d9bf6
2018-01-09 15:46:47 -08:00
David Vacca b2848a54b0 Adding support to float values for Android snapToInterval
Reviewed By: fkgozali

Differential Revision: D6684529

fbshipit-source-id: 51efa0a2d38acf4134bb824c462973e5c6bdf17a
2018-01-09 12:32:53 -08:00
Pritesh Nandgaonkar a8d4666651 Fix warnings of casting and null pointer handling
Reviewed By: emilsjolander

Differential Revision: D6675111

fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
2018-01-09 04:30:56 -08:00
Eli White 11a495cb32 Fixing eslint-comments warnings
Reviewed By: yungsters

Differential Revision: D6678252

fbshipit-source-id: ee93b7ee52520b750ca11fcc625cccf3cd82d075
2018-01-08 17:04:29 -08:00
Eli White a1a0a69546 Enable eslint-plugin-eslint-comments in RN
Reviewed By: sahrens

Differential Revision: D6677677

fbshipit-source-id: d1bf9191a405f05dfb3a5c1e50b0d013cf1fe26d
2018-01-08 17:04:29 -08:00
Eli White b826596700 Remove unused eslint-plugin-babel
Reviewed By: yungsters

Differential Revision: D6677669

fbshipit-source-id: 59a2eff184c0375b62d666d6953ce04541634373
2018-01-08 17:04:29 -08:00
Valentin Shergin 870bc4807a Yoga float vs. CoreGraphics float in RCTWrapper
Summary: See RCTYogaFloatFromCoreGraphicsFloat for more details.

Differential Revision: D6677092

fbshipit-source-id: ca1b2634c903277f529c57557055760a9bf48f28
2018-01-08 14:48:55 -08:00
Valentin Shergin c75612219e Proper implementation of [RCTWrapper sizeThatFits:]
Differential Revision: D6677097

fbshipit-source-id: 8ab3567cd6b0b23e89b8048d324b86700a01979b
2018-01-08 14:48:55 -08:00
Eli White 67a3c42d1a Require valid expect
Reviewed By: cpojer

Differential Revision: D6671552

fbshipit-source-id: e254d3a308fac0802084b8d328bd3ee38c7bc8ce
2018-01-08 14:17:55 -08:00
Eli White 9a36872f0c Use jest eslint plugin to disallow disabled tests
Reviewed By: cpojer

Differential Revision: D6671502

fbshipit-source-id: 8f1757e5cc2d1a1d8a339aea63dbff7690ae1aff
2018-01-08 14:17:55 -08:00
Eli White 79902f99b8 Finish migration from jasmine to jest
Reviewed By: cpojer

Differential Revision: D6671373

fbshipit-source-id: e9570b9a9da6063576905719f7ffc5465cda737a
2018-01-08 14:17:55 -08:00
Eli White 9c67e749d8 Move Lint Rules to React Native
Reviewed By: sahrens

Differential Revision: D6671226

fbshipit-source-id: 80d92569c72c766103d096b251ef5729dafb4592
2018-01-08 14:17:55 -08:00
Eli White 183c316f4c Strengthen React Native eslint rules
Reviewed By: sahrens

Differential Revision: D6670469

fbshipit-source-id: f4f86fd0921eab3697c10caaba00934ba8adc2f6
2018-01-08 14:17:55 -08:00
glevi@fb.com 6b95c4fb14 @allow-large-files [Flow] Upgrade xplat/js to flow v0.63
Reviewed By: samwgoldman

Differential Revision: D6675320

fbshipit-source-id: 85575a6f30a50a3c40c6b46ba36f8cd33c091b1d
2018-01-08 12:49:53 -08:00
David Vacca e5c2a66897 Fix Modal not disappearing when navigating from inside a Modal to another activity
Reviewed By: achen1

Differential Revision: D6668368

fbshipit-source-id: 809e9c978032e731478bcc8e290eb030e4ee6eca
2018-01-08 10:00:49 -08:00
Pritesh Nandgaonkar d85da86dc7 Move YGNodeResolveFlexShrink to a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6611418

fbshipit-source-id: 6e5ba39b555d313a967800589891027920112c15
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 6627d7723c Moved YGResolveFlexGrow as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6611385

fbshipit-source-id: 71660946c469fac77c5ffa0284c793e6adc9db7b
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 0a9e652bdd Move markDirtyInternal as a method in YGNode
Reviewed By: emilsjolander

Differential Revision: D6611287

fbshipit-source-id: 54402145d51ea717553ea136be739b9880a79817
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 28968e2c0b Move YGCloneChildrenIfNeeded as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6611155

fbshipit-source-id: 463723a363e0fbd2c7686f65226eca73236bd07e
2018-01-08 03:01:30 -08:00
Edward Coleridge Smith 654d7595fe Update terminal title to 'Metro Bundler'
Summary:
I noticed in v0.50.0 all mentions of 'packager' were updated to 'Metro Bundler':

https://github.com/facebook/react-native/commit/12eb04b2364102a6679e3dc6fb0fd4d62be0ae00

It seems like command which launches the bundler still sets the terminal title to 'React Packager'. This PR simply updates the title from 'React Packager' to 'Metro Bundler'.

Run `scripts/launchPackager.command`/`scripts/launchPackager.bat` and check title:

<img width="907" alt="screen shot 2018-01-05 at 14 02 53" src="https://user-images.githubusercontent.com/754498/34612337-3e93e8ca-f221-11e7-98f9-c5190674868e.png">

[GENERAL] [ENHANCEMENT] [./scripts]
Closes https://github.com/facebook/react-native/pull/17457

Differential Revision: D6673843

Pulled By: shergin

fbshipit-source-id: 65a072c3b79593391f257191b1372e7e9c8799f1
2018-01-07 22:22:45 -08:00
Valentin Shergin c3139d798a Fixed crash happenned on deallocating RCTSurface
Summary:
Essentially, we had `dispatch_async` inside `delloc` method which tried to retain `self`, which is disallowed operation in ObjC runtime.
However, we don't need to notify anything `surface`-related in `_stop` because it always is called from `dealloc`.

Reviewed By: mmmulani

Differential Revision: D6665631

fbshipit-source-id: ed0d192946f3323f4f54ecb99b30e56e0942f174
2018-01-07 22:22:45 -08:00
Valentin Shergin e46ea8c737 Refined -[RCTUIManager createView:]
Summary: Now we do not add newly created view to the registry at the preluminary step.

Reviewed By: mmmulani

Differential Revision: D6641403

fbshipit-source-id: c69077aaba871f3cdb3500c75e1efe07546e1b7f
2018-01-07 21:31:06 -08:00
Valentin Shergin c491b22233 RCTBaseTextInputViewManager: new base class for TextInput view managers
Summary: Bunch or identical code was moved to superclass.

Reviewed By: mmmulani

Differential Revision: D6663772

fbshipit-source-id: 82321f56bbab0e9d17c0227c97dd86904cf5ab30
2018-01-07 18:31:20 -08:00
Valentin Shergin 176a578238 '-[RCTSurfaceRootShadowView sizeThatFitsMinimumSize:]' was removed
Summary: Because we already support this for all kinds of shadow views!

Reviewed By: mmmulani

Differential Revision: D6665636

fbshipit-source-id: ceee7e4952ede4bbe54aedde5545587a1d13ea5a
2018-01-07 18:31:20 -08:00
Valentin Shergin b2a251948f Proper usage CGFLOAT_MAX vs INFINITY inside RCTSurface
Summary: See `RCTShadowView+Layout.m` for more info about differences between CGFLOAT_MAX and INFINITY in Yoga and UIKit.

Reviewed By: mmmulani

Differential Revision: D6665635

fbshipit-source-id: 270ba5366c3dfe78e38474de5380d7d5d251e628
2018-01-07 18:31:20 -08:00
Valentin Shergin f96f9c5fd6 Sideeffectless measuring of shadow views
Summary:
That's now possible thanks to new Yoga's clonning API.
That will speed up RCTSurface measuring (see the next diff in stack) and should illuminate a class of problems in CK interop layer.
We also will use it in the new text layout engine (in React Native).

Reviewed By: gkassabli

Differential Revision: D6665632

fbshipit-source-id: e94909f0af89e9c7fc5e46b95090ecb3c52546a2
2018-01-07 18:31:20 -08:00
Valentin Shergin d9e5b313bb Helpers for proper conversion float values between CG and YG representations
Summary:
Yoga and CoreGraphics have different opinions about how "infinity" value
should be represented.
Yoga uses `NAN` which requires additional effort to compare all those values,
whereas GoreGraphics uses `GFLOAT_MAX` which can be easyly compared with
standard `==` operator.

Messing with this can cause super weired bugs like 100% CPU load for couple of seconds somewhere in CoreGraphics.

Reviewed By: mmmulani

Differential Revision: D6665633

fbshipit-source-id: b6236c6fa50d1f8fb0c9576203922f7b24b7301e
2018-01-07 18:31:20 -08:00
Valentin Shergin af226ef949 Designated methods to control dirty propagation
Summary:
Those are supposed to replace all `dirtyText`, `dirtyPropagation`, `isPropagationDirty`, `setTextComputed`, `isTextDirty` and so on.
We will use it widely soon (and remove all old ones).

Reviewed By: mmmulani

Differential Revision: D6665634

fbshipit-source-id: 3c1db7154e90b71446756f2495627b163c779996
2018-01-07 18:31:20 -08:00
Tim Yung f71f4e7906 RN: Create TextProps (Flow for Text Props)
Reviewed By: sahrens

Differential Revision: D6669437

fbshipit-source-id: af8fb4534b4a6e0b76a34a6a7ef2087842056f3e
2018-01-05 23:30:22 -08:00
Eli White 2815ada238 De-dupe eslint rules from xplat/js
Reviewed By: sahrens

Differential Revision: D6670226

fbshipit-source-id: ab5a67c18248af033634cbc7966292187e14b120
2018-01-05 16:45:58 -08:00
David Vacca 0356cbd13b Fix BadTokenException when displaying warning messages
Reviewed By: achen1

Differential Revision: D6651871

fbshipit-source-id: fc7fc118999f0e752636a3142764bd3496e5dc81
2018-01-05 16:08:17 -08:00
Valentin Shergin 46be5bf71c Forgotten setNeedsLayout in -[UIManager intrinsicContentSize:]
Summary: That fixes a regression introduced in D5990342.

Differential Revision: D6669153

fbshipit-source-id: e7d7342d58878703e188ef27d82af8196a8d950a
2018-01-05 15:47:01 -08:00
Tim Yung e3c6f38773 RNTester: Relax Bridge Release Check
Reviewed By: mmmulani

Differential Revision: D6665596

fbshipit-source-id: 2c59ea8add039d2bfc6b76701d16e82088fa8aad
2018-01-05 15:05:31 -08:00
Eli White 45e6fcdba0 Modernize ScrollResponder.js
Reviewed By: sahrens

Differential Revision: D6661084

fbshipit-source-id: 46cef96dc86842b379728d8465ce4feb408338c7
2018-01-05 12:46:40 -08:00
Wesley Walser c49d249fd7 Send scroll velocity data to Javascript on momentum scroll events.
Reviewed By: sahrens

Differential Revision: D6643379

fbshipit-source-id: 70550274975ed7c2b43a3d668422102d0c115ba7
2018-01-05 10:46:03 -08:00
Michael S. Kazmier 33d710e8c5 adds --port option to react-native run-ios as well as patches port …
Summary:
The pull request adds the `--port` option to `run-ios` allowing a developer to build and launch a react-native app using a single command line like this:
```
react-native run-ios --port 8088
```

It defaults to the current port 8081.

This pull request fixes issue #9145 and issue #14113.

This patch also extends `run-android` to properly test and launch the packager with the specified port, extending the work done in PR:  ##15316

1. Create a new react-native app, or simply clone this branch and then update your version of react-native using `yarn add file:./path/to/this/fork/of/react-native`
2. run `react-native run-ios --port 8088`
3. watch the packager start on the desired port (8088 in this case) and watch your app in your simulator connect to the packager and launch the app.
Closes https://github.com/facebook/react-native/pull/16172

Differential Revision: D6612534

Pulled By: shergin

fbshipit-source-id: 50af449f5e4c32fb76ba95f4cb7bf179e35526d5
2018-01-04 20:11:10 -08:00
David Vacca e57a43b97a Revert D6531148: Fix BadTokenException and IllegalArgmentException thrown when showing or dismissing Modal
Differential Revision: D6531148

fbshipit-source-id: a90cc38f98d6b86151539abd2a07bfcf1c253a5f
2018-01-04 17:31:17 -08:00
Josh Hargreaves c9ff0bc212 Implement onKeyPress Android
Summary:
This implements onKeyPress for Android on TextInputs and addresses https://github.com/facebook/react-native/issues/1882.
**N.B. that this PR has not yet addressed hardware keyboard inputs**, but doing will be fairly trivial. The main challenge was doing this for soft keyboard inputs.

I've tried to match the style as much as I could. Will happily make any suggested edits be they architectural or stylistic design (edit: and of course implementation), but hopefully this is a good first pass :).
I think important to test this on the most popular keyboard types; maybe different languages too.
I have not yet added tests to test implementation, but will be happy to do that also.

- Build & run RNTester project for Android and open TextInput.
- Enter keys into 'event handling' TextInput.
- Verify that keys you enter appear in onKeyPress below the text input
- Test with autocorrect off, on same input and validate that results are the same.

Below is a gif of PR in action.
![onkeypressandroid](https://user-images.githubusercontent.com/1807207/27512892-3f95c098-5949-11e7-9364-3ce9437f7bb9.gif)
Closes https://github.com/facebook/react-native/pull/14720

Differential Revision: D6661592

Pulled By: hramos

fbshipit-source-id: 5d53772dc2d127b002ea5fb84fa992934eb65a42
2018-01-04 12:51:38 -08:00
Jimmy Zhuang ddd65f1ba9 Support snapToInterval for horizontal scrollview on Android
Summary:
`snapToInterval` is available on iOS but on android yet. This PR is to add support for `snapToInterval` on android.

Example:

![android_snap](https://cloud.githubusercontent.com/assets/1699429/19086983/39d3ee1c-8a25-11e6-9c84-20f25a751f32.gif)

TO: lelandrichardson spikebrehm
Closes https://github.com/facebook/react-native/pull/10242

Differential Revision: D4168527

fbshipit-source-id: de3dd9ac5d9e0fddfce5e5bc0aa6a4f33f1e30b3
2018-01-03 10:33:07 -08:00
Matt Sessions a8391bde7d SectionList renderItem should be optional
Summary:
`renderItem` on `SectionList` is within the `OptionalProps` group of props but it is not actually marked as optional. Which means that doing things such as in the example where each section has its own `renderItem` and no `renderItem` prop is passed into `SectionList` will fail flow.

Create a `SectionList` where each section has it's own `renderItem` and do not pass in a `renderItem` into `SectionList`. Run flow, it should error.

[GENERAL] [MINOR] [SectionList] -Makes `renderItem` prop on `SectionList` optional for flow.
Closes https://github.com/facebook/react-native/pull/17262

Differential Revision: D6645672

Pulled By: hramos

fbshipit-source-id: 1096e8c4998c14003cf42f29ea559505082047c1
2017-12-29 14:26:08 -08:00
Jhen-Jie Hong fa574c6092 Set host of development server for setupDevtools
Summary:
Related to #15126, and this would be useful for use React DevTools on real device without modify `setupDevtools.js`.

In Android emulator, the host of `SourceCode.scriptURL` is same with `PlatformConstants.ServerHost` so we can just replace it.

* Tested on iOS device with [react-devtools](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools) package.
* Tested on Android emulator, the `getDevServer` module got the correctly hostname so that don't need `adb reverse`.

[ENHANCEMENT] [setupDevtools] Set host of development server for setupDevtools
Closes https://github.com/facebook/react-native/pull/15547

Differential Revision: D6544980

Pulled By: javache

fbshipit-source-id: a286874bcef0501c5d2e0be2251d58c236a5534a
2017-12-29 07:55:41 -08:00
Mark Amery 52f350a9cb Add proptypes for scrollview drag start & end handlers
Summary:
`ScrollView` has a bunch of `onFoo` handlers for scrolling-related events, most of which have a proptype defined and are documented. However, `onScrollBeginDrag` and `onScrollEndDrag` do not currently have a proptype and are not currently documented (as noted at https://stackoverflow.com/a/41793747/1709587). It seems reasonable to bring consistency and to provide documentation of these otherwise hard-to-discover props.

I haven't added or run any tests, and don't plan to do so (beyond waiting and seeing that no existing checks fail in CircleCI).

I have also created a PR to update the documentation at https://github.com/facebook/react-native-website/pull/99

*(None needed; this isn't a functionality change.)*
Closes https://github.com/facebook/react-native/pull/17368

Differential Revision: D6642695

Pulled By: TheSavior

fbshipit-source-id: fa40ed2ae6d5947a161b816a47441d8f5d4d9c4d
2017-12-28 11:36:14 -08:00
Michael Schneider d3b41e0da3 Set minHeight instead of minWidth for calculating the layout in RCTSurfaceRootShadowView
Summary:
Fix calculating layout in `RCTSurfaceRootShadowView` as the `minWidth` is set doubled in `calculateLayoutWithMinimumSize:maximumSize:`.

cc shergin
Closes https://github.com/facebook/react-native/pull/17203

Differential Revision: D6642437

Pulled By: shergin

fbshipit-source-id: 3483c952c9ecf0132182a156b7b916eb1e975424
2017-12-28 10:40:28 -08:00
Spencer Ahrens 4d33080f0f better Keyabord event utils
Reviewed By: shergin

Differential Revision: D6639418

fbshipit-source-id: ef973cfebb94325579525bdcd3990737fe576ef8
2017-12-28 09:05:51 -08:00
Héctor Ramos f9e742aadf Fix buck failure
Summary:
Buck is failing due to missing args: https://circleci.com/gh/facebook/react-native/29268
Closes https://github.com/facebook/react-native/pull/17346

Differential Revision: D6642181

Pulled By: hramos

fbshipit-source-id: 399d3c5f197ae0de9748a592def945c14ac1d348
2017-12-28 08:31:28 -08:00
Valentin Shergin 0ec1017660 Fixed double initial prop applying for newly created views
Summary: This is a leftover from recent changes in D6595780 where a prop application step was moved out to separare mount block.

Differential Revision: D6640736

fbshipit-source-id: 70de0f55f992a7912e222ec4bf9ade1c9bad99f2
2017-12-27 18:02:05 -08:00
Dan Zimmerman 1fd7315c3b Remove unnecessary include
Reviewed By: mzlee

Differential Revision: D6638538

fbshipit-source-id: 4b11b8f4f88aa533ac0467348df36e5780bfbb70
2017-12-27 13:16:30 -08:00
Alex Dvornikov 80f9e1f7de remove "prepareReact" call from the Android bridge
Reviewed By: alexeylang

Differential Revision: D6596304

fbshipit-source-id: 0285611cfdd66ce5bdfa503c9fe8f1963a0c583f
2017-12-26 14:47:30 -08:00
Alex Dvornikov 56a42e57d0 remove "prepareReact" call from the iOS bridge
Reviewed By: alexeylang

Differential Revision: D6581907

fbshipit-source-id: ca4bd4beef6d75305133a2b2c7de62e65e5aa3da
2017-12-26 14:47:29 -08:00
Ronald Eddy Jr 33a2e533b7 Update HTTP -> HTTPS in links in the docs
Summary:
URLs were updated to use HTTPS protocol

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Improves security and privacy.

I tested all urls to insure that the destination supported https.

This is an update to Docs only.

[ DOCS     ] [ ENHANCEMENT ] -URLs were updated to use HTTPS protocol
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17332

Differential Revision: D6635123

Pulled By: hramos

fbshipit-source-id: f1d8b1a5268eb27d55198dd3d8a2f0aab20c405e
2017-12-24 16:14:22 -08:00
Taras Tsugrii a6a66c5b39 Remove last usages of cxx_library.
Reviewed By: mzlee

Differential Revision: D6632262

fbshipit-source-id: 1ec3ba232e573b9cbc892f23827f9a7c5df34106
2017-12-23 19:41:31 -08:00
Rafael Oleza 4a1bb8fe8d Do not set minify=true when calculating the list of dependencies
Reviewed By: davidaurelio

Differential Revision: D6633160

fbshipit-source-id: ce45cae413959c232cb18b4b5ad51f04a52410a4
2017-12-23 09:16:30 -08:00
Héctor Ramos 4fbfbe6bb0 Update image
Summary:
Use newer Docker image and add script that rebuilds the image locally

Rebuilding should be rarely needed, but in this case we did need a newer BUCK version

To run tests locally:

```
npm run test-android-setup
npm run test-android-build
npm run test-android-run-unit-test
```

If a newer android-base image is needed, just run `npm run test-android-build-base` to rebuild the image locally. Ping hramos if the Docker hub image is too out of date.
Closes https://github.com/facebook/react-native/pull/17325

Differential Revision: D6630793

Pulled By: hramos

fbshipit-source-id: ec76ec86aec0debf914649b7ec5fdafccf28fec7
2017-12-22 20:42:30 -08:00
Héctor Ramos 85ff264445 Update CODEOWNERS
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17326

Differential Revision: D6630825

Pulled By: hramos

fbshipit-source-id: f2c0369e3dc5b279aba96c8307b742693be1494c
2017-12-22 15:46:54 -08:00
Mack Solomon 6661633390 use working getting started url
Summary:
android-setup.html does not seem to exist.
https://facebook.github.io/react-native/docs/android-setup.html (404)
Closes https://github.com/facebook/react-native/pull/17324

Differential Revision: D6630732

Pulled By: hramos

fbshipit-source-id: c1bd4750e3b72a0b1542a75f50d404807eabb8f1
2017-12-22 15:32:42 -08:00
Héctor Ramos 33da6047a3 Include OSS defs in Yoga BUCK
Reviewed By: ttsugriy

Differential Revision: D6630280

fbshipit-source-id: 6355d4b64a39feb000d5a104f39733a90fc5a31e
2017-12-22 14:31:21 -08:00
Héctor Ramos 4e767013ed Fix buck failures on master
Summary:
WIP.
Closes https://github.com/facebook/react-native/pull/17295

Differential Revision: D6628523

Pulled By: hramos

fbshipit-source-id: ac2833e99de9e94340b8027469cc74a5b7379962
2017-12-22 11:30:26 -08:00
Héctor Ramos b750e3b21b Update to Danger 2.0
Summary:
See #17234 for discussion.
Closes https://github.com/facebook/react-native/pull/17310

Differential Revision: D6627914

Pulled By: hramos

fbshipit-source-id: 3d72fc69fe03c53706d2076ecf7b5321a00d1642
2017-12-22 10:13:18 -08:00
Taras Tsugrii 077c3ab349 Define internal FB macro for OSS builds.
Reviewed By: hramos

Differential Revision: D6626785

fbshipit-source-id: bb7c89499bc7c72e24dabd82899c3d9c49874101
2017-12-22 08:47:50 -08:00
Pritesh Nandgaonkar a163f70f87 Optimize the performance of Origami
Reviewed By: emilsjolander

Differential Revision: D6619293

fbshipit-source-id: c1632efd97f47696b7f8bb1b3e763de92c707287
2017-12-22 06:51:09 -08:00
Logan Daniels 3559e42c55 Make sure VirtualizedList's windowSize is greater than 0
Summary:
Setting `windowSize = 0` doesn't make sense. Let's make sure we catch this problem in the constructor so that it doesn't cause inexplicable list behavior.

Also fixed an invariant in `VirtualizeUtils` that is meant to prohibit non-monotonically-increasing offset arrays. As written, the invariant condition can never actually be violated.

Reviewed By: sahrens

Differential Revision: D6625302

fbshipit-source-id: b2a983cbe7bb5fbe0aed7c5d59e69a8a00672993
2017-12-21 18:43:50 -08:00
Héctor Ramos c547f783c4 Update Docker images to latest Android SDK, Buck
Summary:
Test Plan

Rebuilt Docker images locally, confirmed successful image build.

Can later be reproed with

```
npm run test-android-setup
npm run test-android-build
npm run test-android-run-unit-tests
```

Note that unit tests are failing in master, but in this PR we can repro the same failure.
Closes https://github.com/facebook/react-native/pull/17313

Differential Revision: D6624899

Pulled By: hramos

fbshipit-source-id: 42b8cd708ec2a02399bb6ef30fd73faba2646f79
2017-12-21 17:31:32 -08:00
Krzysztof Magiera 7ff6657985 Add top offset for react loading view on Kitkat
Summary:
This PR fixes the problem with dev loading view on KitKat and older Android devices after #16596

Install RNTester app on Android API 19 or lower device. See green loading view show up under status bar. Do the same with full screen theme set and see it show up correctly at the top of the screen.
Verify the green loading bar displays correctly on devices with API > 19 too.

This fixes an issue introduced in #16596

[ANDROID][MINOR][DevSupport] - Fix green dev loading bar on Android Kitkat and below
Closes https://github.com/facebook/react-native/pull/17305

Differential Revision: D6621077

Pulled By: achen1

fbshipit-source-id: 3b4216af535d7db5c96d137f20004fe2651b1dc9
2017-12-21 12:36:15 -08:00
Yujie Liu 489b98bf10 remove embeddedBundleURL
Reviewed By: fromcelticpark

Differential Revision: D6502049

fbshipit-source-id: 31a611cea4c017877c3ce2f7e9a3503723af4c2d
2017-12-21 12:02:32 -08:00
Taras Tsugrii ba31d29dc9 Replace native cxx_library with fb-specific macros.
Reviewed By: adamjernst

Differential Revision: D6618153

fbshipit-source-id: 188e2ca3cc78efad6e71f0a22547e26abf2f62e1
2017-12-21 08:58:50 -08:00
Pritesh Nandgaonkar 4cdbb77c33 Do not set FB_ASSERTION_ENABLED
Reviewed By: emilsjolander

Differential Revision: D6611904

fbshipit-source-id: f01ac144159c1b333d8deb8cbb5ba0288e4bf7a4
2017-12-21 04:45:34 -08:00
Rafael Oleza 0b5e8b4852 Bump metro to v0.24.3
Reviewed By: mjesun

Differential Revision: D6617297

fbshipit-source-id: 5216f2862cbf7707a57c4257f0e2c93f9dfab667
2017-12-20 19:30:41 -08:00
Valentin Shergin fc5e340e89 Revert D6596375: [RN] Removed unnecessary code path in [RCTUIManager updateView:]
Differential Revision: D6596375

fbshipit-source-id: f8b0ea2dafbf997a18e9c86fb279682d31b06d0e
2017-12-20 17:46:19 -08:00
Héctor Ramos 4216cdef13 Do not use Node 8.x specific Stream.final
Summary:
grabbou: "This has been recently added to Node 8.x. Since it makes our tests to fail, I decided to
do a workaround that works for all the versions."

Originally patched in `0.52-stable` by grabbou

Fixes Node 6 JavaScript tests.
Closes https://github.com/facebook/react-native/pull/17298

Differential Revision: D6616521

Pulled By: hramos

fbshipit-source-id: 7256450d824a60a14006af7a68191222b3a5041a
2017-12-20 16:48:25 -08:00
Pieter De Baets a0ff8c7706 Fix ReactLegacy and delete RCTViewControllerProtocol
Summary:
It's always bothered that we have this protocol and I figured it could just be merged with RCTWrapperViewController.
Closes https://github.com/facebook/react-native/pull/17290

Reviewed By: mmmulani

Differential Revision: D6611544

Pulled By: javache

fbshipit-source-id: a50b9d5adbeb2c48dbadbbfc1c77ccf6d1aae144
2017-12-20 15:20:00 -08:00
Rafael Oleza 2e008bc464 Bump metro to v0.24.2
Reviewed By: mjesun

Differential Revision: D6613447

fbshipit-source-id: 4d03cf86427c7ccd8ee471078d3798ab21aee933
2017-12-20 14:27:15 -08:00
Peter Ammon f9f40cd3e4 JSBigString to MAP_PRIVATE not MAP_SHARED
Reviewed By: mhorowitz

Differential Revision: D6613463

fbshipit-source-id: 2553a0475ade061f3b70ffce90fcf4e0ceb7d9fa
2017-12-20 14:01:33 -08:00
Héctor Ramos 9b147a53d1 Clarify use of Flow props types in cli example
Summary:
This was introduced as part of a codemod a few months back. Hopefully this edit makes the example code clearer.
Closes https://github.com/facebook/react-native/pull/17189

Differential Revision: D6613378

Pulled By: hramos

fbshipit-source-id: da7263b3ce2b5c45d6e312807c88743fe10cd15d
2017-12-20 12:32:03 -08:00
Héctor Ramos 5ea5683d01 Separate JavaScript lint/flow checks from tests
Summary:
This should help make it clearer, at a glance, which specific step is failing.

Run on Circle. Workflows will now show that Node 8 JS tests are green, but Node 6 JS tests are not. Lint/flow checks are also not green. Previously, it would be necessary to open the two test-node workflows to investigate which particular test failed. Given these tests and checks tend to break often, the additional clarity would be helpful.

<img width="485" alt="screen shot 2017-12-20 at 9 40 07 am" src="https://user-images.githubusercontent.com/165856/34220526-ce3d3b26-e569-11e7-803f-0e4bf1090f2f.png">
Closes https://github.com/facebook/react-native/pull/17293

Differential Revision: D6612623

Pulled By: hramos

fbshipit-source-id: c84351da50916e72e52c4271e2a31c16f6cdfbb9
2017-12-20 11:38:09 -08:00
Ben Nham 59c7967627 document isInspectable
Reviewed By: mhorowitz

Differential Revision: D6601992

fbshipit-source-id: 4bd69f90943b14286e5618c70fc7eaca689fb02c
2017-12-20 02:30:47 -08:00
Valentin Shergin 0ae4c47daa -[UIView _DEBUG_reactShadowView] was removed
Summary:
Nobody uses it.
If the reference to the bridge is available (which is should be case for testing purposes at least), it is easy to get same information.

Reviewed By: mmmulani

Differential Revision: D6596376

fbshipit-source-id: 066eeb1e9465b4e0cc9d9b5b6bf41722450870e4
2017-12-19 23:46:09 -08:00
Valentin Shergin c79246dbc6 Removed unnecessary code path in [RCTUIManager updateView:]
Summary: The `-[RCTShadowView viewName]` prop must exist, we don't need special handling for this case.

Reviewed By: mmmulani

Differential Revision: D6596375

fbshipit-source-id: 3e99a62bd6296e0285156f03dc2ac93db7f630e5
2017-12-19 23:46:09 -08:00
Valentin Shergin 7d1dedadd7 New implementation of handling didUpdateReactSubviews and didUpdateReactSubviews events
Summary:
Motivation:
* Current implementation of `didUpdateReactSubviews` relies on `processUpdatedProperties:parentProperties:` method of RCTShadowView, which we plan to remove.
* The existing implementation does not call handlers on unmounted nodes (because they are not part of traversing tree), which is not correct.
* The current implementation is tight with RCTComponentData, which is conceptually wrong, it should be a UIManager thing.
* The new implementation must be much more performant because of simplicity. (We can measure it only after removing `processUpdatedProperties`.)

Reviewed By: mmmulani

Differential Revision: D6595780

fbshipit-source-id: a517207c17b5d5db839c9ce99a37136292acf78c
2017-12-19 23:46:09 -08:00
Ram N 4996b9aeb4 On Android, seperate logic to initialize JS from starting the app
Reviewed By: achen1

Differential Revision: D6606265

fbshipit-source-id: d432661b5f8aa2b7600b1140e1617aab852f343e
2017-12-19 20:31:15 -08:00
Valentin Shergin 19a9c5e41d The Great File Renaming in RCTText
Summary:
The previous file/class name convention seemed cool... but now it drives me BANANAS! It makes all this code really hard to maintain.
So, evething were renamed following common modern RN convention.

Reviewed By: mmmulani

Differential Revision: D6605090

fbshipit-source-id: 88ca13d793a5d2adaac2b7922ec6bd4654aacec5
2017-12-19 20:14:00 -08:00
Valentin Shergin 5c8481e836 Fixed black ARTSurfaceView
Summary:
If we draw using `drawRect:` with possible transparent pixels, we have to have `isOpaque = YES`.
https://developer.apple.com/documentation/uikit/uiview/1622622-isopaque

Differential Revision: D6609013

fbshipit-source-id: e483fd38b09c07e33b8b424d22c7a1adf81e6916
2017-12-19 19:46:06 -08:00
Michał Gregorczyk 6ad1f0957a Kill orphaned marker end in JSCExecutor
Reviewed By: mhorowitz

Differential Revision: D6594498

fbshipit-source-id: 67f281ded088bdbad3eb1e173882d4328c1fdc93
2017-12-19 14:00:36 -08:00
Logan Daniels a010a0cebd Fix virtualized cell keys for list headers and footers
Summary:
The change enabling virtualization in nested lists contained a hidden assumption that nested lists would only appear within the *cells* of a parent list.

If a list header or footer component contains a `VirtualizedList`, that child list won't be wrapped in a `CellRenderer` component and therefore won't have access to `virtualizedCellRenderer` through its context. This causes an error when the child list tries to access the `cellKey` property on an undefined object.

This change wraps the header/footer views in a `VirtualizedCellWrapper` component which supplies that context properly.

Reviewed By: sahrens

Differential Revision: D6603342

fbshipit-source-id: 4d2d82f04947048a16ec9968121d8ecc8c95655a
2017-12-19 13:46:49 -08:00
Pritesh Nandgaonkar f1055bcac8 Make YGNode as c++ struct with properties exposed through accessors
Reviewed By: emilsjolander

Differential Revision: D6592257

fbshipit-source-id: 641e8b9462ad00731a094511f9f5608b23a6bb21
2017-12-19 11:32:49 -08:00
Ben Nham 30da2622e2 avoid redbox in handleWrappedEvent
Reviewed By: Hypuk

Differential Revision: D6602420

fbshipit-source-id: 14cf396014d896878032ee4ab67a45700eb6c257
2017-12-19 10:30:52 -08:00
Valentin Shergin 2679f3efb6 Demolishing of background color propagation infra
Summary: As it was mentioned in previous diffs, we are removing this because it overcomplicates rendering layer and provides (almost) no benefits (and cannot be implemented 100% accurate way).

Reviewed By: mmmulani

Differential Revision: D6582560

fbshipit-source-id: 0778db96a45dd8e2520268d5d00792677cb01a20
2017-12-19 09:11:49 -08:00
Pritesh Nandgaonkar d89901fa60 Use wildcard instead of manual file addition
Reviewed By: emilsjolander

Differential Revision: D6601704

fbshipit-source-id: 9bac4bc1a8d9e40feb0111fc4c7a627d4d3c4270
2017-12-19 07:41:57 -08:00
Spencer Ahrens 350377f57c Tweak FIGListItem layout
Reviewed By: yungsters

Differential Revision: D6586846

fbshipit-source-id: cf57c4e042868a053da2dfa959cd47c7b9241a24
2017-12-18 18:31:19 -08:00
Sam Goldman 632f1202ab Switch declare function exports to declare module.exports
Reviewed By: calebmer

Differential Revision: D6579552

fbshipit-source-id: a46f27cca8065e9f3c46739f6a874dfb346c0c7d
2017-12-18 17:25:08 -08:00
Valentin Shergin dabb78b127 Removing <TextInput autoGrow={true}>
Summary:
`autoGrow` feature was/is totally awesome but... nowadays <TextInput> component is always autoexpandable (on both iOS and Android),
so we don't need JavaScript implementation of this anymore. Sometimes it is even harmfull (see T23403231).

I am sorry, sumkit. You are still awesome. :)

Reviewed By: sahrens

Differential Revision: D6553514

fbshipit-source-id: 1d24a2f2c046f514bd6b6318797a607b6e1841d0
2017-12-18 15:03:38 -08:00
Ben Nham 0673ac25f1 improve detection of inspectable JS contexts
Reviewed By: Hypuk

Differential Revision: D6578735

fbshipit-source-id: ac6a3a8bae9aef7fd3b4a036c3f154b3f6b7d80c
2017-12-18 13:32:36 -08:00
Ben Nham 15cd98b782 add isInspectable property
Reviewed By: Hypuk

Differential Revision: D6578736

fbshipit-source-id: a4229c3766125ff55cff50a49893b2385f9c8a6a
2017-12-18 13:32:36 -08:00
Ben Nham 3852c42ad8 add isInspectable property
Reviewed By: Hypuk

Differential Revision: D6578737

fbshipit-source-id: 05143e4cf59b5be9e20ab79b83efbfaa7da059d8
2017-12-18 13:32:35 -08:00
Logan Daniels 2668dc8e1b Support virtualization and onViewableItemsChanged for nested, same-orientation VirtualizedLists
Reviewed By: sahrens

Differential Revision: D6330846

fbshipit-source-id: c555f4d449b75753befbd376dbf4e6fb4812fa75
2017-12-18 13:32:35 -08:00
Valentin Shergin d2dc451407 reactBridgeDidFinishTransaction was finally removed
Summary:
We are removing `reactBridgeDidFinishTransaction`.
Why?
 * It is a performance drain. Supporting this requires dispatching main-thread block on every single transaction complete;
 * It has "too broad" non-conceptual semantic which encouraged using this as a "band-aid solution" for poorly designed components;
 * It is conceptually incompatible with new approaches that we are trying to implement to optimize the render layer;
 * It was deprecated for very long time.

Reviewed By: mmmulani

Differential Revision: D6549729

fbshipit-source-id: 58094aab982c67cec3d7fa3b616c637cb84d697f
2017-12-18 11:47:26 -08:00
Valentin Shergin b263560c73 reactBridgeDidFinishTransaction was removed from RCTTabBar
Summary:
We are removing `reactBridgeDidFinishTransaction`.
Why?
 * It is a performance drain. Supporting this requires dispatching main-thread block on every single transaction complete;
 * It has "too broad" non-conceptual semantic which encouraged using this as a "band-aid solution" for poorly designed components;
 * It is conceptually incompatible with new approaches that we are trying to implement to optimize the render layer;
 * It was deprecated for very long time.

This diff replaces usage of `reactBridgeDidFinishTransaction` with `uiManagerDidPerformMounting` which has very similar semantic except that fact that `uiManagerDidPerformMounting` is called asynchronously on the next run loop tick. And this should be okay because new React partial rendering does not guarantee synchronous execution anyways.

Reviewed By: mmmulani

Differential Revision: D6549586

fbshipit-source-id: 589b814f83b91ed8fabf7e638e7554ab3c9d286e
2017-12-18 11:47:26 -08:00
Valentin Shergin 099b28006b reactBridgeDidFinishTransaction was removed from RCTNavigator
Summary:
We are removing `reactBridgeDidFinishTransaction`.
Why?
 * It is a performance drain. Supporting this requires dispatching main-thread block on every single transaction complete;
 * It has "too broad" non-conceptual semantic which encouraged using this as a "band-aid solution" for poorly designed components;
 * It is conceptually incompatible with new approaches that we are trying to implement to optimize the render layer;
 * It was deprecated for very long time.

This diff replaces usage of `reactBridgeDidFinishTransaction` with `uiManagerDidPerformMounting` which has very similar semantic except that fact that `uiManagerDidPerformMounting` is called asynchronously on the next run loop tick. And this should be okay because new React partial rendering does not guarantee synchronous execution anyways.

Reviewed By: mmmulani

Differential Revision: D6549217

fbshipit-source-id: 2649e943e82e6fbe02c7678583a97db3f5800201
2017-12-18 11:47:26 -08:00
Valentin Shergin b8e60a3ca3 reactSetInheritedBackgroundColor was removed from RCTView
Summary:
Now setting explicit backgroundColor style is required for Views with background shadow,
otherwise the shadow will be generated based on content of the view (which is expected behaviour).

Reviewed By: mmmulani

Differential Revision: D6582587

fbshipit-source-id: 0514cb3c57bad17d2af40810b0e0f7ddc96a2c31
2017-12-18 11:47:26 -08:00
Valentin Shergin c01a171ed8 Removing inherited background color optimization from ARTSurfaceView
Summary:
We are removing `reactSetInheritedBackgroundColor` feature because it overcomplicates RN rendering layer and provides very small benefits.
This is the last place where we are using `reactSetInheritedBackgroundColor`.

Reviewed By: mmmulani

Differential Revision: D6581599

fbshipit-source-id: 129997332a03daf927acdd174e5853bfd388332f
2017-12-18 11:47:26 -08:00
Valentin Shergin 2789ba016b zIndex prop was removed from RCTShadowView
Summary:
This was leftovers from old implementation of zIndex feature.
Janic janicduplessis refactored this and moved all logic to UIView layer, so we don't need this prop anymore in shadow realm.
More info: https://github.com/facebook/react-native/pull/14011

Reviewed By: mmmulani

Differential Revision: D6574414

fbshipit-source-id: 2cae19350765689784d7884ed875878d39b4e3f1
2017-12-18 11:47:26 -08:00
Miguel Jimenez Esun 4803419dc8 Update to Jest 22.0.0
Reviewed By: cpojer

Differential Revision: D6591693

fbshipit-source-id: ac3d6320445372a5694e7618ed52eb2f391d0bad
2017-12-18 05:18:45 -08:00
267 changed files with 4969 additions and 3290 deletions
+106 -96
View File
@@ -1,41 +1,35 @@
aliases:
- &restore-node-cache
keys:
- v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
- v1-dependencies-{{ arch }}-{{ checksum "package.json" }}
# Fallback in case checksum fails
- v1-dependencies-{{ arch }}-{{ .Branch }}-
- v1-dependencies-{{ arch }}-
- &save-node-cache
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
key: v1-dependencies-{{ arch }}-{{ checksum "package.json" }}
- &restore-cache-analysis
keys:
- v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
- v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
# Fallback in case checksum fails
- v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-
- v1-analysis-dependencies-{{ arch }}-
- &save-cache-analysis
paths:
- danger/node_modules
- node_modules
key: v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
key: v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
- &restore-cache-android-packages
keys:
- v1-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
- v2-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
# Fallback in case checksum fails
- v1-android-sdkmanager-packages-{{ arch }}-
- v2-android-sdkmanager-packages-{{ arch }}-
- &save-cache-android-packages
paths:
- /opt/android/sdk/system-images/android-23
- /opt/android/sdk/system-images/android-19
- /opt/android/sdk/platforms/android-26
- /opt/android/sdk/platforms/android-23
- /opt/android/sdk/platforms/android-19
- /opt/android/sdk/build-tools/23.0.1
- /opt/android/sdk/add-ons/addon-google_apis-google-23
key: v1-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
- /opt/android/sdk
key: v2-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
- &restore-cache-ndk
keys:
@@ -50,23 +44,13 @@ aliases:
- /opt/ndk
key: v1-android-ndk-{{ arch }}-r10e-32-64
- &restore-cache-buck-downloads
keys:
- v1-buck-downloads-{{ arch }}-{{ .Branch }}-{{ checksum "ReactAndroid/build.gradle" }}
# Fallback in case checksum fails
- v1-buck-downloads-{{ arch }}-{{ .Branch }}-
- &save-cache-buck-downloads
paths:
- "ReactAndroid/build/downloads"
key: v1-buck-downloads-{{ arch }}-{{ .Branch }}-{{ checksum "ReactAndroid/build.gradle" }}
- &restore-cache-buck
keys:
- v1-buck-{{ arch }}-v2017.11.16.01
- v2-buck-{{ arch }}-v2017.09.04.02
- &save-cache-buck
paths:
- ~/buck
key: v1-buck-{{ arch }}-v2017.11.16.01
key: v2-buck-{{ arch }}-v2017.09.04.02
- &restore-cache-watchman
keys:
@@ -96,9 +80,16 @@ aliases:
- &run-node-tests
|
npm test -- --maxWorkers=2
- &run-lint-checks
|
npm run lint
- &run-flow-checks
|
npm run flow -- check
- &filter-only-master-stable
branches:
only:
@@ -144,14 +135,45 @@ aliases:
sudo apt-get update -y
sudo apt-get install ant autoconf automake g++ gcc libqt5widgets5 lib32z1 lib32stdc++6 make maven python-dev python3-dev qml-module-qtquick-controls qtdeclarative5-dev file -y
- &install-android-app-dependencies
|
buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
buck fetch ReactAndroid/src/main/java/com/facebook/react
buck fetch ReactAndroid/src/main/java/com/facebook/react/shell
buck fetch ReactAndroid/src/test/...
buck fetch ReactAndroid/src/androidTest/...
./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
- &build-android-app
name: Build Android App
command: |
buck build ReactAndroid/src/main/java/com/facebook/react
buck build ReactAndroid/src/main/java/com/facebook/react/shell
- &wait-for-avd
name: Wait for Android Virtual Device
command: source scripts/circle-ci-android-setup.sh && waitForAVD
- &check-js-bundle
name: Check for JavaScript Bundle
command: |
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
echo "JavaScript bundle missing, verify build-js-bundle step"; exit 1;
else
echo "JavaScript bundle found.";
fi
- &compile-native-libs
name: Compile Native Libs for Unit and Integration Tests
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
no_output_timeout: 6m
- &run-android-unit-tests
name: Unit Tests
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS
- &run-android-integration-tests
name: Build and Install Test APK
command: source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
- &collect-android-test-results
name: Collect Test Results
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ~/junit/ \;
find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ~/junit/ \;
when: always
defaults: &defaults
working_directory: ~/react-native
@@ -171,6 +193,19 @@ android_defaults: &android_defaults
version: 2
jobs:
# Runs JavaScript lint and flow checks
run-js-checks:
<<: *defaults
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- run: *run-lint-checks
- run: *run-flow-checks
# Runs JavaScript tests on Node 8
test-js-node-8:
<<: *defaults
@@ -187,19 +222,7 @@ jobs:
test-js-node-6:
<<: *defaults
docker:
- image: circleci/node:6.11.0
steps:
- checkout
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- run: *run-node-tests
# Runs JavaScript tests on Node 4
test-js-node-4:
<<: *defaults
docker:
- image: circleci/node:4.8.4
- image: circleci/node:6
steps:
- checkout
- restore-cache: *restore-node-cache
@@ -287,9 +310,12 @@ jobs:
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- restore-cache: *restore-cache-buck-downloads
- run: *install-android-app-dependencies
- save-cache: *save-cache-buck-downloads
- run: buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
- run: buck fetch ReactAndroid/src/main/java/com/facebook/react
- run: buck fetch ReactAndroid/src/main/java/com/facebook/react/shell
- run: buck fetch ReactAndroid/src/test/...
- run: buck fetch ReactAndroid/src/androidTest/...
- run: ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
- run:
name: Publish React Native Package
@@ -351,63 +377,42 @@ jobs:
- restore-cache: *restore-cache-ndk
- run: *install-ndk
- save-cache: *save-cache-ndk
- restore-cache: *restore-cache-buck
- run: *install-buck
- save-cache: *save-cache-buck
- run: *install-node
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- restore-cache: *restore-cache-buck-downloads
- run: *install-android-app-dependencies
- save-cache: *save-cache-buck-downloads
- run:
name: Build Android App
command: |
buck build ReactAndroid/src/main/java/com/facebook/react
buck build ReactAndroid/src/main/java/com/facebook/react/shell
# Wait for AVD to finish booting before running tests
- run:
name: Wait for Android Virtual Device
command: source scripts/circle-ci-android-setup.sh && waitForAVD
- run: buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
- run: buck fetch ReactAndroid/src/main/java/com/facebook/react
- run: buck fetch ReactAndroid/src/main/java/com/facebook/react/shell
- run: buck fetch ReactAndroid/src/test/...
- run: buck fetch ReactAndroid/src/androidTest/...
- run: ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
- run: *build-android-app
- run: *compile-native-libs
# The JavaScript Bundle is built as part of the build-js-bundle workflow,
# and is required for instrumentation tests.
- attach_workspace:
at: ReactAndroid/src/androidTest/assets/
- run:
name: Check for JavaScript Bundle
command: |
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
echo "JavaScript bundle missing, verify build-js-bundle step"; exit 1;
else
echo "JavaScript bundle found.";
fi
- run: *check-js-bundle
# Wait for AVD to finish booting before running tests
- run: *wait-for-avd
# Tests
- run:
name: Compile Native Libs for Unit and Integration Tests
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
no_output_timeout: 6m
- run:
name: Unit Tests
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS
# Integration Tests
- run:
name: Build and Install Test APK
command: source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
- run: *run-android-unit-tests
- run: *run-android-integration-tests
# post (always runs)
- run:
name: Collect Test Results
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ~/junit/ \;
find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ~/junit/ \;
when: always
- run: *collect-android-test-results
- store_test_results:
path: ~/junit
- store_artifacts:
@@ -449,7 +454,8 @@ jobs:
else
echo "Skipping code analysis."
fi
when: always
# Workflows enables us to run multiple jobs in parallel
workflows:
version: 2
@@ -457,7 +463,11 @@ workflows:
build:
jobs:
# Test Javascript on Node 8 and 6
# Run lint and flow checks
- run-js-checks:
filters: *filter-ignore-gh-pages
# Test JavaScript on Node 8 and 6
- test-js-node-8:
filters: *filter-ignore-gh-pages
- test-js-node-6:
+31 -14
View File
@@ -9,13 +9,15 @@
"env": {
"es6": true,
"jasmine": true,
"jest": true,
},
"plugins": [
"eslint-comments",
"flowtype",
"prettier",
"react"
"react",
"jest"
],
// Map from global var to bool specifying if it can be redefined
@@ -57,11 +59,6 @@
},
"rules": {
// Flow Plugin
// The following rules are made available via `eslint-plugin-flowtype`
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
// General
// This must be disallowed in this repo because the minimum supported
@@ -81,7 +78,7 @@
"no-constant-condition": 0, // disallow use of constant expressions in conditions
"no-control-regex": 1, // disallow control characters in regular expressions
"no-debugger": 1, // disallow use of debugger
"no-dupe-keys": 1, // disallow duplicate keys when creating object literals
"no-dupe-keys": 2, // disallow duplicate keys when creating object literals
"no-empty": 0, // disallow empty statements
"no-ex-assign": 1, // disallow assigning to the exception in a catch block
"no-extra-boolean-cast": 1, // disallow double-negation boolean casts in a boolean context
@@ -95,7 +92,7 @@
"no-regex-spaces": 1, // disallow multiple spaces in a regular expression literal
"no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default)
"no-sparse-arrays": 1, // disallow sparse arrays
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement
"no-unreachable": 2, // disallow unreachable statements after a return, throw, continue, or break statement
"use-isnan": 1, // disallow comparisons with the value NaN
"valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default)
"valid-typeof": 1, // Ensure that the results of typeof are compared against a valid string
@@ -116,7 +113,7 @@
"no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default)
"no-else-return": 0, // disallow else after a return in an if (off by default)
"no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default)
"no-eval": 1, // disallow use of eval()
"no-eval": 2, // disallow use of eval()
"no-extend-native": 1, // disallow adding to native types
"no-extra-bind": 1, // disallow unnecessary function binding
"no-fallthrough": 1, // disallow fallthrough of case statements
@@ -129,7 +126,7 @@
"no-multi-str": 0, // disallow use of multiline strings
"no-native-reassign": 0, // disallow reassignments of native objects
"no-new": 1, // disallow use of new operator when not part of the assignment or comparison
"no-new-func": 1, // disallow use of new operator for Function object
"no-new-func": 2, // disallow use of new operator for Function object
"no-new-wrappers": 1, // disallows creating new instances of String,Number, and Boolean
"no-octal": 1, // disallow use of octal literals
"no-octal-escape": 1, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251";
@@ -174,6 +171,18 @@
"no-restricted-modules": 1, // restrict usage of specified node modules (off by default)
"no-sync": 0, // disallow use of synchronous methods (off by default)
// ESLint Comments Plugin
// The following rules are made available via `eslint-plugin-eslint-comments`
'eslint-comments/no-aggregating-enable': 1, // disallows eslint-enable comments for multiple eslint-disable comments
'eslint-comments/no-unlimited-disable': 1, // disallows eslint-disable comments without rule names
'eslint-comments/no-unused-disable': 1, // disallow disables that don't cover any errors
'eslint-comments/no-unused-enable': 1, // // disallow enables that don't enable anything or enable rules that weren't disabled
// Flow Plugin
// The following rules are made available via `eslint-plugin-flowtype`
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
// Prettier Plugin
// https://github.com/prettier/eslint-plugin-prettier
"prettier/prettier": [2, "fb", "@format"],
@@ -183,12 +192,12 @@
"key-spacing": 0,
"keyword-spacing": 1, // enforce spacing before and after keywords
"jsx-quotes": [1, "prefer-double"],
"jsx-quotes": [1, "prefer-double"], // enforces the usage of double quotes for all JSX attribute values which doesnt contain a double quote
"comma-spacing": 0,
"no-multi-spaces": 0,
"brace-style": 0, // enforce one true brace style (off by default)
"camelcase": 0, // require camel case names
"consistent-this": [1, "self"], // enforces consistent naming when capturing the current execution context (off by default)
"consistent-this": 1, // enforces consistent naming when capturing the current execution context (off by default)
"eol-last": 1, // enforce newline at the end of file, with no multiple empty lines
"func-names": 0, // require function expressions to have a name (off by default)
"func-style": 0, // enforces use of function declarations or expressions (off by default)
@@ -196,6 +205,7 @@
"new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments
"no-nested-ternary": 0, // disallow nested ternary expressions (off by default)
"no-array-constructor": 1, // disallow use of the Array constructor
'no-empty-character-class': 1, // disallow the use of empty character classes in regular expressions
"no-lonely-if": 0, // disallow if as the only statement in an else block (off by default)
"no-new-object": 1, // disallow use of the Object constructor
"no-spaced-func": 1, // disallow space between function identifier and application
@@ -244,6 +254,13 @@
"react/prop-types": 0,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 0
"react/wrap-multilines": 0,
// Jest Plugin
// The following rules are made available via `eslint-plugin-jest`.
"jest/no-disabled-tests": 1,
"jest/no-focused-tests": 1,
"jest/no-identical-title": 1,
"jest/valid-expect": 1,
}
}
+1 -3
View File
@@ -51,7 +51,5 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version]
^0.61.0
^0.63.0
+1 -2
View File
@@ -1,5 +1,3 @@
docs/* @hramos
blog/* @hramos
Libraries/Animated/* @janicduplessis
Libraries/NativeAnimation/* @janicduplessis
Libraries/Image/* @shergin
@@ -9,6 +7,7 @@ React/Views/* @shergin
React/Modules/* @shergin
React/CxxBridge/* @mhorowitz
ReactAndroid/src/main/java/com/facebook/react/animated/* @janicduplessis
**/*.md @hramos
package.json @hramos
local-cli/core/* @grabbou @kureev
local-cli/link/* @grabbou @kureev
+10 -10
View File
@@ -11,10 +11,10 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad
There are many ways to contribute to React Native, and many of them do not involve writing any code. Here's a few ideas to get started:
* Simply start using React Native. Go through the [Getting Started](http://facebook.github.io/react-native/docs/getting-started.html) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](http://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
* Look through the [open issues](https://github.com/facebook/react-native/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](http://facebook.github.io/react-native/docs/contributing.html#triaging-issues-and-pull-requests).
* If you find an issue you would like to fix, [open a pull request](http://facebook.github.io/react-native/docs/contributing.html#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/react-native/labels/Good%20first%20issue) are a good place to get started.
* Read through the [React Native docs](http://facebook.github.io/react-native/docs). If you find anything that is confusing or can be improved, you can make edits by clicking "Improve this page" at the bottom of most docs.
* Simply start using React Native. Go through the [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](https://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
* Look through the [open issues](https://github.com/facebook/react-native/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](https://facebook.github.io/react-native/docs/contributing.html#triaging-issues-and-pull-requests).
* If you find an issue you would like to fix, [open a pull request](https://facebook.github.io/react-native/docs/contributing.html#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/react-native/labels/Good%20first%20issue) are a good place to get started.
* Read through the [React Native docs](https://facebook.github.io/react-native/docs/getting-started.html). If you find anything that is confusing or can be improved, you can make edits by clicking "Improve this page" at the bottom of most docs.
* Browse [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native) and answer questions. This will help you get familiarized with common pitfalls or misunderstandings, which can be useful when contributing updates to the documentation.
* Take a look at the [features requested](https://react-native.canny.io/feature-requests) by others in the community and consider opening a pull request if you see something you want to work on.
@@ -43,13 +43,13 @@ When a change made on GitHub is approved, it will first be imported into Faceboo
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to [communicate these changes](https://github.com/facebook/react-native/releases) and version appropriately so you can lock into a specific version if need be.
To see what changes are coming and provide better feedback to React Native contributors, use the [latest release candidate](http://facebook.github.io/react-native/versions.html) when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
To see what changes are coming and provide better feedback to React Native contributors, use the [latest release candidate](https://facebook.github.io/react-native/versions.html) when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
## Bugs
We use [GitHub Issues](https://github.com/facebook/react-native/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you a are certain this is a new, unreported bug, you can submit a [bug report](http://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
We use [GitHub Issues](https://github.com/facebook/react-native/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you a are certain this is a new, unreported bug, you can submit a [bug report](https://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
If you have questions about using React Native, the [Community page](http://facebook.github.io/react-native/support.html) list various resources that should help you get started.
If you have questions about using React Native, the [Community page](https://facebook.github.io/react-native/help.html) list various resources that should help you get started.
We also have a [place where you can request features or enhancements](https://react-native.canny.io/feature-requests). If you see anything you'd like to be implemented, vote it up and explain your use case.
@@ -60,9 +60,9 @@ When [opening a new issue](https://github.com/facebook/react-native/issues/new),
* **One issue, one bug:** Please report a single bug per issue.
* **Provide a Snack:** The best way to get attention on your issue is to provide a reduced test case. You can use [Snack](https://snack.expo.io/) to demonstrate the issue.
* **Provide reproduction steps:** List all the steps necessary to reproduce the issue. Provide a Snack or upload a sample project to GitHub. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort.
* **Try out the latest version:** Verify that the issue can be reproduced locally by updating your project to use [React Native from `master`](http://facebook.github.io/react-native/versions.html). The bug may have already been fixed!
* **Try out the latest version:** Verify that the issue can be reproduced locally by updating your project to use [React Native from `master`](https://facebook.github.io/react-native/versions.html). The bug may have already been fixed!
We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) or reaching out to the community through [other channels](https://facebook.github.io/react-native/support.html).
We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native) or reaching out to the community through [other channels](https://facebook.github.io/react-native/support.html).
### Security bugs
@@ -117,7 +117,7 @@ See [What is a Test Plan?](https://medium.com/@martinkonicek/what-is-a-test-plan
Make sure all **tests pass** on [Circle CI][circle]. PRs that break tests are unlikely to be merged. Learn more about [testing your changes here](https://facebook.github.io/react-native/docs/testing.html).
[circle]: http://circleci.com/gh/facebook/react-native
[circle]: https://circleci.com/gh/facebook/react-native
#### Breaking changes
+2 -6
View File
@@ -1,7 +1,7 @@
FROM containership/android-base:latest
FROM hramos/android-base:latest
# set default environment variables
ENV GRADLE_OPTS="-Dorg.gradle.jvmargs=\"-Xmx512m -XX:+HeapDumpOnOutOfMemoryError\""
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=\"-Xmx512m -XX:+HeapDumpOnOutOfMemoryError\""
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
# add ReactAndroid directory
@@ -46,9 +46,5 @@ RUN cd $(npm root -g)/npm && npm install fs-extra && sed -i -e s/graceful-fs/fs-
# build node dependencies
RUN npm install
RUN npm install github@0.2.4
WORKDIR /app/website
RUN npm install
WORKDIR /app
+12 -36
View File
@@ -1,8 +1,8 @@
FROM library/ubuntu:16.04
# set default build arguments
ARG ANDROID_VERSION=25.2.3
ARG BUCK_VERSION=f3452a6a7ab15a60e94c962e686293acbe677473
ARG ANDROID_TOOLS_VERSION=25.2.5
ARG BUCK_VERSION=v2017.11.16.01
ARG NDK_VERSION=10e
ARG NODE_VERSION=6.2.0
ARG WATCHMAN_VERSION=4.7.0
@@ -12,7 +12,7 @@ ENV ADB_INSTALL_TIMEOUT=10
ENV PATH=${PATH}:/opt/buck/bin/
ENV ANDROID_HOME=/opt/android
ENV ANDROID_SDK_HOME=${ANDROID_HOME}
ENV PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
ENV PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
ENV ANDROID_NDK=/opt/ndk/android-ndk-r$NDK_VERSION
ENV PATH=${PATH}:${ANDROID_NDK}
@@ -28,9 +28,8 @@ RUN npm install n -g
RUN n $NODE_VERSION
# download buck
RUN git clone https://github.com/facebook/buck.git /opt/buck
RUN git clone https://github.com/facebook/buck.git /opt/buck --branch $BUCK_VERSION --depth=1
WORKDIR /opt/buck
RUN git checkout $BUCK_VERSION
# build buck
RUN ant
@@ -46,10 +45,11 @@ RUN ./configure
RUN make
RUN make install
# Full reference at https://dl.google.com/android/repository/repository2-1.xml
# download and unpack android
RUN mkdir /opt/android
WORKDIR /opt/android
RUN curl --silent https://dl.google.com/android/repository/tools_r$ANDROID_VERSION-linux.zip > android.zip
RUN curl --silent https://dl.google.com/android/repository/tools_r$ANDROID_TOOLS_VERSION-linux.zip > android.zip
RUN unzip android.zip
RUN rm android.zip
@@ -63,39 +63,15 @@ RUN unzip ndk.zip
RUN rm ndk.zip
# Add android SDK tools
# Android SDK Platform-tools, revision 25.0.4
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android SDK Platform-tools, revision 25.0.4" | awk '{ print $1 }' | sed 's/.$//')
# Android SDK Build-tools, revision 23.0.1
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android SDK Build-tools, revision 23.0.1" | awk '{ print $1 }' | sed 's/.$//')
# SDK Platform Android 6.0, API 23, revision 3
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "SDK Platform Android 6.0, API 23" | awk '{ print $1 }' | sed 's/.$//')
# SDK Platform Android 4.4.2, API 19, revision 4
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "SDK Platform Android 4.4.2, API 19, revision 4" | awk '{ print $1 }' | sed 's/.$//')
# ARM EABI v7a System Image, Android API 19, revision 5
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "ARM EABI v7a System Image, Android API 19, revision 5" | awk '{ print $1 }' | sed 's/.$//')
# Intel x86 Atom System Image, Android API 19, revision 5
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Intel x86 Atom System Image, Android API 19, revision 5" | awk '{ print $1 }' | sed 's/.$//')
# Google APIs, Android API 23, revision 1
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Google APIs, Android API 23, revision 1" | awk '{ print $1 }' | sed 's/.$//')
# Android Support Repository, revision 45
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android Support Repository" | awk '{ print $1 }' | sed 's/.$//')
RUN echo "y" | sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
RUN echo "y" | sdkmanager "platforms;android-23"
RUN echo "y" | sdkmanager "platforms;android-19"
RUN echo "y" | sdkmanager "build-tools;23.0.1"
RUN echo "y" | sdkmanager "add-ons;addon-google_apis-google-23"
RUN echo "y" | sdkmanager "extras;android;m2repository"
# Link adb executable
RUN ln -s /opt/android/platform-tools/adb /usr/bin/adb
# Install google-chrome
RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable
# clean up unnecessary directories
RUN rm -rf /opt/android/system-images/android-19/default/x86
@@ -20,7 +20,6 @@
* --package - com.facebook.react.tests
* --retries [num] - how many times to retry possible flaky commands: npm install and running tests, default 1
*/
/*eslint-disable no-undef */
const argv = require('yargs').argv;
const async = require('async');
+9 -5
View File
@@ -15,6 +15,15 @@
@implementation ARTSurfaceView
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
self.opaque = NO;
}
return self;
}
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex
{
[super insertReactSubview:subview atIndex:atIndex];
@@ -46,9 +55,4 @@
}
}
- (void)reactSetInheritedBackgroundColor:(UIColor *)inheritedBackgroundColor
{
self.backgroundColor = inheritedBackgroundColor;
}
@end
@@ -80,7 +80,7 @@ describe('Native Animated', () => {
anim.setValue(0.5);
expect(nativeAnimatedModule.setAnimatedNodeValue).toBeCalledWith(jasmine.any(Number), 0.5);
expect(nativeAnimatedModule.setAnimatedNodeValue).toBeCalledWith(expect.any(Number), 0.5);
expect(c.refs.node.setNativeProps).not.toHaveBeenCalled();
});
@@ -95,12 +95,12 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
{type: 'value', value: 0, offset: 10},
);
anim.setOffset(20);
expect(nativeAnimatedModule.setAnimatedNodeOffset)
.toBeCalledWith(jasmine.any(Number), 20);
.toBeCalledWith(expect.any(Number), 20);
});
it('should flatten offset', () => {
@@ -113,12 +113,12 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
{type: 'value', value: 0, offset: 0},
);
anim.flattenOffset();
expect(nativeAnimatedModule.flattenAnimatedNodeOffset)
.toBeCalledWith(jasmine.any(Number));
.toBeCalledWith(expect.any(Number));
});
it('should extract offset', () => {
@@ -131,12 +131,12 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
{type: 'value', value: 0, offset: 0},
);
anim.extractOffset();
expect(nativeAnimatedModule.extractAnimatedNodeOffset)
.toBeCalledWith(jasmine.any(Number));
.toBeCalledWith(expect.any(Number));
});
});
@@ -214,14 +214,14 @@ describe('Native Animated', () => {
);
const c = createAndMountComponent(Animated.View, {onTouchMove: event});
expect(nativeAnimatedModule.addAnimatedEventToView).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
'onTouchMove',
{nativeEventPath: ['state', 'foo'], animatedValueTag: value.__getNativeTag()},
);
c.componentWillUnmount();
expect(nativeAnimatedModule.removeAnimatedEventFromView).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
'onTouchMove',
value.__getNativeTag(),
);
@@ -271,10 +271,10 @@ describe('Native Animated', () => {
expect(nativeAnimatedModule.connectAnimatedNodes).toHaveBeenCalledTimes(2);
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
{type: 'frames', frames: jasmine.any(Array), toValue: jasmine.any(Number), iterations: 1},
jasmine.any(Function)
expect.any(Number),
expect.any(Number),
{type: 'frames', frames: expect.any(Array), toValue: expect.any(Number), iterations: 1},
expect.any(Function)
);
expect(nativeAnimatedModule.disconnectAnimatedNodes).toHaveBeenCalledTimes(2);
@@ -292,11 +292,11 @@ describe('Native Animated', () => {
Animated.timing(anim, {toValue: 10, duration: 1000, useNativeDriver: true}).start();
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), {type: 'value', value: 0, offset: 0});
.toBeCalledWith(expect.any(Number), {type: 'value', value: 0, offset: 0});
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), {type: 'style', style: {opacity: jasmine.any(Number)}});
.toBeCalledWith(expect.any(Number), {type: 'style', style: {opacity: expect.any(Number)}});
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), {type: 'props', props: {style: jasmine.any(Number)}});
.toBeCalledWith(expect.any(Number), {type: 'props', props: {style: expect.any(Number)}});
});
it('sends a valid graph description for Animated.add nodes', () => {
@@ -312,8 +312,8 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
{type: 'addition', input: jasmine.any(Array)},
expect.any(Number),
{type: 'addition', input: expect.any(Array)},
);
const additionCalls = nativeAnimatedModule.createAnimatedNode.mock.calls.filter(
(call) => call[1].type === 'addition'
@@ -344,8 +344,8 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
{type: 'multiplication', input: jasmine.any(Array)},
expect.any(Number),
{type: 'multiplication', input: expect.any(Array)},
);
const multiplicationCalls = nativeAnimatedModule.createAnimatedNode.mock.calls.filter(
(call) => call[1].type === 'multiplication'
@@ -376,7 +376,7 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), {type: 'division', input: jasmine.any(Array)});
.toBeCalledWith(expect.any(Number), {type: 'division', input: expect.any(Array)});
const divisionCalls = nativeAnimatedModule.createAnimatedNode.mock.calls.filter(
(call) => call[1].type === 'division'
);
@@ -404,8 +404,8 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
{type: 'modulus', modulus: 4, input: jasmine.any(Number)},
expect.any(Number),
{type: 'modulus', modulus: 4, input: expect.any(Number)},
);
const moduloCalls = nativeAnimatedModule.createAnimatedNode.mock.calls.filter(
(call) => call[1].type === 'modulus'
@@ -435,11 +435,11 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
{type: 'value', value: 10, offset: 0}
);
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), {
.toBeCalledWith(expect.any(Number), {
type: 'interpolation',
inputRange: [10, 20],
outputRange: [0, 1],
@@ -466,11 +466,11 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
expect.any(Number),
{
type: 'transform',
transforms: [{
nodeTag: jasmine.any(Number),
nodeTag: expect.any(Number),
property: 'translateX',
type: 'animated',
}, {
@@ -493,8 +493,8 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode).toBeCalledWith(
jasmine.any(Number),
{type: 'diffclamp', input: jasmine.any(Number), max: 20, min: 0},
expect.any(Number),
{type: 'diffclamp', input: expect.any(Number), max: 20, min: 0},
);
const diffClampCalls = nativeAnimatedModule.createAnimatedNode.mock.calls.filter(
(call) => call[1].type === 'diffclamp'
@@ -570,9 +570,9 @@ describe('Native Animated', () => {
});
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), { type: 'style', style: { opacity: jasmine.any(Number) }});
.toBeCalledWith(expect.any(Number), { type: 'style', style: { opacity: expect.any(Number) }});
expect(nativeAnimatedModule.createAnimatedNode)
.toBeCalledWith(jasmine.any(Number), { type: 'props', props: { style: jasmine.any(Number) }});
.toBeCalledWith(expect.any(Number), { type: 'props', props: { style: expect.any(Number) }});
});
});
@@ -582,10 +582,10 @@ describe('Native Animated', () => {
Animated.timing(anim, {toValue: 10, duration: 1000, useNativeDriver: true}).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
{type: 'frames', frames: jasmine.any(Array), toValue: jasmine.any(Number), iterations: 1},
jasmine.any(Function)
expect.any(Number),
expect.any(Number),
{type: 'frames', frames: expect.any(Array), toValue: expect.any(Number), iterations: 1},
expect.any(Function)
);
});
@@ -593,8 +593,8 @@ describe('Native Animated', () => {
const anim = new Animated.Value(0);
Animated.spring(anim, {toValue: 10, friction: 5, tension: 164, useNativeDriver: true}).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
expect.any(Number),
expect.any(Number),
{
type: 'spring',
stiffness: 679.08,
@@ -607,7 +607,7 @@ describe('Native Animated', () => {
toValue: 10,
iterations: 1,
},
jasmine.any(Function)
expect.any(Function)
);
Animated.spring(anim, {
@@ -618,8 +618,8 @@ describe('Native Animated', () => {
useNativeDriver: true
}).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
expect.any(Number),
expect.any(Number),
{
type: 'spring',
stiffness: 1000,
@@ -632,13 +632,13 @@ describe('Native Animated', () => {
toValue: 10,
iterations: 1,
},
jasmine.any(Function)
expect.any(Function)
);
Animated.spring(anim, {toValue: 10, bounciness: 8, speed: 10, useNativeDriver: true}).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
expect.any(Number),
expect.any(Number),
{
type: 'spring',
damping: 23.05223140901191,
@@ -651,7 +651,7 @@ describe('Native Animated', () => {
toValue: 10,
iterations: 1,
},
jasmine.any(Function)
expect.any(Function)
);
});
@@ -660,10 +660,10 @@ describe('Native Animated', () => {
Animated.decay(anim, {velocity: 10, deceleration: 0.1, useNativeDriver: true}).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
expect.any(Number),
expect.any(Number),
{type: 'decay', deceleration: 0.1, velocity: 10, iterations: 1},
jasmine.any(Function)
expect.any(Function)
);
});
@@ -675,10 +675,10 @@ describe('Native Animated', () => {
).start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
expect.any(Number),
expect.any(Number),
{type: 'decay', deceleration: 0.1, velocity: 10, iterations: 10},
jasmine.any(Function)
expect.any(Function)
);
});
@@ -688,10 +688,10 @@ describe('Native Animated', () => {
animation.start();
expect(nativeAnimatedModule.startAnimatingNode).toBeCalledWith(
jasmine.any(Number),
jasmine.any(Number),
{type: 'frames', frames: jasmine.any(Array), toValue: jasmine.any(Number), iterations: 1},
jasmine.any(Function)
expect.any(Number),
expect.any(Number),
{type: 'frames', frames: expect.any(Array), toValue: expect.any(Number), iterations: 1},
expect.any(Function)
);
const animationId = nativeAnimatedModule.startAnimatingNode.mock.calls[0][0];
+74 -42
View File
@@ -5,100 +5,132 @@
* @copyright 2014-2015 Gaetan Renaudeau. MIT License.
* @noflow
* @emails oncall+react_native
* @format
*/
/* eslint-disable */
'use strict';
var bezier = require('bezier');
var identity = function (x) { return x; };
var identity = function(x) {
return x;
};
function assertClose (a, b, precision = 3) {
function assertClose(a, b, precision = 3) {
expect(a).toBeCloseTo(b, precision);
}
function makeAssertCloseWithPrecision (precision) {
return function (a, b) {
function makeAssertCloseWithPrecision(precision) {
return function(a, b) {
assertClose(a, b, precision);
};
}
function allEquals (be1, be2, samples, assertion) {
if (!assertion) assertion = assertClose;
for (var i=0; i<=samples; ++i) {
function allEquals(be1, be2, samples, assertion) {
if (!assertion) {
assertion = assertClose;
}
for (var i = 0; i <= samples; ++i) {
var x = i / samples;
assertion(be1(x), be2(x));
}
}
function repeat (n) {
return function (f) {
for (var i=0; i<n; ++i) f(i);
function repeat(n) {
return function(f) {
for (var i = 0; i < n; ++i) {
f(i);
}
};
}
describe('bezier', function(){
it('should be a function', function(){
describe('bezier', function() {
it('should be a function', function() {
expect(typeof bezier === 'function').toBe(true);
});
it('should creates an object', function(){
it('should creates an object', function() {
expect(typeof bezier(0, 0, 1, 1) === 'function').toBe(true);
});
it('should fail with wrong arguments', function () {
expect(function () { bezier(0.5, 0.5, -5, 0.5); }).toThrow();
expect(function () { bezier(0.5, 0.5, 5, 0.5); }).toThrow();
expect(function () { bezier(-2, 0.5, 0.5, 0.5); }).toThrow();
expect(function () { bezier(2, 0.5, 0.5, 0.5); }).toThrow();
it('should fail with wrong arguments', function() {
expect(function() {
bezier(0.5, 0.5, -5, 0.5);
}).toThrow();
expect(function() {
bezier(0.5, 0.5, 5, 0.5);
}).toThrow();
expect(function() {
bezier(-2, 0.5, 0.5, 0.5);
}).toThrow();
expect(function() {
bezier(2, 0.5, 0.5, 0.5);
}).toThrow();
});
describe('linear curves', function () {
it('should be linear', function () {
describe('linear curves', function() {
it('should be linear', function() {
allEquals(bezier(0, 0, 1, 1), bezier(1, 1, 0, 0), 100);
allEquals(bezier(0, 0, 1, 1), identity, 100);
});
});
describe('common properties', function () {
it('should be the right value at extremes', function () {
repeat(10)(function () {
var a = Math.random(), b = 2*Math.random()-0.5, c = Math.random(), d = 2*Math.random()-0.5;
describe('common properties', function() {
it('should be the right value at extremes', function() {
repeat(10)(function() {
var a = Math.random(),
b = 2 * Math.random() - 0.5,
c = Math.random(),
d = 2 * Math.random() - 0.5;
var easing = bezier(a, b, c, d);
expect(easing(0)).toBe(0);
expect(easing(1)).toBe(1);
});
});
it('should approach the projected value of its x=y projected curve', function () {
repeat(10)(function () {
var a = Math.random(), b = Math.random(), c = Math.random(), d = Math.random();
it('should approach the projected value of its x=y projected curve', function() {
repeat(10)(function() {
var a = Math.random(),
b = Math.random(),
c = Math.random(),
d = Math.random();
var easing = bezier(a, b, c, d);
var projected = bezier(b, a, d, c);
var composed = function (x) { return projected(easing(x)); };
var composed = function(x) {
return projected(easing(x));
};
allEquals(identity, composed, 100, makeAssertCloseWithPrecision(2));
});
});
});
describe('two same instances', function () {
it('should be strictly equals', function () {
repeat(10)(function () {
var a = Math.random(), b = 2*Math.random()-0.5, c = Math.random(), d = 2*Math.random()-0.5;
describe('two same instances', function() {
it('should be strictly equals', function() {
repeat(10)(function() {
var a = Math.random(),
b = 2 * Math.random() - 0.5,
c = Math.random(),
d = 2 * Math.random() - 0.5;
allEquals(bezier(a, b, c, d), bezier(a, b, c, d), 100, 0);
});
});
});
describe('symetric curves', function () {
it('should have a central value y~=0.5 at x=0.5', function () {
repeat(10)(function () {
var a = Math.random(), b = 2*Math.random()-0.5, c = 1-a, d = 1-b;
describe('symetric curves', function() {
it('should have a central value y~=0.5 at x=0.5', function() {
repeat(10)(function() {
var a = Math.random(),
b = 2 * Math.random() - 0.5,
c = 1 - a,
d = 1 - b;
var easing = bezier(a, b, c, d);
assertClose(easing(0.5), 0.5, 2);
});
});
it('should be symetrical', function () {
repeat(10)(function () {
var a = Math.random(), b = 2*Math.random()-0.5, c = 1-a, d = 1-b;
it('should be symetrical', function() {
repeat(10)(function() {
var a = Math.random(),
b = 2 * Math.random() - 0.5,
c = 1 - a,
d = 1 - b;
var easing = bezier(a, b, c, d);
var sym = function (x) { return 1 - easing(1-x); };
var sym = function(x) {
return 1 - easing(1 - x);
};
allEquals(easing, sym, 100, makeAssertCloseWithPrecision(2));
});
});
@@ -54,10 +54,10 @@ describe('MessageQueue', function() {
});
it('should call a local function with the function name', () => {
MessageQueueTestModule.testHook2 = jasmine.createSpy();
expect(MessageQueueTestModule.testHook2.calls.count()).toEqual(0);
MessageQueueTestModule.testHook2 = jest.fn();
expect(MessageQueueTestModule.testHook2.mock.calls.length).toEqual(0);
queue.__callFunction('MessageQueueTestModule', 'testHook2', [2]);
expect(MessageQueueTestModule.testHook2.calls.count()).toEqual(1);
expect(MessageQueueTestModule.testHook2.mock.calls.length).toEqual(1);
});
it('should store callbacks', () => {
@@ -57,8 +57,8 @@ describe('MessageQueue', function() {
});
it('should make round trip and clear memory', function() {
const onFail = jasmine.createSpy();
const onSucc = jasmine.createSpy();
const onFail = jest.fn();
const onSucc = jest.fn();
// Perform communication
NativeModules.RemoteModule1.promiseMethod('paloAlto', 'menloPark', onFail, onSucc);
@@ -98,8 +98,8 @@ describe('MessageQueue', function() {
expect(function() {
BatchedBridge.__invokeCallback(firstSuccCBID, ['firstSucc']);
}).toThrow();
expect(onFail.calls.count()).toBe(1);
expect(onSucc.calls.count()).toBe(0);
expect(onFail.mock.calls.length).toBe(1);
expect(onSucc.mock.calls.length).toBe(0);
// Handle the second remote invocation by signaling success.
BatchedBridge.__invokeCallback(secondSuccCBID, ['secondSucc']);
@@ -107,7 +107,7 @@ describe('MessageQueue', function() {
expect(function() {
BatchedBridge.__invokeCallback(secondFailCBID, ['secondFail']);
}).toThrow();
expect(onFail.calls.count()).toBe(1);
expect(onSucc.calls.count()).toBe(1);
expect(onFail.mock.calls.length).toBe(1);
expect(onSucc.mock.calls.length).toBe(1);
});
});
+33 -10
View File
@@ -11,6 +11,7 @@
*/
'use strict';
const LayoutAnimation = require('LayoutAnimation');
const invariant = require('fbjs/lib/invariant');
const NativeEventEmitter = require('NativeEventEmitter');
const KeyboardObserver = require('NativeModules').KeyboardObserver;
@@ -25,16 +26,18 @@ type KeyboardEventName =
| 'keyboardWillChangeFrame'
| 'keyboardDidChangeFrame';
type KeyboardEventData = {
endCoordinates: {
width: number,
height: number,
screenX: number,
screenY: number,
},
};
export type KeyboardEvent = {|
+duration?: number,
+easing?: string,
+endCoordinates: {|
+width: number,
+height: number,
+screenX: number,
+screenY: number,
|},
|};
type KeyboardEventListener = (e: KeyboardEventData) => void;
type KeyboardEventListener = (e: KeyboardEvent) => void;
// The following object exists for documentation purposes
// Actual work happens in
@@ -134,11 +137,31 @@ let Keyboard = {
*/
dismiss() {
invariant(false, 'Dummy method used for documentation');
}
},
/**
* Useful for syncing TextInput (or other keyboard accessory view) size of
* position changes with keyboard movements.
*/
scheduleLayoutAnimation(event: KeyboardEvent) {
invariant(false, 'Dummy method used for documentation');
},
};
// Throw away the dummy object and reassign it to original module
Keyboard = KeyboardEventEmitter;
Keyboard.dismiss = dismissKeyboard;
Keyboard.scheduleLayoutAnimation = function(event: KeyboardEvent) {
const {duration, easing} = event;
if (duration) {
LayoutAnimation.configureNext({
duration: duration,
update: {
duration: duration,
type: (easing && LayoutAnimation.Types[easing]) || 'keyboard',
},
});
}
};
module.exports = Keyboard;
+34 -42
View File
@@ -11,27 +11,21 @@
*/
'use strict';
var Dimensions = require('Dimensions');
var FrameRateLogger = require('FrameRateLogger');
var Keyboard = require('Keyboard');
var ReactNative = require('ReactNative');
var Subscribable = require('Subscribable');
var TextInputState = require('TextInputState');
var UIManager = require('UIManager');
const Dimensions = require('Dimensions');
const FrameRateLogger = require('FrameRateLogger');
const Keyboard = require('Keyboard');
const ReactNative = require('ReactNative');
const Subscribable = require('Subscribable');
const TextInputState = require('TextInputState');
const UIManager = require('UIManager');
var invariant = require('fbjs/lib/invariant');
var nullthrows = require('fbjs/lib/nullthrows');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
var performanceNow = require('fbjs/lib/performanceNow');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
var warning = require('fbjs/lib/warning');
const invariant = require('fbjs/lib/invariant');
const nullthrows = require('fbjs/lib/nullthrows');
const performanceNow = require('fbjs/lib/performanceNow');
const warning = require('fbjs/lib/warning');
var { ScrollViewManager } = require('NativeModules');
var { getInstanceFromNode } = require('ReactNativeComponentTree');
const { ScrollViewManager } = require('NativeModules');
const { getInstanceFromNode } = require('ReactNativeComponentTree');
/**
* Mixin that can be integrated in order to handle scrolling that plays well
@@ -111,7 +105,7 @@ var { getInstanceFromNode } = require('ReactNativeComponentTree');
* this.props.onKeyboardDidHide
*/
var IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
const IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
type State = {
isTouching: boolean,
@@ -123,15 +117,15 @@ type State = {
type Event = Object;
function isTagInstanceOfTextInput(tag) {
var instance = getInstanceFromNode(tag);
const instance = getInstanceFromNode(tag);
return instance && instance.viewConfig && (
instance.viewConfig.uiViewClassName === 'AndroidTextInput' ||
instance.viewConfig.uiViewClassName === 'RCTTextView' ||
instance.viewConfig.uiViewClassName === 'RCTTextField'
instance.viewConfig.uiViewClassName === 'RCTMultilineTextInputView' ||
instance.viewConfig.uiViewClassName === 'RCTSinglelineTextInputView'
);
}
var ScrollResponderMixin = {
const ScrollResponderMixin = {
mixins: [Subscribable.Mixin],
scrollResponderMixinGetInitialState: function(): State {
return {
@@ -182,7 +176,7 @@ var ScrollResponderMixin = {
*
*/
scrollResponderHandleStartShouldSetResponder: function(e: Event): boolean {
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
const currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (this.props.keyboardShouldPersistTaps === 'handled' &&
currentlyFocusedTextInput != null &&
@@ -205,9 +199,9 @@ var ScrollResponderMixin = {
*/
scrollResponderHandleStartShouldSetResponderCapture: function(e: Event): boolean {
// First see if we want to eat taps while the keyboard is up
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
var {keyboardShouldPersistTaps} = this.props;
var keyboardNeverPersistTaps = !keyboardShouldPersistTaps ||
const currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
const {keyboardShouldPersistTaps} = this.props;
const keyboardNeverPersistTaps = !keyboardShouldPersistTaps ||
keyboardShouldPersistTaps === 'never';
if (keyboardNeverPersistTaps &&
currentlyFocusedTextInput != null &&
@@ -255,7 +249,7 @@ var ScrollResponderMixin = {
* @param {SyntheticEvent} e Event.
*/
scrollResponderHandleTouchEnd: function(e: Event) {
var nativeEvent = e.nativeEvent;
const nativeEvent = e.nativeEvent;
this.state.isTouching = nativeEvent.touches.length !== 0;
this.props.onTouchEnd && this.props.onTouchEnd(e);
},
@@ -278,7 +272,7 @@ var ScrollResponderMixin = {
// By default scroll views will unfocus a textField
// if another touch occurs outside of it
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
const currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
if (this.props.keyboardShouldPersistTaps !== true &&
this.props.keyboardShouldPersistTaps !== 'always' &&
currentlyFocusedTextInput != null &&
@@ -388,9 +382,9 @@ var ScrollResponderMixin = {
* a touch has just started or ended.
*/
scrollResponderIsAnimating: function(): boolean {
var now = performanceNow();
var timeSinceLastMomentumScrollEnd = now - this.state.lastMomentumScrollEndTime;
var isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS ||
const now = performanceNow();
const timeSinceLastMomentumScrollEnd = now - this.state.lastMomentumScrollEndTime;
const isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS ||
this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime;
return isAnimating;
},
@@ -469,15 +463,13 @@ var ScrollResponderMixin = {
* @platform ios
*/
scrollResponderZoomTo: function(
rect: { x: number, y: number, width: number, height: number, animated?: boolean },
rect: {| x: number, y: number, width: number, height: number, animated?: boolean |},
animated?: boolean // deprecated, put this inside the rect argument instead
) {
invariant(ScrollViewManager && ScrollViewManager.zoomToRect, 'zoomToRect is not implemented');
if ('animated' in rect) {
/* $FlowFixMe(>=0.60.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.60 was deployed. To see the error delete this
* comment and run Flow. */
var { animated, ...rect } = rect;
animated = rect.animated;
delete rect.animated;
} else if (typeof animated !== 'undefined') {
console.warn('`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead');
}
@@ -527,11 +519,11 @@ var ScrollResponderMixin = {
* @param {number} height Height of the text input.
*/
scrollResponderInputMeasureAndScrollToKeyboard: function(left: number, top: number, width: number, height: number) {
var keyboardScreenY = Dimensions.get('window').height;
let keyboardScreenY = Dimensions.get('window').height;
if (this.keyboardWillOpenTo) {
keyboardScreenY = this.keyboardWillOpenTo.endCoordinates.screenY;
}
var scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset;
let scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset;
// By default, this can scroll with negative offset, pulling the content
// down so that the target component's bottom meets the keyboard's top.
@@ -557,7 +549,7 @@ var ScrollResponderMixin = {
* The `keyboardWillShow` is called before input focus.
*/
componentWillMount: function() {
var {keyboardShouldPersistTaps} = this.props;
const {keyboardShouldPersistTaps} = this.props;
warning(
typeof keyboardShouldPersistTaps !== 'boolean',
`'keyboardShouldPersistTaps={${keyboardShouldPersistTaps}}' is deprecated. `
@@ -626,7 +618,7 @@ var ScrollResponderMixin = {
};
var ScrollResponder = {
const ScrollResponder = {
Mixin: ScrollResponderMixin,
};
+12 -3
View File
@@ -256,6 +256,15 @@ const ScrollView = createReactClass({
* events can be controlled using the `scrollEventThrottle` prop.
*/
onScroll: PropTypes.func,
/**
* Called when the user begins to drag the scroll view.
*/
onScrollBeginDrag: PropTypes.func,
/**
* Called when the user stops dragging the scroll view and it either stops
* or begins to glide.
*/
onScrollEndDrag: PropTypes.func,
/**
* Called when scrollable content view of the ScrollView changes.
*
@@ -335,10 +344,10 @@ const ScrollView = createReactClass({
* When set, causes the scroll view to stop at multiples of the value of
* `snapToInterval`. This can be used for paginating through children
* that have lengths smaller than the scroll view. Typically used in
* combination with `snapToAlignment` and `decelerationRate="fast"`.
* combination with `snapToAlignment` and `decelerationRate="fast"` on ios.
* Overrides less configurable `pagingEnabled` prop.
*
* @platform ios
* Supported for horizontal scrollview on android.
*/
snapToInterval: PropTypes.number,
/**
@@ -602,7 +611,7 @@ const ScrollView = createReactClass({
_handleScroll: function(e: Object) {
if (__DEV__) {
if (this.props.onScroll && this.props.scrollEventThrottle == null && Platform.OS === 'ios') {
console.log( // eslint-disable-line no-console
console.log(
'You specified `onScroll` on a <ScrollView> but not ' +
'`scrollEventThrottle`. You will only receive one event. ' +
'Using `16` you get all the events but be aware that it may ' +
+10 -49
View File
@@ -50,8 +50,8 @@ const onlyMultiline = {
if (Platform.OS === 'android') {
var AndroidTextInput = requireNativeComponent('AndroidTextInput', null);
} else if (Platform.OS === 'ios') {
var RCTTextView = requireNativeComponent('RCTTextView', null);
var RCTTextField = requireNativeComponent('RCTTextField', null);
var RCTMultilineTextInputView = requireNativeComponent('RCTMultilineTextInputView', null);
var RCTSinglelineTextInputView = requireNativeComponent('RCTSinglelineTextInputView', null);
}
type Event = Object;
@@ -219,13 +219,6 @@ const TextInput = createReactClass({
* The default value is `false`.
*/
autoFocus: PropTypes.bool,
/**
* If true, will increase the height of the textbox if need be. If false,
* the textbox will become scrollable once the height is reached. The
* default value is false.
* @platform android
*/
autoGrow: PropTypes.bool,
/**
* Specifies whether fonts should scale to respect Text Size accessibility settings. The
* default is `true`.
@@ -351,11 +344,6 @@ const TextInput = createReactClass({
* instead of implementing the logic in JS to avoid flicker.
*/
maxLength: PropTypes.number,
/**
* If autogrow is `true`, limits the height that the TextInput box can grow
* to. Once it reaches this height, the TextInput becomes scrollable.
*/
maxHeight: PropTypes.number,
/**
* Sets the number of lines for a `TextInput`. Use it with multiline set to
* `true` to be able to fill the lines.
@@ -434,7 +422,6 @@ const TextInput = createReactClass({
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
* the typed-in character otherwise including `' '` for space.
* Fires before `onChange` callbacks.
* @platform ios
*/
onKeyPress: PropTypes.func,
/**
@@ -612,10 +599,6 @@ const TextInput = createReactClass({
*/
mixins: [NativeMethodsMixin, TimerMixin],
getInitialState: function() {
return {layoutHeight: this._layoutHeight};
},
/**
* Returns `true` if the input is currently focused; `false` otherwise.
*/
@@ -633,7 +616,6 @@ const TextInput = createReactClass({
_focusSubscription: (undefined: ?Function),
_lastNativeText: (undefined: ?string),
_lastNativeSelection: (undefined: ?Selection),
_layoutHeight: (-1: number),
componentDidMount: function() {
this._lastNativeText = this.props.value;
@@ -724,7 +706,7 @@ const TextInput = createReactClass({
}
}
textContainer =
<RCTTextField
<RCTSinglelineTextInputView
ref={this._setNativeRef}
{...props}
onFocus={this._onFocus}
@@ -750,7 +732,7 @@ const TextInput = createReactClass({
}
props.style.unshift(styles.multilineInput);
textContainer =
<RCTTextView
<RCTMultilineTextInputView
ref={this._setNativeRef}
{...props}
children={children}
@@ -766,6 +748,7 @@ const TextInput = createReactClass({
onScroll={this._onScroll}
/>;
}
return (
<TouchableWithoutFeedback
onLayout={props.onLayout}
@@ -783,10 +766,7 @@ const TextInput = createReactClass({
_renderAndroid: function() {
const props = Object.assign({}, this.props);
props.style = this.props.style;
if (this.state.layoutHeight >= 0) {
props.style = [props.style, {height: this.state.layoutHeight}];
}
props.style = [this.props.style];
props.autoCapitalize =
UIManager.AndroidTextInput.Constants.AutoCapitalizationType[
props.autoCapitalize || 'sentences'
@@ -804,9 +784,11 @@ const TextInput = createReactClass({
if (childCount > 1) {
children = <Text>{children}</Text>;
}
if (props.selection && props.selection.end == null) {
props.selection = {start: props.selection.start, end: props.selection.start};
}
const textContainer =
<AndroidTextInput
ref={this._setNativeRef}
@@ -815,7 +797,6 @@ const TextInput = createReactClass({
onFocus={this._onFocus}
onBlur={this._onBlur}
onChange={this._onChange}
onContentSizeChange={this._onContentSizeChange}
onSelectionChange={this._onSelectionChange}
onTextInput={this._onTextInput}
text={this._getText()}
@@ -878,26 +859,6 @@ const TextInput = createReactClass({
this.forceUpdate();
},
_onContentSizeChange: function(event: Event) {
let contentHeight = event.nativeEvent.contentSize.height;
if (this.props.autoGrow) {
if (this.props.maxHeight) {
contentHeight = Math.min(this.props.maxHeight, contentHeight);
}
this.setState({layoutHeight: Math.max(this._layoutHeight, contentHeight)});
}
this.props.onContentSizeChange && this.props.onContentSizeChange(event);
},
_onLayout: function(event: Event) {
const height = event.nativeEvent.layout.height;
if (height) {
this._layoutHeight = event.nativeEvent.layout.height;
}
this.props.onLayout && this.props.onLayout(event);
},
_onSelectionChange: function(event: Event) {
this.props.onSelectionChange && this.props.onSelectionChange(event);
@@ -964,8 +925,8 @@ const TextInput = createReactClass({
var styles = StyleSheet.create({
multilineInput: {
// This default top inset makes RCTTextView seem as close as possible
// to single-line RCTTextField defaults, using the system defaults
// This default top inset makes RCTMultilineTextInputView seem as close as possible
// to single-line RCTSinglelineTextInputView defaults, using the system defaults
// of font size 17 and a height of 31 points.
paddingTop: 5,
},
@@ -26,7 +26,7 @@ const ViewPropTypes = require('ViewPropTypes');
const createReactClass = require('create-react-class');
const ensurePositiveDelayProps = require('ensurePositiveDelayProps');
import type {Event} from 'TouchableWithoutFeedback';
import type {PressEvent} from 'CoreEventTypes';
const DEFAULT_PROPS = {
activeOpacity: 0.85,
@@ -216,21 +216,21 @@ const TouchableHighlight = createReactClass({
* `Touchable.Mixin` self callbacks. The mixin will invoke these if they are
* defined on your component.
*/
touchableHandleActivePressIn: function(e: Event) {
touchableHandleActivePressIn: function(e: PressEvent) {
clearTimeout(this._hideTimeout);
this._hideTimeout = null;
this._showUnderlay();
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function(e: Event) {
touchableHandleActivePressOut: function(e: PressEvent) {
if (!this._hideTimeout) {
this._hideUnderlay();
}
this.props.onPressOut && this.props.onPressOut(e);
},
touchableHandlePress: function(e: Event) {
touchableHandlePress: function(e: PressEvent) {
clearTimeout(this._hideTimeout);
this._showUnderlay();
this._hideTimeout = setTimeout(
@@ -240,7 +240,7 @@ const TouchableHighlight = createReactClass({
this.props.onPress && this.props.onPress(e);
},
touchableHandleLongPress: function(e: Event) {
touchableHandleLongPress: function(e: PressEvent) {
this.props.onLongPress && this.props.onLongPress(e);
},
@@ -32,7 +32,7 @@ const {
AccessibilityTraits,
} = require('ViewAccessibility');
export type Event = Object;
import type {PressEvent} from 'CoreEventTypes';
const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
@@ -130,19 +130,19 @@ const TouchableWithoutFeedback = createReactClass({
* `Touchable.Mixin` self callbacks. The mixin will invoke these if they are
* defined on your component.
*/
touchableHandlePress: function(e: Event) {
touchableHandlePress: function(e: PressEvent) {
this.props.onPress && this.props.onPress(e);
},
touchableHandleActivePressIn: function(e: Event) {
touchableHandleActivePressIn: function(e: PressEvent) {
this.props.onPressIn && this.props.onPressIn(e);
},
touchableHandleActivePressOut: function(e: Event) {
touchableHandleActivePressOut: function(e: PressEvent) {
this.props.onPressOut && this.props.onPressOut(e);
},
touchableHandleLongPress: function(e: Event) {
touchableHandleLongPress: function(e: PressEvent) {
this.props.onLongPress && this.props.onLongPress(e);
},
+6 -5
View File
@@ -28,11 +28,11 @@ let register = function () {
if (__DEV__) {
const AppState = require('AppState');
const WebSocket = require('WebSocket');
const {PlatformConstants} = require('NativeModules');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an
* error found when Flow v0.54 was deployed. To see the error delete this
* comment and run Flow. */
const reactDevTools = require('react-devtools-core');
const getDevServer = require('getDevServer');
// Initialize dev tools only if the native module for WebSocket is available
if (WebSocket.isAvailable) {
@@ -42,10 +42,11 @@ if (__DEV__) {
// or the code will throw for bundles that don't have it.
const isAppActive = () => AppState.currentState !== 'background';
// Special case: Genymotion is running on a different host.
const host = PlatformConstants && PlatformConstants.ServerHost ?
PlatformConstants.ServerHost.split(':')[0] :
'localhost';
// Get hostname from development server (packager)
const devServer = getDevServer();
const host = devServer.bundleLoadedFromServer
? devServer.url.replace(/https?:\/\//, '').split(':')[0]
: 'localhost';
reactDevTools.connectToDevTools({
isAppActive,
-3
View File
@@ -10,7 +10,6 @@
* @flow
*/
/* eslint-disable strict */
/* globals window: true */
/**
@@ -115,9 +114,7 @@ if (!global.__fbDisableExceptionsManager) {
try {
ExceptionsManager.handleException(e, isFatal);
} catch (ee) {
/* eslint-disable no-console */
console.log('Failed to print error: ', ee.message);
/* eslint-enable no-console */
throw e;
}
};
+2 -2
View File
@@ -14,7 +14,7 @@
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 53,
patch: 3,
prerelease: null,
};
@@ -687,6 +687,9 @@ class CellRenderer extends React.Component<CellProps> {
}
};
componentWillUnmount() {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
clearTimeout(this._timeout);
this.props.onProgressChange({rowKey: this.props.rowKey, inProgress: false});
this.props.onWillUnmount(this.props.rowKey);
-17
View File
@@ -52,19 +52,15 @@ class AssetSourceResolver {
serverUrl: ?string;
// where the jsbundle is being run from
jsbundleUrl: ?string;
// where the embedded bundle in the app is stored
embeddedBundleUrl: ?string;
// the asset to resolve
asset: PackagerAsset;
constructor(serverUrl: ?string,
jsbundleUrl: ?string,
embeddedBundleUrl: ?string,
asset: PackagerAsset
) {
this.serverUrl = serverUrl;
this.jsbundleUrl = jsbundleUrl;
this.embeddedBundleUrl = embeddedBundleUrl;
this.asset = asset;
}
@@ -76,10 +72,6 @@ class AssetSourceResolver {
return !!(this.jsbundleUrl && this.jsbundleUrl.startsWith('file://'));
}
canLoadFromEmbeddedBundledLocation(): boolean {
return !!this.embeddedBundleUrl;
}
defaultAsset(): ResolvedAssetSource {
if (this.isLoadedFromServer()) {
return this.assetServerURL();
@@ -123,15 +115,6 @@ class AssetSourceResolver {
return this.fromSource(path + getScaledAssetPath(this.asset));
}
/**
* Resolves to the asset that was bundled with the app, with a scaled asset filename
* E.g. 'file:///sdcard/bundle/assets/AwesomeModule/icon@2x.png'
*/
scaledAssetURLInEmbeddedBundleUrl(): ResolvedAssetSource {
const path = this.embeddedBundleUrl || 'file://';
return this.fromSource(path + getScaledAssetPath(this.asset));
}
/**
* The default location of assets bundled with the app, located by
* resource identifier
+1 -8
View File
@@ -19,7 +19,7 @@ const NativeModules = require('NativeModules');
import type { ResolvedAssetSource } from 'AssetSourceResolver';
let _customSourceTransformer, _serverURL, _scriptURL, _embeddedBundleURL;
let _customSourceTransformer, _serverURL, _scriptURL;
function getDevServerURL(): ?string {
if (_serverURL === undefined) {
@@ -60,12 +60,6 @@ function getScriptURL(): ?string {
return _scriptURL;
}
function getEmbeddedBundledURL(): ?string {
const scriptURL = NativeModules.SourceCode.embeddedBundleURL;
_embeddedBundleURL = _coerceLocalScriptURL(scriptURL);
return _embeddedBundleURL;
}
function setCustomSourceTransformer(
transformer: (resolver: AssetSourceResolver) => ResolvedAssetSource,
): void {
@@ -89,7 +83,6 @@ function resolveAssetSource(source: any): ?ResolvedAssetSource {
const resolver = new AssetSourceResolver(
getDevServerURL(),
getScriptURL(),
getEmbeddedBundledURL(),
asset,
);
if (_customSourceTransformer) {
+3 -2
View File
@@ -10,8 +10,6 @@
* @flow
*/
/* eslint-disable dot-notation, no-dimensions-get-window */
'use strict';
const Dimensions = require('Dimensions');
@@ -101,6 +99,9 @@ class Inspector extends React.Component<{
attachToDevtools = (agent: Object) => {
let _hideWait = null;
const hlSub = agent.sub('highlight', ({node, name, props}) => {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
clearTimeout(_hideWait);
if (typeof node !== 'number') {
@@ -168,6 +168,9 @@ declare function setImmediate(callback: any, ...args: Array<any>): number;
function _scheduleUpdate() {
if (!_nextUpdateHandle) {
if (_deadline > 0) {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
_nextUpdateHandle = setTimeout(_processUpdate, 0 + DEBUG_DELAY);
} else {
_nextUpdateHandle = setImmediate(_processUpdate);
-2
View File
@@ -11,8 +11,6 @@
* @format
*/
/* eslint-disable no-console */
'use strict';
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
+6
View File
@@ -462,6 +462,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
}),
);
} else if (this.props.onViewableItemsChanged) {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
this._virtualizedListPairs.push({
viewabilityConfig: this.props.viewabilityConfig,
onViewableItemsChanged: this._createOnViewableItemsChanged(
@@ -555,6 +558,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
.map((it, kk) => keyExtractor(it, index * numColumns + kk))
.join(':');
} else {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
return keyExtractor(items, index);
}
};
+1 -1
View File
@@ -71,7 +71,7 @@ type OptionalProps<SectionT: SectionBase<any>> = {
/**
* Default renderer for every item in every section. Can be over-ridden on a per-section basis.
*/
renderItem: (info: {
renderItem?: (info: {
item: Item,
index: number,
section: SectionT,
+3
View File
@@ -74,6 +74,9 @@ export type ViewabilityConfig = {|
class ViewabilityHelper {
_config: ViewabilityConfig;
_hasInteracted: boolean = false;
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.63 was deployed. To see the error delete this comment
* and run Flow. */
_timers: Set<number> = new Set();
_viewableIndices: Array<number> = [];
_viewableItems: Map<string, ViewToken> = new Map();
+14 -3
View File
@@ -25,17 +25,19 @@ function elementsThatOverlapOffsets(
getFrameMetrics: (index: number) => {length: number, offset: number},
): Array<number> {
const out = [];
let outLength = 0;
for (let ii = 0; ii < itemCount; ii++) {
const frame = getFrameMetrics(ii);
const trailingOffset = frame.offset + frame.length;
for (let kk = 0; kk < offsets.length; kk++) {
if (out[kk] == null && trailingOffset >= offsets[kk]) {
out[kk] = ii;
outLength++;
if (kk === offsets.length - 1) {
invariant(
out.length === offsets.length,
'bad offsets input, should be in increasing order ' +
JSON.stringify(offsets),
outLength === offsets.length,
'bad offsets input, should be in increasing order: %s',
JSON.stringify(offsets),
);
return out;
}
@@ -114,6 +116,15 @@ function computeWindowedRenderLimits(
);
const overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength);
const lastItemOffset = getFrameMetricsApprox(itemCount - 1).offset;
if (lastItemOffset < overscanBegin) {
// Entire list is before our overscan window
return {
first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),
last: itemCount - 1,
};
}
// Find the indices that correspond to the items at the render boundaries we're targetting.
let [overscanFirst, first, last, overscanLast] = elementsThatOverlapOffsets(
[overscanBegin, visibleBegin, visibleEnd, overscanEnd],
+327 -35
View File
@@ -20,6 +20,7 @@ const ReactNative = require('ReactNative');
const RefreshControl = require('RefreshControl');
const ScrollView = require('ScrollView');
const StyleSheet = require('StyleSheet');
const UIManager = require('UIManager');
const View = require('View');
const ViewabilityHelper = require('ViewabilityHelper');
@@ -129,6 +130,12 @@ type OptionalProps = {
* a rendered element.
*/
ListHeaderComponent?: ?(React.ComponentType<any> | React.Element<any>),
/**
* A unique identifier for this list. If there are multiple VirtualizedLists at the same level of
* nesting within another VirtualizedList, this key is necessary for virtualization to
* work properly.
*/
listKey?: string,
/**
* The maximum number of items to render in each incremental render batch. The more rendered at
* once, the better the fill rate, but responsiveness my suffer because rendering content may
@@ -206,6 +213,19 @@ export type Props = RequiredProps & OptionalProps;
let _usedIndexForKey = false;
type Frame = {
offset: number,
length: number,
index: number,
inLayout: boolean,
};
type ChildListState = {
first: number,
last: number,
frames: {[key: number]: Frame},
};
type State = {first: number, last: number};
/**
@@ -412,26 +432,99 @@ class VirtualizedList extends React.PureComponent<Props, State> {
};
static contextTypes = {
virtualizedCell: PropTypes.shape({
cellKey: PropTypes.string,
}),
virtualizedList: PropTypes.shape({
getScrollMetrics: PropTypes.func,
horizontal: PropTypes.bool,
getOutermostParentListRef: PropTypes.func,
registerAsNestedChild: PropTypes.func,
unregisterAsNestedChild: PropTypes.func,
}),
};
static childContextTypes = {
virtualizedList: PropTypes.shape({
getScrollMetrics: PropTypes.func,
horizontal: PropTypes.bool,
getOutermostParentListRef: PropTypes.func,
registerAsNestedChild: PropTypes.func,
unregisterAsNestedChild: PropTypes.func,
}),
};
getChildContext() {
return {
virtualizedList: {
getScrollMetrics: this._getScrollMetrics,
horizontal: this.props.horizontal,
// TODO: support nested virtualization and onViewableItemsChanged
getOutermostParentListRef: this._getOutermostParentListRef,
registerAsNestedChild: this._registerAsNestedChild,
unregisterAsNestedChild: this._unregisterAsNestedChild,
},
};
}
_getCellKey(): string {
return (
(this.context.virtualizedCell && this.context.virtualizedCell.cellKey) ||
'rootList'
);
}
_getScrollMetrics = () => {
return this._scrollMetrics;
};
hasMore(): boolean {
return this._hasMore;
}
_getOutermostParentListRef = () => {
if (this._isNestedWithSameOrientation()) {
return this.context.virtualizedList.getOutermostParentListRef();
} else {
return this;
}
};
_registerAsNestedChild = (childList: {
cellKey: string,
key: string,
ref: VirtualizedList,
}): ?ChildListState => {
// Register the mapping between this child key and the cellKey for its cell
const childListsInCell =
this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();
childListsInCell.add(childList.key);
this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);
const existingChildData = this._nestedChildLists.get(childList.key);
invariant(
!(existingChildData && existingChildData.ref !== null),
'A VirtualizedList contains a cell which itself contains ' +
'more than one VirtualizedList of the same orientation as the parent ' +
'list. You must pass a unique listKey prop to each sibling list.',
);
this._nestedChildLists.set(childList.key, {
ref: childList.ref,
state: null,
});
return existingChildData && existingChildData.state;
};
_unregisterAsNestedChild = (childList: {
key: string,
state: ChildListState,
}): void => {
this._nestedChildLists.set(childList.key, {
ref: null,
state: childList.state,
});
};
state: State;
constructor(props: Props, context: Object) {
@@ -441,10 +534,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +
'to support native onScroll events with useNativeDriver',
);
invariant(
!(this._isNestedWithSameOrientation() && props.onViewableItemsChanged),
'Nesting lists that scroll in the same direction does not support onViewableItemsChanged' +
'on the inner list.',
props.windowSize > 0,
'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.',
);
this._fillRateHelper = new FillRateHelper(this._getFrameMetrics);
@@ -467,7 +560,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
});
}
this.state = {
let initialState = {
first: this.props.initialScrollIndex || 0,
last:
Math.min(
@@ -475,12 +568,30 @@ class VirtualizedList extends React.PureComponent<Props, State> {
(this.props.initialScrollIndex || 0) + this.props.initialNumToRender,
) - 1,
};
if (this._isNestedWithSameOrientation()) {
const storedState = this.context.virtualizedList.registerAsNestedChild({
cellKey: this._getCellKey(),
key: this.props.listKey || this._getCellKey(),
ref: this,
});
if (storedState) {
initialState = storedState;
this.state = storedState;
this._frames = storedState.frames;
}
}
this.state = initialState;
}
componentDidMount() {
if (this.props.initialScrollIndex) {
this._initialScrollIndexTimeout = setTimeout(
() =>
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.63 was deployed. To see the error
* delete this comment and run Flow. */
this.scrollToIndex({
animated: false,
index: this.props.initialScrollIndex,
@@ -491,12 +602,25 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
componentWillUnmount() {
if (this._isNestedWithSameOrientation()) {
this.context.virtualizedList.unregisterAsNestedChild({
key: this.props.listKey || this._getCellKey(),
state: {
first: this.state.first,
last: this.state.last,
frames: this._frames,
},
});
}
this._updateViewableItems(null);
this._updateCellsToRenderBatcher.dispose();
this._updateCellsToRenderBatcher.dispose({abort: true});
this._viewabilityTuples.forEach(tuple => {
tuple.viewabilityHelper.dispose();
});
this._fillRateHelper.deactivateAndFlush();
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
clearTimeout(this._initialScrollIndexTimeout);
}
@@ -549,6 +673,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
for (let ii = first; ii <= last; ii++) {
const item = getItem(data, ii);
const key = keyExtractor(item, ii);
this._indicesToKeys.set(ii, key);
if (stickyIndicesFromProps.has(ii + stickyOffset)) {
stickyHeaderIndices.push(cells.length);
}
@@ -585,9 +710,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
};
_isVirtualizationDisabled(): boolean {
return (
this.props.disableVirtualization || this._isNestedWithSameOrientation()
);
return this.props.disableVirtualization;
}
_isNestedWithSameOrientation(): boolean {
@@ -606,7 +729,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
'Consider using `numColumns` with `FlatList` instead.',
);
}
const {
ListEmptyComponent,
ListFooterComponent,
@@ -633,12 +755,13 @@ class VirtualizedList extends React.PureComponent<Props, State> {
<ListHeaderComponent />
);
cells.push(
<View
key="$header"
onLayout={this._onLayoutHeader}
style={inversionStyle}>
{element}
</View>,
<VirtualizedCellWrapper
cellKey={this._getCellKey() + '-header'}
key="$header">
<View onLayout={this._onLayoutHeader} style={inversionStyle}>
{element}
</View>
</VirtualizedCellWrapper>,
);
}
const itemCount = this.props.getItemCount(data);
@@ -757,12 +880,13 @@ class VirtualizedList extends React.PureComponent<Props, State> {
<ListFooterComponent />
);
cells.push(
<View
key="$footer"
onLayout={this._onLayoutFooter}
style={inversionStyle}>
{element}
</View>,
<VirtualizedCellWrapper
cellKey={this._getCellKey() + '-footer'}
key="$footer">
<View onLayout={this._onLayoutFooter} style={inversionStyle}>
{element}
</View>
</VirtualizedCellWrapper>,
);
}
const scrollProps = {
@@ -779,6 +903,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
if (inversionStyle) {
scrollProps.style = [inversionStyle, this.props.style];
}
this._hasMore =
this.state.last < this.props.getItemCount(this.props.data) - 1;
const ret = React.cloneElement(
(this.props.renderScrollComponent || this._defaultRenderScrollComponent)(
scrollProps,
@@ -805,15 +933,25 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
_averageCellLength = 0;
// Maps a cell key to the set of keys for all outermost child lists within that cell
_cellKeysToChildListKeys: Map<string, Set<string>> = new Map();
_cellRefs = {};
_hasDataChangedSinceEndReached = true;
_hasWarned = {};
_highestMeasuredFrameIndex = 0;
_headerLength = 0;
_initialScrollIndexTimeout = 0;
_fillRateHelper: FillRateHelper;
_frames = {};
_footerLength = 0;
_hasDataChangedSinceEndReached = true;
_hasMore = false;
_hasWarned = {};
_highestMeasuredFrameIndex = 0;
_headerLength = 0;
_indicesToKeys: Map<number, string> = new Map();
_initialScrollIndexTimeout = 0;
_nestedChildLists: Map<
string,
{ref: ?VirtualizedList, state: ?ChildListState},
> = new Map();
_offsetFromParentVirtualizedList: number = 0;
_prevParentOffset: number = 0;
_scrollMetrics = {
contentLength: 0,
dOffset: 0,
@@ -910,10 +1048,41 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
};
_onLayout = (e: Object) => {
this._scrollMetrics.visibleLength = this._selectLength(
e.nativeEvent.layout,
_measureLayoutRelativeToContainingList(): void {
UIManager.measureLayout(
ReactNative.findNodeHandle(this),
ReactNative.findNodeHandle(
this.context.virtualizedList.getOutermostParentListRef(),
),
error => {
console.warn(
"VirtualizedList: Encountered an error while measuring a list's" +
' offset from its containing VirtualizedList.',
);
},
(x, y, width, height) => {
this._offsetFromParentVirtualizedList = this._selectOffset({x, y});
this._scrollMetrics.contentLength = this._selectLength({width, height});
const scrollMetrics = this._convertParentScrollMetrics(
this.context.virtualizedList.getScrollMetrics(),
);
this._scrollMetrics.visibleLength = scrollMetrics.visibleLength;
this._scrollMetrics.offset = scrollMetrics.offset;
},
);
}
_onLayout = (e: Object) => {
if (this._isNestedWithSameOrientation()) {
// Need to adjust our scroll metrics to be relative to our containing
// VirtualizedList before we can make claims about list item viewability
this._measureLayoutRelativeToContainingList();
} else {
this._scrollMetrics.visibleLength = this._selectLength(
e.nativeEvent.layout,
);
}
this.props.onLayout && this.props.onLayout(e);
this._scheduleCellsToRenderUpdate();
this._maybeCallOnEndReached();
@@ -1013,6 +1182,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
if (
onEndReached &&
this.state.last === getItemCount(data) - 1 &&
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
distanceFromEnd < onEndReachedThreshold * visibleLength &&
(this._hasDataChangedSinceEndReached ||
this._scrollMetrics.contentLength !== this._sentEndForContentLength)
@@ -1033,17 +1205,63 @@ class VirtualizedList extends React.PureComponent<Props, State> {
this._maybeCallOnEndReached();
};
/* Translates metrics from a scroll event in a parent VirtualizedList into
* coordinates relative to the child list.
*/
_convertParentScrollMetrics = (metrics: {
visibleLength: number,
offset: number,
}) => {
// Offset of the top of the nested list relative to the top of its parent's viewport
const offset = metrics.offset - this._offsetFromParentVirtualizedList;
// Child's visible length is the same as its parent's
const visibleLength = metrics.visibleLength;
const dOffset = offset - this._scrollMetrics.offset;
const contentLength = this._scrollMetrics.contentLength;
return {
visibleLength,
contentLength,
offset,
dOffset,
};
};
_onScroll = (e: Object) => {
this._nestedChildLists.forEach(childList => {
childList.ref && childList.ref._onScroll(e);
});
if (this.props.onScroll) {
this.props.onScroll(e);
}
const timestamp = e.timeStamp;
const visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);
const contentLength = this._selectLength(e.nativeEvent.contentSize);
const offset = this._selectOffset(e.nativeEvent.contentOffset);
let visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);
let contentLength = this._selectLength(e.nativeEvent.contentSize);
let offset = this._selectOffset(e.nativeEvent.contentOffset);
let dOffset = offset - this._scrollMetrics.offset;
if (this._isNestedWithSameOrientation()) {
if (this._scrollMetrics.contentLength === 0) {
// Ignore scroll events until onLayout has been called and we
// know our offset from our offset from our parent
return;
}
({
visibleLength,
contentLength,
offset,
dOffset,
} = this._convertParentScrollMetrics({
visibleLength,
offset,
}));
}
const dt = this._scrollMetrics.timestamp
? Math.max(1, timestamp - this._scrollMetrics.timestamp)
: 1;
const velocity = dOffset / dt;
if (
dt > 500 &&
this._scrollMetrics.dt > 500 &&
@@ -1058,8 +1276,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
);
this._hasWarned.perf = true;
}
const dOffset = offset - this._scrollMetrics.offset;
const velocity = dOffset / dt;
this._scrollMetrics = {
contentLength,
dt,
@@ -1091,6 +1307,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
const distBottom =
this._getFrameMetricsApprox(last).offset - (offset + visibleLength);
const scrollingThreshold =
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete
* this comment and run Flow. */
this.props.onEndReachedThreshold * visibleLength / 2;
hiPri =
Math.min(distTop, distBottom) < 0 ||
@@ -1167,6 +1386,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
const {contentLength, offset, visibleLength} = this._scrollMetrics;
const distanceFromEnd = contentLength - visibleLength - offset;
const renderAhead =
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.63 was deployed. To see the error
* delete this comment and run Flow. */
distanceFromEnd < onEndReachedThreshold * visibleLength
? this.props.maxToRenderPerBatch
: 0;
@@ -1175,6 +1397,36 @@ class VirtualizedList extends React.PureComponent<Props, State> {
last: Math.min(state.last + renderAhead, getItemCount(data) - 1),
};
}
if (newState && this._nestedChildLists.size > 0) {
const newFirst = newState.first;
const newLast = newState.last;
// If some cell in the new state has a child list in it, we should only render
// up through that item, so that we give that list a chance to render.
// Otherwise there's churn from multiple child lists mounting and un-mounting
// their items.
for (let ii = newFirst; ii <= newLast; ii++) {
const cellKeyForIndex = this._indicesToKeys.get(ii);
const childListKeys =
cellKeyForIndex &&
this._cellKeysToChildListKeys.get(cellKeyForIndex);
if (!childListKeys) {
continue;
}
let someChildHasMore = false;
// For each cell, need to check whether any child list in it has more elements to render
for (let childKey of childListKeys) {
const childList = this._nestedChildLists.get(childKey);
if (childList && childList.ref && childList.ref.hasMore()) {
someChildHasMore = true;
break;
}
}
if (someChildHasMore) {
newState.last = ii;
break;
}
}
}
return newState;
});
};
@@ -1244,6 +1496,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
}
}
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
return frame;
};
@@ -1292,6 +1547,20 @@ class CellRenderer extends React.Component<
},
};
static childContextTypes = {
virtualizedCell: PropTypes.shape({
cellKey: PropTypes.string,
}),
};
getChildContext() {
return {
virtualizedCell: {
cellKey: this.props.cellKey,
},
};
}
// TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
// reused by SectionList and we can keep VirtualizedList simpler.
_separators = {
@@ -1378,6 +1647,29 @@ class CellRenderer extends React.Component<
}
}
class VirtualizedCellWrapper extends React.Component<{
cellKey: string,
children: React.Node,
}> {
static childContextTypes = {
virtualizedCell: PropTypes.shape({
cellKey: PropTypes.string,
}),
};
getChildContext() {
return {
virtualizedCell: {
cellKey: this.props.cellKey,
},
};
}
render() {
return this.props.children;
}
}
const styles = StyleSheet.create({
verticallyInverted: {
transform: [{scaleY: -1}],
@@ -233,6 +233,9 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
return {
...viewable,
index: info.index,
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
key: keyExtractor(viewable.item, info.index),
section: info.section,
};
@@ -89,6 +89,9 @@ module.exports = {
testBadSectionsShape(): React.Element<*> {
const sections = [
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
{
key: 'a',
items: [
@@ -81,4 +81,15 @@ describe('elementsThatOverlapOffsets', function() {
elementsThatOverlapOffsets(offsets, frames.length, ii => frames[ii]),
).toEqual([1]);
});
it('errors on non-increasing offsets', function() {
const offsets = [150, 50];
const frames = [
{offset: 0, length: 50},
{offset: 50, length: 150},
{offset: 250, length: 100},
];
expect(() => {
elementsThatOverlapOffsets(offsets, frames.length, ii => frames[ii]);
}).toThrowErrorMatchingSnapshot();
});
});
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`elementsThatOverlapOffsets errors on non-increasing offsets 1`] = `"bad offsets input, should be in increasing order: [150,50]"`;
+1 -1
View File
@@ -10,7 +10,7 @@
*
*/
/* eslint-disable */
/* globals Headers, Request, Response */
'use strict';
+1 -2
View File
@@ -186,13 +186,12 @@ expectErrorBlock:(BOOL(^)(NSString *error))expectErrorBlock
[bridge invalidate];
}
// Wait for bridge to disappear before continuing to the next test
// Give the bridge a chance to disappear before continuing to the next test.
NSDate *invalidateTimeout = [NSDate dateWithTimeIntervalSinceNow:30];
while (invalidateTimeout.timeIntervalSinceNow > 0 && batchedBridge != nil) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
}
RCTAssert(batchedBridge == nil, @"Bridge should be deallocated after the test");
}
@end
+3
View File
@@ -33,6 +33,9 @@ function flattenStyle(style: ?StyleObj): ?Object {
invariant(style !== true, 'style may be false but not true');
if (!Array.isArray(style)) {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
return getStyle(style);
}
@@ -16,10 +16,16 @@
#import <React/RCTSurface.h>
#import <React/RCTSurfaceView.h>
#import "RCTSurfaceHostingComponentController.h"
#import "RCTSurfaceHostingComponentState.h"
@implementation RCTSurfaceHostingComponent
+ (Class<CKComponentControllerProtocol>)controllerClass
{
return [RCTSurfaceHostingComponentController class];
}
+ (id)initialState
{
return [RCTSurfaceHostingComponentState new];
@@ -9,7 +9,7 @@
#import <React/RCTShadowView.h>
@interface RCTShadowRawText : RCTShadowView
@interface RCTRawTextShadowView : RCTShadowView
@property (nonatomic, copy) NSString *text;
@@ -7,11 +7,11 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTShadowRawText.h"
#import "RCTRawTextShadowView.h"
#import <React/RCTUIManager.h>
@implementation RCTShadowRawText
@implementation RCTRawTextShadowView
- (instancetype)init
{
@@ -9,6 +9,6 @@
#import <React/RCTViewManager.h>
@interface RCTRawTextManager : RCTViewManager
@interface RCTRawTextViewManager : RCTViewManager
@end
@@ -7,17 +7,17 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTRawTextManager.h"
#import "RCTRawTextViewManager.h"
#import "RCTShadowRawText.h"
#import "RCTRawTextShadowView.h"
@implementation RCTRawTextManager
@implementation RCTRawTextViewManager
RCT_EXPORT_MODULE()
RCT_EXPORT_MODULE(RCTRawText)
- (RCTShadowView *)shadowView
{
return [RCTShadowRawText new];
return [RCTRawTextShadowView new];
}
RCT_EXPORT_SHADOW_PROPERTY(text, NSString)
+262 -141
View File
@@ -7,45 +7,86 @@
objects = {
/* Begin PBXBuildFile section */
131B6AC01AF0CD0600FFC3E0 /* RCTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */; };
131B6AC11AF0CD0600FFC3E0 /* RCTTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */; };
1362F1001B4D51F400E06D8C /* RCTTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FD1B4D51F400E06D8C /* RCTTextField.m */; };
1362F1011B4D51F400E06D8C /* RCTTextFieldManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */; };
19FC5C851D41A4120090108F /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 19FC5C841D41A4120090108F /* RCTTextSelection.m */; };
2D3B5F331D9B102D00451313 /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 19FC5C841D41A4120090108F /* RCTTextSelection.m */; };
2D3B5F341D9B103100451313 /* RCTRawTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */; };
2D3B5F351D9B103300451313 /* RCTShadowRawText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */; };
2D3B5F361D9B106F00451313 /* RCTShadowText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */; };
2D3B5F371D9B106F00451313 /* RCTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B512141A9E6EFF00147676 /* RCTText.m */; };
2D3B5F381D9B106F00451313 /* RCTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */; };
2D3B5F391D9B106F00451313 /* RCTTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FD1B4D51F400E06D8C /* RCTTextField.m */; };
2D3B5F3A1D9B106F00451313 /* RCTTextFieldManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */; };
2D3B5F3B1D9B106F00451313 /* RCTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */; };
2D3B5F3C1D9B106F00451313 /* RCTTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */; };
2DEAB2901F84BA4300FC6B42 /* RCTFontAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = A85C82991F742AA20036C019 /* RCTFontAttributes.m */; };
58B511CE1A9E6C5C00147676 /* RCTRawTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */; };
58B511CF1A9E6C5C00147676 /* RCTShadowRawText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */; };
58B511D01A9E6C5C00147676 /* RCTShadowText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */; };
58B511D11A9E6C5C00147676 /* RCTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */; };
58B512161A9E6EFF00147676 /* RCTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B512141A9E6EFF00147676 /* RCTText.m */; };
598F41261F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 598F41251F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m */; };
598F41271F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 598F41251F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m */; };
599DF25F1F0306660079B53E /* RCTBackedTextInputViewProtocol.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 599DF25D1F0304B30079B53E /* RCTBackedTextInputViewProtocol.h */; };
599DF2611F0306C30079B53E /* RCTBackedTextInputViewProtocol.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 599DF25D1F0304B30079B53E /* RCTBackedTextInputViewProtocol.h */; };
599DF2641F03076D0079B53E /* RCTTextInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 599DF2631F03076D0079B53E /* RCTTextInput.m */; };
599DF2651F03076D0079B53E /* RCTTextInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 599DF2631F03076D0079B53E /* RCTTextInput.m */; };
599DF2661F0307D10079B53E /* RCTTextInput.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 599DF2621F03076D0079B53E /* RCTTextInput.h */; };
599DF2671F0307D90079B53E /* RCTTextInput.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 599DF2621F03076D0079B53E /* RCTTextInput.h */; };
59AF89AA1EDCBCC700F004B1 /* RCTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59AF89A91EDCBCC700F004B1 /* RCTUITextField.m */; };
59AF89AB1EDCBCC700F004B1 /* RCTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59AF89A91EDCBCC700F004B1 /* RCTUITextField.m */; };
59B125C91E6E4E15004E2A67 /* RCTUITextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59B125C81E6E4E15004E2A67 /* RCTUITextView.m */; };
59B125CA1E6E4E15004E2A67 /* RCTUITextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59B125C81E6E4E15004E2A67 /* RCTUITextView.m */; };
5989E14D20018A2200EA444A /* RCTBaseTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5989E14C20018A2200EA444A /* RCTBaseTextInputViewManager.m */; };
5989E14E20018A6600EA444A /* RCTBaseTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 5989E14B20018A2200EA444A /* RCTBaseTextInputViewManager.h */; };
5989E14F20018A7800EA444A /* RCTBaseTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 5989E14B20018A2200EA444A /* RCTBaseTextInputViewManager.h */; };
59E604521FE9CAF100BD90C5 /* RCTTextShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6042F1FE9CAF100BD90C5 /* RCTTextShadowView.m */; };
59E604531FE9CAF100BD90C5 /* RCTTextShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6042F1FE9CAF100BD90C5 /* RCTTextShadowView.m */; };
59E604541FE9CAF100BD90C5 /* RCTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604311FE9CAF100BD90C5 /* RCTTextView.m */; };
59E604551FE9CAF100BD90C5 /* RCTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604311FE9CAF100BD90C5 /* RCTTextView.m */; };
59E604561FE9CAF100BD90C5 /* RCTTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604331FE9CAF100BD90C5 /* RCTTextViewManager.m */; };
59E604571FE9CAF100BD90C5 /* RCTTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604331FE9CAF100BD90C5 /* RCTTextViewManager.m */; };
59E604581FE9CAF100BD90C5 /* RCTRawTextShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604341FE9CAF100BD90C5 /* RCTRawTextShadowView.m */; };
59E604591FE9CAF100BD90C5 /* RCTRawTextShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604341FE9CAF100BD90C5 /* RCTRawTextShadowView.m */; };
59E6045A1FE9CAF100BD90C5 /* RCTRawTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604361FE9CAF100BD90C5 /* RCTRawTextViewManager.m */; };
59E6045B1FE9CAF100BD90C5 /* RCTRawTextViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604361FE9CAF100BD90C5 /* RCTRawTextViewManager.m */; };
59E6045C1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043A1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m */; };
59E6045D1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043A1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m */; };
59E6045E1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043C1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m */; };
59E6045F1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043C1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m */; };
59E604601FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043E1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m */; };
59E604611FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6043E1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m */; };
59E604621FE9CAF100BD90C5 /* RCTUITextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604401FE9CAF100BD90C5 /* RCTUITextView.m */; };
59E604631FE9CAF100BD90C5 /* RCTUITextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604401FE9CAF100BD90C5 /* RCTUITextView.m */; };
59E604641FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604431FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m */; };
59E604651FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604431FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m */; };
59E604661FE9CAF100BD90C5 /* RCTBaseTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604461FE9CAF100BD90C5 /* RCTBaseTextInputView.m */; };
59E604671FE9CAF100BD90C5 /* RCTBaseTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604461FE9CAF100BD90C5 /* RCTBaseTextInputView.m */; };
59E604681FE9CAF100BD90C5 /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604481FE9CAF100BD90C5 /* RCTTextSelection.m */; };
59E604691FE9CAF100BD90C5 /* RCTTextSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604481FE9CAF100BD90C5 /* RCTTextSelection.m */; };
59E6046A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m */; };
59E6046B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m */; };
59E6046C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m */; };
59E6046D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m */; };
59E6046E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m */; };
59E6046F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E6044F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m */; };
59E604701FE9CAF100BD90C5 /* RCTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604511FE9CAF100BD90C5 /* RCTUITextField.m */; };
59E604711FE9CAF100BD90C5 /* RCTUITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E604511FE9CAF100BD90C5 /* RCTUITextField.m */; };
59E604721FE9CB3F00BD90C5 /* RCTConvert+Text.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = AF3225F71DE5574F00D3E7E7 /* RCTConvert+Text.h */; };
59E604731FE9CB3F00BD90C5 /* RCTFontAttributes.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A85C82981F742AA20036C019 /* RCTFontAttributes.h */; };
59E604741FE9CB3F00BD90C5 /* RCTFontAttributesDelegate.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A85C82BA1F742D8F0036C019 /* RCTFontAttributesDelegate.h */; };
59E604751FE9CB3F00BD90C5 /* RCTRawTextShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6042C1FE9CAF100BD90C5 /* RCTRawTextShadowView.h */; };
59E604761FE9CB3F00BD90C5 /* RCTRawTextViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604351FE9CAF100BD90C5 /* RCTRawTextViewManager.h */; };
59E604771FE9CB3F00BD90C5 /* RCTTextShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6042E1FE9CAF100BD90C5 /* RCTTextShadowView.h */; };
59E604781FE9CB3F00BD90C5 /* RCTTextView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604301FE9CAF100BD90C5 /* RCTTextView.h */; };
59E604791FE9CB3F00BD90C5 /* RCTTextViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604321FE9CAF100BD90C5 /* RCTTextViewManager.h */; };
59E6047A1FE9CB3F00BD90C5 /* RCTMultilineTextInputShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604391FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.h */; };
59E6047B1FE9CB3F00BD90C5 /* RCTMultilineTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043B1FE9CAF100BD90C5 /* RCTMultilineTextInputView.h */; };
59E6047C1FE9CB3F00BD90C5 /* RCTMultilineTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043D1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.h */; };
59E6047D1FE9CB3F00BD90C5 /* RCTUITextView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043F1FE9CAF100BD90C5 /* RCTUITextView.h */; };
59E6047E1FE9CB3F00BD90C5 /* RCTBackedTextInputDelegate.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604411FE9CAF100BD90C5 /* RCTBackedTextInputDelegate.h */; };
59E6047F1FE9CB3F00BD90C5 /* RCTBackedTextInputDelegateAdapter.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604421FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.h */; };
59E604801FE9CB3F00BD90C5 /* RCTBackedTextInputViewProtocol.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604441FE9CAF100BD90C5 /* RCTBackedTextInputViewProtocol.h */; };
59E604811FE9CB3F00BD90C5 /* RCTBaseTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604451FE9CAF100BD90C5 /* RCTBaseTextInputView.h */; };
59E604821FE9CB3F00BD90C5 /* RCTTextSelection.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604471FE9CAF100BD90C5 /* RCTTextSelection.h */; };
59E604831FE9CB3F00BD90C5 /* RCTSinglelineTextInputShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.h */; };
59E604841FE9CB3F00BD90C5 /* RCTSinglelineTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.h */; };
59E604851FE9CB3F00BD90C5 /* RCTSinglelineTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.h */; };
59E604861FE9CB3F00BD90C5 /* RCTUITextField.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604501FE9CAF100BD90C5 /* RCTUITextField.h */; };
59E604871FE9CB4A00BD90C5 /* RCTConvert+Text.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = AF3225F71DE5574F00D3E7E7 /* RCTConvert+Text.h */; };
59E604881FE9CB4A00BD90C5 /* RCTFontAttributes.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A85C82981F742AA20036C019 /* RCTFontAttributes.h */; };
59E604891FE9CB4A00BD90C5 /* RCTFontAttributesDelegate.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A85C82BA1F742D8F0036C019 /* RCTFontAttributesDelegate.h */; };
59E6048A1FE9CB4A00BD90C5 /* RCTRawTextShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6042C1FE9CAF100BD90C5 /* RCTRawTextShadowView.h */; };
59E6048B1FE9CB4A00BD90C5 /* RCTRawTextViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604351FE9CAF100BD90C5 /* RCTRawTextViewManager.h */; };
59E6048C1FE9CB4A00BD90C5 /* RCTTextShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6042E1FE9CAF100BD90C5 /* RCTTextShadowView.h */; };
59E6048D1FE9CB4A00BD90C5 /* RCTTextView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604301FE9CAF100BD90C5 /* RCTTextView.h */; };
59E6048E1FE9CB4A00BD90C5 /* RCTTextViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604321FE9CAF100BD90C5 /* RCTTextViewManager.h */; };
59E6048F1FE9CB4A00BD90C5 /* RCTMultilineTextInputShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604391FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.h */; };
59E604901FE9CB4A00BD90C5 /* RCTMultilineTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043B1FE9CAF100BD90C5 /* RCTMultilineTextInputView.h */; };
59E604911FE9CB4A00BD90C5 /* RCTMultilineTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043D1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.h */; };
59E604921FE9CB4A00BD90C5 /* RCTUITextView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6043F1FE9CAF100BD90C5 /* RCTUITextView.h */; };
59E604931FE9CB4A00BD90C5 /* RCTBackedTextInputDelegate.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604411FE9CAF100BD90C5 /* RCTBackedTextInputDelegate.h */; };
59E604941FE9CB4A00BD90C5 /* RCTBackedTextInputDelegateAdapter.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604421FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.h */; };
59E604951FE9CB4A00BD90C5 /* RCTBackedTextInputViewProtocol.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604441FE9CAF100BD90C5 /* RCTBackedTextInputViewProtocol.h */; };
59E604961FE9CB4A00BD90C5 /* RCTBaseTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604451FE9CAF100BD90C5 /* RCTBaseTextInputView.h */; };
59E604971FE9CB4A00BD90C5 /* RCTTextSelection.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604471FE9CAF100BD90C5 /* RCTTextSelection.h */; };
59E604981FE9CB4A00BD90C5 /* RCTSinglelineTextInputShadowView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.h */; };
59E604991FE9CB4A00BD90C5 /* RCTSinglelineTextInputView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.h */; };
59E6049A1FE9CB4A00BD90C5 /* RCTSinglelineTextInputViewManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E6044E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.h */; };
59E6049B1FE9CB4A00BD90C5 /* RCTUITextField.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 59E604501FE9CAF100BD90C5 /* RCTUITextField.h */; };
59E8C5CC1F8833D100204F5E /* RCTFontAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = A85C82991F742AA20036C019 /* RCTFontAttributes.m */; };
59F60E911E661BDD0081153B /* RCTShadowTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */; };
59F60E921E661BDD0081153B /* RCTShadowTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */; };
59F60E931E661BDD0081153B /* RCTShadowTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E901E661BDD0081153B /* RCTShadowTextView.m */; };
59F60E941E661BDD0081153B /* RCTShadowTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E901E661BDD0081153B /* RCTShadowTextView.m */; };
A85C829A1F742AA20036C019 /* RCTFontAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = A85C82991F742AA20036C019 /* RCTFontAttributes.m */; };
AD50D1DF20067E6F00A34797 /* RCTBaseTextInputViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5989E14C20018A2200EA444A /* RCTBaseTextInputViewManager.m */; };
AF3225F91DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */ = {isa = PBXBuildFile; fileRef = AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */; };
AF3225FA1DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */ = {isa = PBXBuildFile; fileRef = AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */; };
/* End PBXBuildFile section */
@@ -57,8 +98,28 @@
dstPath = include/RCTText;
dstSubfolderSpec = 16;
files = (
599DF2671F0307D90079B53E /* RCTTextInput.h in Copy Headers */,
599DF25F1F0306660079B53E /* RCTBackedTextInputViewProtocol.h in Copy Headers */,
5989E14E20018A6600EA444A /* RCTBaseTextInputViewManager.h in Copy Headers */,
59E604871FE9CB4A00BD90C5 /* RCTConvert+Text.h in Copy Headers */,
59E604881FE9CB4A00BD90C5 /* RCTFontAttributes.h in Copy Headers */,
59E604891FE9CB4A00BD90C5 /* RCTFontAttributesDelegate.h in Copy Headers */,
59E6048A1FE9CB4A00BD90C5 /* RCTRawTextShadowView.h in Copy Headers */,
59E6048B1FE9CB4A00BD90C5 /* RCTRawTextViewManager.h in Copy Headers */,
59E6048C1FE9CB4A00BD90C5 /* RCTTextShadowView.h in Copy Headers */,
59E6048D1FE9CB4A00BD90C5 /* RCTTextView.h in Copy Headers */,
59E6048E1FE9CB4A00BD90C5 /* RCTTextViewManager.h in Copy Headers */,
59E6048F1FE9CB4A00BD90C5 /* RCTMultilineTextInputShadowView.h in Copy Headers */,
59E604901FE9CB4A00BD90C5 /* RCTMultilineTextInputView.h in Copy Headers */,
59E604911FE9CB4A00BD90C5 /* RCTMultilineTextInputViewManager.h in Copy Headers */,
59E604921FE9CB4A00BD90C5 /* RCTUITextView.h in Copy Headers */,
59E604931FE9CB4A00BD90C5 /* RCTBackedTextInputDelegate.h in Copy Headers */,
59E604941FE9CB4A00BD90C5 /* RCTBackedTextInputDelegateAdapter.h in Copy Headers */,
59E604951FE9CB4A00BD90C5 /* RCTBackedTextInputViewProtocol.h in Copy Headers */,
59E604961FE9CB4A00BD90C5 /* RCTBaseTextInputView.h in Copy Headers */,
59E604971FE9CB4A00BD90C5 /* RCTTextSelection.h in Copy Headers */,
59E604981FE9CB4A00BD90C5 /* RCTSinglelineTextInputShadowView.h in Copy Headers */,
59E604991FE9CB4A00BD90C5 /* RCTSinglelineTextInputView.h in Copy Headers */,
59E6049A1FE9CB4A00BD90C5 /* RCTSinglelineTextInputViewManager.h in Copy Headers */,
59E6049B1FE9CB4A00BD90C5 /* RCTUITextField.h in Copy Headers */,
);
name = "Copy Headers";
runOnlyForDeploymentPostprocessing = 0;
@@ -69,8 +130,28 @@
dstPath = include/RCTText;
dstSubfolderSpec = 16;
files = (
599DF2661F0307D10079B53E /* RCTTextInput.h in Copy Headers */,
599DF2611F0306C30079B53E /* RCTBackedTextInputViewProtocol.h in Copy Headers */,
5989E14F20018A7800EA444A /* RCTBaseTextInputViewManager.h in Copy Headers */,
59E604721FE9CB3F00BD90C5 /* RCTConvert+Text.h in Copy Headers */,
59E604731FE9CB3F00BD90C5 /* RCTFontAttributes.h in Copy Headers */,
59E604741FE9CB3F00BD90C5 /* RCTFontAttributesDelegate.h in Copy Headers */,
59E604751FE9CB3F00BD90C5 /* RCTRawTextShadowView.h in Copy Headers */,
59E604761FE9CB3F00BD90C5 /* RCTRawTextViewManager.h in Copy Headers */,
59E604771FE9CB3F00BD90C5 /* RCTTextShadowView.h in Copy Headers */,
59E604781FE9CB3F00BD90C5 /* RCTTextView.h in Copy Headers */,
59E604791FE9CB3F00BD90C5 /* RCTTextViewManager.h in Copy Headers */,
59E6047A1FE9CB3F00BD90C5 /* RCTMultilineTextInputShadowView.h in Copy Headers */,
59E6047B1FE9CB3F00BD90C5 /* RCTMultilineTextInputView.h in Copy Headers */,
59E6047C1FE9CB3F00BD90C5 /* RCTMultilineTextInputViewManager.h in Copy Headers */,
59E6047D1FE9CB3F00BD90C5 /* RCTUITextView.h in Copy Headers */,
59E6047E1FE9CB3F00BD90C5 /* RCTBackedTextInputDelegate.h in Copy Headers */,
59E6047F1FE9CB3F00BD90C5 /* RCTBackedTextInputDelegateAdapter.h in Copy Headers */,
59E604801FE9CB3F00BD90C5 /* RCTBackedTextInputViewProtocol.h in Copy Headers */,
59E604811FE9CB3F00BD90C5 /* RCTBaseTextInputView.h in Copy Headers */,
59E604821FE9CB3F00BD90C5 /* RCTTextSelection.h in Copy Headers */,
59E604831FE9CB3F00BD90C5 /* RCTSinglelineTextInputShadowView.h in Copy Headers */,
59E604841FE9CB3F00BD90C5 /* RCTSinglelineTextInputView.h in Copy Headers */,
59E604851FE9CB3F00BD90C5 /* RCTSinglelineTextInputViewManager.h in Copy Headers */,
59E604861FE9CB3F00BD90C5 /* RCTUITextField.h in Copy Headers */,
);
name = "Copy Headers";
runOnlyForDeploymentPostprocessing = 0;
@@ -78,42 +159,44 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
131B6ABC1AF0CD0600FFC3E0 /* RCTTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextView.h; sourceTree = "<group>"; };
131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextView.m; sourceTree = "<group>"; };
131B6ABE1AF0CD0600FFC3E0 /* RCTTextViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextViewManager.h; sourceTree = "<group>"; };
131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextViewManager.m; sourceTree = "<group>"; };
1362F0FC1B4D51F400E06D8C /* RCTTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextField.h; sourceTree = "<group>"; };
1362F0FD1B4D51F400E06D8C /* RCTTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextField.m; sourceTree = "<group>"; };
1362F0FE1B4D51F400E06D8C /* RCTTextFieldManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextFieldManager.h; sourceTree = "<group>"; };
1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextFieldManager.m; sourceTree = "<group>"; };
19FC5C841D41A4120090108F /* RCTTextSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextSelection.m; sourceTree = "<group>"; };
19FC5C861D41A4220090108F /* RCTTextSelection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTTextSelection.h; sourceTree = "<group>"; };
2D2A287B1D9B048500D4039D /* libRCTText-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRCTText-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
58B5119B1A9E6C1200147676 /* libRCTText.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTText.a; sourceTree = BUILT_PRODUCTS_DIR; };
58B511C61A9E6C5C00147676 /* RCTRawTextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTRawTextManager.h; sourceTree = "<group>"; };
58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRawTextManager.m; sourceTree = "<group>"; };
58B511C81A9E6C5C00147676 /* RCTShadowRawText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowRawText.h; sourceTree = "<group>"; };
58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowRawText.m; sourceTree = "<group>"; };
58B511CA1A9E6C5C00147676 /* RCTShadowText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowText.h; sourceTree = "<group>"; };
58B511CB1A9E6C5C00147676 /* RCTShadowText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowText.m; sourceTree = "<group>"; };
58B511CC1A9E6C5C00147676 /* RCTTextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextManager.h; sourceTree = "<group>"; };
58B511CD1A9E6C5C00147676 /* RCTTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextManager.m; sourceTree = "<group>"; };
58B512141A9E6EFF00147676 /* RCTText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTText.m; sourceTree = "<group>"; };
58B512151A9E6EFF00147676 /* RCTText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTText.h; sourceTree = "<group>"; };
598F41231F145D4900B8495B /* RCTBackedTextInputDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputDelegate.h; sourceTree = "<group>"; };
598F41241F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputDelegateAdapter.h; sourceTree = "<group>"; };
598F41251F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBackedTextInputDelegateAdapter.m; sourceTree = "<group>"; };
599DF25D1F0304B30079B53E /* RCTBackedTextInputViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputViewProtocol.h; sourceTree = "<group>"; };
599DF2621F03076D0079B53E /* RCTTextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextInput.h; sourceTree = "<group>"; };
599DF2631F03076D0079B53E /* RCTTextInput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextInput.m; sourceTree = "<group>"; };
59AF89A81EDCBCC700F004B1 /* RCTUITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUITextField.h; sourceTree = "<group>"; };
59AF89A91EDCBCC700F004B1 /* RCTUITextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUITextField.m; sourceTree = "<group>"; };
59B125C71E6E4E15004E2A67 /* RCTUITextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUITextView.h; sourceTree = "<group>"; };
59B125C81E6E4E15004E2A67 /* RCTUITextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUITextView.m; sourceTree = "<group>"; };
59F60E8D1E661BDD0081153B /* RCTShadowTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowTextField.h; sourceTree = "<group>"; };
59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowTextField.m; sourceTree = "<group>"; };
59F60E8F1E661BDD0081153B /* RCTShadowTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowTextView.h; sourceTree = "<group>"; };
59F60E901E661BDD0081153B /* RCTShadowTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowTextView.m; sourceTree = "<group>"; };
5989E14B20018A2200EA444A /* RCTBaseTextInputViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBaseTextInputViewManager.h; sourceTree = "<group>"; };
5989E14C20018A2200EA444A /* RCTBaseTextInputViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBaseTextInputViewManager.m; sourceTree = "<group>"; };
59E6042C1FE9CAF100BD90C5 /* RCTRawTextShadowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTRawTextShadowView.h; sourceTree = "<group>"; };
59E6042E1FE9CAF100BD90C5 /* RCTTextShadowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextShadowView.h; sourceTree = "<group>"; };
59E6042F1FE9CAF100BD90C5 /* RCTTextShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextShadowView.m; sourceTree = "<group>"; };
59E604301FE9CAF100BD90C5 /* RCTTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextView.h; sourceTree = "<group>"; };
59E604311FE9CAF100BD90C5 /* RCTTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextView.m; sourceTree = "<group>"; };
59E604321FE9CAF100BD90C5 /* RCTTextViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextViewManager.h; sourceTree = "<group>"; };
59E604331FE9CAF100BD90C5 /* RCTTextViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextViewManager.m; sourceTree = "<group>"; };
59E604341FE9CAF100BD90C5 /* RCTRawTextShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRawTextShadowView.m; sourceTree = "<group>"; };
59E604351FE9CAF100BD90C5 /* RCTRawTextViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTRawTextViewManager.h; sourceTree = "<group>"; };
59E604361FE9CAF100BD90C5 /* RCTRawTextViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRawTextViewManager.m; sourceTree = "<group>"; };
59E604391FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMultilineTextInputShadowView.h; sourceTree = "<group>"; };
59E6043A1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultilineTextInputShadowView.m; sourceTree = "<group>"; };
59E6043B1FE9CAF100BD90C5 /* RCTMultilineTextInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMultilineTextInputView.h; sourceTree = "<group>"; };
59E6043C1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultilineTextInputView.m; sourceTree = "<group>"; };
59E6043D1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMultilineTextInputViewManager.h; sourceTree = "<group>"; };
59E6043E1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultilineTextInputViewManager.m; sourceTree = "<group>"; };
59E6043F1FE9CAF100BD90C5 /* RCTUITextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUITextView.h; sourceTree = "<group>"; };
59E604401FE9CAF100BD90C5 /* RCTUITextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUITextView.m; sourceTree = "<group>"; };
59E604411FE9CAF100BD90C5 /* RCTBackedTextInputDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputDelegate.h; sourceTree = "<group>"; };
59E604421FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputDelegateAdapter.h; sourceTree = "<group>"; };
59E604431FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBackedTextInputDelegateAdapter.m; sourceTree = "<group>"; };
59E604441FE9CAF100BD90C5 /* RCTBackedTextInputViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBackedTextInputViewProtocol.h; sourceTree = "<group>"; };
59E604451FE9CAF100BD90C5 /* RCTBaseTextInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBaseTextInputView.h; sourceTree = "<group>"; };
59E604461FE9CAF100BD90C5 /* RCTBaseTextInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBaseTextInputView.m; sourceTree = "<group>"; };
59E604471FE9CAF100BD90C5 /* RCTTextSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTextSelection.h; sourceTree = "<group>"; };
59E604481FE9CAF100BD90C5 /* RCTTextSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextSelection.m; sourceTree = "<group>"; };
59E6044A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSinglelineTextInputShadowView.h; sourceTree = "<group>"; };
59E6044B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSinglelineTextInputShadowView.m; sourceTree = "<group>"; };
59E6044C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSinglelineTextInputView.h; sourceTree = "<group>"; };
59E6044D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSinglelineTextInputView.m; sourceTree = "<group>"; };
59E6044E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSinglelineTextInputViewManager.h; sourceTree = "<group>"; };
59E6044F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSinglelineTextInputViewManager.m; sourceTree = "<group>"; };
59E604501FE9CAF100BD90C5 /* RCTUITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUITextField.h; sourceTree = "<group>"; };
59E604511FE9CAF100BD90C5 /* RCTUITextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUITextField.m; sourceTree = "<group>"; };
A85C82981F742AA20036C019 /* RCTFontAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTFontAttributes.h; sourceTree = "<group>"; };
A85C82991F742AA20036C019 /* RCTFontAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTFontAttributes.m; sourceTree = "<group>"; };
A85C82BA1F742D8F0036C019 /* RCTFontAttributesDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTFontAttributesDelegate.h; sourceTree = "<group>"; };
@@ -126,45 +209,17 @@
isa = PBXGroup;
children = (
58B5119C1A9E6C1200147676 /* Products */,
598F41231F145D4900B8495B /* RCTBackedTextInputDelegate.h */,
598F41241F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.h */,
598F41251F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m */,
599DF25D1F0304B30079B53E /* RCTBackedTextInputViewProtocol.h */,
AF3225F71DE5574F00D3E7E7 /* RCTConvert+Text.h */,
AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */,
A85C82981F742AA20036C019 /* RCTFontAttributes.h */,
A85C82991F742AA20036C019 /* RCTFontAttributes.m */,
A85C82BA1F742D8F0036C019 /* RCTFontAttributesDelegate.h */,
58B511C61A9E6C5C00147676 /* RCTRawTextManager.h */,
58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */,
58B511C81A9E6C5C00147676 /* RCTShadowRawText.h */,
58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */,
58B511CA1A9E6C5C00147676 /* RCTShadowText.h */,
58B511CB1A9E6C5C00147676 /* RCTShadowText.m */,
59F60E8D1E661BDD0081153B /* RCTShadowTextField.h */,
59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */,
59F60E8F1E661BDD0081153B /* RCTShadowTextView.h */,
59F60E901E661BDD0081153B /* RCTShadowTextView.m */,
58B512151A9E6EFF00147676 /* RCTText.h */,
58B512141A9E6EFF00147676 /* RCTText.m */,
1362F0FC1B4D51F400E06D8C /* RCTTextField.h */,
1362F0FD1B4D51F400E06D8C /* RCTTextField.m */,
1362F0FE1B4D51F400E06D8C /* RCTTextFieldManager.h */,
1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */,
599DF2621F03076D0079B53E /* RCTTextInput.h */,
599DF2631F03076D0079B53E /* RCTTextInput.m */,
58B511CC1A9E6C5C00147676 /* RCTTextManager.h */,
58B511CD1A9E6C5C00147676 /* RCTTextManager.m */,
19FC5C861D41A4220090108F /* RCTTextSelection.h */,
19FC5C841D41A4120090108F /* RCTTextSelection.m */,
131B6ABC1AF0CD0600FFC3E0 /* RCTTextView.h */,
131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */,
131B6ABE1AF0CD0600FFC3E0 /* RCTTextViewManager.h */,
131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */,
59AF89A81EDCBCC700F004B1 /* RCTUITextField.h */,
59AF89A91EDCBCC700F004B1 /* RCTUITextField.m */,
59B125C71E6E4E15004E2A67 /* RCTUITextView.h */,
59B125C81E6E4E15004E2A67 /* RCTUITextView.m */,
59E6042C1FE9CAF100BD90C5 /* RCTRawTextShadowView.h */,
59E604341FE9CAF100BD90C5 /* RCTRawTextShadowView.m */,
59E604351FE9CAF100BD90C5 /* RCTRawTextViewManager.h */,
59E604361FE9CAF100BD90C5 /* RCTRawTextViewManager.m */,
59E6042D1FE9CAF100BD90C5 /* Text */,
59E604371FE9CAF100BD90C5 /* TextInput */,
);
indentWidth = 2;
sourceTree = "<group>";
@@ -180,6 +235,68 @@
name = Products;
sourceTree = "<group>";
};
59E6042D1FE9CAF100BD90C5 /* Text */ = {
isa = PBXGroup;
children = (
59E6042E1FE9CAF100BD90C5 /* RCTTextShadowView.h */,
59E6042F1FE9CAF100BD90C5 /* RCTTextShadowView.m */,
59E604301FE9CAF100BD90C5 /* RCTTextView.h */,
59E604311FE9CAF100BD90C5 /* RCTTextView.m */,
59E604321FE9CAF100BD90C5 /* RCTTextViewManager.h */,
59E604331FE9CAF100BD90C5 /* RCTTextViewManager.m */,
);
path = Text;
sourceTree = "<group>";
};
59E604371FE9CAF100BD90C5 /* TextInput */ = {
isa = PBXGroup;
children = (
59E604381FE9CAF100BD90C5 /* Multiline */,
59E604411FE9CAF100BD90C5 /* RCTBackedTextInputDelegate.h */,
59E604421FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.h */,
59E604431FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m */,
59E604441FE9CAF100BD90C5 /* RCTBackedTextInputViewProtocol.h */,
59E604451FE9CAF100BD90C5 /* RCTBaseTextInputView.h */,
59E604461FE9CAF100BD90C5 /* RCTBaseTextInputView.m */,
5989E14B20018A2200EA444A /* RCTBaseTextInputViewManager.h */,
5989E14C20018A2200EA444A /* RCTBaseTextInputViewManager.m */,
59E604471FE9CAF100BD90C5 /* RCTTextSelection.h */,
59E604481FE9CAF100BD90C5 /* RCTTextSelection.m */,
59E604491FE9CAF100BD90C5 /* Singleline */,
);
path = TextInput;
sourceTree = "<group>";
};
59E604381FE9CAF100BD90C5 /* Multiline */ = {
isa = PBXGroup;
children = (
59E604391FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.h */,
59E6043A1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m */,
59E6043B1FE9CAF100BD90C5 /* RCTMultilineTextInputView.h */,
59E6043C1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m */,
59E6043D1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.h */,
59E6043E1FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m */,
59E6043F1FE9CAF100BD90C5 /* RCTUITextView.h */,
59E604401FE9CAF100BD90C5 /* RCTUITextView.m */,
);
path = Multiline;
sourceTree = "<group>";
};
59E604491FE9CAF100BD90C5 /* Singleline */ = {
isa = PBXGroup;
children = (
59E6044A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.h */,
59E6044B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m */,
59E6044C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.h */,
59E6044D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m */,
59E6044E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.h */,
59E6044F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m */,
59E604501FE9CAF100BD90C5 /* RCTUITextField.h */,
59E604511FE9CAF100BD90C5 /* RCTUITextField.m */,
);
path = Singleline;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -256,24 +373,25 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D3B5F371D9B106F00451313 /* RCTText.m in Sources */,
2D3B5F381D9B106F00451313 /* RCTTextManager.m in Sources */,
2D3B5F391D9B106F00451313 /* RCTTextField.m in Sources */,
2D3B5F361D9B106F00451313 /* RCTShadowText.m in Sources */,
2D3B5F3B1D9B106F00451313 /* RCTTextView.m in Sources */,
59AF89AB1EDCBCC700F004B1 /* RCTUITextField.m in Sources */,
598F41271F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m in Sources */,
59E6046F1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m in Sources */,
59E604671FE9CAF100BD90C5 /* RCTBaseTextInputView.m in Sources */,
59E604631FE9CAF100BD90C5 /* RCTUITextView.m in Sources */,
59E604571FE9CAF100BD90C5 /* RCTTextViewManager.m in Sources */,
59E604531FE9CAF100BD90C5 /* RCTTextShadowView.m in Sources */,
59E6045D1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m in Sources */,
59E604591FE9CAF100BD90C5 /* RCTRawTextShadowView.m in Sources */,
59E604551FE9CAF100BD90C5 /* RCTTextView.m in Sources */,
AD50D1DF20067E6F00A34797 /* RCTBaseTextInputViewManager.m in Sources */,
59E604691FE9CAF100BD90C5 /* RCTTextSelection.m in Sources */,
59E6045F1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m in Sources */,
59E604611FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m in Sources */,
59E604711FE9CAF100BD90C5 /* RCTUITextField.m in Sources */,
59E6046D1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m in Sources */,
59E8C5CC1F8833D100204F5E /* RCTFontAttributes.m in Sources */,
2D3B5F3A1D9B106F00451313 /* RCTTextFieldManager.m in Sources */,
599DF2651F03076D0079B53E /* RCTTextInput.m in Sources */,
2D3B5F341D9B103100451313 /* RCTRawTextManager.m in Sources */,
59F60E921E661BDD0081153B /* RCTShadowTextField.m in Sources */,
59E6045B1FE9CAF100BD90C5 /* RCTRawTextViewManager.m in Sources */,
59E604651FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m in Sources */,
AF3225FA1DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */,
59B125CA1E6E4E15004E2A67 /* RCTUITextView.m in Sources */,
2D3B5F3C1D9B106F00451313 /* RCTTextViewManager.m in Sources */,
59F60E941E661BDD0081153B /* RCTShadowTextView.m in Sources */,
2D3B5F331D9B102D00451313 /* RCTTextSelection.m in Sources */,
2D3B5F351D9B103300451313 /* RCTShadowRawText.m in Sources */,
59E6046B1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -281,24 +399,25 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
58B511D11A9E6C5C00147676 /* RCTTextManager.m in Sources */,
131B6AC01AF0CD0600FFC3E0 /* RCTTextView.m in Sources */,
58B511CE1A9E6C5C00147676 /* RCTRawTextManager.m in Sources */,
19FC5C851D41A4120090108F /* RCTTextSelection.m in Sources */,
1362F1001B4D51F400E06D8C /* RCTTextField.m in Sources */,
59AF89AA1EDCBCC700F004B1 /* RCTUITextField.m in Sources */,
598F41261F145D4900B8495B /* RCTBackedTextInputDelegateAdapter.m in Sources */,
59E6046E1FE9CAF100BD90C5 /* RCTSinglelineTextInputViewManager.m in Sources */,
59E604661FE9CAF100BD90C5 /* RCTBaseTextInputView.m in Sources */,
59E604621FE9CAF100BD90C5 /* RCTUITextView.m in Sources */,
59E604561FE9CAF100BD90C5 /* RCTTextViewManager.m in Sources */,
59E604521FE9CAF100BD90C5 /* RCTTextShadowView.m in Sources */,
59E6045C1FE9CAF100BD90C5 /* RCTMultilineTextInputShadowView.m in Sources */,
59E604581FE9CAF100BD90C5 /* RCTRawTextShadowView.m in Sources */,
59E604541FE9CAF100BD90C5 /* RCTTextView.m in Sources */,
5989E14D20018A2200EA444A /* RCTBaseTextInputViewManager.m in Sources */,
59E604681FE9CAF100BD90C5 /* RCTTextSelection.m in Sources */,
59E6045E1FE9CAF100BD90C5 /* RCTMultilineTextInputView.m in Sources */,
59E604601FE9CAF100BD90C5 /* RCTMultilineTextInputViewManager.m in Sources */,
59E604701FE9CAF100BD90C5 /* RCTUITextField.m in Sources */,
59E6046C1FE9CAF100BD90C5 /* RCTSinglelineTextInputView.m in Sources */,
A85C829A1F742AA20036C019 /* RCTFontAttributes.m in Sources */,
58B512161A9E6EFF00147676 /* RCTText.m in Sources */,
599DF2641F03076D0079B53E /* RCTTextInput.m in Sources */,
1362F1011B4D51F400E06D8C /* RCTTextFieldManager.m in Sources */,
59F60E911E661BDD0081153B /* RCTShadowTextField.m in Sources */,
59E6045A1FE9CAF100BD90C5 /* RCTRawTextViewManager.m in Sources */,
59E604641FE9CAF100BD90C5 /* RCTBackedTextInputDelegateAdapter.m in Sources */,
AF3225F91DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */,
59B125C91E6E4E15004E2A67 /* RCTUITextView.m in Sources */,
131B6AC11AF0CD0600FFC3E0 /* RCTTextViewManager.m in Sources */,
59F60E931E661BDD0081153B /* RCTShadowTextView.m in Sources */,
58B511CF1A9E6C5C00147676 /* RCTShadowRawText.m in Sources */,
58B511D01A9E6C5C00147676 /* RCTShadowText.m in Sources */,
59E6046A1FE9CAF100BD90C5 /* RCTSinglelineTextInputShadowView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -432,6 +551,7 @@
58B511B01A9E6C1300147676 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_STATIC_ANALYZER_MODE = deep;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -442,6 +562,7 @@
58B511B11A9E6C1300147676 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_STATIC_ANALYZER_MODE = deep;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
-14
View File
@@ -1,14 +0,0 @@
/**
* Copyright (c) 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.
*/
#import <React/RCTViewManager.h>
@interface RCTTextManager : RCTViewManager
@end
-90
View File
@@ -1,90 +0,0 @@
/**
* Copyright (c) 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.
*/
#import "RCTTextViewManager.h"
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTFont.h>
#import <React/RCTShadowView+Layout.h>
#import <React/RCTShadowView.h>
#import "RCTConvert+Text.h"
#import "RCTShadowTextView.h"
#import "RCTTextView.h"
@implementation RCTTextViewManager
RCT_EXPORT_MODULE()
- (RCTShadowView *)shadowView
{
return [RCTShadowTextView new];
}
- (UIView *)view
{
return [[RCTTextView alloc] initWithBridge:self.bridge];
}
#pragma mark - Unified <TextInput> properties
RCT_REMAP_VIEW_PROPERTY(allowFontScaling, fontAttributes.allowFontScaling, BOOL)
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType)
RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType)
RCT_REMAP_VIEW_PROPERTY(color, backedTextInputView.textColor, UIColor)
RCT_REMAP_VIEW_PROPERTY(editable, backedTextInputView.editable, BOOL)
RCT_REMAP_VIEW_PROPERTY(enablesReturnKeyAutomatically, backedTextInputView.enablesReturnKeyAutomatically, BOOL)
RCT_REMAP_VIEW_PROPERTY(fontSize, fontAttributes.fontSize, NSNumber)
RCT_REMAP_VIEW_PROPERTY(fontWeight, fontAttributes.fontWeight, NSString)
RCT_REMAP_VIEW_PROPERTY(fontStyle, fontAttributes.fontStyle, NSString)
RCT_REMAP_VIEW_PROPERTY(fontFamily, fontAttributes.fontFamily, NSString)
RCT_REMAP_VIEW_PROPERTY(keyboardAppearance, backedTextInputView.keyboardAppearance, UIKeyboardAppearance)
RCT_REMAP_VIEW_PROPERTY(keyboardType, backedTextInputView.keyboardType, UIKeyboardType)
RCT_REMAP_VIEW_PROPERTY(placeholder, backedTextInputView.placeholder, NSString)
RCT_REMAP_VIEW_PROPERTY(placeholderTextColor, backedTextInputView.placeholderColor, UIColor)
RCT_REMAP_VIEW_PROPERTY(returnKeyType, backedTextInputView.returnKeyType, UIReturnKeyType)
RCT_REMAP_VIEW_PROPERTY(secureTextEntry, backedTextInputView.secureTextEntry, BOOL)
RCT_REMAP_VIEW_PROPERTY(selectionColor, backedTextInputView.tintColor, UIColor)
RCT_REMAP_VIEW_PROPERTY(spellCheck, backedTextInputView.spellCheckingType, UITextSpellCheckingType)
RCT_REMAP_VIEW_PROPERTY(textAlign, backedTextInputView.textAlignment, NSTextAlignment)
RCT_EXPORT_VIEW_PROPERTY(blurOnSubmit, BOOL)
RCT_EXPORT_VIEW_PROPERTY(clearTextOnFocus, BOOL)
RCT_EXPORT_VIEW_PROPERTY(maxLength, NSNumber)
RCT_EXPORT_VIEW_PROPERTY(selectTextOnFocus, BOOL)
RCT_EXPORT_VIEW_PROPERTY(selection, RCTTextSelection)
RCT_EXPORT_VIEW_PROPERTY(text, NSString)
#pragma mark - Multiline <TextInput> (aka TextView) specific properties
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onContentSizeChange, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onScroll, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onTextInput, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(mostRecentEventCount, NSInteger)
#if !TARGET_OS_TV
RCT_REMAP_VIEW_PROPERTY(dataDetectorTypes, backedTextInputView.dataDetectorTypes, UIDataDetectorTypes)
#endif
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTShadowView *)shadowView
{
NSNumber *reactTag = shadowView.reactTag;
UIEdgeInsets borderAsInsets = shadowView.borderAsInsets;
UIEdgeInsets paddingAsInsets = shadowView.paddingAsInsets;
return ^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTTextInput *> *viewRegistry) {
RCTTextInput *view = viewRegistry[reactTag];
view.reactBorderInsets = borderAsInsets;
view.reactPaddingInsets = paddingAsInsets;
};
}
@end
@@ -21,9 +21,10 @@ typedef NS_ENUM(NSInteger, RCTSizeComparison)
extern NSString *const RCTIsHighlightedAttributeName;
extern NSString *const RCTReactTagAttributeName;
@interface RCTShadowText : RCTShadowView
@interface RCTTextShadowView : RCTShadowView
@property (nonatomic, strong) UIColor *color;
@property (nonatomic, strong) UIColor *backgroundColor;
@property (nonatomic, copy) NSString *fontFamily;
@property (nonatomic, assign) CGFloat fontSize;
@property (nonatomic, copy) NSString *fontWeight;
@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTShadowText.h"
#import "RCTTextShadowView.h"
#import <React/RCTAccessibilityManager.h>
#import <React/RCTBridge.h>
@@ -18,9 +18,9 @@
#import <React/RCTUIManager.h>
#import <React/RCTUtils.h>
#import "RCTShadowRawText.h"
#import "RCTText.h"
#import "RCTRawTextShadowView.h"
#import "RCTTextView.h"
#import "RCTMultilineTextInputView.h"
NSString *const RCTIsHighlightedAttributeName = @"IsHighlightedAttributeName";
NSString *const RCTReactTagAttributeName = @"ReactTagAttributeName";
@@ -31,7 +31,7 @@ static CGFloat const kAutoSizeWidthErrorMargin = 0.05f;
static CGFloat const kAutoSizeHeightErrorMargin = 0.025f;
static CGFloat const kAutoSizeGranularity = 0.001f;
@implementation RCTShadowText
@implementation RCTTextShadowView
{
NSTextStorage *_cachedTextStorage;
CGFloat _cachedTextStorageWidth;
@@ -43,7 +43,7 @@ static CGFloat const kAutoSizeGranularity = 0.001f;
static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
{
RCTShadowText *shadowText = (__bridge RCTShadowText *)YGNodeGetContext(node);
RCTTextShadowView *shadowText = (__bridge RCTTextShadowView *)YGNodeGetContext(node);
NSTextStorage *textStorage = [shadowText buildTextStorageForWidth:width widthMode:widthMode];
[shadowText calculateTextFrame:textStorage];
NSLayoutManager *layoutManager = textStorage.layoutManagers.firstObject;
@@ -74,7 +74,7 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
_writingDirection = NSWritingDirectionNatural;
_cachedLayoutDirection = UIUserInterfaceLayoutDirectionLeftToRight;
YGNodeSetMeasureFunc(self.yogaNode, RCTMeasure);
YGNodeSetMeasureFunc(self.yogaNode, RCTMeasure);
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(contentSizeMultiplierDidChange:)
@@ -109,7 +109,7 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
- (NSDictionary<NSString *, id> *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
parentProperties:(NSDictionary<NSString *, id> *)parentProperties
{
if ([[self reactSuperview] isKindOfClass:[RCTShadowText class]]) {
if ([[self reactSuperview] isKindOfClass:[RCTTextShadowView class]]) {
return parentProperties;
}
@@ -122,7 +122,7 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
CGRect textFrame = [self calculateTextFrame:textStorage];
BOOL selectable = _selectable;
[applierBlocks addObject:^(NSDictionary<NSNumber *, UIView *> *viewRegistry) {
RCTText *view = (RCTText *)viewRegistry[self.reactTag];
RCTTextView *view = (RCTTextView *)viewRegistry[self.reactTag];
view.textFrame = textFrame;
view.textStorage = textStorage;
view.selectable = selectable;
@@ -130,14 +130,14 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
/**
* NOTE: this logic is included to support rich text editing inside multiline
* `<TextInput>` controls. It is required in order to ensure that the
* textStorage (aka attributed string) is copied over from the RCTShadowText
* to the RCTText view in time to be used to update the editable text content.
* TODO: we should establish a delegate relationship betweeen RCTTextView
* and its contaned RCTText element when they get inserted and get rid of this
* textStorage (aka attributed string) is copied over from the RCTTextShadowView
* to the RCTTextView view in time to be used to update the editable text content.
* TODO: we should establish a delegate relationship betweeen RCTMultilineTextInputView
* and its contaned RCTTextView element when they get inserted and get rid of this
*/
UIView *parentView = viewRegistry[parentTag];
if ([parentView respondsToSelector:@selector(performTextUpdate)]) {
[(RCTTextView *)parentView performTextUpdate];
[(RCTMultilineTextInputView *)parentView performTextUpdate];
}
}];
@@ -308,8 +308,8 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
CGFloat heightOfTallestSubview = 0.0;
NSMutableAttributedString *attributedString = [NSMutableAttributedString new];
for (RCTShadowView *child in [self reactSubviews]) {
if ([child isKindOfClass:[RCTShadowText class]]) {
RCTShadowText *shadowText = (RCTShadowText *)child;
if ([child isKindOfClass:[RCTTextShadowView class]]) {
RCTTextShadowView *shadowText = (RCTTextShadowView *)child;
[attributedString appendAttributedString:
[shadowText _attributedStringWithFontFamily:fontFamily
fontSize:fontSize
@@ -321,8 +321,8 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
backgroundColor:shadowText.backgroundColor ?: backgroundColor
opacity:opacity * shadowText.opacity]];
[child setTextComputed];
} else if ([child isKindOfClass:[RCTShadowRawText class]]) {
RCTShadowRawText *shadowRawText = (RCTShadowRawText *)child;
} else if ([child isKindOfClass:[RCTRawTextShadowView class]]) {
RCTRawTextShadowView *shadowRawText = (RCTRawTextShadowView *)child;
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:shadowRawText.text ?: @""]];
[child setTextComputed];
} else {
@@ -340,7 +340,7 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
if (height > heightOfTallestSubview) {
heightOfTallestSubview = height;
}
// Don't call setTextComputed on this child. RCTTextManager takes care of
// Don't call setTextComputed on this child. RCTTextViewManager takes care of
// processing inline UIViews.
}
}
@@ -620,12 +620,6 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f
return requiredSize;
}
- (void)setBackgroundColor:(UIColor *)backgroundColor
{
super.backgroundColor = backgroundColor;
[self dirtyText];
}
#define RCT_TEXT_PROPERTY(setProp, ivar, type) \
- (void)set##setProp:(type)value; \
{ \
@@ -659,8 +653,8 @@ RCT_TEXT_PROPERTY(TextShadowColor, _textShadowColor, UIColor *);
{
_allowFontScaling = allowFontScaling;
for (RCTShadowView *child in [self reactSubviews]) {
if ([child isKindOfClass:[RCTShadowText class]]) {
((RCTShadowText *)child).allowFontScaling = allowFontScaling;
if ([child isKindOfClass:[RCTTextShadowView class]]) {
((RCTTextShadowView *)child).allowFontScaling = allowFontScaling;
}
}
[self dirtyText];
@@ -674,8 +668,8 @@ RCT_TEXT_PROPERTY(TextShadowColor, _textShadowColor, UIColor *);
_fontSizeMultiplier = 1.0;
}
for (RCTShadowView *child in [self reactSubviews]) {
if ([child isKindOfClass:[RCTShadowText class]]) {
((RCTShadowText *)child).fontSizeMultiplier = fontSizeMultiplier;
if ([child isKindOfClass:[RCTTextShadowView class]]) {
((RCTTextShadowView *)child).fontSizeMultiplier = fontSizeMultiplier;
}
}
[self dirtyText];
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
@interface RCTText : UIView
@interface RCTTextView : UIView
@property (nonatomic, assign) UIEdgeInsets contentInset;
@property (nonatomic, strong) NSTextStorage *textStorage;
@@ -7,27 +7,27 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTText.h"
#import "RCTTextView.h"
#import <MobileCoreServices/UTCoreTypes.h>
#import <React/RCTUtils.h>
#import <React/UIView+React.h>
#import "RCTShadowText.h"
#import "RCTTextShadowView.h"
static void collectNonTextDescendants(RCTText *view, NSMutableArray *nonTextDescendants)
static void collectNonTextDescendants(RCTTextView *view, NSMutableArray *nonTextDescendants)
{
for (UIView *child in view.reactSubviews) {
if ([child isKindOfClass:[RCTText class]]) {
collectNonTextDescendants((RCTText *)child, nonTextDescendants);
if ([child isKindOfClass:[RCTTextView class]]) {
collectNonTextDescendants((RCTTextView *)child, nonTextDescendants);
} else if (!CGRectEqualToRect(child.frame, CGRectZero)) {
[nonTextDescendants addObject:child];
}
}
}
@implementation RCTText
@implementation RCTTextView
{
NSTextStorage *_textStorage;
CAShapeLayer *_highlightLayer;
@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTTextManager.h"
#import "RCTTextViewManager.h"
#import <React/RCTAccessibilityManager.h>
#import <React/RCTAssert.h>
@@ -17,16 +17,16 @@
#import <React/UIView+React.h>
#import <yoga/Yoga.h>
#import "RCTShadowRawText.h"
#import "RCTShadowText.h"
#import "RCTText.h"
#import "RCTRawTextShadowView.h"
#import "RCTTextShadowView.h"
#import "RCTTextView.h"
#import "RCTMultilineTextInputView.h"
static void collectDirtyNonTextDescendants(RCTShadowText *shadowView, NSMutableArray *nonTextDescendants) {
static void collectDirtyNonTextDescendants(RCTTextShadowView *shadowView, NSMutableArray *nonTextDescendants) {
for (RCTShadowView *child in shadowView.reactSubviews) {
if ([child isKindOfClass:[RCTShadowText class]]) {
collectDirtyNonTextDescendants((RCTShadowText *)child, nonTextDescendants);
} else if ([child isKindOfClass:[RCTShadowRawText class]]) {
if ([child isKindOfClass:[RCTTextShadowView class]]) {
collectDirtyNonTextDescendants((RCTTextShadowView *)child, nonTextDescendants);
} else if ([child isKindOfClass:[RCTRawTextShadowView class]]) {
// no-op
} else if ([child isTextDirty]) {
[nonTextDescendants addObject:child];
@@ -34,30 +34,31 @@ static void collectDirtyNonTextDescendants(RCTShadowText *shadowView, NSMutableA
}
}
@interface RCTShadowText (Private)
@interface RCTTextShadowView (Private)
- (NSTextStorage *)buildTextStorageForWidth:(CGFloat)width widthMode:(YGMeasureMode)widthMode;
@end
@implementation RCTTextManager
@implementation RCTTextViewManager
RCT_EXPORT_MODULE()
RCT_EXPORT_MODULE(RCTText)
- (UIView *)view
{
return [RCTText new];
return [RCTTextView new];
}
- (RCTShadowView *)shadowView
{
return [RCTShadowText new];
return [RCTTextShadowView new];
}
#pragma mark - Shadow properties
RCT_EXPORT_SHADOW_PROPERTY(color, UIColor)
RCT_EXPORT_SHADOW_PROPERTY(backgroundColor, UIColor)
RCT_EXPORT_SHADOW_PROPERTY(fontFamily, NSString)
RCT_EXPORT_SHADOW_PROPERTY(fontSize, CGFloat)
RCT_EXPORT_SHADOW_PROPERTY(fontWeight, NSString)
@@ -100,13 +101,13 @@ RCT_EXPORT_SHADOW_PROPERTY(selectable, BOOL)
RCTShadowView *shadowView = queue[i];
RCTAssert([shadowView isTextDirty], @"Don't process any nodes that don't have dirty text");
if ([shadowView isKindOfClass:[RCTShadowText class]]) {
((RCTShadowText *)shadowView).fontSizeMultiplier = self.bridge.accessibilityManager.multiplier;
[(RCTShadowText *)shadowView recomputeText];
collectDirtyNonTextDescendants((RCTShadowText *)shadowView, queue);
} else if ([shadowView isKindOfClass:[RCTShadowRawText class]]) {
if ([shadowView isKindOfClass:[RCTTextShadowView class]]) {
((RCTTextShadowView *)shadowView).fontSizeMultiplier = self.bridge.accessibilityManager.multiplier;
[(RCTTextShadowView *)shadowView recomputeText];
collectDirtyNonTextDescendants((RCTTextShadowView *)shadowView, queue);
} else if ([shadowView isKindOfClass:[RCTRawTextShadowView class]]) {
RCTLogError(@"Raw text cannot be used outside of a <Text> tag. Not rendering string: '%@'",
[(RCTShadowRawText *)shadowView text]);
[(RCTRawTextShadowView *)shadowView text]);
} else {
for (RCTShadowView *child in [shadowView reactSubviews]) {
if ([child isTextDirty]) {
@@ -122,13 +123,13 @@ RCT_EXPORT_SHADOW_PROPERTY(selectable, BOOL)
return nil;
}
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTShadowText *)shadowView
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTTextShadowView *)shadowView
{
NSNumber *reactTag = shadowView.reactTag;
UIEdgeInsets padding = shadowView.paddingAsInsets;
return ^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTText *> *viewRegistry) {
RCTText *text = viewRegistry[reactTag];
return ^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTTextView *> *viewRegistry) {
RCTTextView *text = viewRegistry[reactTag];
text.contentInset = padding;
};
}
@@ -9,6 +9,6 @@
#import <React/RCTShadowView.h>
@interface RCTShadowTextView : RCTShadowView
@interface RCTMultilineTextInputShadowView : RCTShadowView
@end
@@ -7,9 +7,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTShadowTextView.h"
#import "RCTMultilineTextInputShadowView.h"
@implementation RCTShadowTextView
@implementation RCTMultilineTextInputShadowView
- (BOOL)isYogaLeafNode
{
@@ -12,11 +12,11 @@
#import <React/RCTView.h>
#import <React/UIView+React.h>
#import "RCTTextInput.h"
#import "RCTBaseTextInputView.h"
@class RCTBridge;
@interface RCTTextView : RCTTextInput
@interface RCTMultilineTextInputView : RCTBaseTextInputView
@property (nonatomic, assign) UITextAutocorrectionType autocorrectionType;
@property (nonatomic, assign) UITextSpellCheckingType spellCheckingType;
@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTTextView.h"
#import "RCTMultilineTextInputView.h"
#import <React/RCTConvert.h>
#import <React/RCTEventDispatcher.h>
@@ -16,19 +16,19 @@
#import <React/RCTUtils.h>
#import <React/UIView+React.h>
#import "RCTShadowText.h"
#import "RCTText.h"
#import "RCTTextShadowView.h"
#import "RCTTextView.h"
#import "RCTTextSelection.h"
#import "RCTUITextView.h"
@interface RCTTextView () <RCTBackedTextInputDelegate>
@interface RCTMultilineTextInputView () <RCTBackedTextInputDelegate>
@end
@implementation RCTTextView
@implementation RCTMultilineTextInputView
{
RCTUITextView *_backedTextInput;
RCTText *_richTextView;
RCTTextView *_richTextView;
NSAttributedString *_pendingAttributedText;
NSString *_predictedText;
@@ -77,11 +77,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
{
[super insertReactSubview:subview atIndex:index];
if ([subview isKindOfClass:[RCTText class]]) {
if ([subview isKindOfClass:[RCTTextView class]]) {
if (_richTextView) {
RCTLogError(@"Tried to insert a second <Text> into <TextInput> - there can only be one.");
}
_richTextView = (RCTText *)subview;
_richTextView = (RCTTextView *)subview;
// If this <TextInput> is in rich text editing mode, and the child <Text> node providing rich text
// styling has a backgroundColor, then the attributedText produced by the child <Text> node will have an
@@ -0,0 +1,14 @@
/**
* Copyright (c) 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.
*/
#import "RCTBaseTextInputViewManager.h"
@interface RCTMultilineTextInputViewManager : RCTBaseTextInputViewManager
@end
@@ -0,0 +1,48 @@
/**
* Copyright (c) 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.
*/
#import "RCTMultilineTextInputViewManager.h"
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTFont.h>
#import <React/RCTShadowView+Layout.h>
#import <React/RCTShadowView.h>
#import "RCTConvert+Text.h"
#import "RCTMultilineTextInputShadowView.h"
#import "RCTMultilineTextInputView.h"
@implementation RCTMultilineTextInputViewManager
RCT_EXPORT_MODULE()
- (RCTShadowView *)shadowView
{
return [RCTMultilineTextInputShadowView new];
}
- (UIView *)view
{
return [[RCTMultilineTextInputView alloc] initWithBridge:self.bridge];
}
#pragma mark - Multiline <TextInput> (aka TextView) specific properties
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onContentSizeChange, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onScroll, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onTextInput, RCTDirectEventBlock)
#if !TARGET_OS_TV
RCT_REMAP_VIEW_PROPERTY(dataDetectorTypes, backedTextInputView.dataDetectorTypes, UIDataDetectorTypes)
#endif
@end
@@ -19,7 +19,7 @@
@class RCTEventDispatcher;
@class RCTTextSelection;
@interface RCTTextInput : RCTView <RCTFontAttributesDelegate> {
@interface RCTBaseTextInputView : RCTView <RCTFontAttributesDelegate> {
@protected
__weak RCTBridge *_bridge;
RCTEventDispatcher *_eventDispatcher;
@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTTextInput.h"
#import "RCTBaseTextInputView.h"
#import <React/RCTAccessibilityManager.h>
#import <React/RCTBridge.h>
@@ -19,7 +19,7 @@
#import "RCTTextSelection.h"
@implementation RCTTextInput {
@implementation RCTBaseTextInputView {
CGSize _previousContentSize;
BOOL _hasInputAccesoryView;
}
@@ -44,7 +44,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
- (id<RCTBackedTextInputViewProtocol>)backedTextInputView
{
RCTAssert(NO, @"-[RCTTextInput backedTextInputView] must be implemented in subclass.");
RCTAssert(NO, @"-[RCTBaseTextInputView backedTextInputView] must be implemented in subclass.");
return nil;
}
@@ -9,6 +9,6 @@
#import <React/RCTViewManager.h>
@interface RCTTextFieldManager : RCTViewManager
@interface RCTBaseTextInputViewManager : RCTViewManager
@end
@@ -7,32 +7,21 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTTextFieldManager.h"
#import "RCTBaseTextInputViewManager.h"
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTFont.h>
#import <React/RCTShadowView+Layout.h>
#import <React/RCTShadowView.h>
#import "RCTConvert+Text.h"
#import "RCTShadowTextField.h"
#import "RCTTextField.h"
#import "RCTUITextField.h"
#import "RCTBaseTextInputView.h"
@implementation RCTTextFieldManager
@implementation RCTBaseTextInputViewManager
RCT_EXPORT_MODULE()
- (RCTShadowView *)shadowView
{
return [RCTShadowTextField new];
}
- (UIView *)view
{
return [[RCTTextField alloc] initWithBridge:self.bridge];
}
#pragma mark - Unified <TextInput> properties
RCT_REMAP_VIEW_PROPERTY(allowFontScaling, fontAttributes.allowFontScaling, BOOL)
@@ -61,12 +50,6 @@ RCT_EXPORT_VIEW_PROPERTY(selectTextOnFocus, BOOL)
RCT_EXPORT_VIEW_PROPERTY(selection, RCTTextSelection)
RCT_EXPORT_VIEW_PROPERTY(text, NSString)
#pragma mark - Singleline <TextInput> (aka TextField) specific properties
RCT_REMAP_VIEW_PROPERTY(caretHidden, backedTextInputView.caretHidden, BOOL)
RCT_REMAP_VIEW_PROPERTY(clearButtonMode, backedTextInputView.clearButtonMode, UITextFieldViewMode)
RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(mostRecentEventCount, NSInteger)
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTShadowView *)shadowView
@@ -74,8 +57,8 @@ RCT_EXPORT_VIEW_PROPERTY(mostRecentEventCount, NSInteger)
NSNumber *reactTag = shadowView.reactTag;
UIEdgeInsets borderAsInsets = shadowView.borderAsInsets;
UIEdgeInsets paddingAsInsets = shadowView.paddingAsInsets;
return ^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTTextInput *> *viewRegistry) {
RCTTextInput *view = viewRegistry[reactTag];
return ^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTBaseTextInputView *> *viewRegistry) {
RCTBaseTextInputView *view = viewRegistry[reactTag];
view.reactBorderInsets = borderAsInsets;
view.reactPaddingInsets = paddingAsInsets;
};
@@ -9,6 +9,6 @@
#import <React/RCTShadowView.h>
@interface RCTShadowTextField : RCTShadowView
@interface RCTSinglelineTextInputShadowView : RCTShadowView
@end
@@ -7,9 +7,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTShadowTextField.h"
#import "RCTSinglelineTextInputShadowView.h"
@implementation RCTShadowTextField
@implementation RCTSinglelineTextInputShadowView
- (BOOL)isYogaLeafNode
{
@@ -12,11 +12,11 @@
#import <React/RCTComponent.h>
#import <React/RCTView.h>
#import "RCTTextInput.h"
#import "RCTBaseTextInputView.h"
@class RCTUITextField;
@interface RCTTextField : RCTTextInput
@interface RCTSinglelineTextInputView : RCTBaseTextInputView
@property (nonatomic, assign) BOOL caretHidden;
@property (nonatomic, strong) NSNumber *maxLength;
@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTTextField.h"
#import "RCTSinglelineTextInputView.h"
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
@@ -21,11 +21,11 @@
#import "RCTTextSelection.h"
#import "RCTUITextField.h"
@interface RCTTextField () <RCTBackedTextInputDelegate>
@interface RCTSinglelineTextInputView () <RCTBackedTextInputDelegate>
@end
@implementation RCTTextField
@implementation RCTSinglelineTextInputView
{
RCTUITextField *_backedTextInput;
BOOL _submitted;
@@ -0,0 +1,14 @@
/**
* Copyright (c) 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.
*/
#import "RCTBaseTextInputViewManager.h"
@interface RCTSinglelineTextInputViewManager : RCTBaseTextInputViewManager
@end
@@ -0,0 +1,42 @@
/**
* Copyright (c) 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.
*/
#import "RCTSinglelineTextInputViewManager.h"
#import <React/RCTBridge.h>
#import <React/RCTFont.h>
#import <React/RCTShadowView+Layout.h>
#import <React/RCTShadowView.h>
#import "RCTConvert+Text.h"
#import "RCTSinglelineTextInputShadowView.h"
#import "RCTSinglelineTextInputView.h"
#import "RCTUITextField.h"
@implementation RCTSinglelineTextInputViewManager
RCT_EXPORT_MODULE()
- (RCTShadowView *)shadowView
{
return [RCTSinglelineTextInputShadowView new];
}
- (UIView *)view
{
return [[RCTSinglelineTextInputView alloc] initWithBridge:self.bridge];
}
#pragma mark - Singleline <TextInput> (aka TextField) specific properties
RCT_REMAP_VIEW_PROPERTY(caretHidden, backedTextInputView.caretHidden, BOOL)
RCT_REMAP_VIEW_PROPERTY(clearButtonMode, backedTextInputView.clearButtonMode, UITextFieldViewMode)
RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock)
@end
+55
View File
@@ -0,0 +1,55 @@
/**
* 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.
*
* @providesModule TextProps
* @flow
* @format
*/
'use strict';
import type {Node} from 'react';
import type {LayoutEvent} from 'CoreEventTypes';
import type {TextStyleProp} from 'StyleSheetTypes';
type PressRetentionOffset = {
top: number,
left: number,
bottom: number,
right: number,
};
/**
* @see https://facebook.github.io/react-native/docs/text.html#reference
*/
export type TextProps = {|
accessible?: boolean,
allowFontScaling?: boolean,
children: Node,
ellipsizeMode?: 'clip' | 'head' | 'middle' | 'tail',
nativeID?: string,
numberOfLines?: number,
onLayout?: ?(event: LayoutEvent) => void,
onLongPress?: ?() => void,
onPress?: ?() => void,
pressRetentionOffset?: PressRetentionOffset,
selectable?: boolean,
style?: TextStyleProp,
testID?: string,
// Android Only
disabled?: boolean,
selectionColor?: string,
textBreakStrategy?: 'balanced' | 'highQuality' | 'simple',
// iOS Only
adjustsFontSizeToFit?: boolean,
minimumFontScale?: number,
suppressHighlighting?: boolean,
|};
+2
View File
@@ -25,3 +25,5 @@ export type LayoutEvent = {|
|},
+persist: () => void,
|};
export type PressEvent = Object;
+2 -2
View File
@@ -107,7 +107,7 @@ Error: ${e.message}`
// evaluating code) but on Chrome we can simply use eval
const injectFunction = typeof global.nativeInjectHMRUpdate === 'function'
? global.nativeInjectHMRUpdate
: eval;
: eval; // eslint-disable-line no-eval
injectFunction(code, sourceURLs[i]);
});
@@ -121,7 +121,7 @@ Error: ${e.message}`
}
case 'error': {
HMRLoadingView.hide();
throw new Error(data.body.type + ' ' + data.body.description);
throw new Error(`${data.body.type}: ${data.body.message}`);
}
default: {
throw new Error(`Unexpected message: ${data}`);
+1 -1
View File
@@ -14,7 +14,7 @@
* Intentional info-level logging for clear separation from ad-hoc console debug logging.
*/
function infoLog(...args) {
return console.log(...args); // eslint-disable-line no-console
return console.log(...args);
}
module.exports = infoLog;
@@ -433,6 +433,11 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"RCT_METRO_PORT=${RCT_METRO_PORT}",
"$(inherited)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -443,6 +448,7 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = "RCT_METRO_PORT=${RCT_METRO_PORT}";
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
+1 -1
View File
@@ -54,7 +54,7 @@ RCT_EXPORT_MODULE()
- (void)setUp
{
if (!_url) {
NSInteger port = [[[_bridge bundleURL] port] integerValue] ?: 8081;
NSInteger port = [[[_bridge bundleURL] port] integerValue] ?: RCT_METRO_PORT;
NSString *host = [[_bridge bundleURL] host] ?: @"localhost";
NSString *URLString = [NSString stringWithFormat:@"http://%@:%lld/debugger-proxy?role=client", host, (long long)port];
_url = [RCTConvert NSURL:URLString];
+7 -2
View File
@@ -4,6 +4,7 @@
#import <React/RCTBridge.h>
#import <React/RCTUIManager.h>
#import <React/RCTShadowView+Layout.h>
#import "RCTWrapperView.h"
@@ -27,7 +28,7 @@
static YGSize RCTWrapperShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
{
CGSize minimumSize = CGSizeMake(0, 0);
CGSize maximumSize = CGSizeMake(INFINITY, INFINITY);
CGSize maximumSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX);
switch (widthMode) {
case YGMeasureModeUndefined:
@@ -55,7 +56,11 @@ static YGSize RCTWrapperShadowViewMeasure(YGNodeRef node, float width, YGMeasure
RCTWrapperShadowView *shadowView = (__bridge RCTWrapperShadowView *)YGNodeGetContext(node);
CGSize size = [shadowView measureWithMinimumSize:minimumSize maximumSize:maximumSize];
return (YGSize){size.width, size.height};
return (YGSize){
RCTYogaFloatFromCoreGraphicsFloat(size.width),
RCTYogaFloatFromCoreGraphicsFloat(size.height)
};
}
- (CGSize)measureWithMinimumSize:(CGSize)minimumSize maximumSize:(CGSize)maximumSize
+2 -2
View File
@@ -77,14 +77,14 @@
- (CGSize)intrinsicContentSize
{
return [self sizeThatFits:CGSizeMake(INFINITY, INFINITY)];
return [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
}
- (CGSize)sizeThatFits:(CGSize)size
{
UIView *contentView = self.contentView;
if (!contentView) {
return size;
return [super sizeThatFits:size];
}
return [contentView sizeThatFits:size];
+1 -1
View File
@@ -11,7 +11,7 @@
* @nolint
*/
/* eslint-disable */
/* eslint-disable consistent-this */
/**
* Creates an array from array like objects.
+1 -1
View File
@@ -11,7 +11,7 @@
* @nolint
*/
/* eslint-disable */
/* eslint-disable no-bitwise, no-extend-native, radix, no-self-compare */
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
function findIndex(predicate, context) {
-3
View File
@@ -11,8 +11,6 @@
* @nolint
*/
/* eslint-disable strict */
if (Number.EPSILON === undefined) {
Object.defineProperty(Number, 'EPSILON', {
value: Math.pow(2, -52),
@@ -29,7 +27,6 @@ if (Number.MIN_SAFE_INTEGER === undefined) {
});
}
if (!Number.isNaN) {
// eslint-disable-next-line max-len
// https://github.com/dherman/tc39-codex-wiki/blob/master/data/es6/number/index.md#polyfill-for-numberisnan
const globalIsNaN = global.isNaN;
Object.defineProperty(Number, 'isNaN', {
-2
View File
@@ -11,8 +11,6 @@
* @nolint
*/
/* eslint-disable strict */
// WARNING: This is an optimized version that fails on hasOwnProperty checks
// and non objects. It's not spec-compliant. It's a perf optimization.
// This is only needed for iOS 8 and current Android JSC.
+1 -1
View File
@@ -11,7 +11,7 @@
* @nolint
*/
/* eslint-disable strict, no-extend-native, no-bitwise */
/* eslint-disable no-extend-native, no-bitwise */
/*
* NOTE: We use (Number(x) || 0) to replace NaN values with zero.
@@ -9,8 +9,6 @@
* @emails oncall+jsinfra
*/
/* eslint-disable fb-www/object-create-only-one-param */
'use strict';
describe('Object (ES7)', () => {
+1 -1
View File
@@ -11,7 +11,7 @@
* @nolint
*/
/* eslint-disable */
/* eslint-disable quotes, curly, no-proto, no-undef-init, dot-notation */
// Created by running:
// require('babel-core').buildExternalHelpers('_extends classCallCheck createClass createRawReactElement defineProperty get inherits interopRequireDefault interopRequireWildcard objectWithoutProperties possibleConstructorReturn slicedToArray taggedTemplateLiteral toArray toConsumableArray '.split(' '))
+1 -1
View File
@@ -12,7 +12,7 @@
* @format
*/
/* eslint-disable */
/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void */
/**
* This pipes all of our console logging functions to native logging so that
-2
View File
@@ -11,8 +11,6 @@
* @nolint
*/
/* eslint-disable strict */
let _inGuard = 0;
/**
+2 -2
View File
@@ -27,8 +27,8 @@ Supported operating systems are >= Android 4.1 (API 16) and >= iOS 8.0.
Follow the [Getting Started guide](https://facebook.github.io/react-native/docs/getting-started.html). The recommended way to install React Native depends on your project. Here you can find short guides for the most common scenarios:
- [Trying out React Native](https://snack.expo.io/BJ-uC-nrb)
- [Creating a New Application](http://facebook.github.io/react-native/docs/getting-started.html)
- [Adding React Native to an Existing Application](http://facebook.github.io/react-native/docs/integration-with-existing-apps.html)
- [Creating a New Application](https://facebook.github.io/react-native/docs/getting-started.html)
- [Adding React Native to an Existing Application](https://facebook.github.io/react-native/docs/integration-with-existing-apps.html)
---
@@ -412,6 +412,20 @@
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
3DCE53211FEAB1C500613583 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
remoteInfo = jsinspector;
};
3DCE53231FEAB1C500613583 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
remoteInfo = "jsinspector-tvOS";
};
5281CA501EEAC9A700AC40CD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5281CA4B1EEAC9A700AC40CD /* RCTBlob.xcodeproj */;
@@ -826,6 +840,8 @@
3D05748E1DE6008900184BB4 /* libcxxreact.a */,
3D0574901DE6008900184BB4 /* libjschelpers.a */,
3D0574921DE6008900184BB4 /* libjschelpers.a */,
3DCE53221FEAB1C500613583 /* libjsinspector.a */,
3DCE53241FEAB1C500613583 /* libjsinspector-tvOS.a */,
3D507F421EBC88B700B56834 /* libthird-party.a */,
2D66FF8C1ECA405900F0A767 /* libthird-party.a */,
3D507F441EBC88B700B56834 /* libdouble-conversion.a */,
@@ -1497,6 +1513,20 @@
remoteRef = 3DBE0D341F3B18670099AA32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DCE53221FEAB1C500613583 /* libjsinspector.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsinspector.a;
remoteRef = 3DCE53211FEAB1C500613583 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DCE53241FEAB1C500613583 /* libjsinspector-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsinspector-tvOS.a";
remoteRef = 3DCE53231FEAB1C500613583 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5281CA511EEAC9A700AC40CD /* libRCTBlob.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -110,6 +110,7 @@
3D4153641F277011005B8EFE /* libART-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D4153621F276FF9005B8EFE /* libART-tvOS.a */; };
3D56F9F11D6F6E9B00F53A06 /* RNTesterBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F83E1D6F6AE000E69E0E /* RNTesterBundle.bundle */; };
3DB99D0C1BA0340600302749 /* RNTesterIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB99D0B1BA0340600302749 /* RNTesterIntegrationTests.m */; };
3DCE52BC1FEAAF8F00613583 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1380DC9B1E70C0DD00E7C47D /* libReact.a */; };
3DD981D61D33C6FB007DC7BE /* RNTesterUnitTestsBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* RNTesterUnitTestsBundle.js */; };
68FF44381CF6111500720EFD /* RCTBundleURLProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FF44371CF6111500720EFD /* RCTBundleURLProviderTests.m */; };
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 834C36D21AF8DA610019C93C /* libRCTSettings.a */; };
@@ -535,6 +536,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3DCE52BC1FEAAF8F00613583 /* libReact.a in Frameworks */,
3D4153641F277011005B8EFE /* libART-tvOS.a in Frameworks */,
2DD323E31DA2DE3F000FE1B8 /* libRCTAnimation.a in Frameworks */,
3D302F221DF8285100D6DDAE /* libRCTImage-tvOS.a in Frameworks */,
@@ -833,6 +835,13 @@
name = Products;
sourceTree = "<group>";
};
3DCE52B31FEAAF8F00613583 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
58005BE51ABA80530062E044 /* Products */ = {
isa = PBXGroup;
children = (
@@ -862,6 +871,7 @@
14D6D6EA1B2205C0001FB087 /* OCMock */,
2DD323911DA2DD8B000FE1B8 /* RNTester-tvOS */,
83CBBA001A601CBA00E9B192 /* Products */,
3DCE52B31FEAAF8F00613583 /* Frameworks */,
);
indentWidth = 2;
sourceTree = "<group>";

Some files were not shown because too many files have changed in this diff Show More