diff --git a/app/containers/MessageBox/EmojiKeyboard.tsx b/app/containers/MessageBox/EmojiKeyboard.tsx index 2286e994f..2919ec2df 100644 --- a/app/containers/MessageBox/EmojiKeyboard.tsx +++ b/app/containers/MessageBox/EmojiKeyboard.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { View } from 'react-native'; -import { KeyboardRegistry } from 'react-native-ui-lib/keyboard'; +import { Keyboard } from 'react-native-ui-lib'; import { Provider } from 'react-redux'; import store from '../../lib/store'; @@ -13,7 +13,7 @@ import { colors } from '../../lib/constants'; const EmojiKeyboard = ({ theme }: { theme: TSupportedThemes }) => { const onItemClicked = (eventType: EventTypes, emoji?: IEmoji) => { - KeyboardRegistry.onItemSelected('EmojiKeyboard', { eventType, emoji }); + Keyboard.KeyboardRegistry.onItemSelected('EmojiKeyboard', { eventType, emoji }); }; return ( @@ -35,4 +35,4 @@ const EmojiKeyboard = ({ theme }: { theme: TSupportedThemes }) => { ); }; -KeyboardRegistry.registerKeyboard('EmojiKeyboard', () => EmojiKeyboard); +Keyboard.KeyboardRegistry.registerKeyboard('EmojiKeyboard', () => EmojiKeyboard); diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index 53926e78d..32b0fdf95 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Alert, Keyboard, NativeModules, Text, View, BackHandler } from 'react-native'; import { connect } from 'react-redux'; -import { KeyboardAccessoryView } from 'react-native-ui-lib/keyboard'; +import { KeyboardAccessoryView } from 'react-native-ui-lib'; import ImagePicker, { Image, ImageOrVideo, Options } from 'react-native-image-crop-picker'; import { dequal } from 'dequal'; import DocumentPicker from 'react-native-document-picker'; @@ -592,7 +592,7 @@ class MessageBox extends Component { } }; - onKeyboardItemSelected = (keyboardId: string, params: { eventType: EventTypes; emoji: IEmoji }) => { + onKeyboardItemSelected = (keyboardId: string | undefined, params: { eventType: EventTypes; emoji: IEmoji }) => { const { eventType, emoji } = params; const { text } = this; let newText = ''; @@ -1317,7 +1317,7 @@ class MessageBox extends Component { ref={(ref: any) => (this.tracking = ref)} renderContent={this.renderContent} kbInputRef={this.component} - kbComponent={showEmojiKeyboard ? 'EmojiKeyboard' : null} + kbComponent={showEmojiKeyboard ? 'EmojiKeyboard' : undefined} kbInitialProps={{ theme }} onKeyboardResigned={this.onKeyboardResigned} onItemSelected={this.onKeyboardItemSelected} @@ -1325,7 +1325,7 @@ class MessageBox extends Component { requiresSameParentToManageScrollView addBottomView bottomViewColor={themes[theme].messageboxBackground} - iOSScrollBehavior={iOSScrollBehavior} + scrollBehavior={iOSScrollBehavior} /> ); diff --git a/ios/Podfile b/ios/Podfile index 659ca2481..0b774dfc3 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -8,7 +8,6 @@ install! 'cocoapods', :deterministic_uuids => false def all_pods pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true pod 'simdjson', path: '../node_modules/@nozbe/simdjson' - pod 'ReactNativeUiLib', :path => '../node_modules/react-native-ui-lib/lib' $RNFirebaseAnalyticsWithoutAdIdSupport = true config = use_native_modules! diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6a30663dc..02e60cb11 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -485,7 +485,7 @@ PODS: - ReactCommon/turbomodule/core (= 0.68.6) - ReactNativeART (1.2.0): - React - - ReactNativeUiLib (3.0.4): + - ReactNativeUiLib (4.0.0): - React - rn-extensions-share (2.4.1): - React @@ -653,7 +653,7 @@ DEPENDENCIES: - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - "ReactNativeART (from `../node_modules/@react-native-community/art`)" - - ReactNativeUiLib (from `../node_modules/react-native-ui-lib/lib`) + - ReactNativeUiLib (from `../node_modules/react-native-ui-lib`) - rn-extensions-share (from `../node_modules/rn-extensions-share`) - rn-fetch-blob (from `../node_modules/rn-fetch-blob`) - RNBootSplash (from `../node_modules/react-native-bootsplash`) @@ -831,7 +831,7 @@ EXTERNAL SOURCES: ReactNativeART: :path: "../node_modules/@react-native-community/art" ReactNativeUiLib: - :path: "../node_modules/react-native-ui-lib/lib" + :path: "../node_modules/react-native-ui-lib" rn-extensions-share: :path: "../node_modules/rn-extensions-share" rn-fetch-blob: @@ -969,7 +969,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: d5498cfb7059bf8397b6416db4777843f3f4c1e7 ReactCommon: 1974dab5108c79b40199f12a4833d2499b9f6303 ReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab - ReactNativeUiLib: cde7263a7d308b60161cd286f95c9433e79f2f7d + ReactNativeUiLib: 511a5eb03809a0b27f6aefa2b4d6f7c2d6ae4053 rn-extensions-share: 5fd84a80e6594706f0dfa1884f2d6d591b382cf5 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNBootSplash: 7e91ea56c7010aae487489789dbe212e8c905a0c @@ -1001,6 +1001,6 @@ SPEC CHECKSUMS: WatermelonDB: 577c61fceff16e9f9103b59d14aee4850c0307b6 Yoga: 7929b92b1828675c1bebeb114dae8cb8fa7ef6a3 -PODFILE CHECKSUM: 670cc455843e2a5aeeaabfba29cc1194a8948056 +PODFILE CHECKSUM: 0dc489a0c4bec783a132693070c2d02e2ca6b0db COCOAPODS: 1.11.3 diff --git a/package.json b/package.json index 966ebeb03..d6a773819 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "react-native-skeleton-placeholder": "^5.2.3", "react-native-slowlog": "^1.0.2", "react-native-svg": "^12.3.0", - "react-native-ui-lib": "RocketChat/react-native-ui-lib", + "react-native-ui-lib": "RocketChat/react-native-ui-lib#new.build-rocket-chat", "react-native-vector-icons": "9.1.0", "react-native-webview": "10.3.2", "react-redux": "^8.0.5", diff --git a/yarn.lock b/yarn.lock index 28c45f4ed..f3f2dedb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9504,6 +9504,11 @@ damerau-levenshtein@^1.0.7: resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== +date-fns@^2.29.3: + version "2.29.3" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" + integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== + dayjs@^1.8.15: version "1.11.7" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" @@ -14382,11 +14387,6 @@ lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@^4.0.0: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - lodash@^4.17.13, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" @@ -15301,7 +15301,7 @@ mocha@9.0.1: yargs-parser "20.2.4" yargs-unparser "2.0.0" -moment@2.29.4, moment@2.x.x, moment@^2.19.3, moment@^2.24.0: +moment@2.29.4, moment@2.x.x, moment@^2.19.3: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -16785,7 +16785,7 @@ prompts@^2.2.1, prompts@^2.3.2, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@*, prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -17195,7 +17195,7 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-native-animatable@1.3.3, react-native-animatable@^1.1.0, react-native-animatable@^1.3.3: +react-native-animatable@1.3.3, react-native-animatable@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/react-native-animatable/-/react-native-animatable-1.3.3.tgz#a13a4af8258e3bb14d0a9d839917e9bb9274ec8a" integrity sha512-2ckIxZQAsvWn25Ho+DK3d1mXIgj7tITkrS4pYDvx96WyOttSvzzFeQnM2od0+FUMzILbdHDsDEqZvnz1DYNQ1w== @@ -17226,15 +17226,6 @@ react-native-codegen@^0.0.18: jscodeshift "^0.13.1" nullthrows "^1.1.1" -react-native-color@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/react-native-color/-/react-native-color-0.0.10.tgz#9cbc0da191c67ae4fc3a04bef7bc54a685784c7d" - integrity sha512-MrYIaWH/fiRXBhfJBVG7vtNF5cQQKg1rK16pU8xtlKne2Ipu+Inki1Gb/oFvaOu+zNXb5/6tss467k8zYIvMwA== - dependencies: - prop-types "^15.6.0" - react-native-slider "^0.11.0" - tinycolor2 "^1.4.1" - react-native-config-reader@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/react-native-config-reader/-/react-native-config-reader-4.1.1.tgz#478b69e32adcc2e9a14f6ef5fa2cbbe012b9a27e" @@ -17488,13 +17479,6 @@ react-native-skeleton-placeholder@^5.2.3: resolved "https://registry.yarnpkg.com/react-native-skeleton-placeholder/-/react-native-skeleton-placeholder-5.2.3.tgz#2dddf1f84d43110b90c22f715b2dbbe2c54732e1" integrity sha512-nikmTfex3oydnZ4prV62KxibMvcu2l2NegsHGtXhsWwFIX5QaKneBohP7etinUq/c2PkSr3ZlfqooDG2yIHRdg== -react-native-slider@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/react-native-slider/-/react-native-slider-0.11.0.tgz#b68a0bc43c8422b24cd57947cc5ac2bcdb58fadc" - integrity sha512-jV9K87eu9uWr0uJIyrSpBLnCKvVlOySC2wynq9TFCdV9oGgjt7Niq8Q1A8R8v+5GHsuBw/s8vEj1AAkkUi+u+w== - dependencies: - prop-types "^15.5.6" - react-native-slowlog@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/react-native-slowlog/-/react-native-slowlog-1.0.2.tgz#5520979e3ef9d5273495d431ff3be34f02e35c89" @@ -17518,23 +17502,24 @@ react-native-text-size@4.0.0-rc.1: resolved "https://registry.yarnpkg.com/react-native-text-size/-/react-native-text-size-4.0.0-rc.1.tgz#1e048d345dd6a5a8e1269e0585c1a5948c478da5" integrity sha512-CysqjU2jK6Yc+a+kEI222pUyTY2ywcU2HqbFqf1KHymW6OPTdvBBHqbEJKL0QiLhQaFYDbqicM+h990s9TP00g== -react-native-ui-lib@RocketChat/react-native-ui-lib: - version "4.2.0" - resolved "https://codeload.github.com/RocketChat/react-native-ui-lib/tar.gz/fd5869e493b5b9cf888cec4a252c9ef292364b02" +react-native-ui-lib@RocketChat/react-native-ui-lib#new.build-rocket-chat: + version "7.0.0" + resolved "https://codeload.github.com/RocketChat/react-native-ui-lib/tar.gz/5039b784028581159beef3a91be7f6ff3b9ca6c1" dependencies: babel-plugin-transform-inline-environment-variables "^0.0.2" color "^3.1.0" commons-validator-js "^1.0.237" + date-fns "^2.29.3" + deprecated-react-native-prop-types "^2.3.0" hoist-non-react-statics "^3.0.0" - lodash "^4.0.0" + lodash "^4.17.21" memoize-one "^5.0.5" - moment "^2.24.0" prop-types "^15.5.10" - react-native-animatable "^1.1.0" - react-native-color "0.0.10" + react-freeze "^1.0.0" react-native-redash "^12.0.3" react-native-text-size "4.0.0-rc.1" semver "^5.5.0" + tinycolor2 "^1.4.2" url-parse "^1.2.0" react-native-vector-icons@9.1.0: @@ -19734,6 +19719,11 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= +tinycolor2@^1.4.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" + integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"