Chore: Move constants away from rocketchat folder - Typescript (#4022)

* create keys file and export all consts

* fix import E2E_MESSAGE_TYPE

* fix constants import

* fix constants import

* fix E2E_BANNER_TYPE import

* fix E2E_ROOM_TYPES import

* fix THEME_PREFERENCES_KEY import

* fix CRASH_REPORT_KEY and ANALYTICS_EVENTS_KEY import

* fix MIN_ROCKETCHAT_VERSION import

* fix constantDisplayMode import

* fix environment imports

* fix links imports

* fix localAuthentication imports

* fix localPath imports

* fix messagesStatus imports

* fix messageTypeLoad imports

* fix defaultSettings imports

* fix tablet imports

* update with todo for colors

* move to lib folder

* change constant/colors to constant
This commit is contained in:
Gleidson Daniel Silva 2022-04-07 11:10:03 -03:00 committed by GitHub
parent 474ea98a3b
commit bdf83e546e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
281 changed files with 290 additions and 318 deletions

View File

@ -7,7 +7,7 @@ import Animated, { Easing, Extrapolate, interpolateNode, Value } from 'react-nat
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import ScrollBottomSheet from 'react-native-scroll-bottom-sheet';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useDimensions, useOrientation } from '../../dimensions';
import I18n from '../../i18n';
import { useTheme } from '../../theme';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { View } from 'react-native';
import styles from './styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
export const Handle = React.memo(() => {

View File

@ -1,7 +1,7 @@
import React from 'react';
import { Text, View } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { useTheme } from '../../theme';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { ActivityIndicator, ActivityIndicatorProps, StyleSheet } from 'react-native';
import { useTheme } from '../theme';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
interface IActivityIndicator extends ActivityIndicatorProps {
absolute?: boolean;

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import sharedStyles from '../views/Styles';
import { getReadableVersion } from '../utils/deviceInfo';
import I18n from '../i18n';

View File

@ -3,7 +3,7 @@ import { ActivityIndicator, ImageBackground, StyleSheet, Text, View } from 'reac
import { useTheme } from '../../theme';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
interface IBackgroundContainer {
text?: string;

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
import ActivityIndicator from '../ActivityIndicator';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet } from 'react-native';
import { CustomIcon } from '../lib/Icons';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import { useTheme } from '../theme';
const styles = StyleSheet.create({

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import styles from './styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
interface ITabBarProps {
goToPage: Function;

View File

@ -15,7 +15,7 @@ import { emojisByCategory } from '../../emojis';
import protectedFunction from '../../lib/methods/helpers/protectedFunction';
import shortnameToUnicode from '../../utils/shortnameToUnicode';
import log from '../../utils/log';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { withTheme } from '../../theme';
import { IEmoji } from '../../definitions/IEmoji';

View File

@ -1,7 +1,7 @@
import React from 'react';
import { ScrollView, ScrollViewProps, StyleSheet, View } from 'react-native';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import sharedStyles from '../views/Styles';
import scrollPersistTaps from '../utils/scrollPersistTaps';
import KeyboardView from '../presentation/KeyboardView';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { SafeAreaView } from 'react-native-safe-area-context';
import { StyleSheet, View } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { themedHeader } from '../../utils/navigation';
import { isIOS, isTablet } from '../../utils/deviceInfo';
import { useTheme } from '../../theme';

View File

@ -4,7 +4,7 @@ import Touchable from 'react-native-platform-touchable';
import { CustomIcon } from '../../lib/Icons';
import { useTheme } from '../../theme';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
interface IHeaderButtonItem {

View File

@ -8,7 +8,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
import Avatar from '../Avatar';
import { CustomIcon } from '../../lib/Icons';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
import { ROW_HEIGHT } from '../../presentation/RoomItem';
import { goRoom } from '../../utils/goRoom';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import I18n from '../../i18n';
import { useTheme } from '../../theme';
import { PADDING_HORIZONTAL } from './constants';

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { useTheme } from '../../theme';
import { ICON_SIZE } from './constants';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
import { PADDING_HORIZONTAL } from './constants';
import I18n from '../../i18n';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { I18nManager, StyleSheet, Text, View } from 'react-native';
import Touch from '../../utils/touch';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
import { useTheme } from '../../theme';
import I18n from '../../i18n';

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StyleSheet, View, ViewStyle } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
const styles = StyleSheet.create({

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Animated, Modal, StyleSheet, View } from 'react-native';
import { withTheme } from '../theme';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
const styles = StyleSheet.create({
container: {

View File

@ -7,7 +7,7 @@ import { StackNavigationProp } from '@react-navigation/stack';
import { withTheme } from '../theme';
import sharedStyles from '../views/Styles';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import Button from './Button';
import OrSeparator from './OrSeparator';
import Touch from '../utils/touch';

View File

@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { FlatList, StyleSheet, Text, View } from 'react-native';
import { useTheme } from '../../theme';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import shortnameToUnicode from '../../utils/shortnameToUnicode';
import CustomEmoji from '../EmojiPicker/CustomEmoji';

View File

@ -2,7 +2,7 @@ import FastImage from '@rocket.chat/react-native-fast-image';
import React, { useContext, useState } from 'react';
import { TouchableOpacity } from 'react-native';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';
import ActivityIndicator from '../../ActivityIndicator';

View File

@ -2,7 +2,7 @@ import { dequal } from 'dequal';
import React from 'react';
import { FlatList } from 'react-native';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { IPreviewItem } from '../../../definitions';
import { useTheme } from '../../../theme';
import styles from '../styles';

View File

@ -5,7 +5,7 @@ import { KeyboardRegistry } from 'react-native-ui-lib/keyboard';
import { store } from '../../lib/auxStore';
import EmojiPicker from '../EmojiPicker';
import styles from './styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { withTheme } from '../../theme';
import { IEmoji } from '../../definitions/IEmoji';

View File

@ -3,7 +3,7 @@ import { Text, TouchableOpacity } from 'react-native';
import styles from '../styles';
import I18n from '../../../i18n';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IMessageBoxFixedMentionItem {

View File

@ -1,14 +1,14 @@
import React, { useContext } from 'react';
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import I18n from '../../../i18n';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';
import sharedStyles from '../../../views/Styles';
import { MENTIONS_TRACKING_TYPE_CANNED } from '../constants';
import MessageboxContext from '../Context';
import styles from '../styles';
import { MENTIONS_TRACKING_TYPE_CANNED } from '../constants';
interface IMentionHeaderList {
trackingType: string;

View File

@ -1,7 +1,7 @@
import React, { useContext } from 'react';
import { Text, TouchableOpacity } from 'react-native';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { IEmoji } from '../../../definitions/IEmoji';
import { useTheme } from '../../../theme';
import Avatar from '../../Avatar';

View File

@ -5,7 +5,7 @@ import { dequal } from 'dequal';
import MentionHeaderList from './MentionHeaderList';
import styles from '../styles';
import MentionItem from './MentionItem';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IMessageBoxMentions {

View File

@ -7,7 +7,7 @@ import { activateKeepAwake, deactivateKeepAwake } from 'expo-keep-awake';
import styles from './styles';
import I18n from '../../i18n';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { events, logEvent } from '../../utils/log';

View File

@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import { MarkdownPreview } from '../markdown';
import { CustomIcon } from '../../lib/Icons';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { IMessage } from '../../definitions/IMessage';
import { useTheme } from '../../theme';
import { IApplicationState } from '../../definitions';

View File

@ -5,7 +5,7 @@ import styles from '../styles';
import i18n from '../../../i18n';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
interface IBaseButton {
onPress(): void;

View File

@ -1,6 +1,6 @@
import React from 'react';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
import BaseButton from './BaseButton';

View File

@ -20,7 +20,7 @@ import RecordAudio from './RecordAudio';
import I18n from '../../i18n';
import ReplyPreview from './ReplyPreview';
import debounce from '../../utils/debounce';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
// @ts-ignore
// eslint-disable-next-line import/extensions,import/no-unresolved
import LeftButtons from './LeftButtons';

View File

@ -3,7 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
import I18n from '../i18n';
import sharedStyles from '../views/Styles';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
const styles = StyleSheet.create({
container: {

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Text } from 'react-native';
import styles from './styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import Touch from '../../../utils/touch';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';

View File

@ -3,7 +3,7 @@ import { View } from 'react-native';
import range from 'lodash/range';
import styles from './styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
const SIZE_EMPTY = 12;

View File

@ -3,7 +3,7 @@ import { View } from 'react-native';
import { Row } from 'react-native-easy-grid';
import styles from './styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { CustomIcon } from '../../../lib/Icons';
import { useTheme } from '../../../theme';

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Grid } from 'react-native-easy-grid';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { resetAttempts } from '../../../utils/localAuthentication';
import { TYPE } from '../constants';
import { getDiff, getLockedUntil } from '../utils';

View File

@ -3,7 +3,7 @@ import { Text, View } from 'react-native';
import { Row } from 'react-native-easy-grid';
import styles from './styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IPasscodeSubtitle {

View File

@ -3,7 +3,7 @@ import { Text, View } from 'react-native';
import { Row } from 'react-native-easy-grid';
import styles from './styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IPasscodeTitle {

View File

@ -9,8 +9,7 @@ import styles from './styles';
import Button from './Button';
import Dots from './Dots';
import { TYPE } from '../constants';
import { themes } from '../../../constants/colors';
import { PASSCODE_LENGTH } from '../../../constants/localAuthentication';
import { PASSCODE_LENGTH, themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
import LockIcon from './LockIcon';
import Title from './Title';

View File

@ -7,7 +7,7 @@ import { sha256 } from 'js-sha256';
import Base, { IBase } from './Base';
import Locked from './Base/Locked';
import { TYPE } from './constants';
import { ATTEMPTS_KEY, LOCKED_OUT_TIMER_KEY, MAX_ATTEMPTS, PASSCODE_KEY } from '../../constants/localAuthentication';
import { ATTEMPTS_KEY, LOCKED_OUT_TIMER_KEY, MAX_ATTEMPTS, PASSCODE_KEY } from '../../lib/constants';
import { biometryAuth, resetAttempts } from '../../utils/localAuthentication';
import { getDiff, getLockedUntil } from './utils';
import { useUserPreferences } from '../../lib/methods/userPreferences';

View File

@ -1,7 +1,7 @@
import AsyncStorage from '@react-native-community/async-storage';
import moment from 'moment';
import { LOCKED_OUT_TIMER_KEY, TIME_TO_LOCK } from '../../constants/localAuthentication';
import { LOCKED_OUT_TIMER_KEY, TIME_TO_LOCK } from '../../lib/constants';
export const getLockedUntil = async () => {
const t = await AsyncStorage.getItem(LOCKED_OUT_TIMER_KEY);

View File

@ -7,7 +7,7 @@ import Emoji from './message/Emoji';
import I18n from '../i18n';
import { CustomIcon } from '../lib/Icons';
import sharedStyles from '../views/Styles';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import { useTheme, withTheme } from '../theme';
import { TGetCustomEmoji } from '../definitions/IEmoji';
import { TMessageModel, ILoggedUser } from '../definitions';

View File

@ -3,7 +3,7 @@ import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import I18n from '../../i18n';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { MarkdownPreview } from '../markdown';
import RoomTypeIcon from '../RoomTypeIcon';
import { TUserStatus } from '../../definitions';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, ViewStyle } from 'react-native';
import { CustomIcon } from '../lib/Icons';
import { STATUS_COLORS, themes } from '../constants/colors';
import { STATUS_COLORS, themes } from '../lib/constants';
import Status from './Status/Status';
import { withTheme } from '../theme';
import { TUserStatus } from '../definitions';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, ViewProps } from 'react-native';
import { SafeAreaView as SafeAreaContext } from 'react-native-safe-area-context';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import { useTheme } from '../theme';
const styles = StyleSheet.create({

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text, TextInput as RNTextInput, TextInputProps, View } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import I18n from '../i18n';
import { CustomIcon } from '../lib/Icons';
import TextInput from '../presentation/TextInput';

View File

@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native';
import I18n from '../i18n';
import { useTheme } from '../theme';
import sharedStyles from '../views/Styles';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import TextInput from '../presentation/TextInput';
import { isIOS, isTablet } from '../utils/deviceInfo';
import { useOrientation } from '../dimensions';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleProp, TextStyle } from 'react-native';
import { CustomIcon } from '../../lib/Icons';
import { STATUS_COLORS } from '../../constants/colors';
import { STATUS_COLORS } from '../../lib/constants';
import { IStatus } from './definition';
const Status = React.memo(({ style, status = 'offline', size = 32, ...props }: Omit<IStatus, 'id'>) => {

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StatusBar as StatusBarRN } from 'react-native';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import { useTheme } from '../theme';
const supportedStyles = {

View File

@ -4,7 +4,7 @@ import Touchable from 'react-native-platform-touchable';
import sharedStyles from '../views/Styles';
import TextInput from '../presentation/TextInput';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import { CustomIcon } from '../lib/Icons';
import ActivityIndicator from './ActivityIndicator';

View File

@ -3,7 +3,7 @@ import { StyleSheet, Text, View, ViewStyle } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import { CustomIcon } from '../lib/Icons';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import sharedStyles from '../views/Styles';
import { useTheme } from '../theme';
import { TThreadModel } from '../definitions/IThread';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet } from 'react-native';
import EasyToast from 'react-native-easy-toast';
import { themes } from '../constants/colors';
import { themes } from '../lib/constants';
import sharedStyles from '../views/Styles';
import EventEmitter from '../utils/events';
import { withTheme } from '../theme';

View File

@ -10,7 +10,7 @@ import TextInput from '../TextInput';
import I18n from '../../i18n';
import EventEmitter from '../../utils/events';
import { useTheme } from '../../theme';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import Button from '../Button';
import sharedStyles from '../../views/Styles';
import RocketChat from '../../lib/rocketchat';

View File

@ -7,7 +7,7 @@ import moment from 'moment';
import Button from '../Button';
import { textParser } from './utils';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
import { CustomIcon } from '../../lib/Icons';
import { isAndroid } from '../../utils/deviceInfo';

View File

@ -3,7 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { IInput } from './interfaces';
const styles = StyleSheet.create({

View File

@ -3,7 +3,7 @@ import { Text, View } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import FastImage from '@rocket.chat/react-native-fast-image';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { textParser } from '../utils';
import { CustomIcon } from '../../../lib/Icons';
import styles from './styles';

View File

@ -3,7 +3,7 @@ import { Text, View } from 'react-native';
import Touchable from 'react-native-platform-touchable';
import { CustomIcon } from '../../../lib/Icons';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import ActivityIndicator from '../../ActivityIndicator';
import styles from './styles';

View File

@ -6,7 +6,7 @@ import FastImage from '@rocket.chat/react-native-fast-image';
import Check from '../../Check';
import * as List from '../../List';
import { textParser } from '../utils';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import styles from './styles';
import { IItemData } from '.';

View File

@ -15,7 +15,7 @@ import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
import Button from '../../Button';
import TextInput from '../../TextInput';
import { textParser } from '../utils';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import I18n from '../../../i18n';
import { isIOS } from '../../../utils/deviceInfo';
import { useTheme } from '../../../theme';

View File

@ -5,7 +5,7 @@ import Touchable from 'react-native-platform-touchable';
import { CustomIcon } from '../../lib/Icons';
import ActivityIndicator from '../ActivityIndicator';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
import { BUTTON_HIT_SLOP } from '../message/utils';
import * as List from '../List';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { IAccessoryComponent, IFields, ISection } from './interfaces';
import { useTheme } from '../../theme';

View File

@ -3,7 +3,7 @@ import { StyleSheet } from 'react-native';
import RNPickerSelect from 'react-native-picker-select';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { textParser } from './utils';
import { isAndroid, isIOS } from '../../utils/deviceInfo';

View File

@ -7,7 +7,7 @@ import Markdown, { MarkdownPreview } from '../markdown';
import Button from '../Button';
import TextInput from '../TextInput';
import { textParser, useBlockContext } from './utils';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import sharedStyles from '../../views/Styles';
import { Divider } from './Divider';
import { Section } from './Section';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { StyleProp, Text, TextStyle } from 'react-native';
import { useTheme } from '../../theme';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import styles from './styles';
import { events, logEvent } from '../../utils/log';
import { IUserMention } from './interfaces';

View File

@ -1,7 +1,7 @@
import React from 'react';
import { View } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import styles from './styles';
interface IBlockQuote {

View File

@ -3,7 +3,7 @@ import { Text } from 'react-native';
import shortnameToUnicode from '../../utils/shortnameToUnicode';
import CustomEmoji from '../EmojiPicker/CustomEmoji';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import styles from './styles';
interface IEmoji {

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StyleProp, Text, TextStyle } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { useTheme } from '../../theme';
import { IUserChannel } from './interfaces';
import styles from './styles';

View File

@ -3,7 +3,7 @@ import { Text } from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import styles from './styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { LISTENER } from '../Toast';
import EventEmitter from '../../utils/events';
import I18n from '../../i18n';

View File

@ -1,7 +1,7 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
const style = StyleSheet.create({
container: {

View File

@ -3,7 +3,7 @@ import { Text, TextStyle } from 'react-native';
import removeMarkdown from 'remove-markdown';
import shortnameToUnicode from '../../utils/shortnameToUnicode';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { formatText } from './formatText';
import { useTheme } from '../../theme';
import styles from './styles';

View File

@ -5,7 +5,7 @@ import { CELL_WIDTH } from './TableCell';
import styles from './styles';
import Navigation from '../../lib/navigation/appNavigation';
import I18n from '../../i18n';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
interface ITable {
children: React.ReactElement | null;

View File

@ -1,7 +1,7 @@
import React from 'react';
import { Text, View, ViewStyle } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import styles from './styles';
interface ITableCell {

View File

@ -1,7 +1,7 @@
import React from 'react';
import { View, ViewStyle } from 'react-native';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import styles from './styles';
interface ITableRow {

View File

@ -5,7 +5,6 @@ import Renderer from 'commonmark-react-renderer';
import { MarkdownAST } from '@rocket.chat/message-parser';
import I18n from '../../i18n';
import { themes } from '../../constants/colors';
import MarkdownLink from './Link';
import MarkdownList from './List';
import MarkdownListItem from './ListItem';
@ -24,6 +23,7 @@ import { formatText } from './formatText';
import { IUserMention, IUserChannel, TOnLinkPress } from './interfaces';
import { TGetCustomEmoji } from '../../definitions/IEmoji';
import { formatHyperlink } from './formatHyperlink';
import { themes } from '../../lib/constants';
export { default as MarkdownPreview } from './Preview';

View File

@ -3,7 +3,7 @@ import { Text } from 'react-native';
import { Code as CodeProps } from '@rocket.chat/message-parser';
import styles from '../styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
import CodeLine from './CodeLine';

View File

@ -3,7 +3,7 @@ import { Text } from 'react-native';
import { Emoji as EmojiProps } from '@rocket.chat/message-parser';
import shortnameToUnicode from '../../../utils/shortnameToUnicode';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
import styles from '../styles';
import CustomEmoji from '../../EmojiPicker/CustomEmoji';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Text } from 'react-native';
import { Heading as HeadingProps } from '@rocket.chat/message-parser';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import styles from '../styles';
import { useTheme } from '../../../theme';

View File

@ -5,7 +5,7 @@ import * as Progress from 'react-native-progress';
import FastImage from '@rocket.chat/react-native-fast-image';
import { useTheme } from '../../../theme';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import styles from '../../message/styles';
interface IImageProps {

View File

@ -3,7 +3,7 @@ import { Text } from 'react-native';
import { InlineCode as InlineCodeProps } from '@rocket.chat/message-parser';
import styles from '../styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IInlineCodeProps {

View File

@ -9,7 +9,7 @@ import { LISTENER } from '../../Toast';
import { useTheme } from '../../../theme';
import openLink from '../../../utils/openLink';
import EventEmitter from '../../../utils/events';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import Strike from './Strike';
import Italic from './Italic';
import Bold from './Bold';

View File

@ -4,7 +4,7 @@ import { OrderedList as OrderedListProps } from '@rocket.chat/message-parser';
import Inline from './Inline';
import styles from '../styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IOrderedListProps {

View File

@ -5,7 +5,7 @@ import { Paragraph as ParagraphProps } from '@rocket.chat/message-parser';
import Inline from './Inline';
import styles from '../styles';
import { useTheme } from '../../../theme';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
interface IParagraphProps {
value: ParagraphProps['value'];

View File

@ -4,7 +4,7 @@ import { Plain as PlainProps } from '@rocket.chat/message-parser';
import styles from '../styles';
import { useTheme } from '../../../theme';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
interface IPlainProps {
value: PlainProps['value'];

View File

@ -2,7 +2,7 @@ import React from 'react';
import { View } from 'react-native';
import { Quote as QuoteProps } from '@rocket.chat/message-parser';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
import styles from '../styles';
import Paragraph from './Paragraph';

View File

@ -4,7 +4,7 @@ import { Tasks as TasksProps } from '@rocket.chat/message-parser';
import Inline from './Inline';
import styles from '../styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface ITasksProps {

View File

@ -4,7 +4,7 @@ import { View, Text } from 'react-native';
import Inline from './Inline';
import styles from '../styles';
import { themes } from '../../../constants/colors';
import { themes } from '../../../lib/constants';
import { useTheme } from '../../../theme';
interface IUnorderedListProps {

View File

@ -14,7 +14,7 @@ import { useTheme } from '../../theme';
import { IAttachment } from '../../definitions';
import CollapsibleQuote from './Components/CollapsibleQuote';
import openLink from '../../utils/openLink';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
export type TElement = {
type: string;

View File

@ -11,7 +11,7 @@ import Touchable from './Touchable';
import Markdown from '../markdown';
import { CustomIcon } from '../../lib/Icons';
import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { isAndroid, isIOS } from '../../utils/deviceInfo';
import MessageContext from './Context';
import ActivityIndicator from '../ActivityIndicator';

View File

@ -6,7 +6,7 @@ import { CustomIcon } from '../../lib/Icons';
import styles from './styles';
import { BUTTON_HIT_SLOP } from './utils';
import I18n from '../../i18n';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import MessageContext from './Context';
import { IMessageBroadcast } from './interfaces';
import { useTheme } from '../../theme';

View File

@ -6,7 +6,7 @@ import { BUTTON_HIT_SLOP } from './utils';
import styles from './styles';
import I18n from '../../i18n';
import { CustomIcon } from '../../lib/Icons';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { IMessageCallButton } from './interfaces';
import { useTheme } from '../../theme';

View File

@ -3,7 +3,7 @@ import { dequal } from 'dequal';
import React, { useContext, useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { themes } from '../../../../constants/colors';
import { themes } from '../../../../lib/constants';
import { IAttachment } from '../../../../definitions/IAttachment';
import { TGetCustomEmoji } from '../../../../definitions/IEmoji';
import { CustomIcon } from '../../../../lib/Icons';

View File

@ -7,12 +7,11 @@ import styles from './styles';
import Markdown, { MarkdownPreview } from '../markdown';
import User from './User';
import { SYSTEM_MESSAGE_TYPES_WITH_AUTHOR_NAME, getInfoMessage } from './utils';
import { themes } from '../../constants/colors';
import MessageContext from './Context';
import Encrypted from './Encrypted';
import { E2E_MESSAGE_TYPE } from '../../lib/constants';
import { IMessageContent } from './interfaces';
import { useTheme } from '../../theme';
import { E2E_MESSAGE_TYPE, themes } from '../../lib/constants';
const Content = React.memo(
(props: IMessageContent) => {

View File

@ -7,7 +7,7 @@ import styles from './styles';
import I18n from '../../i18n';
import { CustomIcon } from '../../lib/Icons';
import { DISCUSSION } from './constants';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import MessageContext from './Context';
import { formatDateThreads } from '../../utils/room';
import { IMessage } from '../../definitions';

View File

@ -1,13 +1,12 @@
import React, { useContext } from 'react';
import Touchable from './Touchable';
import { E2E_MESSAGE_TYPE } from '../../lib/constants';
import { CustomIcon } from '../../lib/Icons';
import { themes } from '../../constants/colors';
import { BUTTON_HIT_SLOP } from './utils';
import MessageContext from './Context';
import styles from './styles';
import { useTheme } from '../../theme';
import { E2E_MESSAGE_TYPE, themes } from '../../lib/constants';
const Encrypted = React.memo(({ type }: { type: string }) => {
const { theme } = useTheme();

View File

@ -8,7 +8,7 @@ import * as Progress from 'react-native-progress';
import Touchable from './Touchable';
import Markdown from '../markdown';
import styles from './styles';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import MessageContext from './Context';
import { TGetCustomEmoji } from '../../definitions/IEmoji';
import { IAttachment } from '../../definitions';

View File

@ -17,7 +17,7 @@ import Discussion from './Discussion';
import Content from './Content';
import ReadReceipt from './ReadReceipt';
import CallButton from './CallButton';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import { IMessage, IMessageInner, IMessageTouchable } from './interfaces';
import { useTheme } from '../../theme';

View File

@ -4,7 +4,7 @@ import Touchable from './Touchable';
import { CustomIcon } from '../../lib/Icons';
import styles from './styles';
import { BUTTON_HIT_SLOP } from './utils';
import { themes } from '../../constants/colors';
import { themes } from '../../lib/constants';
import MessageContext from './Context';
import { useTheme } from '../../theme';

Some files were not shown because too many files have changed in this diff Show More