@developer_tribe/react-native-comnyx 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/arrow-right.png +0 -0
- package/lib/commonjs/assets/down.png +0 -0
- package/lib/commonjs/assets/info-circle.png +0 -0
- package/lib/commonjs/components/ChatList.js +97 -35
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/CustomAlert.js +15 -5
- package/lib/commonjs/components/CustomAlert.js.map +1 -1
- package/lib/commonjs/components/CustomerForm.js +13 -10
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/InitFailed.js +2 -0
- package/lib/commonjs/components/InitFailed.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +14 -14
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +6 -14
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/constants/activeOpacity.js +8 -0
- package/lib/commonjs/constants/activeOpacity.js.map +1 -0
- package/lib/commonjs/constants/translations.js +65 -45
- package/lib/commonjs/constants/translations.js.map +1 -1
- package/lib/commonjs/data/fake/messages.js +2 -0
- package/lib/commonjs/data/fake/messages.js.map +1 -1
- package/lib/commonjs/hooks/useThemeColors.js +1 -7
- package/lib/commonjs/hooks/useThemeColors.js.map +1 -1
- package/lib/commonjs/types/Theme.js +4 -2
- package/lib/commonjs/types/Theme.js.map +1 -1
- package/lib/module/assets/arrow-right.png +0 -0
- package/lib/module/assets/down.png +0 -0
- package/lib/module/assets/info-circle.png +0 -0
- package/lib/module/components/ChatList.js +98 -36
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/CustomAlert.js +15 -5
- package/lib/module/components/CustomAlert.js.map +1 -1
- package/lib/module/components/CustomerForm.js +13 -10
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/InitFailed.js +2 -0
- package/lib/module/components/InitFailed.js.map +1 -1
- package/lib/module/components/MessageInput.js +14 -14
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/components/MessageItem.js +6 -14
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/constants/activeOpacity.js +4 -0
- package/lib/module/constants/activeOpacity.js.map +1 -0
- package/lib/module/constants/translations.js +65 -45
- package/lib/module/constants/translations.js.map +1 -1
- package/lib/module/data/fake/messages.js +2 -0
- package/lib/module/data/fake/messages.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +2 -8
- package/lib/module/hooks/useThemeColors.js.map +1 -1
- package/lib/module/types/Theme.js +4 -2
- package/lib/module/types/Theme.js.map +1 -1
- package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CustomAlert.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CustomerForm.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/InitFailed.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MessageInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/constants/activeOpacity.d.ts +2 -0
- package/lib/typescript/commonjs/src/constants/activeOpacity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/translations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/data/fake/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useThemeColors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/Conversation.d.ts +6 -1
- package/lib/typescript/commonjs/src/types/Conversation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/LocalizationKeys.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/LocalizationKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/MessageResponse.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/MessageResponse.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/Theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/Theme.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CustomAlert.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CustomerForm.d.ts.map +1 -1
- package/lib/typescript/module/src/components/InitFailed.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MessageInput.d.ts.map +1 -1
- package/lib/typescript/module/src/constants/activeOpacity.d.ts +2 -0
- package/lib/typescript/module/src/constants/activeOpacity.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/translations.d.ts.map +1 -1
- package/lib/typescript/module/src/data/fake/messages.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useThemeColors.d.ts.map +1 -1
- package/lib/typescript/module/src/types/Conversation.d.ts +6 -1
- package/lib/typescript/module/src/types/Conversation.d.ts.map +1 -1
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts +2 -0
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts.map +1 -1
- package/lib/typescript/module/src/types/MessageResponse.d.ts +2 -0
- package/lib/typescript/module/src/types/MessageResponse.d.ts.map +1 -1
- package/lib/typescript/module/src/types/Theme.d.ts +1 -0
- package/lib/typescript/module/src/types/Theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/arrow-right.png +0 -0
- package/src/assets/down.png +0 -0
- package/src/assets/info-circle.png +0 -0
- package/src/components/ChatList.tsx +114 -40
- package/src/components/CustomAlert.tsx +24 -6
- package/src/components/CustomerForm.tsx +13 -9
- package/src/components/InitFailed.tsx +2 -0
- package/src/components/MessageInput.tsx +15 -16
- package/src/components/MessageItem.tsx +4 -12
- package/src/constants/activeOpacity.ts +1 -0
- package/src/constants/translations.ts +70 -44
- package/src/data/fake/messages.ts +2 -0
- package/src/hooks/useThemeColors.ts +2 -7
- package/src/types/Conversation.ts +3 -1
- package/src/types/LocalizationKeys.ts +2 -0
- package/src/types/MessageResponse.ts +2 -0
- package/src/types/Theme.ts +3 -0
|
@@ -30,7 +30,7 @@ export function MessageItem({
|
|
|
30
30
|
onShowPopup: () => void;
|
|
31
31
|
}) {
|
|
32
32
|
const themeColors = useThemeColors();
|
|
33
|
-
const isDeviceOwner =
|
|
33
|
+
const isDeviceOwner = !item.user && !item.bot;
|
|
34
34
|
const formattedDate = new Date(item.created_at).toLocaleTimeString([], {
|
|
35
35
|
hour: '2-digit',
|
|
36
36
|
minute: '2-digit',
|
|
@@ -102,7 +102,7 @@ export function MessageItem({
|
|
|
102
102
|
// A single line message with enough space for the timestamp
|
|
103
103
|
const isSingleLineWithSpace =
|
|
104
104
|
layoutRef.current.lines === 1 &&
|
|
105
|
-
layoutRef.current.lastLineWidth
|
|
105
|
+
layoutRef.current.lastLineWidth > layoutRef.current.totalWidth * 0.8;
|
|
106
106
|
|
|
107
107
|
// For multi-line messages, check if the last line has space
|
|
108
108
|
const isMultiLineWithSpace =
|
|
@@ -126,8 +126,8 @@ export function MessageItem({
|
|
|
126
126
|
style={[
|
|
127
127
|
styles.messageBubble,
|
|
128
128
|
isDeviceOwner
|
|
129
|
-
?
|
|
130
|
-
:
|
|
129
|
+
? { backgroundColor: themeColors.light_green }
|
|
130
|
+
: { backgroundColor: themeColors.ghost },
|
|
131
131
|
]}
|
|
132
132
|
>
|
|
133
133
|
<View
|
|
@@ -173,7 +173,6 @@ export function MessageItem({
|
|
|
173
173
|
|
|
174
174
|
const styles = ScaledSheet.create({
|
|
175
175
|
messageItem: {
|
|
176
|
-
marginVertical: '5@vs',
|
|
177
176
|
maxWidth: '80%',
|
|
178
177
|
minHeight: 60,
|
|
179
178
|
minWidth: 100,
|
|
@@ -189,12 +188,6 @@ const styles = ScaledSheet.create({
|
|
|
189
188
|
paddingHorizontal: '12@s',
|
|
190
189
|
borderRadius: '20@vs',
|
|
191
190
|
},
|
|
192
|
-
leftBubble: {
|
|
193
|
-
borderTopLeftRadius: 4,
|
|
194
|
-
},
|
|
195
|
-
rightBubble: {
|
|
196
|
-
borderTopRightRadius: 4,
|
|
197
|
-
},
|
|
198
191
|
inlineContainer: {
|
|
199
192
|
flexDirection: 'row',
|
|
200
193
|
justifyContent: 'space-between',
|
|
@@ -250,7 +243,6 @@ const styles = ScaledSheet.create({
|
|
|
250
243
|
width: '12@vs',
|
|
251
244
|
height: '12@vs',
|
|
252
245
|
marginLeft: '4@s',
|
|
253
|
-
tintColor: '#000000',
|
|
254
246
|
},
|
|
255
247
|
infoIcon: {
|
|
256
248
|
width: '12@vs',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const activeOpacity = 0.8;
|
|
@@ -3,11 +3,12 @@ import type { LanguageCode } from '../types/Language';
|
|
|
3
3
|
|
|
4
4
|
export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
5
5
|
en: {
|
|
6
|
-
'customer.form.title': '
|
|
7
|
-
'customer.form.
|
|
8
|
-
'customer.form.
|
|
6
|
+
'customer.form.title': 'Hello👋',
|
|
7
|
+
'customer.form.name': 'Your name',
|
|
8
|
+
'customer.form.email': 'Your e-mail address',
|
|
9
|
+
'customer.form.phone': 'Your phone number',
|
|
9
10
|
'customer.form.country': 'Country',
|
|
10
|
-
'customer.form.submit': '
|
|
11
|
+
'customer.form.submit': 'Contact Now',
|
|
11
12
|
'customer.form.error': 'Please fill in all required fields',
|
|
12
13
|
'customer.form.instructions':
|
|
13
14
|
'Complete the form below to receive personalized service',
|
|
@@ -18,7 +19,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
18
19
|
'customer.form.placeholder.country': 'Enter your country',
|
|
19
20
|
'customer.form.placeholder.email': 'Enter your email',
|
|
20
21
|
'customer.form.placeholder.phone': 'Enter your phone number',
|
|
21
|
-
'chat.messageInput.placeholder': '
|
|
22
|
+
'chat.messageInput.placeholder': 'Ask me a question...',
|
|
22
23
|
'app.initialization.required': 'Please initialize first',
|
|
23
24
|
'chat.load.error': 'Failed to load messages. Tap to retry',
|
|
24
25
|
'chat.init.error': 'Failed to initialize chat. Tap to retry',
|
|
@@ -38,7 +39,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
38
39
|
'customer.form.resend': 'Resend',
|
|
39
40
|
'chat.list-failed-message.title': 'Failed to send',
|
|
40
41
|
'chat.list-failed-message.description':
|
|
41
|
-
"The message couldn't be sent
|
|
42
|
+
"The message couldn't be sent. Please try again.",
|
|
42
43
|
'chat.list-cancel': 'Cancel',
|
|
43
44
|
'customer.form.failed.name': 'Wrong name',
|
|
44
45
|
'customer.form.failed.name.desc': 'Please fix your name.',
|
|
@@ -46,13 +47,15 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
46
47
|
'customer.form.failed.email.desc': 'Please fix your email.',
|
|
47
48
|
'customer.form.failed.phone': 'Wrong phone number',
|
|
48
49
|
'customer.form.failed.phone.desc': 'Please fix your phone number.',
|
|
50
|
+
'customer.form.cancel': 'Close',
|
|
49
51
|
},
|
|
50
52
|
tr: {
|
|
51
|
-
'customer.form.title': '
|
|
53
|
+
'customer.form.title': 'Merhaba👋',
|
|
54
|
+
'customer.form.name': 'Ad',
|
|
52
55
|
'customer.form.email': 'E-posta',
|
|
53
56
|
'customer.form.phone': 'Telefon',
|
|
54
57
|
'customer.form.country': 'Ülke',
|
|
55
|
-
'customer.form.submit': '
|
|
58
|
+
'customer.form.submit': 'Şimdi İletişime Geç',
|
|
56
59
|
'customer.form.error': 'Lütfen tüm zorunlu alanları doldurun',
|
|
57
60
|
'customer.form.instructions':
|
|
58
61
|
'Kişiselleştirilmiş hizmet almak için aşağıdaki formu doldurun',
|
|
@@ -63,7 +66,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
63
66
|
'customer.form.placeholder.country': 'Ülkenizi girin',
|
|
64
67
|
'customer.form.placeholder.email': 'E-posta adresinizi girin',
|
|
65
68
|
'customer.form.placeholder.phone': 'Telefon numaranızı girin',
|
|
66
|
-
'chat.messageInput.placeholder': '
|
|
69
|
+
'chat.messageInput.placeholder': 'Bana bir soru sorun...',
|
|
67
70
|
'app.initialization.required': 'Lütfen önce başlatın',
|
|
68
71
|
'chat.load.error': 'Mesajlar yüklenemedi. Tekrar denemek için dokunun',
|
|
69
72
|
'chat.init.error': 'Sohbet başlatılamadı. Tekrar denemek için dokunun',
|
|
@@ -91,13 +94,15 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
91
94
|
'customer.form.failed.email.desc': 'Lütfen e-posta adresinizi düzeltin.',
|
|
92
95
|
'customer.form.failed.phone': 'Yanlış telefon numarası',
|
|
93
96
|
'customer.form.failed.phone.desc': 'Lütfen telefon numaranızı düzeltin.',
|
|
97
|
+
'customer.form.cancel': 'Kapat',
|
|
94
98
|
},
|
|
95
99
|
es: {
|
|
96
|
-
'customer.form.title': '
|
|
100
|
+
'customer.form.title': 'Hola👋',
|
|
101
|
+
'customer.form.name': 'Nombre',
|
|
97
102
|
'customer.form.email': 'Correo Electrónico',
|
|
98
103
|
'customer.form.phone': 'Teléfono',
|
|
99
104
|
'customer.form.country': 'País',
|
|
100
|
-
'customer.form.submit': '
|
|
105
|
+
'customer.form.submit': 'Contactar Ahora',
|
|
101
106
|
'customer.form.error': 'Por favor complete todos los campos requeridos',
|
|
102
107
|
'customer.form.instructions':
|
|
103
108
|
'Complete el formulario a continuación para recibir un servicio personalizado',
|
|
@@ -108,7 +113,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
108
113
|
'customer.form.placeholder.country': 'Ingrese su país',
|
|
109
114
|
'customer.form.placeholder.email': 'Ingrese su correo electrónico',
|
|
110
115
|
'customer.form.placeholder.phone': 'Ingrese su número de teléfono',
|
|
111
|
-
'chat.messageInput.placeholder': '
|
|
116
|
+
'chat.messageInput.placeholder': 'Hazme una pregunta...',
|
|
112
117
|
'app.initialization.required': 'Por favor inicialice primero',
|
|
113
118
|
'chat.load.error': 'Error al cargar mensajes. Toque para reintentar',
|
|
114
119
|
'chat.init.error': 'Error al inicializar el chat. Toque para reintentar',
|
|
@@ -133,16 +138,20 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
133
138
|
'customer.form.failed.name': 'Nombre incorrecto',
|
|
134
139
|
'customer.form.failed.name.desc': 'Por favor corrija su nombre.',
|
|
135
140
|
'customer.form.failed.email': 'Correo electrónico incorrecto',
|
|
136
|
-
'customer.form.failed.email.desc':
|
|
141
|
+
'customer.form.failed.email.desc':
|
|
142
|
+
'Por favor corrija su correo electrónico.',
|
|
137
143
|
'customer.form.failed.phone': 'Número de teléfono incorrecto',
|
|
138
|
-
'customer.form.failed.phone.desc':
|
|
144
|
+
'customer.form.failed.phone.desc':
|
|
145
|
+
'Por favor corrija su número de teléfono.',
|
|
146
|
+
'customer.form.cancel': 'Cerrar',
|
|
139
147
|
},
|
|
140
148
|
fr: {
|
|
141
|
-
'customer.form.title': '
|
|
149
|
+
'customer.form.title': 'Bonjour👋',
|
|
150
|
+
'customer.form.name': 'Nom',
|
|
142
151
|
'customer.form.email': 'Email',
|
|
143
152
|
'customer.form.phone': 'Téléphone',
|
|
144
153
|
'customer.form.country': 'Pays',
|
|
145
|
-
'customer.form.submit': '
|
|
154
|
+
'customer.form.submit': 'Contacter Maintenant',
|
|
146
155
|
'customer.form.error': 'Veuillez remplir tous les champs obligatoires',
|
|
147
156
|
'customer.form.instructions':
|
|
148
157
|
'Complétez le formulaire ci-dessous pour recevoir un service personnalisé',
|
|
@@ -153,7 +162,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
153
162
|
'customer.form.placeholder.country': 'Entrez votre pays',
|
|
154
163
|
'customer.form.placeholder.email': 'Entrez votre email',
|
|
155
164
|
'customer.form.placeholder.phone': 'Entrez votre numéro de téléphone',
|
|
156
|
-
'chat.messageInput.placeholder': '
|
|
165
|
+
'chat.messageInput.placeholder': 'Posez-moi une question...',
|
|
157
166
|
'app.initialization.required': "Veuillez initialiser d'abord",
|
|
158
167
|
'chat.load.error':
|
|
159
168
|
'Échec du chargement des messages. Appuyez pour réessayer',
|
|
@@ -173,23 +182,26 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
173
182
|
'chat.live': 'Chat en Direct',
|
|
174
183
|
'chat.support-team': 'Équipe de Support',
|
|
175
184
|
'customer.form.resend': 'Renvoyer',
|
|
176
|
-
'chat.list-failed-message.title':
|
|
185
|
+
'chat.list-failed-message.title': "Échec de l'envoi",
|
|
177
186
|
'chat.list-failed-message.description':
|
|
178
|
-
|
|
187
|
+
"Le message n'a pas pu être envoyé. Veuillez réessayer.",
|
|
179
188
|
'chat.list-cancel': 'Annuler',
|
|
180
189
|
'customer.form.failed.name': 'Nom incorrect',
|
|
181
190
|
'customer.form.failed.name.desc': 'Veuillez corriger votre nom.',
|
|
182
191
|
'customer.form.failed.email': 'Email incorrect',
|
|
183
192
|
'customer.form.failed.email.desc': 'Veuillez corriger votre email.',
|
|
184
193
|
'customer.form.failed.phone': 'Numéro de téléphone incorrect',
|
|
185
|
-
'customer.form.failed.phone.desc':
|
|
194
|
+
'customer.form.failed.phone.desc':
|
|
195
|
+
'Veuillez corriger votre numéro de téléphone.',
|
|
196
|
+
'customer.form.cancel': 'Fermer',
|
|
186
197
|
},
|
|
187
198
|
de: {
|
|
188
|
-
'customer.form.title': '
|
|
199
|
+
'customer.form.title': 'Hallo👋',
|
|
200
|
+
'customer.form.name': 'Name',
|
|
189
201
|
'customer.form.email': 'E-Mail',
|
|
190
202
|
'customer.form.phone': 'Telefon',
|
|
191
203
|
'customer.form.country': 'Land',
|
|
192
|
-
'customer.form.submit': '
|
|
204
|
+
'customer.form.submit': 'Jetzt Kontaktieren',
|
|
193
205
|
'customer.form.error': 'Bitte füllen Sie alle erforderlichen Felder aus',
|
|
194
206
|
'customer.form.instructions':
|
|
195
207
|
'Füllen Sie das folgende Formular aus, um einen personalisierten Service zu erhalten',
|
|
@@ -200,7 +212,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
200
212
|
'customer.form.placeholder.country': 'Geben Sie Ihr Land ein',
|
|
201
213
|
'customer.form.placeholder.email': 'Geben Sie Ihre E-Mail-Adresse ein',
|
|
202
214
|
'customer.form.placeholder.phone': 'Geben Sie Ihre Telefonnummer ein',
|
|
203
|
-
'chat.messageInput.placeholder': '
|
|
215
|
+
'chat.messageInput.placeholder': 'Stellen Sie mir eine Frage...',
|
|
204
216
|
'app.initialization.required': 'Bitte initialisieren Sie zuerst',
|
|
205
217
|
'chat.load.error':
|
|
206
218
|
'Nachrichten konnten nicht geladen werden. Tippen Sie zum Wiederholen',
|
|
@@ -230,14 +242,17 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
230
242
|
'customer.form.failed.email': 'Falsche E-Mail',
|
|
231
243
|
'customer.form.failed.email.desc': 'Bitte korrigieren Sie Ihre E-Mail.',
|
|
232
244
|
'customer.form.failed.phone': 'Falsche Telefonnummer',
|
|
233
|
-
'customer.form.failed.phone.desc':
|
|
245
|
+
'customer.form.failed.phone.desc':
|
|
246
|
+
'Bitte korrigieren Sie Ihre Telefonnummer.',
|
|
247
|
+
'customer.form.cancel': 'Schließen',
|
|
234
248
|
},
|
|
235
249
|
it: {
|
|
236
|
-
'customer.form.title': '
|
|
250
|
+
'customer.form.title': 'Ciao👋',
|
|
251
|
+
'customer.form.name': 'Nome',
|
|
237
252
|
'customer.form.email': 'Email',
|
|
238
253
|
'customer.form.phone': 'Telefono',
|
|
239
254
|
'customer.form.country': 'Paese',
|
|
240
|
-
'customer.form.submit': '
|
|
255
|
+
'customer.form.submit': 'Contatta Ora',
|
|
241
256
|
'customer.form.error': 'Si prega di compilare tutti i campi obbligatori',
|
|
242
257
|
'customer.form.instructions':
|
|
243
258
|
'Completa il modulo sottostante per ricevere un servizio personalizzato',
|
|
@@ -248,7 +263,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
248
263
|
'customer.form.placeholder.country': 'Inserisci il tuo paese',
|
|
249
264
|
'customer.form.placeholder.email': 'Inserisci la tua email',
|
|
250
265
|
'customer.form.placeholder.phone': 'Inserisci il tuo numero di telefono',
|
|
251
|
-
'chat.messageInput.placeholder': '
|
|
266
|
+
'chat.messageInput.placeholder': 'Fammi una domanda...',
|
|
252
267
|
'app.initialization.required': 'Si prega di inizializzare prima',
|
|
253
268
|
'chat.load.error': 'Impossibile caricare i messaggi. Tocca per riprovare',
|
|
254
269
|
'chat.init.error': 'Impossibile inizializzare la chat. Tocca per riprovare',
|
|
@@ -275,14 +290,17 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
275
290
|
'customer.form.failed.email': 'Email errata',
|
|
276
291
|
'customer.form.failed.email.desc': 'Per favore correggi la tua email.',
|
|
277
292
|
'customer.form.failed.phone': 'Numero di telefono errato',
|
|
278
|
-
'customer.form.failed.phone.desc':
|
|
293
|
+
'customer.form.failed.phone.desc':
|
|
294
|
+
'Per favore correggi il tuo numero di telefono.',
|
|
295
|
+
'customer.form.cancel': 'Chiudi',
|
|
279
296
|
},
|
|
280
297
|
pt: {
|
|
281
|
-
'customer.form.title': '
|
|
298
|
+
'customer.form.title': 'Olá👋',
|
|
299
|
+
'customer.form.name': 'Nome',
|
|
282
300
|
'customer.form.email': 'Email',
|
|
283
301
|
'customer.form.phone': 'Telefone',
|
|
284
302
|
'customer.form.country': 'País',
|
|
285
|
-
'customer.form.submit': '
|
|
303
|
+
'customer.form.submit': 'Contactar Agora',
|
|
286
304
|
'customer.form.error': 'Por favor, preencha todos os campos obrigatórios',
|
|
287
305
|
'customer.form.instructions':
|
|
288
306
|
'Complete o formulário abaixo para receber um serviço personalizado',
|
|
@@ -293,7 +311,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
293
311
|
'customer.form.placeholder.country': 'Digite seu país',
|
|
294
312
|
'customer.form.placeholder.email': 'Digite seu email',
|
|
295
313
|
'customer.form.placeholder.phone': 'Digite seu número de telefone',
|
|
296
|
-
'chat.messageInput.placeholder': '
|
|
314
|
+
'chat.messageInput.placeholder': 'Faça-me uma pergunta...',
|
|
297
315
|
'app.initialization.required': 'Por favor, inicialize primeiro',
|
|
298
316
|
'chat.load.error':
|
|
299
317
|
'Falha ao carregar mensagens. Toque para tentar novamente',
|
|
@@ -322,14 +340,17 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
322
340
|
'customer.form.failed.email': 'Email incorreto',
|
|
323
341
|
'customer.form.failed.email.desc': 'Por favor, corrija seu email.',
|
|
324
342
|
'customer.form.failed.phone': 'Número de telefone incorreto',
|
|
325
|
-
'customer.form.failed.phone.desc':
|
|
343
|
+
'customer.form.failed.phone.desc':
|
|
344
|
+
'Por favor, corrija seu número de telefone.',
|
|
345
|
+
'customer.form.cancel': 'Fechar',
|
|
326
346
|
},
|
|
327
347
|
ru: {
|
|
328
|
-
'customer.form.title': '
|
|
348
|
+
'customer.form.title': 'Привет👋',
|
|
349
|
+
'customer.form.name': 'Имя',
|
|
329
350
|
'customer.form.email': 'Электронная почта',
|
|
330
351
|
'customer.form.phone': 'Телефон',
|
|
331
352
|
'customer.form.country': 'Страна',
|
|
332
|
-
'customer.form.submit': '
|
|
353
|
+
'customer.form.submit': 'Связаться Сейчас',
|
|
333
354
|
'customer.form.error': 'Пожалуйста, заполните все обязательные поля',
|
|
334
355
|
'customer.form.instructions':
|
|
335
356
|
'Заполните форму ниже, чтобы получить персонализированное обслуживание',
|
|
@@ -340,7 +361,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
340
361
|
'customer.form.placeholder.country': 'Введите вашу страну',
|
|
341
362
|
'customer.form.placeholder.email': 'Введите ваш email',
|
|
342
363
|
'customer.form.placeholder.phone': 'Введите ваш номер телефона',
|
|
343
|
-
'chat.messageInput.placeholder': '
|
|
364
|
+
'chat.messageInput.placeholder': 'Задайте мне вопрос...',
|
|
344
365
|
'app.initialization.required': 'Пожалуйста, сначала инициализируйте',
|
|
345
366
|
'chat.load.error':
|
|
346
367
|
'Не удалось загрузить сообщения. Нажмите, чтобы повторить попытку',
|
|
@@ -369,14 +390,17 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
369
390
|
'customer.form.failed.email': 'Неверный email',
|
|
370
391
|
'customer.form.failed.email.desc': 'Пожалуйста, исправьте ваш email.',
|
|
371
392
|
'customer.form.failed.phone': 'Неверный номер телефона',
|
|
372
|
-
'customer.form.failed.phone.desc':
|
|
393
|
+
'customer.form.failed.phone.desc':
|
|
394
|
+
'Пожалуйста, исправьте ваш номер телефона.',
|
|
395
|
+
'customer.form.cancel': 'Закрыть',
|
|
373
396
|
},
|
|
374
397
|
ja: {
|
|
375
|
-
'customer.form.title': '
|
|
398
|
+
'customer.form.title': 'こんにちは👋',
|
|
399
|
+
'customer.form.name': '名前',
|
|
376
400
|
'customer.form.email': 'メールアドレス',
|
|
377
401
|
'customer.form.phone': '電話番号',
|
|
378
402
|
'customer.form.country': '国',
|
|
379
|
-
'customer.form.submit': '
|
|
403
|
+
'customer.form.submit': '今すぐ連絡する',
|
|
380
404
|
'customer.form.error': '必須項目をすべて入力してください',
|
|
381
405
|
'customer.form.instructions':
|
|
382
406
|
'パーソナライズされたサービスを受けるには、以下のフォームに記入してください',
|
|
@@ -387,7 +411,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
387
411
|
'customer.form.placeholder.country': '国を入力してください',
|
|
388
412
|
'customer.form.placeholder.email': 'メールアドレスを入力してください',
|
|
389
413
|
'customer.form.placeholder.phone': '電話番号を入力してください',
|
|
390
|
-
'chat.messageInput.placeholder': '
|
|
414
|
+
'chat.messageInput.placeholder': '質問を入力してください...',
|
|
391
415
|
'app.initialization.required': 'まず初期化してください',
|
|
392
416
|
'chat.load.error': 'メッセージの読み込みに失敗しました。タップして再試行',
|
|
393
417
|
'chat.init.error': 'チャットの初期化に失敗しました。タップして再試行',
|
|
@@ -415,13 +439,15 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
415
439
|
'customer.form.failed.email.desc': 'メールアドレスを修正してください。',
|
|
416
440
|
'customer.form.failed.phone': '電話番号が間違っています',
|
|
417
441
|
'customer.form.failed.phone.desc': '電話番号を修正してください。',
|
|
442
|
+
'customer.form.cancel': '閉じる',
|
|
418
443
|
},
|
|
419
444
|
zh: {
|
|
420
|
-
'customer.form.title': '
|
|
445
|
+
'customer.form.title': '你好👋',
|
|
446
|
+
'customer.form.name': '姓名',
|
|
421
447
|
'customer.form.email': '电子邮件',
|
|
422
448
|
'customer.form.phone': '电话',
|
|
423
449
|
'customer.form.country': '国家',
|
|
424
|
-
'customer.form.submit': '
|
|
450
|
+
'customer.form.submit': '立即联系',
|
|
425
451
|
'customer.form.error': '请填写所有必填字段',
|
|
426
452
|
'customer.form.instructions': '填写以下表格以获取个性化服务',
|
|
427
453
|
'customer.form.error.country': '国家为必填项',
|
|
@@ -431,7 +457,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
431
457
|
'customer.form.placeholder.country': '请输入您的国家',
|
|
432
458
|
'customer.form.placeholder.email': '请输入您的电子邮件',
|
|
433
459
|
'customer.form.placeholder.phone': '请输入您的电话号码',
|
|
434
|
-
'chat.messageInput.placeholder': '
|
|
460
|
+
'chat.messageInput.placeholder': '向我提问...',
|
|
435
461
|
'app.initialization.required': '请先初始化',
|
|
436
462
|
'chat.load.error': '加载消息失败。点击重试',
|
|
437
463
|
'chat.init.error': '初始化聊天失败。点击重试',
|
|
@@ -446,8 +472,7 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
446
472
|
'chat.support-team': '支持团队',
|
|
447
473
|
'customer.form.resend': '重新发送',
|
|
448
474
|
'chat.list-failed-message.title': '发送失败',
|
|
449
|
-
'chat.list-failed-message.description':
|
|
450
|
-
'消息无法发送。请重试。',
|
|
475
|
+
'chat.list-failed-message.description': '消息无法发送。请重试。',
|
|
451
476
|
'chat.list-cancel': '取消',
|
|
452
477
|
'customer.form.failed.name': '名字错误',
|
|
453
478
|
'customer.form.failed.name.desc': '请修正您的名字。',
|
|
@@ -455,5 +480,6 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
455
480
|
'customer.form.failed.email.desc': '请修正您的电子邮件。',
|
|
456
481
|
'customer.form.failed.phone': '电话号码错误',
|
|
457
482
|
'customer.form.failed.phone.desc': '请修正您的电话号码。',
|
|
483
|
+
'customer.form.cancel': '关闭',
|
|
458
484
|
},
|
|
459
485
|
} as const;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { lightTheme, darkTheme, type ThemeColors } from '../types/Theme';
|
|
1
|
+
import { lightTheme, type ThemeColors } from '../types/Theme';
|
|
3
2
|
|
|
4
3
|
export function useThemeColors(): ThemeColors {
|
|
5
|
-
|
|
6
|
-
theme: s.theme,
|
|
7
|
-
}));
|
|
8
|
-
|
|
9
|
-
return theme === 'light' ? lightTheme : darkTheme;
|
|
4
|
+
return lightTheme;
|
|
10
5
|
}
|
|
@@ -2,7 +2,9 @@ export interface ConversationMessage {
|
|
|
2
2
|
id: number;
|
|
3
3
|
content: string;
|
|
4
4
|
created_at: string;
|
|
5
|
-
user
|
|
5
|
+
user?: any | null;
|
|
6
|
+
bot?: any | null;
|
|
7
|
+
customer?: { name: string; profile_photo_url: null } | null;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
export interface AppConversationMessage
|
package/src/types/Theme.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface ThemeColors {
|
|
|
17
17
|
ghost: string;
|
|
18
18
|
navy: string;
|
|
19
19
|
lavender: string;
|
|
20
|
+
silver: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export const lightTheme: ThemeColors = {
|
|
@@ -38,6 +39,7 @@ export const lightTheme: ThemeColors = {
|
|
|
38
39
|
ghost: '#EFEFEF',
|
|
39
40
|
navy: '#191A21',
|
|
40
41
|
lavender: '#E0E0E0',
|
|
42
|
+
silver: '#C7C7C7',
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
export const darkTheme: ThemeColors = {
|
|
@@ -59,6 +61,7 @@ export const darkTheme: ThemeColors = {
|
|
|
59
61
|
ghost: '#202129',
|
|
60
62
|
navy: '#F5F5F5',
|
|
61
63
|
lavender: '#262730',
|
|
64
|
+
silver: '#44454D',
|
|
62
65
|
};
|
|
63
66
|
|
|
64
67
|
export interface Theme {
|