From ec24597670c6358b18b9134d65b76ace762d61c3 Mon Sep 17 00:00:00 2001 From: kuzkokov Date: Fri, 12 Apr 2024 15:42:44 +0300 Subject: [PATCH 1/3] MUK001: Change default KeyboardAvoidingView to the react-native-keyboard-controller --- example/ios/Podfile.lock | 8 ++++++++ example/package.json | 1 + example/src/index.tsx | 13 ++++++++----- package.json | 2 ++ src/components/screens/ScreenContainer/index.tsx | 7 ++++--- yarn.lock | 15 +++++++++++++++ 6 files changed, 38 insertions(+), 8 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 663028a..ace1889 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1040,6 +1040,10 @@ PODS: - react-native-config/App (= 1.5.1) - react-native-config/App (1.5.1): - React-Core + - react-native-keyboard-controller (1.11.6): + - glog + - RCT-Folly (= 2022.05.16.00) + - React-Core - react-native-safe-area-context (4.8.2): - React-Core - React-nativeconfig (0.73.6) @@ -1300,6 +1304,7 @@ DEPENDENCIES: - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - react-native-config (from `../node_modules/react-native-config`) + - react-native-keyboard-controller (from `../node_modules/react-native-keyboard-controller`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) @@ -1433,6 +1438,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon" react-native-config: :path: "../node_modules/react-native-config" + react-native-keyboard-controller: + :path: "../node_modules/react-native-keyboard-controller" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" React-nativeconfig: @@ -1546,6 +1553,7 @@ SPEC CHECKSUMS: React-logger: 3eb80a977f0d9669468ef641a5e1fabbc50a09ec React-Mapbuffer: 84ea43c6c6232049135b1550b8c60b2faac19fab react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8 + react-native-keyboard-controller: d7eb6a5884e1b193c902e02f2ca298e53cad3a77 react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee diff --git a/example/package.json b/example/package.json index 1cd7e38..a342abb 100644 --- a/example/package.json +++ b/example/package.json @@ -50,6 +50,7 @@ "react-native-config": "^1.5.1", "react-native-flash-message": "^0.4.2", "react-native-gesture-handler": "~2.14.0", + "react-native-keyboard-controller": "^1.11.6", "react-native-reanimated": "~3.6.2", "react-native-safe-area-context": "4.8.2", "react-native-screens": "^3.29.0", diff --git a/example/src/index.tsx b/example/src/index.tsx index 5acb3fa..a9e7672 100644 --- a/example/src/index.tsx +++ b/example/src/index.tsx @@ -2,6 +2,7 @@ import StorybookUI from '@appello/mobile-ui/.storybook'; import React from 'react'; import { StyleSheet } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; +import { KeyboardProvider } from 'react-native-keyboard-controller'; import { initialWindowMetrics, SafeAreaProvider } from 'react-native-safe-area-context'; import { componentsConfig, theme, UIKitConfigProvider } from './view/uiKit'; @@ -9,11 +10,13 @@ import { componentsConfig, theme, UIKitConfigProvider } from './view/uiKit'; const RootApp: React.FC = () => { return ( - - - - - + + + + + + + ); }; diff --git a/package.json b/package.json index 4d5b1cf..697f1ce 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "react-hook-form": ">=7.43.5", "react-native": ">=0.71.0", "react-native-gesture-handler": ">=2.0.0", + "react-native-keyboard-controller": "^1.11.6", "react-native-reanimated": ">=3.0.0", "react-native-safe-area-context": "*", "react-native-screens": "^3.29.0", @@ -158,6 +159,7 @@ "react-native": "^0.71.4", "react-native-builder-bob": "^0.23.2", "react-native-gesture-handler": "^2.0.0", + "react-native-keyboard-controller": "^1.11.6", "react-native-reanimated": "^3.6.1", "react-native-safe-area-context": "^4.7.4", "react-native-screens": "^3.29.0", diff --git a/src/components/screens/ScreenContainer/index.tsx b/src/components/screens/ScreenContainer/index.tsx index d6317ea..571c01a 100644 --- a/src/components/screens/ScreenContainer/index.tsx +++ b/src/components/screens/ScreenContainer/index.tsx @@ -1,6 +1,7 @@ import { IS_IOS } from '@appello/mobile/lib/constants/platform'; import React, { useMemo } from 'react'; -import { KeyboardAvoidingView, KeyboardAvoidingViewProps, ViewStyle } from 'react-native'; +import { ViewStyle } from 'react-native'; +import { KeyboardAvoidingView, KeyboardControllerProps } from 'react-native-keyboard-controller'; import { Edge, SafeAreaView, SafeAreaViewProps } from 'react-native-safe-area-context'; import { useCombinedPropsWithConfig } from '../../../hooks/useCombinedPropsWithConfig'; @@ -8,7 +9,7 @@ import { useCombinedStylesWithConfig } from '../../../hooks/useCombinedStylesWit import { layout } from '../../../styles/layout'; import { makeStyles } from '../../../utils'; -export interface ScreenContainerProps extends KeyboardAvoidingViewProps { +export interface ScreenContainerProps extends KeyboardControllerProps { /* Header to render on top of the screen */ header?: React.ReactNode; /* Screen content */ @@ -44,7 +45,7 @@ export const ScreenContainer: React.FC = props => { return ( diff --git a/yarn.lock b/yarn.lock index 5a3d34e..101386a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -213,6 +213,7 @@ __metadata: react-native-animated-spinkit: ^1.5.2 react-native-builder-bob: ^0.23.2 react-native-gesture-handler: ^2.0.0 + react-native-keyboard-controller: ^1.11.6 react-native-mask-input: ^1.2.3 react-native-reanimated: ^3.6.1 react-native-safe-area-context: ^4.7.4 @@ -235,6 +236,7 @@ __metadata: "@react-native-async-storage/async-storage": ^1.22.2 "@react-navigation/elements": ^1.3.21 "@react-navigation/native": ^6.1.9 + date-fns: ^3.6.0 expo: ">=48.0.0" expo-linear-gradient: ">=12.0.0" react: 18.2.0 @@ -242,6 +244,7 @@ __metadata: react-hook-form: ">=7.43.5" react-native: ">=0.71.0" react-native-gesture-handler: ">=2.0.0" + react-native-keyboard-controller: ^1.11.6 react-native-reanimated: ">=3.0.0" react-native-safe-area-context: "*" react-native-screens: ^3.29.0 @@ -12342,6 +12345,7 @@ __metadata: react-native-config: ^1.5.1 react-native-flash-message: ^0.4.2 react-native-gesture-handler: ~2.14.0 + react-native-keyboard-controller: ^1.11.6 react-native-reanimated: ~3.6.2 react-native-safe-area-context: 4.8.2 react-native-screens: ^3.29.0 @@ -20216,6 +20220,17 @@ __metadata: languageName: node linkType: hard +"react-native-keyboard-controller@npm:^1.11.6": + version: 1.11.6 + resolution: "react-native-keyboard-controller@npm:1.11.6" + peerDependencies: + react: "*" + react-native: "*" + react-native-reanimated: ">=2.3.0" + checksum: 7dc970b2063f4ca01853fd67d2e3287695edff077f76c2d12cd87024807dcffdb5f655d63afdcae20ee48f119cd6d405c990bb86e630d6076a122063b489e8c7 + languageName: node + linkType: hard + "react-native-mask-input@npm:^1.2.3": version: 1.2.3 resolution: "react-native-mask-input@npm:1.2.3" From 76a90e0e072323f1a927a5b85bbe0e8fca262353 Mon Sep 17 00:00:00 2001 From: kuzkokov Date: Mon, 15 Apr 2024 20:27:47 +0300 Subject: [PATCH 2/3] MUK033: Fix imports --- src/components/common/Label/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/common/Label/index.tsx b/src/components/common/Label/index.tsx index 023816a..8d378b4 100644 --- a/src/components/common/Label/index.tsx +++ b/src/components/common/Label/index.tsx @@ -1,9 +1,9 @@ -import { useCombinedPropsWithConfig } from '@appello/mobile-ui/hooks/useCombinedPropsWithConfig'; -import { useCombinedStylesWithConfig } from '@appello/mobile-ui/hooks/useCombinedStylesWithConfig'; -import { makeStyles } from '@appello/mobile-ui/utils'; import React from 'react'; import { View, ViewStyle } from 'react-native'; +import { useCombinedPropsWithConfig } from '../../../hooks/useCombinedPropsWithConfig'; +import { useCombinedStylesWithConfig } from '../../../hooks/useCombinedStylesWithConfig'; +import { makeStyles } from '../../../utils'; import { AppText, AppTextProps } from '../AppText'; export interface LabelStyle { From 4306058e4d3e6658bead4a2cf376f0a7958b8255 Mon Sep 17 00:00:00 2001 From: kuzkokov Date: Sun, 21 Apr 2024 18:36:08 +0500 Subject: [PATCH 3/3] 1.1.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 697f1ce..db32c5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@appello/mobile-ui", - "version": "1.1.11", + "version": "1.1.12", "description": "Appello Software mobile UIKit", "main": "dist/commonjs/index.js", "module": "dist/module/index.js",