Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
acb76df
Chore: Migrate LivechatEditView to Typescript
reinaldonetof Nov 12, 2021
40ff437
refactor: minor tweak
AlexAlexandre Nov 16, 2021
bdf2820
Merge branch 'develop' into chore.ts-livechateditview
AlexAlexandre Nov 18, 2021
81d9794
refactor: fix the interfaces for input
AlexAlexandre Nov 18, 2021
abd9fbb
refactor: fix lint erros
AlexAlexandre Nov 18, 2021
b03f078
Merge branch 'develop' into chore.ts-livechateditview
gerzonc Dec 1, 2021
84fc5f4
Merge branch 'develop' into chore.ts-livechateditview
reinaldonetof Dec 2, 2021
3fbeffb
Merge branch 'develop' into chore.ts-livechateditview
diegolmello Dec 8, 2021
7ca1fed
minor tweak with new navigation types
reinaldonetof Dec 9, 2021
eb4916c
Merge branch 'develop' into chore.ts-livechateditview
gerzonc Dec 21, 2021
77d3f6a
function
reinaldonetof Dec 24, 2021
c7232d3
iroom tweak
reinaldonetof Dec 24, 2021
5326604
livechateditview tweak
reinaldonetof Dec 24, 2021
549eb2c
TextInput tweak
reinaldonetof Dec 24, 2021
3a4e7b9
Merge branch 'develop' into chore.ts-livechateditview
AlexAlexandre Jan 11, 2022
75848a7
refactor: update new types and interfaces for use ISubscription
AlexAlexandre Jan 11, 2022
c47c111
Merge branch 'develop' into chore.ts-livechateditview
reinaldonetof Jan 24, 2022
1a0655c
refactor to default useState type
reinaldonetof Jan 25, 2022
a7bdc55
Merge branch 'develop' into chore.ts-livechateditview
reinaldonetof Jan 26, 2022
6582cc0
Merge branch 'develop' into chore.ts-livechateditview
reinaldonetof Feb 4, 2022
ddc2432
Merge branch 'develop' into chore.ts-livechateditview
reinaldonetof Feb 4, 2022
2db152c
change the component name in SearchBox
reinaldonetof Feb 7, 2022
77e78fb
changed state type
reinaldonetof Feb 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions app/containers/SearchBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import React from 'react';
import { NativeSyntheticEvent, StyleSheet, Text, TextInputFocusEventData, TextInputProps, View } from 'react-native';
import {
NativeSyntheticEvent,
StyleSheet,
TextInput as RNTextInput,
Text,
TextInputFocusEventData,
TextInputProps,
View
} from 'react-native';
import Touchable from 'react-native-platform-touchable';

import TextInput from '../presentation/TextInput';
Expand Down Expand Up @@ -51,7 +59,7 @@ interface ISearchBox {
hasCancel?: boolean;
onCancelPress?: Function;
theme?: string;
inputRef?: React.Ref<unknown>;
inputRef?: React.Ref<RNTextInput>;
testID?: string;
onFocus?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
}
Expand Down
4 changes: 2 additions & 2 deletions app/containers/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { StyleProp, StyleSheet, Text, TextInputProps, TextStyle, View, ViewStyle } from 'react-native';
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';
Expand Down Expand Up @@ -59,7 +59,7 @@ export interface IRCTextInputProps extends TextInputProps {
loading?: boolean;
containerStyle?: StyleProp<ViewStyle>;
inputStyle?: StyleProp<TextStyle>;
inputRef?: React.Ref<unknown>;
inputRef?: React.Ref<RNTextInput>;
Comment thread
dnlsilva marked this conversation as resolved.
testID?: string;
iconLeft?: string;
iconRight?: string;
Expand Down
4 changes: 2 additions & 2 deletions app/containers/UIKit/MultiSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interface IMultiSelect {
context?: number;
loading?: boolean;
multiselect?: boolean;
onSearch: Function;
onClose: Function;
onSearch?: () => void;
onClose?: () => void;
inputStyle: object;
value?: any[];
disabled?: boolean | object;
Expand Down
5 changes: 5 additions & 0 deletions app/definitions/ITagsOmnichannel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface ITagsOmnichannel {
_id: string;
name: string;
departments: string[];
}
24 changes: 24 additions & 0 deletions app/definitions/IVisitor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export interface IVisitorEmail {
address: string;
}

export interface IVisitorPhone {
phoneNumber: string;
}

export interface IVisitor {
_id?: string;
token: string;
username: string;
updatedAt?: Date;
name: string;
department?: string;
phone?: IVisitorPhone[];
visitorEmails?: IVisitorEmail[];
customFields?: {
[key: string]: any;
};
livechatData: {
[key: string]: any;
};
}
2 changes: 1 addition & 1 deletion app/presentation/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface IThemedTextInput extends IRCTextInputProps {
theme: string;
}

const ThemedTextInput = React.forwardRef(({ style, theme, ...props }: IThemedTextInput, ref: any) => (
const ThemedTextInput = React.forwardRef<TextInput, IThemedTextInput>(({ style, theme, ...props }, ref) => (
<TextInput
ref={ref}
style={[{ color: themes[theme].titleText }, style, styles.input]}
Expand Down
6 changes: 3 additions & 3 deletions app/views/E2EEnterYourPasswordView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StackNavigationOptions } from '@react-navigation/stack';
import React from 'react';
import { ScrollView, StyleSheet, Text } from 'react-native';
import { ScrollView, StyleSheet, Text, TextInput as RNTextInput } from 'react-native';
import { connect } from 'react-redux';

import { encryptionDecodeKey } from '../actions/encryption';
Expand Down Expand Up @@ -37,7 +37,7 @@ interface IE2EEnterYourPasswordViewState {
type TE2EEnterYourPasswordViewProps = IBaseScreen<E2EEnterYourPasswordStackParamList, 'E2EEnterYourPasswordView'>;

class E2EEnterYourPasswordView extends React.Component<TE2EEnterYourPasswordViewProps, IE2EEnterYourPasswordViewState> {
private passwordInput?: TextInput;
private passwordInput?: RNTextInput;

static navigationOptions = ({ navigation }: Pick<TE2EEnterYourPasswordViewProps, 'navigation'>): StackNavigationOptions => ({
headerLeft: () => <HeaderButton.CloseModal navigation={navigation} testID='e2e-enter-your-password-view-close' />,
Expand Down Expand Up @@ -76,7 +76,7 @@ class E2EEnterYourPasswordView extends React.Component<TE2EEnterYourPasswordView
style={[styles.container, { backgroundColor: themes[theme].backgroundColor }]}
testID='e2e-enter-your-password-view'>
<TextInput
inputRef={(e: TextInput) => {
inputRef={(e: RNTextInput) => {
this.passwordInput = e;
}}
placeholder={I18n.t('Password')}
Expand Down
Loading