@aochuang/client-sdk 1.0.363 → 1.0.364

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 (168) hide show
  1. package/components/index.js +1 -6
  2. package/components/layout/layout.vue +4 -1
  3. package/components/session-select/session-select-item.vue +9 -8
  4. package/components/wechat-chat-control/image/image.vue +8 -13
  5. package/components/wechat-chat-control/url/url-miniprogram.vue +5 -1
  6. package/components/wework-chat-control/channel-live/channel-live.vue +2 -7
  7. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  8. package/components/wework-chat-control/custom-expression/custom-expression.vue +1 -2
  9. package/components/wework-chat-control/file-url/file-url.vue +16 -34
  10. package/components/wework-chat-control/image/image.vue +2 -137
  11. package/components/wework-chat-control/index.js +7 -15
  12. package/components/wework-chat-control/location/location.vue +3 -3
  13. package/components/wework-chat-control/red-envelopes/red-envelopes.vue +2 -3
  14. package/components/wework-chat-control/text/text.vue +144 -24
  15. package/components/wework-chat-control/url/url-miniprogram.vue +7 -6
  16. package/components/wework-chat-control/url/url.vue +2 -26
  17. package/components/wework-chat-control/util.js +17 -26
  18. package/components/wework-chat-control/video/video.vue +2 -10
  19. package/components/wework-chat-control/voice/voice.vue +2 -9
  20. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  22. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  23. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  24. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  25. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  26. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  27. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  28. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  29. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  30. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  31. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  32. package/components/wework-chat-panel/chat-panel-item.vue +25 -56
  33. package/components/wework-chat-panel/chat-panel.vue +13 -96
  34. package/package.json +3 -10
  35. package/services/client-chat/client-chat-wechat/client-chat-session.js +196 -92
  36. package/services/client-chat/client-chat-wechat/client-chat.js +20 -33
  37. package/services/client-chat/client-chat-wework/client-chat-account.js +1 -84
  38. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  39. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -45
  40. package/services/client-chat/client-chat-wework/client-chat-session.js +4 -59
  41. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -13
  42. package/services/client-chat/client-chat-wework/client-chat.js +11 -320
  43. package/services/client-chat/client-chat-wework/utils.js +5 -5
  44. package/uni-common/account-portray/account-portray.vue +51 -0
  45. package/uni-common/account-select/account-select-item.vue +172 -0
  46. package/uni-common/account-select/account-select.vue +252 -0
  47. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  48. package/uni-common/friend-avatar/default.svg +1 -0
  49. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  50. package/uni-common/friend-avatar/index.js +3 -0
  51. package/uni-common/friend-loader/friend-loader.vue +53 -0
  52. package/uni-common/friend-portray/friend-portray.vue +56 -0
  53. package/uni-common/group-avatar/default.svg +1 -0
  54. package/uni-common/group-avatar/group-avatar.vue +18 -0
  55. package/uni-common/group-avatar/index.js +3 -0
  56. package/uni-common/room-avatar/default.svg +6 -0
  57. package/uni-common/room-avatar/index.js +3 -0
  58. package/uni-common/room-avatar/room-avatar.vue +27 -0
  59. package/uni-common/room-loader/room-loader.vue +53 -0
  60. package/uni-common/room-portray/room-portray.vue +56 -0
  61. package/uni-components/chat-control/calling/calling.vue +91 -0
  62. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  63. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  64. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  65. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  66. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  67. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  68. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  69. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  70. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  71. package/{components/wework-chat-control/wework-chat-control-config.vue → uni-components/chat-control/chat-control-config.vue} +13 -16
  72. package/uni-components/chat-control/chat-control.vue +218 -0
  73. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  74. package/uni-components/chat-control/const.js +28 -0
  75. package/uni-components/chat-control/expression/expression.vue +41 -0
  76. package/uni-components/chat-control/image/image.vue +68 -0
  77. package/uni-components/chat-control/index.js +89 -0
  78. package/uni-components/chat-control/location/location.vue +110 -0
  79. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  80. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  81. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  82. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  83. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  84. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  85. package/uni-components/chat-control/system/system.vue +69 -0
  86. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  87. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  88. package/uni-components/chat-control/text/text.vue +67 -0
  89. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  90. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  91. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  92. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  93. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  94. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  95. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  96. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  97. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  98. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  99. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  100. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  101. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  102. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  103. package/uni-components/chat-control/url/icons/index.js +24 -0
  104. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  105. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  106. package/uni-components/chat-control/url/url.vue +306 -0
  107. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  108. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  109. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  110. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  111. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  112. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  113. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  114. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  115. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  116. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  117. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  118. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  119. package/uni-components/chat-control/utils.js +12 -0
  120. package/uni-components/chat-control/video/video.vue +156 -0
  121. package/uni-components/chat-control/voice/voice.vue +166 -0
  122. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  123. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  124. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  125. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  126. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  127. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  128. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  129. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  130. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  131. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  132. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  133. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  134. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  135. package/uni-components/chat-editor/chat-editor.vue +257 -0
  136. package/uni-components/chat-editor/index.js +10 -0
  137. package/uni-components/chat-editor/util.js +65 -0
  138. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  139. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  140. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  141. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  142. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  143. package/uni-components/chat-panel/chat-panel.vue +227 -0
  144. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  145. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  146. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  147. package/common/.DS_Store +0 -0
  148. package/components/.DS_Store +0 -0
  149. package/components/wechat-chat-control/.DS_Store +0 -0
  150. package/components/wechat-chat-control/transfer/.DS_Store +0 -0
  151. package/components/wechat-chat-control/url/.DS_Store +0 -0
  152. package/components/wechat-chat-control/voice/.DS_Store +0 -0
  153. package/components/wework-chat-control/channel-card/channel-card.vue +0 -144
  154. package/components/wework-chat-control/link/.DS_Store +0 -0
  155. package/components/wework-chat-control/merge-message/merge-message-panel.vue +0 -63
  156. package/components/wework-chat-control/merge-message/merge-message.vue +0 -84
  157. package/components/wework-chat-control/merge-message/util.js +0 -59
  158. package/components/wework-chat-control/metting/enterprise-wechat.png +0 -0
  159. package/components/wework-chat-control/metting/meeting-video.svg +0 -4
  160. package/components/wework-chat-control/metting/metting.vue +0 -181
  161. package/components/wework-chat-control/text/text-default.vue +0 -99
  162. package/components/wework-chat-control/text/text-quote.vue +0 -105
  163. package/components/wework-chat-control/url/url-channel-live.vue +0 -53
  164. package/components/wework-chat-control/video/.DS_Store +0 -0
  165. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  166. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  167. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
  168. package/services/.DS_Store +0 -0
@@ -0,0 +1,35 @@
1
+ <script>
2
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
3
+ import { location } from '../../../wework-chat-control'
4
+
5
+ export default {
6
+ name: 'SdkWeworkChatPanelControlsLocation',
7
+ functional: true,
8
+ props: {
9
+ dir: {
10
+ type: String
11
+ },
12
+ data: {
13
+ type: Object,
14
+ required: true
15
+ },
16
+ fetchUserMethod: {
17
+ type: Function
18
+ }
19
+ },
20
+ render (h, c) {
21
+ const { props } = c
22
+ return h(SdkChatPanelBox, {
23
+ props: {
24
+ dir: props.dir,
25
+ data: props.data,
26
+ fetchUserMethod: props.fetchUserMethod
27
+ }
28
+ }, [h(location, {
29
+ props: {
30
+ content: props.data.content
31
+ }
32
+ })])
33
+ }
34
+ }
35
+ </script>
@@ -0,0 +1,43 @@
1
+ <script>
2
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
3
+ import { text } from '../../../wework-chat-control'
4
+
5
+ export default {
6
+ name: 'SdkWeworkChatPanelControlsText',
7
+ functional: true,
8
+ props: {
9
+ dir: {
10
+ type: String
11
+ },
12
+ data: {
13
+ type: Object,
14
+ required: true
15
+ },
16
+ fetchUserMethod: {
17
+ type: Function
18
+ }
19
+ },
20
+ render (h, c) {
21
+ const { props } = c
22
+ return h(SdkChatPanelBox, {
23
+ class: 'sdk-chat-panel-controls-text',
24
+ props: {
25
+ dir: props.dir,
26
+ data: props.data,
27
+ fetchUserMethod: props.fetchUserMethod
28
+ }
29
+ }, [h('div', {
30
+ class: 'sdk-chat-panel-controls-text__main'
31
+ }, [h(text, {
32
+ props: {
33
+ data: props.data
34
+ }
35
+ })])])
36
+ }
37
+ }
38
+ </script>
39
+ <style>
40
+ .sdk-chat-panel-controls-text__main{
41
+ padding: 10px;
42
+ }
43
+ </style>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <sdk-chat-panel-box
3
+ :data="data"
4
+ :dir="dir"
5
+ :fetch-user-method="fetchUserMethod"
6
+ >
7
+ <div class="sdk-wework-chat-panel-controls-unkonw__main">
8
+ 未知消息
9
+ </div>
10
+ </sdk-chat-panel-box>
11
+ </template>
12
+ <script>
13
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
14
+
15
+ export default {
16
+ name: 'SdkWeworkChatPanelControlsUnkonw',
17
+ components: {
18
+ SdkChatPanelBox
19
+ },
20
+ props: {
21
+ dir: {
22
+ type: String
23
+ },
24
+ data: {
25
+ type: Object,
26
+ required: true
27
+ },
28
+ fetchUserMethod: {
29
+ type: Function
30
+ }
31
+ }
32
+ }
33
+ </script>
34
+ <style lang="less">
35
+ .sdk-wework-chat-panel-controls-unkonw__main{
36
+ padding: 12px;
37
+ color: #999;
38
+ }
39
+ </style>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <sdk-chat-panel-box
3
+ :data="data"
4
+ :dir="dir"
5
+ :fetch-user-method="fetchUserMethod"
6
+ >
7
+ <sdk-chat-control-video
8
+ :data="data"
9
+ width="240px"
10
+ height="180px"
11
+ ></sdk-chat-control-video>
12
+ </sdk-chat-panel-box>
13
+ </template>
14
+ <script>
15
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
16
+ import { video } from '../../../wework-chat-control'
17
+
18
+ export default {
19
+ name: 'SdkWeworkChatPanelControlsVideo',
20
+ components: {
21
+ SdkChatPanelBox,
22
+ SdkChatControlVideo: video
23
+ },
24
+ props: {
25
+ dir: {
26
+ type: String
27
+ },
28
+ data: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+ fetchUserMethod: {
33
+ type: Function
34
+ }
35
+ }
36
+ }
37
+ </script>
@@ -0,0 +1,35 @@
1
+ <script>
2
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
3
+ import { voice } from '../../../wework-chat-control'
4
+
5
+ export default {
6
+ name: 'SdkWeworkChatPanelControlsVoice',
7
+ functional: true,
8
+ props: {
9
+ dir: {
10
+ type: String
11
+ },
12
+ data: {
13
+ type: Object,
14
+ required: true
15
+ },
16
+ fetchUserMethod: {
17
+ type: Function
18
+ }
19
+ },
20
+ render (h, c) {
21
+ const { props } = c
22
+ return h(SdkChatPanelBox, {
23
+ props: {
24
+ dir: props.dir,
25
+ data: props.data,
26
+ fetchUserMethod: props.fetchUserMethod
27
+ }
28
+ }, [h(voice, {
29
+ props: {
30
+ content: props.data.content
31
+ }
32
+ })])
33
+ }
34
+ }
35
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <wework-chat-control-config-msg
2
+ <wechat-chat-control-config-msg
3
3
  :msgData="item"
4
4
  >
5
5
  <template slot-scope="{ configData }">
@@ -7,7 +7,7 @@
7
7
  <template v-if="item.msgType !== '_EMPTY_'">
8
8
  <slot name="chat-prefix" :item="item"></slot>
9
9
  </template>
10
- <template v-if="item.msgType === MESSAGE_TYPE.TEXT || item.msgType === MESSAGE_TYPE.TEXT_W">
10
+ <template v-if="[0, 1, 2].includes(item.msgType)">
11
11
  <sdk-chat-panel-box
12
12
  :dir="dir"
13
13
  :data="item"
@@ -16,20 +16,17 @@
16
16
  @user-avatar-click="handleUserAvatarClick"
17
17
  @user-avatar-contextmenu="handleUserAvatarContextmenu"
18
18
  >
19
- <template slot-scope="{ setFootVnode }">
20
- <sdk-chat-control-text
21
- v-bind="configData"
22
- :id="item.id"
23
- :content="msgContent"
24
- :set-chat-box-foot-vnode="setFootVnode"
25
- ></sdk-chat-control-text>
26
- </template>
19
+ <sdk-chat-control-text
20
+ v-bind="configData"
21
+ :id="item.id"
22
+ :content="msgContent"
23
+ ></sdk-chat-control-text>
27
24
  <template slot="append" slot-scope="{ updateProp }">
28
25
  <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
29
26
  </template>
30
27
  </sdk-chat-panel-box>
31
28
  </template>
32
- <template v-else-if="item.msgType === MESSAGE_TYPE.IMAGE">
29
+ <template v-else-if="[14, 101].includes(item.msgType)">
33
30
  <sdk-chat-panel-box
34
31
  :dir="dir"
35
32
  :data="item"
@@ -48,7 +45,7 @@
48
45
  </template>
49
46
  </sdk-chat-panel-box>
50
47
  </template>
51
- <template v-else-if="item.msgType === MESSAGE_TYPE.VIDEO">
48
+ <template v-else-if="[22, 23, 103].includes(item.msgType)">
52
49
  <sdk-chat-panel-box
53
50
  :dir="dir"
54
51
  :data="item"
@@ -292,7 +289,7 @@
292
289
  </template>
293
290
  </sdk-chat-panel-box>
294
291
  </template>
295
- <template v-else-if="item.msgType == MESSAGE_TYPE.URLFile">
292
+ <template v-else-if="item.msgType == MESSAGE_TYPE.URL">
296
293
  <sdk-chat-panel-box
297
294
  :dir="dir"
298
295
  :data="item"
@@ -303,19 +300,19 @@
303
300
  @user-avatar-contextmenu="handleUserAvatarContextmenu"
304
301
  >
305
302
  <template slot-scope="{ updateProp }">
306
- <sdk-chat-control-file-url
303
+ <sdk-chat-control-url
307
304
  v-bind="configData"
308
305
  :id="item.id"
309
306
  :content="msgContent"
310
307
  :update-chat-box-prop="updateProp"
311
- ></sdk-chat-control-file-url>
308
+ ></sdk-chat-control-url>
312
309
  </template>
313
310
  <template slot="append" slot-scope="{ updateProp }">
314
311
  <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
315
312
  </template>
316
313
  </sdk-chat-panel-box>
317
314
  </template>
318
- <template v-else-if="item.msgType == MESSAGE_TYPE.URL || item.msgType == MESSAGE_TYPE.URLNew">
315
+ <template v-else-if="[13, 15, 20, 102].includes(item.msgType)">
319
316
  <sdk-chat-panel-box
320
317
  :dir="dir"
321
318
  :data="item"
@@ -326,12 +323,12 @@
326
323
  @user-avatar-contextmenu="handleUserAvatarContextmenu"
327
324
  >
328
325
  <template slot-scope="{ updateProp }">
329
- <sdk-chat-control-url
326
+ <sdk-chat-control-file-url
330
327
  v-bind="configData"
331
328
  :id="item.id"
332
329
  :content="msgContent"
333
330
  :update-chat-box-prop="updateProp"
334
- ></sdk-chat-control-url>
331
+ ></sdk-chat-control-file-url>
335
332
  </template>
336
333
  <template slot="append" slot-scope="{ updateProp }">
337
334
  <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
@@ -356,43 +353,19 @@
356
353
  </template>
357
354
  </sdk-chat-panel-box>
358
355
  </template>
359
- <template v-else-if="item.msgType === MESSAGE_TYPE.MEETING">
356
+ <template v-else-if="item.msgType == MESSAGE_TYPE.CUSTOM_EXPRESSION_W">
360
357
  <sdk-chat-panel-box
361
358
  :dir="dir"
362
359
  :data="item"
363
360
  :fetchUserMethod="fetchUserMethod"
364
- :blank="true"
365
361
  @user-avatar-click="handleUserAvatarClick"
366
362
  @user-avatar-contextmenu="handleUserAvatarContextmenu"
367
363
  >
368
- <template slot-scope="{ updateProp }">
369
- <sdk-chat-control-metting
370
- v-bind="configData"
371
- :id="item.id"
372
- :content="msgContent"
373
- :initiator="item.qwAccountName || item.contactName || item.ownerAccountUserName"
374
- :update-chat-box-prop="updateProp"
375
- ></sdk-chat-control-metting>
376
- </template>
377
- <template slot="append" slot-scope="{ updateProp }">
378
- <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
379
- </template>
380
- </sdk-chat-panel-box>
381
- </template>
382
- <template v-else-if="item.msgType === MESSAGE_TYPE.MERGE_MESSAGE">
383
- <sdk-chat-panel-box
384
- :dir="dir"
385
- :data="item"
386
- :fetchUserMethod="fetchUserMethod"
387
- :blank="true"
388
- @user-avatar-click="handleUserAvatarClick"
389
- @user-avatar-contextmenu="handleUserAvatarContextmenu"
390
- >
391
- <sdk-chat-control-merge-message
364
+ <sdk-chat-control-custom-expression
392
365
  v-bind="configData"
393
366
  :id="item.id"
394
367
  :content="msgContent"
395
- ></sdk-chat-control-merge-message>
368
+ ></sdk-chat-control-custom-expression>
396
369
  <template slot="append" slot-scope="{ updateProp }">
397
370
  <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
398
371
  </template>
@@ -537,7 +510,7 @@
537
510
  :content="msgContent"
538
511
  ></sdk-chat-control-empty>
539
512
  </template>
540
- <template v-else>
513
+ <!-- <template v-else>
541
514
  <sdk-chat-panel-box
542
515
  :dir="dir"
543
516
  :data="item"
@@ -550,10 +523,10 @@
550
523
  :content="msgContent"
551
524
  ></sdk-chat-control-unknow>
552
525
  </sdk-chat-panel-box>
553
- </template>
526
+ </template> -->
554
527
  </div>
555
528
  </template>
556
- </wework-chat-control-config-msg>
529
+ </wechat-chat-control-config-msg>
557
530
  </template>
558
531
  <script>
559
532
  import SdkChatPanelBox from '../chat-panel/chat-panel-box'
@@ -572,8 +545,6 @@ import {
572
545
  channelVideo as SdkChatControlChannelVideo,
573
546
  // channelVideoCard as SdkChatControlChannelVideoCard,
574
547
  channelLive as SdkChatControlChannelLive,
575
- metting as SdkChatControlMetting,
576
- mergeMessage as SdkChatControlMergeMessage,
577
548
  url as SdkChatControlUrl,
578
549
  fileUrl as SdkChatControlFileUrl,
579
550
  jxSysText as SdkChatControlJxSysText,
@@ -593,10 +564,10 @@ import {
593
564
  unknow as SdkChatControlUnknow
594
565
  } from '../wework-chat-control'
595
566
  import { MESSAGE_TYPE } from '../wework-chat-control/util'
596
- import WeworkChatControlConfigMsg from '../wework-chat-control/wework-chat-control-config-msg.vue'
567
+ import WechatChatControlConfigMsg from '../wechat-chat-control/wechat-chat-control-config-msg.vue'
597
568
 
598
569
  export default {
599
- name: 'SdkWeworkPanelItem',
570
+ name: 'SdkWechatPanelItem',
600
571
  components: {
601
572
  SdkChatPanelBox,
602
573
  SdkChatControlText,
@@ -612,8 +583,6 @@ export default {
612
583
  SdkChatControlChannelVideo,
613
584
  // SdkChatControlChannelVideoCard,
614
585
  SdkChatControlChannelLive,
615
- SdkChatControlMetting,
616
- SdkChatControlMergeMessage,
617
586
  SdkChatControlFileUrl,
618
587
  // SdkChatControlTextWithAt,
619
588
  SdkChatControlUrl,
@@ -632,7 +601,7 @@ export default {
632
601
  // SdkChatControlRevokeMeMessage,
633
602
  // SdkChatControlRevokeOtherMessage,
634
603
  // SdkChatControlRevokeYouMessage,
635
- WeworkChatControlConfigMsg
604
+ WechatChatControlConfigMsg
636
605
  },
637
606
  props: {
638
607
  dir: {
@@ -678,4 +647,4 @@ export default {
678
647
  }
679
648
  }
680
649
  }
681
- </script>
650
+ </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <sdk-chat-panel
3
3
  ref="panel"
4
- v-bind="props"
4
+ v-bind="$props"
5
5
  :is-sender-method="handleIsSenderMethod"
6
6
  @initloaded="handleChatsInitLoaded"
7
7
  @chat-contextmenu="handleChatContext"
@@ -17,12 +17,12 @@
17
17
  :fetch-user-method="fetchUserMethod"
18
18
  :config="config"
19
19
  >
20
- <template slot="chat-append" slot-scope="{ item, updateProp }">
20
+ <!-- <template slot="chat-append" slot-scope="{ item, updateProp }">
21
21
  <chat-panel-chat-status
22
22
  :data="item"
23
23
  :update-chat-box-prop="updateProp"
24
24
  ></chat-panel-chat-status>
25
- </template>
25
+ </template> -->
26
26
  <template slot="chat-prefix" slot-scope="{ item }">
27
27
  <template v-if="selectable && handleFilterSelectMessageMethod(item)">
28
28
  <div class="sdk-wechat-chat-panel__checkbox">
@@ -37,23 +37,18 @@
37
37
  </template>
38
38
  <template slot="main">
39
39
  <slot name="main"></slot>
40
- <template v-if="selectable">
41
- <slot name="selection" :total="checkTotal"></slot>
42
- </template>
43
40
  </template>
44
41
  </sdk-chat-panel>
45
42
  </template>
46
43
  <script>
47
44
  import SdkChatPanel from '../chat-panel'
48
45
  import ChatPanelItem from './chat-panel-item.vue'
49
- import ChatPanelChatStatus from './chat-panel-chat-status/chat-panel-chat-status.vue'
50
46
 
51
47
  export default {
52
48
  name: 'SdkWeworkChatPanel',
53
49
  components: {
54
50
  SdkChatPanel,
55
- ChatPanelItem,
56
- ChatPanelChatStatus
51
+ ChatPanelItem
57
52
  },
58
53
  props: {
59
54
  mode: {
@@ -64,8 +59,7 @@ export default {
64
59
  }
65
60
  },
66
61
  keyField: {
67
- type: String,
68
- default: 'id'
62
+ type: String
69
63
  },
70
64
  startDate: {
71
65
  type: Number
@@ -94,6 +88,9 @@ export default {
94
88
  type: Boolean,
95
89
  default: true
96
90
  },
91
+ renderControl: {
92
+ type: Function
93
+ },
97
94
  fetchUserMethod: {
98
95
  type: Function
99
96
  },
@@ -129,35 +126,14 @@ export default {
129
126
  },
130
127
  contextChatId: {
131
128
  type: String
132
- },
133
- onBeforeSelectionChange: {
134
- type: Function
135
- }
136
- },
137
- data () {
138
- return {
139
- checkMsgMap: {}
140
- }
141
- },
142
- computed: {
143
- props () {
144
- const { config, ...nextProps } = this.$props
145
- return nextProps
146
- },
147
- checkTotal () {
148
- return Object.keys(this.checkMsgMap).length
149
- }
150
- },
151
- watch: {
152
- selectable () {
153
- if (!this.selectable) {
154
- this.checkMsgMap = {}
155
- }
156
129
  }
157
130
  },
158
131
  methods: {
132
+ handleRenderControl ({ item }) {
133
+ return ChatControls[item.msgType] || ChatControls.unkonw
134
+ },
159
135
  handleIsSenderMethod ({ item }) {
160
- return !!item.isSend
136
+ return !!item.send
161
137
  },
162
138
  handleChatsInitLoaded () {
163
139
  this.$emit('initloaded')
@@ -172,67 +148,8 @@ export default {
172
148
  this.currentContextChat = null
173
149
  return this.$refs.panel && this.$refs.panel.reload()
174
150
  },
175
- handleFilterSelectMessageMethod (msg) {
176
- if (!this.filterSelectMessageMethod) {
177
- return true
178
- }
179
- return this.filterSelectMessageMethod({
180
- item: msg
181
- })
182
- },
183
- handleMsgCheckboxChange (msg, value) {
184
- if (value) {
185
- this.selectChat(msg)
186
- } else {
187
- this.unselectChat(msg)
188
- }
189
- },
190
- selectChat (chat) {
191
- if (!chat) {
192
- return
193
- }
194
- if (!this.selectable) {
195
- console.warn('未开启选择')
196
- return
197
- }
198
- if (this.onBeforeSelectionChange && this.onBeforeSelectionChange({
199
- chat,
200
- value: true
201
- }) === false) {
202
- return
203
- }
204
- this.$set(this.checkMsgMap, chat[this.keyField], chat)
205
- },
206
- unselectChat (chat) {
207
- if (!chat) {
208
- return
209
- }
210
- if (!this.selectable) {
211
- console.warn('未开启选择')
212
- return
213
- }
214
- if (this.onBeforeSelectionChange && this.onBeforeSelectionChange({
215
- chat,
216
- value: false
217
- }) === false) {
218
- return
219
- }
220
- this.$delete(this.checkMsgMap, chat[this.keyField])
221
- },
222
- unselectAllChat () {
223
- return Object.keys(this.checkMsgMap).map(key => {
224
- return this.unselectChat(this.checkMsgMap[key])
225
- })
226
- },
227
- getSelectChats () {
228
- return Object.keys(this.checkMsgMap).map(key => {
229
- return this.checkMsgMap[key]
230
- })
231
- },
232
151
  handleChatContext (item, evt) {
233
- this.$emit('chat-contextmenu', {
234
- item
235
- }, evt)
152
+ this.$emit('chat-contextmenu', item, evt)
236
153
  },
237
154
  handleChatViewContext ({ item }) {
238
155
  this.$emit('chat-view-context', {
package/package.json CHANGED
@@ -1,16 +1,9 @@
1
1
  {
2
2
  "name": "@aochuang/client-sdk",
3
- "version": "1.0.363",
3
+ "version": "1.0.364",
4
4
  "description": "",
5
- "files": [
6
- "common",
7
- "components",
8
- "services",
9
- "utils",
10
- "dist"
11
- ],
12
- "exports": {
13
- ".": "./components/index.js"
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1"
14
7
  },
15
8
  "repository": {
16
9
  "type": "git",