Skip to content

Commit e83aad8

Browse files
zydemailzhangjiaoaliceaalicezhangnovlan1anlyyao
authored
feat(ChatRecord): add new component (#4474)
* feat: 支持ChatThinking组件content插槽自定义思考内容 * refactor: 为内容内部视图添加空数组类名参数保持结构一致 * Feature/add chat record (#4281) * feat: add chat-record component 新增chat-record 语音输入组件 * feat: 新增语音书输入插件 BREAKING CHANGE: 新增语音输入组件 * feat: 新增语音输入组件 * feat(chat-record 组件样式调整): chat-record 组件样式调整 * feat(chat-record 组件样式优化): chat-record 组件样式优化 * feat: 更新chat-record 组件文档 * feat: 更新chat-record 组件文档 * Feature/add uni record (#4318) * feat: tdesign-uniapp-chat 新增 chat-record 组件 tdesign-uniapp-chat 新增 chat-record 组件 * feat: chat-record 组件demo 补充 * feat: chat-record demo 样式调整 * feat(还原setting.json 文件配置,删除快码插件配置): 还原setting文件,删除快码插件配置 --------- Co-authored-by: Miya <1054055589@qq.com> * feat: 将senderType改为allowSpeech控制语音输入开关 * feat: 统一插槽命名并完善语音输入相关文档与属性 * Feature/add chat record (#4391) * feat: add chat-record component 新增chat-record 语音输入组件 * feat: 新增语音书输入插件 BREAKING CHANGE: 新增语音输入组件 * feat: 新增语音输入组件 * feat(chat-record 组件样式调整): chat-record 组件样式调整 * feat(chat-record 组件样式优化): chat-record 组件样式优化 * feat: 更新chat-record 组件文档 * feat: 更新chat-record 组件文档 * feat: chat-record 组件交互更改 * feat: chat-record 组件demo调整 * feat: chat-record 组件,麦克风权限相关问题修改 * feat: chat-record bug 修复 * feat(chat-record demo bug修复): chat-record demo 修复 * feat: chat-record 组件bug修复 * feat: 删除快码插件配置 * feat: 还原setting.json文件 * chat-record 组件更改 * fix(chat-record): 组件问题修复 * feat: 新增聊天发送示例并重构语音记录组件 * fix: chat-record demo 样式调整 * style(chat-record): 调整 chat-record 示例样式 * style(chat-record): 调整 chat-record 示例样式 * style(chat-sender): sender 组件record 示例样式调整 * style(chat-record): 语言输入组件样式调整 * feat(chat-record): chat-record demo 重构 * feat(chat-record): chat-record 组件国际化处理 * chore: 移除手动发送逻辑并自动发送识别文本, * style(chat-record): chat-record demo 样式调整 * style(chat-record): chat-record demo 动效调整 * feat: 代码优化 * 将tdesign-uniapp新增chat-record组件 * uni-app chat-reord 导入组件问题修复 * chat-record demo 样式调整 * feat: 优化allowSpeech * fix: 移除chat-sender组件的inputMode * refactor: 移除多余语音方法 * feat(chat-record): 新增语音识别完成、取消及错误回调事件 * feat: 文档优化 * feat: 补充chat-sender的插槽说明 * docs(ChatRecord): regenerate api docs * test: update snapshots * fix: fix lint * chore: update uniapp demo style * chore: update uniapp demo style * fix: code formatter * feat(Locale): update * feat: support adapter * chore: update demo * fix: fix cr * test: update snapshots * chore: stash changelog [ci skip] --------- Co-authored-by: CodeCarfter <43510057+zhangjiaoalice@users.noreply.github.com> Co-authored-by: aalicezhang <aalicezhang@tencent.com> Co-authored-by: 2640847812@qq.com <2640847812@qq.com> Co-authored-by: novlan1 <1576271227@qq.com> Co-authored-by: anlyyao <anly_yaw@163.com> Co-authored-by: tdesign-bot <tdesign@tencent.com>
1 parent ef43247 commit e83aad8

97 files changed

Lines changed: 6286 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/typos-config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ded = "ded"
77
destory ="destory"
88
nd = "nd"
99
loosing = "loosing"
10+
ba = "ba"
11+
Impossibile = "Impossibile"
1012

1113
[files]
1214
extend-exclude = [

.vscode/settings.json

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,29 @@
4646
"[typescript]": {
4747
"editor.defaultFormatter": "esbenp.prettier-vscode"
4848
},
49-
"cSpell.words": [
50-
"stylelint",
51-
"cascader",
52-
"tdesign",
53-
"uniapp",
54-
"backtop",
55-
"miniprogram"
56-
]
49+
"cSpell.words": ["stylelint", "cascader", "tdesign", "uniapp", "backtop", "miniprogram"],
50+
"terminal.integrated.profiles.linux": {
51+
"bash": {
52+
"path": "bash",
53+
"icon": "terminal-bash"
54+
},
55+
"zsh": {
56+
"path": "zsh"
57+
},
58+
"fish": {
59+
"path": "fish"
60+
},
61+
"tmux": {
62+
"path": "tmux",
63+
"icon": "terminal-tmux"
64+
},
65+
"pwsh": {
66+
"path": "pwsh",
67+
"icon": "terminal-powershell"
68+
},
69+
"supercode-sh": {
70+
"path": "/bin/zsh",
71+
"args": ["-l"]
72+
}
73+
}
5774
}

packages/common

Submodule common updated 56 files

packages/components/config-provider/__test__/__snapshots__/demo.test.js.snap

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@ exports[`ConfigProvider ConfigProvider chat-en demo works fine 1`] = `
5858
"share": "share",
5959
},
6060
},
61+
"chatRecord": Object {
62+
"authSettingFail": "Failed to get recording permission settings",
63+
"busyTip": "Recognizing, please wait...",
64+
"cancelText": "Cancel",
65+
"holdToTalk": "Hold to talk",
66+
"missingPluginTip": "Missing voice recognition plugin WechatSI",
67+
"openSettingFail": "Failed to open settings",
68+
"recognizeFailTip": "Voice recognition failed, please try again",
69+
"releaseToCancel": "Release to cancel",
70+
"releaseToSend": "Release to send, swipe up to cancel",
71+
"requestAuth": "Please authorize microphone permission",
72+
"sendText": "Send",
73+
"systemMicContent": "Detected that the phone system has disabled the microphone permission for \\"WeChat\\".
74+
75+
Please enable it in system settings:
76+
- iOS: Settings > WeChat > Microphone
77+
- Android: Settings > App Management > WeChat > Permissions > Microphone
78+
79+
After enabling, return to the Mini Program and try again.",
80+
"systemMicTitle": "Cannot use microphone",
81+
},
6182
"chatSender": Object {
6283
"placeholder": "please enter message...",
6384
"sendText": "send",
@@ -75,7 +96,7 @@ exports[`ConfigProvider ConfigProvider chat-en demo works fine 1`] = `
7596
"confirm": "Confirm",
7697
"dateLabel": "",
7798
"dayjsLocale": "en",
78-
"format": "YYYY-MM-DD",
99+
"format": "YYYY-MM-DD HH:mm:ss",
79100
"hourLabel": "",
80101
"minuteLabel": "",
81102
"monthLabel": "",
@@ -168,7 +189,12 @@ exports[`ConfigProvider ConfigProvider chat-en demo works fine 1`] = `
168189
"newsAriaLabel": "There is new news",
169190
},
170191
"table": Object {
192+
"clearFilterResultButtonText": "Clear",
193+
"confirmText": "Confirm",
171194
"empty": "Empty Data",
195+
"pullUpLoadingText": "Loading...",
196+
"resetText": "Reset",
197+
"searchResultText": "Search \\"{result}\\". Found no items. | Search \\"{result}\\". Found 1 item. | Search \\"{result}\\". Found {count} items.",
172198
},
173199
"typography": Object {
174200
"collapseText": "collapse",
@@ -335,6 +361,27 @@ exports[`ConfigProvider ConfigProvider upload-en demo works fine 1`] = `
335361
"share": "share",
336362
},
337363
},
364+
"chatRecord": Object {
365+
"authSettingFail": "Failed to get recording permission settings",
366+
"busyTip": "Recognizing, please wait...",
367+
"cancelText": "Cancel",
368+
"holdToTalk": "Hold to talk",
369+
"missingPluginTip": "Missing voice recognition plugin WechatSI",
370+
"openSettingFail": "Failed to open settings",
371+
"recognizeFailTip": "Voice recognition failed, please try again",
372+
"releaseToCancel": "Release to cancel",
373+
"releaseToSend": "Release to send, swipe up to cancel",
374+
"requestAuth": "Please authorize microphone permission",
375+
"sendText": "Send",
376+
"systemMicContent": "Detected that the phone system has disabled the microphone permission for \\"WeChat\\".
377+
378+
Please enable it in system settings:
379+
- iOS: Settings > WeChat > Microphone
380+
- Android: Settings > App Management > WeChat > Permissions > Microphone
381+
382+
After enabling, return to the Mini Program and try again.",
383+
"systemMicTitle": "Cannot use microphone",
384+
},
338385
"chatSender": Object {
339386
"placeholder": "please enter message...",
340387
"sendText": "send",
@@ -352,7 +399,7 @@ exports[`ConfigProvider ConfigProvider upload-en demo works fine 1`] = `
352399
"confirm": "Confirm",
353400
"dateLabel": "",
354401
"dayjsLocale": "en",
355-
"format": "YYYY-MM-DD",
402+
"format": "YYYY-MM-DD HH:mm:ss",
356403
"hourLabel": "",
357404
"minuteLabel": "",
358405
"monthLabel": "",
@@ -445,7 +492,12 @@ exports[`ConfigProvider ConfigProvider upload-en demo works fine 1`] = `
445492
"newsAriaLabel": "There is new news",
446493
},
447494
"table": Object {
495+
"clearFilterResultButtonText": "Clear",
496+
"confirmText": "Confirm",
448497
"empty": "Empty Data",
498+
"pullUpLoadingText": "Loading...",
499+
"resetText": "Reset",
500+
"searchResultText": "Search \\"{result}\\". Found no items. | Search \\"{result}\\". Found 1 item. | Search \\"{result}\\". Found {count} items.",
449501
},
450502
"typography": Object {
451503
"collapseText": "collapse",

packages/components/locale/ar_KW.ts

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
confirm: 'أكد',
1111
title: 'انتقِ التاريخ',
1212
weekdays: ['يوم الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
13-
monthTitle: '{شهر واحد} {سنة واحدة}',
13+
monthTitle: '{month} {year}',
1414
months: [
1515
'يناير',
1616
'فبراير',
@@ -41,7 +41,7 @@ export default {
4141
title: 'انتقِ التاريخ',
4242
cancel: 'الإلغاء',
4343
confirm: 'أكد',
44-
format: 'DD-MM-YYYY',
44+
format: 'DD-MM-YYYY HH:mm:ss',
4545
months: [
4646
'يناير',
4747
'فبراير',
@@ -80,6 +80,7 @@ export default {
8080
boolean: '${name} ليس منطقيًا',
8181
number: 'يجب أن يكون ${name} رقمًا',
8282
},
83+
colonText: ':',
8384
},
8485
picker: {
8586
cancel: 'الإلغاء',
@@ -90,17 +91,22 @@ export default {
9091
},
9192
rate: {
9293
texts: ['سيء', 'مخيب', 'عادي', 'جيد', 'ممتاز'],
93-
valueText: '{القيمة} نتيجة',
94+
valueText: '{value} نقطة',
9495
noValueText: 'لا توجد نقاط',
9596
},
9697
tabBar: {
9798
newsAriaLabel: 'هناك أخبار جديدة',
98-
moreNewsAriaLabel: 'هناك الكثير من الأخبار السيئة',
99-
haveMoreNewsAriaLabel: 'هناك { قيمة }+ أخبار',
100-
haveNewsAriaLabel: 'هناك { قيمة } أخبار',
99+
moreNewsAriaLabel: 'هناك الكثير من الأخبار',
100+
haveMoreNewsAriaLabel: 'هناك {value}+ أخبار',
101+
haveNewsAriaLabel: 'هناك {value} أخبار',
101102
},
102103
table: {
103104
empty: 'البيانات الفارغة',
105+
confirmText: 'نعم',
106+
resetText: 'إعادة ضبط',
107+
searchResultText: "تم العثور على بحث '{result}' و{count} من العناصر.",
108+
clearFilterResultButtonText: 'صافي',
109+
pullUpLoadingText: 'جاري التحميل',
104110
},
105111
list: {
106112
loading: 'التحميل...',
@@ -115,6 +121,7 @@ export default {
115121
waitingText: 'الانتظار',
116122
failText: 'فشل',
117123
successText: 'النجاح',
124+
reloadText: 'إعادة الرفع',
118125
},
119126
},
120127
guide: {
@@ -149,6 +156,26 @@ export default {
149156
quote: 'اقتباس',
150157
},
151158
},
159+
chatRecord: {
160+
holdToTalk: 'اضغط مع الاستمرار للتحدث',
161+
requestAuth: 'يرجى منح إذن الميكروفون',
162+
releaseToCancel: 'اترك للإلغاء',
163+
releaseToSend: 'اترك للإرسال، اسحب للأعلى للإلغاء',
164+
cancelText: 'إلغاء',
165+
sendText: 'إرسال',
166+
busyTip: 'جارٍ التعرّف، يرجى الانتظار…',
167+
recognizeFailTip: 'فشل التعرّف على التسجيل، يرجى المحاولة مرة أخرى',
168+
missingPluginTip: 'إضافة التعرّف على الصوت WechatSI مفقودة',
169+
authSettingFail: 'فشل الحصول على إعدادات إذن التسجيل',
170+
openSettingFail: 'فشل فتح الإعدادات',
171+
systemMicTitle: 'لا يمكن استخدام الميكروفون',
172+
systemMicContent:
173+
'تم اكتشاف أن نظام الهاتف قد أوقف إذن الميكروفون لتطبيق "WeChat".\n\n' +
174+
'يرجى تفعيله من إعدادات النظام:\n' +
175+
'- iOS: الإعدادات > WeChat > الميكروفون\n' +
176+
'- Android: الإعدادات > إدارة التطبيقات > WeChat > الأذونات > الميكروفون\n\n' +
177+
'بعد التفعيل، عد إلى البرنامج المصغّر وحاول مرة أخرى.',
178+
},
152179
chatSender: {
153180
placeholder: 'الرجاء إدخال الرسالة...',
154181
sendText: 'إرسال',

packages/components/locale/en_US.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
title: 'Select Date',
4242
cancel: 'Cancel',
4343
confirm: 'Confirm',
44-
format: 'YYYY-MM-DD',
44+
format: 'YYYY-MM-DD HH:mm:ss',
4545
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
4646
yearLabel: '',
4747
monthLabel: '',
@@ -89,6 +89,12 @@ export default {
8989
},
9090
table: {
9191
empty: 'Empty Data',
92+
confirmText: 'Confirm',
93+
resetText: 'Reset',
94+
searchResultText:
95+
'Search "{result}". Found no items. | Search "{result}". Found 1 item. | Search "{result}". Found {count} items.',
96+
clearFilterResultButtonText: 'Clear',
97+
pullUpLoadingText: 'Loading...',
9298
},
9399
list: {
94100
loading: 'Loading...',
@@ -138,6 +144,26 @@ export default {
138144
quote: 'quote',
139145
},
140146
},
147+
chatRecord: {
148+
holdToTalk: 'Hold to talk',
149+
requestAuth: 'Please authorize microphone permission',
150+
releaseToCancel: 'Release to cancel',
151+
releaseToSend: 'Release to send, swipe up to cancel',
152+
cancelText: 'Cancel',
153+
sendText: 'Send',
154+
busyTip: 'Recognizing, please wait...',
155+
recognizeFailTip: 'Voice recognition failed, please try again',
156+
missingPluginTip: 'Missing voice recognition plugin WechatSI',
157+
authSettingFail: 'Failed to get recording permission settings',
158+
openSettingFail: 'Failed to open settings',
159+
systemMicTitle: 'Cannot use microphone',
160+
systemMicContent:
161+
'Detected that the phone system has disabled the microphone permission for "WeChat".\n\n' +
162+
'Please enable it in system settings:\n' +
163+
'- iOS: Settings > WeChat > Microphone\n' +
164+
'- Android: Settings > App Management > WeChat > Permissions > Microphone\n\n' +
165+
'After enabling, return to the Mini Program and try again.',
166+
},
141167
chatSender: {
142168
placeholder: 'please enter message...',
143169
sendText: 'send',

packages/components/locale/it_IT.ts

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
confirm: 'Conferma',
1111
title: 'Seleziona Data',
1212
weekdays: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
13-
monthTitle: '{mese} {anno}',
13+
monthTitle: '{month} {year}',
1414
months: [
1515
'Gennaio',
1616
'Febbraio',
@@ -41,7 +41,7 @@ export default {
4141
title: 'Seleziona Data',
4242
cancel: 'Annulla',
4343
confirm: 'Conferma',
44-
format: 'DD-MM-YYYY',
44+
format: 'DD-MM-YYYY HH:mm:ss',
4545
months: ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'],
4646
yearLabel: 'Anno',
4747
monthLabel: 'Mese',
@@ -78,17 +78,22 @@ export default {
7878
},
7979
rate: {
8080
texts: ['Pessimo', 'Scarso', 'Normale', 'Buono', 'Eccellente'],
81-
valueText: '{valore} punteggio',
81+
valueText: '{value} punteggio',
8282
noValueText: 'Nessun punteggio',
8383
},
8484
tabBar: {
8585
newsAriaLabel: 'Ci sono nuove notizie',
8686
moreNewsAriaLabel: 'Ci sono molte notizie',
87-
haveMoreNewsAriaLabel: 'Ci sono {valore}+ notizie',
88-
haveNewsAriaLabel: 'Ci sono {valore} notizie',
87+
haveMoreNewsAriaLabel: 'Ci sono {value}+ notizie',
88+
haveNewsAriaLabel: 'Ci sono {value} notizie',
8989
},
9090
table: {
9191
empty: 'Dati Vuoti',
92+
confirmText: 'Conferma',
93+
resetText: 'Ripristina',
94+
searchResultText: 'Ricerca "{result}", trovati {count} risultati',
95+
clearFilterResultButtonText: 'Pulisci il filtro',
96+
pullUpLoadingText: 'In carica',
9297
},
9398
list: {
9499
loading: 'Caricamento...',
@@ -103,6 +108,7 @@ export default {
103108
waitingText: 'Attesa',
104109
failText: 'Fallito',
105110
successText: 'Successo',
111+
reloadText: 'Ricarica',
106112
},
107113
},
108114
guide: {
@@ -137,6 +143,26 @@ export default {
137143
quote: 'Cita',
138144
},
139145
},
146+
chatRecord: {
147+
holdToTalk: 'Tieni premuto per parlare',
148+
requestAuth: 'Autorizza il permesso del microfono',
149+
releaseToCancel: 'Rilascia per annullare',
150+
releaseToSend: 'Rilascia per inviare, scorri su per annullare',
151+
cancelText: 'Annulla',
152+
sendText: 'Invia',
153+
busyTip: 'Riconoscimento in corso, attendere…',
154+
recognizeFailTip: 'Riconoscimento vocale non riuscito, riprova',
155+
missingPluginTip: 'Plugin di riconoscimento vocale WechatSI mancante',
156+
authSettingFail: 'Impossibile ottenere le impostazioni del permesso di registrazione',
157+
openSettingFail: 'Impossibile aprire le impostazioni',
158+
systemMicTitle: 'Impossibile usare il microfono',
159+
systemMicContent:
160+
'È stato rilevato che il sistema del telefono ha disabilitato il permesso del microfono per "WeChat".\n\n' +
161+
'Abilitalo nelle impostazioni di sistema:\n' +
162+
'- iOS: Impostazioni > WeChat > Microfono\n' +
163+
'- Android: Impostazioni > Gestione app > WeChat > Autorizzazioni > Microfono\n\n' +
164+
'Dopo averlo abilitato, torna al Mini Program e riprova.',
165+
},
140166
chatSender: {
141167
placeholder: 'Inserisci il messaggio...',
142168
sendText: 'Invia',

0 commit comments

Comments
 (0)