diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index d8d6a8133..b8afdacb6 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -9,7 +9,7 @@ import { Q } from '@nozbe/watermelondb'; import { TouchableWithoutFeedback } from 'react-native-gesture-handler'; import { generateTriggerId } from '../../lib/methods/actions'; -import TextInput, { IThemedTextInput } from '../../presentation/TextInput'; +import TextInput, { IThemedTextInput } from '../TextInput'; import { userTyping as userTypingAction } from '../../actions/room'; import styles from './styles'; import database from '../../lib/database'; diff --git a/app/containers/SearchBox.tsx b/app/containers/SearchBox.tsx index 75174e474..34432f5d7 100644 --- a/app/containers/SearchBox.tsx +++ b/app/containers/SearchBox.tsx @@ -5,7 +5,7 @@ import Touchable from 'react-native-platform-touchable'; import { themes } from '../lib/constants'; import I18n from '../i18n'; import { CustomIcon } from './CustomIcon'; -import TextInput from '../presentation/TextInput'; +import TextInput from './TextInput'; import { useTheme } from '../theme'; import { isIOS } from '../utils/deviceInfo'; import sharedStyles from '../views/Styles'; diff --git a/app/containers/SearchHeader.tsx b/app/containers/SearchHeader.tsx index 589ef1d2b..6b5e31fc1 100644 --- a/app/containers/SearchHeader.tsx +++ b/app/containers/SearchHeader.tsx @@ -5,7 +5,7 @@ import I18n from '../i18n'; import { useTheme } from '../theme'; import sharedStyles from '../views/Styles'; import { themes } from '../lib/constants'; -import TextInput from '../presentation/TextInput'; +import TextInput from './TextInput'; import { isIOS, isTablet } from '../utils/deviceInfo'; import { useOrientation } from '../dimensions'; diff --git a/app/containers/TextInput.tsx b/app/containers/TextInput/FormTextInput.tsx similarity index 91% rename from app/containers/TextInput.tsx rename to app/containers/TextInput/FormTextInput.tsx index 5f6471e2e..f013b9f09 100644 --- a/app/containers/TextInput.tsx +++ b/app/containers/TextInput/FormTextInput.tsx @@ -2,12 +2,12 @@ import React from 'react'; import { StyleProp, StyleSheet, Text, TextInputProps, TextInput as RNTextInput, TextStyle, View, ViewStyle } from 'react-native'; import Touchable from 'react-native-platform-touchable'; -import sharedStyles from '../views/Styles'; -import TextInput from '../presentation/TextInput'; -import { themes } from '../lib/constants'; -import { CustomIcon, TIconsName } from './CustomIcon'; -import ActivityIndicator from './ActivityIndicator'; -import { TSupportedThemes } from '../theme'; +import sharedStyles from '../../views/Styles'; +import TextInput from './index'; +import { themes } from '../../lib/constants'; +import { CustomIcon, TIconsName } from '../CustomIcon'; +import ActivityIndicator from '../ActivityIndicator'; +import { TSupportedThemes } from '../../theme'; const styles = StyleSheet.create({ error: { @@ -70,7 +70,7 @@ interface IRCTextInputState { showPassword: boolean; } -export default class RCTextInput extends React.PureComponent { +export default class FormTextInput extends React.PureComponent { static defaultProps = { error: {}, theme: 'light' diff --git a/app/containers/TextInput.stories.js b/app/containers/TextInput/TextInput.stories.js similarity index 72% rename from app/containers/TextInput.stories.js rename to app/containers/TextInput/TextInput.stories.js index d0e6c6044..c4a985136 100644 --- a/app/containers/TextInput.stories.js +++ b/app/containers/TextInput/TextInput.stories.js @@ -3,7 +3,7 @@ import React from 'react'; import { storiesOf } from '@storybook/react-native'; import { View, StyleSheet } from 'react-native'; -import TextInput from './TextInput'; +import FormTextInput from './FormTextInput'; const styles = StyleSheet.create({ paddingHorizontal: { @@ -23,9 +23,9 @@ const theme = 'light'; stories.add('Short and Long Text', () => ( <> - + - + )); diff --git a/app/containers/__snapshots__/TextInput.stories.storyshot b/app/containers/TextInput/__snapshots__/TextInput.stories.storyshot similarity index 100% rename from app/containers/__snapshots__/TextInput.stories.storyshot rename to app/containers/TextInput/__snapshots__/TextInput.stories.storyshot diff --git a/app/presentation/TextInput.tsx b/app/containers/TextInput/index.tsx similarity index 83% rename from app/presentation/TextInput.tsx rename to app/containers/TextInput/index.tsx index 8c2a16cdd..449ea2d5e 100644 --- a/app/presentation/TextInput.tsx +++ b/app/containers/TextInput/index.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { I18nManager, StyleProp, StyleSheet, TextInput, TextStyle } from 'react-native'; -import { IRCTextInputProps } from '../containers/TextInput'; -import { themes } from '../lib/constants'; -import { TSupportedThemes } from '../theme'; +import { IRCTextInputProps } from './FormTextInput'; +import { themes } from '../../lib/constants'; +import { TSupportedThemes } from '../../theme'; const styles = StyleSheet.create({ input: { diff --git a/app/containers/TwoFactor/index.tsx b/app/containers/TwoFactor/index.tsx index a83af6c26..31f68c2e5 100644 --- a/app/containers/TwoFactor/index.tsx +++ b/app/containers/TwoFactor/index.tsx @@ -6,7 +6,7 @@ import Modal from 'react-native-modal'; import useDeepCompareEffect from 'use-deep-compare-effect'; import { connect } from 'react-redux'; -import TextInput from '../TextInput'; +import FormTextInput from '../TextInput/FormTextInput'; import I18n from '../../i18n'; import EventEmitter from '../../utils/events'; import { useTheme } from '../../theme'; @@ -114,7 +114,7 @@ const TwoFactor = React.memo(({ isMasterDetail }: { isMasterDetail: boolean }) = ]}> {I18n.t(method?.title || 'Two_Factor_Authentication')} {method?.text ? {I18n.t(method.text)} : null} - InteractionManager.runAfterInteractions(() => e?.getNativeRef()?.focus())} diff --git a/app/containers/UIKit/MultiSelect/index.tsx b/app/containers/UIKit/MultiSelect/index.tsx index ef4b1fb87..61f917349 100644 --- a/app/containers/UIKit/MultiSelect/index.tsx +++ b/app/containers/UIKit/MultiSelect/index.tsx @@ -13,7 +13,7 @@ import { import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit'; import Button from '../../Button'; -import TextInput from '../../TextInput'; +import FormTextInput from '../../TextInput/FormTextInput'; import { textParser } from '../utils'; import { themes } from '../../../lib/constants'; import I18n from '../../../i18n'; @@ -139,7 +139,7 @@ export const MultiSelect = React.memo( return ( - - {I18n.t('E2E_encryption_change_password_description')} - - { this.passwordInput = e; }} diff --git a/app/views/ForgotPasswordView.tsx b/app/views/ForgotPasswordView.tsx index 5ab4775e4..6c99cd724 100644 --- a/app/views/ForgotPasswordView.tsx +++ b/app/views/ForgotPasswordView.tsx @@ -3,7 +3,7 @@ import { Text } from 'react-native'; import Button from '../containers/Button'; import FormContainer, { FormContainerInner } from '../containers/FormContainer'; -import TextInput from '../containers/TextInput'; +import FormTextInput from '../containers/TextInput/FormTextInput'; import I18n from '../i18n'; import { themes } from '../lib/constants'; import { Services } from '../lib/services'; @@ -92,7 +92,7 @@ class ForgotPasswordView extends React.Component {I18n.t('Forgot_password')} - - + {renderExpiration()}