-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy pathtype.d.ts
More file actions
1124 lines (1067 loc) · 44 KB
/
type.d.ts
File metadata and controls
1124 lines (1067 loc) · 44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import React from 'react'
/**
* IChatItemProps Interface
* @prop id The Chat Item's id and required.
* @prop avatar The Chat Item's avatar and required.
* @prop unread The Chat Item's message unread and optional.
* @prop className The Chat Item's component className and optional.
* @prop avatarFlexible The Chat Item's avatar avatarFlexible and optional.
* @prop alt The Chat Item's avatar alt and optional.
* @prop title The Chat Item's title and optional.
* @prop subtitle The Chat Item's subtitle and optional.
* @prop date The Chat Item's message date and optional.
* @prop dateString The Chat Item's message dateString and optional.
* @prop statusColor The Chat Item's statusColor and optional.
* @prop statusText The Chat Item's statusText and optional.
* @prop lazyLoadingImage The Chat Item's lazyLoadingImage and optional.
* @prop muted The Chat Item's muted and optional.
* @prop showMute The Chat Item's showMute icon and optional.
* @prop showVideoCall The Chat Item's showVideoCall icon and optional.
* @prop onAvatarError The Chat Item's avatar function onAvatarError(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onContextMenu The Chat Item's function onContextMenu(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onClick The Chat Item's function onClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onClickMute The Chat Item's mute icon function onClickMute(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onClickVideoCall The Chat Item's videoCall icon function onClickVideoCall(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onDragOver The Chat Item's drag over function and optional.
* @prop onDragEnter The Chat Item's drag enter function and optional.
* @prop onDrop The Chat Item's drop function and optional.
* @prop onDragLeave The Chat Item's drop leave function and optional.
* @prop onDragComponent The Chat Item's drag component and optional.
* @prop letterItem The Chat Item's avatar letterItem and optional.
* @prop subList The Chat Item's sub chat items and optional.
* @prop onExpandItem The Chat Item's expand function onExpandItem(id: string) and optional.
* @prop expanded The Chat Item's expanded and optional.
*/
export interface IChatItemProps {
id: string | number
avatar: string
unread?: number
className?: string
avatarFlexible?: boolean
avatarSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
alt?: string
title?: string
subtitle?: string
date?: Date
dateString?: string
statusColor?: string
statusColorType?: string
statusText?: string
lazyLoadingImage?: string
muted?: boolean
showMute?: boolean
showVideoCall?: boolean
onAvatarError?: React.MouseEventHandler
onContextMenu?: React.MouseEventHandler
onClick?: React.MouseEventHandler
onClickMute?: React.MouseEventHandler
onClickVideoCall?: React.MouseEventHandler
onDragOver?: Function
onDragEnter?: Function
onDrop?: Function
onDragLeave?: Function
setDragStates?: Function
onDragComponent?: any
letterItem?: ILetterItem
customStatusComponents?: React.ElementType<any>[]
subList?: IChatItemProps[]
onExpandItem?: Function
expanded?: boolean;
}
/**
* ILetterItem Interface
* @prop id The LetterItem's id and required.
* @prop letter The Letter Item's letter is a component and optional.
*/
export interface ILetterItem {
id: string
letter?: React.ReactChild
}
/**
* IChatListProps Interface
* @prop id The ChatList's id and required.
* @prop className The Chat List's component className and optional.
* @prop lazyLoadingImage The Chat List's lazyLoadingImage and optional.
* @prop datasource The Chat List's dataSource is a IChatItemProps array and required.
* @prop cmpRef The Chat List's cmpRef and optional.
* @prop onAvatarError The Chat Item's function onAvatarError(item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onContextMenu The Chat Item's function onContextMenu(item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onClick The Chat Item's function onClick(item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onClickMute The Chat Item's function onClickMute(item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onClickVideoCall The Chat Item's function onClickVideoCall(item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onDragOver The Chat Item's drag over function and optional.
* @prop onDragEnter The Chat Item's drag enter function and optional.
* @prop onDrop The Chat Item's drop function and optional.
* @prop onDragLeave The Chat Item's drop leave function and optional.
* @prop onDragComponent The Chat Item's drag component and optional.
* @prop onExpand The Chat Item's expand function and optional.
*/
export interface IChatListProps {
id: string | number
className?: string
lazyLoadingImage: string
dataSource: IChatItemProps[]
cmpRef?: React.Ref<HTMLButtonElement>
onAvatarError?: ChatListEvent
onContextMenu?: ChatListEvent
onClick?: ChatListEvent
onClickMute?: ChatListEvent
onClickVideoCall?: ChatListEvent
onDragOver?: Function
onDragEnter?: Function
onDrop?: Function
onDragLeave?: Function
onDragComponent?: Function
onExpand?: Function
}
/**
* ChatListEvent Type
* @param item The ChatListEvent's item is a IChatItemProps.
* @param index The Chat List's index.
* @param event The Chat List's event.
*/
type ChatListEvent = (item: IChatItemProps, index: number, event: React.MouseEvent<HTMLElement>) => any
/**
*
*/
export interface IDefaultProps {
style: {
[key: string]: unknown
}
onClick: Function
}
/**
* IMessage Interface
* @prop id The Message's id and requried.
* @prop position The Message's position and requried.
* @prop text The Message's text and requried.
* @prop title The Message's title and requried.
* @prop focus The Message's focus and requried.
* @prop date The Message's date and requried.
* @prop dateString The Message's dateString and optional.
* @prop avatar The Message's avatar image and optional.
* @prop titleColor The Message's titleColor and required.
* @prop forwarded The Message's forwarded and required.
* @prop replyButton The Message's replyButton icon and required.
* @prop removeButton The Message's removeButton icon and required.
* @prop status The Message's status icon and required.
* @prop statusTitle The Message's statusTitle and required.
* @prop notch The Message's notch and required.
* @prop copiableDate The Message's copiableDate and optional.
* @prop retracted The Message's retracted and required.
* @prop className The Message's className and optional.
* @prop letterItem The Message's letterItem is a ILetterItem and optional.
* @prop reply The Message's reply and optional.
*/
export interface IMessage {
id: string | number
position: string
text: string
title: string
focus: boolean
date: number | Date
dateString?: string
avatar?: string
titleColor: string
forwarded: boolean
replyButton: boolean
removeButton: boolean
status: 'waiting' | 'sent' | 'received' | 'read' | 'error'
statusTitle?: string
notch: boolean
copiableDate?: boolean
retracted: boolean
className?: string
letterItem?: ILetterItem
reply?: IReplyMessage | any
type: string
forwardedMessageText?: String
}
/**
* IPhotoMessage Interface
* @prop type The Photo Message's type is "photo" and required.
* @prop width The Photo Message's width and optional.
* @prop height The Photo Message's height and optional.
* @prop uri The Photo Message's uri and required.
* @prop alt The Photo Message's alt and optional.
*/
export interface IPhotoMessage extends IMessage {
data?: {
status: IMessageDataStatus
uri: string
width?: number
height?: number
name?: string
extension?: string
size?: number
id?: string
alt?: string
}
}
/**
* IPhotoMessageProps Interface
* @prop type The Photo Message's type is "photo" and required.
* @prop message The Photo Message's message is a IPhotoMessage and required.
* @prop onDownload The Photo Message's function onDownload(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onOpen The Photo Message's function onOpen(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onLoad The Photo Message's function onLoad(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onError The Photo Message's function onError(event: React.MouseEvent<T, MouseEvent>) and optional.
*/
export interface IPhotoMessageProps extends IPhotoMessage {
onDownload?: React.MouseEventHandler
onOpen?: React.MouseEventHandler
onLoad?: React.ReactEventHandler
onPhotoError?: React.ReactEventHandler
}
/**
* IReplyMessage Interface extends IMessage
* @prop type The Reply Message's type is "reply" and required.
* @prop photoURL The Reply Message's photoURL and optional.
* @prop message The Reply Message's message and optional.
*/
export interface IReplyMessage extends IMessage {
message: string
photoURL: string
}
/**
* IReplyMessageProps Interface
* @prop type The Reply Message's type is "reply" and required.
* @prop message The Reply Message's message is a IReplyMessage and required.
* @prop onClick The Reply Message's function onClick(event: React.MouseEvent<T, MouseEvent>) and optional.
*/
export interface IReplyMessageProps extends IReplyMessage {
onClick?: React.MouseEventHandler
}
/**
* IMeetingMessage Interface extens IMessage
* @prop type The Meeting Message's type is "meeting" and required.
* @prop message The Meeting Message's message and optional.
* @prop avatarFlexible The Meeting Message's avatarFlexible and optional.
* @prop event The Meeting Message's event and optional.
* @prop record The Meeting Message's record and optional.
*/
export interface IMeetingMessage extends IMessage {
message?: string
avatarFlexible?: boolean
event?: {
title?: string
avatars?: IAvatarProps[]
avatarsLimit?: any
}
record?: {
avatar: string
title?: string
savedBy?: string
time?: string
}
}
/**
* IMeetingMessageProps Interface
* @prop type The Meeting Message's type is "meeting" and required.
* @prop subject The Meeting Message's subject and optional.
* @prop title The Meeting Message's title and optional.
* @prop date The Meeting Message's date and optional.
* @prop dateString The Meeting Message's dateString and optional.
* @prop collapseTitle The Meeting Message's collapseTitle and optional.
* @prop participants The Meeting Message's participants and optional.
* @prop more The Meeting Message's more and optional.
* @prop message The Meeting Message's message is a IMeetingMessage and required.
* @prop dataSource The Meeting Message's dataSource is a IMeetingMessage array and optional.
* @prop participantsLimit The Meeting Message's participantsLimit and optional.
* @prop onclick The Meeting Message's function onclick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingTitleClick The Meeting Message's function onMeetingTitleClick(item: IMeetingMessage, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMeetingVideoLinkClick The Meeting Message's function onMeetingVideoLinkClick(item: IMeetingMessage, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMeetingMoreSelect The Meeting Message's function onMeetingMoreSelect and optional.
*/
export interface IMeetingMessageProps extends IMeetingMessage {
subject?: string
dateString?: string
collapseTitle?: string
participants?: Array<{
id?: number | string
title?: string
}>
moreItems?: Array<{
text?: string
icon?: {
component?: any
float?: string
color?: string
size?: number
}
}>
dataSource?: IMeetingMessage[]
participantsLimit?: number
onClick?: React.MouseEventHandler
onMeetingTitleClick?: MeetingMessageEvent
onMeetingVideoLinkClick?: MeetingMessageEvent
onMeetingMoreSelect?: Function
}
/**
* IVideoMessage Interface
* @prop type The Video Message's type is "video" and required.
* @prop videoURL The Video Message's videoURL and required.
* @prop uri The Video Message's uri and required.
* @prop width The Video Message's width and optional.
* @prop height The Video Message's height and optional.
* @prop alt The Video Message's alt and optional.
*/
export interface IVideoMessage extends IMessage {
controlsList: string
data: {
videoURL?: string
thumbnailURL?: string
width?: number
height?: number
name?: string
extension?: string
size?: string
alt?: string
id?: string
uri?: string
status?: IMessageDataStatus
}
}
/**
* IVideoMessageProps Interface
* @prop type The Video Message's type is "video" and required.
* @prop message The Video Message's message is a IVideoMessage and required.
* @prop onDownload The Video Message's function onDownload(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onOpen The Video Message's function onOpen(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onLoad The Video Message's function onLoad(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onPhotoError The Video Message's function onPhotoError(event: React.SyntheticEvent<T, Event>) and optional.
*/
export interface IVideoMessageProps extends IVideoMessage {
onDownload?: React.MouseEventHandler
onOpen?: React.MouseEventHandler
onLoad?: React.ReactEventHandler
onPhotoError?: React.ReactEventHandler
}
/**
* ISystemMessage Interface extends IMessage
* @prop type The System Message's type is "system" and required.
* @prop text The System Message's text and requried.
*/
export interface ISystemMessage extends IMessage {
text: string
}
/**
* ISystemMessageProps Interface
* @prop type The System Message's type is "system" and required.
* @prop message The System Message's message is ISystemMessage and required.
* @prop className The System Message's className and optional.
*/
export interface ISystemMessageProps extends ISystemMessage {
className?: string
}
/**
* IAudioMessage Interface extends IMessage
* @prop type The Audio Message's type is "audio" and required.
* @prop audioURL The Audio Message's audio url and required.
* @prop audioType The Audio Message's audio type and optional.
* @prop controlsList The Audio Message's controls list and optional.
*/
export interface IAudioMessage extends IMessage {
data: {
audioURL?: string
extension?: string
name?: string
size?: string
duration?: number
id?: string
audioType?: 'audio/mp3' | string
controlsList?: string
}
}
/**
* IAudioMessageProps Interface
* @prop type The Audio Message's type is "audio" and required.
* @prop message The Audio Message's message is a IAudioMessage and required.
* @prop audioProps The Audio Message's audioProps and optional.
* @prop customStyle The Audio Message's customStyle and optional.
* @prop onOpen The Audio Message's function onOpen(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onDownload The Audio Message's function onDownload(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onLoad The Audio Message's function onLoad(event: React.SyntheticEvent<T, Event>) and optional.
*/
export interface IAudioMessageProps extends IAudioMessage {
audioProps?: {
[key: string]: unknown
}
customStyle?: any
onOpen?: React.MouseEventHandler
onDownload?: React.MouseEventHandler
onLoad?: React.ReactEventHandler
}
/**
* IFileMessage Interface
* @prop type The File Message's type is "file" and required.
* @prop size The File Message's size and optional.
*/
export interface IFileMessage extends IMessage {
data: {
name?: string
extension?: string
size?: string
id?: string
uri?: string
status?: IMessageDataStatus
}
}
/**
* IFileMessageProps Interface
* @prop type The File Message's type is "file" and required.
* @prop message The File Message's message is a IFileMessage and required.
* @prop text The File Message's text and optional.
* @prop onDownload The File Message's function onDownload and optional.
* @prop onOpen The File Message's function onOpen(event: React.MouseEvent<Element, MouseEvent>) and optional.
*/
export interface IFileMessageProps extends IFileMessage {
onDownload?: Function
onOpen?: React.MouseEventHandler
}
/**
* ILocationMessage Interface
* @prop type The Location Message's type is "location" and required.
* @prop latitude The Location Message's latitude and required.
* @prop longitude The Location Message's longitude and required.
* @prop staticURL The Location Message's static url and required.
* @prop mapURL The Location Message's map url and optional.
*/
export interface ILocationMessage extends IMessage {
data: {
latitude: string
longitude: string
staticURL: string
mapURL?: string
}
}
/**
* ILocationMessageProps Interface
* @prop type The Location Message's type is "location" and required.
* @prop message The Location Message's message is a ILocationMessage and required.
* @prop marker The Location Message's marker and required.
* @prop zoom The Location Message's zoom and required.
* @prop apiKey The Location Message's api key and required.
* @prop className The Location Message's className and optional.
* @prop text The Location Message's text and optional.
* @prop src The Location Message's source and optional.
* @prop target The Location Message's target and optional.
* @prop href The Location Message's href and optional.
* @prop onOpen The Location Message's function onOpen(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onError The Location Message's function onError(event: React.SyntheticEvent<T, Event>) and optional.
*/
export interface ILocationMessageProps extends ILocationMessage {
markerColor: string
zoom: string
apiKey: string
className?: string
src?: string
target?: string
href?: string
onOpen?: React.MouseEventHandler
onError?: React.ReactEventHandler
}
/**
* ISpotifyMessage Interface extends IMessage
* @prop type The Spotify Message's type is "spotify" and required.
* @prop uri The Spotify Message's uri and required.
* @prop theme The Spotify Message's theme and optional.
* @prop view The Spotify Message's view and optional.
* @prop width The Spotify Message's width and optional.
* @prop height The Spotify Message's height and optional.
* @prop text The Spotify Message's text and optional.
*/
export interface ISpotifyMessage extends IMessage {
uri: string
theme?: string
view?: string
width?: number | string
height?: number | string
}
/**
* ISpotifyMessageProps Interface
* @prop type The Spotify Message's type is "spotify" and required.
* @prop message The Spotify Message's message is a ISpotifyMessage and required.
*/
export interface ISpotifyMessageProps extends ISpotifyMessage {}
/**
* IMessageBoxProps Interface
* @prop data The Message Box'es data is a MessageType and required.
* @prop onMessageFocused The Message Box'es onMessageFocused and optional.
* @prop renderAddCmp The Message Box'es renderAddCmp is a component and optional.
* @prop onClick The Message Box'es function onClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onOpen The Message Box'es function onOpen(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onPhotoError The Message Box'es function onPhotoError(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onContextMenu The Message Box'es function onContextMenu(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onForwardClick The Message Box'es function onForwardClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onReplyClick The Message Box'es function onReplyClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onRemoveMessageClick The Message Box'es function onRemoveMessageClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onTitleClick The Message Box'es function onTitleClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingMessageClick The Message Box'es function onMeetingMessageClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onDownload The Message Box'es function onDownload(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingMoreSelect The Message Box'es function onMeetingMoreSelect(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingLinkClick The Message Box'es function onMeetingLinkClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingTitleClick The Message Box'es function onMeetingTitleClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingVideoLinkClick The Message Box'es function onMeetingVideoLinkClick(event: React.MouseEvent<T, MouseEvent>) and optional.
*/
export interface IMessageBoxProps {
onMessageFocused?: any
renderAddCmp?: JSX.Element | (() => JSX.Element)
onClick?: React.MouseEventHandler
onOpen?: React.MouseEventHandler
onPhotoError?: React.MouseEventHandler
onContextMenu?: React.MouseEventHandler
onForwardClick?: React.MouseEventHandler
onReplyClick?: React.MouseEventHandler
onRemoveMessageClick?: React.MouseEventHandler
onTitleClick?: React.MouseEventHandler
onReplyMessageClick?: React.MouseEventHandler
onMeetingMessageClick?: React.MouseEventHandler
onDownload?: React.MouseEventHandler
onMeetingMoreSelect?: React.MouseEventHandler
onMeetingLinkClick?: React.MouseEventHandler
onMeetingTitleClick?: React.MouseEventHandler
onMeetingVideoLinkClick?: React.MouseEventHandler
styles?: React.CSSProperties
notchStyle?: React.CSSProperties
}
/**
* IMessageListProps Interface
* @prop className The Message List's className and optional.
* @prop customProps The Message List's customProps and optional.
* @prop children The Message List's children and optional.
* @prop referance The Message List's referance is a ref and required.
* @prop datasource The Message List's datasource is IMessageBoxProps and required.
* @prop lockable The Message List's lockable and required.
* @prop toBottomHeight The Message List's to bottom height and optional.
* @prop down button The Message List's down button and required.
* @prop downButtonBadge The Message List's down button badge and required.
* @prop sendMessagePreview The Message List's send message preview and required.
* @prop onScroll The Message List's function onScroll(event: React.UIEvent<T, UIEvent>) and optional.
* @prop onContextMenu The Message List's function onContextMenu(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onDownButtonClick The Message List's onDownButtonClick is a ref and optional.
* @prop onOpen The Message List's function onOpen(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onDownload The Message List's function onDownload(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onPhotoError The Message List's function onPhotoError(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMeetingMoreSelect The Message List's function onMeetingMoreSelect(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMessageFocused The Message List's function onMessageFocused(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onClick The Message List's function onClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onForwardClick The Message List's function onForwardClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onReplyClick The Message List's function onReplyClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onReplyMessageClick The Message List's function onReplyMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onTitleClick The Message List's function onTitleClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onRemoveMessageClick The Message List's function onRemoveMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMeetingMessageClick The Message List's function onMeetingMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
* @prop onMeetingTitleClick The MessageList's function onMeetingTitleClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingVideoLinkClick The MessageList's function onMeetingVideoLinkClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingLinkClick The Message List's function onMeetingLinkClick(item: IMessageBoxProps, index: number, event: React.MouseEvent<HTMLElement, MouseEvent>) and optional.
*/
export interface IMessageListProps {
className?: string
customProps?: {
[key: string]: unknown
}
children?: React.ReactNode
isShowChild?: boolean
referance: any
dataSource: MessageType[]
actionButtons?: MeetingLinkActionButtons[]
lockable: boolean
toBottomHeight?: String | number
downButton?: boolean
downButtonBadge?: number
sendMessagePreview?: boolean
onScroll?: React.UIEventHandler
onContextMenu?: MessageListEvent
onDownButtonClick?: React.RefObject<HTMLButtonElement>
onOpen?: MessageListEvent
onDownload?: MessageListEvent
onPhotoError?: MessageListEvent
onMeetingMoreSelect?: MessageListEvent
onMessageFocused?: MessageListEvent
onClick?: MessageListEvent
onForwardClick?: MessageListEvent
onReplyClick?: MessageListEvent
onReplyMessageClick?: MessageListEvent
onTitleClick?: MessageListEvent
onRemoveMessageClick?: MessageListEvent
onMeetingMessageClick?: MessageListEvent
onMeetingTitleClick?: React.MouseEventHandler
onMeetingVideoLinkClick?: React.MouseEventHandler
onMeetingLinkClick?: MessageListEvent
messageBoxStyles?: React.CSSProperties
notchStyle?: React.CSSProperties
}
/**
* MessageListEvent Type
* @param item The MessageListEvent's item is a IMessageBoxProps.
* @param index The MessageListEvent's index.
* @param event The MessageListEvent's event.
*/
export type MessageListEvent = (item: MessageType, index: number, event: React.MouseEvent<HTMLElement>) => any
/**
* IProgressOptions Interface
* @prop state The Progress Options's state is a object.
*/
export interface IProgressOptions {
state?: {
color?: string
width?: string
}
}
/**
* IMeetingLinkMessage Interface extends IMessage
* @prop meetingID The Meeting Link Message's meeting id and optional.
* @prop title The Meeting Link Message's title and optional.
*/
export interface IMeetingLinkMessage extends IMessage {
meetingID?: string
}
export type TActionButton = React.FunctionComponent<any>
export interface MeetingLinkActionButtons {
// return meeting id
onClickButton: (id: string) => void
Component: TActionButton
}
/**
* IMeetingLinkMessageProps Interface
* @prop type The Meeting Link Message's type is "meetingLink" and required.
* @prop message The Meeting Link Message's message is a IMeetingLinkMessage and required.
* @prop onMeetingLinkClick The Meeting Link Message's function onMeetingLinkClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingMoreSelect The Meeting More Select Message's function onMeetingMoreSelect(event: React.MouseEvent<T, MouseEvent>) and optional.
*/
export interface IMeetingLinkMessageProps extends IMeetingLinkMessage {
actionButtons?: MeetingLinkActionButtons[]
}
/**
* MeetingMessageEvent Type
* @param item The MessageListEvent's item is a IMeetingMessage.
* @param index The MessageListEvent's index.
* @param event The MessageListEvent's event.
*/
type MeetingMessageEvent = (item: IMeetingMessage, index: number, event: React.MouseEvent<HTMLElement>) => any
/**
* ITextMessage Interface extends IMessage
* @prop type The Text Message's type is "text" and required.
*/
export interface ITextMessage extends IMessage {}
/**
* ITextMessageProps Interface
* @prop type The Text Message's type is "text" and required.
* @prop message The Text Message's message is a ITextMessage and required.
*/
export interface ITextMessageProps extends ITextMessage {
// copyClipboard: function;
}
export interface IMeetingListProps {
cmpRef?: any
className?: string
dataSource?: IMeetingItemProps[]
lazyLoadingImage?: string
onClick?: MeetingListEvent
onMeetingClick?: MeetingListEvent
onShareClick?: MeetingListEvent
onCloseClick?: MeetingListEvent
onContextMenu?: MeetingListEvent
onAvatarError?: MeetingListEvent
}
/**
* MeetingListEvent Type
* @param item The MessageListEvent's item is a IMeetingItemProps.
* @param index The MessageListEvent's index.
* @param event The MessageListEvent's event.
*/
type MeetingListEvent = (item: IMeetingItemProps, index: number, event: React.MouseEvent<HTMLElement>) => any
/**
* IMeetingItemProps Interface
* @prop id The Meeting Item's id and required.
* @prop closable The Meeting Item's closable and optional.
* @prop date The Meeting Item's date and optional.
* @prop subject The Meeting Item's subject and optional.
* @prop subjectLimit The Meeting Item's subject limit and optional.
* @prop avatarFlexible The Meeting Item's avatar flexible and optional.
* @prop alt The Meeting Item's alt and optional.
* @prop title The Meeting Item's title and optional.
* @prop subtitle The Meeting Item's subtitle and optional.
* @prop statusColorType The Meeting Item's status color type and optional.
* @prop classname The Meeting Item's classname and optional.
* @prop dateString The Meeting Item's date string and optional.
* @prop lazyLoadingImage The Meeting Item's lazyLoadingImage and optional.
* @prop avatarLimit The Meeting Item's avatar limit and optional.
* @prop avatars The Meeting Item's avatars array and optional.
* @prop audioMuted The Meeting Item's audio muted and optional.
* @prop audioSource The Meeting Item's audio source and optional.
* @prop onClick The Meeting Item's function onClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onAvatarError The Meeting Item's function onAvatarError(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onMeetingClick The Meeting Item's function onMeetingClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onShareClick The Meeting Item's function onShareClick(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onContextMenu The Meeting Item's function onContextMenu(event: React.MouseEvent<T, MouseEvent>) and optional.
* @prop onCloseClick The Meeting Item's function onCloseClick(event: React.MouseEvent<T, MouseEvent>) and optional.
*/
export interface IMeetingItemProps {
id: string | number
closable?: boolean
date?: any
subject?: string
subjectLimit?: number
avatarFlexible?: boolean
alt?: string
title?: string
subtitle?: string
statusColorType?: string
className?: string
dateString?: string
lazyLoadingImage?: string
avatarLimit?: number
avatars?: IAvatarProps[]
audioMuted?: boolean
audioSource?: string
onClick?: React.MouseEventHandler
onAvatarError?: React.MouseEventHandler
onMeetingClick?: React.MouseEventHandler
onShareClick?: React.MouseEventHandler
onContextMenu?: React.MouseEventHandler
onCloseClick?: React.MouseEventHandler
}
/**
* IInputProps Interface
* @prop autofocus The Input's autofocus and optional.
* @prop referance The Input's referance is a ref and optional.
* @prop clear The Input's clear and optional.
* @prop maxlength The Input's maxlength and optional.
* @prop maxHeight The Input's maxheight and optional.
* @prop onMaxLengthExceed The Input's onMaxLengthExceed function and optional.
* @prop onChange The Input's onChange function and optional.
* @prop multiline The Input's multiline and optional.
* @prop autoHeight The Input's autoHeight and optional.
* @prop minHeight The Input's minheight and optional.
* @prop className The Input's classname and optional.
* @prop leftButtons The Input's leftbuttons is a component and optional.
* @prop rightButtons The Input's rightbuttons is a component and optional.
* @prop type The Input's type and optional.
* @prop placeholder The Input's placeholder and optional.
* @prop defaultValue The Input's default value and optional.
* @prop inputStyle The Input's input style and optional.
* @prop onCopy The Input's function onCopy(event: React.ClipboardEvent<T>) and optional.
* @prop onCut The Input's function onCut(event: React.ClipboardEvent<T>) and optional.
* @prop onPaste The Input's function onPaste(event: React.ClipboardEvent<T>) and optional.
* @prop onBlur The Input's function onBlur(event: React.FocusEvent<T, Element>) and optional.
* @prop onFocus The Input's function onFocus(event: React.FocusEvent<T, Element>) and optional.
* @prop onSelect The Input's function onSelect(event: React.SyntheticEvent<T, Event>) and optional.
* @prop onSubmit The Input's function onSubmit(event: React.FormEvent<T>) and optional.
* @prop onReset The Input's function onReset(event: React.FormEvent<T>) and optional.
* @prop onKeyDown The Input's function onKeyDown(event: React.KeyboardEvent<T>) and optional.
* @prop onKeyPress The Input's function onKeyPress(event: React.KeyboardEvent<T>) and optional.
* @prop onKeyUp The Input's function onKeyUp(event: React.KeyboardEvent<T>) and optional.
*/
export interface IInputProps {
autofocus?: boolean
referance?: any // sor ve 46.satır
clear?: Function
maxlength?: number
maxHeight: number
onMaxLengthExceed?: Function
onChange?: Function
multiline?: boolean
autoHeight?: boolean
minHeight?: number
className?: string
leftButtons?: React.ReactNode
rightButtons?: React.ReactNode
type?: React.HTMLInputTypeAttribute
placeholder?: string
defaultValue?: string
inputStyle?: Object
value?: string
onCopy?: React.ClipboardEventHandler
onCut?: React.ClipboardEventHandler
onPaste?: React.ClipboardEventHandler
onBlur?: React.FocusEventHandler
onFocus?: React.FocusEventHandler
onSelect?: React.ReactEventHandler
onSubmit?: React.FormEventHandler
onReset?: React.FormEventHandler
onKeyDown?: React.KeyboardEventHandler
onKeyPress?: React.KeyboardEventHandler
onKeyUp?: React.KeyboardEventHandler
}
/**
* IMessageDataStatus Interface
* @prop error The File Message Data Status's error and optional.
* @prop download The File Message Data Status's download function and optional.
* @prop click The File Message Data Status's click function and optional.
* @prop loading The File Message Data Status's loading and optional.
*/
export interface IMessageDataStatus {
autoDownload?: boolean
error?: boolean
download?: Function | boolean
click?: Function | boolean
loading?: boolean | number
}
/**
* IDropdownProps Interface
* @prop className The Dropdown's className and optional.
* @prop buttonProps The Dropdown's button props and optional.
* @prop animationType The Dropdown's animation type and optional.
* @prop animationPosition The Dropdown's animation position and optional.
* @prop title The Dropdown's title and optional.
* @prop items The Dropdown's items is a IDropdownItemType array and required.
* @prop onSelect The Dropdown's onSelect function and optional.
* @prop style The Dropdown's style is an object containing color, borderColor and optional.
*/
export interface IDropdownProps {
className?: string
buttonProps?: Object
animationType?: string
animationPosition?: string
title?: string
items: IDropdownItemType[]
onSelect: Function
style?: {
color?: string
borderColor?: string
}
}
/**
* ICircleProps Interface
* @prop animate The Circle's animation and required.
* @prop progressOptions The Circle's progress options and optional.
* @prop className The Circle's className and optional.
*/
export interface ICircleProps {
animate: number
progressOptions?: Object
className?: string
}
/**
* IButtonProps Interface
* @prop title The Button's title and optional.
* @prop text The Button's text and optional.
* @prop buttonRef The Button's ref and optional.
* @prop type The Button's type and optional.
* @prop className The Button's className and optional.
* @prop backgroundColor The Button's background color and optional.
* @prop color The Button's color and optional.
* @prop disabled The Button's disabled and optional.
* @prop onClick The Button's onClick function and optional.
* @prop icon The Button's icon is a IButtonIcon and optional.
*/
export interface IButtonProps {
title?: string
text?: string
buttonRef?: React.RefObject<HTMLButtonElement>
type?: string
className?: string
backgroundColor?: string
color?: string
disabled?: boolean
onClick?: React.MouseEventHandler
icon?: IButtonIcon
}
/**
* IButtonIcon Interface
* @prop float The Button Icon's float and optional.
* @prop size The Button Icon's size and optional.
* @prop components The Button Icon's components and optional.
*/
export interface IButtonIcon {
float?: any
size?: number
component?: React.ReactChild
}
/**
* IDropDownItemType Type
* @type IDropdown
* @type string
*/
type IDropdownItemType = IDropdownItem | string
/**
* IDropdownItem Interface
* @prop icon The Dropdown Item's icon and optional.
* @prop text The Dropdown Item's text and optional.
*/
export interface IDropdownItem {
icon?: IDropdownItemIcon
text?: string
}
/**
* IDropdownItemIcon Interface
* @prop float The Dropdown Item Icon's float and optional.
* @prop color The Dropdown Item Icon's color and optional.
* @prop size The Dropdown Item Icon's size and optional.
* @prop className The Dropdown Item Icon's className and optional.
* @prop component The Dropdown Item Icon's component and optional.
*/
export interface IDropdownItemIcon {
float?: any
color?: string
size?: number
className?: string
component?: React.ReactChild
}
/**
* ISideBarProps Interface
* @type type The Side Bar's type and optional.
* @type data The Side Bar's data is ISideBar and optional.
*/
export interface ISideBarProps extends ISideBar {
type?: string
data: ISideBar
}
/**
* ISideBar Interface
* @prop top The Side Bar's top is a component and optional.
* @prop center The Side Bar's center is a component and optional.
* @prop bottom The Side Bar's bottom is a component and optional.
* @prop className The Side Bar's className and optional.
*/
export interface ISideBar {
top?: any
center?: any
bottom?: any
className?: string
}
/**
* IPopup Interface
* @prop show The Popup's show and optional.
* @prop header The Popup's header and optional.
* @prop text The Popup's text and optional.
* @prop footerButtons The Popup's footer buttons array and optional.
* @prop headerButtons The Popup's header buttons array and optional.
* @prop renderHeader The Popup's renderHeader function and optional.
* @prop renderContent The Popup's renderContent function and optional.
* @prop renderFooter The Popup's renderFooter function and optional.
* @prop color The Popup's color and optional.
*/
export interface IPopup {
show?: boolean
header?: string
text?: string
footerButtons?: Array<{
color?: string
backgroundColor?: string
text?: string
onClick?: React.MouseEventHandler
}>
headerButtons?: Array<{
type?: string
color?: string
icon?: {