mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
72
Commits
@@ -26,6 +26,9 @@
|
||||
; helloworld
|
||||
<PROJECT_ROOT>/packages/helloworld/ios/Pods/
|
||||
|
||||
; Ignore rn-tester Pods
|
||||
<PROJECT_ROOT>/packages/rn-tester/Pods/
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
@@ -3,9 +3,6 @@ description: Prepare iOS Tests
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: brew install xcbeautify
|
||||
run: brew install xcbeautify
|
||||
shell: bash
|
||||
- name: Run Ruby Tests
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -121,21 +121,21 @@ runs:
|
||||
if: ${{ inputs.run-unit-tests != 'true' && inputs.run-e2e-tests == 'false' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -o pipefail && xcodebuild build \
|
||||
xcodebuild build \
|
||||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
||||
-scheme RNTester \
|
||||
-sdk iphonesimulator | xcbeautify
|
||||
-sdk iphonesimulator
|
||||
- name: Build RNTester (E2E Tests)
|
||||
shell: bash
|
||||
if: ${{ inputs.run-e2e-tests == 'true' }}
|
||||
run: |
|
||||
set -o pipefail && xcodebuild \
|
||||
xcodebuild \
|
||||
-scheme "RNTester" \
|
||||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
||||
-configuration "${{ inputs.flavor }}" \
|
||||
-sdk "iphonesimulator" \
|
||||
-destination "generic/platform=iOS Simulator" \
|
||||
-derivedDataPath "/tmp/RNTesterBuild" | xcbeautify
|
||||
-derivedDataPath "/tmp/RNTesterBuild"
|
||||
|
||||
echo "Print path to *.app file"
|
||||
find "/tmp/RNTesterBuild" -type d -name "*.app"
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
name: test-library-on-nightly
|
||||
description: Tests a library on a nightly
|
||||
inputs:
|
||||
library-npm-package:
|
||||
description: The library npm package to add
|
||||
required: true
|
||||
platform:
|
||||
description: whether we want to build for iOS or Android
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Create new app
|
||||
shell: bash
|
||||
run: |
|
||||
cd /tmp
|
||||
npx @react-native-community/cli init RNApp --skip-install --version nightly
|
||||
- name: Add library
|
||||
shell: bash
|
||||
run: |
|
||||
cd /tmp/RNApp
|
||||
yarn add ${{ inputs.library-npm-package }}
|
||||
|
||||
- name: Build iOS
|
||||
shell: bash
|
||||
if: ${{ inputs.platform == 'ios' }}
|
||||
run: |
|
||||
cd /tmp/RNApp/ios
|
||||
bundle install
|
||||
bundle exec pod install
|
||||
cd ..
|
||||
yarn ios
|
||||
- name: Setup Java for Android
|
||||
if: ${{ inputs.platform == 'android' }}
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
- name: Build Android
|
||||
shell: bash
|
||||
if: ${{ inputs.platform == 'android' }}
|
||||
run: |
|
||||
cd /tmp/RNApp/android
|
||||
./gradlew assembleDebug
|
||||
@@ -48,96 +48,84 @@ module.exports = async (github, context, labelWithContext) => {
|
||||
switch (labelWithContext.label) {
|
||||
case 'Type: Invalid':
|
||||
await addComment(
|
||||
`| :warning: | Issue is Invalid |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | This issue doesn't match any of the expected types for this repository - closing. |`,
|
||||
`> [!CAUTION]\n` +
|
||||
`> **Invalid issue**: This issue is not valid, either is not a bug in React Native, it doesn't match any of the issue template, or we can't help further with this.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Question':
|
||||
await addComment(
|
||||
`| :warning: | Issue is a Question |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/). |`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Docs':
|
||||
await addComment(
|
||||
`| :warning: | Documentation Issue |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | Please report documentation issues in the [react-native-website](https://github.com/facebook/react-native-website/issues) repository. |`,
|
||||
`> [!NOTE]\n` +
|
||||
`> **Not a bug report**: This issue looks like a question. We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/).`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Resolution: For Stack Overflow':
|
||||
await addComment(
|
||||
`| :warning: | Issue is a Question |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We are using GitHub issues exclusively to track bugs in the core React Native library. Please try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) as it is better suited for this type of question. |`,
|
||||
`> [!NOTE]\n` +
|
||||
`> **Not a bug report**: This issue looks like a question. We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/).`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Docs':
|
||||
await addComment(
|
||||
`> [!NOTE]\n` +
|
||||
`> **Docs issue**: This issue looks like an issue related to our docs. Please report documentation issues in the [react-native-website](https://github.com/facebook/react-native-website/issues) repository.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Expo':
|
||||
await addComment(
|
||||
`| :warning: | Issue is Related to Expo |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue is related to Expo and not React Native core. Please open your issue in [Expo's repository](https://github.com/expo/expo/issues/new). If you are able to create a repro that showcases that this issue is also happening in React Native vanilla, we will be happy to re-open. |`,
|
||||
`> [!NOTE]\n` +
|
||||
`> **Expo related**: It looks like your issue is related to Expo and not React Native core. Please open your issue in [Expo's repository](https://github.com/expo/expo/issues/new). If you are able to create a repro that showcases that this issue is also happening in React Native vanilla, we will be happy to re-open.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Needs: Issue Template':
|
||||
await addComment(
|
||||
`| :warning: | Missing Required Fields |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a [new issue is created](https://github.com/facebook/react-native/issues/new?template=bug_report.md). Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one. |`,
|
||||
`> [!WARNING]\n` +
|
||||
`> **Missing issue template**: It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a [new issue is created](https://github.com/facebook/react-native/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A&projects=&template=bug_report.yml). Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Needs: Environment Info':
|
||||
await addComment(
|
||||
`| :warning: | Missing Environment Information |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running <code>react-native info</code> in a console. |`,
|
||||
`> [!WARNING]\n` +
|
||||
`> **Missing info**: It looks like your issue may be missing information about your development environment. You can obtain the missing information by running <code>react-native info</code> in a console.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Newer Patch Available':
|
||||
await addComment(
|
||||
`| :warning: | Newer Version of React Native is Available! |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |`,
|
||||
`> [!TIP]\n` +
|
||||
`> **Newer version available**: You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.`,
|
||||
);
|
||||
return;
|
||||
case 'Needs: Version Info':
|
||||
await addComment(
|
||||
`| :warning: | Add or Reformat Version Info |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2 |`,
|
||||
`> [!WARNING]\n` +
|
||||
`> **Could not parse version**: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Needs: Repro':
|
||||
await addComment(
|
||||
`| :warning: | Missing Reproducible Example |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not detect a reproducible example in your issue report. Please provide either: <br /><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/update related: use our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul> |`,
|
||||
`> [!WARNING]\n` +
|
||||
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li></ul>`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Type: Unsupported Version':
|
||||
await addComment(
|
||||
`| :warning: | Unsupported Version of React Native |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue or the example you provided uses an [unsupported version of React Native](https://github.com/reactwg/react-native-releases/blob/main/README.md#releases-support-policy).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support. |`,
|
||||
`> [!WARNING]\n` +
|
||||
`> **Unsupported version**: It looks like your issue or the example you provided uses an [unsupported version of React Native](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Type: Too Old Version':
|
||||
await addComment(
|
||||
`| :warning: | Too Old Version of React Native |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue or the example you provided uses a [**Too Old Version of React Native**](https://github.com/reactwg/react-native-releases/blob/main/README.md#releases-support-policy).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support. |`,
|
||||
`> [!CAUTION]\n` +
|
||||
`> **Too old version**: It looks like your issue or the example you provided uses a [**Too Old Version of React Native**](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
|
||||
const NEEDS_REPRO_LABEL = 'Needs: Repro';
|
||||
const NEEDS_AUTHOR_FEEDBACK_LABEL = 'Needs: Author Feedback';
|
||||
const NEEDS_REPRO_HEADER = 'Missing Reproducible Example';
|
||||
const NEEDS_REPRO_MESSAGE =
|
||||
`| :warning: | Missing Reproducible Example |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not detect a reproducible example in your issue report. Please provide either: <br /><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/update related: use our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate). A reproducer needs to be in a GitHub repository under your username.</li></ul> |`;
|
||||
const SKIP_ISSUES_OLDER_THAN = '2023-07-01T00:00:00Z';
|
||||
|
||||
module.exports = async (github, context) => {
|
||||
@@ -25,7 +20,6 @@ module.exports = async (github, context) => {
|
||||
|
||||
const issue = await github.rest.issues.get(issueData);
|
||||
const comments = await github.rest.issues.listComments(issueData);
|
||||
|
||||
const author = issue.data.user.login;
|
||||
|
||||
const issueDate = issue.data.created_at;
|
||||
@@ -43,10 +37,6 @@ module.exports = async (github, context) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const botComment = comments.data.find(comment =>
|
||||
comment.body.includes(NEEDS_REPRO_HEADER),
|
||||
);
|
||||
|
||||
const entities = [issue.data, ...comments.data];
|
||||
|
||||
// Look for Snack or a GH repo associated with the user that added an issue or comment
|
||||
@@ -74,25 +64,11 @@ module.exports = async (github, context) => {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (!botComment) return;
|
||||
|
||||
await github.rest.issues.deleteComment({
|
||||
...issueData,
|
||||
comment_id: botComment.id,
|
||||
});
|
||||
} else {
|
||||
await github.rest.issues.addLabels({
|
||||
...issueData,
|
||||
labels: [NEEDS_REPRO_LABEL, NEEDS_AUTHOR_FEEDBACK_LABEL],
|
||||
});
|
||||
|
||||
if (botComment) return;
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
...issueData,
|
||||
body: NEEDS_REPRO_MESSAGE,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,7 +77,7 @@ function containsPattern(body, pattern) {
|
||||
return body.search(regexp) !== -1;
|
||||
}
|
||||
|
||||
// Prevents the bot from responding when maintainer has changed Needs: Repro the label
|
||||
// Prevents the bot from responding when maintainer has changed the 'Needs: Repro' label
|
||||
async function hasMaintainerChangedLabel(github, issueData, author) {
|
||||
const timeline = await github.rest.issues.listEventsForTimeline(issueData);
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
module.exports = async (github, context) => {
|
||||
const issue = context.payload.issue;
|
||||
|
||||
// Ignore issues using upgrade template (they use a special label)
|
||||
if (issue.labels.find(label => label.name === 'Type: Upgrade Issue')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const issueVersionUnparsed =
|
||||
getReactNativeVersionFromIssueBodyIfExists(issue);
|
||||
const issueVersion = parseVersionFromString(issueVersionUnparsed);
|
||||
|
||||
@@ -13,6 +13,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'facebook/react-native'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Check nightly
|
||||
run: |
|
||||
TODAY=$(date "+%Y%m%d")
|
||||
@@ -24,3 +26,7 @@ jobs:
|
||||
else
|
||||
echo 'Nightly Worked, All Good!'
|
||||
fi
|
||||
|
||||
test-libraries:
|
||||
uses: ./.github/workflows/test-libraries-on-nightlies.yml
|
||||
needs: check-nightly
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Test Libraries on Nightlies
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
test-library-on-nightly-android:
|
||||
name: "[Android] ${{ matrix.library }}"
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
library: [
|
||||
"react-native-async-storage",
|
||||
"react-native-blob-util",
|
||||
"@react-native-clipboard/clipboard",
|
||||
"@react-native-community/datetimepicker",
|
||||
"react-native-gesture-handler",
|
||||
"react-native-image-picker",
|
||||
"react-native-linear-gradient",
|
||||
"@react-native-masked-view/masked-view",
|
||||
"react-native-maps",
|
||||
"@react-native-community/netinfo",
|
||||
"react-native-reanimated",
|
||||
"react-native-svg",
|
||||
"react-native-video",
|
||||
"react-native-webview",
|
||||
"react-native-mmkv",
|
||||
"react-native-screens",
|
||||
"react-native-pager-view",
|
||||
"@react-native-community/slider"
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Test ${{ inputs.library-name }}
|
||||
uses: ./.github/actions/test-library-on-nightly
|
||||
with:
|
||||
library-npm-package: ${{ matrix.library }}
|
||||
platform: android
|
||||
|
||||
test-library-on-nightly-ios:
|
||||
name: "[iOS] ${{ matrix.library }}"
|
||||
runs-on: macos-13-large
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
library: [
|
||||
"react-native-async-storage",
|
||||
"react-native-blob-util",
|
||||
"@react-native-clipboard/clipboard",
|
||||
"@react-native-community/datetimepicker",
|
||||
"react-native-gesture-handler",
|
||||
"react-native-image-picker",
|
||||
"react-native-linear-gradient",
|
||||
"@react-native-masked-view/masked-view",
|
||||
"react-native-maps",
|
||||
"@react-native-community/netinfo",
|
||||
"react-native-reanimated",
|
||||
"react-native-svg",
|
||||
"react-native-video",
|
||||
"react-native-webview",
|
||||
"react-native-mmkv",
|
||||
"react-native-screens",
|
||||
"react-native-pager-view",
|
||||
"@react-native-community/slider"
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Test ${{ inputs.library-name }}
|
||||
uses: ./.github/actions/test-library-on-nightly
|
||||
with:
|
||||
library-npm-package: ${{ matrix.library }}
|
||||
platform: ios
|
||||
+1
-1
@@ -124,7 +124,7 @@ vendor/
|
||||
!/packages/rn-tester/Pods/__offline_mirrors_jsc__
|
||||
|
||||
# @react-native/codegen
|
||||
/packages/react-native/React/FBReactNativeSpec/FBReactNativeSpec
|
||||
/packages/react-native/React/FBReactNativeSpec/
|
||||
/packages/react-native-codegen/lib
|
||||
/packages/react-native-codegen/tmp/
|
||||
/packages/react-native/ReactCommon/react/renderer/components/rncore/
|
||||
|
||||
@@ -19,10 +19,7 @@ import isDevServerRunning from '../../utils/isDevServerRunning';
|
||||
import loadMetroConfig from '../../utils/loadMetroConfig';
|
||||
import * as version from '../../utils/version';
|
||||
import attachKeyHandlers from './attachKeyHandlers';
|
||||
import {
|
||||
createDevServerMiddleware,
|
||||
indexPageMiddleware,
|
||||
} from '@react-native-community/cli-server-api';
|
||||
import {createDevServerMiddleware, indexPageMiddleware} from './middleware';
|
||||
import {createDevMiddleware} from '@react-native/dev-middleware';
|
||||
import chalk from 'chalk';
|
||||
import Metro from 'metro';
|
||||
|
||||
@@ -553,6 +553,48 @@ if (global.nativeLoggingHook) {
|
||||
assert: consoleAssertPolyfill,
|
||||
};
|
||||
|
||||
// TODO(T206796580): This was copy-pasted from ExceptionsManager.js
|
||||
// Delete the copy there after the c++ pipeline is rolled out everywhere.
|
||||
if (global.RN$useAlwaysAvailableJSErrorHandling === true) {
|
||||
let originalConsoleError = console.error;
|
||||
console.reportErrorsAsExceptions = true;
|
||||
function stringifySafe(arg) {
|
||||
return inspect(arg, {depth: 10}).replaceAll(/\n\s*/g, ' ');
|
||||
}
|
||||
console.error = function (...args) {
|
||||
originalConsoleError.apply(this, args);
|
||||
if (!console.reportErrorsAsExceptions) {
|
||||
return;
|
||||
}
|
||||
if (global.RN$inExceptionHandler?.()) {
|
||||
return;
|
||||
}
|
||||
let error;
|
||||
|
||||
const firstArg = args[0];
|
||||
if (firstArg?.stack) {
|
||||
// RN$handleException will console.error this with high enough fidelity.
|
||||
error = firstArg;
|
||||
} else {
|
||||
if (typeof firstArg === 'string' && firstArg.startsWith('Warning: ')) {
|
||||
// React warnings use console.error so that a stack trace is shown, but
|
||||
// we don't (currently) want these to show a redbox
|
||||
return;
|
||||
}
|
||||
const message = args
|
||||
.map(arg => (typeof arg === 'string' ? arg : stringifySafe(arg)))
|
||||
.join(' ');
|
||||
|
||||
error = new Error(message);
|
||||
error.name = 'console.error';
|
||||
}
|
||||
|
||||
const isFatal = false;
|
||||
const reportToConsole = false;
|
||||
global.RN$handleException(error, isFatal, reportToConsole);
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperty(console, '_isPolyfilled', {
|
||||
value: true,
|
||||
enumerable: false,
|
||||
|
||||
@@ -19,12 +19,12 @@ type Fn<Args, Return> = (...Args) => Return;
|
||||
* when loading a module. This will report any errors encountered before
|
||||
* ExceptionsManager is configured.
|
||||
*/
|
||||
let _globalHandler: ErrorHandler = function onError(
|
||||
e: mixed,
|
||||
isFatal: boolean,
|
||||
) {
|
||||
throw e;
|
||||
};
|
||||
let _globalHandler: ErrorHandler =
|
||||
global.RN$useAlwaysAvailableJSErrorHandling === true
|
||||
? global.RN$handleException
|
||||
: (e: mixed, isFatal: boolean) => {
|
||||
throw e;
|
||||
};
|
||||
|
||||
/**
|
||||
* The particular require runtime that we are using looks for a global
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {SectionBase} from '../../Lists/SectionList';
|
||||
import type {AnimatedComponentType} from '../createAnimatedComponent';
|
||||
|
||||
import SectionList from '../../Lists/SectionList';
|
||||
@@ -16,5 +17,6 @@ import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(SectionList): AnimatedComponentType<
|
||||
React.ElementConfig<typeof SectionList>,
|
||||
React.ElementRef<typeof SectionList>,
|
||||
// $FlowExpectedError[unclear-type]
|
||||
SectionList<SectionBase<any>>,
|
||||
>);
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#import <React/RCTFabricSurface.h>
|
||||
#import <React/RCTSurfaceHostingProxyRootView.h>
|
||||
#import <React/RCTSurfacePresenter.h>
|
||||
#import <ReactCommon/RCTContextContainerHandling.h>
|
||||
#if USE_HERMES
|
||||
#import <ReactCommon/RCTHermesInstance.h>
|
||||
#else
|
||||
@@ -35,7 +34,6 @@
|
||||
#import <ReactCommon/RCTHost+Internal.h>
|
||||
#import <ReactCommon/RCTHost.h>
|
||||
#import <ReactCommon/RCTTurboModuleManager.h>
|
||||
#import <react/config/ReactNativeConfig.h>
|
||||
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
||||
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
||||
#import <react/runtime/JSRuntimeFactory.h>
|
||||
@@ -99,13 +97,8 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTRootViewFactory () <RCTContextContainerHandling> {
|
||||
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
||||
facebook::react::ContextContainer::Shared _contextContainer;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface RCTRootViewFactory () <RCTCxxBridgeDelegate> {
|
||||
facebook::react::ContextContainer::Shared _contextContainer;
|
||||
std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
|
||||
}
|
||||
@end
|
||||
@@ -124,8 +117,6 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
_configuration = configuration;
|
||||
_hostDelegate = hostdelegate;
|
||||
_contextContainer = std::make_shared<const facebook::react::ContextContainer>();
|
||||
_reactNativeConfig = std::make_shared<const facebook::react::EmptyReactNativeConfig>();
|
||||
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||
_turboModuleManagerDelegate = turboModuleManagerDelegate;
|
||||
}
|
||||
return self;
|
||||
@@ -281,7 +272,6 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
[reactHost setBundleURLProvider:^NSURL *() {
|
||||
return [weakSelf bundleURL];
|
||||
}];
|
||||
[reactHost setContextContainerHandler:self];
|
||||
[reactHost start];
|
||||
return reactHost;
|
||||
}
|
||||
@@ -289,18 +279,12 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
- (std::shared_ptr<facebook::react::JSRuntimeFactory>)createJSRuntimeFactory
|
||||
{
|
||||
#if USE_HERMES
|
||||
return std::make_shared<facebook::react::RCTHermesInstance>(
|
||||
_reactNativeConfig, nullptr, /* allocInOldGenBeforeTTI */ false);
|
||||
return std::make_shared<facebook::react::RCTHermesInstance>(nullptr, nullptr, /* allocInOldGenBeforeTTI */ false);
|
||||
#else
|
||||
return std::make_shared<facebook::react::RCTJscInstance>();
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)didCreateContextContainer:(std::shared_ptr<facebook::react::ContextContainer>)contextContainer
|
||||
{
|
||||
contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||
}
|
||||
|
||||
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
if (_configuration.extraModulesForBridge != nil) {
|
||||
|
||||
@@ -74,7 +74,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-RCTImage"
|
||||
s.dependency "React-CoreModules"
|
||||
s.dependency "React-nativeconfig"
|
||||
s.dependency "ReactCodegen"
|
||||
s.dependency "React-RCTFBReactNativeSpec"
|
||||
s.dependency "React-defaultsnativemodule"
|
||||
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
|
||||
@@ -57,7 +57,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-Core/RCTWebSocket"
|
||||
s.dependency "React-RCTNetwork"
|
||||
|
||||
add_dependency(s, "ReactCodegen")
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
|
||||
Vendored
-1
@@ -31,7 +31,6 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
||||
pagingEnabled: true,
|
||||
persistentScrollbar: true,
|
||||
horizontal: true,
|
||||
enableSyncOnScroll: true,
|
||||
scrollEnabled: true,
|
||||
scrollEventThrottle: true,
|
||||
scrollPerfTag: true,
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import type {
|
||||
TScrollViewNativeComponentInstance,
|
||||
TScrollViewNativeImperativeHandle,
|
||||
} from '../../../src/private/components/useSyncOnScroll';
|
||||
import type {HostInstance} from '../../Renderer/shims/ReactNativeTypes';
|
||||
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
|
||||
import type {PointProp} from '../../StyleSheet/PointPropType';
|
||||
@@ -46,7 +42,6 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
|
||||
import Dimensions from '../../Utilities/Dimensions';
|
||||
import dismissKeyboard from '../../Utilities/dismissKeyboard';
|
||||
import Platform from '../../Utilities/Platform';
|
||||
import EventEmitter from '../../vendor/emitter/EventEmitter';
|
||||
import Keyboard from '../Keyboard/Keyboard';
|
||||
import TextInputState from '../TextInput/TextInputState';
|
||||
import processDecelerationRate from './processDecelerationRate';
|
||||
@@ -152,7 +147,7 @@ export type DecelerationRateType = 'fast' | 'normal' | number;
|
||||
export type ScrollResponderType = ScrollViewImperativeMethods;
|
||||
|
||||
type PublicScrollViewInstance = $ReadOnly<{|
|
||||
...$Exact<TScrollViewNativeComponentInstance>,
|
||||
...HostInstance,
|
||||
...ScrollViewImperativeMethods,
|
||||
|}>;
|
||||
|
||||
@@ -743,10 +738,6 @@ class ScrollView extends React.Component<Props, State> {
|
||||
_subscriptionKeyboardDidShow: ?EventSubscription = null;
|
||||
_subscriptionKeyboardDidHide: ?EventSubscription = null;
|
||||
|
||||
#onScrollEmitter: ?EventEmitter<{
|
||||
scroll: [{x: number, y: number}],
|
||||
}> = null;
|
||||
|
||||
state: State = {
|
||||
layoutHeight: null,
|
||||
};
|
||||
@@ -817,8 +808,6 @@ class ScrollView extends React.Component<Props, State> {
|
||||
if (this._scrollAnimatedValueAttachment) {
|
||||
this._scrollAnimatedValueAttachment.detach();
|
||||
}
|
||||
|
||||
this.#onScrollEmitter?.removeAllListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -844,9 +833,8 @@ class ScrollView extends React.Component<Props, State> {
|
||||
return this._innerView.nativeInstance;
|
||||
};
|
||||
|
||||
getNativeScrollRef: () => TScrollViewNativeComponentInstance | null = () => {
|
||||
const {nativeInstance} = this._scrollView;
|
||||
return nativeInstance == null ? null : nativeInstance.componentRef.current;
|
||||
getNativeScrollRef: () => HostInstance | null = () => {
|
||||
return this._scrollView.nativeInstance;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -937,20 +925,6 @@ class ScrollView extends React.Component<Props, State> {
|
||||
Commands.flashScrollIndicators(component);
|
||||
};
|
||||
|
||||
_subscribeToOnScroll: (
|
||||
callback: ({x: number, y: number}) => void,
|
||||
) => EventSubscription = callback => {
|
||||
let onScrollEmitter = this.#onScrollEmitter;
|
||||
if (onScrollEmitter == null) {
|
||||
onScrollEmitter = new EventEmitter();
|
||||
this.#onScrollEmitter = onScrollEmitter;
|
||||
// This is the first subscription, so make sure the native component is
|
||||
// also configured to output synchronous scroll events.
|
||||
this._scrollView.nativeInstance?.unstable_setEnableSyncOnScroll(true);
|
||||
}
|
||||
return onScrollEmitter.addListener('scroll', callback);
|
||||
};
|
||||
|
||||
/**
|
||||
* This method should be used as the callback to onFocus in a TextInputs'
|
||||
* parent view. Note that any module using this mixin needs to return
|
||||
@@ -1154,11 +1128,6 @@ class ScrollView extends React.Component<Props, State> {
|
||||
_handleScroll = (e: ScrollEvent) => {
|
||||
this._observedScrollSinceBecomingResponder = true;
|
||||
this.props.onScroll && this.props.onScroll(e);
|
||||
|
||||
this.#onScrollEmitter?.emit('scroll', {
|
||||
x: e.nativeEvent.contentOffset.x,
|
||||
y: e.nativeEvent.contentOffset.y,
|
||||
});
|
||||
};
|
||||
|
||||
_handleLayout = (e: LayoutEvent) => {
|
||||
@@ -1181,45 +1150,36 @@ class ScrollView extends React.Component<Props, State> {
|
||||
(instance: InnerViewInstance): InnerViewInstance => instance,
|
||||
);
|
||||
|
||||
_scrollView: RefForwarder<
|
||||
TScrollViewNativeImperativeHandle,
|
||||
PublicScrollViewInstance | null,
|
||||
> = createRefForwarder(nativeImperativeHandle => {
|
||||
const nativeInstance = nativeImperativeHandle.componentRef.current;
|
||||
if (nativeInstance == null) {
|
||||
return null;
|
||||
}
|
||||
_scrollView: RefForwarder<HostInstance, PublicScrollViewInstance | null> =
|
||||
createRefForwarder(nativeInstance => {
|
||||
// This is a hack. Ideally we would forwardRef to the underlying
|
||||
// host component. However, since ScrollView has it's own methods that can be
|
||||
// called as well, if we used the standard forwardRef then these
|
||||
// methods wouldn't be accessible and thus be a breaking change.
|
||||
//
|
||||
// Therefore we edit ref to include ScrollView's public methods so that
|
||||
// they are callable from the ref.
|
||||
|
||||
// This is a hack. Ideally we would forwardRef to the underlying
|
||||
// host component. However, since ScrollView has it's own methods that can be
|
||||
// called as well, if we used the standard forwardRef then these
|
||||
// methods wouldn't be accessible and thus be a breaking change.
|
||||
//
|
||||
// Therefore we edit ref to include ScrollView's public methods so that
|
||||
// they are callable from the ref.
|
||||
// $FlowFixMe[prop-missing] - Known issue with appending custom methods.
|
||||
const publicInstance: PublicScrollViewInstance = Object.assign(
|
||||
nativeInstance,
|
||||
{
|
||||
getScrollResponder: this.getScrollResponder,
|
||||
getScrollableNode: this.getScrollableNode,
|
||||
getInnerViewNode: this.getInnerViewNode,
|
||||
getInnerViewRef: this.getInnerViewRef,
|
||||
getNativeScrollRef: this.getNativeScrollRef,
|
||||
scrollTo: this.scrollTo,
|
||||
scrollToEnd: this.scrollToEnd,
|
||||
flashScrollIndicators: this.flashScrollIndicators,
|
||||
scrollResponderZoomTo: this.scrollResponderZoomTo,
|
||||
scrollResponderScrollNativeHandleToKeyboard:
|
||||
this.scrollResponderScrollNativeHandleToKeyboard,
|
||||
},
|
||||
);
|
||||
|
||||
// $FlowFixMe[prop-missing] - Known issue with appending custom methods.
|
||||
const publicInstance: PublicScrollViewInstance = Object.assign(
|
||||
nativeInstance,
|
||||
{
|
||||
getScrollResponder: this.getScrollResponder,
|
||||
getScrollableNode: this.getScrollableNode,
|
||||
getInnerViewNode: this.getInnerViewNode,
|
||||
getInnerViewRef: this.getInnerViewRef,
|
||||
getNativeScrollRef: this.getNativeScrollRef,
|
||||
scrollTo: this.scrollTo,
|
||||
scrollToEnd: this.scrollToEnd,
|
||||
flashScrollIndicators: this.flashScrollIndicators,
|
||||
scrollResponderZoomTo: this.scrollResponderZoomTo,
|
||||
// TODO: Replace unstable_subscribeToOnScroll once scrollView.addEventListener('scroll', (e: ScrollEvent) => {}, {passive: false});
|
||||
unstable_subscribeToOnScroll: this._subscribeToOnScroll,
|
||||
scrollResponderScrollNativeHandleToKeyboard:
|
||||
this.scrollResponderScrollNativeHandleToKeyboard,
|
||||
},
|
||||
);
|
||||
|
||||
return publicInstance;
|
||||
});
|
||||
return publicInstance;
|
||||
});
|
||||
|
||||
/**
|
||||
* Warning, this may be called several times for a single keyboard opening.
|
||||
@@ -1829,8 +1789,9 @@ class ScrollView extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
const refreshControl = this.props.refreshControl;
|
||||
const scrollViewRef: React.RefSetter<TScrollViewNativeImperativeHandle | null> =
|
||||
this._scrollView.getForwardingRef(this.props.scrollViewRef);
|
||||
const scrollViewRef = this._scrollView.getForwardingRef(
|
||||
this.props.scrollViewRef,
|
||||
);
|
||||
|
||||
if (refreshControl) {
|
||||
if (Platform.OS === 'ios') {
|
||||
|
||||
-2
@@ -45,7 +45,6 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
||||
diff: require('../../Utilities/differ/pointsDiffer'),
|
||||
},
|
||||
decelerationRate: true,
|
||||
enableSyncOnScroll: true, // Fabric only.
|
||||
disableIntervalMomentum: true,
|
||||
maintainVisibleContentPosition: true,
|
||||
pagingEnabled: true,
|
||||
@@ -135,7 +134,6 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
||||
contentInsetAdjustmentBehavior: true,
|
||||
decelerationRate: true,
|
||||
endDraggingSensitivityMultiplier: true,
|
||||
enableSyncOnScroll: true, // Fabric only.
|
||||
directionalLockEnabled: true,
|
||||
disableIntervalMomentum: true,
|
||||
indicatorStyle: true,
|
||||
|
||||
-1
@@ -301,7 +301,6 @@ const ScrollViewStickyHeaderWithForwardedRef: component(
|
||||
const styles = StyleSheet.create({
|
||||
header: {
|
||||
zIndex: 10,
|
||||
position: 'relative',
|
||||
},
|
||||
fill: {
|
||||
flex: 1,
|
||||
|
||||
@@ -211,4 +211,11 @@ export interface ViewProps
|
||||
* Used to reference react managed views from native code.
|
||||
*/
|
||||
nativeID?: string | undefined;
|
||||
|
||||
/**
|
||||
* Contols whether this view, and its transitive children, are laid in a way
|
||||
* consistent with web browsers ('strict'), or consistent with existing
|
||||
* React Native code which may rely on incorrect behavior ('classic').
|
||||
*/
|
||||
experimental_layoutConformance?: 'strict' | 'classic' | undefined;
|
||||
}
|
||||
|
||||
@@ -177,10 +177,7 @@ function reactConsoleErrorHandler(...args) {
|
||||
if (!console.reportErrorsAsExceptions) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
inExceptionHandler ||
|
||||
(global.RN$inExceptionHandler && global.RN$inExceptionHandler())
|
||||
) {
|
||||
if (inExceptionHandler || global.RN$inExceptionHandler?.()) {
|
||||
// The fundamental trick here is that are multiple entry point to logging errors:
|
||||
// (see D19743075 for more background)
|
||||
//
|
||||
|
||||
+20
-18
@@ -10,24 +10,26 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Sets up the console and exception handling (redbox) for React Native.
|
||||
* You can use this module directly, or just require InitializeCore.
|
||||
*/
|
||||
const ExceptionsManager = require('./ExceptionsManager');
|
||||
ExceptionsManager.installConsoleErrorReporter();
|
||||
if (global.RN$useAlwaysAvailableJSErrorHandling !== true) {
|
||||
/**
|
||||
* Sets up the console and exception handling (redbox) for React Native.
|
||||
* You can use this module directly, or just require InitializeCore.
|
||||
*/
|
||||
const ExceptionsManager = require('./ExceptionsManager');
|
||||
ExceptionsManager.installConsoleErrorReporter();
|
||||
|
||||
// Set up error handler
|
||||
if (!global.__fbDisableExceptionsManager) {
|
||||
const handleError = (e: mixed, isFatal: boolean) => {
|
||||
try {
|
||||
ExceptionsManager.handleException(e, isFatal);
|
||||
} catch (ee) {
|
||||
console.log('Failed to print error: ', ee.message);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
// Set up error handler
|
||||
if (!global.__fbDisableExceptionsManager) {
|
||||
const handleError = (e: mixed, isFatal: boolean) => {
|
||||
try {
|
||||
ExceptionsManager.handleException(e, isFatal);
|
||||
} catch (ee) {
|
||||
console.log('Failed to print error: ', ee.message);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
||||
const ErrorUtils = require('../vendor/core/ErrorUtils');
|
||||
ErrorUtils.setGlobalHandler(handleError);
|
||||
const ErrorUtils = require('../vendor/core/ErrorUtils');
|
||||
ErrorUtils.setGlobalHandler(handleError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +200,8 @@ export interface ImagePropsBase
|
||||
* 'center': Scale the image down so that it is completely visible,
|
||||
* if bigger than the area of the view.
|
||||
* The image will not be scaled up.
|
||||
*
|
||||
* 'none': Do not resize the image. The image will be displayed at its intrinsic size.
|
||||
*/
|
||||
resizeMode?: ImageResizeMode | undefined;
|
||||
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@ import type {
|
||||
} from '../StyleSheet/StyleSheet';
|
||||
import type {LayoutEvent, SyntheticEvent} from '../Types/CoreEventTypes';
|
||||
import typeof Image from './Image';
|
||||
import type {ImageResizeMode} from './ImageResizeMode';
|
||||
import type {ImageSource} from './ImageSource';
|
||||
import type {ElementRef, Node, RefSetter} from 'react';
|
||||
|
||||
@@ -234,7 +235,7 @@ export type ImageProps = $ReadOnly<{|
|
||||
*
|
||||
* See https://reactnative.dev/docs/image#resizemode
|
||||
*/
|
||||
resizeMode?: ?('cover' | 'contain' | 'stretch' | 'repeat' | 'center'),
|
||||
resizeMode?: ?ImageResizeMode,
|
||||
|
||||
/**
|
||||
* A unique identifier for this element to be used in UI Automation
|
||||
|
||||
@@ -12,7 +12,8 @@ export type ImageResizeMode =
|
||||
| 'contain'
|
||||
| 'stretch'
|
||||
| 'repeat'
|
||||
| 'center';
|
||||
| 'center'
|
||||
| 'none';
|
||||
|
||||
/**
|
||||
* @see ImageResizeMode.js
|
||||
@@ -46,4 +47,10 @@ export interface ImageResizeModeStatic {
|
||||
* image will keep it's size and aspect ratio.
|
||||
*/
|
||||
repeat: ImageResizeMode;
|
||||
|
||||
/**
|
||||
* none - The image will be displayed at its intrinsic size, which means the
|
||||
* image will not be scaled up or down.
|
||||
*/
|
||||
none: ImageResizeMode;
|
||||
}
|
||||
|
||||
@@ -33,4 +33,7 @@ export type ImageResizeMode =
|
||||
|
||||
// Resize by stretching it to fill the entire frame of the view without
|
||||
// clipping. This may change the aspect ratio of the image, distorting it.
|
||||
| 'stretch';
|
||||
| 'stretch'
|
||||
|
||||
// The image will not be resized at all.
|
||||
| 'none';
|
||||
|
||||
+6
-3
@@ -8,15 +8,18 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
type ResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
||||
import type {ImageResizeMode} from './ImageResizeMode';
|
||||
|
||||
const objectFitMap: {[string]: ResizeMode} = {
|
||||
const objectFitMap: {[string]: ImageResizeMode} = {
|
||||
contain: 'contain',
|
||||
cover: 'cover',
|
||||
fill: 'stretch',
|
||||
'scale-down': 'contain',
|
||||
none: 'none',
|
||||
};
|
||||
|
||||
export function convertObjectFitToResizeMode(objectFit: ?string): ?ResizeMode {
|
||||
export function convertObjectFitToResizeMode(
|
||||
objectFit: ?string,
|
||||
): ?ImageResizeMode {
|
||||
return objectFit != null ? objectFitMap[objectFit] : undefined;
|
||||
}
|
||||
|
||||
@@ -477,10 +477,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
|
||||
|
||||
// Add missing png extension
|
||||
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
||||
NSURL *pngRequestURL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:pngRequestURL.path]) {
|
||||
mutableRequest.URL = pngRequestURL;
|
||||
}
|
||||
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
}
|
||||
if (_redirectDelegate != nil) {
|
||||
mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL];
|
||||
|
||||
@@ -85,6 +85,7 @@ CGRect RCTTargetRect(CGSize sourceSize, CGSize destSize, CGFloat destScale, RCTR
|
||||
switch (resizeMode) {
|
||||
case RCTResizeModeStretch:
|
||||
case RCTResizeModeRepeat:
|
||||
case RCTResizeModeNone:
|
||||
|
||||
return (CGRect){CGPointZero, RCTCeilSize(destSize, destScale)};
|
||||
|
||||
@@ -249,6 +250,7 @@ BOOL RCTUpscalingRequired(
|
||||
|
||||
case RCTResizeModeRepeat:
|
||||
case RCTResizeModeCenter:
|
||||
case RCTResizeModeNone:
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, RCTResizeMode) {
|
||||
RCTResizeModeStretch = UIViewContentModeScaleToFill,
|
||||
RCTResizeModeCenter = UIViewContentModeCenter,
|
||||
RCTResizeModeRepeat = -1, // Use negative values to avoid conflicts with iOS enum values.
|
||||
RCTResizeModeNone = UIViewContentModeTopLeft,
|
||||
};
|
||||
|
||||
static inline RCTResizeMode RCTResizeModeFromUIViewContentMode(UIViewContentMode mode)
|
||||
@@ -30,12 +31,14 @@ static inline RCTResizeMode RCTResizeModeFromUIViewContentMode(UIViewContentMode
|
||||
case UIViewContentModeCenter:
|
||||
return RCTResizeModeCenter;
|
||||
break;
|
||||
case UIViewContentModeTopLeft:
|
||||
return RCTResizeModeNone;
|
||||
break;
|
||||
case UIViewContentModeRedraw:
|
||||
case UIViewContentModeTop:
|
||||
case UIViewContentModeBottom:
|
||||
case UIViewContentModeLeft:
|
||||
case UIViewContentModeRight:
|
||||
case UIViewContentModeTopLeft:
|
||||
case UIViewContentModeTopRight:
|
||||
case UIViewContentModeBottomLeft:
|
||||
case UIViewContentModeBottomRight:
|
||||
|
||||
@@ -17,6 +17,7 @@ RCT_ENUM_CONVERTER(
|
||||
@"stretch" : @(RCTResizeModeStretch),
|
||||
@"center" : @(RCTResizeModeCenter),
|
||||
@"repeat" : @(RCTResizeModeRepeat),
|
||||
@"none" : @(RCTResizeModeNone),
|
||||
}),
|
||||
RCTResizeModeStretch,
|
||||
integerValue)
|
||||
|
||||
@@ -53,7 +53,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-Core/RCTImageHeaders"
|
||||
s.dependency "React-RCTNetwork"
|
||||
|
||||
add_dependency(s, "ReactCodegen")
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
import type {Task} from './TaskQueue';
|
||||
|
||||
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import EventEmitter from '../vendor/emitter/EventEmitter';
|
||||
|
||||
const BatchedBridge = require('../BatchedBridge/BatchedBridge');
|
||||
@@ -208,4 +209,8 @@ function _processUpdate() {
|
||||
_deleteInteractionSet.clear();
|
||||
}
|
||||
|
||||
module.exports = InteractionManager;
|
||||
module.exports = (
|
||||
ReactNativeFeatureFlags.disableInteractionManager()
|
||||
? require('./InteractionManagerStub')
|
||||
: InteractionManager
|
||||
) as typeof InteractionManager;
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {EventSubscription} from '../vendor/emitter/EventEmitter';
|
||||
|
||||
const invariant = require('invariant');
|
||||
|
||||
export type Handle = number;
|
||||
|
||||
type Task =
|
||||
| {
|
||||
name: string,
|
||||
run: () => void,
|
||||
}
|
||||
| {
|
||||
name: string,
|
||||
gen: () => Promise<void>,
|
||||
}
|
||||
| (() => void);
|
||||
|
||||
/**
|
||||
* InteractionManager allows long-running work to be scheduled after any
|
||||
* interactions/animations have completed. In particular, this allows JavaScript
|
||||
* animations to run smoothly.
|
||||
*
|
||||
* Applications can schedule tasks to run after interactions with the following:
|
||||
*
|
||||
* ```
|
||||
* InteractionManager.runAfterInteractions(() => {
|
||||
* // ...long-running synchronous task...
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Compare this to other scheduling alternatives:
|
||||
*
|
||||
* - requestAnimationFrame(): for code that animates a view over time.
|
||||
* - setImmediate/setTimeout(): run code later, note this may delay animations.
|
||||
* - runAfterInteractions(): run code later, without delaying active animations.
|
||||
*
|
||||
* The touch handling system considers one or more active touches to be an
|
||||
* 'interaction' and will delay `runAfterInteractions()` callbacks until all
|
||||
* touches have ended or been cancelled.
|
||||
*
|
||||
* InteractionManager also allows applications to register animations by
|
||||
* creating an interaction 'handle' on animation start, and clearing it upon
|
||||
* completion:
|
||||
*
|
||||
* ```
|
||||
* var handle = InteractionManager.createInteractionHandle();
|
||||
* // run animation... (`runAfterInteractions` tasks are queued)
|
||||
* // later, on animation completion:
|
||||
* InteractionManager.clearInteractionHandle(handle);
|
||||
* // queued tasks run if all handles were cleared
|
||||
* ```
|
||||
*
|
||||
* `runAfterInteractions` takes either a plain callback function, or a
|
||||
* `PromiseTask` object with a `gen` method that returns a `Promise`. If a
|
||||
* `PromiseTask` is supplied, then it is fully resolved (including asynchronous
|
||||
* dependencies that also schedule more tasks via `runAfterInteractions`) before
|
||||
* starting on the next task that might have been queued up synchronously
|
||||
* earlier.
|
||||
*
|
||||
* By default, queued tasks are executed together in a loop in one
|
||||
* `setImmediate` batch. If `setDeadline` is called with a positive number, then
|
||||
* tasks will only be executed until the deadline (in terms of js event loop run
|
||||
* time) approaches, at which point execution will yield via setTimeout,
|
||||
* allowing events such as touches to start interactions and block queued tasks
|
||||
* from executing, making apps more responsive.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
const InteractionManagerStub = {
|
||||
Events: {
|
||||
interactionStart: 'interactionStart',
|
||||
interactionComplete: 'interactionComplete',
|
||||
},
|
||||
|
||||
/**
|
||||
* Schedule a function to run after all interactions have completed. Returns a cancellable
|
||||
* "promise".
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
runAfterInteractions(task: ?Task): {
|
||||
then: <U>(
|
||||
onFulfill?: ?(void) => ?(Promise<U> | U),
|
||||
onReject?: ?(error: mixed) => ?(Promise<U> | U),
|
||||
) => Promise<U>,
|
||||
cancel: () => void,
|
||||
...
|
||||
} {
|
||||
let immediateID: ?$FlowIssue;
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
immediateID = setImmediate(() => {
|
||||
if (typeof task === 'object' && task !== null) {
|
||||
if (typeof task.gen === 'function') {
|
||||
task.gen().then(resolve, reject);
|
||||
} else if (typeof task.run === 'function') {
|
||||
try {
|
||||
task.run();
|
||||
resolve();
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
} else {
|
||||
reject(new TypeError(`Task "${task.name}" missing gen or run.`));
|
||||
}
|
||||
} else if (typeof task === 'function') {
|
||||
try {
|
||||
task();
|
||||
resolve();
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
} else {
|
||||
reject(new TypeError('Invalid task of type: ' + typeof task));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
then: promise.then.bind(promise),
|
||||
cancel() {
|
||||
clearImmediate(immediateID);
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Notify manager that an interaction has started.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
createInteractionHandle(): Handle {
|
||||
return -1;
|
||||
},
|
||||
|
||||
/**
|
||||
* Notify manager that an interaction has completed.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
clearInteractionHandle(handle: Handle) {
|
||||
invariant(!!handle, 'InteractionManager: Must provide a handle to clear.');
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
addListener(): EventSubscription {
|
||||
return {
|
||||
remove() {},
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* A positive number will use setTimeout to schedule any tasks after the
|
||||
* eventLoopRunningTime hits the deadline value, otherwise all tasks will be
|
||||
* executed in one setImmediate batch (default).
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
setDeadline(deadline: number) {
|
||||
// Do nothing.
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = InteractionManagerStub;
|
||||
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "ReactCommon/turbomodule/core", version
|
||||
s.dependency "React-jsi", version
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
end
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ if (__DEV__) {
|
||||
if (global.RN$registerExceptionListener != null) {
|
||||
global.RN$registerExceptionListener(
|
||||
(error: ExtendedExceptionData & {preventDefault: () => mixed}) => {
|
||||
if (!error.isFatal) {
|
||||
if (global.RN$isRuntimeReady?.() || !error.isFatal) {
|
||||
error.preventDefault();
|
||||
addException(error);
|
||||
}
|
||||
|
||||
@@ -101,6 +101,11 @@ export interface ModalPropsAndroid {
|
||||
* Determines whether your modal should go under the system statusbar.
|
||||
*/
|
||||
statusBarTranslucent?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Determines whether your modal should go under the system navigationbar.
|
||||
*/
|
||||
navigationBarTranslucent?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type ModalProps = ModalBaseProps &
|
||||
|
||||
+17
@@ -95,6 +95,14 @@ export type Props = $ReadOnly<{|
|
||||
*/
|
||||
statusBarTranslucent?: ?boolean,
|
||||
|
||||
/**
|
||||
* The `navigationBarTranslucent` prop determines whether your modal should go under
|
||||
* the system navigationbar.
|
||||
*
|
||||
* See https://reactnative.dev/docs/modal.html#navigationbartranslucent-android
|
||||
*/
|
||||
navigationBarTranslucent?: ?boolean,
|
||||
|
||||
/**
|
||||
* The `hardwareAccelerated` prop controls whether to force hardware
|
||||
* acceleration for the underlying window.
|
||||
@@ -176,6 +184,14 @@ function confirmProps(props: Props) {
|
||||
`Modal with '${props.presentationStyle}' presentation style and 'transparent' value is not supported.`,
|
||||
);
|
||||
}
|
||||
if (
|
||||
props.navigationBarTranslucent === true &&
|
||||
props.statusBarTranslucent !== true
|
||||
) {
|
||||
console.warn(
|
||||
'Modal with translucent navigation bar and without translucent status bar is not supported.',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +317,7 @@ class Modal extends React.Component<Props, State> {
|
||||
onDismiss={onDismiss}
|
||||
visible={this.props.visible}
|
||||
statusBarTranslucent={this.props.statusBarTranslucent}
|
||||
navigationBarTranslucent={this.props.navigationBarTranslucent}
|
||||
identifier={this._identifier}
|
||||
style={styles.modal}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
|
||||
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-Core/RCTAnimationHeaders"
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
end
|
||||
|
||||
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-Core/RCTNetworkHeaders"
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
end
|
||||
|
||||
+49
-2
@@ -66,11 +66,58 @@ export interface PermissionsAndroidStatic {
|
||||
/**
|
||||
* A list of permission results that are returned
|
||||
*/
|
||||
RESULTS: {[key: string]: PermissionStatus};
|
||||
RESULTS: {
|
||||
[key in 'GRANTED' | 'DENIED' | 'NEVER_ASK_AGAIN']: PermissionStatus;
|
||||
};
|
||||
/**
|
||||
* A list of specified "dangerous" permissions that require prompting the user
|
||||
*/
|
||||
PERMISSIONS: {[key: string]: Permission};
|
||||
PERMISSIONS: {
|
||||
[key in
|
||||
| 'READ_CALENDAR'
|
||||
| 'WRITE_CALENDAR'
|
||||
| 'CAMERA'
|
||||
| 'READ_CONTACTS'
|
||||
| 'WRITE_CONTACTS'
|
||||
| 'GET_ACCOUNTS'
|
||||
| 'ACCESS_FINE_LOCATION'
|
||||
| 'ACCESS_COARSE_LOCATION'
|
||||
| 'ACCESS_BACKGROUND_LOCATION'
|
||||
| 'RECORD_AUDIO'
|
||||
| 'READ_PHONE_STATE'
|
||||
| 'CALL_PHONE'
|
||||
| 'READ_CALL_LOG'
|
||||
| 'WRITE_CALL_LOG'
|
||||
| 'ADD_VOICEMAIL'
|
||||
| 'READ_VOICEMAIL'
|
||||
| 'WRITE_VOICEMAIL'
|
||||
| 'USE_SIP'
|
||||
| 'PROCESS_OUTGOING_CALLS'
|
||||
| 'BODY_SENSORS'
|
||||
| 'BODY_SENSORS_BACKGROUND'
|
||||
| 'SEND_SMS'
|
||||
| 'RECEIVE_SMS'
|
||||
| 'READ_SMS'
|
||||
| 'RECEIVE_WAP_PUSH'
|
||||
| 'RECEIVE_MMS'
|
||||
| 'READ_EXTERNAL_STORAGE'
|
||||
| 'READ_MEDIA_IMAGES'
|
||||
| 'READ_MEDIA_VIDEO'
|
||||
| 'READ_MEDIA_AUDIO'
|
||||
| 'READ_MEDIA_VISUAL_USER_SELECTED'
|
||||
| 'WRITE_EXTERNAL_STORAGE'
|
||||
| 'BLUETOOTH_CONNECT'
|
||||
| 'BLUETOOTH_SCAN'
|
||||
| 'BLUETOOTH_ADVERTISE'
|
||||
| 'ACCESS_MEDIA_LOCATION'
|
||||
| 'ACCEPT_HANDOVER'
|
||||
| 'ACTIVITY_RECOGNITION'
|
||||
| 'ANSWER_PHONE_CALLS'
|
||||
| 'READ_PHONE_NUMBERS'
|
||||
| 'UWB_RANGING'
|
||||
| 'POST_NOTIFICATIONS'
|
||||
| 'NEARBY_WIFI_DEVICES']: Permission;
|
||||
};
|
||||
new (): PermissionsAndroidStatic;
|
||||
/**
|
||||
* @deprecated Use check instead
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-Core/RCTPushNotificationHeaders"
|
||||
s.dependency "React-jsi"
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
end
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const createReactNativeComponentClass = require('../Renderer/shims/createReactNativeComponentClass');
|
||||
|
||||
module.exports = {
|
||||
createReactNativeComponentClass,
|
||||
};
|
||||
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-Core/RCTSettingsHeaders"
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
end
|
||||
|
||||
@@ -434,6 +434,12 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
||||
cursor?: CursorValue | undefined;
|
||||
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
||||
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
||||
|
||||
mixBlendMode?: BlendMode | undefined;
|
||||
experimental_backgroundImage?:
|
||||
| ReadonlyArray<GradientValue>
|
||||
| string
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export type FontVariant =
|
||||
@@ -562,6 +568,6 @@ export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
||||
overlayColor?: ColorValue | undefined;
|
||||
tintColor?: ColorValue | undefined;
|
||||
opacity?: AnimatableNumericValue | undefined;
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined;
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined;
|
||||
cursor?: CursorValue | undefined;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import type AnimatedNode from '../Animated/nodes/AnimatedNode';
|
||||
import type {ImageResizeMode} from './../Image/ImageResizeMode';
|
||||
import type {
|
||||
____DangerouslyImpreciseStyle_InternalOverrides,
|
||||
____ImageStyle_InternalOverrides,
|
||||
@@ -941,8 +942,8 @@ export type ____TextStyle_Internal = $ReadOnly<{
|
||||
|
||||
export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
@@ -954,8 +955,8 @@ export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
|
||||
export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____TextStyle_Internal>,
|
||||
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../Components/UnimplementedViews/UnimplementedView');
|
||||
|
||||
type BackPressEventName = 'backPress' | 'hardwareBackPress';
|
||||
|
||||
function emptyFunction(): void {}
|
||||
|
||||
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-Core/RCTVibrationHeaders"
|
||||
|
||||
add_dependency(s, "ReactCodegen", :additional_framework_paths => ["build/generated/ios"])
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
end
|
||||
|
||||
@@ -707,7 +707,7 @@ declare export default typeof AnimatedScrollView;
|
||||
exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedSectionList.js 1`] = `
|
||||
"declare export default AnimatedComponentType<
|
||||
React.ElementConfig<typeof SectionList>,
|
||||
React.ElementRef<typeof SectionList>,
|
||||
SectionList<SectionBase<any>>,
|
||||
>;
|
||||
"
|
||||
`;
|
||||
@@ -2042,7 +2042,7 @@ exports[`public API should not change unintentionally Libraries/Components/Scrol
|
||||
export type DecelerationRateType = \\"fast\\" | \\"normal\\" | number;
|
||||
export type ScrollResponderType = ScrollViewImperativeMethods;
|
||||
type PublicScrollViewInstance = $ReadOnly<{|
|
||||
...$Exact<TScrollViewNativeComponentInstance>,
|
||||
...HostInstance,
|
||||
...ScrollViewImperativeMethods,
|
||||
|}>;
|
||||
type InnerViewInstance = React.ElementRef<View>;
|
||||
@@ -2169,7 +2169,7 @@ declare class ScrollView extends React.Component<Props, State> {
|
||||
getScrollableNode: () => ?number;
|
||||
getInnerViewNode: () => ?number;
|
||||
getInnerViewRef: () => InnerViewInstance | null;
|
||||
getNativeScrollRef: () => TScrollViewNativeComponentInstance | null;
|
||||
getNativeScrollRef: () => HostInstance | null;
|
||||
scrollTo: (
|
||||
options?:
|
||||
| {
|
||||
@@ -2184,9 +2184,6 @@ declare class ScrollView extends React.Component<Props, State> {
|
||||
) => void;
|
||||
scrollToEnd: (options?: ?{ animated?: boolean, ... }) => void;
|
||||
flashScrollIndicators: () => void;
|
||||
_subscribeToOnScroll: (
|
||||
callback: ({ x: number, y: number }) => void
|
||||
) => EventSubscription;
|
||||
scrollResponderScrollNativeHandleToKeyboard: (
|
||||
nodeHandle: number | HostInstance,
|
||||
additionalOffset?: number,
|
||||
@@ -2224,10 +2221,7 @@ declare class ScrollView extends React.Component<Props, State> {
|
||||
_handleLayout: $FlowFixMe;
|
||||
_handleContentOnLayout: $FlowFixMe;
|
||||
_innerView: RefForwarder<InnerViewInstance, InnerViewInstance>;
|
||||
_scrollView: RefForwarder<
|
||||
TScrollViewNativeImperativeHandle,
|
||||
PublicScrollViewInstance | null,
|
||||
>;
|
||||
_scrollView: RefForwarder<HostInstance, PublicScrollViewInstance | null>;
|
||||
scrollResponderKeyboardWillShow: (e: KeyboardEvent) => void;
|
||||
scrollResponderKeyboardWillHide: (e: KeyboardEvent) => void;
|
||||
scrollResponderKeyboardDidShow: (e: KeyboardEvent) => void;
|
||||
@@ -4869,7 +4863,7 @@ export type ImageProps = $ReadOnly<{|
|
||||
| \\"strict-origin-when-cross-origin\\"
|
||||
| \\"unsafe-url\\"
|
||||
),
|
||||
resizeMode?: ?(\\"cover\\" | \\"contain\\" | \\"stretch\\" | \\"repeat\\" | \\"center\\"),
|
||||
resizeMode?: ?ImageResizeMode,
|
||||
testID?: ?string,
|
||||
tintColor?: ColorValue,
|
||||
src?: ?string,
|
||||
@@ -4892,7 +4886,8 @@ exports[`public API should not change unintentionally Libraries/Image/ImageResiz
|
||||
| \\"contain\\"
|
||||
| \\"cover\\"
|
||||
| \\"repeat\\"
|
||||
| \\"stretch\\";
|
||||
| \\"stretch\\"
|
||||
| \\"none\\";
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -4989,10 +4984,9 @@ export type { ImageProps } from \\"./ImageProps\\";
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Image/ImageUtils.js 1`] = `
|
||||
"type ResizeMode = \\"cover\\" | \\"contain\\" | \\"stretch\\" | \\"repeat\\" | \\"center\\";
|
||||
declare export function convertObjectFitToResizeMode(
|
||||
"declare export function convertObjectFitToResizeMode(
|
||||
objectFit: ?string
|
||||
): ?ResizeMode;
|
||||
): ?ImageResizeMode;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -5341,7 +5335,41 @@ declare const InteractionManager: {
|
||||
addListener: $FlowFixMe,
|
||||
setDeadline(deadline: number): void,
|
||||
};
|
||||
declare module.exports: InteractionManager;
|
||||
declare module.exports: typeof InteractionManager;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Interaction/InteractionManagerStub.js 1`] = `
|
||||
"export type Handle = number;
|
||||
type Task =
|
||||
| {
|
||||
name: string,
|
||||
run: () => void,
|
||||
}
|
||||
| {
|
||||
name: string,
|
||||
gen: () => Promise<void>,
|
||||
}
|
||||
| (() => void);
|
||||
declare const InteractionManagerStub: {
|
||||
Events: {
|
||||
interactionStart: \\"interactionStart\\",
|
||||
interactionComplete: \\"interactionComplete\\",
|
||||
},
|
||||
runAfterInteractions(task: ?Task): {
|
||||
then: <U>(
|
||||
onFulfill?: ?(void) => ?(Promise<U> | U),
|
||||
onReject?: ?(error: mixed) => ?(Promise<U> | U)
|
||||
) => Promise<U>,
|
||||
cancel: () => void,
|
||||
...
|
||||
},
|
||||
createInteractionHandle(): Handle,
|
||||
clearInteractionHandle(handle: Handle): void,
|
||||
addListener(): EventSubscription,
|
||||
setDeadline(deadline: number): void,
|
||||
};
|
||||
declare module.exports: InteractionManagerStub;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -6411,6 +6439,7 @@ export type Props = $ReadOnly<{|
|
||||
),
|
||||
transparent?: ?boolean,
|
||||
statusBarTranslucent?: ?boolean,
|
||||
navigationBarTranslucent?: ?boolean,
|
||||
hardwareAccelerated?: ?boolean,
|
||||
visible?: ?boolean,
|
||||
onRequestClose?: ?DirectEventHandler<null>,
|
||||
@@ -7525,14 +7554,6 @@ declare module.exports: UIManagerJS;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricInternals.js 1`] = `
|
||||
"declare const createReactNativeComponentClass: $FlowFixMe;
|
||||
declare module.exports: {
|
||||
createReactNativeComponentClass: createReactNativeComponentClass,
|
||||
};
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js 1`] = `
|
||||
"declare export default class ReactFabricHostComponent
|
||||
implements INativeMethods
|
||||
@@ -8261,8 +8282,8 @@ export type ____TextStyle_Internal = $ReadOnly<{
|
||||
}>;
|
||||
export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
resizeMode?: \\"contain\\" | \\"cover\\" | \\"stretch\\" | \\"center\\" | \\"repeat\\",
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\",
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
@@ -8272,8 +8293,8 @@ export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
}>;
|
||||
export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____TextStyle_Internal>,
|
||||
resizeMode?: \\"contain\\" | \\"cover\\" | \\"stretch\\" | \\"center\\" | \\"repeat\\",
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\",
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
|
||||
@@ -207,7 +207,7 @@ class RCTBridgeHostTargetDelegate : public facebook::react::jsinspector_modern::
|
||||
void onReload(const PageReloadRequest &request) override
|
||||
{
|
||||
RCTAssertMainQueue();
|
||||
[bridge_ reload];
|
||||
RCTTriggerReloadCommandListeners(@"Reloading due to PageReloadRequest from DevTools.");
|
||||
}
|
||||
|
||||
void onSetPausedInDebuggerMessage(const OverlaySetPausedInDebuggerMessageRequest &request) override
|
||||
|
||||
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
stack:(nullable NSArray *)stack
|
||||
exceptionId:(NSNumber *)exceptionId
|
||||
extraDataAsJSON:(nullable NSString *)extraDataAsJSON;
|
||||
|
||||
@optional
|
||||
- (NSDictionary<NSString *, id> *)decorateJSExceptionData:(NSDictionary<NSString *, id> *)exceptionData;
|
||||
@end
|
||||
|
||||
@interface RCTExceptionsManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@@ -83,6 +83,7 @@ RCT_EXPORT_MODULE()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77
|
||||
RCT_EXPORT_METHOD(reportSoftException
|
||||
: (NSString *)message stack
|
||||
: (NSArray<NSDictionary *> *)stack exceptionId
|
||||
@@ -91,6 +92,7 @@ RCT_EXPORT_METHOD(reportSoftException
|
||||
[self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:nil];
|
||||
}
|
||||
|
||||
// TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77
|
||||
RCT_EXPORT_METHOD(reportFatalException
|
||||
: (NSString *)message stack
|
||||
: (NSArray<NSDictionary *> *)stack exceptionId
|
||||
@@ -103,15 +105,24 @@ RCT_EXPORT_METHOD(dismissRedbox) {}
|
||||
|
||||
RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData &)data)
|
||||
{
|
||||
NSString *message = data.message();
|
||||
double exceptionId = data.id_();
|
||||
NSMutableDictionary<NSString *, id> *mutableErrorData = [NSMutableDictionary new];
|
||||
mutableErrorData[@"message"] = data.message();
|
||||
if (data.originalMessage()) {
|
||||
mutableErrorData[@"originalMessage"] = data.originalMessage();
|
||||
}
|
||||
if (data.name()) {
|
||||
mutableErrorData[@"name"] = data.name();
|
||||
}
|
||||
if (data.componentStack()) {
|
||||
mutableErrorData[@"componentStack"] = data.componentStack();
|
||||
}
|
||||
|
||||
// Reserialize data.stack() into an array of untyped dictionaries.
|
||||
// TODO: (moti) T53588496 Replace `(NSArray<NSDictionary *> *)stack` in
|
||||
// reportFatalException etc with a typed interface.
|
||||
NSMutableArray<NSDictionary *> *stackArray = [NSMutableArray<NSDictionary *> new];
|
||||
NSMutableArray<NSDictionary<NSString *, id> *> *stackArray = [NSMutableArray<NSDictionary<NSString *, id> *> new];
|
||||
for (auto frame : data.stack()) {
|
||||
NSMutableDictionary *frameDict = [NSMutableDictionary new];
|
||||
NSMutableDictionary<NSString *, id> *frameDict = [NSMutableDictionary new];
|
||||
if (frame.column().has_value()) {
|
||||
frameDict[@"column"] = @(frame.column().value());
|
||||
}
|
||||
@@ -126,13 +137,28 @@ RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData
|
||||
[stackArray addObject:frameDict];
|
||||
}
|
||||
|
||||
NSDictionary *extraData = (NSDictionary *)data.extraData();
|
||||
NSString *extraDataAsJSON = RCTJSONStringify(extraData, NULL);
|
||||
mutableErrorData[@"stack"] = stackArray;
|
||||
mutableErrorData[@"id"] = @(data.id_());
|
||||
mutableErrorData[@"isFatal"] = @(data.isFatal());
|
||||
|
||||
if (data.isFatal()) {
|
||||
[self reportFatal:message stack:stackArray exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
if (data.extraData()) {
|
||||
mutableErrorData[@"extraData"] = data.extraData();
|
||||
}
|
||||
|
||||
NSDictionary<NSString *, id> *errorData = mutableErrorData;
|
||||
if ([_delegate respondsToSelector:@selector(decorateJSExceptionData:)]) {
|
||||
errorData = [_delegate decorateJSExceptionData:errorData];
|
||||
}
|
||||
|
||||
NSString *extraDataAsJSON = RCTJSONStringify(errorData[@"extraData"], NULL);
|
||||
NSString *message = errorData[@"message"];
|
||||
NSArray<NSDictionary<NSString *, id> *> *stack = errorData[@"stack"];
|
||||
double exceptionId = [errorData[@"id"] doubleValue];
|
||||
|
||||
if ([errorData[@"isFatal"] boolValue]) {
|
||||
[self reportFatal:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
} else {
|
||||
[self reportSoft:message stack:stackArray exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
[self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "SocketRocket", socket_rocket_version
|
||||
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
||||
|
||||
add_dependency(s, "ReactCodegen")
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
end
|
||||
|
||||
@@ -56,7 +56,11 @@
|
||||
UIButton *resumeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[resumeButton setImage:[UIImage systemImageNamed:@"forward.frame.fill"] forState:UIControlStateNormal];
|
||||
resumeButton.tintColor = [UIColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
|
||||
resumeButton.adjustsImageWhenDisabled = NO;
|
||||
|
||||
resumeButton.configurationUpdateHandler = ^(UIButton *button) {
|
||||
button.imageView.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
|
||||
};
|
||||
|
||||
resumeButton.enabled = NO;
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[resumeButton.widthAnchor constraintEqualToConstant:48],
|
||||
|
||||
+7
-20
@@ -618,31 +618,18 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
const auto &props = static_cast<const ScrollViewProps &>(*_props);
|
||||
auto scrollMetrics = [self _scrollViewMetrics];
|
||||
|
||||
if (props.enableSyncOnScroll) {
|
||||
[self _updateStateWithContentOffset];
|
||||
|
||||
NSTimeInterval now = CACurrentMediaTime();
|
||||
if ((_lastScrollEventDispatchTime == 0) || (now - _lastScrollEventDispatchTime > _scrollEventThrottle)) {
|
||||
_lastScrollEventDispatchTime = now;
|
||||
if (_eventEmitter) {
|
||||
const auto &eventEmitter = static_cast<const ScrollViewEventEmitter &>(*_eventEmitter);
|
||||
// TODO: temporary API to unblock testing of synchronous rendering.
|
||||
eventEmitter.experimental_flushSync([&eventEmitter, &scrollMetrics, &self]() {
|
||||
[self _updateStateWithContentOffset];
|
||||
// TODO: temporary API to unblock testing of synchronous rendering.
|
||||
eventEmitter.experimental_onDiscreteScroll(scrollMetrics);
|
||||
});
|
||||
static_cast<const ScrollViewEventEmitter &>(*_eventEmitter).onScroll(scrollMetrics);
|
||||
}
|
||||
} else {
|
||||
[self _updateStateWithContentOffset];
|
||||
|
||||
NSTimeInterval now = CACurrentMediaTime();
|
||||
if ((_lastScrollEventDispatchTime == 0) || (now - _lastScrollEventDispatchTime > _scrollEventThrottle)) {
|
||||
_lastScrollEventDispatchTime = now;
|
||||
if (_eventEmitter) {
|
||||
static_cast<const ScrollViewEventEmitter &>(*_eventEmitter).onScroll(scrollMetrics);
|
||||
}
|
||||
|
||||
RCTSendScrollEventForNativeAnimations_DEPRECATED(scrollView, self.tag, kOnScrollEvent);
|
||||
}
|
||||
RCTSendScrollEventForNativeAnimations_DEPRECATED(scrollView, self.tag, kOnScrollEvent);
|
||||
}
|
||||
|
||||
[self _remountChildrenIfNeeded];
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
|
||||
# This Podspec wraps the code generated by Codegen that defines all the interfaces for the
|
||||
# internal Native Modules that React Native depends on.
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
||||
version = package['version']
|
||||
|
||||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||||
if version == '1000.0.0'
|
||||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||||
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
||||
else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
module_name = "FBReactNativeSpec"
|
||||
header_dir = "FBReactNativeSpec"
|
||||
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_config = get_boost_config()
|
||||
boost_compiler_flags = boost_config[:compiler_flags]
|
||||
new_arch_flags = ENV['RCT_NEW_ARCH_ENABLED'] == '1' ? ' -DRCT_NEW_ARCH_ENABLED=1' : ''
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
]
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTFBReactNativeSpec"
|
||||
s.version = version
|
||||
s.summary = "FBReactNativeSpec for React Native."
|
||||
s.homepage = "https://reactnative.dev/"
|
||||
s.license = package["license"]
|
||||
s.author = "Meta Platforms, Inc. and its affiliates"
|
||||
s.platforms = min_supported_versions
|
||||
s.source = source
|
||||
s.source_files = "FBReactNativeSpec/**/*.{c,h,m,mm,S,cpp}"
|
||||
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags + new_arch_flags
|
||||
s.header_dir = header_dir
|
||||
s.module_name = module_name
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths,
|
||||
"OTHER_CFLAGS" => "$(inherited) " + folly_compiler_flags + new_arch_flags,
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
|
||||
}
|
||||
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-jsiexecutor"
|
||||
s.dependency "RCT-Folly"
|
||||
s.dependency "RCTRequired"
|
||||
s.dependency "RCTTypeSafety"
|
||||
s.dependency "React-Core"
|
||||
s.dependency "React-NativeModulesApple"
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/bridging", :additional_framework_paths => ["react/nativemodule/bridging"])
|
||||
|
||||
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
||||
s.dependency "hermes-engine"
|
||||
else
|
||||
s.dependency "React-jsc"
|
||||
end
|
||||
|
||||
|
||||
s.script_phases = [
|
||||
{
|
||||
:name => '[RN]Check FBReactNativeSpec',
|
||||
:execution_position => :before_compile,
|
||||
:script => <<-EOS
|
||||
echo "Checking whether Codegen has run..."
|
||||
fbReactNativeSpecPath="$REACT_NATIVE_PATH/React/FBReactNativeSpec"
|
||||
|
||||
if [[ ! -d "$fbReactNativeSpecPath" ]]; then
|
||||
echo 'error: Codegen did not run properly in your project. Please reinstall cocoapods with `bundle exec pod install`.'
|
||||
exit 1
|
||||
fi
|
||||
EOS
|
||||
}
|
||||
]
|
||||
end
|
||||
@@ -926,12 +926,14 @@ public class com/facebook/react/bridge/JavaOnlyArray : com/facebook/react/bridge
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/bridge/JavaOnlyMap : com/facebook/react/bridge/ReadableMap, com/facebook/react/bridge/WritableMap {
|
||||
public final class com/facebook/react/bridge/JavaOnlyMap : com/facebook/react/bridge/ReadableMap, com/facebook/react/bridge/WritableMap {
|
||||
public static final field Companion Lcom/facebook/react/bridge/JavaOnlyMap$Companion;
|
||||
public fun <init> ()V
|
||||
public synthetic fun <init> ([Ljava/lang/Object;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun copy ()Lcom/facebook/react/bridge/WritableMap;
|
||||
public static fun deepClone (Lcom/facebook/react/bridge/ReadableMap;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public static final fun deepClone (Lcom/facebook/react/bridge/ReadableMap;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun from (Ljava/util/Map;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public static final fun from (Ljava/util/Map;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public fun getArray (Ljava/lang/String;)Lcom/facebook/react/bridge/ReadableArray;
|
||||
public fun getBoolean (Ljava/lang/String;)Z
|
||||
public fun getDouble (Ljava/lang/String;)D
|
||||
@@ -947,7 +949,7 @@ public class com/facebook/react/bridge/JavaOnlyMap : com/facebook/react/bridge/R
|
||||
public fun isNull (Ljava/lang/String;)Z
|
||||
public fun keySetIterator ()Lcom/facebook/react/bridge/ReadableMapKeySetIterator;
|
||||
public fun merge (Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public static fun of ([Ljava/lang/Object;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public static final fun of ([Ljava/lang/Object;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public fun putArray (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun putBoolean (Ljava/lang/String;Z)V
|
||||
public fun putDouble (Ljava/lang/String;D)V
|
||||
@@ -956,10 +958,17 @@ public class com/facebook/react/bridge/JavaOnlyMap : com/facebook/react/bridge/R
|
||||
public fun putMap (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public fun putNull (Ljava/lang/String;)V
|
||||
public fun putString (Ljava/lang/String;Ljava/lang/String;)V
|
||||
public final fun remove (Ljava/lang/String;)V
|
||||
public fun toHashMap ()Ljava/util/HashMap;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/bridge/JavaOnlyMap$Companion {
|
||||
public final fun deepClone (Lcom/facebook/react/bridge/ReadableMap;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public final fun from (Ljava/util/Map;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
public final fun of ([Ljava/lang/Object;)Lcom/facebook/react/bridge/JavaOnlyMap;
|
||||
}
|
||||
|
||||
public class com/facebook/react/bridge/JavaScriptContextHolder {
|
||||
public fun <init> (J)V
|
||||
public fun clear ()V
|
||||
@@ -1554,7 +1563,7 @@ public abstract interface class com/facebook/react/bridge/UIManager : com/facebo
|
||||
public abstract fun addUIManagerEventListener (Lcom/facebook/react/bridge/UIManagerListener;)V
|
||||
public abstract fun dispatchCommand (IILcom/facebook/react/bridge/ReadableArray;)V
|
||||
public abstract fun dispatchCommand (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public abstract fun getEventDispatcher ()Ljava/lang/Object;
|
||||
public abstract fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
|
||||
public abstract fun initialize ()V
|
||||
public abstract fun invalidate ()V
|
||||
public abstract fun markActiveTouchForTag (II)V
|
||||
@@ -1906,19 +1915,6 @@ public final class com/facebook/react/common/build/ReactBuildConfig {
|
||||
public static final field IS_INTERNAL_BUILD Z
|
||||
}
|
||||
|
||||
public final class com/facebook/react/common/futures/SimpleSettableFuture : java/util/concurrent/Future {
|
||||
public fun <init> ()V
|
||||
public fun cancel (Z)Z
|
||||
public fun get ()Ljava/lang/Object;
|
||||
public fun get (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
|
||||
public final fun getOrThrow ()Ljava/lang/Object;
|
||||
public final fun getOrThrow (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
|
||||
public fun isCancelled ()Z
|
||||
public fun isDone ()Z
|
||||
public final fun set (Ljava/lang/Object;)V
|
||||
public final fun setException (Ljava/lang/Exception;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/common/mapbuffer/MapBuffer : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker {
|
||||
public static final field Companion Lcom/facebook/react/common/mapbuffer/MapBuffer$Companion;
|
||||
public abstract fun contains (I)Z
|
||||
@@ -2013,11 +2009,6 @@ public final class com/facebook/react/common/mapbuffer/WritableMapBuffer : com/f
|
||||
public final fun put (IZ)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/common/network/OkHttpCallUtil {
|
||||
public static final field INSTANCE Lcom/facebook/react/common/network/OkHttpCallUtil;
|
||||
public static final fun cancelTag (Lokhttp3/OkHttpClient;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/config/ReactFeatureFlags {
|
||||
public static final field INSTANCE Lcom/facebook/react/config/ReactFeatureFlags;
|
||||
public static field dispatchPointerEvents Z
|
||||
@@ -2632,7 +2623,6 @@ public class com/facebook/react/fabric/FabricUIManager : com/facebook/react/brid
|
||||
public fun dispatchCommand (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun getColor (I[Ljava/lang/String;)I
|
||||
public fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
|
||||
public synthetic fun getEventDispatcher ()Ljava/lang/Object;
|
||||
public fun getInspectorDataForInstance (ILandroid/view/View;)Lcom/facebook/react/bridge/ReadableMap;
|
||||
public fun getPerformanceCounters ()Ljava/util/Map;
|
||||
public fun getThemeData (I[F)Z
|
||||
@@ -3055,27 +3045,6 @@ public class com/facebook/react/modules/blob/FileReaderModule : com/facebook/fbr
|
||||
public fun readAsText (Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/camera/ImageStoreManager : com/facebook/fbreact/specs/NativeImageStoreAndroidSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/camera/ImageStoreManager$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun getBase64ForTag (Ljava/lang/String;Lcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/camera/ImageStoreManager$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/clipboard/ClipboardModule : com/facebook/fbreact/specs/NativeClipboardSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/clipboard/ClipboardModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun getString (Lcom/facebook/react/bridge/Promise;)V
|
||||
public fun setString (Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/clipboard/ClipboardModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/common/ModuleDataCleaner {
|
||||
public static final field INSTANCE Lcom/facebook/react/modules/common/ModuleDataCleaner;
|
||||
public static final fun cleanDataFromModules (Lcom/facebook/react/bridge/ReactContext;)V
|
||||
@@ -3303,17 +3272,6 @@ public final class com/facebook/react/modules/deviceinfo/DeviceInfoModule : com/
|
||||
public fun onHostResume ()V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devloading/DevLoadingModule : com/facebook/fbreact/specs/NativeDevLoadingViewSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/devloading/DevLoadingModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun hide ()V
|
||||
public fun showMessage (Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devloading/DevLoadingModule$Companion {
|
||||
}
|
||||
|
||||
public class com/facebook/react/modules/dialog/AlertFragment : androidx/fragment/app/DialogFragment, android/content/DialogInterface$OnClickListener {
|
||||
public fun <init> ()V
|
||||
public fun <init> (Lcom/facebook/react/modules/dialog/DialogModule$AlertFragmentListener;Landroid/os/Bundle;)V
|
||||
@@ -3673,18 +3631,6 @@ public final class com/facebook/react/modules/toast/ToastModule : com/facebook/f
|
||||
public final class com/facebook/react/modules/toast/ToastModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/vibration/VibrationModule : com/facebook/fbreact/specs/NativeVibrationSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/vibration/VibrationModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun cancel ()V
|
||||
public fun vibrate (D)V
|
||||
public fun vibrateByPattern (Lcom/facebook/react/bridge/ReadableArray;D)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/vibration/VibrationModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/websocket/WebSocketModule : com/facebook/fbreact/specs/NativeWebSocketModuleSpec {
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun addListener (Ljava/lang/String;)V
|
||||
@@ -3774,22 +3720,6 @@ public abstract interface class com/facebook/react/packagerconnection/Responder
|
||||
public abstract fun respond (Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/reactperflogger/NativeModulePerfLogger {
|
||||
protected fun <init> ()V
|
||||
protected abstract fun initHybrid ()Lcom/facebook/jni/HybridData;
|
||||
protected final fun maybeLoadOtherSoLibraries ()V
|
||||
public abstract fun moduleCreateCacheHit (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateConstructEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateConstructStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateFail (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateSetUpEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateSetUpStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleDataCreateEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleDataCreateStart (Ljava/lang/String;I)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/runtime/BindingsInstaller {
|
||||
public fun <init> (Lcom/facebook/jni/HybridData;)V
|
||||
}
|
||||
@@ -4296,13 +4226,6 @@ public class com/facebook/react/uimanager/LayoutShadowNode : com/facebook/react/
|
||||
public fun setWidth (Lcom/facebook/react/bridge/Dynamic;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/LayoutShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/LayoutShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/uimanager/LengthPercentage {
|
||||
public static final field Companion Lcom/facebook/react/uimanager/LengthPercentage$Companion;
|
||||
public fun <init> ()V
|
||||
@@ -4956,13 +4879,6 @@ public class com/facebook/react/uimanager/ReactShadowNodeImpl : com/facebook/rea
|
||||
public final fun updateProperties (Lcom/facebook/react/uimanager/ReactStylesDiffMap;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/ReactShadowNodeImpl$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNodeImpl;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface annotation class com/facebook/react/uimanager/ReactStage : java/lang/annotation/Annotation {
|
||||
public static final field BRIDGE_DID_LOAD I
|
||||
public static final field MODULE_DID_LOAD I
|
||||
@@ -5016,13 +4932,6 @@ public final class com/facebook/react/uimanager/RootViewManager : com/facebook/r
|
||||
public fun getName ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/RootViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/RootViewManager;Landroid/view/ViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/uimanager/RootViewManager$Companion {
|
||||
}
|
||||
|
||||
@@ -5237,7 +5146,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
|
||||
public fun getDefaultEventTypes ()Lcom/facebook/react/bridge/WritableMap;
|
||||
public fun getDirectEventNamesResolver ()Lcom/facebook/react/uimanager/UIManagerModule$CustomEventNamesResolver;
|
||||
public fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
|
||||
public synthetic fun getEventDispatcher ()Ljava/lang/Object;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getPerformanceCounters ()Ljava/util/Map;
|
||||
public fun getUIImplementation ()Lcom/facebook/react/uimanager/UIImplementation;
|
||||
@@ -5658,11 +5566,6 @@ public final class com/facebook/react/uimanager/common/ViewUtil {
|
||||
public static final fun isRootTag (I)Z
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
public abstract fun onViewHierarchyUpdateEnqueued ()V
|
||||
public abstract fun onViewHierarchyUpdateFinished ()V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/events/BatchEventDispatchedListener {
|
||||
public abstract fun onBatchEventDispatched ()V
|
||||
}
|
||||
@@ -6192,15 +6095,15 @@ public final class com/facebook/react/uimanager/style/Overflow$Companion {
|
||||
public final fun fromString (Ljava/lang/String;)Lcom/facebook/react/uimanager/style/Overflow;
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/util/ReactFindViewUtil {
|
||||
public fun <init> ()V
|
||||
public static fun addViewListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static fun addViewsListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnMultipleViewsFoundListener;Ljava/util/Set;)V
|
||||
public static fun findView (Landroid/view/View;Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static fun findView (Landroid/view/View;Ljava/lang/String;)Landroid/view/View;
|
||||
public static fun notifyViewRendered (Landroid/view/View;)V
|
||||
public static fun removeViewListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static fun removeViewsListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnMultipleViewsFoundListener;)V
|
||||
public final class com/facebook/react/uimanager/util/ReactFindViewUtil {
|
||||
public static final field INSTANCE Lcom/facebook/react/uimanager/util/ReactFindViewUtil;
|
||||
public static final fun addViewListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static final fun addViewsListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnMultipleViewsFoundListener;Ljava/util/Set;)V
|
||||
public static final fun findView (Landroid/view/View;Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static final fun findView (Landroid/view/View;Ljava/lang/String;)Landroid/view/View;
|
||||
public static final fun notifyViewRendered (Landroid/view/View;)V
|
||||
public static final fun removeViewListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnViewFoundListener;)V
|
||||
public static final fun removeViewsListener (Lcom/facebook/react/uimanager/util/ReactFindViewUtil$OnMultipleViewsFoundListener;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/util/ReactFindViewUtil$OnMultipleViewsFoundListener {
|
||||
@@ -6357,6 +6260,7 @@ public abstract interface class com/facebook/react/viewmanagers/ModalHostViewMan
|
||||
public abstract fun setAnimationType (Landroid/view/View;Ljava/lang/String;)V
|
||||
public abstract fun setHardwareAccelerated (Landroid/view/View;Z)V
|
||||
public abstract fun setIdentifier (Landroid/view/View;I)V
|
||||
public abstract fun setNavigationBarTranslucent (Landroid/view/View;Z)V
|
||||
public abstract fun setPresentationStyle (Landroid/view/View;Ljava/lang/String;)V
|
||||
public abstract fun setStatusBarTranslucent (Landroid/view/View;Z)V
|
||||
public abstract fun setSupportedOrientations (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
@@ -6399,24 +6303,24 @@ public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlay :
|
||||
public final fun setTraceUpdates (Ljava/util/List;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager : com/facebook/react/uimanager/SimpleViewManager {
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager : com/facebook/react/uimanager/SimpleViewManager, com/facebook/react/viewmanagers/DebuggingOverlayManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public synthetic fun clearElementsHighlights (Landroid/view/View;)V
|
||||
public fun clearElementsHighlights (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;)V
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;
|
||||
public fun getDelegate ()Lcom/facebook/react/uimanager/ViewManagerDelegate;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public synthetic fun highlightElements (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun highlightElements (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun highlightTraceUpdates (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun highlightTraceUpdates (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun receiveCommand (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlayManager;Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6478,13 +6382,6 @@ public final class com/facebook/react/views/drawer/ReactDrawerLayoutManager : co
|
||||
public fun setStatusBarBackgroundColor (Lcom/facebook/react/views/drawer/ReactDrawerLayout;Ljava/lang/Integer;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/drawer/ReactDrawerLayoutManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/drawer/ReactDrawerLayoutManager;Lcom/facebook/react/views/drawer/ReactDrawerLayout;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/drawer/ReactDrawerLayoutManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6646,13 +6543,6 @@ public final class com/facebook/react/views/image/ReactImageManager : com/facebo
|
||||
public final fun setTintColor (Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/Integer;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/image/ReactImageManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/image/ReactImageManager;Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/image/ReactImageManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6734,13 +6624,6 @@ public final class com/facebook/react/views/imagehelper/ResourceDrawableIdHelper
|
||||
public final fun getInstance ()Lcom/facebook/react/views/imagehelper/ResourceDrawableIdHelper;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/modal/ModalHostShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/modal/ModalHostShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/modal/ReactModalHostManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/ModalHostViewManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/modal/ReactModalHostManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
@@ -6761,6 +6644,8 @@ public final class com/facebook/react/views/modal/ReactModalHostManager : com/fa
|
||||
public fun setHardwareAccelerated (Lcom/facebook/react/views/modal/ReactModalHostView;Z)V
|
||||
public synthetic fun setIdentifier (Landroid/view/View;I)V
|
||||
public fun setIdentifier (Lcom/facebook/react/views/modal/ReactModalHostView;I)V
|
||||
public synthetic fun setNavigationBarTranslucent (Landroid/view/View;Z)V
|
||||
public fun setNavigationBarTranslucent (Lcom/facebook/react/views/modal/ReactModalHostView;Z)V
|
||||
public synthetic fun setPresentationStyle (Landroid/view/View;Ljava/lang/String;)V
|
||||
public fun setPresentationStyle (Lcom/facebook/react/views/modal/ReactModalHostView;Ljava/lang/String;)V
|
||||
public synthetic fun setStatusBarTranslucent (Landroid/view/View;Z)V
|
||||
@@ -6775,13 +6660,6 @@ public final class com/facebook/react/views/modal/ReactModalHostManager : com/fa
|
||||
public fun updateState (Lcom/facebook/react/views/modal/ReactModalHostView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/modal/ReactModalHostManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/modal/ReactModalHostManager;Lcom/facebook/react/views/modal/ReactModalHostView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/modal/ReactModalHostManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6796,6 +6674,7 @@ public final class com/facebook/react/views/modal/ReactModalHostView : android/v
|
||||
public fun getChildCount ()I
|
||||
public final fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
|
||||
public final fun getHardwareAccelerated ()Z
|
||||
public final fun getNavigationBarTranslucent ()Z
|
||||
public final fun getOnRequestCloseListener ()Lcom/facebook/react/views/modal/ReactModalHostView$OnRequestCloseListener;
|
||||
public final fun getOnShowListener ()Landroid/content/DialogInterface$OnShowListener;
|
||||
public final fun getStateWrapper ()Lcom/facebook/react/uimanager/StateWrapper;
|
||||
@@ -6811,6 +6690,7 @@ public final class com/facebook/react/views/modal/ReactModalHostView : android/v
|
||||
public final fun setEventDispatcher (Lcom/facebook/react/uimanager/events/EventDispatcher;)V
|
||||
public final fun setHardwareAccelerated (Z)V
|
||||
public fun setId (I)V
|
||||
public final fun setNavigationBarTranslucent (Z)V
|
||||
public final fun setOnRequestCloseListener (Lcom/facebook/react/views/modal/ReactModalHostView$OnRequestCloseListener;)V
|
||||
public final fun setOnShowListener (Landroid/content/DialogInterface$OnShowListener;)V
|
||||
public final fun setStateWrapper (Lcom/facebook/react/uimanager/StateWrapper;)V
|
||||
@@ -6835,100 +6715,6 @@ public abstract interface class com/facebook/react/views/modal/ReactModalHostVie
|
||||
public abstract fun onRequestClose (Landroid/content/DialogInterface;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ProgressBarContainerView : android/widget/FrameLayout {
|
||||
public static final field MAX_PROGRESS I
|
||||
public fun <init> (Landroid/content/Context;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ProgressBarShadowNode : com/facebook/react/uimanager/LayoutShadowNode, com/facebook/yoga/YogaMeasureFunction {
|
||||
public fun <init> ()V
|
||||
public final fun getStyle ()Ljava/lang/String;
|
||||
public fun measure (Lcom/facebook/yoga/YogaNode;FLcom/facebook/yoga/YogaMeasureMode;FLcom/facebook/yoga/YogaMeasureMode;)J
|
||||
public final fun setStyle (Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/progressbar/ProgressBarShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/progressbar/ProgressBarShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ReactProgressBarViewManager : com/facebook/react/uimanager/BaseViewManager, com/facebook/react/viewmanagers/AndroidProgressBarManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/progressbar/ReactProgressBarViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
||||
public fun createShadowNodeInstance ()Lcom/facebook/react/views/progressbar/ProgressBarShadowNode;
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public fun measure (Landroid/content/Context;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;FLcom/facebook/yoga/YogaMeasureMode;FLcom/facebook/yoga/YogaMeasureMode;[F)J
|
||||
public synthetic fun onAfterUpdateTransaction (Landroid/view/View;)V
|
||||
public synthetic fun setAnimating (Landroid/view/View;Z)V
|
||||
public fun setAnimating (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Z)V
|
||||
public synthetic fun setColor (Landroid/view/View;Ljava/lang/Integer;)V
|
||||
public fun setColor (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/Integer;)V
|
||||
public synthetic fun setIndeterminate (Landroid/view/View;Z)V
|
||||
public fun setIndeterminate (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Z)V
|
||||
public synthetic fun setProgress (Landroid/view/View;D)V
|
||||
public fun setProgress (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;D)V
|
||||
public synthetic fun setStyleAttr (Landroid/view/View;Ljava/lang/String;)V
|
||||
public fun setStyleAttr (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/String;)V
|
||||
public synthetic fun setTestID (Landroid/view/View;Ljava/lang/String;)V
|
||||
public fun setTestID (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/String;)V
|
||||
public synthetic fun setTypeAttr (Landroid/view/View;Ljava/lang/String;)V
|
||||
public fun setTypeAttr (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/String;)V
|
||||
public synthetic fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
public fun updateExtraData (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/progressbar/ReactProgressBarViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/progressbar/ReactProgressBarViewManager;Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ReactProgressBarViewManager$Companion {
|
||||
public final fun createProgressBar (Landroid/content/Context;I)Landroid/widget/ProgressBar;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaView : android/view/ViewGroup {
|
||||
public fun <init> (Lcom/facebook/react/uimanager/ThemedReactContext;)V
|
||||
public final fun getReactContext ()Lcom/facebook/react/uimanager/ThemedReactContext;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/SafeAreaViewManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/LayoutShadowNode;
|
||||
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public synthetic fun updateState (Landroid/view/View;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
public fun updateState (Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager;Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion {
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/scroll/FpsListener {
|
||||
public abstract fun disable (Ljava/lang/String;)V
|
||||
public abstract fun enable (Ljava/lang/String;)V
|
||||
@@ -6952,13 +6738,6 @@ public final class com/facebook/react/views/scroll/ReactHorizontalScrollContaine
|
||||
public fun getName ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager;Lcom/facebook/react/views/view/ReactViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager$Companion {
|
||||
}
|
||||
|
||||
@@ -7015,7 +6794,6 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollView : android
|
||||
public fun setBorderWidth (IF)V
|
||||
public fun setDecelerationRate (F)V
|
||||
public fun setDisableIntervalMomentum (Z)V
|
||||
public fun setEnableSyncOnScroll (Z)V
|
||||
public fun setEndFillColor (I)V
|
||||
public fun setLastScrollDispatchTime (J)V
|
||||
public fun setMaintainVisibleContentPosition (Lcom/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper$Config;)V
|
||||
@@ -7063,7 +6841,6 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollViewManager :
|
||||
public fun setContentOffset (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public fun setDecelerationRate (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;F)V
|
||||
public fun setDisableIntervalMomentum (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Z)V
|
||||
public fun setEnableSyncOnScroll (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Z)V
|
||||
public fun setFadingEdgeLength (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;I)V
|
||||
public fun setHorizontal (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Z)V
|
||||
public fun setMaintainVisibleContentPosition (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
@@ -7088,13 +6865,6 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollViewManager :
|
||||
public fun updateState (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactHorizontalScrollViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactHorizontalScrollViewManager;Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactScrollView : android/widget/ScrollView, android/view/View$OnLayoutChangeListener, android/view/ViewGroup$OnHierarchyChangeListener, com/facebook/react/uimanager/ReactClippingViewGroup, com/facebook/react/uimanager/ReactOverflowViewWithInset, com/facebook/react/views/scroll/ReactScrollViewHelper$HasFlingAnimator, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollEventThrottle, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollState, com/facebook/react/views/scroll/ReactScrollViewHelper$HasSmoothScroll, com/facebook/react/views/scroll/ReactScrollViewHelper$HasStateWrapper {
|
||||
public fun <init> (Landroid/content/Context;)V
|
||||
public fun <init> (Landroid/content/Context;Lcom/facebook/react/views/scroll/FpsListener;)V
|
||||
@@ -7145,7 +6915,6 @@ public class com/facebook/react/views/scroll/ReactScrollView : android/widget/Sc
|
||||
public fun setContentOffset (Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public fun setDecelerationRate (F)V
|
||||
public fun setDisableIntervalMomentum (Z)V
|
||||
public fun setEnableSyncOnScroll (Z)V
|
||||
public fun setEndFillColor (I)V
|
||||
public fun setLastScrollDispatchTime (J)V
|
||||
public fun setMaintainVisibleContentPosition (Lcom/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper$Config;)V
|
||||
@@ -7227,7 +6996,6 @@ public final class com/facebook/react/views/scroll/ReactScrollViewHelper {
|
||||
public static final fun updateFabricScrollState (Landroid/view/ViewGroup;)V
|
||||
public final fun updateFabricScrollState (Landroid/view/ViewGroup;II)V
|
||||
public static final fun updateStateOnScrollChanged (Landroid/view/ViewGroup;FF)V
|
||||
public static final fun updateStateOnScrollChanged (Landroid/view/ViewGroup;FFZ)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/scroll/ReactScrollViewHelper$HasFlingAnimator {
|
||||
@@ -7310,7 +7078,6 @@ public class com/facebook/react/views/scroll/ReactScrollViewManager : com/facebo
|
||||
public fun setContentOffset (Lcom/facebook/react/views/scroll/ReactScrollView;Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public fun setDecelerationRate (Lcom/facebook/react/views/scroll/ReactScrollView;F)V
|
||||
public fun setDisableIntervalMomentum (Lcom/facebook/react/views/scroll/ReactScrollView;Z)V
|
||||
public fun setEnableSyncOnScroll (Lcom/facebook/react/views/scroll/ReactScrollView;Z)V
|
||||
public fun setFadingEdgeLength (Lcom/facebook/react/views/scroll/ReactScrollView;I)V
|
||||
public fun setHorizontal (Lcom/facebook/react/views/scroll/ReactScrollView;Z)V
|
||||
public fun setIsInvertedVirtualizedList (Lcom/facebook/react/views/scroll/ReactScrollView;Z)V
|
||||
@@ -7336,24 +7103,17 @@ public class com/facebook/react/views/scroll/ReactScrollViewManager : com/facebo
|
||||
public fun updateState (Lcom/facebook/react/views/scroll/ReactScrollView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactScrollViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactScrollViewManager;Lcom/facebook/react/views/scroll/ReactScrollView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ScrollEvent : com/facebook/react/uimanager/events/Event {
|
||||
public static final field Companion Lcom/facebook/react/views/scroll/ScrollEvent$Companion;
|
||||
public fun canCoalesce ()Z
|
||||
public fun getEventName ()Ljava/lang/String;
|
||||
public static final fun obtain (IILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIIIZ)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
public static final fun obtain (IILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIII)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
public static final fun obtain (ILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIII)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
public fun onDispose ()V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ScrollEvent$Companion {
|
||||
public final fun obtain (IILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIIIZ)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
public final fun obtain (IILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIII)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
public final fun obtain (ILcom/facebook/react/views/scroll/ScrollEventType;FFFFIIII)Lcom/facebook/react/views/scroll/ScrollEvent;
|
||||
}
|
||||
|
||||
@@ -7385,44 +7145,6 @@ public class com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout : and
|
||||
public fun setRefreshing (Z)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/AndroidSwipeRefreshLayoutManagerInterface {
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
protected synthetic fun addEventEmitters (Lcom/facebook/react/uimanager/ThemedReactContext;Landroid/view/View;)V
|
||||
protected fun addEventEmitters (Lcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;)V
|
||||
protected synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
protected fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;
|
||||
protected fun getDelegate ()Lcom/facebook/react/uimanager/ViewManagerDelegate;
|
||||
public fun getExportedCustomDirectEventTypeConstants ()Ljava/util/Map;
|
||||
public fun getExportedViewConstants ()Ljava/util/Map;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun receiveCommand (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun setColors (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun setColors (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun setEnabled (Landroid/view/View;Z)V
|
||||
public fun setEnabled (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Z)V
|
||||
public synthetic fun setNativeRefreshing (Landroid/view/View;Z)V
|
||||
public fun setNativeRefreshing (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Z)V
|
||||
public synthetic fun setProgressBackgroundColor (Landroid/view/View;Ljava/lang/Integer;)V
|
||||
public fun setProgressBackgroundColor (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/Integer;)V
|
||||
public synthetic fun setProgressViewOffset (Landroid/view/View;F)V
|
||||
public fun setProgressViewOffset (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;F)V
|
||||
public synthetic fun setRefreshing (Landroid/view/View;Z)V
|
||||
public fun setRefreshing (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Z)V
|
||||
public synthetic fun setSize (Landroid/view/View;Ljava/lang/String;)V
|
||||
public fun setSize (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;I)V
|
||||
public fun setSize (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Lcom/facebook/react/bridge/Dynamic;)V
|
||||
public fun setSize (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager;Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager : com/facebook/react/uimanager/SimpleViewManager, com/facebook/react/viewmanagers/AndroidSwitchManagerInterface {
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
@@ -7462,20 +7184,6 @@ public class com/facebook/react/views/switchview/ReactSwitchManager : com/facebo
|
||||
public fun setValue (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/switchview/ReactSwitchManager;Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/text/DefaultStyleValuesUtil {
|
||||
public static final field INSTANCE Lcom/facebook/react/views/text/DefaultStyleValuesUtil;
|
||||
public static final fun getDefaultTextColor (Landroid/content/Context;)Landroid/content/res/ColorStateList;
|
||||
@@ -7553,14 +7261,20 @@ public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : co
|
||||
protected fun spannedFromShadowNode (Lcom/facebook/react/views/text/ReactBaseTextShadowNode;Ljava/lang/String;ZLcom/facebook/react/uimanager/NativeViewHierarchyOptimizer;)Landroid/text/Spannable;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactFontManager {
|
||||
public fun addCustomFont (Landroid/content/Context;Ljava/lang/String;I)V
|
||||
public fun addCustomFont (Ljava/lang/String;Landroid/graphics/Typeface;)V
|
||||
public static fun getInstance ()Lcom/facebook/react/views/text/ReactFontManager;
|
||||
public fun getTypeface (Ljava/lang/String;IILandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public fun getTypeface (Ljava/lang/String;ILandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public fun getTypeface (Ljava/lang/String;IZLandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public fun setTypeface (Ljava/lang/String;ILandroid/graphics/Typeface;)V
|
||||
public final class com/facebook/react/views/text/ReactFontManager {
|
||||
public static final field Companion Lcom/facebook/react/views/text/ReactFontManager$Companion;
|
||||
public synthetic fun <init> (Lcom/facebook/react/views/text/ReactFontManager;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun addCustomFont (Landroid/content/Context;Ljava/lang/String;I)V
|
||||
public final fun addCustomFont (Ljava/lang/String;Landroid/graphics/Typeface;)V
|
||||
public static final fun getInstance ()Lcom/facebook/react/views/text/ReactFontManager;
|
||||
public final fun getTypeface (Ljava/lang/String;IILandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public final fun getTypeface (Ljava/lang/String;ILandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public final fun getTypeface (Ljava/lang/String;IZLandroid/content/res/AssetManager;)Landroid/graphics/Typeface;
|
||||
public final fun setTypeface (Ljava/lang/String;ILandroid/graphics/Typeface;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/text/ReactFontManager$Companion {
|
||||
public final fun getInstance ()Lcom/facebook/react/views/text/ReactFontManager;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextManager : com/facebook/react/uimanager/ViewManager {
|
||||
@@ -7575,13 +7289,6 @@ public class com/facebook/react/views/text/ReactRawTextManager : com/facebook/re
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactRawTextManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextShadowNode : com/facebook/react/uimanager/ReactShadowNodeImpl {
|
||||
public fun <init> ()V
|
||||
public fun getText ()Ljava/lang/String;
|
||||
@@ -7590,13 +7297,6 @@ public class com/facebook/react/views/text/ReactRawTextShadowNode : com/facebook
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactRawTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/views/text/ReactTextAnchorViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
public fun <init> ()V
|
||||
public fun setAccessible (Lcom/facebook/react/views/text/ReactTextView;Z)V
|
||||
@@ -7631,13 +7331,6 @@ public class com/facebook/react/views/text/ReactTextShadowNode : com/facebook/re
|
||||
public fun setShouldNotifyOnTextLayout (Z)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextUpdate {
|
||||
public fun <init> (Landroid/text/Spannable;IZFFFFI)V
|
||||
public fun <init> (Landroid/text/Spannable;IZFFFFIII)V
|
||||
@@ -7721,13 +7414,6 @@ public class com/facebook/react/views/text/ReactTextViewManager : com/facebook/r
|
||||
public fun updateState (Lcom/facebook/react/views/text/ReactTextView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactTextViewManager;Lcom/facebook/react/views/text/ReactTextView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/text/ReactTextViewManagerCallback {
|
||||
public abstract fun onPostProcessSpannable (Landroid/text/Spannable;)V
|
||||
}
|
||||
@@ -7740,35 +7426,6 @@ public class com/facebook/react/views/text/ReactTypefaceUtils {
|
||||
public static fun parseFontWeight (Ljava/lang/String;)I
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextShadowNode : com/facebook/react/views/text/ReactBaseTextShadowNode {
|
||||
public fun <init> ()V
|
||||
public fun isVirtual ()Z
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
public fun <init> ()V
|
||||
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
||||
public fun createShadowNodeInstance ()Lcom/facebook/react/views/text/ReactVirtualTextShadowNode;
|
||||
public fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/TextAttributeProps {
|
||||
public static final field TA_KEY_ACCESSIBILITY_ROLE S
|
||||
public static final field TA_KEY_ALIGNMENT S
|
||||
@@ -7916,20 +7573,19 @@ public class com/facebook/react/views/text/TextLayoutManager {
|
||||
|
||||
public final class com/facebook/react/views/text/TextTransform : java/lang/Enum {
|
||||
public static final field CAPITALIZE Lcom/facebook/react/views/text/TextTransform;
|
||||
public static final field Companion Lcom/facebook/react/views/text/TextTransform$Companion;
|
||||
public static final field LOWERCASE Lcom/facebook/react/views/text/TextTransform;
|
||||
public static final field NONE Lcom/facebook/react/views/text/TextTransform;
|
||||
public static final field UNSET Lcom/facebook/react/views/text/TextTransform;
|
||||
public static final field UPPERCASE Lcom/facebook/react/views/text/TextTransform;
|
||||
public static fun apply (Ljava/lang/String;Lcom/facebook/react/views/text/TextTransform;)Ljava/lang/String;
|
||||
public static final fun apply (Ljava/lang/String;Lcom/facebook/react/views/text/TextTransform;)Ljava/lang/String;
|
||||
public static fun getEntries ()Lkotlin/enums/EnumEntries;
|
||||
public static fun valueOf (Ljava/lang/String;)Lcom/facebook/react/views/text/TextTransform;
|
||||
public static fun values ()[Lcom/facebook/react/views/text/TextTransform;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public final class com/facebook/react/views/text/TextTransform$Companion {
|
||||
public final fun apply (Ljava/lang/String;Lcom/facebook/react/views/text/TextTransform;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
@@ -7944,13 +7600,6 @@ public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInl
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/textinput/ContentSizeWatcher {
|
||||
public abstract fun onLayout ()V
|
||||
}
|
||||
@@ -8138,20 +7787,6 @@ public class com/facebook/react/views/textinput/ReactTextInputManager : com/face
|
||||
public fun updateState (Lcom/facebook/react/views/textinput/ReactEditText;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/textinput/ReactTextInputManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/textinput/ReactTextInputManager;Lcom/facebook/react/views/textinput/ReactEditText;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/textinput/ReactTextInputShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/textinput/ReactTextInputShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/textinput/ScrollWatcher {
|
||||
public abstract fun onScrollChanged (IIII)V
|
||||
}
|
||||
@@ -8288,13 +7923,6 @@ public class com/facebook/react/views/view/ReactViewManager : com/facebook/react
|
||||
protected fun setTransformProperty (Lcom/facebook/react/views/view/ReactViewGroup;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/view/ReactViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/view/ReactViewManager;Lcom/facebook/react/views/view/ReactViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/view/ReactViewManager$Companion {
|
||||
}
|
||||
|
||||
@@ -8308,5 +7936,6 @@ public final class com/facebook/react/views/view/ViewGroupClickEvent : com/faceb
|
||||
public final class com/facebook/react/views/view/WindowUtilKt {
|
||||
public static final fun setStatusBarTranslucency (Landroid/view/Window;Z)V
|
||||
public static final fun setStatusBarVisibility (Landroid/view/Window;Z)V
|
||||
public static final fun setSystemBarsTranslucency (Landroid/view/Window;Z)V
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,12 @@ android.useAndroidX=true
|
||||
react.internal.disableJavaVersionAlignment=true
|
||||
|
||||
# Binary Compatibility Validator properties
|
||||
|
||||
# We ignore:
|
||||
# - BuildConfig classes because they are generated and not part of the public API
|
||||
binaryCompatibilityValidator.ignoredClasses=com.facebook.react.BuildConfig,\
|
||||
com.facebook.react.views.unimplementedview.ReactUnimplementedViewManager$$PropsSetter
|
||||
com.facebook.react.views.progressbar.ReactProgressBarViewManager$$PropsSetter,\
|
||||
com.facebook.react.views.progressbar.ProgressBarShadowNode$$PropsSetter
|
||||
|
||||
binaryCompatibilityValidator.ignoredPackages=com.facebook.debug,\
|
||||
com.facebook.fbreact,\
|
||||
|
||||
-266
@@ -1,266 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import static androidx.core.util.Preconditions.checkNotNull;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Java {@link HashMap} backed implementation of {@link ReadableMap} and {@link WritableMap}
|
||||
* Instances of this class SHOULD NOT be used for communication between java and JS, use instances
|
||||
* of {@link WritableNativeMap} created via {@link Arguments#createMap} or just {@link ReadableMap}
|
||||
* interface if you want your "native" module method to take a map from JS as an argument.
|
||||
*
|
||||
* <p>Main purpose for this class is to be used in java-only unit tests, but could also be used
|
||||
* outside of tests in the code that operates only in java and needs to communicate with RN modules
|
||||
* via their JS-exposed API.
|
||||
*/
|
||||
public class JavaOnlyMap implements ReadableMap, WritableMap {
|
||||
|
||||
private final Map mBackingMap;
|
||||
|
||||
public static JavaOnlyMap of(Object... keysAndValues) {
|
||||
return new JavaOnlyMap(keysAndValues);
|
||||
}
|
||||
|
||||
public static JavaOnlyMap from(Map<String, Object> map) {
|
||||
return new JavaOnlyMap(map);
|
||||
}
|
||||
|
||||
public static JavaOnlyMap deepClone(ReadableMap map) {
|
||||
JavaOnlyMap res = new JavaOnlyMap();
|
||||
ReadableMapKeySetIterator iter = map.keySetIterator();
|
||||
while (iter.hasNextKey()) {
|
||||
String propKey = iter.nextKey();
|
||||
ReadableType type = map.getType(propKey);
|
||||
switch (type) {
|
||||
case Null:
|
||||
res.putNull(propKey);
|
||||
break;
|
||||
case Boolean:
|
||||
res.putBoolean(propKey, map.getBoolean(propKey));
|
||||
break;
|
||||
case Number:
|
||||
res.putDouble(propKey, map.getDouble(propKey));
|
||||
break;
|
||||
case String:
|
||||
res.putString(propKey, map.getString(propKey));
|
||||
break;
|
||||
case Map:
|
||||
res.putMap(propKey, deepClone(map.getMap(propKey)));
|
||||
break;
|
||||
case Array:
|
||||
res.putArray(propKey, JavaOnlyArray.deepClone(map.getArray(propKey)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param keysAndValues keys and values, interleaved
|
||||
*/
|
||||
private JavaOnlyMap(Object... keysAndValues) {
|
||||
if (keysAndValues.length % 2 != 0) {
|
||||
throw new IllegalArgumentException("You must provide the same number of keys and values");
|
||||
}
|
||||
mBackingMap = new HashMap();
|
||||
for (int i = 0; i < keysAndValues.length; i += 2) {
|
||||
Object val = keysAndValues[i + 1];
|
||||
if (val instanceof Number) {
|
||||
// all values from JS are doubles, so emulate that here for tests.
|
||||
val = ((Number) val).doubleValue();
|
||||
}
|
||||
mBackingMap.put(keysAndValues[i], val);
|
||||
}
|
||||
}
|
||||
|
||||
public JavaOnlyMap() {
|
||||
mBackingMap = new HashMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasKey(@NonNull String name) {
|
||||
return mBackingMap.containsKey(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNull(@NonNull String name) {
|
||||
return mBackingMap.get(name) == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(@NonNull String name) {
|
||||
return (Boolean) mBackingMap.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(@NonNull String name) {
|
||||
return ((Number) mBackingMap.get(name)).doubleValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(@NonNull String name) {
|
||||
return ((Number) mBackingMap.get(name)).intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLong(@NonNull String name) {
|
||||
return ((Number) checkNotNull(mBackingMap.get(name))).longValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(@NonNull String name) {
|
||||
return (String) mBackingMap.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableMap getMap(@NonNull String name) {
|
||||
return (ReadableMap) mBackingMap.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableArray getArray(@NonNull String name) {
|
||||
return (ReadableArray) mBackingMap.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Dynamic getDynamic(@NonNull String name) {
|
||||
return DynamicFromMap.create(this, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull ReadableType getType(@NonNull String name) {
|
||||
Object value = mBackingMap.get(name);
|
||||
if (value == null) {
|
||||
return ReadableType.Null;
|
||||
} else if (value instanceof Number) {
|
||||
return ReadableType.Number;
|
||||
} else if (value instanceof String) {
|
||||
return ReadableType.String;
|
||||
} else if (value instanceof Boolean) {
|
||||
return ReadableType.Boolean;
|
||||
} else if (value instanceof ReadableMap) {
|
||||
return ReadableType.Map;
|
||||
} else if (value instanceof ReadableArray) {
|
||||
return ReadableType.Array;
|
||||
} else if (value instanceof Dynamic) {
|
||||
return ((Dynamic) value).getType();
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid value " + value.toString() + " for key " + name + "contained in JavaOnlyMap");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Iterator<Map.Entry<String, Object>> getEntryIterator() {
|
||||
return mBackingMap.entrySet().iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull ReadableMapKeySetIterator keySetIterator() {
|
||||
return new ReadableMapKeySetIterator() {
|
||||
Iterator<Map.Entry<String, Object>> mIterator = mBackingMap.entrySet().iterator();
|
||||
|
||||
@Override
|
||||
public boolean hasNextKey() {
|
||||
return mIterator.hasNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String nextKey() {
|
||||
return mIterator.next().getKey();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putBoolean(@NonNull String key, boolean value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putDouble(@NonNull String key, double value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putInt(@NonNull String key, int value) {
|
||||
mBackingMap.put(key, new Double(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putLong(@NonNull String key, long value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putString(@NonNull String key, @Nullable String value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putNull(@NonNull String key) {
|
||||
mBackingMap.put(key, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putMap(@NonNull String key, @Nullable ReadableMap value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void merge(@NonNull ReadableMap source) {
|
||||
mBackingMap.putAll(((JavaOnlyMap) source).mBackingMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WritableMap copy() {
|
||||
final JavaOnlyMap target = new JavaOnlyMap();
|
||||
target.merge(this);
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putArray(@NonNull String key, @Nullable ReadableArray value) {
|
||||
mBackingMap.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull HashMap<String, Object> toHashMap() {
|
||||
return new HashMap<String, Object>(mBackingMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return mBackingMap.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
JavaOnlyMap that = (JavaOnlyMap) o;
|
||||
|
||||
if (mBackingMap != null ? !mBackingMap.equals(that.mBackingMap) : that.mBackingMap != null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return mBackingMap != null ? mBackingMap.hashCode() : 0;
|
||||
}
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge
|
||||
|
||||
import java.util.HashMap
|
||||
import kotlin.collections.Iterator
|
||||
import kotlin.collections.Map
|
||||
|
||||
/**
|
||||
* Java [HashMap] backed implementation of [ReadableMap] and [WritableMap] Instances of this class
|
||||
* SHOULD NOT be used for communication between java and JS, use instances of [WritableNativeMap]
|
||||
* created via [Arguments#createMap] or just [ReadableMap] interface if you want your "native"
|
||||
* module method to take a map from JS as an argument.
|
||||
*
|
||||
* Main purpose for this class is to be used in java-only unit tests, but could also be used outside
|
||||
* of tests in the code that operates only in java and needs to communicate with RN modules via
|
||||
* their JS-exposed API.
|
||||
*/
|
||||
public class JavaOnlyMap() : ReadableMap, WritableMap {
|
||||
public companion object {
|
||||
@JvmStatic public fun of(vararg keysAndValues: Any?): JavaOnlyMap = JavaOnlyMap(*keysAndValues)
|
||||
|
||||
@JvmStatic public fun from(map: Map<String, Any?>): JavaOnlyMap = JavaOnlyMap(map)
|
||||
|
||||
@JvmStatic
|
||||
public fun deepClone(map: ReadableMap?): JavaOnlyMap {
|
||||
val res = JavaOnlyMap()
|
||||
if (map == null) {
|
||||
return res
|
||||
}
|
||||
val iter = map.keySetIterator()
|
||||
while (iter.hasNextKey()) {
|
||||
val propKey = iter.nextKey()
|
||||
val type = map.getType(propKey)
|
||||
when (type) {
|
||||
ReadableType.Null -> res.putNull(propKey)
|
||||
ReadableType.Boolean -> res.putBoolean(propKey, map.getBoolean(propKey))
|
||||
ReadableType.Number -> res.putDouble(propKey, map.getDouble(propKey))
|
||||
ReadableType.String -> res.putString(propKey, map.getString(propKey))
|
||||
ReadableType.Map -> res.putMap(propKey, deepClone(map.getMap(propKey)))
|
||||
ReadableType.Array ->
|
||||
res.putArray(propKey, JavaOnlyArray.deepClone(map.getArray(propKey)))
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
private val backingMap: MutableMap<String, Any?> = HashMap()
|
||||
|
||||
/** @param keysAndValues keys and values, interleaved */
|
||||
private constructor(vararg keysAndValues: Any?) : this() {
|
||||
require(keysAndValues.size % 2 == 0) { "You must provide the same number of keys and values" }
|
||||
for (i in keysAndValues.indices step 2) {
|
||||
var value = keysAndValues[i + 1]
|
||||
if (value is Number) {
|
||||
// all values from JS are doubles, so emulate that here for tests.
|
||||
value = value.toDouble()
|
||||
}
|
||||
backingMap[keysAndValues[i] as String] = value
|
||||
}
|
||||
}
|
||||
|
||||
override fun hasKey(name: String): Boolean = backingMap.containsKey(name)
|
||||
|
||||
override fun isNull(name: String): Boolean = backingMap[name] == null
|
||||
|
||||
override fun getBoolean(name: String): Boolean = backingMap[name] as Boolean
|
||||
|
||||
override fun getDouble(name: String): Double = (backingMap[name] as Number).toDouble()
|
||||
|
||||
override fun getInt(name: String): Int = (backingMap[name] as Number).toInt()
|
||||
|
||||
override fun getLong(name: String): Long = (backingMap[name] as Number).toLong()
|
||||
|
||||
override fun getString(name: String): String? = backingMap[name] as String?
|
||||
|
||||
override fun getMap(name: String): ReadableMap? = backingMap[name] as ReadableMap?
|
||||
|
||||
override fun getArray(name: String): ReadableArray? = backingMap[name] as ReadableArray?
|
||||
|
||||
override fun getDynamic(name: String): Dynamic = DynamicFromMap.create(this, name)
|
||||
|
||||
override fun getType(name: String): ReadableType {
|
||||
val value = backingMap[name]
|
||||
return when {
|
||||
value == null -> ReadableType.Null
|
||||
value is Number -> ReadableType.Number
|
||||
value is String -> ReadableType.String
|
||||
value is Boolean -> ReadableType.Boolean
|
||||
value is ReadableMap -> ReadableType.Map
|
||||
value is ReadableArray -> ReadableType.Array
|
||||
value is Dynamic -> value.type
|
||||
else -> {
|
||||
throw IllegalArgumentException(
|
||||
"Invalid value $value for key $name contained in JavaOnlyMap")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override val entryIterator: Iterator<Map.Entry<String, Any?>>
|
||||
get() = backingMap.entries.iterator()
|
||||
|
||||
override fun keySetIterator(): ReadableMapKeySetIterator {
|
||||
return object : ReadableMapKeySetIterator {
|
||||
private val iterator = backingMap.entries.iterator()
|
||||
|
||||
override fun hasNextKey(): Boolean = iterator.hasNext()
|
||||
|
||||
override fun nextKey(): String = iterator.next().key
|
||||
}
|
||||
}
|
||||
|
||||
override fun putBoolean(key: String, value: Boolean) {
|
||||
backingMap[key] = value
|
||||
}
|
||||
|
||||
override fun putDouble(key: String, value: Double) {
|
||||
backingMap[key] = value
|
||||
}
|
||||
|
||||
override fun putInt(key: String, value: Int) {
|
||||
backingMap[key] = value.toDouble()
|
||||
}
|
||||
|
||||
override fun putLong(key: String, value: Long) {
|
||||
backingMap[key] = value.toDouble()
|
||||
}
|
||||
|
||||
override fun putString(key: String, value: String?) {
|
||||
backingMap[key] = value
|
||||
}
|
||||
|
||||
override fun putNull(key: String) {
|
||||
backingMap[key] = null
|
||||
}
|
||||
|
||||
override fun putMap(key: String, value: ReadableMap?) {
|
||||
backingMap[key] = value
|
||||
}
|
||||
|
||||
override fun merge(source: ReadableMap) {
|
||||
backingMap.putAll((source as JavaOnlyMap).backingMap)
|
||||
}
|
||||
|
||||
override fun copy(): WritableMap {
|
||||
val target = JavaOnlyMap()
|
||||
target.merge(this)
|
||||
return target
|
||||
}
|
||||
|
||||
override fun putArray(key: String, value: ReadableArray?) {
|
||||
backingMap[key] = value
|
||||
}
|
||||
|
||||
public fun remove(key: String) {
|
||||
backingMap.remove(key)
|
||||
}
|
||||
|
||||
override fun toHashMap(): HashMap<String, Any?> = HashMap<String, Any?>(backingMap)
|
||||
|
||||
override fun toString(): String = backingMap.toString()
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return if (this === other) {
|
||||
true
|
||||
} else if (other == null || javaClass != other.javaClass) {
|
||||
false
|
||||
} else {
|
||||
backingMap == (other as JavaOnlyMap).backingMap
|
||||
}
|
||||
}
|
||||
|
||||
override fun hashCode(): Int = backingMap.hashCode()
|
||||
}
|
||||
+2
-2
@@ -16,7 +16,7 @@ import kotlin.collections.Map
|
||||
* Kotlin.
|
||||
*/
|
||||
public interface ReadableMap {
|
||||
public val entryIterator: Iterator<Map.Entry<String, Any>>
|
||||
public val entryIterator: Iterator<Map.Entry<String, Any?>>
|
||||
|
||||
public fun getArray(name: String): ReadableArray?
|
||||
|
||||
@@ -42,5 +42,5 @@ public interface ReadableMap {
|
||||
|
||||
public fun keySetIterator(): ReadableMapKeySetIterator
|
||||
|
||||
public fun toHashMap(): HashMap<String, Any>
|
||||
public fun toHashMap(): HashMap<String, Any?>
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,10 +20,10 @@ public open class ReadableNativeMap protected constructor() : NativeMap(), Reada
|
||||
private val keys: Array<String> by
|
||||
lazy(LazyThreadSafetyMode.SYNCHRONIZED) { importKeys().also { jniPassCounter++ } }
|
||||
|
||||
private val localMap: HashMap<String, Any> by
|
||||
private val localMap: HashMap<String, Any?> by
|
||||
lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
val length = keys.size
|
||||
val res = HashMap<String, Any>(length)
|
||||
val res = HashMap<String, Any?>(length)
|
||||
val values = importValues()
|
||||
jniPassCounter++
|
||||
for (i in 0 until length) {
|
||||
@@ -157,7 +157,7 @@ public open class ReadableNativeMap protected constructor() : NativeMap(), Reada
|
||||
false
|
||||
} else localMap == other.localMap
|
||||
|
||||
override fun toHashMap(): HashMap<String, Any> {
|
||||
override fun toHashMap(): HashMap<String, Any?> {
|
||||
// we can almost just return getLocalMap(), but we need to convert nested arrays and maps to the
|
||||
// correct types first
|
||||
val hashMap = HashMap(localMap)
|
||||
|
||||
+2
-1
@@ -12,6 +12,7 @@ import androidx.annotation.AnyThread
|
||||
import androidx.annotation.UiThread
|
||||
import com.facebook.infer.annotation.ThreadConfined
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.react.uimanager.events.EventDispatcher
|
||||
|
||||
@OptIn(UnstableReactNativeAPI::class)
|
||||
public interface UIManager : PerformanceCounter {
|
||||
@@ -78,7 +79,7 @@ public interface UIManager : PerformanceCounter {
|
||||
public fun dispatchCommand(reactTag: Int, commandId: String, commandArgs: ReadableArray?)
|
||||
|
||||
/** @return the [EventDispatcher] object that is used by this class. */
|
||||
public val eventDispatcher: Any?
|
||||
public val eventDispatcher: EventDispatcher
|
||||
|
||||
/**
|
||||
* Used by native animated module to bypass the process of updating the values through the shadow
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeoutException
|
||||
* A super simple Future-like class that can safely notify another Thread when a value is ready.
|
||||
* Does not support canceling.
|
||||
*/
|
||||
public class SimpleSettableFuture<T> : Future<T?> {
|
||||
internal class SimpleSettableFuture<T> : Future<T?> {
|
||||
|
||||
private val readyLatch = CountDownLatch(1)
|
||||
private var result: T? = null
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import okhttp3.OkHttpClient
|
||||
/**
|
||||
* Helper class that provides the necessary methods for canceling queued and running OkHttp calls
|
||||
*/
|
||||
public object OkHttpCallUtil {
|
||||
internal object OkHttpCallUtil {
|
||||
@JvmStatic
|
||||
public fun cancelTag(client: OkHttpClient, tag: Any) {
|
||||
// client.dispatcher is private, so we need to use reflection to access
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import java.io.InputStream
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
@ReactModule(name = NativeImageStoreAndroidSpec.NAME)
|
||||
public class ImageStoreManager(reactContext: ReactApplicationContext) :
|
||||
internal class ImageStoreManager(reactContext: ReactApplicationContext) :
|
||||
NativeImageStoreAndroidSpec(reactContext) {
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -16,14 +16,14 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
/** A module that allows JS to get/set clipboard contents. */
|
||||
@ReactModule(name = NativeClipboardSpec.NAME)
|
||||
public class ClipboardModule(context: ReactApplicationContext) : NativeClipboardSpec(context) {
|
||||
internal class ClipboardModule(context: ReactApplicationContext) : NativeClipboardSpec(context) {
|
||||
|
||||
private val clipboardService: ClipboardManager
|
||||
get() =
|
||||
getReactApplicationContext().getSystemService(ReactApplicationContext.CLIPBOARD_SERVICE)
|
||||
as ClipboardManager
|
||||
|
||||
public override fun getString(promise: Promise) {
|
||||
override fun getString(promise: Promise) {
|
||||
try {
|
||||
val clipboard = clipboardService
|
||||
val clipData = clipboard.primaryClip
|
||||
@@ -38,12 +38,12 @@ public class ClipboardModule(context: ReactApplicationContext) : NativeClipboard
|
||||
}
|
||||
}
|
||||
|
||||
public override fun setString(text: String?) {
|
||||
override fun setString(text: String?) {
|
||||
val clipdata: ClipData = ClipData.newPlainText(null, text)
|
||||
clipboardService.setPrimaryClip(clipdata)
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val NAME: String = NativeClipboardSpec.NAME
|
||||
companion object {
|
||||
const val NAME: String = NativeClipboardSpec.NAME
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
/** [NativeModule] that allows JS to show dev loading view. */
|
||||
@ReactModule(name = NativeDevLoadingViewSpec.NAME)
|
||||
public class DevLoadingModule(reactContext: ReactApplicationContext) :
|
||||
internal class DevLoadingModule(reactContext: ReactApplicationContext) :
|
||||
NativeDevLoadingViewSpec(reactContext) {
|
||||
|
||||
private val jsExceptionHandler: JSExceptionHandler? = reactContext.jsExceptionHandler
|
||||
|
||||
+19
-8
@@ -15,7 +15,9 @@ import android.net.Uri;
|
||||
import android.nfc.NfcAdapter;
|
||||
import android.provider.Settings;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.util.Preconditions;
|
||||
import com.facebook.fbreact.specs.NativeIntentAndroidSpec;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.Promise;
|
||||
@@ -28,6 +30,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Intent module. Launch other activities or open URLs. */
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@ReactModule(name = NativeIntentAndroidSpec.NAME)
|
||||
public class IntentModule extends NativeIntentAndroidSpec {
|
||||
|
||||
@@ -124,7 +127,7 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
* @param url the URL to open
|
||||
*/
|
||||
@Override
|
||||
public void openURL(String url, Promise promise) {
|
||||
public void openURL(@Nullable String url, Promise promise) {
|
||||
if (url == null || url.isEmpty()) {
|
||||
promise.reject(new JSApplicationIllegalArgumentException("Invalid URL: " + url));
|
||||
return;
|
||||
@@ -149,7 +152,7 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
* @param promise a promise that is always resolved with a boolean argument
|
||||
*/
|
||||
@Override
|
||||
public void canOpenURL(String url, Promise promise) {
|
||||
public void canOpenURL(@Nullable String url, Promise promise) {
|
||||
if (url == null || url.isEmpty()) {
|
||||
promise.reject(new JSApplicationIllegalArgumentException("Invalid URL: " + url));
|
||||
return;
|
||||
@@ -160,8 +163,8 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
// We need Intent.FLAG_ACTIVITY_NEW_TASK since getReactApplicationContext() returns
|
||||
// the ApplicationContext instead of the Activity context.
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
boolean canOpen =
|
||||
intent.resolveActivity(getReactApplicationContext().getPackageManager()) != null;
|
||||
PackageManager packageManager = getReactApplicationContext().getPackageManager();
|
||||
boolean canOpen = packageManager != null && intent.resolveActivity(packageManager) != null;
|
||||
promise.resolve(canOpen);
|
||||
} catch (Exception e) {
|
||||
promise.reject(
|
||||
@@ -179,7 +182,7 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
public void openSettings(Promise promise) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
Activity currentActivity = getCurrentActivity();
|
||||
Activity currentActivity = Preconditions.checkNotNull(getCurrentActivity());
|
||||
String selfPackageName = getReactApplicationContext().getPackageName();
|
||||
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
@@ -219,7 +222,7 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
Intent intent = new Intent(action);
|
||||
|
||||
PackageManager packageManager = getReactApplicationContext().getPackageManager();
|
||||
if (intent.resolveActivity(packageManager) == null) {
|
||||
if (packageManager == null || intent.resolveActivity(packageManager) == null) {
|
||||
promise.reject(
|
||||
new JSApplicationIllegalArgumentException(
|
||||
"Could not launch Intent with action " + action + "."));
|
||||
@@ -235,6 +238,7 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
switch (type) {
|
||||
case String:
|
||||
{
|
||||
// NULLSAFE_FIXME[Parameter Not Nullable]
|
||||
intent.putExtra(name, map.getString(EXTRA_MAP_KEY_FOR_VALUE));
|
||||
break;
|
||||
}
|
||||
@@ -244,11 +248,13 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
// See: https://github.com/facebook/react-native/issues/4141
|
||||
// We might need to find a workaround if this is really an issue
|
||||
Double number = map.getDouble(EXTRA_MAP_KEY_FOR_VALUE);
|
||||
// NULLSAFE_FIXME[Parameter Not Nullable]
|
||||
intent.putExtra(name, number);
|
||||
break;
|
||||
}
|
||||
case Boolean:
|
||||
{
|
||||
// NULLSAFE_FIXME[Parameter Not Nullable]
|
||||
intent.putExtra(name, map.getBoolean(EXTRA_MAP_KEY_FOR_VALUE));
|
||||
break;
|
||||
}
|
||||
@@ -270,8 +276,13 @@ public class IntentModule extends NativeIntentAndroidSpec {
|
||||
Activity currentActivity = getCurrentActivity();
|
||||
|
||||
String selfPackageName = getReactApplicationContext().getPackageName();
|
||||
ComponentName componentName =
|
||||
intent.resolveActivity(getReactApplicationContext().getPackageManager());
|
||||
PackageManager packageManager = getReactApplicationContext().getPackageManager();
|
||||
ComponentName componentName = null;
|
||||
if (packageManager == null) {
|
||||
componentName = intent.getComponent();
|
||||
} else {
|
||||
componentName = intent.resolveActivity(packageManager);
|
||||
}
|
||||
String otherPackageName = (componentName != null ? componentName.getPackageName() : "");
|
||||
|
||||
// If there is no currentActivity or we are launching to a different package we need to set
|
||||
|
||||
+6
-6
@@ -20,10 +20,10 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
@ReactModule(name = NativeVibrationSpec.NAME)
|
||||
public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
internal class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
NativeVibrationSpec(reactContext) {
|
||||
|
||||
public override fun vibrate(durationDouble: Double) {
|
||||
override fun vibrate(durationDouble: Double) {
|
||||
val duration = durationDouble.toInt()
|
||||
val v = getVibrator() ?: return
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
@@ -33,7 +33,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
public override fun vibrateByPattern(pattern: ReadableArray, repeatDouble: Double) {
|
||||
override fun vibrateByPattern(pattern: ReadableArray, repeatDouble: Double) {
|
||||
val repeat = repeatDouble.toInt()
|
||||
val v = getVibrator() ?: return
|
||||
val patternLong = LongArray(pattern.size())
|
||||
@@ -47,7 +47,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
public override fun cancel() {
|
||||
override fun cancel() {
|
||||
getVibrator()?.cancel()
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
getReactApplicationContext().getSystemService(Context.VIBRATOR_SERVICE) as Vibrator?
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val NAME: String = NativeVibrationSpec.NAME
|
||||
companion object {
|
||||
const val NAME: String = NativeVibrationSpec.NAME
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.bridge.DynamicFromObject;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
||||
import com.facebook.react.uimanager.annotations.ReactPropertyHolder;
|
||||
@@ -268,6 +269,7 @@ public class ReactPropertyProcessor extends ProcessorBase {
|
||||
TypeSpec holderClass =
|
||||
TypeSpec.classBuilder(holderClassName)
|
||||
.addSuperinterface(superType)
|
||||
.addAnnotation(UnstableReactNativeAPI.class)
|
||||
.addModifiers(PUBLIC)
|
||||
.addMethod(generateSetPropertySpec(classInfo, properties))
|
||||
.addMethod(getMethods)
|
||||
|
||||
+11
-11
@@ -9,7 +9,7 @@ package com.facebook.react.reactperflogger
|
||||
|
||||
import com.facebook.jni.HybridData
|
||||
|
||||
public abstract class NativeModulePerfLogger protected constructor() {
|
||||
internal abstract class NativeModulePerfLogger protected constructor() {
|
||||
|
||||
@Suppress("NoHungarianNotation") private val mHybridData: HybridData
|
||||
|
||||
@@ -20,25 +20,25 @@ public abstract class NativeModulePerfLogger protected constructor() {
|
||||
|
||||
protected abstract fun initHybrid(): HybridData
|
||||
|
||||
public abstract fun moduleDataCreateStart(moduleName: String, id: Int)
|
||||
abstract fun moduleDataCreateStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleDataCreateEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleDataCreateEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateCacheHit(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateCacheHit(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateConstructStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateConstructStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateConstructEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateConstructEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateSetUpStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateSetUpStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateSetUpEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateSetUpEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateFail(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateFail(moduleName: String, id: Int)
|
||||
|
||||
/** Subclasses will override this method to load their own SO libraries. */
|
||||
@Synchronized
|
||||
|
||||
+9
-8
@@ -21,14 +21,15 @@ import com.facebook.react.bridge.RuntimeExecutor
|
||||
import com.facebook.react.bridge.RuntimeScheduler
|
||||
import com.facebook.react.bridge.UIManager
|
||||
import com.facebook.react.bridge.queue.ReactQueueConfiguration
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
|
||||
import com.facebook.react.common.annotations.VisibleForTesting
|
||||
import com.facebook.react.internal.turbomodule.core.interfaces.TurboModuleRegistry
|
||||
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder
|
||||
import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHolder
|
||||
|
||||
@DoNotStrip
|
||||
@DeprecatedInNewArchitecture
|
||||
@Deprecated(
|
||||
message =
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) : CatalystInstance {
|
||||
|
||||
override fun handleMemoryPressure(level: Int) {
|
||||
@@ -147,23 +148,23 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
|
||||
throw UnsupportedOperationException("Unimplemented method 'setGlobalVariable'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry) {
|
||||
throw UnsupportedOperationException("Unimplemented method 'setTurboModuleRegistry'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun setFabricUIManager(fabricUIManager: UIManager) {
|
||||
throw UnsupportedOperationException("Unimplemented method 'setFabricUIManager'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun getFabricUIManager(): UIManager {
|
||||
throw UnsupportedOperationException("Unimplemented method 'getFabricUIManager'")
|
||||
}
|
||||
|
||||
+2
@@ -774,6 +774,8 @@ public class UIImplementation {
|
||||
mViewManagers.invalidate();
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mOperationsQueue.setViewHierarchyUpdateDebugListener(listener);
|
||||
|
||||
+2
@@ -687,6 +687,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mUIImplementation.setViewHierarchyUpdateDebugListener(listener);
|
||||
|
||||
+2
@@ -609,6 +609,8 @@ public class UIViewOperationQueue {
|
||||
return mNativeViewHierarchyManager;
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mViewHierarchyUpdateDebugListener = listener;
|
||||
|
||||
+7
-11
@@ -5,26 +5,22 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager.debug;
|
||||
package com.facebook.react.uimanager.debug
|
||||
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
|
||||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
|
||||
|
||||
/**
|
||||
* A listener that is notified about view hierarchy update events. This listener should only be used
|
||||
* for debug purposes and should not affect application state.
|
||||
*
|
||||
* <p>NB: while onViewHierarchyUpdateFinished will always be called from the UI thread, there are no
|
||||
* NB: while [onViewHierarchyUpdateFinished] will always be called from the UI thread, there are no
|
||||
* guarantees what thread onViewHierarchyUpdateEnqueued is called on.
|
||||
*/
|
||||
@DeprecatedInNewArchitecture
|
||||
public interface NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
|
||||
/**
|
||||
* Called when {@link UIManagerModule} enqueues a UI batch to be dispatched to the main thread.
|
||||
*/
|
||||
void onViewHierarchyUpdateEnqueued();
|
||||
internal interface NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
/** Called when `UIManagerModule` enqueues a UI batch to be dispatched to the main thread. */
|
||||
fun onViewHierarchyUpdateEnqueued()
|
||||
|
||||
/** Called from the main thread after a UI batch has been applied to all root views. */
|
||||
void onViewHierarchyUpdateFinished();
|
||||
fun onViewHierarchyUpdateFinished()
|
||||
}
|
||||
-138
@@ -1,138 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager.util;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.R;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/** Finds views in React Native view hierarchies */
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public class ReactFindViewUtil {
|
||||
|
||||
private static final List<OnViewFoundListener> mOnViewFoundListeners = new ArrayList<>();
|
||||
private static final Map<OnMultipleViewsFoundListener, Set<String>>
|
||||
mOnMultipleViewsFoundListener = new HashMap<>();
|
||||
|
||||
/** Callback to be invoked when a react native view has been found */
|
||||
public interface OnViewFoundListener {
|
||||
|
||||
/** Returns the native id of the view of interest */
|
||||
String getNativeId();
|
||||
|
||||
/**
|
||||
* Called when the view has been found
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
void onViewFound(View view);
|
||||
}
|
||||
|
||||
/** Callback to be invoked when all react native views with geiven NativeIds have been found */
|
||||
public interface OnMultipleViewsFoundListener {
|
||||
|
||||
void onViewFound(View view, String nativeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a view that is tagged with {@param nativeId} as its nativeID prop under the {@param root}
|
||||
* view hierarchy. Returns the view if found, null otherwise.
|
||||
*
|
||||
* @param root root of the view hierarchy from which to find the view
|
||||
*/
|
||||
public static @Nullable View findView(View root, String nativeId) {
|
||||
String tag = getNativeId(root);
|
||||
if (tag != null && tag.equals(nativeId)) {
|
||||
return root;
|
||||
}
|
||||
|
||||
if (root instanceof ViewGroup) {
|
||||
ViewGroup viewGroup = (ViewGroup) root;
|
||||
for (int i = 0; i < viewGroup.getChildCount(); i++) {
|
||||
View view = findView(viewGroup.getChildAt(i), nativeId);
|
||||
if (view != null) {
|
||||
return view;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a view tagged with {@param onViewFoundListener}'s nativeID in the given {@param root}
|
||||
* view hierarchy. If the view does not exist yet due to React Native's async layout, a listener
|
||||
* will be added. When the view is found, the {@param onViewFoundListener} will be invoked.
|
||||
*
|
||||
* @param root root of the view hierarchy from which to find the view
|
||||
*/
|
||||
public static void findView(View root, OnViewFoundListener onViewFoundListener) {
|
||||
View view = findView(root, onViewFoundListener.getNativeId());
|
||||
if (view != null) {
|
||||
onViewFoundListener.onViewFound(view);
|
||||
}
|
||||
addViewListener(onViewFoundListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers an OnViewFoundListener to be invoked when a view with a matching nativeID is found.
|
||||
* Remove this listener using removeViewListener() if it's no longer needed.
|
||||
*/
|
||||
public static void addViewListener(OnViewFoundListener onViewFoundListener) {
|
||||
mOnViewFoundListeners.add(onViewFoundListener);
|
||||
}
|
||||
|
||||
/** Removes an OnViewFoundListener previously registered with addViewListener(). */
|
||||
public static void removeViewListener(OnViewFoundListener onViewFoundListener) {
|
||||
mOnViewFoundListeners.remove(onViewFoundListener);
|
||||
}
|
||||
|
||||
public static void addViewsListener(OnMultipleViewsFoundListener listener, Set<String> ids) {
|
||||
mOnMultipleViewsFoundListener.put(listener, ids);
|
||||
}
|
||||
|
||||
public static void removeViewsListener(OnMultipleViewsFoundListener listener) {
|
||||
mOnMultipleViewsFoundListener.remove(listener);
|
||||
}
|
||||
|
||||
/** Invokes any listeners that are listening on this {@param view}'s native id */
|
||||
public static void notifyViewRendered(View view) {
|
||||
String nativeId = getNativeId(view);
|
||||
if (nativeId == null) {
|
||||
return;
|
||||
}
|
||||
Iterator<OnViewFoundListener> iterator = mOnViewFoundListeners.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
OnViewFoundListener listener = iterator.next();
|
||||
if (nativeId.equals(listener.getNativeId())) {
|
||||
listener.onViewFound(view);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
for (Map.Entry<OnMultipleViewsFoundListener, Set<String>> entry :
|
||||
mOnMultipleViewsFoundListener.entrySet()) {
|
||||
Set<String> nativeIds = entry.getValue();
|
||||
if (nativeIds != null && nativeIds.contains(nativeId)) {
|
||||
entry.getKey().onViewFound(view, nativeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static @Nullable String getNativeId(View view) {
|
||||
Object tag = view.getTag(R.id.view_tag_native_id);
|
||||
return tag instanceof String ? (String) tag : null;
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager.util
|
||||
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.facebook.react.R
|
||||
import java.util.ArrayList
|
||||
import java.util.HashMap
|
||||
|
||||
/** Finds views in React Native view hierarchies */
|
||||
public object ReactFindViewUtil {
|
||||
|
||||
private val onViewFoundListeners: MutableList<OnViewFoundListener> = ArrayList()
|
||||
private val onMultipleViewsFoundListener: MutableMap<OnMultipleViewsFoundListener, Set<String>> =
|
||||
HashMap()
|
||||
|
||||
/** Callback to be invoked when a react native view has been found */
|
||||
public interface OnViewFoundListener {
|
||||
/** Returns the native id of the view of interest */
|
||||
public fun getNativeId(): String
|
||||
|
||||
/**
|
||||
* Called when the view has been found
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
public fun onViewFound(view: View)
|
||||
}
|
||||
|
||||
/** Callback to be invoked when all react native views with geiven NativeIds have been found */
|
||||
public fun interface OnMultipleViewsFoundListener {
|
||||
public fun onViewFound(view: View, nativeId: String)
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a view that is tagged with {@param nativeId} as its nativeID prop under the {@param root}
|
||||
* view hierarchy. Returns the view if found, null otherwise.
|
||||
*
|
||||
* @param root root of the view hierarchy from which to find the view
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun findView(root: View, nativeId: String): View? {
|
||||
if (getNativeId(root) == nativeId) {
|
||||
return root
|
||||
}
|
||||
|
||||
if (root is ViewGroup) {
|
||||
for (i in 0..<root.childCount) {
|
||||
val view = findView(root.getChildAt(i), nativeId)
|
||||
if (view != null) {
|
||||
return view
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a view tagged with {@param onViewFoundListener}'s nativeID in the given {@param root}
|
||||
* view hierarchy. If the view does not exist yet due to React Native's async layout, a listener
|
||||
* will be added. When the view is found, the {@param onViewFoundListener} will be invoked.
|
||||
*
|
||||
* @param root root of the view hierarchy from which to find the view
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun findView(root: View, onViewFoundListener: OnViewFoundListener): Unit {
|
||||
val view = findView(root, onViewFoundListener.getNativeId())
|
||||
if (view != null) {
|
||||
onViewFoundListener.onViewFound(view)
|
||||
}
|
||||
addViewListener(onViewFoundListener)
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers an OnViewFoundListener to be invoked when a view with a matching nativeID is found.
|
||||
* Remove this listener using removeViewListener() if it's no longer needed.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun addViewListener(onViewFoundListener: OnViewFoundListener): Unit {
|
||||
onViewFoundListeners.add(onViewFoundListener)
|
||||
}
|
||||
|
||||
/** Removes an OnViewFoundListener previously registered with addViewListener(). */
|
||||
@JvmStatic
|
||||
public fun removeViewListener(onViewFoundListener: OnViewFoundListener): Unit {
|
||||
onViewFoundListeners.remove(onViewFoundListener)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public fun addViewsListener(listener: OnMultipleViewsFoundListener, ids: Set<String>): Unit {
|
||||
onMultipleViewsFoundListener[listener] = ids
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public fun removeViewsListener(listener: OnMultipleViewsFoundListener): Unit {
|
||||
onMultipleViewsFoundListener.remove(listener)
|
||||
}
|
||||
|
||||
/** Invokes any listeners that are listening on this {@param view}'s native id */
|
||||
@JvmStatic
|
||||
public fun notifyViewRendered(view: View): Unit {
|
||||
val nativeId = getNativeId(view) ?: return
|
||||
val iterator = onViewFoundListeners.iterator()
|
||||
while (iterator.hasNext()) {
|
||||
val listener = iterator.next()
|
||||
if (nativeId == listener.getNativeId()) {
|
||||
listener.onViewFound(view)
|
||||
iterator.remove()
|
||||
}
|
||||
}
|
||||
onMultipleViewsFoundListener.forEach { (listener, nativeIds) ->
|
||||
if (nativeId in nativeIds) {
|
||||
listener.onViewFound(view, nativeId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getNativeId(view: View): String? {
|
||||
val tag = view.getTag(R.id.view_tag_native_id)
|
||||
return tag as? String
|
||||
}
|
||||
}
|
||||
+113
-98
@@ -17,108 +17,24 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
||||
import com.facebook.react.uimanager.SimpleViewManager
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate
|
||||
import com.facebook.react.viewmanagers.DebuggingOverlayManagerDelegate
|
||||
import com.facebook.react.viewmanagers.DebuggingOverlayManagerInterface
|
||||
|
||||
@ReactModule(name = DebuggingOverlayManager.REACT_CLASS)
|
||||
public class DebuggingOverlayManager : SimpleViewManager<DebuggingOverlay>() {
|
||||
public class DebuggingOverlayManager :
|
||||
SimpleViewManager<DebuggingOverlay>(), DebuggingOverlayManagerInterface<DebuggingOverlay> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<DebuggingOverlay> =
|
||||
DebuggingOverlayManagerDelegate(this)
|
||||
|
||||
public override fun getDelegate(): ViewManagerDelegate<DebuggingOverlay> = delegate
|
||||
|
||||
override fun receiveCommand(view: DebuggingOverlay, commandId: String, args: ReadableArray?) {
|
||||
when (commandId) {
|
||||
"highlightTraceUpdates" -> {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedTraceUpdates = args.getArray(0)
|
||||
val formattedTraceUpdates = mutableListOf<TraceUpdate>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedTraceUpdates.size()) {
|
||||
val traceUpdate = providedTraceUpdates.getMap(i)
|
||||
val serializedRectangle = traceUpdate.getMap("rectangle")
|
||||
if (serializedRectangle == null) {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field is" +
|
||||
" null"))
|
||||
successfullyParsedPayload = false
|
||||
break
|
||||
}
|
||||
|
||||
val id = traceUpdate.getInt("id")
|
||||
val color = traceUpdate.getInt("color")
|
||||
|
||||
try {
|
||||
val left = serializedRectangle.getDouble("x").toFloat()
|
||||
val top = serializedRectangle.getDouble("y").toFloat()
|
||||
val right = (left + serializedRectangle.getDouble("width")).toFloat()
|
||||
val bottom = (top + serializedRectangle.getDouble("height")).toFloat()
|
||||
|
||||
val rectangle = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
formattedTraceUpdates.add(TraceUpdate(id, rectangle, color))
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field should" +
|
||||
" have x, y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setTraceUpdates(formattedTraceUpdates)
|
||||
}
|
||||
}
|
||||
"highlightElements" -> {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedElements = args.getArray(0)
|
||||
val elementsRectangles = mutableListOf<RectF>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedElements.size()) {
|
||||
val element = providedElements.getMap(i)
|
||||
|
||||
try {
|
||||
val left = element.getDouble("x").toFloat()
|
||||
val top = element.getDouble("y").toFloat()
|
||||
val right = (left + element.getDouble("width")).toFloat()
|
||||
val bottom = (top + element.getDouble("height")).toFloat()
|
||||
val rect = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
elementsRectangles.add(rect)
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting elements: every element should have x," +
|
||||
" y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setHighlightedElementsRectangles(elementsRectangles)
|
||||
}
|
||||
}
|
||||
"clearElementsHighlights" -> {
|
||||
view.clearElementsHighlights()
|
||||
}
|
||||
"highlightTraceUpdates" -> highlightTraceUpdates(view, args)
|
||||
"highlightElements" -> highlightElements(view, args)
|
||||
"clearElementsHighlights" -> clearElementsHighlights(view)
|
||||
else -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
@@ -127,6 +43,105 @@ public class DebuggingOverlayManager : SimpleViewManager<DebuggingOverlay>() {
|
||||
}
|
||||
}
|
||||
|
||||
public override fun highlightTraceUpdates(view: DebuggingOverlay, args: ReadableArray?): Unit {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedTraceUpdates = args.getArray(0)
|
||||
val formattedTraceUpdates = mutableListOf<TraceUpdate>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedTraceUpdates.size()) {
|
||||
val traceUpdate = providedTraceUpdates.getMap(i)
|
||||
val serializedRectangle = traceUpdate.getMap("rectangle")
|
||||
if (serializedRectangle == null) {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field is null"))
|
||||
successfullyParsedPayload = false
|
||||
break
|
||||
}
|
||||
|
||||
val id = traceUpdate.getInt("id")
|
||||
val color = traceUpdate.getInt("color")
|
||||
|
||||
try {
|
||||
val left = serializedRectangle.getDouble("x").toFloat()
|
||||
val top = serializedRectangle.getDouble("y").toFloat()
|
||||
val right = (left + serializedRectangle.getDouble("width")).toFloat()
|
||||
val bottom = (top + serializedRectangle.getDouble("height")).toFloat()
|
||||
|
||||
val rectangle = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
formattedTraceUpdates.add(TraceUpdate(id, rectangle, color))
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field should" +
|
||||
" have x, y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setTraceUpdates(formattedTraceUpdates)
|
||||
}
|
||||
}
|
||||
|
||||
public override fun highlightElements(view: DebuggingOverlay, args: ReadableArray?): Unit {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedElements = args.getArray(0)
|
||||
val elementsRectangles = mutableListOf<RectF>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedElements.size()) {
|
||||
val element = providedElements.getMap(i)
|
||||
|
||||
try {
|
||||
val left = element.getDouble("x").toFloat()
|
||||
val top = element.getDouble("y").toFloat()
|
||||
val right = (left + element.getDouble("width")).toFloat()
|
||||
val bottom = (top + element.getDouble("height")).toFloat()
|
||||
val rect = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
elementsRectangles.add(rect)
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting elements: every element should have x," +
|
||||
" y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setHighlightedElementsRectangles(elementsRectangles)
|
||||
}
|
||||
}
|
||||
|
||||
public override fun clearElementsHighlights(view: DebuggingOverlay): Unit {
|
||||
view.clearElementsHighlights()
|
||||
}
|
||||
|
||||
public override fun createViewInstance(context: ThemedReactContext): DebuggingOverlay {
|
||||
return DebuggingOverlay(context)
|
||||
}
|
||||
|
||||
+4
-1
@@ -19,6 +19,7 @@ public object ImageResizeMode {
|
||||
private const val RESIZE_MODE_STRETCH = "stretch"
|
||||
private const val RESIZE_MODE_CENTER = "center"
|
||||
private const val RESIZE_MODE_REPEAT = "repeat"
|
||||
private const val RESIZE_MODE_NONE = "none"
|
||||
|
||||
/** Converts JS resize modes into `ScalingUtils.ScaleType`. See `ImageResizeMode.js`. */
|
||||
@JvmStatic
|
||||
@@ -30,6 +31,7 @@ public object ImageResizeMode {
|
||||
RESIZE_MODE_CENTER -> return ScalingUtils.ScaleType.CENTER_INSIDE
|
||||
// Handled via a combination of ScaleType and TileMode
|
||||
RESIZE_MODE_REPEAT -> return ScaleTypeStartInside.INSTANCE
|
||||
RESIZE_MODE_NONE -> return ScaleTypeStartInside.INSTANCE
|
||||
}
|
||||
|
||||
if (resizeModeValue != null) {
|
||||
@@ -45,7 +47,8 @@ public object ImageResizeMode {
|
||||
if (RESIZE_MODE_CONTAIN == resizeModeValue ||
|
||||
RESIZE_MODE_COVER == resizeModeValue ||
|
||||
RESIZE_MODE_STRETCH == resizeModeValue ||
|
||||
RESIZE_MODE_CENTER == resizeModeValue) {
|
||||
RESIZE_MODE_CENTER == resizeModeValue ||
|
||||
RESIZE_MODE_NONE == resizeModeValue) {
|
||||
return TileMode.CLAMP
|
||||
}
|
||||
if (RESIZE_MODE_REPEAT == resizeModeValue) {
|
||||
|
||||
+8
@@ -57,6 +57,14 @@ public class ReactModalHostManager :
|
||||
view.statusBarTranslucent = statusBarTranslucent
|
||||
}
|
||||
|
||||
@ReactProp(name = "navigationBarTranslucent")
|
||||
public override fun setNavigationBarTranslucent(
|
||||
view: ReactModalHostView,
|
||||
navigationBarTranslucent: Boolean
|
||||
) {
|
||||
view.navigationBarTranslucent = navigationBarTranslucent
|
||||
}
|
||||
|
||||
@ReactProp(name = "hardwareAccelerated")
|
||||
public override fun setHardwareAccelerated(
|
||||
view: ReactModalHostView,
|
||||
|
||||
+13
-1
@@ -48,6 +48,7 @@ import com.facebook.react.uimanager.events.EventDispatcher
|
||||
import com.facebook.react.views.common.ContextUtils
|
||||
import com.facebook.react.views.view.ReactViewGroup
|
||||
import com.facebook.react.views.view.setStatusBarTranslucency
|
||||
import com.facebook.react.views.view.setSystemBarsTranslucency
|
||||
import java.util.Objects
|
||||
|
||||
/**
|
||||
@@ -79,6 +80,12 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
createNewDialog = true
|
||||
}
|
||||
|
||||
public var navigationBarTranslucent: Boolean = false
|
||||
set(value) {
|
||||
field = value
|
||||
createNewDialog = true
|
||||
}
|
||||
|
||||
public var animationType: String? = null
|
||||
set(value) {
|
||||
field = value
|
||||
@@ -335,7 +342,12 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
}
|
||||
}
|
||||
|
||||
dialogWindow.setStatusBarTranslucency(statusBarTranslucent)
|
||||
// Navigation bar cannot be translucent without status bar being translucent too
|
||||
dialogWindow.setSystemBarsTranslucency(navigationBarTranslucent)
|
||||
|
||||
if (!navigationBarTranslucent) {
|
||||
dialogWindow.setStatusBarTranslucency(statusBarTranslucent)
|
||||
}
|
||||
|
||||
if (transparent) {
|
||||
dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import com.facebook.react.bridge.JSApplicationIllegalArgumentException
|
||||
* Controls an enclosing [ProgressBar]. Exists so that the [ProgressBar] can be recreated if the
|
||||
* style would change.
|
||||
*/
|
||||
public class ProgressBarContainerView(context: Context) : FrameLayout(context) {
|
||||
internal class ProgressBarContainerView(context: Context) : FrameLayout(context) {
|
||||
|
||||
internal var color: Int? = null
|
||||
internal var indeterminate = true
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import com.facebook.yoga.YogaNode
|
||||
* Node responsible for holding the style of the ProgressBar, see under [ ] for possible styles.
|
||||
* ReactProgressBarViewManager manages how this style is applied to the ProgressBar.
|
||||
*/
|
||||
public class ProgressBarShadowNode : LayoutShadowNode(), YogaMeasureFunction {
|
||||
internal class ProgressBarShadowNode : LayoutShadowNode(), YogaMeasureFunction {
|
||||
private val height: SparseIntArray = SparseIntArray()
|
||||
private val width: SparseIntArray = SparseIntArray()
|
||||
private val measured: MutableSet<Int> = HashSet()
|
||||
@@ -31,7 +31,7 @@ public class ProgressBarShadowNode : LayoutShadowNode(), YogaMeasureFunction {
|
||||
}
|
||||
|
||||
@set:ReactProp(name = ReactProgressBarViewManager.PROP_STYLE)
|
||||
public var style: String? = ReactProgressBarViewManager.DEFAULT_STYLE
|
||||
var style: String? = ReactProgressBarViewManager.DEFAULT_STYLE
|
||||
set(value) {
|
||||
field = value ?: ReactProgressBarViewManager.DEFAULT_STYLE
|
||||
}
|
||||
|
||||
+25
-25
@@ -34,7 +34,7 @@ import java.util.WeakHashMap
|
||||
* a new one with the style given.
|
||||
*/
|
||||
@ReactModule(name = ReactProgressBarViewManager.REACT_CLASS)
|
||||
public class ReactProgressBarViewManager :
|
||||
internal class ReactProgressBarViewManager :
|
||||
BaseViewManager<ProgressBarContainerView, ProgressBarShadowNode>(),
|
||||
AndroidProgressBarManagerInterface<ProgressBarContainerView> {
|
||||
private val measuredStyles = WeakHashMap<Int, Pair<Int, Int>>()
|
||||
@@ -42,60 +42,60 @@ public class ReactProgressBarViewManager :
|
||||
private val delegate: ViewManagerDelegate<ProgressBarContainerView> =
|
||||
AndroidProgressBarManagerDelegate(this)
|
||||
|
||||
public override fun getName(): String = REACT_CLASS
|
||||
override fun getName(): String = REACT_CLASS
|
||||
|
||||
protected override fun createViewInstance(context: ThemedReactContext): ProgressBarContainerView {
|
||||
override fun createViewInstance(context: ThemedReactContext): ProgressBarContainerView {
|
||||
return ProgressBarContainerView(context)
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_STYLE)
|
||||
public override fun setStyleAttr(view: ProgressBarContainerView, styleName: String?) {
|
||||
override fun setStyleAttr(view: ProgressBarContainerView, styleName: String?) {
|
||||
view.setStyle(styleName)
|
||||
}
|
||||
|
||||
@ReactProp(name = ViewProps.COLOR, customType = "Color")
|
||||
public override fun setColor(view: ProgressBarContainerView, color: Int?) {
|
||||
override fun setColor(view: ProgressBarContainerView, color: Int?) {
|
||||
view.color = color
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_INDETERMINATE)
|
||||
public override fun setIndeterminate(view: ProgressBarContainerView, indeterminate: Boolean) {
|
||||
override fun setIndeterminate(view: ProgressBarContainerView, indeterminate: Boolean) {
|
||||
view.indeterminate = indeterminate
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_PROGRESS)
|
||||
public override fun setProgress(view: ProgressBarContainerView, progress: Double) {
|
||||
override fun setProgress(view: ProgressBarContainerView, progress: Double) {
|
||||
view.progress = progress
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_ANIMATING)
|
||||
public override fun setAnimating(view: ProgressBarContainerView, animating: Boolean) {
|
||||
override fun setAnimating(view: ProgressBarContainerView, animating: Boolean) {
|
||||
view.animating = animating
|
||||
}
|
||||
|
||||
public override fun setTestID(view: ProgressBarContainerView, value: String?) {
|
||||
override fun setTestID(view: ProgressBarContainerView, value: String?) {
|
||||
super.setTestId(view, value)
|
||||
}
|
||||
|
||||
@ReactProp(name = PROP_ATTR)
|
||||
public override fun setTypeAttr(view: ProgressBarContainerView, value: String?): Unit = Unit
|
||||
override fun setTypeAttr(view: ProgressBarContainerView, value: String?): Unit = Unit
|
||||
|
||||
public override fun createShadowNodeInstance(): ProgressBarShadowNode = ProgressBarShadowNode()
|
||||
override fun createShadowNodeInstance(): ProgressBarShadowNode = ProgressBarShadowNode()
|
||||
|
||||
public override fun getShadowNodeClass(): Class<ProgressBarShadowNode> =
|
||||
override fun getShadowNodeClass(): Class<ProgressBarShadowNode> =
|
||||
ProgressBarShadowNode::class.java
|
||||
|
||||
public override fun updateExtraData(root: ProgressBarContainerView, extraData: Any) {
|
||||
override fun updateExtraData(root: ProgressBarContainerView, extraData: Any) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
protected override fun onAfterUpdateTransaction(view: ProgressBarContainerView) {
|
||||
override fun onAfterUpdateTransaction(view: ProgressBarContainerView) {
|
||||
view.apply()
|
||||
}
|
||||
|
||||
protected override fun getDelegate(): ViewManagerDelegate<ProgressBarContainerView> = delegate
|
||||
override fun getDelegate(): ViewManagerDelegate<ProgressBarContainerView> = delegate
|
||||
|
||||
public override fun measure(
|
||||
override fun measure(
|
||||
context: Context,
|
||||
localData: ReadableMap,
|
||||
props: ReadableMap,
|
||||
@@ -119,15 +119,15 @@ public class ReactProgressBarViewManager :
|
||||
toDIPFromPixel(value.first.toFloat()), toDIPFromPixel(value.second.toFloat()))
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val REACT_CLASS: String = "AndroidProgressBar"
|
||||
companion object {
|
||||
const val REACT_CLASS: String = "AndroidProgressBar"
|
||||
|
||||
internal const val PROP_STYLE: String = "styleAttr"
|
||||
internal const val PROP_ATTR: String = "typeAttr"
|
||||
internal const val PROP_INDETERMINATE: String = "indeterminate"
|
||||
internal const val PROP_PROGRESS: String = "progress"
|
||||
internal const val PROP_ANIMATING: String = "animating"
|
||||
internal const val DEFAULT_STYLE: String = "Normal"
|
||||
const val PROP_STYLE: String = "styleAttr"
|
||||
const val PROP_ATTR: String = "typeAttr"
|
||||
const val PROP_INDETERMINATE: String = "indeterminate"
|
||||
const val PROP_PROGRESS: String = "progress"
|
||||
const val PROP_ANIMATING: String = "animating"
|
||||
const val DEFAULT_STYLE: String = "Normal"
|
||||
|
||||
private val progressBarCtorLock = Any()
|
||||
|
||||
@@ -136,7 +136,7 @@ public class ReactProgressBarViewManager :
|
||||
* ProgressBar constructor that may cause crashes when two ProgressBars are constructed at the
|
||||
* same time on two different threads. This static ctor wrapper protects against that.
|
||||
*/
|
||||
public fun createProgressBar(context: Context?, style: Int): ProgressBar {
|
||||
fun createProgressBar(context: Context?, style: Int): ProgressBar {
|
||||
synchronized(progressBarCtorLock) {
|
||||
return ProgressBar(context, null, style)
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import com.facebook.react.uimanager.StateWrapper
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.UIManagerModule
|
||||
|
||||
public class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
|
||||
internal class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
|
||||
ViewGroup(reactContext) {
|
||||
internal var stateWrapper: StateWrapper? = null
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ import com.facebook.react.viewmanagers.SafeAreaViewManagerInterface
|
||||
|
||||
/** View manager for [ReactSafeAreaView] components. */
|
||||
@ReactModule(name = ReactSafeAreaViewManager.REACT_CLASS)
|
||||
public class ReactSafeAreaViewManager() :
|
||||
internal class ReactSafeAreaViewManager() :
|
||||
ViewGroupManager<ReactSafeAreaView>(), SafeAreaViewManagerInterface<ReactSafeAreaView> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<ReactSafeAreaView> = SafeAreaViewManagerDelegate(this)
|
||||
@@ -45,7 +45,7 @@ public class ReactSafeAreaViewManager() :
|
||||
return null
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val REACT_CLASS: String = "RCTSafeAreaView"
|
||||
internal companion object {
|
||||
const val REACT_CLASS: String = "RCTSafeAreaView"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-13
@@ -103,8 +103,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
||||
private @Nullable Runnable mPostTouchRunnable;
|
||||
private boolean mRemoveClippedSubviews;
|
||||
private boolean mScrollEnabled = true;
|
||||
private boolean mPreventReentry = false;
|
||||
private boolean mEnableSyncOnScroll = false;
|
||||
private boolean mSendMomentumEvents;
|
||||
private @Nullable FpsListener mFpsListener = null;
|
||||
private @Nullable String mScrollPerfTag;
|
||||
@@ -231,10 +229,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
||||
mScrollEnabled = scrollEnabled;
|
||||
}
|
||||
|
||||
public void setEnableSyncOnScroll(boolean enableSyncOnScroll) {
|
||||
mEnableSyncOnScroll = enableSyncOnScroll;
|
||||
}
|
||||
|
||||
public void setPagingEnabled(boolean pagingEnabled) {
|
||||
mPagingEnabled = pagingEnabled;
|
||||
}
|
||||
@@ -492,16 +486,10 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
||||
if (mRemoveClippedSubviews) {
|
||||
updateClippingRect();
|
||||
}
|
||||
if (mPreventReentry) {
|
||||
return;
|
||||
}
|
||||
mPreventReentry = true;
|
||||
ReactScrollViewHelper.updateStateOnScrollChanged(
|
||||
this,
|
||||
mOnScrollDispatchHelper.getXFlingVelocity(),
|
||||
mOnScrollDispatchHelper.getYFlingVelocity(),
|
||||
mEnableSyncOnScroll);
|
||||
mPreventReentry = false;
|
||||
mOnScrollDispatchHelper.getYFlingVelocity());
|
||||
}
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
|
||||
-5
@@ -95,11 +95,6 @@ public class ReactHorizontalScrollViewManager extends ViewGroupManager<ReactHori
|
||||
view.setDecelerationRate(decelerationRate);
|
||||
}
|
||||
|
||||
@ReactProp(name = "enableSyncOnScroll")
|
||||
public void setEnableSyncOnScroll(ReactHorizontalScrollView view, boolean enableSyncOnScroll) {
|
||||
view.setEnableSyncOnScroll(enableSyncOnScroll);
|
||||
}
|
||||
|
||||
@ReactProp(name = "disableIntervalMomentum")
|
||||
public void setDisableIntervalMomentum(
|
||||
ReactHorizontalScrollView view, boolean disableIntervalMomentum) {
|
||||
|
||||
+1
-13
@@ -102,11 +102,9 @@ public class ReactScrollView extends ScrollView
|
||||
private @Nullable Runnable mPostTouchRunnable;
|
||||
private boolean mRemoveClippedSubviews;
|
||||
private boolean mScrollEnabled = true;
|
||||
private boolean mPreventReentry = false;
|
||||
private boolean mSendMomentumEvents;
|
||||
private @Nullable FpsListener mFpsListener = null;
|
||||
private @Nullable String mScrollPerfTag;
|
||||
private boolean mEnableSyncOnScroll = false;
|
||||
private @Nullable Drawable mEndBackground;
|
||||
private int mEndFillColor = Color.TRANSPARENT;
|
||||
private boolean mDisableIntervalMomentum = false;
|
||||
@@ -210,10 +208,6 @@ public class ReactScrollView extends ScrollView
|
||||
mScrollPerfTag = scrollPerfTag;
|
||||
}
|
||||
|
||||
public void setEnableSyncOnScroll(boolean enableSyncOnScroll) {
|
||||
mEnableSyncOnScroll = enableSyncOnScroll;
|
||||
}
|
||||
|
||||
public void setScrollEnabled(boolean scrollEnabled) {
|
||||
mScrollEnabled = scrollEnabled;
|
||||
}
|
||||
@@ -418,16 +412,10 @@ public class ReactScrollView extends ScrollView
|
||||
if (mRemoveClippedSubviews) {
|
||||
updateClippingRect();
|
||||
}
|
||||
if (mPreventReentry) {
|
||||
return;
|
||||
}
|
||||
mPreventReentry = true;
|
||||
ReactScrollViewHelper.updateStateOnScrollChanged(
|
||||
this,
|
||||
mOnScrollDispatchHelper.getXFlingVelocity(),
|
||||
mOnScrollDispatchHelper.getYFlingVelocity(),
|
||||
mEnableSyncOnScroll);
|
||||
mPreventReentry = false;
|
||||
mOnScrollDispatchHelper.getYFlingVelocity());
|
||||
}
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
|
||||
+2
-20
@@ -103,7 +103,6 @@ public object ReactScrollViewHelper {
|
||||
scrollEventType: ScrollEventType,
|
||||
xVelocity: Float,
|
||||
yVelocity: Float,
|
||||
experimental_isSynchronous: Boolean = false,
|
||||
) where T : HasScrollEventThrottle?, T : ViewGroup {
|
||||
val now = System.currentTimeMillis()
|
||||
// Throttle the scroll event if scrollEventThrottle is set to be equal or more than 17 ms.
|
||||
@@ -138,8 +137,7 @@ public object ReactScrollViewHelper {
|
||||
contentView.width,
|
||||
contentView.height,
|
||||
scrollView.width,
|
||||
scrollView.height,
|
||||
experimental_isSynchronous))
|
||||
scrollView.height))
|
||||
scrollView.lastScrollDispatchTime = now
|
||||
}
|
||||
}
|
||||
@@ -374,29 +372,13 @@ public object ReactScrollViewHelper {
|
||||
T : HasScrollEventThrottle?,
|
||||
T : HasScrollState?,
|
||||
T : HasStateWrapper?,
|
||||
T : ViewGroup {
|
||||
updateStateOnScrollChanged(scrollView, xVelocity, yVelocity, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public fun <T> updateStateOnScrollChanged(
|
||||
scrollView: T,
|
||||
xVelocity: Float,
|
||||
yVelocity: Float,
|
||||
experimental_synchronous: Boolean,
|
||||
) where
|
||||
T : HasFlingAnimator?,
|
||||
T : HasScrollEventThrottle?,
|
||||
T : HasScrollState?,
|
||||
T : HasStateWrapper?,
|
||||
T : ViewGroup {
|
||||
// Race an UpdateState with every onScroll. This makes it more likely that, in Fabric,
|
||||
// when JS processes the scroll event, the C++ ShadowNode representation will have a
|
||||
// "more correct" scroll position. It will frequently be /incorrect/ but this decreases
|
||||
// the error as much as possible.
|
||||
updateFabricScrollState(scrollView, scrollView.scrollX, scrollView.scrollY)
|
||||
emitScrollEvent(
|
||||
scrollView, ScrollEventType.SCROLL, xVelocity, yVelocity, experimental_synchronous)
|
||||
emitScrollEvent(scrollView, xVelocity, yVelocity)
|
||||
}
|
||||
|
||||
public fun <T> registerFlingAnimator(scrollView: T) where
|
||||
|
||||
-5
@@ -167,11 +167,6 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
|
||||
view.setScrollPerfTag(scrollPerfTag);
|
||||
}
|
||||
|
||||
@ReactProp(name = "enableSyncOnScroll")
|
||||
public void setEnableSyncOnScroll(ReactScrollView view, boolean value) {
|
||||
view.setEnableSyncOnScroll(value);
|
||||
}
|
||||
|
||||
@ReactProp(name = "pagingEnabled")
|
||||
public void setPagingEnabled(ReactScrollView view, boolean pagingEnabled) {
|
||||
view.setPagingEnabled(pagingEnabled);
|
||||
|
||||
+1
-11
@@ -29,7 +29,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
private var scrollViewHeight = 0
|
||||
private var scrollEventType: ScrollEventType? = null
|
||||
private var timestamp: Long = 0
|
||||
private var experimental_isSynchronous = false
|
||||
|
||||
override fun onDispose() {
|
||||
try {
|
||||
@@ -53,7 +52,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
contentHeight: Int,
|
||||
scrollViewWidth: Int,
|
||||
scrollViewHeight: Int,
|
||||
experimental_isSynchronous: Boolean,
|
||||
) {
|
||||
super.init(surfaceId, viewTag)
|
||||
this.scrollEventType = scrollEventType
|
||||
@@ -66,7 +64,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
this.scrollViewWidth = scrollViewWidth
|
||||
this.scrollViewHeight = scrollViewHeight
|
||||
this.timestamp = SystemClock.uptimeMillis()
|
||||
this.experimental_isSynchronous = experimental_isSynchronous
|
||||
}
|
||||
|
||||
override fun getEventName(): String =
|
||||
@@ -74,10 +71,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
|
||||
override fun canCoalesce(): Boolean = scrollEventType == ScrollEventType.SCROLL
|
||||
|
||||
override fun experimental_isSynchronous(): Boolean {
|
||||
return experimental_isSynchronous
|
||||
}
|
||||
|
||||
override fun getEventData(): WritableMap {
|
||||
val contentInset = Arguments.createMap()
|
||||
contentInset.putDouble("top", 0.0)
|
||||
@@ -125,7 +118,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
contentHeight: Int,
|
||||
scrollViewWidth: Int,
|
||||
scrollViewHeight: Int,
|
||||
experimental_isSynchronous: Boolean,
|
||||
): ScrollEvent =
|
||||
(EVENTS_POOL.acquire() ?: ScrollEvent()).apply {
|
||||
init(
|
||||
@@ -139,8 +131,7 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
contentWidth,
|
||||
contentHeight,
|
||||
scrollViewWidth,
|
||||
scrollViewHeight,
|
||||
experimental_isSynchronous)
|
||||
scrollViewHeight)
|
||||
}
|
||||
|
||||
@Deprecated(
|
||||
@@ -172,7 +163,6 @@ public class ScrollEvent private constructor() : Event<ScrollEvent>() {
|
||||
contentHeight,
|
||||
scrollViewWidth,
|
||||
scrollViewHeight,
|
||||
false,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,9 +15,9 @@ import com.facebook.react.uimanager.events.Event
|
||||
internal class RefreshEvent : Event<RefreshEvent> {
|
||||
|
||||
@Deprecated("Use constructor with surfaceId", ReplaceWith("RefreshEvent(surfaceId, viewTag)"))
|
||||
protected constructor(viewTag: Int) : this(ViewUtil.NO_SURFACE_ID, viewTag)
|
||||
constructor(viewTag: Int) : this(ViewUtil.NO_SURFACE_ID, viewTag)
|
||||
|
||||
protected constructor(surfaceId: Int, viewTag: Int) : super(surfaceId, viewTag)
|
||||
constructor(surfaceId: Int, viewTag: Int) : super(surfaceId, viewTag)
|
||||
|
||||
override public fun getEventName(): String {
|
||||
return "topRefresh"
|
||||
|
||||
-194
@@ -1,194 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.swiperefresh;
|
||||
|
||||
import static com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager.REACT_CLASS;
|
||||
|
||||
import android.graphics.Color;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableType;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.UIManagerHelper;
|
||||
import com.facebook.react.uimanager.ViewGroupManager;
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerDelegate;
|
||||
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* ViewManager for {@link ReactSwipeRefreshLayout} which allows the user to "pull to refresh" a
|
||||
* child view. Emits an {@code onRefresh} event when this happens.
|
||||
*/
|
||||
@ReactModule(name = REACT_CLASS)
|
||||
public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefreshLayout>
|
||||
implements AndroidSwipeRefreshLayoutManagerInterface<ReactSwipeRefreshLayout> {
|
||||
|
||||
public static final String REACT_CLASS = "AndroidSwipeRefreshLayout";
|
||||
|
||||
private final ViewManagerDelegate<ReactSwipeRefreshLayout> mDelegate;
|
||||
|
||||
public SwipeRefreshLayoutManager() {
|
||||
mDelegate = new AndroidSwipeRefreshLayoutManagerDelegate<>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReactSwipeRefreshLayout createViewInstance(ThemedReactContext reactContext) {
|
||||
return new ReactSwipeRefreshLayout(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return REACT_CLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = ViewProps.ENABLED, defaultBoolean = true)
|
||||
public void setEnabled(ReactSwipeRefreshLayout view, boolean enabled) {
|
||||
view.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = "colors", customType = "ColorArray")
|
||||
public void setColors(ReactSwipeRefreshLayout view, @Nullable ReadableArray colors) {
|
||||
if (colors != null) {
|
||||
int[] colorValues = new int[colors.size()];
|
||||
for (int i = 0; i < colors.size(); i++) {
|
||||
if (colors.getType(i) == ReadableType.Map) {
|
||||
colorValues[i] = ColorPropConverter.getColor(colors.getMap(i), view.getContext());
|
||||
} else {
|
||||
colorValues[i] = colors.getInt(i);
|
||||
}
|
||||
}
|
||||
view.setColorSchemeColors(colorValues);
|
||||
} else {
|
||||
view.setColorSchemeColors();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = "progressBackgroundColor", customType = "Color")
|
||||
public void setProgressBackgroundColor(ReactSwipeRefreshLayout view, Integer color) {
|
||||
view.setProgressBackgroundColorSchemeColor(color == null ? Color.TRANSPARENT : color);
|
||||
}
|
||||
|
||||
// TODO(T46143833): Remove this method once the 'size' prop has been migrated to String in JS.
|
||||
public void setSize(ReactSwipeRefreshLayout view, int value) {
|
||||
view.setSize(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(ReactSwipeRefreshLayout view, String size) {
|
||||
if (size == null || size.equals("default")) {
|
||||
view.setSize(SwipeRefreshLayout.DEFAULT);
|
||||
} else if (size.equals("large")) {
|
||||
view.setSize(SwipeRefreshLayout.LARGE);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Size must be 'default' or 'large', received: " + size);
|
||||
}
|
||||
}
|
||||
|
||||
// This prop temporarily takes both 0 and 1 as well as 'default' and 'large'.
|
||||
// 0 and 1 are deprecated and will be removed in a future release.
|
||||
// See T46143833
|
||||
@ReactProp(name = "size")
|
||||
public void setSize(ReactSwipeRefreshLayout view, Dynamic size) {
|
||||
if (size.isNull()) {
|
||||
view.setSize(SwipeRefreshLayout.DEFAULT);
|
||||
} else if (size.getType() == ReadableType.Number) {
|
||||
view.setSize(size.asInt());
|
||||
} else if (size.getType() == ReadableType.String) {
|
||||
setSize(view, size.asString());
|
||||
} else {
|
||||
throw new IllegalArgumentException("Size must be 'default' or 'large'");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = "refreshing")
|
||||
public void setRefreshing(ReactSwipeRefreshLayout view, boolean refreshing) {
|
||||
view.setRefreshing(refreshing);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = "progressViewOffset", defaultFloat = 0)
|
||||
public void setProgressViewOffset(final ReactSwipeRefreshLayout view, final float offset) {
|
||||
view.setProgressViewOffset(offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNativeRefreshing(ReactSwipeRefreshLayout view, boolean value) {
|
||||
setRefreshing(view, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addEventEmitters(
|
||||
final ThemedReactContext reactContext, final ReactSwipeRefreshLayout view) {
|
||||
view.setOnRefreshListener(
|
||||
new OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
EventDispatcher eventDispatcher =
|
||||
UIManagerHelper.getEventDispatcherForReactTag(reactContext, view.getId());
|
||||
if (eventDispatcher != null) {
|
||||
eventDispatcher.dispatchEvent(
|
||||
new RefreshEvent(UIManagerHelper.getSurfaceId(view), view.getId()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(
|
||||
@NonNull ReactSwipeRefreshLayout root, String commandId, @Nullable ReadableArray args) {
|
||||
switch (commandId) {
|
||||
case "setNativeRefreshing":
|
||||
if (args != null) {
|
||||
setRefreshing(root, args.getBoolean(0));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Map<String, Object> getExportedViewConstants() {
|
||||
return MapBuilder.<String, Object>of(
|
||||
"SIZE",
|
||||
MapBuilder.of("DEFAULT", SwipeRefreshLayout.DEFAULT, "LARGE", SwipeRefreshLayout.LARGE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
||||
@Nullable
|
||||
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
||||
Map<String, Object> eventTypeConstants =
|
||||
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
||||
eventTypeConstants.putAll(
|
||||
MapBuilder.<String, Object>builder()
|
||||
.put("topRefresh", MapBuilder.of("registrationName", "onRefresh"))
|
||||
.build());
|
||||
return eventTypeConstants;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ViewManagerDelegate<ReactSwipeRefreshLayout> getDelegate() {
|
||||
return mDelegate;
|
||||
}
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.swiperefresh
|
||||
|
||||
import android.graphics.Color
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.facebook.react.bridge.ColorPropConverter
|
||||
import com.facebook.react.bridge.Dynamic
|
||||
import com.facebook.react.bridge.ReadableArray
|
||||
import com.facebook.react.bridge.ReadableType
|
||||
import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.UIManagerHelper
|
||||
import com.facebook.react.uimanager.ViewGroupManager
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate
|
||||
import com.facebook.react.uimanager.ViewProps
|
||||
import com.facebook.react.uimanager.annotations.ReactProp
|
||||
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerDelegate
|
||||
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface
|
||||
import java.util.HashMap
|
||||
|
||||
/**
|
||||
* ViewManager for [ReactSwipeRefreshLayout] which allows the user to "pull to refresh" a child
|
||||
* view. Emits an `onRefresh` event when this happens.
|
||||
*/
|
||||
@ReactModule(name = SwipeRefreshLayoutManager.REACT_CLASS)
|
||||
internal open class SwipeRefreshLayoutManager :
|
||||
ViewGroupManager<ReactSwipeRefreshLayout>(),
|
||||
AndroidSwipeRefreshLayoutManagerInterface<ReactSwipeRefreshLayout> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<ReactSwipeRefreshLayout> =
|
||||
AndroidSwipeRefreshLayoutManagerDelegate(this)
|
||||
|
||||
override fun createViewInstance(reactContext: ThemedReactContext): ReactSwipeRefreshLayout =
|
||||
ReactSwipeRefreshLayout(reactContext)
|
||||
|
||||
override fun getName(): String = REACT_CLASS
|
||||
|
||||
@ReactProp(name = ViewProps.ENABLED, defaultBoolean = true)
|
||||
override fun setEnabled(view: ReactSwipeRefreshLayout, enabled: Boolean) {
|
||||
view.isEnabled = enabled
|
||||
}
|
||||
|
||||
@ReactProp(name = "colors", customType = "ColorArray")
|
||||
override fun setColors(view: ReactSwipeRefreshLayout, colors: ReadableArray?) {
|
||||
if (colors != null) {
|
||||
val colorValues = IntArray(colors.size())
|
||||
for (i in 0..<colors.size()) {
|
||||
if (colors.getType(i) == ReadableType.Map) {
|
||||
colorValues[i] = ColorPropConverter.getColor(colors.getMap(i), view.context)
|
||||
} else {
|
||||
colorValues[i] = colors.getInt(i)
|
||||
}
|
||||
}
|
||||
view.setColorSchemeColors(*colorValues)
|
||||
} else {
|
||||
view.setColorSchemeColors()
|
||||
}
|
||||
}
|
||||
|
||||
@ReactProp(name = "progressBackgroundColor", customType = "Color")
|
||||
override fun setProgressBackgroundColor(view: ReactSwipeRefreshLayout, color: Int?) {
|
||||
view.setProgressBackgroundColorSchemeColor(color ?: Color.TRANSPARENT)
|
||||
}
|
||||
|
||||
// TODO(T46143833): Remove this method once the 'size' prop has been migrated to String in JS.
|
||||
fun setSize(view: ReactSwipeRefreshLayout, value: Int): Unit {
|
||||
view.setSize(value)
|
||||
}
|
||||
|
||||
override fun setSize(view: ReactSwipeRefreshLayout, size: String?) {
|
||||
if (size == null || size.equals("default")) {
|
||||
view.setSize(SwipeRefreshLayout.DEFAULT)
|
||||
} else if (size.equals("large")) {
|
||||
view.setSize(SwipeRefreshLayout.LARGE)
|
||||
} else {
|
||||
throw IllegalArgumentException("Size must be 'default' or 'large', received: $size")
|
||||
}
|
||||
}
|
||||
|
||||
// This prop temporarily takes both 0 and 1 as well as 'default' and 'large'.
|
||||
// 0 and 1 are deprecated and will be removed in a future release.
|
||||
// See T46143833
|
||||
@ReactProp(name = "size")
|
||||
fun setSize(view: ReactSwipeRefreshLayout, size: Dynamic): Unit {
|
||||
when {
|
||||
size.isNull -> view.setSize(SwipeRefreshLayout.DEFAULT)
|
||||
size.type == ReadableType.Number -> view.setSize(size.asInt())
|
||||
size.type == ReadableType.String -> this.setSize(view, size.asString())
|
||||
else -> throw IllegalArgumentException("Size must be 'default' or 'large'")
|
||||
}
|
||||
}
|
||||
|
||||
@ReactProp(name = "refreshing")
|
||||
override fun setRefreshing(view: ReactSwipeRefreshLayout, refreshing: Boolean) {
|
||||
view.isRefreshing = refreshing
|
||||
}
|
||||
|
||||
@ReactProp(name = "progressViewOffset", defaultFloat = 0f)
|
||||
override fun setProgressViewOffset(view: ReactSwipeRefreshLayout, offset: Float) {
|
||||
view.setProgressViewOffset(offset)
|
||||
}
|
||||
|
||||
override fun setNativeRefreshing(view: ReactSwipeRefreshLayout, value: Boolean) {
|
||||
setRefreshing(view, value)
|
||||
}
|
||||
|
||||
override fun addEventEmitters(reactContext: ThemedReactContext, view: ReactSwipeRefreshLayout) {
|
||||
view.setOnRefreshListener {
|
||||
val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, view.id)
|
||||
eventDispatcher?.dispatchEvent(RefreshEvent(UIManagerHelper.getSurfaceId(view), view.id))
|
||||
}
|
||||
}
|
||||
|
||||
override fun receiveCommand(
|
||||
root: ReactSwipeRefreshLayout,
|
||||
commandId: String,
|
||||
args: ReadableArray?
|
||||
) {
|
||||
when (commandId) {
|
||||
"setNativeRefreshing" ->
|
||||
if (args != null) {
|
||||
setRefreshing(root, args.getBoolean(0))
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getExportedViewConstants(): MutableMap<String, Any> =
|
||||
mutableMapOf(
|
||||
"SIZE" to
|
||||
mutableMapOf(
|
||||
"DEFAULT" to SwipeRefreshLayout.DEFAULT, "LARGE" to SwipeRefreshLayout.LARGE))
|
||||
|
||||
override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any> {
|
||||
val baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants()
|
||||
val eventTypeConstants: MutableMap<String, Any> = baseEventTypeConstants ?: HashMap()
|
||||
eventTypeConstants.putAll(
|
||||
mutableMapOf("topRefresh" to mutableMapOf("registrationName" to "onRefresh")))
|
||||
return eventTypeConstants
|
||||
}
|
||||
|
||||
override fun getDelegate(): ViewManagerDelegate<ReactSwipeRefreshLayout> = delegate
|
||||
|
||||
companion object {
|
||||
const val REACT_CLASS: String = "AndroidSwipeRefreshLayout"
|
||||
}
|
||||
}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Typeface;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
|
||||
/**
|
||||
* Responsible for loading and caching Typeface objects.
|
||||
*
|
||||
* @deprecated This class is deprecated and it will be deleted in the near future. Please use {@link
|
||||
* com.facebook.react.common.assets.ReactFontManager} instead.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@Deprecated
|
||||
public class ReactFontManager {
|
||||
|
||||
private static ReactFontManager sReactFontManagerInstance;
|
||||
private final com.facebook.react.common.assets.ReactFontManager mDelegate;
|
||||
|
||||
private ReactFontManager(com.facebook.react.common.assets.ReactFontManager delegate) {
|
||||
mDelegate = delegate;
|
||||
}
|
||||
|
||||
public static ReactFontManager getInstance() {
|
||||
if (sReactFontManagerInstance == null) {
|
||||
sReactFontManagerInstance =
|
||||
new ReactFontManager(com.facebook.react.common.assets.ReactFontManager.getInstance());
|
||||
}
|
||||
return sReactFontManagerInstance;
|
||||
}
|
||||
|
||||
public Typeface getTypeface(String fontFamilyName, int style, AssetManager assetManager) {
|
||||
return mDelegate.getTypeface(fontFamilyName, style, assetManager);
|
||||
}
|
||||
|
||||
public Typeface getTypeface(
|
||||
String fontFamilyName, int weight, boolean italic, AssetManager assetManager) {
|
||||
return mDelegate.getTypeface(fontFamilyName, weight, italic, assetManager);
|
||||
}
|
||||
|
||||
public Typeface getTypeface(
|
||||
String fontFamilyName, int style, int weight, AssetManager assetManager) {
|
||||
return mDelegate.getTypeface(fontFamilyName, style, weight, assetManager);
|
||||
}
|
||||
|
||||
public void addCustomFont(Context context, String fontFamily, int fontId) {
|
||||
mDelegate.addCustomFont(context, fontFamily, fontId);
|
||||
}
|
||||
|
||||
public void addCustomFont(String fontFamily, @Nullable Typeface font) {
|
||||
mDelegate.addCustomFont(fontFamily, font);
|
||||
}
|
||||
|
||||
public void setTypeface(String fontFamilyName, int style, Typeface typeface) {
|
||||
mDelegate.setTypeface(fontFamilyName, style, typeface);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user