@fle-ui/plus-im-record 0.0.8-beta.0 → 0.0.8-beta.1

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.
Files changed (79) hide show
  1. package/es/@types/index.d.ts +620 -0
  2. package/es/CardTag/index.d.ts +3 -0
  3. package/es/CardTag/index.js +18 -0
  4. package/es/ChatMessageItem/index.d.ts +15 -0
  5. package/es/ChatMessageItem/index.js +130 -0
  6. package/es/ChatMessageItem/index.less +108 -0
  7. package/es/ChatMessageList/index.d.ts +28 -0
  8. package/es/ChatMessageList/index.js +58 -0
  9. package/es/ChatMessageList/index.less +34 -0
  10. package/es/GoodsCard/index.d.ts +15 -0
  11. package/es/GoodsCard/index.js +95 -0
  12. package/es/GoodsCard/index.less +49 -0
  13. package/es/GoodsOrderCard/index.d.ts +14 -0
  14. package/es/GoodsOrderCard/index.js +161 -0
  15. package/es/GoodsOrderCard/index.less +81 -0
  16. package/es/Icon/index.d.ts +8 -0
  17. package/es/Icon/index.js +11 -0
  18. package/es/ParseSession/AudioPlayer.d.ts +14 -0
  19. package/es/ParseSession/AudioPlayer.js +89 -0
  20. package/es/ParseSession/audioAndVideoTool.d.ts +3 -0
  21. package/es/ParseSession/audioAndVideoTool.js +21 -0
  22. package/es/ParseSession/index.d.ts +15 -0
  23. package/es/ParseSession/index.js +492 -0
  24. package/es/ParseSession/index.less +226 -0
  25. package/es/api/index.d.ts +30 -0
  26. package/es/api/index.js +48 -0
  27. package/es/audioAndVideoTool.d.ts +3 -0
  28. package/es/audioAndVideoTool.js +21 -0
  29. package/es/common/const/index.d.ts +46 -0
  30. package/es/common/const/index.js +82 -0
  31. package/es/common/utils/index.d.ts +33 -0
  32. package/es/common/utils/index.js +169 -0
  33. package/es/index.d.ts +28 -0
  34. package/es/index.js +77 -0
  35. package/es/styles/extends.less +50 -0
  36. package/es/styles/index.less +35 -0
  37. package/es/styles/vars.less +8 -0
  38. package/es/utils/index.d.ts +14 -0
  39. package/es/utils/index.js +50 -0
  40. package/lib/@types/index.d.ts +620 -0
  41. package/lib/CardTag/index.d.ts +3 -0
  42. package/lib/CardTag/index.js +25 -0
  43. package/lib/ChatMessageItem/index.d.ts +15 -0
  44. package/lib/ChatMessageItem/index.js +136 -0
  45. package/lib/ChatMessageItem/index.less +108 -0
  46. package/lib/ChatMessageList/index.d.ts +28 -0
  47. package/lib/ChatMessageList/index.js +65 -0
  48. package/lib/ChatMessageList/index.less +34 -0
  49. package/lib/GoodsCard/index.d.ts +15 -0
  50. package/lib/GoodsCard/index.js +105 -0
  51. package/lib/GoodsCard/index.less +49 -0
  52. package/lib/GoodsOrderCard/index.d.ts +14 -0
  53. package/lib/GoodsOrderCard/index.js +169 -0
  54. package/lib/GoodsOrderCard/index.less +81 -0
  55. package/lib/Icon/index.d.ts +8 -0
  56. package/lib/Icon/index.js +18 -0
  57. package/lib/ParseSession/AudioPlayer.d.ts +14 -0
  58. package/lib/ParseSession/AudioPlayer.js +98 -0
  59. package/lib/ParseSession/audioAndVideoTool.d.ts +3 -0
  60. package/lib/ParseSession/audioAndVideoTool.js +27 -0
  61. package/lib/ParseSession/index.d.ts +15 -0
  62. package/lib/ParseSession/index.js +494 -0
  63. package/lib/ParseSession/index.less +226 -0
  64. package/lib/api/index.d.ts +30 -0
  65. package/lib/api/index.js +55 -0
  66. package/lib/audioAndVideoTool.d.ts +3 -0
  67. package/lib/audioAndVideoTool.js +27 -0
  68. package/lib/common/const/index.d.ts +46 -0
  69. package/lib/common/const/index.js +88 -0
  70. package/lib/common/utils/index.d.ts +33 -0
  71. package/lib/common/utils/index.js +183 -0
  72. package/lib/index.d.ts +28 -0
  73. package/lib/index.js +86 -0
  74. package/lib/styles/extends.less +50 -0
  75. package/lib/styles/index.less +35 -0
  76. package/lib/styles/vars.less +8 -0
  77. package/lib/utils/index.d.ts +14 -0
  78. package/lib/utils/index.js +56 -0
  79. package/package.json +2 -2
@@ -0,0 +1,620 @@
1
+ export declare enum EMsgStatus {
2
+ /**
3
+ * @Multi_Lang_Tag
4
+ * @locale cn
5
+ * 收到对方发送的消息,默认(己方未读)
6
+ * @locale
7
+ *
8
+ * @locale en
9
+ * Received the message sent by the other party. The message is unread by the receiver by default.
10
+ * @locale
11
+ */
12
+ unread = 1,
13
+ /**
14
+ * @Multi_Lang_Tag
15
+ * @locale cn
16
+ * 收到对方发送的消息,己方已读
17
+ * @locale
18
+ *
19
+ * @locale en
20
+ * Received the message sent by the other party. The receiver has read it.
21
+ * @locale
22
+ */
23
+ read = 2,
24
+ /**
25
+ * @Multi_Lang_Tag
26
+ * @locale cn
27
+ * 已删
28
+ * @locale
29
+ *
30
+ * @locale en
31
+ * Deleted
32
+ * @locale
33
+ */
34
+ deleted = 3,
35
+ /**
36
+ * @Multi_Lang_Tag
37
+ * @locale cn
38
+ * 发送中
39
+ * @locale
40
+ *
41
+ * @locale en
42
+ * Sending…
43
+ * @locale
44
+ */
45
+ sending = 4,
46
+ /**
47
+ * @Multi_Lang_Tag
48
+ * @locale cn
49
+ * 发送失败
50
+ * 失败的情况可能又很多种,最常见于网络问题。
51
+ * @locale
52
+ *
53
+ * @locale en
54
+ * Sending failed.
55
+ * Multiple situations will lead to failure. The most common causes are network problems.
56
+ * @locale
57
+ */
58
+ sendFailed = 5,
59
+ /**
60
+ * @Multi_Lang_Tag
61
+ * @locale cn
62
+ * 已发送完毕
63
+ * @locale
64
+ *
65
+ * @locale en
66
+ * Sent
67
+ * @locale
68
+ */
69
+ sent = 6,
70
+ /**
71
+ * @Multi_Lang_Tag
72
+ * @locale cn
73
+ * 对方已读发送的内容
74
+ * @locale
75
+ *
76
+ * @locale en
77
+ * The other party has read the message.
78
+ * @locale
79
+ */
80
+ receipt = 7,
81
+ /**
82
+ * @Multi_Lang_Tag
83
+ * @locale cn
84
+ * 被对方拒绝,比如被对方加入黑名单
85
+ * @locale
86
+ *
87
+ * @locale en
88
+ * Rejected by the other party for reasons such as being blocklisted by the other party.
89
+ * @locale
90
+ */
91
+ refused = 10,
92
+ }
93
+
94
+ export declare enum EMsgScene {
95
+ p2p = 0,
96
+ team = 1,
97
+ superTeam = 5,
98
+ }
99
+ export declare enum EClientType {
100
+ Android = 1,
101
+ iOS = 2,
102
+ PC = 4,
103
+ WindowsPhone = 8,
104
+ Web = 16,
105
+ Server = 32,
106
+ Mac = 64,
107
+ }
108
+ export declare enum EMsgType {
109
+ text = 0,
110
+ image = 1,
111
+ audio = 2,
112
+ video = 3,
113
+ geo = 4,
114
+ notification = 5,
115
+ file = 6,
116
+ tip = 10,
117
+ robot = 11,
118
+ g2 = 12,
119
+ custom = 100,
120
+ }
121
+ export declare enum EMsgFeature {
122
+ /**
123
+ * @Multi_Lang_Tag
124
+ * @locale cn
125
+ * 默认
126
+ * @locale
127
+ *
128
+ * @locale en
129
+ * Default
130
+ * @locale
131
+ */
132
+ default = 0,
133
+ /**
134
+ * @Multi_Lang_Tag
135
+ * @locale cn
136
+ * 离线消息
137
+ * @locale
138
+ *
139
+ * @locale en
140
+ * Offline messages
141
+ * @locale
142
+ */
143
+ leave = 1,
144
+ /**
145
+ * @Multi_Lang_Tag
146
+ * @locale cn
147
+ * 漫游消息
148
+ *
149
+ * @locale
150
+ *
151
+ * @locale en
152
+ * Roaming messages
153
+ * @locale
154
+ */
155
+ roam = 2,
156
+ /**
157
+ * @Multi_Lang_Tag
158
+ * @locale cn
159
+ * 同步消息
160
+ * @locale
161
+ *
162
+ * @locale en
163
+ * Sync messages
164
+ * @locale
165
+ */
166
+ /**
167
+ * 透传消息
168
+ */
169
+ }
170
+ export declare type TMsgFeature = keyof typeof EMsgFeature;
171
+ export declare type TMsgType = keyof typeof EMsgType;
172
+ export declare type TClientType = keyof typeof EClientType;
173
+ export declare type TMsgScene = keyof typeof EMsgScene;
174
+ export declare type TMsgStatus = keyof typeof EMsgStatus;
175
+ export interface StrAnyObj {
176
+ [key: string]: any;
177
+ }
178
+
179
+ export interface TMsgSetting {
180
+ /**
181
+ * @Multi_Lang_Tag
182
+ * @locale cn
183
+ * 是否为重发的消息
184
+ * @locale
185
+ *
186
+ * @locale en
187
+ * Whether it is resent
188
+ * @locale
189
+ */
190
+ resendFlag?: boolean;
191
+ /**
192
+ * @Multi_Lang_Tag
193
+ * @locale cn
194
+ * (可选) 指向自定义抄送的配置
195
+ * @locale
196
+ *
197
+ * @locale en
198
+ * (optional) custom data sync configuration
199
+ * @locale
200
+ */
201
+ envConfig?: string;
202
+ /**
203
+ * @Multi_Lang_Tag
204
+ * @locale cn
205
+ * 是否存云端消息历史,缺省则 true
206
+ * @locale
207
+ *
208
+ * @locale en
209
+ * Whether to store historical messages on the cloud (default value: true)
210
+ * @locale
211
+ */
212
+ needSaveHistory?: boolean;
213
+ /**
214
+ * @Multi_Lang_Tag
215
+ * @locale cn
216
+ * 该消息是否支持漫游 缺省则 true
217
+ * @locale
218
+ *
219
+ * @locale en
220
+ * Whether the message supports roaming (default value: true)
221
+ * @locale
222
+ */
223
+ needRoaming?: boolean;
224
+ /**
225
+ * @Multi_Lang_Tag
226
+ * @locale cn
227
+ * 是否支持离线消息,缺省则 true
228
+ * @locale
229
+ *
230
+ * @locale en
231
+ * Whether to support offline messages (default value: true)
232
+ * @locale
233
+ */
234
+ needOffline?: boolean;
235
+ /**
236
+ * @Multi_Lang_Tag
237
+ * @locale cn
238
+ * 该消息是否支持发送者多端同步
239
+ * @locale
240
+ *
241
+ * @locale en
242
+ * Whether the message supports multi-device synchronization for the sender
243
+ * @locale
244
+ */
245
+ needSelfSync?: boolean;
246
+ /**
247
+ * @Multi_Lang_Tag
248
+ * @locale cn
249
+ * 是否要抄送
250
+ * @locale
251
+ *
252
+ * @locale en
253
+ * Whether the server’s conversation list needs to be refreshed (0: No, 1: Yes; default value: 1; this parameter will be determined only when offline messages are stored).
254
+ * @locale
255
+ */
256
+ needRouted?: boolean;
257
+ /**
258
+ * @Multi_Lang_Tag
259
+ * @locale cn
260
+ * 是否需要刷新服务器会话列表,0:否,1:是;只有消息存离线的情况下,才会判断该参数,缺省:1
261
+ * @locale
262
+ *
263
+ * @locale en
264
+ * Whether the message should be muted on the recipient side. This field is returned by the server, and it does not need to be set on the application side.
265
+ * @locale
266
+ */
267
+ needUpdateSession?: boolean;
268
+ /**
269
+ * @Multi_Lang_Tag
270
+ * @locale cn
271
+ * 该消息在接收方是否应该被静音。此字段服务器返回,端测不需要自己设置
272
+ * @locale
273
+ *
274
+ * @locale en
275
+ * Whether the message should be muted on the recipient side. This field is returned by the server, and it does not need to be set on the application side.
276
+ * @locale
277
+ */
278
+ isMuted?: boolean;
279
+ }
280
+
281
+ export interface IMMessage {
282
+ /**
283
+ * @Multi_Lang_Tag
284
+ * @locale cn
285
+ * 消息的流向
286
+ *
287
+ * in 表示此消息是收到的消息
288
+ * out 表示此消息是发出的消息
289
+ * @locale
290
+ *
291
+ * @locale en
292
+ * The flow of messages
293
+ *
294
+ * in: The message is a received one.
295
+ * out: The message is an outgoing message. In other words, the message is sent out.
296
+ * @locale
297
+ */
298
+ flow: 'in' | 'out';
299
+ /**
300
+ * @Multi_Lang_Tag
301
+ * @locale cn
302
+ * 聊天对象, 账号或者群id
303
+ * @locale
304
+ *
305
+ * @locale en
306
+ * The person that the user chats with, account, or group ID
307
+ * @locale
308
+ */
309
+ target: string;
310
+ /**
311
+ * @Multi_Lang_Tag
312
+ * @locale cn
313
+ * 消息所属的会话的ID
314
+ * @locale
315
+ *
316
+ * @locale en
317
+ * ID of the conversation to which the message belongs
318
+ * @locale
319
+ */
320
+ sessionId: string;
321
+ /**
322
+ * @Multi_Lang_Tag
323
+ * @locale cn
324
+ * 消息状态
325
+ *
326
+ * #### 发送消息状态
327
+ * - sending: 发送中
328
+ * - sent: 发送成功
329
+ * - receipt: 发送成功且对方发送了已读回执
330
+ * - deleted: 已删除
331
+ * - sendFailed: 发送失败
332
+ *
333
+ * #### 接收消息状态
334
+ * - unread: 收到对方发送的消息,消息未读
335
+ * - read: 收到对方发送的消息,消息已读
336
+ * - deleted: 已删除
337
+ *
338
+ * @locale
339
+ *
340
+ * @locale en
341
+ * Message status
342
+ *
343
+ * #### send message status
344
+ * - sending: The message is being sent
345
+ * - sent: The message has been sent
346
+ * - receipt: The message has been sent and has been read
347
+ * - deleted: The message has been deleted
348
+ * - sendFailed: The message failed to be sent.
349
+ *
350
+ * #### receive message status
351
+ * - unread: Received the message sent by the other party, the message has not been read
352
+ * - read: Received the message sent by the other party, the message has been read
353
+ * - deleted: The message has been deleted
354
+ *
355
+ * @locale
356
+ */
357
+ status: TMsgStatus;
358
+ /**
359
+ * @Multi_Lang_Tag
360
+ * @locale cn
361
+ * 场景(会话类型)
362
+ * @locale
363
+ *
364
+ * @locale en
365
+ * Scenario (conversation type)
366
+ * @locale
367
+ */
368
+ scene: TMsgScene;
369
+ /**
370
+ * @Multi_Lang_Tag
371
+ * @locale cn
372
+ * 消息接收方, 帐号或群id
373
+ * @locale
374
+ *
375
+ * @locale en
376
+ * Message recipient: account, or group ID
377
+ * @locale
378
+ */
379
+ to: string;
380
+ /**
381
+ * @Multi_Lang_Tag
382
+ * @locale cn
383
+ * 消息发送方, 帐号
384
+ * @locale
385
+ *
386
+ * @locale en
387
+ * Message sender: account
388
+ * @locale
389
+ */
390
+ from: string;
391
+ /**
392
+ * @Multi_Lang_Tag
393
+ * @locale cn
394
+ * 发送方的设备类型
395
+ * @locale
396
+ *
397
+ * @locale en
398
+ * Sender's device type
399
+ * @locale
400
+ */
401
+ fromClientType?: TClientType;
402
+ /**
403
+ * @Multi_Lang_Tag
404
+ * @locale cn
405
+ * 发送端设备id
406
+ * @locale
407
+ *
408
+ * @locale en
409
+ * Sender device ID
410
+ * @locale
411
+ */
412
+ fromDeviceId?: string;
413
+ /**
414
+ * @Multi_Lang_Tag
415
+ * @locale cn
416
+ * 消息发送方的昵称
417
+ * @locale
418
+ *
419
+ * @locale en
420
+ * The nickname of the sender of the message
421
+ * @locale
422
+ */
423
+ fromNick?: string;
424
+ /**
425
+ * @Multi_Lang_Tag
426
+ * @locale cn
427
+ * 消息发送成功的时间戳(单位毫秒)
428
+ * @locale
429
+ *
430
+ * @locale en
431
+ * Timestamp when the message was sent successfully (unit: milliseconds)
432
+ * @locale
433
+ */
434
+ time: number;
435
+ /**
436
+ * @Multi_Lang_Tag
437
+ * @locale cn
438
+ * 用户最后更新时间
439
+ * @locale
440
+ *
441
+ * @locale en
442
+ * User’s last update time
443
+ * @locale
444
+ */
445
+ userUpdateTime: number;
446
+ /**
447
+ * @Multi_Lang_Tag
448
+ * @locale cn
449
+ * 消息类型
450
+ * @locale
451
+ *
452
+ * @locale en
453
+ * Message type
454
+ * @locale
455
+ */
456
+ type: TMsgType;
457
+ /**
458
+ * @Multi_Lang_Tag
459
+ * @locale cn
460
+ * 消息的文本内容
461
+ * @locale
462
+ *
463
+ * @locale en
464
+ * Text content of the message
465
+ * @locale
466
+ */
467
+ body: string;
468
+ /**
469
+ * @Multi_Lang_Tag
470
+ * @locale cn
471
+ * 附加消息
472
+ *
473
+ * 像是 file,geo 类型的消息,文本内容为空,在附加消息里会存在一个对象代表其内容
474
+ * @locale
475
+ *
476
+ * @locale en
477
+ * Additional message
478
+ *
479
+ * For file and geolocation messages, the text content is empty. Instead, there will be an object in the additional message to represent its content
480
+ * @locale
481
+ */
482
+ attach?: StrAnyObj;
483
+ /**
484
+ * @Multi_Lang_Tag
485
+ * @locale cn
486
+ * sdk 端测唯一标识,可做主键使用
487
+ * @locale
488
+ *
489
+ * @locale en
490
+ * Unique identifier of the message on the client side
491
+ * @locale
492
+ */
493
+ idClient: string;
494
+ /**
495
+ * @Multi_Lang_Tag
496
+ * @locale cn
497
+ * 消息服务器测的标识
498
+ *
499
+ * 它并不一定存在,故而这条消息的唯一标识请选用 idClient
500
+ * @locale
501
+ *
502
+ * @locale en
503
+ * Unique identifier of the message on the server side
504
+ *
505
+ * Because the identifier might not exist, please use idClient as the unique identifier of the message.
506
+ * @locale
507
+ */
508
+ idServer?: string;
509
+ /**
510
+ * @Multi_Lang_Tag
511
+ * @locale cn
512
+ * 扩展字段
513
+ * @locale
514
+ *
515
+ * @locale en
516
+ * Extension field
517
+ * @locale
518
+ */
519
+ ext?: string;
520
+ /**
521
+ * @Multi_Lang_Tag
522
+ * @locale cn
523
+ * 服务器第三方回调的扩展字段
524
+ * @locale
525
+ *
526
+ * @locale en
527
+ * Extension fields for server’s third-party callbacks
528
+ * @locale
529
+ */
530
+ callbackExt?: string;
531
+ /**
532
+ * @Multi_Lang_Tag
533
+ * @locale cn
534
+ * 开发者自定义的消息子类型,格式为大于0的整数
535
+ * @locale
536
+ *
537
+ * @locale en
538
+ * Developer-defined message subtype (format: integer greater than 0)
539
+ * @locale
540
+ */
541
+ subType?: number;
542
+ /**
543
+ * @Multi_Lang_Tag
544
+ * @locale cn
545
+ * 通知属性
546
+ * @locale
547
+ *
548
+ * @locale en
549
+ * Notification attributes
550
+ * @locale
551
+ */
552
+ feature: TMsgFeature;
553
+ /**
554
+ * @Multi_Lang_Tag
555
+ * @locale cn
556
+ * 消息的杂项设置
557
+ * @locale
558
+ *
559
+ * @locale en
560
+ * Miscellaneous settings for messages
561
+ * @locale
562
+ */
563
+ setting?: TMsgSetting;
564
+ /**
565
+ * @Multi_Lang_Tag
566
+ * @locale cn
567
+ * 反垃圾相关配置
568
+ * @locale
569
+ *
570
+ * @locale en
571
+ * Moderation configurations
572
+ * @locale
573
+ */
574
+ antiSpamInfo?: any;
575
+ /**
576
+ * @Multi_Lang_Tag
577
+ * @locale cn
578
+ * 推送相关配置
579
+ * @locale
580
+ *
581
+ * @locale en
582
+ * Configurations related to push notifications
583
+ * @locale
584
+ */
585
+ pushInfo?: any;
586
+ /**
587
+ * @Multi_Lang_Tag
588
+ * @locale cn
589
+ * 群组特化的杂项配置
590
+ * @locale
591
+ *
592
+ * @locale en
593
+ * Configuration available only when the “scene” field is set to team or superTeam
594
+ * @locale
595
+ */
596
+ teamSpecializationInfo?: any;
597
+ /**
598
+ * @Multi_Lang_Tag
599
+ * @locale cn
600
+ * thread 消息的相关字段。假设消息的回复关系如下:
601
+ * 消息A <- 消息B <- 消息C
602
+ *
603
+ * 则:消息C 的 replyMsg 是消息B,消息C 的 threadMsg 是消息A
604
+ *
605
+ * @locale
606
+ *
607
+ * @locale en
608
+ * Fields related to threaded messages
609
+ * Here is an example of a message that has been replied to many times: replyMsg of message C1 is message B1, and threadMsg of message C1 is message A
610
+ *
611
+ * message A
612
+ * | \
613
+ * message B1 message B2
614
+ * |
615
+ * message C1
616
+ * @locale
617
+ */
618
+ threadMessageInfo?: any;
619
+ [key: string]: any;
620
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CardTag: React.FC<any>;
3
+ export default CardTag;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ var CardTag = function CardTag(props) {
3
+ return /*#__PURE__*/React.createElement("div", {
4
+ style: {
5
+ display: 'inline-block',
6
+ color: props.color,
7
+ border: "1px solid ".concat(props.color),
8
+ fontSize: 12,
9
+ padding: '1px 3px',
10
+ height: 20,
11
+ lineHeight: '16px',
12
+ borderRadius: '4px',
13
+ marginRight: 3,
14
+ marginTop: 6
15
+ }
16
+ }, props.label);
17
+ };
18
+ export default CardTag;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { IMMessage } from '../@types';
3
+ import { RecordSession } from '../ChatMessageList';
4
+ import './index.less';
5
+ declare const ChatMessageItem: React.FC<{
6
+ h5?: boolean;
7
+ keyword: string;
8
+ msg: IMMessage;
9
+ prefix: string;
10
+ myAccount?: string;
11
+ accountInfo: any;
12
+ isSessionEnd: boolean;
13
+ recordSession?: RecordSession;
14
+ }>;
15
+ export default ChatMessageItem;