Compare commits
255 Commits
message-ti
...
develop
Author | SHA1 | Date |
---|---|---|
Gleidson Daniel Silva | 4dfc9c70f3 | |
Piyush Gupta | 513e8ee636 | |
Mister-H | aa57237004 | |
Diego Mello | 58391964cb | |
Diego Mello | 412f62eb2a | |
Reinaldo Neto | 4526b7f871 | |
Diego Mello | 27efa89dac | |
Gleidson Daniel Silva | 3fbb7b5720 | |
Reinaldo Neto | 4d5ff8aba1 | |
Reinaldo Neto | 4336f0db40 | |
Gleidson Daniel Silva | 4686d4f6f8 | |
Gleidson Daniel Silva | 58f28fb488 | |
lingohub[bot] | 6bb4adaecd | |
Diego Mello | 197616b94c | |
Diego Mello | edd0333be1 | |
Diego Mello | 8c47187f70 | |
Gleidson Daniel Silva | c4a2ce20c6 | |
Reinaldo Neto | 68f6eb40de | |
Diego Mello | 59c76d3956 | |
Reinaldo Neto | 9396b08ead | |
Reinaldo Neto | a927746d7f | |
Reinaldo Neto | 21e4818af7 | |
Diego Mello | 4de7c83e80 | |
Gleidson Daniel Silva | 18cc16beb7 | |
Reinaldo Neto | 3cd1a5f0a6 | |
lingohub[bot] | 1abff18e75 | |
Diego Mello | 26c8931563 | |
Gleidson Daniel Silva | 192a6b055a | |
Diego Mello | 7363d9d742 | |
Umang Patel | 21f64b08e5 | |
Gleidson Daniel Silva | 38511d2f2d | |
Reinaldo Neto | 593d12b129 | |
Diego Mello | ad3bfa830c | |
Diego Mello | af70849b5e | |
Diego Mello | 91831c8f33 | |
Diego Mello | 447a2b9344 | |
Gleidson Daniel Silva | fbb05fa0d3 | |
Gleidson Daniel Silva | 41b54d6d87 | |
Diego Mello | 5387d31a68 | |
Diego Mello | a1580811ed | |
Reinaldo Neto | 3a1b06b86c | |
Reinaldo Neto | 9525ef25d8 | |
Gleidson Daniel Silva | d208373b3a | |
Reinaldo Neto | 24ad69346a | |
Reinaldo Neto | 8102bef1d0 | |
Reinaldo Neto | b6b5e7294f | |
Diego Mello | 73557038a2 | |
Diego Mello | 4174aef4f8 | |
dependabot[bot] | 67f41a712c | |
dependabot[bot] | c13e0af110 | |
dependabot[bot] | d10a77ba3d | |
Reinaldo Neto | 68066d487f | |
Reinaldo Neto | 0b5dab3ddf | |
Reinaldo Neto | 23f716c280 | |
Diego Mello | 4b1f1d9074 | |
Diego Mello | 09cdb3e7a4 | |
lingohub[bot] | 46c18fb20d | |
Diego Mello | 0290d8e0a9 | |
Gleidson Daniel Silva | a2722f07b0 | |
Reinaldo Neto | 00661174a3 | |
Reinaldo Neto | cbd9b27cf7 | |
Diego Mello | 87a3f85feb | |
Gleidson Daniel Silva | a8b3a3b7de | |
Reinaldo Neto | 057ca8afac | |
Gleidson Daniel Silva | 92ae597b76 | |
Reinaldo Neto | 7def88a7e2 | |
Reinaldo Neto | aa26f7251e | |
Gleidson Daniel Silva | 21ee25e818 | |
Gleidson Daniel Silva | 362df65bbe | |
Diego Mello | 61dc320a68 | |
Diego Mello | 62c2d876eb | |
Diego Mello | 44f062f9b9 | |
GitStart | 438b69b371 | |
Diego Mello | 988c6931ec | |
Reinaldo Neto | b0ea5e31f8 | |
dependabot[bot] | 82c922fa4d | |
dependabot[bot] | 9b48ce0264 | |
dependabot[bot] | 994892abb2 | |
Reinaldo Neto | 251cc9843b | |
Diego Mello | 316bc80876 | |
Diego Mello | 94f0981b49 | |
Diego Mello | 05a04f7f29 | |
Reinaldo Neto | cd9924361e | |
Reinaldo Neto | 440e745901 | |
Reinaldo Neto | 612405cfae | |
Diego Mello | 6b6bb1df08 | |
Reinaldo Neto | 640d83c9df | |
Reinaldo Neto | a5e538c13f | |
Duda Nogueira | 0ad5545a4c | |
lingohub[bot] | faf79bb59e | |
Gleidson Daniel Silva | 3a9a98bdfe | |
Diego Mello | 4f960e9fb4 | |
Diego Mello | 80d53d3876 | |
Reinaldo Neto | 8940883dac | |
Reinaldo Neto | 711cac5876 | |
Reinaldo Neto | 816f43b828 | |
Reinaldo Neto | 57620ff40d | |
Reinaldo Neto | 2b53898066 | |
Diego Mello | 1aef030d75 | |
Danish Ahmed Mirza | 1486204546 | |
Reinaldo Neto | ec03f49b2d | |
Gleidson Daniel Silva | 16e11c7304 | |
Reinaldo Neto | 761aef2c04 | |
Gleidson Daniel Silva | 525f84885a | |
Luciano Marcos Pierdona Junior | 6dd9578413 | |
Diego Mello | ef753086a9 | |
Reinaldo Neto | 531f3d0147 | |
Reinaldo Neto | 300e5fc793 | |
Reinaldo Neto | 63e2a3a85c | |
Diego Mello | 5828a04aeb | |
Diego Mello | 5344f2f7c1 | |
Gleidson Daniel Silva | cda998942b | |
Gleidson Daniel Silva | 2d68faff3f | |
Gleidson Daniel Silva | fe04faac64 | |
Danish Ahmed Mirza | 2f03ca52c5 | |
Reinaldo Neto | 43ebae9b19 | |
Diego Mello | f213151db0 | |
Diego Mello | 6df0149210 | |
Reinaldo Neto | e48788c828 | |
Reinaldo Neto | d2d1d787f2 | |
Diego Mello | e883795c5f | |
Reinaldo Neto | cbf9ae3d37 | |
Reinaldo Neto | ee1b09d5ec | |
Gleidson Daniel Silva | d1e2c3fe6d | |
Reinaldo Neto | 5771dbd066 | |
Reinaldo Neto | e10de8b209 | |
Reinaldo Neto | 9d69c10bbd | |
Reinaldo Neto | b3a286329c | |
Reinaldo Neto | 214e1cc009 | |
Diego Mello | dec5c4470c | |
Diego Mello | 18f359a8ef | |
Reinaldo Neto | 05c1798a58 | |
Gleidson Daniel Silva | e146cbae9f | |
Reinaldo Neto | aefb60b5d2 | |
Diego Mello | 92a63e6a39 | |
Diego Mello | ac01acac20 | |
Diego Mello | f0a1266e21 | |
Diego Mello | cc28acd6ed | |
Reinaldo Neto | bb880f01ad | |
Gleidson Daniel Silva | 989ced89bc | |
Gleidson Daniel Silva | 07f0618ab4 | |
Gleidson Daniel Silva | 6484edddb6 | |
Gleidson Daniel Silva | cf7b9a09f4 | |
Reinaldo Neto | 1bc3f542f2 | |
Gleidson Daniel Silva | f9f13e7fe3 | |
Reinaldo Neto | c1a4ddc001 | |
Reinaldo Neto | c9ce52958c | |
Reinaldo Neto | eabb9f157c | |
Gleidson Daniel Silva | e3a99a93e4 | |
Gleidson Daniel Silva | 8d26230e4f | |
Reinaldo Neto | 991d7156a9 | |
Reinaldo Neto | 9cbffff248 | |
Gleidson Daniel Silva | cbc6892084 | |
Reinaldo Neto | ccbc84f9a8 | |
Diego Mello | ba15bc9fe6 | |
Diego Mello | 17be449d4e | |
Diego Mello | e723990e82 | |
Reinaldo Neto | fa72d4cc76 | |
Reinaldo Neto | ded2f3792a | |
Gleidson Daniel Silva | 6b3006d29f | |
Reinaldo Neto | f0ed501450 | |
Reinaldo Neto | 3ac10ee860 | |
Gleidson Daniel Silva | 31a8c3e4fb | |
Gleidson Daniel Silva | 28043a2eb5 | |
Gleidson Daniel Silva | 585e5a0592 | |
Diego Mello | c4d3af0e00 | |
Gleidson Daniel Silva | a607980840 | |
PetMoln | c6e31df3e4 | |
Diego Mello | b3894273ac | |
Reinaldo Neto | 0c8177e025 | |
Reinaldo Neto | 999e8ab660 | |
Reinaldo Neto | 2a522158ad | |
Gleidson Daniel Silva | 69349dee6e | |
Gleidson Daniel Silva | 92111afa6a | |
Gleidson Daniel Silva | a101d319e5 | |
Gleidson Daniel Silva | 6b8086aa55 | |
Gleidson Daniel Silva | 6df34a2615 | |
Gleidson Daniel Silva | 89820b2bec | |
Gleidson Daniel Silva | 2b08b683d7 | |
Reinaldo Neto | e38aedcbff | |
Danish Ahmed Mirza | a4f171a12d | |
Gleidson Daniel Silva | 2c32be6e51 | |
Gleidson Daniel Silva | 41dbbf4d4b | |
Gleidson Daniel Silva | 5875454a70 | |
Gleidson Daniel Silva | 0e378c67b8 | |
Reinaldo Neto | d7f7b1da9f | |
Gleidson Daniel Silva | a965465af3 | |
Gleidson Daniel Silva | 376c8e8252 | |
Gleidson Daniel Silva | 1c1dfe5af1 | |
Diego Mello | 60f781d20e | |
Reinaldo Neto | 2f51224f3f | |
Reinaldo Neto | 5a7f77a159 | |
Reinaldo Neto | fe7722ca10 | |
Gleidson Daniel Silva | 08c368c41e | |
Reinaldo Neto | 90c1b0a97f | |
Reinaldo Neto | 92d16b52e1 | |
Danish Ahmed Mirza | dd48402214 | |
Diego Mello | 785ae0325b | |
Gleidson Daniel Silva | cc6a403bf7 | |
Gleidson Daniel Silva | e39919094e | |
Diego Mello | 30d3b0b9f9 | |
Gleidson Daniel Silva | bf7473c39b | |
Diego Mello | 37db9b208d | |
Alex Junior | 1027b6c9e6 | |
Gleidson Daniel Silva | 2e8b7d7755 | |
Diego Mello | f5167a2c94 | |
Diego Mello | 3072bbd5b3 | |
Diego Mello | e48527b9be | |
Alex Junior | 4fd0084bc1 | |
Reinaldo Neto | 18c44178d7 | |
Alex Junior | 1e9ae6e157 | |
Gleidson Daniel Silva | 674f0285f6 | |
Alex Junior | 4b25fde8f6 | |
Gleidson Daniel Silva | 58a15b23b5 | |
lingohub[bot] | fc0d7e2ed3 | |
Diego Mello | 9151a1bfaf | |
Diego Mello | 6e322ce44b | |
Danish Ahmed Mirza | 44ac06ad7d | |
Reinaldo Neto | 8563453735 | |
Gleidson Daniel Silva | 303d127949 | |
Reinaldo Neto | bc09527d78 | |
Gleidson Daniel Silva | a5a5c52058 | |
Gleidson Daniel Silva | 5f248ebeb5 | |
Reinaldo Neto | cd7e9e22f8 | |
Reinaldo Neto | 9985e9baf3 | |
Danish Ahmed Mirza | a5a45f533b | |
Reinaldo Neto | 28ee43f817 | |
Gleidson Daniel Silva | 6b15ace933 | |
Reinaldo Neto | fa90e4d456 | |
Reinaldo Neto | a16c271f1f | |
Gleidson Daniel Silva | 74a82974f0 | |
Reinaldo Neto | 79cd150231 | |
Reinaldo Neto | a21c797886 | |
Danish Ahmed Mirza | 5899b1f789 | |
Gerzon Z | 20a03611a7 | |
Diego Mello | d47320733a | |
Danish Ahmed Mirza | 748e87acf3 | |
Alex Junior | 614d9afe65 | |
Alex Junior | e212a3c946 | |
Danish Ahmed Mirza | 02c1bc50b9 | |
dependabot[bot] | c76a1e6a4c | |
dependabot[bot] | 42efad9249 | |
dependabot[bot] | 7b2119fb01 | |
dependabot[bot] | 149ddb3c31 | |
dependabot[bot] | 331acb15a6 | |
dependabot[bot] | 7cbd3afa35 | |
dependabot[bot] | 0570dd9172 | |
dependabot[bot] | a15601ff0d | |
dependabot[bot] | bc3484c61d | |
dependabot[bot] | 64ae402fc4 | |
dependabot[bot] | 82c16e2938 | |
dependabot[bot] | 953dc1cb9a | |
dependabot[bot] | 5e26c6bceb | |
dependabot[bot] | 8c0367325d | |
Gleidson Daniel Silva | 329e74b720 |
|
@ -0,0 +1,2 @@
|
||||||
|
BUNDLE_PATH: "vendor/bundle"
|
||||||
|
BUNDLE_FORCE_RUBY_PLATFORM: 1
|
|
@ -1,9 +1,12 @@
|
||||||
defaults: &defaults
|
defaults: &defaults
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
|
|
||||||
|
orbs:
|
||||||
|
android: circleci/android@2.1.2
|
||||||
|
|
||||||
macos: &macos
|
macos: &macos
|
||||||
macos:
|
macos:
|
||||||
xcode: "13.3.0"
|
xcode: "14.2.0"
|
||||||
resource_class: large
|
resource_class: large
|
||||||
|
|
||||||
bash-env: &bash-env
|
bash-env: &bash-env
|
||||||
|
@ -51,14 +54,14 @@ save-gems-cache: &save-gems-cache
|
||||||
update-fastlane-ios: &update-fastlane-ios
|
update-fastlane-ios: &update-fastlane-ios
|
||||||
name: Update Fastlane
|
name: Update Fastlane
|
||||||
command: |
|
command: |
|
||||||
echo "ruby-2.6.4" > ~/.ruby-version
|
echo "ruby-2.7.7" > ~/.ruby-version
|
||||||
bundle install
|
bundle install
|
||||||
working_directory: ios
|
working_directory: ios
|
||||||
|
|
||||||
update-fastlane-android: &update-fastlane-android
|
update-fastlane-android: &update-fastlane-android
|
||||||
name: Update Fastlane
|
name: Update Fastlane
|
||||||
command: |
|
command: |
|
||||||
echo "ruby-2.6.4" > ~/.ruby-version
|
echo "ruby-2.7.7" > ~/.ruby-version
|
||||||
bundle install
|
bundle install
|
||||||
working_directory: android
|
working_directory: android
|
||||||
|
|
||||||
|
@ -80,18 +83,15 @@ commands:
|
||||||
steps:
|
steps:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: Restore pods
|
name: Restore pods
|
||||||
# TODO: CircleCI isn't caching Podfile.lock correctly, because checksum changes after install
|
key: pods-v1-{{ checksum "ios/Podfile.lock" }}
|
||||||
# key: pods-v1-{{ checksum "ios/Podfile.lock" }}
|
|
||||||
key: pods-v1-{{ checksum "ios/Podfile" }}
|
|
||||||
- run:
|
- run:
|
||||||
name: Install pods libs
|
name: Install pods libs
|
||||||
command: |
|
command: |
|
||||||
bundle exec pod install
|
bundle exec pod install --deployment
|
||||||
working_directory: ios
|
working_directory: ios
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: Save pods specs and pods cache
|
name: Save pods specs and pods cache
|
||||||
# key: pods-v1-{{ checksum "ios/Podfile.lock" }}
|
key: pods-v1-{{ checksum "ios/Podfile.lock" }}
|
||||||
key: pods-v1-{{ checksum "ios/Podfile" }}
|
|
||||||
paths:
|
paths:
|
||||||
- ~/.pods
|
- ~/.pods
|
||||||
- ios/Pods
|
- ios/Pods
|
||||||
|
@ -114,32 +114,33 @@ commands:
|
||||||
# echo -e "android.enableAapt2=false" >> ./gradle.properties
|
# echo -e "android.enableAapt2=false" >> ./gradle.properties
|
||||||
echo -e "android.useAndroidX=true" >> ./gradle.properties
|
echo -e "android.useAndroidX=true" >> ./gradle.properties
|
||||||
echo -e "android.enableJetifier=true" >> ./gradle.properties
|
echo -e "android.enableJetifier=true" >> ./gradle.properties
|
||||||
echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties
|
echo -e "newArchEnabled=false" >> ./gradle.properties
|
||||||
|
echo -e "FLIPPER_VERSION=0.125.0" >> ./gradle.properties
|
||||||
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
|
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
|
||||||
|
|
||||||
if [[ $CIRCLE_JOB == "android-build-official" ]]; then
|
if [[ $CIRCLE_JOB == "android-build-official" ]]; then
|
||||||
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
|
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
|
||||||
echo -e "BugsnagAPIKey=$BUGSNAG_KEY_OFFICIAL" >> ./gradle.properties
|
echo -e "BugsnagAPIKey=$BUGSNAG_KEY_OFFICIAL" >> ./gradle.properties
|
||||||
echo $CHAT_ROCKET_ANDROID_STORE_FILE_BASE64_JKS | base64 --decode > ./app/$KEYSTORE_OFFICIAL
|
echo $KEYSTORE_OFFICIAL_BASE64 | base64 --decode > ./app/$KEYSTORE_OFFICIAL
|
||||||
echo -e "KEYSTORE=$KEYSTORE_OFFICIAL" >> ./gradle.properties
|
echo -e "KEYSTORE=$KEYSTORE_OFFICIAL" >> ./gradle.properties
|
||||||
echo -e "KEYSTORE_PASSWORD=$CHAT_ROCKET_ANDROID_STORE_PASSWORD" >> ./gradle.properties
|
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_OFFICIAL_PASSWORD" >> ./gradle.properties
|
||||||
echo -e "KEY_ALIAS=$CHAT_ROCKET_ANDROID_KEY_ALIAS" >> ./gradle.properties
|
echo -e "KEY_ALIAS=$KEYSTORE_OFFICIAL_ALIAS" >> ./gradle.properties
|
||||||
echo -e "KEY_PASSWORD=$CHAT_ROCKET_ANDROID_KEY_PASSWORD" >> ./gradle.properties
|
echo -e "KEY_PASSWORD=$KEYSTORE_OFFICIAL_PASSWORD" >> ./gradle.properties
|
||||||
else
|
else
|
||||||
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
|
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
|
||||||
echo -e "BugsnagAPIKey=$BUGSNAG_KEY" >> ./gradle.properties
|
echo -e "BugsnagAPIKey=$BUGSNAG_KEY" >> ./gradle.properties
|
||||||
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
|
echo $KEYSTORE_EXPERIMENTAL_BASE64 | base64 --decode > ./app/$KEYSTORE_EXPERIMENTAL
|
||||||
echo -e "KEYSTORE=$KEYSTORE" >> ./gradle.properties
|
echo -e "KEYSTORE=$KEYSTORE_EXPERIMENTAL" >> ./gradle.properties
|
||||||
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
|
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_EXPERIMENTAL_PASSWORD" >> ./gradle.properties
|
||||||
echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./gradle.properties
|
echo -e "KEY_ALIAS=$KEYSTORE_EXPERIMENTAL_ALIAS" >> ./gradle.properties
|
||||||
echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
|
echo -e "KEY_PASSWORD=$KEYSTORE_EXPERIMENTAL_PASSWORD" >> ./gradle.properties
|
||||||
fi
|
fi
|
||||||
working_directory: android
|
working_directory: android
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Set Google Services
|
name: Set Google Services
|
||||||
command: |
|
command: |
|
||||||
if [[ $KEYSTORE ]]; then
|
if [[ $GOOGLE_SERVICES_ANDROID ]]; then
|
||||||
echo $GOOGLE_SERVICES_ANDROID | base64 --decode > google-services.json
|
echo $GOOGLE_SERVICES_ANDROID | base64 --decode > google-services.json
|
||||||
fi
|
fi
|
||||||
working_directory: android/app
|
working_directory: android/app
|
||||||
|
@ -153,7 +154,7 @@ commands:
|
||||||
if [[ $CIRCLE_JOB == "android-build-experimental" || "android-automatic-build-experimental" ]]; then
|
if [[ $CIRCLE_JOB == "android-build-experimental" || "android-automatic-build-experimental" ]]; then
|
||||||
./gradlew bundleExperimentalPlayRelease
|
./gradlew bundleExperimentalPlayRelease
|
||||||
fi
|
fi
|
||||||
if [[ ! $KEYSTORE ]]; then
|
if [[ ! $GOOGLE_SERVICES_ANDROID ]]; then
|
||||||
./gradlew assembleExperimentalPlayDebug
|
./gradlew assembleExperimentalPlayDebug
|
||||||
fi
|
fi
|
||||||
working_directory: android
|
working_directory: android
|
||||||
|
@ -202,8 +203,12 @@ commands:
|
||||||
- run:
|
- run:
|
||||||
name: Set Google Services
|
name: Set Google Services
|
||||||
command: |
|
command: |
|
||||||
if [[ $KEYSTORE ]]; then
|
if [[ $APP_STORE_CONNECT_API_KEY_BASE64 ]]; then
|
||||||
echo $GOOGLE_SERVICES_IOS | base64 --decode > GoogleService-Info.plist
|
if [[ $CIRCLE_JOB == "ios-build-official" ]]; then
|
||||||
|
echo $GOOGLE_SERVICES_IOS | base64 --decode > GoogleService-Info.plist
|
||||||
|
else
|
||||||
|
echo $GOOGLE_SERVICES_IOS_EXPERIMENTAL | base64 --decode > GoogleService-Info.plist
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
working_directory: ios
|
working_directory: ios
|
||||||
- run:
|
- run:
|
||||||
|
@ -225,12 +230,12 @@ commands:
|
||||||
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./NotificationService/Info.plist
|
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL NO" ./NotificationService/Info.plist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $APP_STORE_CONNECT_API_BASE64 ]]; then
|
if [[ $APP_STORE_CONNECT_API_KEY_BASE64 ]]; then
|
||||||
echo $APP_STORE_CONNECT_API_BASE64 | base64 --decode > ./fastlane/app_store_connect_api_key.p8
|
echo $APP_STORE_CONNECT_API_KEY_BASE64 | base64 --decode > ./fastlane/app_store_connect_api_key.p8
|
||||||
if [[ $CIRCLE_JOB == "ios-build-official" ]]; then
|
if [[ $CIRCLE_JOB == "ios-build-official" ]]; then
|
||||||
bundle exec fastlane ios build_official
|
bundle exec fastlane ios build_official
|
||||||
else
|
else
|
||||||
if [[ $KEYSTORE ]]; then
|
if [[ $APP_STORE_CONNECT_API_KEY_BASE64 ]]; then
|
||||||
bundle exec fastlane ios build_experimental
|
bundle exec fastlane ios build_experimental
|
||||||
else
|
else
|
||||||
bundle exec fastlane ios build_fork
|
bundle exec fastlane ios build_fork
|
||||||
|
@ -320,11 +325,19 @@ commands:
|
||||||
- run:
|
- run:
|
||||||
name: Fastlane Tesflight Upload
|
name: Fastlane Tesflight Upload
|
||||||
command: |
|
command: |
|
||||||
echo $APP_STORE_CONNECT_API_BASE64 | base64 --decode > ./fastlane/app_store_connect_api_key.p8
|
echo $APP_STORE_CONNECT_API_KEY_BASE64 | base64 --decode > ./fastlane/app_store_connect_api_key.p8
|
||||||
bundle exec fastlane ios beta official:<< parameters.official >>
|
bundle exec fastlane ios beta official:<< parameters.official >>
|
||||||
working_directory: ios
|
working_directory: ios
|
||||||
- save_cache: *save-gems-cache
|
- save_cache: *save-gems-cache
|
||||||
|
|
||||||
|
create-e2e-account-file:
|
||||||
|
description: "Create e2e account file"
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
echo $E2E_ACCOUNT | base64 --decode > ./e2e_account.ts
|
||||||
|
working_directory: e2e
|
||||||
|
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
# EXECUTORS
|
# EXECUTORS
|
||||||
|
@ -436,6 +449,94 @@ jobs:
|
||||||
- upload-to-google-play-beta:
|
- upload-to-google-play-beta:
|
||||||
official: true
|
official: true
|
||||||
|
|
||||||
|
e2e-build-android:
|
||||||
|
<<: *defaults
|
||||||
|
executor:
|
||||||
|
name: android/android-machine
|
||||||
|
resource-class: xlarge
|
||||||
|
tag: 2022.12.1
|
||||||
|
environment:
|
||||||
|
<<: *android-env
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache: *restore-npm-cache-linux
|
||||||
|
- run: *install-npm-modules
|
||||||
|
- save_cache: *save-npm-cache-linux
|
||||||
|
- restore_cache: *restore-gradle-cache
|
||||||
|
- run:
|
||||||
|
name: Configure Gradle
|
||||||
|
command: |
|
||||||
|
echo -e "" > ./gradle.properties
|
||||||
|
# echo -e "android.enableAapt2=false" >> ./gradle.properties
|
||||||
|
echo -e "android.useAndroidX=true" >> ./gradle.properties
|
||||||
|
echo -e "android.enableJetifier=true" >> ./gradle.properties
|
||||||
|
echo -e "newArchEnabled=false" >> ./gradle.properties
|
||||||
|
echo -e "FLIPPER_VERSION=0.125.0" >> ./gradle.properties
|
||||||
|
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
|
||||||
|
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
|
||||||
|
echo -e "BugsnagAPIKey=$BUGSNAG_KEY" >> ./gradle.properties
|
||||||
|
echo $KEYSTORE_EXPERIMENTAL_BASE64 | base64 --decode > ./app/$KEYSTORE_EXPERIMENTAL
|
||||||
|
echo -e "KEYSTORE=$KEYSTORE_EXPERIMENTAL" >> ./gradle.properties
|
||||||
|
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_EXPERIMENTAL_PASSWORD" >> ./gradle.properties
|
||||||
|
echo -e "KEY_ALIAS=$KEYSTORE_EXPERIMENTAL_ALIAS" >> ./gradle.properties
|
||||||
|
echo -e "KEY_PASSWORD=$KEYSTORE_EXPERIMENTAL_PASSWORD" >> ./gradle.properties
|
||||||
|
working_directory: android
|
||||||
|
- run:
|
||||||
|
name: Build Android
|
||||||
|
command: |
|
||||||
|
echo "RUNNING_E2E_TESTS=true" > ./.env
|
||||||
|
yarn e2e:android-build
|
||||||
|
- save_cache: *save-gradle-cache
|
||||||
|
- store_artifacts:
|
||||||
|
path: android/app/build/outputs/apk/experimentalPlay/release/app-experimental-play-release.apk
|
||||||
|
- store_artifacts:
|
||||||
|
path: android/app/build/outputs/apk/androidTest/experimentalPlay/release/app-experimental-play-release-androidTest.apk
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: /home/circleci/repo
|
||||||
|
paths:
|
||||||
|
- android/app/build/outputs/apk/
|
||||||
|
|
||||||
|
e2e-test-android:
|
||||||
|
<<: *defaults
|
||||||
|
executor:
|
||||||
|
name: android/android-machine
|
||||||
|
resource-class: xlarge
|
||||||
|
tag: 2022.12.1
|
||||||
|
parallelism: 4
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /home/circleci/repo
|
||||||
|
- restore_cache: *restore-npm-cache-linux
|
||||||
|
- run: *install-npm-modules
|
||||||
|
- save_cache: *save-npm-cache-linux
|
||||||
|
- run: mkdir ~/junit
|
||||||
|
- create-e2e-account-file
|
||||||
|
- android/create-avd:
|
||||||
|
avd-name: Pixel_API_31_AOSP
|
||||||
|
install: true
|
||||||
|
system-image: system-images;android-31;default;x86_64
|
||||||
|
- run:
|
||||||
|
name: Setup emulator
|
||||||
|
command: |
|
||||||
|
echo "hw.lcd.density = 440" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini
|
||||||
|
echo "hw.lcd.height = 2280" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini
|
||||||
|
echo "hw.lcd.width = 1080" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini
|
||||||
|
- run:
|
||||||
|
name: Run Detox Tests
|
||||||
|
command: |
|
||||||
|
TEST=$(circleci tests glob "e2e/tests/**/*.ts" | circleci tests split --split-by=timings)
|
||||||
|
yarn e2e:android-test $TEST
|
||||||
|
- store_artifacts:
|
||||||
|
path: artifacts
|
||||||
|
- run:
|
||||||
|
command: cp junit.xml ~/junit/
|
||||||
|
when: always
|
||||||
|
- store_test_results:
|
||||||
|
path: ~/junit
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/junit
|
||||||
|
|
||||||
# iOS builds
|
# iOS builds
|
||||||
ios-build-experimental:
|
ios-build-experimental:
|
||||||
executor: mac-env
|
executor: mac-env
|
||||||
|
@ -459,11 +560,89 @@ jobs:
|
||||||
- upload-to-testflight:
|
- upload-to-testflight:
|
||||||
official: true
|
official: true
|
||||||
|
|
||||||
|
e2e-build-ios:
|
||||||
|
executor: mac-env
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache: *restore-gems-cache
|
||||||
|
- restore_cache: *restore-npm-cache-mac
|
||||||
|
- run: *install-npm-modules
|
||||||
|
- run: *update-fastlane-ios
|
||||||
|
- save_cache: *save-npm-cache-mac
|
||||||
|
- save_cache: *save-gems-cache
|
||||||
|
- manage-pods
|
||||||
|
- run:
|
||||||
|
name: Configure Detox
|
||||||
|
command: |
|
||||||
|
brew tap wix/brew
|
||||||
|
brew install applesimutils
|
||||||
|
- run:
|
||||||
|
name: Build
|
||||||
|
command: |
|
||||||
|
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey $BUGSNAG_KEY" ./ios/RocketChatRN/Info.plist
|
||||||
|
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey $BUGSNAG_KEY" ./ios/ShareRocketChatRN/Info.plist
|
||||||
|
yarn detox clean-framework-cache && yarn detox build-framework-cache
|
||||||
|
echo "RUNNING_E2E_TESTS=true" > ./.env
|
||||||
|
yarn e2e:ios-build
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: /Users/distiller/project
|
||||||
|
paths:
|
||||||
|
- ios/build/Build/Products/Release-iphonesimulator/Rocket.Chat Experimental.app
|
||||||
|
|
||||||
|
e2e-test-ios:
|
||||||
|
executor: mac-env
|
||||||
|
parallelism: 5
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /Users/distiller/project
|
||||||
|
- restore_cache: *restore-npm-cache-mac
|
||||||
|
- run: *install-npm-modules
|
||||||
|
- save_cache: *save-npm-cache-mac
|
||||||
|
- run: mkdir ~/junit
|
||||||
|
- run:
|
||||||
|
name: Configure Detox
|
||||||
|
command: |
|
||||||
|
brew tap wix/brew
|
||||||
|
brew install applesimutils
|
||||||
|
yarn detox clean-framework-cache && yarn detox build-framework-cache
|
||||||
|
- create-e2e-account-file
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: |
|
||||||
|
TEST=$(circleci tests glob "e2e/tests/**/*.ts" | circleci tests split --split-by=timings)
|
||||||
|
yarn e2e:ios-test $TEST
|
||||||
|
- store_artifacts:
|
||||||
|
path: artifacts
|
||||||
|
- run:
|
||||||
|
command: cp junit.xml ~/junit/
|
||||||
|
when: always
|
||||||
|
- store_test_results:
|
||||||
|
path: ~/junit
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/junit
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
jobs:
|
jobs:
|
||||||
- lint-testunit
|
- lint-testunit
|
||||||
|
|
||||||
|
# E2E tests
|
||||||
|
- e2e-hold:
|
||||||
|
type: approval
|
||||||
|
- e2e-build-ios:
|
||||||
|
requires:
|
||||||
|
- e2e-hold
|
||||||
|
- e2e-test-ios:
|
||||||
|
requires:
|
||||||
|
- e2e-build-ios
|
||||||
|
- e2e-build-android:
|
||||||
|
requires:
|
||||||
|
- e2e-hold
|
||||||
|
- e2e-test-android:
|
||||||
|
requires:
|
||||||
|
- e2e-build-android
|
||||||
|
|
||||||
# iOS Experimental
|
# iOS Experimental
|
||||||
- ios-hold-build-experimental:
|
- ios-hold-build-experimental:
|
||||||
type: approval
|
type: approval
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
/** @type {Detox.DetoxConfig} */
|
||||||
|
module.exports = {
|
||||||
|
testRunner: {
|
||||||
|
args: {
|
||||||
|
$0: 'jest',
|
||||||
|
config: 'e2e/jest.config.js'
|
||||||
|
},
|
||||||
|
retries: process.env.CI ? 3 : 0
|
||||||
|
},
|
||||||
|
artifacts: {
|
||||||
|
plugins: {
|
||||||
|
screenshot: 'failing',
|
||||||
|
video: 'failing',
|
||||||
|
uiHierarchy: 'enabled'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
apps: {
|
||||||
|
'ios.debug': {
|
||||||
|
type: 'ios.app',
|
||||||
|
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/Rocket.Chat Experimental.app',
|
||||||
|
build:
|
||||||
|
'xcodebuild -workspace ios/RocketChatRN.xcworkspace -scheme RocketChatRN -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build'
|
||||||
|
},
|
||||||
|
'ios.release': {
|
||||||
|
type: 'ios.app',
|
||||||
|
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/Rocket.Chat Experimental.app',
|
||||||
|
build:
|
||||||
|
'xcodebuild -workspace ios/RocketChatRN.xcworkspace -scheme RocketChatRN -configuration Release -sdk iphonesimulator -derivedDataPath ios/build'
|
||||||
|
},
|
||||||
|
'android.debug': {
|
||||||
|
type: 'android.apk',
|
||||||
|
binaryPath: 'android/app/build/outputs/apk/experimentalPlay/debug/app-experimental-play-debug.apk',
|
||||||
|
build:
|
||||||
|
'cd android ; ./gradlew assembleExperimentalPlayDebug assembleExperimentalPlayDebugAndroidTest -DtestBuildType=debug ; cd -',
|
||||||
|
reversePorts: [8081]
|
||||||
|
},
|
||||||
|
'android.release': {
|
||||||
|
type: 'android.apk',
|
||||||
|
binaryPath: 'android/app/build/outputs/apk/experimentalPlay/release/app-experimental-play-release.apk',
|
||||||
|
build:
|
||||||
|
'cd android ; ./gradlew assembleExperimentalPlayRelease assembleExperimentalPlayReleaseAndroidTest -DtestBuildType=release ; cd -'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
devices: {
|
||||||
|
simulator: {
|
||||||
|
type: 'ios.simulator',
|
||||||
|
device: {
|
||||||
|
type: 'iPhone 14'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attached: {
|
||||||
|
type: 'android.attached',
|
||||||
|
device: {
|
||||||
|
adbName: '.*'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emulator: {
|
||||||
|
type: 'android.emulator',
|
||||||
|
device: {
|
||||||
|
avdName: 'Pixel_API_31_AOSP'
|
||||||
|
},
|
||||||
|
headless: process.env.CI ? true : false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
configurations: {
|
||||||
|
'ios.sim.debug': {
|
||||||
|
device: 'simulator',
|
||||||
|
app: 'ios.debug'
|
||||||
|
},
|
||||||
|
'ios.sim.release': {
|
||||||
|
device: 'simulator',
|
||||||
|
app: 'ios.release'
|
||||||
|
},
|
||||||
|
'android.att.debug': {
|
||||||
|
device: 'attached',
|
||||||
|
app: 'android.debug'
|
||||||
|
},
|
||||||
|
'android.att.release': {
|
||||||
|
device: 'attached',
|
||||||
|
app: 'android.release'
|
||||||
|
},
|
||||||
|
'android.emu.debug': {
|
||||||
|
device: 'emulator',
|
||||||
|
app: 'android.debug'
|
||||||
|
},
|
||||||
|
'android.emu.release': {
|
||||||
|
device: 'emulator',
|
||||||
|
app: 'android.release'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
24
.eslintrc.js
24
.eslintrc.js
|
@ -2,7 +2,7 @@ module.exports = {
|
||||||
settings: {
|
settings: {
|
||||||
'import/resolver': {
|
'import/resolver': {
|
||||||
node: {
|
node: {
|
||||||
extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js', '.native.js']
|
extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js', '.native.js', '.ios.tsx', '.android.tsx']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -156,22 +156,6 @@ module.exports = {
|
||||||
__DEV__: true
|
__DEV__: true
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
|
||||||
files: ['e2e/**'],
|
|
||||||
globals: {
|
|
||||||
by: true,
|
|
||||||
detox: true,
|
|
||||||
device: true,
|
|
||||||
element: true,
|
|
||||||
expect: true,
|
|
||||||
waitFor: true
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'import/no-extraneous-dependencies': 0,
|
|
||||||
'no-await-in-loop': 0,
|
|
||||||
'no-restricted-syntax': 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
files: ['**/*.ts', '**/*.tsx'],
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
extends: [
|
extends: [
|
||||||
|
@ -253,6 +237,12 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['e2e/**'],
|
||||||
|
rules: {
|
||||||
|
'no-await-in-loop': 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,5 +3,5 @@ updates:
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
open-pull-requests-limit: 25
|
open-pull-requests-limit: 25
|
|
@ -23,6 +23,7 @@ DerivedData
|
||||||
project.xcworkspace
|
project.xcworkspace
|
||||||
*.mobileprovision
|
*.mobileprovision
|
||||||
ios/Pods/
|
ios/Pods/
|
||||||
|
/vendor/bundle/
|
||||||
|
|
||||||
# Android/IntelliJ
|
# Android/IntelliJ
|
||||||
#
|
#
|
||||||
|
@ -65,5 +66,7 @@ artifacts
|
||||||
e2e/docker/rc_test_env/docker-compose.yml
|
e2e/docker/rc_test_env/docker-compose.yml
|
||||||
e2e/docker/data/db
|
e2e/docker/data/db
|
||||||
e2e/e2e_account.js
|
e2e/e2e_account.js
|
||||||
|
e2e/e2e_account.ts
|
||||||
|
junit.xml
|
||||||
|
|
||||||
*.p8
|
*.p8
|
|
@ -23,4 +23,8 @@ SECURITY.md
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
|
||||||
|
.storybook/
|
||||||
|
|
||||||
app/i18n/locales/
|
app/i18n/locales/
|
||||||
|
app/containers/CustomIcon/mappedIcons.js
|
||||||
|
app/containers/CustomIcon/selection.json
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
bracketSpacing: true,
|
bracketSpacing: true,
|
||||||
jsxBracketSameLine: true,
|
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
jsxSingleQuote: true,
|
jsxSingleQuote: true,
|
||||||
trailingComma: 'none',
|
trailingComma: 'none',
|
||||||
printWidth: 130,
|
printWidth: 130,
|
||||||
useTabs: true,
|
useTabs: true,
|
||||||
arrowParens: 'avoid'
|
arrowParens: 'avoid',
|
||||||
|
bracketSameLine: true
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
2.7.7
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { getStorybookUI } from '@storybook/react-native';
|
||||||
|
import './storybook.requires';
|
||||||
|
|
||||||
|
import RNBootSplash from 'react-native-bootsplash';
|
||||||
|
|
||||||
|
import { selectServerRequest } from '../app/actions/server';
|
||||||
|
import { mockedStore as store } from '../app/reducers/mockedStore';
|
||||||
|
import database from '../app/lib/database';
|
||||||
|
import { setUser } from '../app/actions/login';
|
||||||
|
|
||||||
|
RNBootSplash.hide();
|
||||||
|
|
||||||
|
const baseUrl = 'https://open.rocket.chat';
|
||||||
|
store.dispatch(selectServerRequest(baseUrl));
|
||||||
|
store.dispatch(setUser({ id: 'abc', username: 'rocket.cat', name: 'Rocket Cat' }));
|
||||||
|
database.setActiveDB(baseUrl);
|
||||||
|
|
||||||
|
const StorybookUIRoot = getStorybookUI({});
|
||||||
|
export default StorybookUIRoot;
|
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
stories: ['../app/**/*.stories.?(ts|tsx|js|jsx)'],
|
||||||
|
addons: []
|
||||||
|
};
|
|
@ -0,0 +1,40 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
|
||||||
|
import { themes } from '../app/lib/constants';
|
||||||
|
import MessageContext from '../app/containers/message/Context';
|
||||||
|
import { selectServerRequest } from '../app/actions/server';
|
||||||
|
import { mockedStore as store } from '../app/reducers/mockedStore';
|
||||||
|
import { setUser } from '../app/actions/login';
|
||||||
|
|
||||||
|
const baseUrl = 'https://open.rocket.chat';
|
||||||
|
store.dispatch(selectServerRequest(baseUrl));
|
||||||
|
store.dispatch(setUser({ id: 'abc', username: 'rocket.cat', name: 'Rocket Cat' }));
|
||||||
|
|
||||||
|
export const decorators = [
|
||||||
|
Story => (
|
||||||
|
<Provider store={store}>
|
||||||
|
<MessageContext.Provider
|
||||||
|
value={{
|
||||||
|
user: {
|
||||||
|
id: 'y8bd77ptZswPj3EW8',
|
||||||
|
username: 'diego.mello',
|
||||||
|
token: 'abc'
|
||||||
|
},
|
||||||
|
baseUrl,
|
||||||
|
onPress: () => {},
|
||||||
|
onLongPress: () => {},
|
||||||
|
reactionInit: () => {},
|
||||||
|
onErrorPress: () => {},
|
||||||
|
replyBroadcast: () => {},
|
||||||
|
onReactionPress: () => {},
|
||||||
|
onDiscussionPress: () => {},
|
||||||
|
onReactionLongPress: () => {},
|
||||||
|
threadBadgeColor: themes.light.tunreadColor
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Story />
|
||||||
|
</MessageContext.Provider>
|
||||||
|
</Provider>
|
||||||
|
)
|
||||||
|
];
|
|
@ -0,0 +1,50 @@
|
||||||
|
/* do not change this file, it is auto generated by storybook. */
|
||||||
|
|
||||||
|
import {
|
||||||
|
configure,
|
||||||
|
addDecorator,
|
||||||
|
addParameters,
|
||||||
|
addArgsEnhancer,
|
||||||
|
} from "@storybook/react-native";
|
||||||
|
|
||||||
|
import { decorators, parameters } from "./preview";
|
||||||
|
|
||||||
|
if (decorators) {
|
||||||
|
decorators.forEach((decorator) => addDecorator(decorator));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parameters) {
|
||||||
|
addParameters(parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStories = () => {
|
||||||
|
return [
|
||||||
|
require("../app/containers/Avatar/Avatar.stories.tsx"),
|
||||||
|
require("../app/containers/BackgroundContainer/index.stories.tsx"),
|
||||||
|
require("../app/containers/Button/Button.stories.tsx"),
|
||||||
|
require("../app/containers/Chip/Chip.stories.tsx"),
|
||||||
|
require("../app/containers/HeaderButton/HeaderButtons.stories.tsx"),
|
||||||
|
require("../app/containers/List/List.stories.tsx"),
|
||||||
|
require("../app/containers/LoginServices/LoginServices.stories.tsx"),
|
||||||
|
require("../app/containers/markdown/Markdown.stories.tsx"),
|
||||||
|
require("../app/containers/markdown/new/NewMarkdown.stories.tsx"),
|
||||||
|
require("../app/containers/message/Components/CollapsibleQuote/CollapsibleQuote.stories.tsx"),
|
||||||
|
require("../app/containers/message/Message.stories.tsx"),
|
||||||
|
require("../app/containers/ReactionsList/ReactionsList.stories.tsx"),
|
||||||
|
require("../app/containers/RoomHeader/RoomHeader.stories.tsx"),
|
||||||
|
require("../app/containers/RoomItem/RoomItem.stories.tsx"),
|
||||||
|
require("../app/containers/SearchBox/SearchBox.stories.tsx"),
|
||||||
|
require("../app/containers/ServerItem/ServerItem.stories.tsx"),
|
||||||
|
require("../app/containers/TextInput/TextInput.stories.tsx"),
|
||||||
|
require("../app/containers/UIKit/UiKitMessage.stories.tsx"),
|
||||||
|
require("../app/containers/UIKit/UiKitModal.stories.tsx"),
|
||||||
|
require("../app/containers/UnreadBadge/UnreadBadge.stories.tsx"),
|
||||||
|
require("../app/views/CannedResponsesListView/CannedResponseItem.stories.tsx"),
|
||||||
|
require("../app/views/CreateChannelView/RoomSettings/SwitchItem.stories.tsx"),
|
||||||
|
require("../app/views/DiscussionsView/Item.stories.tsx"),
|
||||||
|
require("../app/views/RoomView/LoadMore/LoadMore.stories.tsx"),
|
||||||
|
require("../app/views/ThreadMessagesView/Item.stories.tsx"),
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
configure(getStories, module, false);
|
|
@ -0,0 +1,4 @@
|
||||||
|
source 'https://rubygems.org'
|
||||||
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
||||||
|
ruby '2.7.7'
|
||||||
|
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
|
|
@ -6,7 +6,7 @@
|
||||||
[![CodeFactor](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative/badge)](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative)
|
[![CodeFactor](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative/badge)](https://www.codefactor.io/repository/github/rocketchat/rocket.chat.reactnative)
|
||||||
|
|
||||||
- **Supported server versions:** 0.70.0+
|
- **Supported server versions:** 0.70.0+
|
||||||
- **Supported iOS versions**: 11+
|
- **Supported iOS versions**: 12+
|
||||||
- **Supported Android versions**: 6.0+
|
- **Supported Android versions**: 6.0+
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
export class Sound {
|
|
||||||
loadAsync = () => {};
|
|
||||||
|
|
||||||
playAsync = () => {};
|
|
||||||
|
|
||||||
pauseAsync = () => {};
|
|
||||||
|
|
||||||
stopAsync = () => {};
|
|
||||||
|
|
||||||
setOnPlaybackStatusUpdate = () => {};
|
|
||||||
|
|
||||||
setPositionAsync = () => {};
|
|
||||||
}
|
|
||||||
export const Audio = { Sound };
|
|
|
@ -1,4 +0,0 @@
|
||||||
const activateKeepAwake = () => '';
|
|
||||||
const deactivateKeepAwake = () => '';
|
|
||||||
|
|
||||||
export { activateKeepAwake, deactivateKeepAwake };
|
|
|
@ -1,3 +0,0 @@
|
||||||
export default {
|
|
||||||
openBrowserAsync: () => ''
|
|
||||||
};
|
|
|
@ -1,7 +1,3 @@
|
||||||
export default {
|
import mockDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';
|
||||||
getModel: () => '',
|
|
||||||
getReadableVersion: () => '',
|
export default mockDeviceInfo;
|
||||||
getBundleId: () => '',
|
|
||||||
isTablet: () => false,
|
|
||||||
hasNotch: () => false
|
|
||||||
};
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
export class MMKVLoader {
|
||||||
|
constructor() {
|
||||||
|
console.log('MMKVLoader constructor mock');
|
||||||
|
}
|
||||||
|
|
||||||
|
setProcessingMode = jest.fn().mockImplementation(() => ({
|
||||||
|
withEncryption: jest.fn().mockImplementation(() => ({
|
||||||
|
initialize: jest.fn().mockImplementation(() => {})
|
||||||
|
}))
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ProcessingModes = {
|
||||||
|
MULTI_PROCESS: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
export const create = jest.fn();
|
|
@ -1,4 +0,0 @@
|
||||||
export default {
|
|
||||||
set: () => '',
|
|
||||||
get: () => ''
|
|
||||||
};
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Avatar Path 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/diego.mello?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Avatar Room Id 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/room/devWBbYr7inwupPqK?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Avatar Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Avatar Url 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Channel 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/@general?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Children 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#f5455c\\"},[{\\"width\\":24,\\"height\\":24,\\"textAlignVertical\\":\\"center\\"},[{\\"position\\":\\"absolute\\",\\"bottom\\":-2,\\"right\\":-2,\\"borderRadius\\":10}]],{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Custom Border Radius 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":28},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":28}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Custom Style 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},{\\"padding\\":16}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Direct 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/diego.mello?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Emoji 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},[{\\"width\\":30,\\"height\\":30},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/emoji-custom/troll.jpg\\",\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"contain\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Static 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Touchable 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar With E Tag 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/djorkaeff.alexandre?format=png&size=112&etag=5ag8KffJcZj9m5rCv\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Without E Tag 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/djorkaeff.alexandre?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Avatar Wrong Server 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4},null],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":56,\\"height\\":56,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://google.com/avatar/Avatar?format=png&size=112\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]}"`;
|
|
@ -0,0 +1,17 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Basic 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_light\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Black Theme Loading 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_black\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"ActivityIndicator\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},\\"color\\":\\"#f9f9f9\\"},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Black Theme Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_black\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#f9f9f9\\"}]},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Dark Theme Loading 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_dark\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"ActivityIndicator\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},\\"color\\":\\"#f9f9f9\\"},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Dark Theme Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_dark\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#f9f9f9\\"}]},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Loading 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_light\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"ActivityIndicator\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},\\"color\\":\\"#6C727A\\"},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Long Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_light\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#6C727A\\"}]},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots BackgroundContainer Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessibilityIgnoresInvertColors\\":true,\\"style\\":{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\",\\"position\\":\\"absolute\\"}},\\"children\\":[{\\"type\\":\\"Image\\",\\"props\\":{\\"source\\":{\\"uri\\":\\"message_empty_light\\"},\\"style\\":[{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},{\\"width\\":\\"100%\\",\\"height\\":\\"100%\\"},null]},\\"children\\":null}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"position\\":\\"absolute\\",\\"top\\":60,\\"left\\":0,\\"right\\":0,\\"fontSize\\":16,\\"paddingHorizontal\\":24,\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#6C727A\\"}]},\\"children\\":[\\"Text here\\"]}]}"`;
|
|
@ -0,0 +1,13 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots Button Custom Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":false},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"purple\\",\\"padding\\":10,\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"yellow\\",\\"fontSize\\":18},[{\\"textAlign\\":\\"left\\"}]],\\"accessibilityLabel\\":\\"Press me!\\"},\\"children\\":[\\"Press me!\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Button Disabled Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":true},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"#1d74f5\\",\\"opacity\\":0.3}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#ffffff\\",\\"fontSize\\":16},null],\\"accessibilityLabel\\":\\"Press me!\\"},\\"children\\":[\\"Press me!\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Button Disabled Loading Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":true},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"#1d74f5\\",\\"opacity\\":0.3}},\\"children\\":[{\\"type\\":\\"ActivityIndicator\\",\\"props\\":{\\"style\\":[{\\"padding\\":16,\\"flex\\":1},null],\\"color\\":\\"#ffffff\\"},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Button Loading Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":true},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"#1d74f5\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"ActivityIndicator\\",\\"props\\":{\\"style\\":[{\\"padding\\":16,\\"flex\\":1},null],\\"color\\":\\"#ffffff\\"},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Button Primary Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":false},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"#1d74f5\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#ffffff\\",\\"fontSize\\":16},null],\\"accessibilityLabel\\":\\"Press me!\\"},\\"children\\":[\\"Press me!\\"]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Button Secondary Button 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Press me!\\",\\"accessibilityState\\":{\\"disabled\\":false},\\"testID\\":\\"testButton\\",\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":12,\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\",\\"fontSize\\":16},null],\\"accessibilityLabel\\":\\"Press me!\\"},\\"children\\":[\\"Press me!\\"]}]}"`;
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots Chip Chip Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityState\\":{\\"disabled\\":false},\\"focusable\\":true,\\"style\\":[{\\"paddingHorizontal\\":8,\\"marginRight\\":8,\\"borderRadius\\":4,\\"justifyContent\\":\\"center\\",\\"maxWidth\\":192},{\\"backgroundColor\\":\\"#efeff4\\"},null],\\"collapsable\\":false},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4},{\\"marginRight\\":8,\\"marginVertical\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=56\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginRight\\":8,\\"maxWidth\\":120}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"Rocket.Cat\\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":16,\\"color\\":\\"#6C727A\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Chip Chip With Short Text 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityState\\":{\\"disabled\\":false},\\"focusable\\":true,\\"style\\":[{\\"paddingHorizontal\\":8,\\"marginRight\\":8,\\"borderRadius\\":4,\\"justifyContent\\":\\"center\\",\\"maxWidth\\":192},{\\"backgroundColor\\":\\"#efeff4\\"},null],\\"collapsable\\":false},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4},{\\"marginRight\\":8,\\"marginVertical\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=56\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginRight\\":8,\\"maxWidth\\":120}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"Short\\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":16,\\"color\\":\\"#6C727A\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Chip Chip Without Avatar 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityState\\":{\\"disabled\\":false},\\"focusable\\":true,\\"style\\":[{\\"paddingHorizontal\\":8,\\"marginRight\\":8,\\"borderRadius\\":4,\\"justifyContent\\":\\"center\\",\\"maxWidth\\":192},{\\"backgroundColor\\":\\"#efeff4\\"},null],\\"collapsable\\":false},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginRight\\":8,\\"maxWidth\\":120}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"Without Avatar\\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":16,\\"color\\":\\"#6C727A\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Chip Chip Without Avatar And Icon 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityState\\":{\\"disabled\\":true},\\"focusable\\":true,\\"style\\":[{\\"paddingHorizontal\\":8,\\"marginRight\\":8,\\"borderRadius\\":4,\\"justifyContent\\":\\"center\\",\\"maxWidth\\":192},{\\"backgroundColor\\":\\"#efeff4\\"},null],\\"collapsable\\":false},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginRight\\":8,\\"maxWidth\\":120}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"Without Avatar and Icon\\"]}]}]}]}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Chip Chip Without Icon 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityState\\":{\\"disabled\\":true},\\"focusable\\":true,\\"style\\":[{\\"paddingHorizontal\\":8,\\"marginRight\\":8,\\"borderRadius\\":4,\\"justifyContent\\":\\"center\\",\\"maxWidth\\":192},{\\"backgroundColor\\":\\"#efeff4\\"},null],\\"collapsable\\":false},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4},{\\"marginRight\\":8,\\"marginVertical\\":8}],\\"testID\\":\\"avatar\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"overflow\\":\\"hidden\\"},{\\"width\\":28,\\"height\\":28,\\"borderRadius\\":4}]},\\"children\\":[{\\"type\\":\\"FastImageView\\",\\"props\\":{\\"style\\":{\\"position\\":\\"absolute\\",\\"left\\":0,\\"right\\":0,\\"top\\":0,\\"bottom\\":0},\\"source\\":{\\"uri\\":\\"https://open.rocket.chat/avatar/rocket.cat?format=png&size=56\\",\\"headers\\":{\\"User-Agent\\":\\"RC Mobile; ios unknown; vunknown (unknown)\\"},\\"priority\\":\\"high\\"},\\"resizeMode\\":\\"cover\\"},\\"children\\":null}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginRight\\":8,\\"maxWidth\\":120}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#2f343d\\"}],\\"numberOfLines\\":1},\\"children\\":[\\"Without Icon\\"]}]}]}]}]}"`;
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots HeaderButtons Badge 1`] = `"{\\"type\\":\\"RNCSafeAreaProvider\\",\\"props\\":{\\"style\\":[{\\"flex\\":1},null]},\\"children\\":null}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots HeaderButtons Common 1`] = `"{\\"type\\":\\"RNCSafeAreaProvider\\",\\"props\\":{\\"style\\":[{\\"flex\\":1},null]},\\"children\\":null}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots HeaderButtons Icons 1`] = `"{\\"type\\":\\"RNCSafeAreaProvider\\",\\"props\\":{\\"style\\":[{\\"flex\\":1},null]},\\"children\\":null}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots HeaderButtons Themes 1`] = `"{\\"type\\":\\"RNCSafeAreaProvider\\",\\"props\\":{\\"style\\":[{\\"flex\\":1},null]},\\"children\\":null}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots HeaderButtons Title 1`] = `"{\\"type\\":\\"RNCSafeAreaProvider\\",\\"props\\":{\\"style\\":[{\\"flex\\":1},null]},\\"children\\":null}"`;
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots Login Services Separators 1`] = `"[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"More options\\",\\"accessibilityState\\":{\\"disabled\\":false},\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":0,\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#1d74f5\\",\\"fontSize\\":16},null],\\"accessibilityLabel\\":\\"More options\\"},\\"children\\":[\\"More options\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginVertical\\":24}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":1,\\"flex\\":1},{\\"backgroundColor\\":\\"#e1e5e8\\"}]},\\"children\\":null},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":14,\\"marginRight\\":14,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"OR\\"]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":1,\\"flex\\":1},{\\"backgroundColor\\":\\"#e1e5e8\\"}]},\\"children\\":null}]},{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"accessibilityLabel\\":\\"Less options\\",\\"accessibilityState\\":{\\"disabled\\":false},\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"paddingHorizontal\\":14,\\"justifyContent\\":\\"center\\",\\"height\\":48,\\"borderRadius\\":4,\\"marginBottom\\":0,\\"backgroundColor\\":\\"#ffffff\\",\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"center\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#1d74f5\\",\\"fontSize\\":16},null],\\"accessibilityLabel\\":\\"Less options\\"},\\"children\\":[\\"Less options\\"]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginVertical\\":24}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":1,\\"flex\\":1},{\\"backgroundColor\\":\\"#e1e5e8\\"}]},\\"children\\":null},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"marginLeft\\":14,\\"marginRight\\":14,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"OR\\"]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"height\\":1,\\"flex\\":1},{\\"backgroundColor\\":\\"#e1e5e8\\"}]},\\"children\\":null}]}]"`;
|
||||||
|
|
||||||
|
exports[`Storyshots Login Services Service List 1`] = `"[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"borderRadius\\":4,\\"width\\":\\"100%\\",\\"height\\":48,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"justifyContent\\":\\"center\\",\\"paddingHorizontal\\":15}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#0d0e12\\"},{\\"position\\":\\"absolute\\",\\"left\\":15,\\"top\\":12,\\"width\\":24,\\"height\\":24},{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"fontSize\\":16},{\\"color\\":\\"#0d0e12\\"}]},\\"children\\":[\\"Continue with\\",\\" \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"}},\\"children\\":[\\"github\\"]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"borderRadius\\":4,\\"width\\":\\"100%\\",\\"height\\":48,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"justifyContent\\":\\"center\\",\\"paddingHorizontal\\":15}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#0d0e12\\"},{\\"position\\":\\"absolute\\",\\"left\\":15,\\"top\\":12,\\"width\\":24,\\"height\\":24},{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"fontSize\\":16},{\\"color\\":\\"#0d0e12\\"}]},\\"children\\":[\\"Continue with\\",\\" \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"}},\\"children\\":[\\"gitlab\\"]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"borderRadius\\":4,\\"width\\":\\"100%\\",\\"height\\":48,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"justifyContent\\":\\"center\\",\\"paddingHorizontal\\":15}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#0d0e12\\"},{\\"position\\":\\"absolute\\",\\"left\\":15,\\"top\\":12,\\"width\\":24,\\"height\\":24},{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"fontSize\\":16},{\\"color\\":\\"#0d0e12\\"}]},\\"children\\":[\\"Continue with\\",\\" \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"}},\\"children\\":[\\"google\\"]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"borderRadius\\":4,\\"width\\":\\"100%\\",\\"height\\":48,\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"justifyContent\\":\\"center\\",\\"paddingHorizontal\\":15}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":24,\\"color\\":\\"#0d0e12\\"},{\\"position\\":\\"absolute\\",\\"left\\":15,\\"top\\":12,\\"width\\":24,\\"height\\":24},{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"fontSize\\":16},{\\"color\\":\\"#0d0e12\\"}]},\\"children\\":[\\"Continue with\\",\\" \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"}},\\"children\\":[\\"apple\\"]}]}]}]"`;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots SearchBox Basic 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"testID\\":\\"searchbox\\",\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"marginBottom\\":10},{\\"margin\\":16,\\"marginBottom\\":16}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"position\\":\\"relative\\",\\"justifyContent\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"TextInput\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#0d0e12\\"},[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"height\\":48,\\"fontSize\\":16,\\"paddingHorizontal\\":16,\\"paddingVertical\\":10,\\"borderWidth\\":1,\\"borderRadius\\":4},null,{\\"paddingRight\\":45},{\\"backgroundColor\\":\\"#ffffff\\",\\"borderColor\\":\\"#cbcbcc\\",\\"color\\":\\"#0d0e12\\"},null,null],{\\"textAlign\\":\\"auto\\"}],\\"placeholderTextColor\\":\\"#9ca2a8\\",\\"keyboardAppearance\\":\\"light\\",\\"autoCorrect\\":false,\\"autoCapitalize\\":\\"none\\",\\"underlineColorAndroid\\":\\"transparent\\",\\"accessibilityLabel\\":\\"Search\\",\\"placeholder\\":\\"Search\\",\\"value\\":\\"\\",\\"blurOnSubmit\\":true,\\"returnKeyType\\":\\"search\\"},\\"children\\":null},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":20,\\"color\\":\\"#2f343d\\"},[{\\"position\\":\\"absolute\\"},{\\"right\\":12}],{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,27 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Action - Buttons 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Action - Select 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Context 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Fields 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Image 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + DatePicker 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + Markdown List 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + Multi Select 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + Overflow 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + Select 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + button 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section + image 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitMessage Section 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Actions 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Contexts and Dividers 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - DatePicker with error 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Form Input 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Form TextArea 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Images 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Input with error 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Multilne with error 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Section and Accessories 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
||||||
|
|
||||||
|
exports[`Storyshots UIKit/UiKitModal Modal - Section and Selects 1`] = `"{\\"type\\":\\"RCTScrollView\\",\\"props\\":{\\"style\\":[{\\"flex\\":1,\\"backgroundColor\\":\\"#fff\\"},{\\"paddingHorizontal\\":16}],\\"keyboardShouldPersistTaps\\":\\"always\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":null}]}"`;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots CollapsibleQuote Item 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"padding\\":10}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"accessible\\":true,\\"testID\\":\\"collapsibleQuoteTouchable-Engineering (9 today)\\",\\"hitSlop\\":{\\"top\\":4,\\"right\\":4,\\"bottom\\":4,\\"left\\":4},\\"focusable\\":true,\\"collapsable\\":false,\\"style\\":{\\"flexDirection\\":\\"row\\",\\"alignItems\\":\\"center\\",\\"marginTop\\":6,\\"borderWidth\\":1,\\"borderRadius\\":4,\\"minHeight\\":40,\\"backgroundColor\\":\\"#f3f4f5\\",\\"borderLeftColor\\":\\"#CBCED1\\",\\"borderTopColor\\":\\"#e1e5e8\\",\\"borderRightColor\\":\\"#e1e5e8\\",\\"borderBottomColor\\":\\"#e1e5e8\\",\\"borderLeftWidth\\":2,\\"opacity\\":1}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"borderRadius\\":4,\\"padding\\":8}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#6C727A\\"}]},\\"children\\":[\\"Engineering (9 today)\\"]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"width\\":20,\\"height\\":20,\\"right\\":8,\\"top\\":8,\\"justifyContent\\":\\"center\\",\\"alignItems\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":22,\\"color\\":\\"#6C727A\\"},null,{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}]}"`;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Storyshots SwitchItem Switch 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"alignItems\\":\\"flex-start\\",\\"padding\\":16}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"minHeight\\":54,\\"alignItems\\":\\"center\\",\\"justifyContent\\":\\"space-between\\",\\"flexDirection\\":\\"row\\",\\"maxHeight\\":80,\\"marginBottom\\":12},{\\"backgroundColor\\":\\"#ffffff\\"}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flex\\":1,\\"marginRight\\":8}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":14,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"500\\"},{\\"color\\":\\"#0d0e12\\"}]},\\"children\\":[\\"Welcome to Rocket.Chat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"testID\\":\\"create-channel-switch-id-hint\\",\\"style\\":[{\\"fontSize\\":14,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#9ca2a8\\"}]},\\"children\\":[\\"Only authorized users can write new messages\\"]}]},{\\"type\\":\\"RCTSwitch\\",\\"props\\":{\\"testID\\":\\"create-channel-switch-id\\",\\"disabled\\":false,\\"onTintColor\\":\\"#2de0a5\\",\\"style\\":{\\"height\\":31,\\"width\\":51},\\"tintColor\\":\\"#f5455c\\",\\"value\\":false,\\"accessibilityRole\\":\\"switch\\"},\\"children\\":null}]}]}"`;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,78 +1,102 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
CFPropertyList (3.0.2)
|
CFPropertyList (3.0.5)
|
||||||
addressable (2.7.0)
|
rexml
|
||||||
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
|
artifactory (3.0.15)
|
||||||
atomos (0.1.3)
|
atomos (0.1.3)
|
||||||
aws-eventstream (1.0.3)
|
aws-eventstream (1.2.0)
|
||||||
aws-partitions (1.294.0)
|
aws-partitions (1.600.0)
|
||||||
aws-sdk-core (3.92.0)
|
aws-sdk-core (3.131.2)
|
||||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
aws-partitions (~> 1, >= 1.239.0)
|
aws-partitions (~> 1, >= 1.525.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
jmespath (~> 1.0)
|
jmespath (~> 1, >= 1.6.1)
|
||||||
aws-sdk-kms (1.30.0)
|
aws-sdk-kms (1.57.0)
|
||||||
aws-sdk-core (~> 3, >= 3.71.0)
|
aws-sdk-core (~> 3, >= 3.127.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.61.2)
|
aws-sdk-s3 (1.114.0)
|
||||||
aws-sdk-core (~> 3, >= 3.83.0)
|
aws-sdk-core (~> 3, >= 3.127.0)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.4)
|
||||||
aws-sigv4 (1.1.1)
|
aws-sigv4 (1.5.0)
|
||||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
babosa (1.0.3)
|
babosa (1.0.4)
|
||||||
claide (1.0.3)
|
claide (1.1.0)
|
||||||
colored (1.2)
|
colored (1.2)
|
||||||
colored2 (3.1.2)
|
colored2 (3.1.2)
|
||||||
commander-fastlane (4.4.6)
|
commander (4.6.0)
|
||||||
highline (~> 1.7.2)
|
highline (~> 2.0.0)
|
||||||
declarative (0.0.10)
|
declarative (0.0.20)
|
||||||
declarative-option (0.1.0)
|
digest-crc (0.6.4)
|
||||||
digest-crc (0.5.1)
|
rake (>= 12.0.0, < 14.0.0)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
dotenv (2.7.5)
|
dotenv (2.7.6)
|
||||||
emoji_regex (1.0.1)
|
emoji_regex (3.2.3)
|
||||||
excon (0.73.0)
|
excon (0.92.3)
|
||||||
faraday (0.17.3)
|
faraday (1.10.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-cookie_jar (0.0.6)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday (>= 0.7.4)
|
faraday-excon (~> 1.1)
|
||||||
|
faraday-httpclient (~> 1.0)
|
||||||
|
faraday-multipart (~> 1.0)
|
||||||
|
faraday-net_http (~> 1.0)
|
||||||
|
faraday-net_http_persistent (~> 1.0)
|
||||||
|
faraday-patron (~> 1.0)
|
||||||
|
faraday-rack (~> 1.0)
|
||||||
|
faraday-retry (~> 1.0)
|
||||||
|
ruby2_keywords (>= 0.0.4)
|
||||||
|
faraday-cookie_jar (0.0.7)
|
||||||
|
faraday (>= 0.8.0)
|
||||||
http-cookie (~> 1.0.0)
|
http-cookie (~> 1.0.0)
|
||||||
faraday_middleware (0.13.1)
|
faraday-em_http (1.0.0)
|
||||||
faraday (>= 0.7.4, < 1.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
fastimage (2.1.7)
|
faraday-excon (1.1.0)
|
||||||
fastlane (2.145.0)
|
faraday-httpclient (1.0.1)
|
||||||
|
faraday-multipart (1.0.4)
|
||||||
|
multipart-post (~> 2)
|
||||||
|
faraday-net_http (1.0.1)
|
||||||
|
faraday-net_http_persistent (1.2.0)
|
||||||
|
faraday-patron (1.0.0)
|
||||||
|
faraday-rack (1.0.0)
|
||||||
|
faraday-retry (1.0.3)
|
||||||
|
faraday_middleware (1.2.0)
|
||||||
|
faraday (~> 1.0)
|
||||||
|
fastimage (2.2.6)
|
||||||
|
fastlane (2.206.2)
|
||||||
CFPropertyList (>= 2.3, < 4.0.0)
|
CFPropertyList (>= 2.3, < 4.0.0)
|
||||||
addressable (>= 2.3, < 3.0.0)
|
addressable (>= 2.8, < 3.0.0)
|
||||||
|
artifactory (~> 3.0)
|
||||||
aws-sdk-s3 (~> 1.0)
|
aws-sdk-s3 (~> 1.0)
|
||||||
babosa (>= 1.0.2, < 2.0.0)
|
babosa (>= 1.0.3, < 2.0.0)
|
||||||
bundler (>= 1.12.0, < 3.0.0)
|
bundler (>= 1.12.0, < 3.0.0)
|
||||||
colored
|
colored
|
||||||
commander-fastlane (>= 4.4.6, < 5.0.0)
|
commander (~> 4.6)
|
||||||
dotenv (>= 2.1.1, < 3.0.0)
|
dotenv (>= 2.1.1, < 3.0.0)
|
||||||
emoji_regex (>= 0.1, < 2.0)
|
emoji_regex (>= 0.1, < 4.0)
|
||||||
excon (>= 0.71.0, < 1.0.0)
|
excon (>= 0.71.0, < 1.0.0)
|
||||||
faraday (~> 0.17)
|
faraday (~> 1.0)
|
||||||
faraday-cookie_jar (~> 0.0.6)
|
faraday-cookie_jar (~> 0.0.6)
|
||||||
faraday_middleware (~> 0.13.1)
|
faraday_middleware (~> 1.0)
|
||||||
fastimage (>= 2.1.0, < 3.0.0)
|
fastimage (>= 2.1.0, < 3.0.0)
|
||||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||||
google-api-client (>= 0.29.2, < 0.37.0)
|
google-apis-androidpublisher_v3 (~> 0.3)
|
||||||
google-cloud-storage (>= 1.15.0, < 2.0.0)
|
google-apis-playcustomapp_v1 (~> 0.1)
|
||||||
highline (>= 1.7.2, < 2.0.0)
|
google-cloud-storage (~> 1.31)
|
||||||
|
highline (~> 2.0)
|
||||||
json (< 3.0.0)
|
json (< 3.0.0)
|
||||||
jwt (~> 2.1.0)
|
jwt (>= 2.1.0, < 3)
|
||||||
mini_magick (>= 4.9.4, < 5.0.0)
|
mini_magick (>= 4.9.4, < 5.0.0)
|
||||||
multi_xml (~> 0.5)
|
|
||||||
multipart-post (~> 2.0.0)
|
multipart-post (~> 2.0.0)
|
||||||
|
naturally (~> 2.2)
|
||||||
|
optparse (~> 0.1.1)
|
||||||
plist (>= 3.1.0, < 4.0.0)
|
plist (>= 3.1.0, < 4.0.0)
|
||||||
public_suffix (~> 2.0.0)
|
rubyzip (>= 2.0.0, < 3.0.0)
|
||||||
rubyzip (>= 1.3.0, < 2.0.0)
|
|
||||||
security (= 0.1.3)
|
security (= 0.1.3)
|
||||||
simctl (~> 1.6.3)
|
simctl (~> 1.6.3)
|
||||||
slack-notifier (>= 2.0.0, < 3.0.0)
|
|
||||||
terminal-notifier (>= 2.0.0, < 3.0.0)
|
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||||
terminal-table (>= 1.4.5, < 2.0.0)
|
terminal-table (>= 1.4.5, < 2.0.0)
|
||||||
tty-screen (>= 0.6.3, < 1.0.0)
|
tty-screen (>= 0.6.3, < 1.0.0)
|
||||||
|
@ -82,92 +106,106 @@ GEM
|
||||||
xcpretty (~> 0.3.0)
|
xcpretty (~> 0.3.0)
|
||||||
xcpretty-travis-formatter (>= 0.0.3)
|
xcpretty-travis-formatter (>= 0.0.3)
|
||||||
gh_inspector (1.1.3)
|
gh_inspector (1.1.3)
|
||||||
google-api-client (0.36.4)
|
google-apis-androidpublisher_v3 (0.22.0)
|
||||||
|
google-apis-core (>= 0.5, < 2.a)
|
||||||
|
google-apis-core (0.6.0)
|
||||||
addressable (~> 2.5, >= 2.5.1)
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
googleauth (~> 0.9)
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
httpclient (>= 2.8.1, < 3.0)
|
httpclient (>= 2.8.1, < 3.a)
|
||||||
mini_mime (~> 1.0)
|
mini_mime (~> 1.0)
|
||||||
representable (~> 3.0)
|
representable (~> 3.0)
|
||||||
retriable (>= 2.0, < 4.0)
|
retriable (>= 2.0, < 4.a)
|
||||||
signet (~> 0.12)
|
rexml
|
||||||
google-cloud-core (1.5.0)
|
webrick
|
||||||
|
google-apis-iamcredentials_v1 (0.12.0)
|
||||||
|
google-apis-core (>= 0.6, < 2.a)
|
||||||
|
google-apis-playcustomapp_v1 (0.9.0)
|
||||||
|
google-apis-core (>= 0.6, < 2.a)
|
||||||
|
google-apis-storage_v1 (0.15.0)
|
||||||
|
google-apis-core (>= 0.5, < 2.a)
|
||||||
|
google-cloud-core (1.6.0)
|
||||||
google-cloud-env (~> 1.0)
|
google-cloud-env (~> 1.0)
|
||||||
google-cloud-errors (~> 1.0)
|
google-cloud-errors (~> 1.0)
|
||||||
google-cloud-env (1.3.1)
|
google-cloud-env (1.6.0)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.3, < 3.0)
|
||||||
google-cloud-errors (1.0.0)
|
google-cloud-errors (1.2.0)
|
||||||
google-cloud-storage (1.25.1)
|
google-cloud-storage (1.36.2)
|
||||||
addressable (~> 2.5)
|
addressable (~> 2.8)
|
||||||
digest-crc (~> 0.4)
|
digest-crc (~> 0.4)
|
||||||
google-api-client (~> 0.33)
|
google-apis-iamcredentials_v1 (~> 0.1)
|
||||||
google-cloud-core (~> 1.2)
|
google-apis-storage_v1 (~> 0.1)
|
||||||
googleauth (~> 0.9)
|
google-cloud-core (~> 1.6)
|
||||||
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
mini_mime (~> 1.0)
|
mini_mime (~> 1.0)
|
||||||
googleauth (0.11.0)
|
googleauth (1.2.0)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.3, < 3.a)
|
||||||
jwt (>= 1.4, < 3.0)
|
jwt (>= 1.4, < 3.0)
|
||||||
memoist (~> 0.16)
|
memoist (~> 0.16)
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
os (>= 0.9, < 2.0)
|
os (>= 0.9, < 2.0)
|
||||||
signet (~> 0.12)
|
signet (>= 0.16, < 2.a)
|
||||||
highline (1.7.10)
|
highline (2.0.3)
|
||||||
http-cookie (1.0.3)
|
http-cookie (1.0.5)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
jmespath (1.4.0)
|
jmespath (1.6.1)
|
||||||
json (2.3.0)
|
json (2.6.2)
|
||||||
jwt (2.1.0)
|
jwt (2.4.1)
|
||||||
memoist (0.16.2)
|
memoist (0.16.2)
|
||||||
mini_magick (4.10.1)
|
mini_magick (4.11.0)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.1.2)
|
||||||
multi_json (1.14.1)
|
multi_json (1.15.0)
|
||||||
multi_xml (0.6.0)
|
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
nanaimo (0.2.6)
|
nanaimo (0.3.0)
|
||||||
naturally (2.2.0)
|
naturally (2.2.1)
|
||||||
os (1.1.0)
|
optparse (0.1.1)
|
||||||
plist (3.5.0)
|
os (1.1.4)
|
||||||
public_suffix (2.0.5)
|
plist (3.6.0)
|
||||||
representable (3.0.4)
|
public_suffix (4.0.7)
|
||||||
|
rake (13.0.6)
|
||||||
|
representable (3.2.0)
|
||||||
declarative (< 0.1.0)
|
declarative (< 0.1.0)
|
||||||
declarative-option (< 0.2.0)
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||||
uber (< 0.2.0)
|
uber (< 0.2.0)
|
||||||
retriable (3.1.2)
|
retriable (3.1.2)
|
||||||
|
rexml (3.2.5)
|
||||||
rouge (2.0.7)
|
rouge (2.0.7)
|
||||||
rubyzip (1.3.0)
|
ruby2_keywords (0.0.5)
|
||||||
|
rubyzip (2.3.2)
|
||||||
security (0.1.3)
|
security (0.1.3)
|
||||||
signet (0.14.0)
|
signet (0.17.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.8)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.5, < 3.a)
|
||||||
jwt (>= 1.5, < 3.0)
|
jwt (>= 1.5, < 3.0)
|
||||||
multi_json (~> 1.10)
|
multi_json (~> 1.10)
|
||||||
simctl (1.6.8)
|
simctl (1.6.8)
|
||||||
CFPropertyList
|
CFPropertyList
|
||||||
naturally
|
naturally
|
||||||
slack-notifier (2.3.2)
|
|
||||||
terminal-notifier (2.0.0)
|
terminal-notifier (2.0.0)
|
||||||
terminal-table (1.8.0)
|
terminal-table (1.8.0)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||||
|
trailblazer-option (0.1.2)
|
||||||
tty-cursor (0.7.1)
|
tty-cursor (0.7.1)
|
||||||
tty-screen (0.7.1)
|
tty-screen (0.8.1)
|
||||||
tty-spinner (0.9.3)
|
tty-spinner (0.9.3)
|
||||||
tty-cursor (~> 0.7)
|
tty-cursor (~> 0.7)
|
||||||
uber (0.1.0)
|
uber (0.1.0)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.7)
|
unf_ext (0.0.8.2)
|
||||||
unf_ext (0.0.7.7-x64-mingw32)
|
unicode-display_width (1.8.0)
|
||||||
unicode-display_width (1.7.0)
|
webrick (1.7.0)
|
||||||
word_wrap (1.0.0)
|
word_wrap (1.0.0)
|
||||||
xcodeproj (1.15.0)
|
xcodeproj (1.22.0)
|
||||||
CFPropertyList (>= 2.3.3, < 4.0)
|
CFPropertyList (>= 2.3.3, < 4.0)
|
||||||
atomos (~> 0.1.3)
|
atomos (~> 0.1.3)
|
||||||
claide (>= 1.0.2, < 2.0)
|
claide (>= 1.0.2, < 2.0)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
nanaimo (~> 0.2.6)
|
nanaimo (~> 0.3.0)
|
||||||
|
rexml (~> 3.2.4)
|
||||||
xcpretty (0.3.0)
|
xcpretty (0.3.0)
|
||||||
rouge (~> 2.0.7)
|
rouge (~> 2.0.7)
|
||||||
xcpretty-travis-formatter (1.0.0)
|
xcpretty-travis-formatter (1.0.1)
|
||||||
xcpretty (~> 0.2, >= 0.0.7)
|
xcpretty (~> 0.2, >= 0.0.7)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
@ -178,4 +216,4 @@ DEPENDENCIES
|
||||||
fastlane
|
fastlane
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.0.2
|
2.3.11
|
||||||
|
|
|
@ -93,7 +93,6 @@ project.ext.react = [
|
||||||
]
|
]
|
||||||
|
|
||||||
apply from: "../../node_modules/react-native/react.gradle"
|
apply from: "../../node_modules/react-native/react.gradle"
|
||||||
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to true to create two separate APKs instead of one:
|
* Set this to true to create two separate APKs instead of one:
|
||||||
|
@ -131,20 +130,24 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
||||||
*/
|
*/
|
||||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||||
|
|
||||||
android {
|
/**
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
* Architectures to build native code for.
|
||||||
|
*/
|
||||||
|
def reactNativeArchitectures() {
|
||||||
|
def value = project.getProperties().get("reactNativeArchitectures")
|
||||||
|
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
||||||
|
}
|
||||||
|
|
||||||
compileOptions {
|
android {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
ndkVersion rootProject.ext.ndkVersion
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId APPLICATION_ID
|
applicationId APPLICATION_ID
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode VERSIONCODE as Integer
|
versionCode VERSIONCODE as Integer
|
||||||
versionName "4.29.0"
|
versionName "4.37.0"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
if (!isFoss) {
|
if (!isFoss) {
|
||||||
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
|
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
|
||||||
|
@ -153,6 +156,76 @@ android {
|
||||||
resValue "string", "rn_config_reader_custom_package", "chat.rocket.reactnative"
|
resValue "string", "rn_config_reader_custom_package", "chat.rocket.reactnative"
|
||||||
testBuildType System.getProperty('testBuildType', 'debug')
|
testBuildType System.getProperty('testBuildType', 'debug')
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
|
|
||||||
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// We configure the NDK build only if you decide to opt-in for the New Architecture.
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
arguments "APP_PLATFORM=android-21",
|
||||||
|
"APP_STL=c++_shared",
|
||||||
|
"NDK_TOOLCHAIN_VERSION=clang",
|
||||||
|
"GENERATED_SRC_DIR=$buildDir/generated/source",
|
||||||
|
"PROJECT_BUILD_DIR=$buildDir",
|
||||||
|
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
|
||||||
|
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build"
|
||||||
|
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
|
||||||
|
cppFlags "-std=c++17"
|
||||||
|
// Make sure this target name is the same you specify inside the
|
||||||
|
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
|
||||||
|
targets "rndiffapp_appmodules"
|
||||||
|
// Fix for windows limit on number of character in file paths and in command lines
|
||||||
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
|
arguments "NDK_APP_SHORT_COMMANDS=true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!enableSeparateBuildPerCPUArchitecture) {
|
||||||
|
ndk {
|
||||||
|
abiFilters (*reactNativeArchitectures())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// We configure the NDK build only if you decide to opt-in for the New Architecture.
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
path "$projectDir/src/main/jni/Android.mk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
|
||||||
|
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
|
||||||
|
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
|
||||||
|
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
||||||
|
into("$buildDir/react-ndk/exported")
|
||||||
|
}
|
||||||
|
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
|
||||||
|
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
|
||||||
|
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
||||||
|
into("$buildDir/react-ndk/exported")
|
||||||
|
}
|
||||||
|
afterEvaluate {
|
||||||
|
// If you wish to add a custom TurboModule or component locally,
|
||||||
|
// you should uncomment this line.
|
||||||
|
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
|
||||||
|
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
|
||||||
|
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
|
||||||
|
// Due to a bug inside AGP, we have to explicitly set a dependency
|
||||||
|
// between configureNdkBuild* tasks and the preBuild tasks.
|
||||||
|
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
|
||||||
|
configureNdkBuildRelease.dependsOn(preReleaseBuild)
|
||||||
|
configureNdkBuildDebug.dependsOn(preDebugBuild)
|
||||||
|
reactNativeArchitectures().each { architecture ->
|
||||||
|
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
|
||||||
|
dependsOn("preDebugBuild")
|
||||||
|
}
|
||||||
|
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
|
||||||
|
dependsOn("preReleaseBuild")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
@ -170,17 +243,20 @@ android {
|
||||||
reset()
|
reset()
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
enable enableSeparateBuildPerCPUArchitecture
|
||||||
universalApk false // If true, also generate a universal APK
|
universalApk false // If true, also generate a universal APK
|
||||||
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
include (*reactNativeArchitectures())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
minifyEnabled enableProguardInReleaseBuilds
|
||||||
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
|
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
|
||||||
|
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
if (!isFoss) {
|
if (!isFoss) {
|
||||||
firebaseCrashlytics {
|
firebaseCrashlytics {
|
||||||
nativeSymbolUploadEnabled true
|
nativeSymbolUploadEnabled true
|
||||||
|
strippedNativeLibsDir 'build/intermediates/stripped_native_libs/release/out/lib'
|
||||||
|
unstrippedNativeLibsDir 'build/intermediates/merged_native_libs/release/out/lib'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,6 +269,11 @@ android {
|
||||||
// pickFirst '**/x86_64/libc++_shared.so'
|
// pickFirst '**/x86_64/libc++_shared.so'
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// FIXME: Remove when we update RN
|
||||||
|
packagingOptions {
|
||||||
|
pickFirst '**/*.so'
|
||||||
|
}
|
||||||
|
|
||||||
// applicationVariants are e.g. debug, release
|
// applicationVariants are e.g. debug, release
|
||||||
|
|
||||||
flavorDimensions "app", "type"
|
flavorDimensions "app", "type"
|
||||||
|
@ -205,10 +286,6 @@ android {
|
||||||
dimension = "app"
|
dimension = "app"
|
||||||
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
||||||
}
|
}
|
||||||
e2e {
|
|
||||||
dimension = "app"
|
|
||||||
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
|
||||||
}
|
|
||||||
foss {
|
foss {
|
||||||
dimension = "type"
|
dimension = "type"
|
||||||
buildConfigField "boolean", "FDROID_BUILD", "true"
|
buildConfigField "boolean", "FDROID_BUILD", "true"
|
||||||
|
@ -236,16 +313,6 @@ android {
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
java.srcDirs = ['src/main/java', 'src/play/java']
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
manifest.srcFile 'src/play/AndroidManifest.xml'
|
||||||
}
|
}
|
||||||
e2ePlayDebug {
|
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
||||||
res.srcDirs = ['src/experimental/res']
|
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
|
||||||
}
|
|
||||||
e2ePlayRelease {
|
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
||||||
res.srcDirs = ['src/experimental/res']
|
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
|
@ -275,25 +342,24 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
addUnimodulesDependencies()
|
|
||||||
implementation project(':@react-native-community_viewpager')
|
implementation project(':@react-native-community_viewpager')
|
||||||
|
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||||
playImplementation project(':react-native-notifications')
|
playImplementation project(':react-native-notifications')
|
||||||
playImplementation 'com.google.firebase:firebase-core:16.0.0'
|
playImplementation 'com.google.firebase:firebase-core:16.0.0'
|
||||||
playImplementation project(':@react-native-firebase_app')
|
playImplementation project(':@react-native-firebase_app')
|
||||||
playImplementation project(':@react-native-firebase_analytics')
|
playImplementation project(':@react-native-firebase_analytics')
|
||||||
playImplementation project(':@react-native-firebase_crashlytics')
|
playImplementation project(':@react-native-firebase_crashlytics')
|
||||||
implementation(project(':react-native-jitsi-meet')) { // https://github.com/skrafft/react-native-jitsi-meet#side-note
|
|
||||||
exclude group: 'com.facebook.react',module:'react-native-svg'
|
|
||||||
}
|
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
|
|
||||||
//noinspection GradleDynamicVersion
|
//noinspection GradleDynamicVersion
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||||
exclude group:'com.facebook.fbjni'
|
exclude group:'com.facebook.fbjni'
|
||||||
}
|
}
|
||||||
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||||
exclude group:'com.facebook.flipper'
|
exclude group:'com.facebook.flipper'
|
||||||
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
||||||
}
|
}
|
||||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||||
exclude group:'com.facebook.flipper'
|
exclude group:'com.facebook.flipper'
|
||||||
|
@ -307,20 +373,31 @@ dependencies {
|
||||||
implementation jscFlavor
|
implementation jscFlavor
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation "com.google.code.gson:gson:2.8.5"
|
implementation "com.google.code.gson:gson:2.8.9"
|
||||||
implementation "com.github.bumptech.glide:glide:4.9.0"
|
implementation "com.github.bumptech.glide:glide:4.9.0"
|
||||||
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
|
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
|
||||||
implementation "com.tencent:mmkv-static:1.2.1"
|
implementation "com.tencent:mmkv-static:1.2.10"
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
|
androidTestImplementation('com.wix:detox:+')
|
||||||
implementation "com.squareup.okhttp3:okhttp-urlconnection:4.9.0"
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
androidTestImplementation('com.wix:detox:+') { transitive = true }
|
implementation 'com.facebook.soloader:soloader:0.10.4'
|
||||||
androidTestImplementation 'junit:junit:4.12'
|
}
|
||||||
|
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// If new architecture is enabled, we let you build RN from source
|
||||||
|
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
|
||||||
|
// This will be applied to all the imported transtitive dependency.
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.dependencySubstitution {
|
||||||
|
substitute(module("com.facebook.react:react-native"))
|
||||||
|
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run this once to be able to run the application with BUCK
|
// Run this once to be able to run the application with BUCK
|
||||||
// puts all compile dependencies into folder libs for BUCK to use
|
// puts all compile dependencies into folder libs for BUCK to use
|
||||||
task copyDownloadableDepsToLibs(type: Copy) {
|
task copyDownloadableDepsToLibs(type: Copy) {
|
||||||
from configurations.compile
|
from configurations.implementation
|
||||||
into 'libs'
|
into 'libs'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,3 +405,11 @@ apply from: file("../../node_modules/@react-native-community/cli-platform-androi
|
||||||
if (!isFoss) {
|
if (!isFoss) {
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def isNewArchitectureEnabled() {
|
||||||
|
// To opt-in for the New Architecture, you can either:
|
||||||
|
// - Set `newArchEnabled` to true inside the `gradle.properties` file
|
||||||
|
// - Invoke gradle with `-newArchEnabled=true`
|
||||||
|
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
|
||||||
|
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
||||||
|
}
|
|
@ -18,7 +18,7 @@ public class DetoxTest {
|
||||||
@Rule
|
@Rule
|
||||||
// Replace 'MainActivity' with the value of android:name entry in
|
// Replace 'MainActivity' with the value of android:name entry in
|
||||||
// <activity> in AndroidManifest.xml
|
// <activity> in AndroidManifest.xml
|
||||||
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
|
public ActivityTestRule<chat.rocket.reactnative.MainActivity> mActivityRule = new ActivityTestRule<>(chat.rocket.reactnative.MainActivity.class, false, false);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void runDetoxTests() {
|
public void runDetoxTests() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
tools:replace="android:name"
|
tools:replace="android:name"
|
||||||
tools:targetApi="28"
|
tools:targetApi="28"
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="true" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
package chat.rocket.reactnative;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import com.facebook.react.ReactInstanceManager;
|
|
||||||
|
|
||||||
public class MainDebugApplication extends MainApplication {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
|
||||||
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
||||||
*
|
|
||||||
* @param context
|
|
||||||
* @param reactInstanceManager
|
|
||||||
*/
|
|
||||||
private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
||||||
ReactNativeFlipper.initializeFlipper(context, reactInstanceManager);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,6 +18,7 @@ import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||||
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||||
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||||
|
import com.facebook.react.ReactInstanceEventListener;
|
||||||
import com.facebook.react.ReactInstanceManager;
|
import com.facebook.react.ReactInstanceManager;
|
||||||
import com.facebook.react.bridge.ReactContext;
|
import com.facebook.react.bridge.ReactContext;
|
||||||
import com.facebook.react.modules.network.NetworkingModule;
|
import com.facebook.react.modules.network.NetworkingModule;
|
||||||
|
@ -47,7 +48,7 @@ public class ReactNativeFlipper {
|
||||||
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||||
if (reactContext == null) {
|
if (reactContext == null) {
|
||||||
reactInstanceManager.addReactInstanceEventListener(
|
reactInstanceManager.addReactInstanceEventListener(
|
||||||
new ReactInstanceManager.ReactInstanceEventListener() {
|
new ReactInstanceEventListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onReactContextInitialized(ReactContext reactContext) {
|
public void onReactContextInitialized(ReactContext reactContext) {
|
||||||
reactInstanceManager.removeReactInstanceEventListener(this);
|
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<network-security-config xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<base-config cleartextTrafficPermitted="true">
|
|
||||||
<trust-anchors>
|
|
||||||
<certificates src="system" />
|
|
||||||
<certificates src="user"
|
|
||||||
tools:ignore="AcceptsUserCertificates" />
|
|
||||||
</trust-anchors>
|
|
||||||
</base-config>
|
|
||||||
</network-security-config>
|
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
|
@ -5,6 +5,15 @@
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||||
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||||
|
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
|
||||||
|
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
|
||||||
|
|
||||||
|
<!-- permissions related to jitsi call -->
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="chat.rocket.reactnative.MainApplication"
|
android:name="chat.rocket.reactnative.MainApplication"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
|
@ -13,19 +22,12 @@
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/BootTheme"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
tools:replace="android:allowBackup">
|
tools:replace="android:allowBackup">
|
||||||
<activity
|
|
||||||
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
|
|
||||||
android:theme="@style/BootTheme">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<activity
|
<activity
|
||||||
android:name="chat.rocket.reactnative.MainActivity"
|
android:name="chat.rocket.reactnative.MainActivity"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
|
@ -55,6 +57,10 @@
|
||||||
android:host="jitsi.rocket.chat"
|
android:host="jitsi.rocket.chat"
|
||||||
android:scheme="rocketchat" />
|
android:scheme="rocketchat" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name="chat.rocket.reactnative.share.ShareActivity"
|
android:name="chat.rocket.reactnative.share.ShareActivity"
|
||||||
|
@ -62,7 +68,8 @@
|
||||||
android:label="@string/share_extension_name"
|
android:label="@string/share_extension_name"
|
||||||
android:noHistory="true"
|
android:noHistory="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/ShareTheme"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||||
|
@ -72,5 +79,10 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
<queries>
|
||||||
|
<package android:name="org.jitsi.meet" />
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,40 +1,23 @@
|
||||||
package chat.rocket.reactnative;
|
package chat.rocket.reactnative;
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.SharedPreferences;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.facebook.react.bridge.Arguments;
|
import com.facebook.react.ReactActivity;
|
||||||
import com.facebook.react.bridge.WritableMap;
|
|
||||||
import com.facebook.react.ReactRootView;
|
|
||||||
import com.facebook.react.ReactActivityDelegate;
|
import com.facebook.react.ReactActivityDelegate;
|
||||||
import com.facebook.react.ReactFragmentActivity;
|
import com.facebook.react.ReactRootView;
|
||||||
|
|
||||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
|
||||||
import com.zoontek.rnbootsplash.RNBootSplash;
|
import com.zoontek.rnbootsplash.RNBootSplash;
|
||||||
import com.google.gson.Gson;
|
|
||||||
|
|
||||||
class ThemePreferences {
|
import expo.modules.ReactActivityDelegateWrapper;
|
||||||
String currentTheme;
|
|
||||||
String darkLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
class SortPreferences {
|
public class MainActivity extends ReactActivity {
|
||||||
String sortBy;
|
|
||||||
Boolean groupByType;
|
|
||||||
Boolean showFavorites;
|
|
||||||
Boolean showUnread;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MainActivity extends ReactFragmentActivity {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
RNBootSplash.init(this);
|
||||||
// https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067
|
// https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067
|
||||||
super.onCreate(null);
|
super.onCreate(null);
|
||||||
RNBootSplash.init(R.drawable.launch_screen, MainActivity.this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,16 +34,6 @@ public class MainActivity extends ReactFragmentActivity {
|
||||||
return "RocketChatRN";
|
return "RocketChatRN";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
||||||
return new ReactActivityDelegate(this, getMainComponentName()) {
|
|
||||||
@Override
|
|
||||||
protected ReactRootView createRootView() {
|
|
||||||
return new RNGestureHandlerEnabledRootView(MainActivity.this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// from react-native-orientation
|
// from react-native-orientation
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
@ -69,5 +42,27 @@ public class MainActivity extends ReactFragmentActivity {
|
||||||
intent.putExtra("newConfig", newConfig);
|
intent.putExtra("newConfig", newConfig);
|
||||||
this.sendBroadcast(intent);
|
this.sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
|
||||||
|
* you can specify the rendered you wish to use (Fabric or the older renderer).
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected ReactActivityDelegate createReactActivityDelegate() {
|
||||||
|
return new ReactActivityDelegateWrapper(this, new MainActivityDelegate(this, getMainComponentName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class MainActivityDelegate extends ReactActivityDelegate {
|
||||||
|
public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
|
||||||
|
super(activity, mainComponentName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ReactRootView createRootView() {
|
||||||
|
ReactRootView reactRootView = new ReactRootView(getContext());
|
||||||
|
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
||||||
|
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
|
||||||
|
return reactRootView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,24 +8,27 @@ import com.facebook.react.PackageList;
|
||||||
import com.facebook.react.ReactApplication;
|
import com.facebook.react.ReactApplication;
|
||||||
import com.facebook.react.ReactNativeHost;
|
import com.facebook.react.ReactNativeHost;
|
||||||
import com.facebook.react.ReactPackage;
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.config.ReactFeatureFlags;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
import com.facebook.soloader.SoLoader;
|
import com.facebook.soloader.SoLoader;
|
||||||
import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
|
import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
|
||||||
import com.facebook.react.bridge.JSIModulePackage;
|
import com.facebook.react.bridge.JSIModulePackage;
|
||||||
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
||||||
import org.unimodules.adapters.react.ModuleRegistryAdapter;
|
import android.content.Context;
|
||||||
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
|
import android.content.res.Configuration;
|
||||||
|
import expo.modules.ApplicationLifecycleDispatcher;
|
||||||
|
import expo.modules.ReactNativeHostWrapper;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import chat.rocket.reactnative.generated.BasePackageList;
|
import chat.rocket.reactnative.newarchitecture.MainApplicationReactNativeHost;
|
||||||
import chat.rocket.reactnative.networking.SSLPinningPackage;
|
import chat.rocket.reactnative.networking.SSLPinningPackage;
|
||||||
|
|
||||||
public class MainApplication extends Application implements ReactApplication {
|
public class MainApplication extends Application implements ReactApplication {
|
||||||
|
|
||||||
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null);
|
private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(this, new ReactNativeHost(this) {
|
||||||
|
|
||||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getUseDeveloperSupport() {
|
public boolean getUseDeveloperSupport() {
|
||||||
return BuildConfig.DEBUG;
|
return BuildConfig.DEBUG;
|
||||||
|
@ -37,10 +40,6 @@ public class MainApplication extends Application implements ReactApplication {
|
||||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
packages.add(new RNCViewPagerPackage());
|
packages.add(new RNCViewPagerPackage());
|
||||||
packages.add(new SSLPinningPackage());
|
packages.add(new SSLPinningPackage());
|
||||||
List<ReactPackage> unimodules = Arrays.<ReactPackage>asList(
|
|
||||||
new ModuleRegistryAdapter(mModuleRegistryProvider)
|
|
||||||
);
|
|
||||||
packages.addAll(unimodules);
|
|
||||||
List<ReactPackage> additionalModules = new AdditionalModules().getAdditionalModules(MainApplication.this);
|
List<ReactPackage> additionalModules = new AdditionalModules().getAdditionalModules(MainApplication.this);
|
||||||
packages.addAll(additionalModules);
|
packages.addAll(additionalModules);
|
||||||
return packages;
|
return packages;
|
||||||
|
@ -60,16 +59,64 @@ public class MainApplication extends Application implements ReactApplication {
|
||||||
protected @Nullable String getBundleAssetName() {
|
protected @Nullable String getBundleAssetName() {
|
||||||
return "app.bundle";
|
return "app.bundle";
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
|
private final ReactNativeHost mNewArchitectureNativeHost =
|
||||||
|
new ReactNativeHostWrapper(this, new MainApplicationReactNativeHost(this));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReactNativeHost getReactNativeHost() {
|
public ReactNativeHost getReactNativeHost() {
|
||||||
return mReactNativeHost;
|
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||||
|
return mNewArchitectureNativeHost;
|
||||||
|
} else {
|
||||||
|
return mReactNativeHost;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
// If you opted-in for the New Architecture, we enable the TurboModule system
|
||||||
|
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||||
SoLoader.init(this, /* native exopackage */ false);
|
SoLoader.init(this, /* native exopackage */ false);
|
||||||
|
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
|
ApplicationLifecycleDispatcher.onApplicationCreate(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
super.onConfigurationChanged(newConfig);
|
||||||
|
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||||
|
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param reactInstanceManager
|
||||||
|
*/
|
||||||
|
private static void initializeFlipper(
|
||||||
|
Context context, ReactInstanceManager reactInstanceManager) {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
We use reflection here to pick up the class that initializes Flipper,
|
||||||
|
since Flipper library is not available in release mode
|
||||||
|
*/
|
||||||
|
Class<?> aClass = Class.forName("chat.rocket.reactnative.ReactNativeFlipper");
|
||||||
|
aClass
|
||||||
|
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||||
|
.invoke(null, context, reactInstanceManager);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
package chat.rocket.reactnative.generated;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import org.unimodules.core.interfaces.Package;
|
|
||||||
|
|
||||||
public class BasePackageList {
|
|
||||||
public List<Package> getPackageList() {
|
|
||||||
return Arrays.<Package>asList(
|
|
||||||
new expo.modules.av.AVPackage(),
|
|
||||||
new expo.modules.constants.ConstantsPackage(),
|
|
||||||
new expo.modules.filesystem.FileSystemPackage(),
|
|
||||||
new expo.modules.haptics.HapticsPackage(),
|
|
||||||
new expo.modules.imageloader.ImageLoaderPackage(),
|
|
||||||
new expo.modules.keepawake.KeepAwakePackage(),
|
|
||||||
new expo.modules.localauthentication.LocalAuthenticationPackage(),
|
|
||||||
new expo.modules.videothumbnails.VideoThumbnailsPackage(),
|
|
||||||
new expo.modules.webbrowser.WebBrowserPackage()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
package chat.rocket.reactnative.newarchitecture;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import com.facebook.react.PackageList;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.ReactNativeHost;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
|
||||||
|
import com.facebook.react.bridge.JSIModulePackage;
|
||||||
|
import com.facebook.react.bridge.JSIModuleProvider;
|
||||||
|
import com.facebook.react.bridge.JSIModuleSpec;
|
||||||
|
import com.facebook.react.bridge.JSIModuleType;
|
||||||
|
import com.facebook.react.bridge.JavaScriptContextHolder;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.react.bridge.UIManager;
|
||||||
|
import com.facebook.react.fabric.ComponentFactory;
|
||||||
|
import com.facebook.react.fabric.CoreComponentsRegistry;
|
||||||
|
import com.facebook.react.fabric.EmptyReactNativeConfig;
|
||||||
|
import com.facebook.react.fabric.FabricJSIModuleProvider;
|
||||||
|
import com.facebook.react.uimanager.ViewManagerRegistry;
|
||||||
|
import chat.rocket.reactnative.BuildConfig;
|
||||||
|
import chat.rocket.reactnative.newarchitecture.components.MainComponentsRegistry;
|
||||||
|
import chat.rocket.reactnative.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
|
||||||
|
* TurboModule delegates and the Fabric Renderer.
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
public class MainApplicationReactNativeHost extends ReactNativeHost {
|
||||||
|
public MainApplicationReactNativeHost(Application application) {
|
||||||
|
super(application);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getUseDeveloperSupport() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
|
// packages.add(new MyReactNativePackage());
|
||||||
|
// TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
|
||||||
|
// packages.add(new TurboReactPackage() { ... });
|
||||||
|
// If you have custom Fabric Components, their ViewManagers should also be loaded here
|
||||||
|
// inside a ReactPackage.
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getJSMainModuleName() {
|
||||||
|
return "index";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
protected ReactPackageTurboModuleManagerDelegate.Builder
|
||||||
|
getReactPackageTurboModuleManagerDelegateBuilder() {
|
||||||
|
// Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
|
||||||
|
// for the new architecture and to use TurboModules correctly.
|
||||||
|
return new MainApplicationTurboModuleManagerDelegate.Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected JSIModulePackage getJSIModulePackage() {
|
||||||
|
return new JSIModulePackage() {
|
||||||
|
@Override
|
||||||
|
public List<JSIModuleSpec> getJSIModules(
|
||||||
|
final ReactApplicationContext reactApplicationContext,
|
||||||
|
final JavaScriptContextHolder jsContext) {
|
||||||
|
final List<JSIModuleSpec> specs = new ArrayList<>();
|
||||||
|
|
||||||
|
// Here we provide a new JSIModuleSpec that will be responsible of providing the
|
||||||
|
// custom Fabric Components.
|
||||||
|
specs.add(
|
||||||
|
new JSIModuleSpec() {
|
||||||
|
@Override
|
||||||
|
public JSIModuleType getJSIModuleType() {
|
||||||
|
return JSIModuleType.UIManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
|
||||||
|
final ComponentFactory componentFactory = new ComponentFactory();
|
||||||
|
CoreComponentsRegistry.register(componentFactory);
|
||||||
|
|
||||||
|
// Here we register a Components Registry.
|
||||||
|
// The one that is generated with the template contains no components
|
||||||
|
// and just provides you the one from React Native core.
|
||||||
|
MainComponentsRegistry.register(componentFactory);
|
||||||
|
|
||||||
|
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
|
||||||
|
|
||||||
|
ViewManagerRegistry viewManagerRegistry =
|
||||||
|
new ViewManagerRegistry(
|
||||||
|
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
|
||||||
|
|
||||||
|
return new FabricJSIModuleProvider(
|
||||||
|
reactApplicationContext,
|
||||||
|
componentFactory,
|
||||||
|
new EmptyReactNativeConfig(),
|
||||||
|
viewManagerRegistry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return specs;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package chat.rocket.reactnative.newarchitecture.components;
|
||||||
|
|
||||||
|
import com.facebook.jni.HybridData;
|
||||||
|
import com.facebook.proguard.annotations.DoNotStrip;
|
||||||
|
import com.facebook.react.fabric.ComponentFactory;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class responsible to load the custom Fabric Components. This class has native methods and needs a
|
||||||
|
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
|
||||||
|
* folder for you).
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
@DoNotStrip
|
||||||
|
public class MainComponentsRegistry {
|
||||||
|
static {
|
||||||
|
SoLoader.loadLibrary("fabricjni");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DoNotStrip private final HybridData mHybridData;
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
private native HybridData initHybrid(ComponentFactory componentFactory);
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
private MainComponentsRegistry(ComponentFactory componentFactory) {
|
||||||
|
mHybridData = initHybrid(componentFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
public static MainComponentsRegistry register(ComponentFactory componentFactory) {
|
||||||
|
return new MainComponentsRegistry(componentFactory);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
package chat.rocket.reactnative.newarchitecture.modules;
|
||||||
|
|
||||||
|
import com.facebook.jni.HybridData;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class responsible to load the TurboModules. This class has native methods and needs a
|
||||||
|
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
|
||||||
|
* folder for you).
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
public class MainApplicationTurboModuleManagerDelegate
|
||||||
|
extends ReactPackageTurboModuleManagerDelegate {
|
||||||
|
|
||||||
|
private static volatile boolean sIsSoLibraryLoaded;
|
||||||
|
|
||||||
|
protected MainApplicationTurboModuleManagerDelegate(
|
||||||
|
ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
|
||||||
|
super(reactApplicationContext, packages);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected native HybridData initHybrid();
|
||||||
|
|
||||||
|
native boolean canCreateTurboModule(String moduleName);
|
||||||
|
|
||||||
|
public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
|
||||||
|
protected MainApplicationTurboModuleManagerDelegate build(
|
||||||
|
ReactApplicationContext context, List<ReactPackage> packages) {
|
||||||
|
return new MainApplicationTurboModuleManagerDelegate(context, packages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected synchronized void maybeLoadOtherSoLibraries() {
|
||||||
|
if (!sIsSoLibraryLoaded) {
|
||||||
|
// If you change the name of your application .so file in the Android.mk file,
|
||||||
|
// make sure you update the name here as well.
|
||||||
|
SoLoader.loadLibrary("rocketchat_appmodules");
|
||||||
|
sIsSoLibraryLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,23 +1,10 @@
|
||||||
package chat.rocket.reactnative.share;
|
package chat.rocket.reactnative.share;
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
import com.facebook.react.ReactActivity;
|
||||||
import com.facebook.react.ReactActivityDelegate;
|
|
||||||
import com.facebook.react.ReactRootView;
|
|
||||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
|
||||||
|
|
||||||
public class ShareActivity extends ReactActivity {
|
public class ShareActivity extends ReactActivity {
|
||||||
@Override
|
@Override
|
||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
return "ShareRocketChatRN";
|
return "ShareRocketChatRN";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
||||||
return new ReactActivityDelegate(this, getMainComponentName()) {
|
|
||||||
@Override
|
|
||||||
protected ReactRootView createRootView() {
|
|
||||||
return new RNGestureHandlerEnabledRootView(ShareActivity.this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
THIS_DIR := $(call my-dir)
|
||||||
|
|
||||||
|
include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
|
||||||
|
|
||||||
|
# If you wish to add a custom TurboModule or Fabric component in your app you
|
||||||
|
# will have to include the following autogenerated makefile.
|
||||||
|
# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_PATH := $(THIS_DIR)
|
||||||
|
|
||||||
|
# You can customize the name of your application .so file here.
|
||||||
|
LOCAL_MODULE := rocketchat_appmodules
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
||||||
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
|
||||||
|
# If you wish to add a custom TurboModule or Fabric component in your app you
|
||||||
|
# will have to uncomment those lines to include the generated source
|
||||||
|
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
|
||||||
|
#
|
||||||
|
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
||||||
|
# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
|
||||||
|
# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
||||||
|
|
||||||
|
# Here you should add any native library you wish to depend on.
|
||||||
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
|
libfabricjni \
|
||||||
|
libfbjni \
|
||||||
|
libfolly_futures \
|
||||||
|
libfolly_json \
|
||||||
|
libglog \
|
||||||
|
libjsi \
|
||||||
|
libreact_codegen_rncore \
|
||||||
|
libreact_debug \
|
||||||
|
libreact_nativemodule_core \
|
||||||
|
libreact_render_componentregistry \
|
||||||
|
libreact_render_core \
|
||||||
|
libreact_render_debug \
|
||||||
|
libreact_render_graphics \
|
||||||
|
librrc_view \
|
||||||
|
libruntimeexecutor \
|
||||||
|
libturbomodulejsijni \
|
||||||
|
libyoga
|
||||||
|
|
||||||
|
LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
|
||||||
|
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "MainApplicationModuleProvider.h"
|
||||||
|
|
||||||
|
#include <rncore.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
||||||
|
const std::string moduleName,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) {
|
||||||
|
// Here you can provide your own module provider for TurboModules coming from
|
||||||
|
// either your application or from external libraries. The approach to follow
|
||||||
|
// is similar to the following (for a library called `samplelibrary`:
|
||||||
|
//
|
||||||
|
// auto module = samplelibrary_ModuleProvider(moduleName, params);
|
||||||
|
// if (module != nullptr) {
|
||||||
|
// return module;
|
||||||
|
// }
|
||||||
|
// return rncore_ModuleProvider(moduleName, params);
|
||||||
|
return rncore_ModuleProvider(moduleName, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <ReactCommon/JavaTurboModule.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
||||||
|
const std::string moduleName,
|
||||||
|
const JavaTurboModule::InitParams ¶ms);
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,45 @@
|
||||||
|
#include "MainApplicationTurboModuleManagerDelegate.h"
|
||||||
|
#include "MainApplicationModuleProvider.h"
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::initHybrid(
|
||||||
|
jni::alias_ref<jhybridobject>) {
|
||||||
|
return makeCxxInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
|
||||||
|
registerHybrid({
|
||||||
|
makeNativeMethod(
|
||||||
|
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
|
||||||
|
makeNativeMethod(
|
||||||
|
"canCreateTurboModule",
|
||||||
|
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const std::shared_ptr<CallInvoker> jsInvoker) {
|
||||||
|
// Not implemented yet: provide pure-C++ NativeModules here.
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) {
|
||||||
|
return MainApplicationModuleProvider(name, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
|
||||||
|
std::string name) {
|
||||||
|
return getTurboModule(name, nullptr) != nullptr ||
|
||||||
|
getTurboModule(name, {.moduleName = name}) != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,38 @@
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <ReactCommon/TurboModuleManagerDelegate.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
class MainApplicationTurboModuleManagerDelegate
|
||||||
|
: public jni::HybridClass<
|
||||||
|
MainApplicationTurboModuleManagerDelegate,
|
||||||
|
TurboModuleManagerDelegate> {
|
||||||
|
public:
|
||||||
|
// Adapt it to the package you used for your Java class.
|
||||||
|
static constexpr auto kJavaDescriptor =
|
||||||
|
"Lchat/rocket/reactnative/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
||||||
|
|
||||||
|
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
|
||||||
|
|
||||||
|
static void registerNatives();
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const std::shared_ptr<CallInvoker> jsInvoker) override;
|
||||||
|
std::shared_ptr<TurboModule> getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test-only method. Allows user to verify whether a TurboModule can be
|
||||||
|
* created by instances of this class.
|
||||||
|
*/
|
||||||
|
bool canCreateTurboModule(std::string name);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,61 @@
|
||||||
|
#include "MainComponentsRegistry.h"
|
||||||
|
|
||||||
|
#include <CoreComponentsRegistry.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||||
|
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
|
||||||
|
|
||||||
|
std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
||||||
|
MainComponentsRegistry::sharedProviderRegistry() {
|
||||||
|
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
||||||
|
|
||||||
|
// Custom Fabric Components go here. You can register custom
|
||||||
|
// components coming from your App or from 3rd party libraries here.
|
||||||
|
//
|
||||||
|
// providerRegistry->add(concreteComponentDescriptorProvider<
|
||||||
|
// AocViewerComponentDescriptor>());
|
||||||
|
return providerRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
jni::local_ref<MainComponentsRegistry::jhybriddata>
|
||||||
|
MainComponentsRegistry::initHybrid(
|
||||||
|
jni::alias_ref<jclass>,
|
||||||
|
ComponentFactory *delegate) {
|
||||||
|
auto instance = makeCxxInstance(delegate);
|
||||||
|
|
||||||
|
auto buildRegistryFunction =
|
||||||
|
[](EventDispatcher::Weak const &eventDispatcher,
|
||||||
|
ContextContainer::Shared const &contextContainer)
|
||||||
|
-> ComponentDescriptorRegistry::Shared {
|
||||||
|
auto registry = MainComponentsRegistry::sharedProviderRegistry()
|
||||||
|
->createComponentDescriptorRegistry(
|
||||||
|
{eventDispatcher, contextContainer});
|
||||||
|
|
||||||
|
auto mutableRegistry =
|
||||||
|
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
||||||
|
|
||||||
|
mutableRegistry->setFallbackComponentDescriptor(
|
||||||
|
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
||||||
|
ComponentDescriptorParameters{
|
||||||
|
eventDispatcher, contextContainer, nullptr}));
|
||||||
|
|
||||||
|
return registry;
|
||||||
|
};
|
||||||
|
|
||||||
|
delegate->buildRegistryFunction = buildRegistryFunction;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainComponentsRegistry::registerNatives() {
|
||||||
|
registerHybrid({
|
||||||
|
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,32 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <ComponentFactory.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
class MainComponentsRegistry
|
||||||
|
: public facebook::jni::HybridClass<MainComponentsRegistry> {
|
||||||
|
public:
|
||||||
|
// Adapt it to the package you used for your Java class.
|
||||||
|
constexpr static auto kJavaDescriptor =
|
||||||
|
"Lchat/rocket/reactnative/newarchitecture/components/MainComponentsRegistry;";
|
||||||
|
|
||||||
|
static void registerNatives();
|
||||||
|
|
||||||
|
MainComponentsRegistry(ComponentFactory *delegate);
|
||||||
|
|
||||||
|
private:
|
||||||
|
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
||||||
|
sharedProviderRegistry();
|
||||||
|
|
||||||
|
static jni::local_ref<jhybriddata> initHybrid(
|
||||||
|
jni::alias_ref<jclass>,
|
||||||
|
ComponentFactory *delegate);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include "MainApplicationTurboModuleManagerDelegate.h"
|
||||||
|
#include "MainComponentsRegistry.h"
|
||||||
|
|
||||||
|
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
|
||||||
|
return facebook::jni::initialize(vm, [] {
|
||||||
|
facebook::react::MainApplicationTurboModuleManagerDelegate::
|
||||||
|
registerNatives();
|
||||||
|
facebook::react::MainComponentsRegistry::registerNatives();
|
||||||
|
});
|
||||||
|
}
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
|
|
||||||
<!-- the background color. it can be a system color or a custom one defined in colors.xml -->
|
|
||||||
<item android:drawable="@color/splashBackground" />
|
|
||||||
<item>
|
|
||||||
<!-- the app logo, centered horizontally and vertically -->
|
|
||||||
<bitmap
|
|
||||||
android:src="@drawable/splash"
|
|
||||||
android:gravity="center" />
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
||||||
|
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
||||||
|
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
||||||
|
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
|
||||||
|
<selector>
|
||||||
|
<!--
|
||||||
|
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
||||||
|
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
||||||
|
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
||||||
|
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
||||||
|
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
||||||
|
-->
|
||||||
|
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
||||||
|
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
||||||
|
</selector>
|
||||||
|
</inset>
|
|
@ -4,27 +4,19 @@
|
||||||
<item name="colorPrimaryDark">@color/splashBackground</item>
|
<item name="colorPrimaryDark">@color/splashBackground</item>
|
||||||
<item name="android:navigationBarColor">@color/splashBackground</item>
|
<item name="android:navigationBarColor">@color/splashBackground</item>
|
||||||
<item name="android:forceDarkAllowed">false</item>
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
</style>
|
<!-- RN 0.68.2 -->
|
||||||
|
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
||||||
<style name="Share.Window" parent="android:Theme">
|
|
||||||
<item name="android:windowEnterAnimation">@null</item>
|
|
||||||
<item name="android:windowExitAnimation">@null</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Share.Transparent" parent="android:Theme">
|
<style name="ShareTheme" parent="AppTheme">
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
<item name="android:windowBackground">@color/primary_dark</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<item name="android:windowContentOverlay">@null</item>
|
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
<item name="android:windowIsFloating">true</item>
|
|
||||||
<item name="android:backgroundDimEnabled">true</item>
|
|
||||||
<item name="android:windowAnimationStyle">@style/Share.Window</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="BootTheme" parent="AppTheme">
|
<style name="BootTheme" parent="Theme.SplashScreen">
|
||||||
<item name="android:background">@drawable/launch_screen</item>
|
<item name="windowSplashScreenBackground">@color/splashBackground</item>
|
||||||
<item name="colorPrimaryDark">@color/splashBackground</item>
|
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
|
||||||
<item name="android:navigationBarColor">@color/splashBackground</item>
|
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/ReactAndroid/src/main/res/views/modal/values/themes.xml#L5 -->
|
<!-- https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/ReactAndroid/src/main/res/views/modal/values/themes.xml#L5 -->
|
||||||
|
|
|
@ -7,4 +7,8 @@
|
||||||
tools:ignore="AcceptsUserCertificates" />
|
tools:ignore="AcceptsUserCertificates" />
|
||||||
</trust-anchors>
|
</trust-anchors>
|
||||||
</base-config>
|
</base-config>
|
||||||
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
|
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||||
|
<domain includeSubdomains="true">localhost</domain>
|
||||||
|
</domain-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
Binary file not shown.
Before Width: | Height: | Size: 7.5 KiB |
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
|
|
||||||
<!-- the background color. it can be a system color or a custom one defined in colors.xml -->
|
|
||||||
<item android:drawable="@color/splashBackground" />
|
|
||||||
<item>
|
|
||||||
<!-- the app logo, centered horizontally and vertically -->
|
|
||||||
<bitmap
|
|
||||||
android:src="@drawable/splash"
|
|
||||||
android:gravity="center" />
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
|
@ -6,18 +6,17 @@
|
||||||
android:name="chat.rocket.reactnative.MainPlayApplication"
|
android:name="chat.rocket.reactnative.MainPlayApplication"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:theme="@style/AppTheme"
|
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
tools:replace="android:name"
|
tools:replace="android:name"
|
||||||
>
|
>
|
||||||
<receiver
|
<receiver
|
||||||
android:name="chat.rocket.reactnative.ReplyBroadcast"
|
android:name="chat.rocket.reactnative.ReplyBroadcast"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="false" />
|
android:exported="true" />
|
||||||
<receiver
|
<receiver
|
||||||
android:name="chat.rocket.reactnative.DismissNotification"
|
android:name="chat.rocket.reactnative.DismissNotification"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="false" >
|
android:exported="true" >
|
||||||
</receiver>
|
</receiver>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.bugsnag.android.API_KEY"
|
android:name="com.bugsnag.android.API_KEY"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package chat.rocket.reactnative;
|
package chat.rocket.reactnative;
|
||||||
|
|
||||||
|
import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME;
|
||||||
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
|
@ -35,8 +37,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME;
|
|
||||||
|
|
||||||
public class CustomPushNotification extends PushNotification {
|
public class CustomPushNotification extends PushNotification {
|
||||||
public static ReactApplicationContext reactApplicationContext;
|
public static ReactApplicationContext reactApplicationContext;
|
||||||
final NotificationManager notificationManager;
|
final NotificationManager notificationManager;
|
||||||
|
@ -322,7 +322,12 @@ public class CustomPushNotification extends PushNotification {
|
||||||
replyIntent.setAction(KEY_REPLY);
|
replyIntent.setAction(KEY_REPLY);
|
||||||
replyIntent.putExtra("pushNotification", bundle);
|
replyIntent.putExtra("pushNotification", bundle);
|
||||||
|
|
||||||
PendingIntent replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent replyPendingIntent;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
|
||||||
|
} else {
|
||||||
|
replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
}
|
||||||
|
|
||||||
RemoteInput remoteInput = new RemoteInput.Builder(KEY_REPLY)
|
RemoteInput remoteInput = new RemoteInput.Builder(KEY_REPLY)
|
||||||
.setLabel(label)
|
.setLabel(label)
|
||||||
|
@ -343,12 +348,13 @@ public class CustomPushNotification extends PushNotification {
|
||||||
Intent intent = new Intent(mContext, DismissNotification.class);
|
Intent intent = new Intent(mContext, DismissNotification.class);
|
||||||
intent.putExtra(NOTIFICATION_ID, notificationId);
|
intent.putExtra(NOTIFICATION_ID, notificationId);
|
||||||
|
|
||||||
PendingIntent dismissPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, intent, 0);
|
PendingIntent dismissPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, intent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
|
||||||
notification.setDeleteIntent(dismissPendingIntent);
|
notification.setDeleteIntent(dismissPendingIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notificationLoad(Ejson ejson, Callback callback) {
|
private void notificationLoad(Ejson ejson, Callback callback) {
|
||||||
LoadNotification.load(reactApplicationContext, ejson, callback);
|
LoadNotification loadNotification = new LoadNotification();
|
||||||
|
loadNotification.load(reactApplicationContext, ejson, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
package chat.rocket.reactnative;
|
package chat.rocket.reactnative;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import okhttp3.Call;
|
|
||||||
import okhttp3.OkHttpClient;
|
|
||||||
import okhttp3.HttpUrl;
|
|
||||||
import okhttp3.Request;
|
|
||||||
import okhttp3.Response;
|
|
||||||
import okhttp3.Interceptor;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
import okhttp3.HttpUrl;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
class JsonResponse {
|
class JsonResponse {
|
||||||
Data data;
|
Data data;
|
||||||
|
@ -49,11 +43,11 @@ class JsonResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LoadNotification {
|
public class LoadNotification {
|
||||||
private static int RETRY_COUNT = 0;
|
private int RETRY_COUNT = 0;
|
||||||
private static int[] TIMEOUT = new int[]{0, 1, 3, 5, 10};
|
private int[] TIMEOUT = new int[]{0, 1, 3, 5, 10};
|
||||||
private static String TOKEN_KEY = "reactnativemeteor_usertoken-";
|
private String TOKEN_KEY = "reactnativemeteor_usertoken-";
|
||||||
|
|
||||||
public static void load(ReactApplicationContext reactApplicationContext, final Ejson ejson, Callback callback) {
|
public void load(ReactApplicationContext reactApplicationContext, final Ejson ejson, Callback callback) {
|
||||||
final OkHttpClient client = new OkHttpClient();
|
final OkHttpClient client = new OkHttpClient();
|
||||||
HttpUrl.Builder url = HttpUrl.parse(ejson.serverURL().concat("/api/v1/push.get")).newBuilder();
|
HttpUrl.Builder url = HttpUrl.parse(ejson.serverURL().concat("/api/v1/push.get")).newBuilder();
|
||||||
|
|
||||||
|
@ -73,7 +67,7 @@ public class LoadNotification {
|
||||||
runRequest(client, request, callback);
|
runRequest(client, request, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void runRequest(OkHttpClient client, Request request, Callback callback) {
|
private void runRequest(OkHttpClient client, Request request, Callback callback) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(TIMEOUT[RETRY_COUNT] * 1000);
|
Thread.sleep(TIMEOUT[RETRY_COUNT] * 1000);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
def safeExtGet(prop, fallback) {
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
||||||
}
|
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
|
@ -8,35 +6,42 @@ buildscript {
|
||||||
def isPlay = !taskRequests.contains("foss")
|
def isPlay = !taskRequests.contains("foss")
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "29.0.3"
|
buildToolsVersion = "31.0.0"
|
||||||
minSdkVersion = 23
|
minSdkVersion = 23
|
||||||
compileSdkVersion = 30
|
compileSdkVersion = 31
|
||||||
targetSdkVersion = 30
|
targetSdkVersion = 31
|
||||||
ndkVersion = "20.1.5948944"
|
if (System.properties['os.arch'] == "aarch64") {
|
||||||
|
// For M1 Users we need to use the NDK 24 which added support for aarch64
|
||||||
|
ndkVersion = "24.0.8215888"
|
||||||
|
} else {
|
||||||
|
// Otherwise we default to the side-by-side NDK version from AGP.
|
||||||
|
ndkVersion = "21.4.7075529"
|
||||||
|
}
|
||||||
glideVersion = "4.11.0"
|
glideVersion = "4.11.0"
|
||||||
kotlin_version = "1.6.10"
|
kotlin_version = "1.6.10"
|
||||||
|
kotlinVersion = '1.6.10'
|
||||||
supportLibVersion = "28.0.0"
|
supportLibVersion = "28.0.0"
|
||||||
libre_build = !(isPlay.toBoolean())
|
libre_build = !(isPlay.toBoolean())
|
||||||
jitsi_url = isPlay ? "https://github.com/RocketChat/jitsi-maven-repository/raw/master/releases" : "https://github.com/RocketChat/jitsi-maven-repository/raw/libre/releases"
|
|
||||||
jitsi_version = isPlay ? "3.6.0" : "3.6.0-libre"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
google()
|
||||||
jcenter()
|
|
||||||
maven {
|
maven {
|
||||||
url 'https://maven.fabric.io/public'
|
url 'https://maven.fabric.io/public'
|
||||||
}
|
}
|
||||||
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (isPlay) {
|
if (isPlay) {
|
||||||
classpath 'com.google.gms:google-services:4.2.0'
|
classpath 'com.google.gms:google-services:4.3.8'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
|
||||||
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:5.+'
|
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:7.+'
|
||||||
}
|
}
|
||||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
classpath("com.android.tools.build:gradle:7.0.4")
|
||||||
|
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||||
|
classpath("de.undercouch:gradle-download-task:4.1.2")
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,33 +62,47 @@ allprojects {
|
||||||
url "$rootDir/../node_modules/detox/Detox-android"
|
url "$rootDir/../node_modules/detox/Detox-android"
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
mavenCentral {
|
||||||
url jitsi_url
|
content {
|
||||||
|
excludeGroup "com.facebook.react"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
google()
|
google()
|
||||||
jcenter()
|
|
||||||
maven { url 'https://maven.google.com' }
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://www.jitpack.io' }
|
maven { url 'https://www.jitpack.io' }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
subprojects { subproject ->
|
// https://stackoverflow.com/a/74333788/5447468
|
||||||
afterEvaluate {
|
// TODO: remove once we update RN
|
||||||
if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
|
exclusiveContent {
|
||||||
android {
|
// We get React Native's Android binaries exclusively through npm,
|
||||||
compileSdkVersion 30
|
// from a local Maven repo inside node_modules/react-native/.
|
||||||
buildToolsVersion "29.0.3"
|
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
|
||||||
defaultConfig {
|
// and potentially getting a wrong version.)
|
||||||
targetSdkVersion 30
|
filter {
|
||||||
}
|
includeGroup "com.facebook.react"
|
||||||
variantFilter { variant ->
|
}
|
||||||
def names = variant.flavors*.name
|
forRepository {
|
||||||
if (names.contains("reactNative59")) {
|
maven {
|
||||||
setIgnore(true)
|
// NOTE: if you are in a monorepo, you may have "$rootDir/../../../node_modules/react-native/android"
|
||||||
}
|
url "$rootDir/../node_modules/react-native/android"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subprojects { subproject ->
|
||||||
|
afterEvaluate {
|
||||||
|
if (!project.name.equalsIgnoreCase("app") && project.hasProperty("android")) {
|
||||||
|
android {
|
||||||
|
compileSdkVersion 31
|
||||||
|
buildToolsVersion "31.0.0"
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 23
|
||||||
|
targetSdkVersion 31
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,16 +9,12 @@
|
||||||
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
|
||||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
# android.enableAapt2=false # commenting this makes notifications to stop working
|
|
||||||
# android.useDeprecatedNdk=true
|
|
||||||
org.gradle.jvmargs=-Xmx2048M -XX\:MaxHeapSize\=32g
|
|
||||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
# Android operating system, and which are packaged with your app's APK
|
# Android operating system, and which are packaged with your app's APK
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
@ -27,7 +23,19 @@ android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
# Version of flipper SDK to use with React Native
|
# Version of flipper SDK to use with React Native
|
||||||
FLIPPER_VERSION=0.75.1
|
FLIPPER_VERSION=0.175.0
|
||||||
|
|
||||||
|
# Use this property to specify which architecture you want to build.
|
||||||
|
# You can also override it from the CLI using
|
||||||
|
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
||||||
|
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
||||||
|
|
||||||
|
# Use this property to enable support to the new architecture.
|
||||||
|
# This will allow you to use TurboModules and the Fabric render in
|
||||||
|
# your application. You should enable this flag either if you want
|
||||||
|
# to write custom TurboModules/Fabric components OR use libraries that
|
||||||
|
# are providing them.
|
||||||
|
newArchEnabled=false
|
||||||
|
|
||||||
# Application ID
|
# Application ID
|
||||||
APPLICATION_ID=chat.rocket.reactnative
|
APPLICATION_ID=chat.rocket.reactnative
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright 2015 the original author or authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -17,67 +17,101 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=${0##*/}
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
@ -106,80 +140,95 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
warn "Could not query maximum file descriptor limit"
|
||||||
fi
|
esac
|
||||||
ulimit -n $MAX_FD
|
case $MAX_FD in #(
|
||||||
if [ $? -ne 0 ] ; then
|
'' | soft) :;; #(
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
*)
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
else
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=`expr $i + 1`
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
0) set -- ;;
|
|
||||||
1) set -- "$args0" ;;
|
|
||||||
2) set -- "$args0" "$args1" ;;
|
|
||||||
3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save () {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=`save "$@"`
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
|
@ -1,6 +1,3 @@
|
||||||
apply from: '../node_modules/react-native-unimodules/gradle.groovy'
|
|
||||||
includeUnimodulesProjects()
|
|
||||||
|
|
||||||
rootProject.name = 'RocketChatRN'
|
rootProject.name = 'RocketChatRN'
|
||||||
include ':@react-native-community_viewpager'
|
include ':@react-native-community_viewpager'
|
||||||
project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')
|
project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')
|
||||||
|
@ -12,3 +9,12 @@ include ':@react-native-firebase_crashlytics'
|
||||||
project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/crashlytics/android')
|
project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/crashlytics/android')
|
||||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||||
include ':app'
|
include ':app'
|
||||||
|
|
||||||
|
includeBuild('../node_modules/react-native-gradle-plugin')
|
||||||
|
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
|
||||||
|
include(":ReactAndroid")
|
||||||
|
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
|
||||||
|
useExpoModules()
|
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { SetUsernameStackParamList, StackParamList } from './definitions/navigationTypes';
|
import { SetUsernameStackParamList, StackParamList } from './definitions/navigationTypes';
|
||||||
import Navigation from './lib/navigation/appNavigation';
|
import Navigation from './lib/navigation/appNavigation';
|
||||||
import { defaultHeader, getActiveRouteName, navigationTheme } from './utils/navigation';
|
import { defaultHeader, getActiveRouteName, navigationTheme } from './lib/methods/helpers/navigation';
|
||||||
import { RootEnum } from './definitions';
|
import { RootEnum } from './definitions';
|
||||||
// Stacks
|
// Stacks
|
||||||
import AuthLoadingView from './views/AuthLoadingView';
|
import AuthLoadingView from './views/AuthLoadingView';
|
||||||
|
@ -15,7 +15,7 @@ import OutsideStack from './stacks/OutsideStack';
|
||||||
import InsideStack from './stacks/InsideStack';
|
import InsideStack from './stacks/InsideStack';
|
||||||
import MasterDetailStack from './stacks/MasterDetailStack';
|
import MasterDetailStack from './stacks/MasterDetailStack';
|
||||||
import { ThemeContext } from './theme';
|
import { ThemeContext } from './theme';
|
||||||
import { setCurrentScreen } from './utils/log';
|
import { setCurrentScreen } from './lib/methods/helpers/log';
|
||||||
|
|
||||||
// SetUsernameStack
|
// SetUsernameStack
|
||||||
const SetUsername = createStackNavigator<SetUsernameStackParamList>();
|
const SetUsername = createStackNavigator<SetUsernameStackParamList>();
|
||||||
|
@ -55,7 +55,8 @@ const App = memo(({ root, isMasterDetail }: { root: string; isMasterDetail: bool
|
||||||
setCurrentScreen(currentRouteName);
|
setCurrentScreen(currentRouteName);
|
||||||
}
|
}
|
||||||
Navigation.routeNameRef.current = currentRouteName;
|
Navigation.routeNameRef.current = currentRouteName;
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Stack.Navigator screenOptions={{ headerShown: false, animationEnabled: false }}>
|
<Stack.Navigator screenOptions={{ headerShown: false, animationEnabled: false }}>
|
||||||
<>
|
<>
|
||||||
{root === RootEnum.ROOT_LOADING ? <Stack.Screen name='AuthLoading' component={AuthLoadingView} /> : null}
|
{root === RootEnum.ROOT_LOADING ? <Stack.Screen name='AuthLoading' component={AuthLoadingView} /> : null}
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
/* eslint-disable */
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
import AsyncStorage from '@react-native-community/async-storage';
|
import { NativeModules, LogBox } from 'react-native';
|
||||||
import { NativeModules } from 'react-native';
|
|
||||||
import Reactotron from 'reactotron-react-native';
|
import Reactotron from 'reactotron-react-native';
|
||||||
import { reactotronRedux } from 'reactotron-redux';
|
import { reactotronRedux } from 'reactotron-redux';
|
||||||
import sagaPlugin from 'reactotron-redux-saga';
|
import sagaPlugin from 'reactotron-redux-saga';
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
const scriptURL = NativeModules.SourceCode.scriptURL;
|
const { scriptURL } = NativeModules.SourceCode;
|
||||||
const scriptHostname = scriptURL.split('://')[1].split(':')[0];
|
const scriptHostname = scriptURL.split('://')[1].split(':')[0];
|
||||||
Reactotron.setAsyncStorageHandler(AsyncStorage)
|
Reactotron.setAsyncStorageHandler?.(AsyncStorage)
|
||||||
.configure({ host: scriptHostname })
|
.configure({ host: scriptHostname })
|
||||||
.useReactNative()
|
.useReactNative()
|
||||||
.use(reactotronRedux())
|
.use(reactotronRedux())
|
||||||
.use(sagaPlugin())
|
.use(sagaPlugin({}))
|
||||||
.connect();
|
.connect();
|
||||||
// Running on android device
|
// Running on android device
|
||||||
// $ adb reverse tcp:9090 tcp:9090
|
// $ adb reverse tcp:9090 tcp:9090
|
||||||
Reactotron.clear();
|
Reactotron.clear?.();
|
||||||
|
// @ts-ignore
|
||||||
console.warn = Reactotron.log;
|
console.warn = Reactotron.log;
|
||||||
|
// @ts-ignore
|
||||||
console.log = Reactotron.log;
|
console.log = Reactotron.log;
|
||||||
console.disableYellowBox = true;
|
LogBox.ignoreAllLogs(true);
|
||||||
}
|
}
|
|
@ -27,9 +27,10 @@ export const ROOM = createRequestTypes('ROOM', [
|
||||||
'LEAVE',
|
'LEAVE',
|
||||||
'DELETE',
|
'DELETE',
|
||||||
'REMOVED',
|
'REMOVED',
|
||||||
'CLOSE',
|
|
||||||
'FORWARD',
|
'FORWARD',
|
||||||
'USER_TYPING'
|
'USER_TYPING',
|
||||||
|
'HISTORY_REQUEST',
|
||||||
|
'HISTORY_FINISHED'
|
||||||
]);
|
]);
|
||||||
export const INQUIRY = createRequestTypes('INQUIRY', [
|
export const INQUIRY = createRequestTypes('INQUIRY', [
|
||||||
...defaultTypes,
|
...defaultTypes,
|
||||||
|
@ -39,7 +40,14 @@ export const INQUIRY = createRequestTypes('INQUIRY', [
|
||||||
'QUEUE_UPDATE',
|
'QUEUE_UPDATE',
|
||||||
'QUEUE_REMOVE'
|
'QUEUE_REMOVE'
|
||||||
]);
|
]);
|
||||||
export const APP = createRequestTypes('APP', ['START', 'READY', 'INIT', 'INIT_LOCAL_SETTINGS', 'SET_MASTER_DETAIL']);
|
export const APP = createRequestTypes('APP', [
|
||||||
|
'START',
|
||||||
|
'READY',
|
||||||
|
'INIT',
|
||||||
|
'INIT_LOCAL_SETTINGS',
|
||||||
|
'SET_MASTER_DETAIL',
|
||||||
|
'SET_NOTIFICATION_PRESENCE_CAP'
|
||||||
|
]);
|
||||||
export const MESSAGES = createRequestTypes('MESSAGES', ['REPLY_BROADCAST']);
|
export const MESSAGES = createRequestTypes('MESSAGES', ['REPLY_BROADCAST']);
|
||||||
export const CREATE_CHANNEL = createRequestTypes('CREATE_CHANNEL', [...defaultTypes]);
|
export const CREATE_CHANNEL = createRequestTypes('CREATE_CHANNEL', [...defaultTypes]);
|
||||||
export const CREATE_DISCUSSION = createRequestTypes('CREATE_DISCUSSION', [...defaultTypes]);
|
export const CREATE_DISCUSSION = createRequestTypes('CREATE_DISCUSSION', [...defaultTypes]);
|
||||||
|
@ -54,6 +62,7 @@ export const SERVER = createRequestTypes('SERVER', [
|
||||||
]);
|
]);
|
||||||
export const METEOR = createRequestTypes('METEOR_CONNECT', [...defaultTypes, 'DISCONNECT']);
|
export const METEOR = createRequestTypes('METEOR_CONNECT', [...defaultTypes, 'DISCONNECT']);
|
||||||
export const LOGOUT = 'LOGOUT'; // logout is always success
|
export const LOGOUT = 'LOGOUT'; // logout is always success
|
||||||
|
export const DELETE_ACCOUNT = 'DELETE_ACCOUNT';
|
||||||
export const SNIPPETED_MESSAGES = createRequestTypes('SNIPPETED_MESSAGES', ['OPEN', 'READY', 'CLOSE', 'MESSAGES_RECEIVED']);
|
export const SNIPPETED_MESSAGES = createRequestTypes('SNIPPETED_MESSAGES', ['OPEN', 'READY', 'CLOSE', 'MESSAGES_RECEIVED']);
|
||||||
export const DEEP_LINKING = createRequestTypes('DEEP_LINKING', ['OPEN']);
|
export const DEEP_LINKING = createRequestTypes('DEEP_LINKING', ['OPEN']);
|
||||||
export const SORT_PREFERENCES = createRequestTypes('SORT_PREFERENCES', ['SET_ALL', 'SET']);
|
export const SORT_PREFERENCES = createRequestTypes('SORT_PREFERENCES', ['SET_ALL', 'SET']);
|
||||||
|
|
|
@ -12,7 +12,11 @@ interface ISetMasterDetail extends Action {
|
||||||
isMasterDetail: boolean;
|
isMasterDetail: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TActionApp = IAppStart & ISetMasterDetail;
|
interface ISetNotificationPresenceCap extends Action {
|
||||||
|
show: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TActionApp = IAppStart & ISetMasterDetail & ISetNotificationPresenceCap;
|
||||||
|
|
||||||
interface Params {
|
interface Params {
|
||||||
root: RootEnum;
|
root: RootEnum;
|
||||||
|
@ -51,3 +55,10 @@ export function setMasterDetail(isMasterDetail: boolean): ISetMasterDetail {
|
||||||
isMasterDetail
|
isMasterDetail
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setNotificationPresenceCap(show: boolean): ISetNotificationPresenceCap {
|
||||||
|
return {
|
||||||
|
type: APP.SET_NOTIFICATION_PRESENCE_CAP,
|
||||||
|
show
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ interface ILoginRequest extends Action {
|
||||||
credentials: any;
|
credentials: any;
|
||||||
logoutOnError?: boolean;
|
logoutOnError?: boolean;
|
||||||
isFromWebView?: boolean;
|
isFromWebView?: boolean;
|
||||||
|
registerCustomFields?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ILoginSuccess extends Action {
|
interface ILoginSuccess extends Action {
|
||||||
|
@ -56,13 +57,15 @@ export type TActionsLogin = ILoginRequest &
|
||||||
export function loginRequest(
|
export function loginRequest(
|
||||||
credentials: Partial<ICredentials>,
|
credentials: Partial<ICredentials>,
|
||||||
logoutOnError?: boolean,
|
logoutOnError?: boolean,
|
||||||
isFromWebView?: boolean
|
isFromWebView?: boolean,
|
||||||
|
registerCustomFields?: any
|
||||||
): ILoginRequest {
|
): ILoginRequest {
|
||||||
return {
|
return {
|
||||||
type: types.LOGIN.REQUEST,
|
type: types.LOGIN.REQUEST,
|
||||||
credentials,
|
credentials,
|
||||||
logoutOnError,
|
logoutOnError,
|
||||||
isFromWebView
|
isFromWebView,
|
||||||
|
registerCustomFields
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,3 +124,9 @@ export function setLocalAuthenticated(isLocalAuthenticated: boolean): ISetLocalA
|
||||||
isLocalAuthenticated
|
isLocalAuthenticated
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deleteAccount(): Action {
|
||||||
|
return {
|
||||||
|
type: types.DELETE_ACCOUNT
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Action } from 'redux';
|
import { Action } from 'redux';
|
||||||
|
|
||||||
import { ERoomType } from '../definitions/ERoomType';
|
import { ERoomType, RoomType } from '../definitions';
|
||||||
import { ROOM } from './actionsTypes';
|
import { ROOM } from './actionsTypes';
|
||||||
|
|
||||||
// TYPE RETURN RELATED
|
// TYPE RETURN RELATED
|
||||||
|
@ -19,7 +19,6 @@ interface IBaseReturn extends Action {
|
||||||
|
|
||||||
type TSubscribeRoom = IBaseReturn;
|
type TSubscribeRoom = IBaseReturn;
|
||||||
type TUnsubscribeRoom = IBaseReturn;
|
type TUnsubscribeRoom = IBaseReturn;
|
||||||
type TCloseRoom = IBaseReturn;
|
|
||||||
|
|
||||||
type TRoom = Record<string, any>;
|
type TRoom = Record<string, any>;
|
||||||
|
|
||||||
|
@ -45,7 +44,24 @@ interface IUserTyping extends Action {
|
||||||
status: boolean;
|
status: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TActionsRoom = TSubscribeRoom & TUnsubscribeRoom & TCloseRoom & ILeaveRoom & IDeleteRoom & IForwardRoom & IUserTyping;
|
export interface IRoomHistoryRequest extends Action {
|
||||||
|
rid: string;
|
||||||
|
t: RoomType;
|
||||||
|
loaderId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRoomHistoryFinished extends Action {
|
||||||
|
loaderId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TActionsRoom = TSubscribeRoom &
|
||||||
|
TUnsubscribeRoom &
|
||||||
|
ILeaveRoom &
|
||||||
|
IDeleteRoom &
|
||||||
|
IForwardRoom &
|
||||||
|
IUserTyping &
|
||||||
|
IRoomHistoryRequest &
|
||||||
|
IRoomHistoryFinished;
|
||||||
|
|
||||||
export function subscribeRoom(rid: string): TSubscribeRoom {
|
export function subscribeRoom(rid: string): TSubscribeRoom {
|
||||||
return {
|
return {
|
||||||
|
@ -79,13 +95,6 @@ export function deleteRoom(roomType: ERoomType, room: TRoom, selected?: ISelecte
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function closeRoom(rid: string): TCloseRoom {
|
|
||||||
return {
|
|
||||||
type: ROOM.CLOSE,
|
|
||||||
rid
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function forwardRoom(rid: string, transferData: ITransferData): IForwardRoom {
|
export function forwardRoom(rid: string, transferData: ITransferData): IForwardRoom {
|
||||||
return {
|
return {
|
||||||
type: ROOM.FORWARD,
|
type: ROOM.FORWARD,
|
||||||
|
@ -107,3 +116,19 @@ export function userTyping(rid: string, status = true): IUserTyping {
|
||||||
status
|
status
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function roomHistoryRequest({ rid, t, loaderId }: { rid: string; t: RoomType; loaderId: string }): IRoomHistoryRequest {
|
||||||
|
return {
|
||||||
|
type: ROOM.HISTORY_REQUEST,
|
||||||
|
rid,
|
||||||
|
t,
|
||||||
|
loaderId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function roomHistoryFinished({ loaderId }: { loaderId: string }): IRoomHistoryFinished {
|
||||||
|
return {
|
||||||
|
type: ROOM.HISTORY_FINISHED,
|
||||||
|
loaderId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import BottomSheet, { BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
||||||
|
|
||||||
import { useDimensions, useOrientation } from '../../dimensions';
|
import { useDimensions, useOrientation } from '../../dimensions';
|
||||||
import { useTheme } from '../../theme';
|
import { useTheme } from '../../theme';
|
||||||
import { isIOS, isTablet } from '../../utils/deviceInfo';
|
import { isIOS, isTablet } from '../../lib/methods/helpers';
|
||||||
import { Handle } from './Handle';
|
import { Handle } from './Handle';
|
||||||
import { TActionSheetOptions } from './Provider';
|
import { TActionSheetOptions } from './Provider';
|
||||||
import BottomSheetContent from './BottomSheetContent';
|
import BottomSheetContent from './BottomSheetContent';
|
||||||
|
@ -18,10 +18,10 @@ const HANDLE_HEIGHT = isIOS ? 40 : 56;
|
||||||
const MIN_SNAP_HEIGHT = 16;
|
const MIN_SNAP_HEIGHT = 16;
|
||||||
const CANCEL_HEIGHT = 64;
|
const CANCEL_HEIGHT = 64;
|
||||||
|
|
||||||
const ANIMATION_DURATION = 250;
|
export const ACTION_SHEET_ANIMATION_DURATION = 250;
|
||||||
|
|
||||||
const ANIMATION_CONFIG = {
|
const ANIMATION_CONFIG = {
|
||||||
duration: ANIMATION_DURATION,
|
duration: ACTION_SHEET_ANIMATION_DURATION,
|
||||||
// https://easings.net/#easeInOutCubic
|
// https://easings.net/#easeInOutCubic
|
||||||
easing: Easing.bezier(0.645, 0.045, 0.355, 1.0)
|
easing: Easing.bezier(0.645, 0.045, 0.355, 1.0)
|
||||||
};
|
};
|
||||||
|
@ -101,6 +101,11 @@ const ActionSheet = React.memo(
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const onClose = () => {
|
||||||
|
toggleVisible();
|
||||||
|
data?.onClose && data?.onClose();
|
||||||
|
};
|
||||||
|
|
||||||
const renderBackdrop = useCallback(
|
const renderBackdrop = useCallback(
|
||||||
props => (
|
props => (
|
||||||
<BottomSheetBackdrop
|
<BottomSheetBackdrop
|
||||||
|
@ -116,6 +121,10 @@ const ActionSheet = React.memo(
|
||||||
|
|
||||||
const bottomSheet = isLandscape || isTablet ? styles.bottomSheet : {};
|
const bottomSheet = isLandscape || isTablet ? styles.bottomSheet : {};
|
||||||
|
|
||||||
|
// Must need this prop to avoid keyboard dismiss
|
||||||
|
// when is android tablet and the input text is focused
|
||||||
|
const androidTablet: any = isTablet && isLandscape && !isIOS ? { android_keyboardInputMode: 'adjustResize' } : {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{children}
|
{children}
|
||||||
|
@ -130,7 +139,11 @@ const ActionSheet = React.memo(
|
||||||
enablePanDownToClose
|
enablePanDownToClose
|
||||||
style={{ ...styles.container, ...bottomSheet }}
|
style={{ ...styles.container, ...bottomSheet }}
|
||||||
backgroundStyle={{ backgroundColor: colors.focusedBackground }}
|
backgroundStyle={{ backgroundColor: colors.focusedBackground }}
|
||||||
onChange={index => index === -1 && toggleVisible()}>
|
onChange={index => index === -1 && onClose()}
|
||||||
|
// We need this to allow horizontal swipe gesture inside the bottom sheet like in reaction picker
|
||||||
|
enableContentPanningGesture={data?.enableContentPanningGesture ?? true}
|
||||||
|
{...androidTablet}
|
||||||
|
>
|
||||||
<BottomSheetContent options={data?.options} hide={hide} children={data?.children} hasCancel={data?.hasCancel} />
|
<BottomSheetContent options={data?.options} hide={hide} children={data?.children} hasCancel={data?.hasCancel} />
|
||||||
</BottomSheet>
|
</BottomSheet>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import { StyleSheet, Text, View } from 'react-native';
|
||||||
|
|
||||||
|
import { CustomIcon, TIconsName } from '../../CustomIcon';
|
||||||
|
import i18n from '../../../i18n';
|
||||||
|
import { isIOS } from '../../../lib/methods/helpers';
|
||||||
|
import { useTheme } from '../../../theme';
|
||||||
|
import sharedStyles from '../../../views/Styles';
|
||||||
|
import Button from '../../Button';
|
||||||
|
import { FormTextInput } from '../../TextInput/FormTextInput';
|
||||||
|
import { useActionSheet } from '../Provider';
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
subtitleText: {
|
||||||
|
fontSize: 14,
|
||||||
|
...sharedStyles.textRegular,
|
||||||
|
marginBottom: 10
|
||||||
|
},
|
||||||
|
buttonSeparator: {
|
||||||
|
marginRight: 8
|
||||||
|
},
|
||||||
|
footerButtonsContainer: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
paddingTop: 16
|
||||||
|
},
|
||||||
|
titleContainerText: {
|
||||||
|
fontSize: 16,
|
||||||
|
...sharedStyles.textSemibold
|
||||||
|
},
|
||||||
|
titleContainer: {
|
||||||
|
paddingRight: 80,
|
||||||
|
marginBottom: 16,
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const FooterButtons = ({
|
||||||
|
cancelAction = () => {},
|
||||||
|
confirmAction = () => {},
|
||||||
|
cancelTitle = '',
|
||||||
|
confirmTitle = '',
|
||||||
|
disabled = false,
|
||||||
|
cancelBackgroundColor = '',
|
||||||
|
confirmBackgroundColor = ''
|
||||||
|
}): React.ReactElement => {
|
||||||
|
const { colors } = useTheme();
|
||||||
|
return (
|
||||||
|
<View style={styles.footerButtonsContainer}>
|
||||||
|
<Button
|
||||||
|
style={[styles.buttonSeparator, { flex: 1, backgroundColor: cancelBackgroundColor || colors.cancelButton }]}
|
||||||
|
color={colors.backdropColor}
|
||||||
|
title={cancelTitle}
|
||||||
|
onPress={cancelAction}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
style={{ flex: 1, backgroundColor: confirmBackgroundColor || colors.dangerColor }}
|
||||||
|
title={confirmTitle}
|
||||||
|
onPress={confirmAction}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ActionSheetContentWithInputAndSubmit = ({
|
||||||
|
onSubmit = () => {},
|
||||||
|
onCancel,
|
||||||
|
title = '',
|
||||||
|
description = '',
|
||||||
|
testID = '',
|
||||||
|
secureTextEntry = true,
|
||||||
|
placeholder = '',
|
||||||
|
confirmTitle,
|
||||||
|
iconName,
|
||||||
|
iconColor,
|
||||||
|
customText,
|
||||||
|
confirmBackgroundColor,
|
||||||
|
showInput = true
|
||||||
|
}: {
|
||||||
|
onSubmit: (inputValue: string) => void;
|
||||||
|
onCancel?: () => void;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
testID: string;
|
||||||
|
secureTextEntry?: boolean;
|
||||||
|
placeholder: string;
|
||||||
|
confirmTitle?: string;
|
||||||
|
iconName?: TIconsName;
|
||||||
|
iconColor?: string;
|
||||||
|
customText?: React.ReactElement;
|
||||||
|
confirmBackgroundColor?: string;
|
||||||
|
showInput?: boolean;
|
||||||
|
}): React.ReactElement => {
|
||||||
|
const { colors } = useTheme();
|
||||||
|
const [inputValue, setInputValue] = useState('');
|
||||||
|
const { hideActionSheet } = useActionSheet();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={sharedStyles.containerScrollView} testID='action-sheet-content-with-input-and-submit'>
|
||||||
|
<>
|
||||||
|
<View style={styles.titleContainer}>
|
||||||
|
{iconName ? <CustomIcon name={iconName} size={32} color={iconColor || colors.dangerColor} /> : null}
|
||||||
|
<Text style={[styles.titleContainerText, { color: colors.passcodePrimary, paddingLeft: iconName ? 16 : 0 }]}>
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<Text style={[styles.subtitleText, { color: colors.titleText }]}>{description}</Text>
|
||||||
|
{customText}
|
||||||
|
</>
|
||||||
|
{showInput ? (
|
||||||
|
<FormTextInput
|
||||||
|
value={inputValue}
|
||||||
|
placeholder={placeholder}
|
||||||
|
onChangeText={value => setInputValue(value)}
|
||||||
|
onSubmitEditing={() => {
|
||||||
|
// fix android animation
|
||||||
|
setTimeout(() => {
|
||||||
|
hideActionSheet();
|
||||||
|
}, 100);
|
||||||
|
if (inputValue) onSubmit(inputValue);
|
||||||
|
}}
|
||||||
|
testID={testID}
|
||||||
|
secureTextEntry={secureTextEntry}
|
||||||
|
bottomSheet={isIOS}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
<FooterButtons
|
||||||
|
confirmBackgroundColor={confirmBackgroundColor || colors.actionTintColor}
|
||||||
|
cancelAction={onCancel || hideActionSheet}
|
||||||
|
confirmAction={() => onSubmit(inputValue)}
|
||||||
|
cancelTitle={i18n.t('Cancel')}
|
||||||
|
confirmTitle={confirmTitle || i18n.t('Save')}
|
||||||
|
disabled={!showInput ? false : !inputValue}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ActionSheetContentWithInputAndSubmit;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue