@acorex/components 21.0.2-next.19 → 21.0.2-next.20
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/conversation2/README.md +8 -6
- package/fesm2022/acorex-components-conversation2.mjs +6002 -3875
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +184 -166
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation2.d.ts +2421 -2304
- package/types/acorex-components-side-menu.d.ts +29 -33
package/conversation2/README.md
CHANGED
|
@@ -83,6 +83,7 @@ import {
|
|
|
83
83
|
AXIndexedDBUserApi,
|
|
84
84
|
AXIndexedDBConversationApi,
|
|
85
85
|
AXIndexedDBMessageApi,
|
|
86
|
+
AXConversationIndexedDbUploaderApi,
|
|
86
87
|
AXIndexedDBRealtimeApi,
|
|
87
88
|
} from '@acorex/components/conversation2';
|
|
88
89
|
|
|
@@ -92,12 +93,11 @@ export const appConfig: ApplicationConfig = {
|
|
|
92
93
|
userApi: AXIndexedDBUserApi,
|
|
93
94
|
conversationApi: AXIndexedDBConversationApi,
|
|
94
95
|
messageApi: AXIndexedDBMessageApi,
|
|
96
|
+
uploaderApi: AXConversationIndexedDbUploaderApi,
|
|
95
97
|
realtimeApi: AXIndexedDBRealtimeApi, // optional
|
|
96
98
|
config: {
|
|
97
99
|
messagePageSize: 50,
|
|
98
100
|
conversationPageSize: 30,
|
|
99
|
-
maxFileSize: 10 * 1024 * 1024,
|
|
100
|
-
allowedFileTypes: ['image/*', 'video/*', 'audio/*', 'application/pdf'],
|
|
101
101
|
},
|
|
102
102
|
registry: {
|
|
103
103
|
// Optional: Register custom message renderers, actions, etc.
|
|
@@ -188,6 +188,7 @@ provideConversation({
|
|
|
188
188
|
userApi: AXIndexedDBUserApi,
|
|
189
189
|
conversationApi: AXIndexedDBConversationApi,
|
|
190
190
|
messageApi: AXIndexedDBMessageApi,
|
|
191
|
+
uploaderApi: AXIndexedDBMediaUploaderApi,
|
|
191
192
|
realtimeApi: AXIndexedDBRealtimeApi,
|
|
192
193
|
});
|
|
193
194
|
```
|
|
@@ -208,6 +209,7 @@ provideConversation({
|
|
|
208
209
|
userApi: AXIndexedDBUserApi,
|
|
209
210
|
conversationApi: AXIndexedDBConversationApi,
|
|
210
211
|
messageApi: AXIndexedDBMessageAIApi,
|
|
212
|
+
uploaderApi: AXIndexedDBMediaUploaderApi,
|
|
211
213
|
realtimeApi: AXIndexedDBRealtimeApi,
|
|
212
214
|
});
|
|
213
215
|
```
|
|
@@ -224,9 +226,9 @@ interface AXConversationConfig {
|
|
|
224
226
|
infiniteScrollThreshold?: number; // Default: 200px
|
|
225
227
|
scrollThreshold?: number; // Default: 100px
|
|
226
228
|
|
|
227
|
-
// File
|
|
229
|
+
// File upload (fallback when action omits uploadConstraints fields)
|
|
228
230
|
maxFileSize?: number; // Default: 10MB
|
|
229
|
-
allowedFileTypes?: string[]; // Default:
|
|
231
|
+
allowedFileTypes?: string[]; // Default: image/*, video/*, audio/*, pdf, doc
|
|
230
232
|
|
|
231
233
|
// UI Behavior
|
|
232
234
|
messageHighlightDuration?: number; // Default: 2000ms
|
|
@@ -431,8 +433,8 @@ Supported message types out of the box:
|
|
|
431
433
|
|
|
432
434
|
**Issue**: File upload fails
|
|
433
435
|
|
|
434
|
-
- Check `maxFileSize`
|
|
435
|
-
- Verify
|
|
436
|
+
- Check `config.maxFileSize` / `config.allowedFileTypes` and per-action `uploadConstraints` (`allowedMimeTypes`, `minSize`, `maxSize`)
|
|
437
|
+
- Verify `uploaderApi` is provided and implements `AXUploaderApi.upload()` with progress and `AbortSignal` support
|
|
436
438
|
|
|
437
439
|
**Issue**: Styling issues
|
|
438
440
|
|