easemob-chat-uikit 1.3.0 → 1.4.0

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 (50) hide show
  1. package/ChatUI.esm.js +70925 -75303
  2. package/ChatUI.js +171 -154
  3. package/ChatUI.umd.js +171 -154
  4. package/components.scss +1 -1
  5. package/package.json +1 -1
  6. package/style/chat/style/chat.scss +1 -0
  7. package/style/chatroom/style/style.scss +11 -0
  8. package/style/chatroomMessage/style/style.scss +0 -2
  9. package/style/conversation/style/item.scss +5 -0
  10. package/style/pinnedMessage/style/style.scss +1 -1
  11. package/style/pinnedTextMessage/style/style.scss +126 -0
  12. package/style/repliedMessage/style/msg.scss +1 -0
  13. package/style/repliedMessage/style/style.scss +1 -0
  14. package/style/tooltip/style/mixin.scss +1 -1
  15. package/style/tooltip/style/style.scss +21 -1
  16. package/style.css +1 -1
  17. package/types/component/button/Button.d.ts +3 -1
  18. package/types/component/icon/vite-env.d.ts +1 -0
  19. package/types/component/ripple/Ripple.d.ts +6 -0
  20. package/types/component/userItem/UserItem.d.ts +1 -0
  21. package/types/module/audioMessage/AudioMessage.d.ts +2 -2
  22. package/types/module/baseMessage/BaseMessage.d.ts +1 -1
  23. package/types/module/blocklist/Blocklist.d.ts +2 -2
  24. package/types/module/chat/Chat.d.ts +3 -1
  25. package/types/module/chatroom/Chatroom.d.ts +1 -0
  26. package/types/module/chatroomMessage/ChatroomMessage.d.ts +2 -2
  27. package/types/module/combinedMessage/CombinedMessage.d.ts +2 -2
  28. package/types/module/conversation/ConversationItem.d.ts +2 -1
  29. package/types/module/fileMessage/FileMessage.d.ts +2 -2
  30. package/types/module/groupDetail/GroupDetail.d.ts +1 -0
  31. package/types/module/hooks/useChatroomMember.d.ts +1 -1
  32. package/types/module/hooks/usePinnedMessage.d.ts +2 -2
  33. package/types/module/messageInput/MessageInput.d.ts +2 -0
  34. package/types/module/messageInput/emoji/Emoji.d.ts +1 -0
  35. package/types/module/messageInput/gift/GiftKeyboard.d.ts +1 -0
  36. package/types/module/messageInput/textarea/Textarea.d.ts +1 -0
  37. package/types/module/pinnedMessage/PinnedMessage.d.ts +2 -2
  38. package/types/module/pinnedTextMessage/PinnedTextMessage.d.ts +10 -0
  39. package/types/module/pinnedTextMessage/index.d.ts +3 -0
  40. package/types/module/reaction/EmojiKeyboard.d.ts +3 -1
  41. package/types/module/store/AddressStore.d.ts +1 -0
  42. package/types/module/store/MessageStore.d.ts +2 -3
  43. package/types/module/store/Provider.d.ts +5 -2
  44. package/types/module/store/rootContext.d.ts +3 -0
  45. package/types/module/textMessage/TextMessage.d.ts +2 -2
  46. package/types/module/typing/Typing.d.ts +2 -2
  47. package/types/module/userCardMessage/UserCardMessage.d.ts +2 -2
  48. package/types/module/userProfile/UserProfile.d.ts +2 -2
  49. package/types/module/videoMessage/VideoMessage.d.ts +2 -2
  50. package/README.md +0 -392
package/components.scss CHANGED
@@ -40,4 +40,4 @@
40
40
  @import './style/userSelect/style/style.scss';
41
41
  @import './style/chatroom/style/style.scss';
42
42
  @import './style/chatroomMember/style/style.scss';
43
- @import './style/chatroomMessage/style/style.scss';
43
+ @import './style/chatroomMessage/style/style.scss';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easemob-chat-uikit",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "main": "ChatUI.umd.js",
6
6
  "type": "module",
@@ -7,6 +7,7 @@ $chat-prefix-cls: #{$cui-prefix}-chat;
7
7
  flex: 1;
8
8
  flex-direction: column;
9
9
  background-color: $chat-bg;
10
+ overflow: hidden;
10
11
  &-messageList{
11
12
  flex: 1;
12
13
  }
@@ -14,14 +14,25 @@ $chatroom-prefix-cls: #{$cui-prefix}-chatroom;
14
14
  margin: 0;
15
15
  padding: 0;
16
16
  }
17
+
18
+ &-header-count{
19
+ @include Label(medium, $gray-1);
20
+ margin-left: 2px;
21
+ }
17
22
  }
18
23
 
24
+
25
+
19
26
  .#{$chatroom-prefix-cls}-dark{
20
27
  background-color: $gray-1;
21
28
  color: $gray-98;
22
29
  p{
23
30
  background: $gray-2;
24
31
  }
32
+
33
+ .#{$chatroom-prefix-cls}-header-count{
34
+ @include Label(medium, $gray-98);
35
+ }
25
36
  }
26
37
 
27
38
  .report-item{
@@ -23,8 +23,6 @@ $chatroom-prefix-cls: #{$cui-prefix}-message-chatroom;
23
23
  height: fit-content;
24
24
  float: left;
25
25
  gap: 4px;
26
-
27
- float: left;
28
26
  align-items: center;
29
27
  margin-right: 4px;
30
28
 
@@ -76,6 +76,11 @@ $conversation-prefix-cls: #{$cui-prefix}-conversationItem;
76
76
  white-space: nowrap;
77
77
  height: 20px;
78
78
  cursor: default;
79
+ // white-space: normal;
80
+ word-break: break-all;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ width: calc(100% - 12px);
79
84
  }
80
85
 
81
86
  &-time{
@@ -26,7 +26,7 @@ $status-prefix-cls: #{$cui-prefix}-message-base;
26
26
  .#{$pinned-msg-prefix-cls}-message-bubble {
27
27
  padding: 8px 0 12px 0;
28
28
  color: $gray-1;
29
-
29
+ padding-right: 56px;
30
30
  .#{$status-prefix-cls}-body {
31
31
  margin: 0;
32
32
  }
@@ -0,0 +1,126 @@
1
+ $pinned-msg-prefix-cls: #{$cui-prefix}-pinned-text-message;
2
+
3
+ .#{$pinned-msg-prefix-cls} {
4
+ box-sizing: border-box;
5
+ display: flex;
6
+ overflow: hidden;
7
+ box-sizing: border-box;
8
+ background-color: $gray-2;
9
+ justify-content: space-between;
10
+ border-radius: 12px;
11
+ padding: 8px;
12
+ max-height: 56px;
13
+ transition: max-height 0.3s ease;
14
+ &-expand{
15
+ max-height: 116px;
16
+
17
+ .#{$pinned-msg-prefix-cls}-text{
18
+ overflow-y: auto;
19
+ }
20
+ }
21
+ &-text{
22
+ flex: 1;
23
+ word-break: break-all;
24
+ overflow-y: hidden;
25
+ @include Body(medium, $gray-98);
26
+ position: relative;
27
+
28
+ &-header{
29
+ display: flex;
30
+ gap: 4px;
31
+ float: left;
32
+ margin-right: 4px;
33
+ }
34
+ &-header+div{
35
+ text-align: left;
36
+ }
37
+
38
+ &-name{
39
+ @include Label(medium, $blue-5);
40
+ }
41
+ }
42
+
43
+ &-ellipsis{
44
+ position: absolute;
45
+ right: 0;
46
+ bottom: 0;
47
+ background: $gray-2;
48
+ padding: 0 2px;
49
+ }
50
+
51
+ &-buttons {
52
+ display: flex;
53
+ flex-direction: column;
54
+ justify-content: space-between;
55
+
56
+ &>div{
57
+ cursor: pointer;
58
+ }
59
+ }
60
+
61
+ &-button{
62
+ transition: transform 0.3s ease; /* 旋转动画 */
63
+ fill: $gray-98;
64
+ :hover{
65
+ fill: $blue-6;
66
+ }
67
+ }
68
+ &-button-expand{
69
+ transform: rotate(180deg);
70
+ }
71
+
72
+
73
+ }
74
+
75
+ .#{$pinned-msg-prefix-cls}-dark{
76
+ background-color: $gray-95;
77
+ .#{$pinned-msg-prefix-cls}-text{
78
+ @include Body(medium, $gray-1);
79
+
80
+ &-name{
81
+ @include Label(medium, $blue-8);
82
+ margin-right: 4px;
83
+ }
84
+ }
85
+ .#{$pinned-msg-prefix-cls}-button{
86
+ fill: $gray-3;
87
+ }
88
+ .#{$pinned-msg-prefix-cls}-ellipsis{
89
+ background: $gray-95;
90
+ }
91
+
92
+ .#{$pinned-msg-prefix-cls}-text::-webkit-scrollbar{
93
+ width: 2px;
94
+ height: 2px;
95
+ color: $gray-3;
96
+ };
97
+
98
+ .#{$pinned-msg-prefix-cls}-text::-webkit-scrollbar-track {
99
+ background-color: $gray-8; /* 轨道背景色 */
100
+ }
101
+
102
+ .#{$pinned-msg-prefix-cls}-text::-webkit-scrollbar-thumb {
103
+ background-color: $gray-3; /* 滑块颜色 */
104
+ border-radius: 10px; /* 圆角 */
105
+ }
106
+ }
107
+ .cui-pinned-text-message-text::-webkit-scrollbar{
108
+ width: 2px;
109
+ height: 2px;
110
+ color: $gray-2;
111
+ };
112
+
113
+ .cui-pinned-text-message-text::-webkit-scrollbar-track {
114
+ background-color: $gray-1; /* 轨道背景色 */
115
+ }
116
+
117
+ .cui-pinned-text-message-text::-webkit-scrollbar-thumb {
118
+ background-color: $gray-98; /* 滑块颜色 */
119
+ border-radius: 10px; /* 圆角 */
120
+ }
121
+
122
+ .cui-pinned-text-message-text::-webkit-scrollbar-thumb:hover {
123
+ background-color: #555;
124
+ }
125
+
126
+
@@ -37,6 +37,7 @@ $reply-msg-prefix-cls: #{$cui-prefix}-reply-message;
37
37
  background-color: $gray-95;
38
38
  border-radius: $msg-bubble-square-border-radius;
39
39
  position: relative;
40
+ cursor: pointer;
40
41
  &:hover {
41
42
  background-color: $gray-98;
42
43
  }
@@ -31,6 +31,7 @@ $reply-prefix-cls: #{$cui-prefix}-message-reply;
31
31
  white-space: nowrap;
32
32
  text-overflow: ellipsis;
33
33
  flex:none;
34
+ width: 100%;
34
35
  .cui-icon{
35
36
  float: left;
36
37
  }
@@ -32,7 +32,7 @@
32
32
  left: -$width;
33
33
  width: $width * 3;
34
34
  height: $width * 3;
35
- background: $tooltip-bg;
35
+ // background: $tooltip-bg;
36
36
  // Hack firefox: https://github.com/ant-design/ant-design/pull/33710#issuecomment-1015287825
37
37
  background-repeat: no-repeat;
38
38
  background-position: ceil(-$width + 1px) ceil(-$width + 1px);
@@ -67,6 +67,8 @@ $tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
67
67
  background-color: $tooltip-bg;
68
68
  border-radius: $border-radius-base;
69
69
  box-shadow: $box-shadow-base;
70
+ display: flex;
71
+ align-items: center;
70
72
  }
71
73
 
72
74
  // Arrows
@@ -82,7 +84,7 @@ $tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
82
84
  // right: 0;
83
85
  // bottom: 0;
84
86
  // left: 0;
85
- // background-color: $tooltip-bg;
87
+ // background-color: $gray-1;
86
88
  // transform: translateY(50%) translateX(-50%) rotate(45deg)!important;
87
89
  // z-index: 0;
88
90
  background: transparent;
@@ -100,6 +102,7 @@ $tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
100
102
  content: '';
101
103
  pointer-events: auto;
102
104
  background-color: $tooltip-bg;
105
+ // background-color: $gray-1;
103
106
  @include roundedArrow($tooltip-arrow-width, 5px);
104
107
  }
105
108
  }
@@ -179,6 +182,17 @@ $tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
179
182
  right: $tooltip-arrow-offset-horizontal;
180
183
  }
181
184
 
185
+ // arrow placement right
186
+ &-placement-right &-arrow{
187
+ top: 50%;
188
+ transform: translate(-100%) translateY(-50%);
189
+ left: 0;
190
+ }
191
+ &-placement-right &-arrow-content{
192
+ box-shadow: 3px 3px 7px #00000012;
193
+ transform: translate(11px) rotate(135deg);
194
+ }
195
+
182
196
  }
183
197
 
184
198
  .#{$tooltip-prefix-cls}-dark{
@@ -187,6 +201,12 @@ $tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
187
201
  background-color: $gray-1;
188
202
  border: 1px solid $gray-2
189
203
  }
204
+
205
+ .#{$tooltip-prefix-cls}-arrow {
206
+ &-content {
207
+ background-color: $gray-1;
208
+ }
209
+ }
190
210
  }
191
211
 
192
212
  @function sqrt($num) {