@aochuang/client-sdk 1.0.358 → 1.0.359

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 (153) hide show
  1. package/components/index.js +1 -6
  2. package/components/session-select/session-select-item.vue +9 -8
  3. package/components/wechat-chat-control/image/image.vue +8 -13
  4. package/components/wechat-chat-control/url/url-miniprogram.vue +5 -1
  5. package/components/wework-chat-control/channel-live/channel-live.vue +2 -7
  6. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  7. package/components/wework-chat-control/custom-expression/custom-expression.vue +1 -2
  8. package/components/wework-chat-control/file-url/file-url.vue +16 -34
  9. package/components/wework-chat-control/image/image.vue +2 -137
  10. package/components/wework-chat-control/index.js +7 -10
  11. package/components/wework-chat-control/location/location.vue +3 -3
  12. package/components/wework-chat-control/text/text.vue +144 -24
  13. package/components/wework-chat-control/url/url-miniprogram.vue +7 -6
  14. package/components/wework-chat-control/url/url.vue +2 -26
  15. package/components/wework-chat-control/util.js +19 -22
  16. package/components/wework-chat-control/video/video.vue +2 -10
  17. package/components/wework-chat-control/voice/voice.vue +4 -59
  18. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  19. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  20. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  22. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  23. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  24. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  25. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  26. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  27. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  28. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  29. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  30. package/components/wework-chat-panel/chat-panel-item.vue +28 -38
  31. package/components/wework-chat-panel/chat-panel.vue +13 -96
  32. package/package.json +3 -10
  33. package/services/client-chat/client-chat-wechat/client-chat-session.js +196 -92
  34. package/services/client-chat/client-chat-wechat/client-chat.js +20 -33
  35. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  36. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -45
  37. package/services/client-chat/client-chat-wework/client-chat-session.js +2 -50
  38. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -9
  39. package/services/client-chat/client-chat-wework/client-chat.js +11 -281
  40. package/services/client-chat/client-chat-wework/utils.js +5 -5
  41. package/uni-common/account-portray/account-portray.vue +51 -0
  42. package/uni-common/account-select/account-select-item.vue +172 -0
  43. package/uni-common/account-select/account-select.vue +252 -0
  44. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  45. package/uni-common/friend-avatar/default.svg +1 -0
  46. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  47. package/uni-common/friend-avatar/index.js +3 -0
  48. package/uni-common/friend-loader/friend-loader.vue +53 -0
  49. package/uni-common/friend-portray/friend-portray.vue +56 -0
  50. package/uni-common/group-avatar/default.svg +1 -0
  51. package/uni-common/group-avatar/group-avatar.vue +18 -0
  52. package/uni-common/group-avatar/index.js +3 -0
  53. package/uni-common/room-avatar/default.svg +6 -0
  54. package/uni-common/room-avatar/index.js +3 -0
  55. package/uni-common/room-avatar/room-avatar.vue +27 -0
  56. package/uni-common/room-loader/room-loader.vue +53 -0
  57. package/uni-common/room-portray/room-portray.vue +56 -0
  58. package/uni-components/chat-control/calling/calling.vue +91 -0
  59. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  60. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  61. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  62. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  63. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  64. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  65. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  66. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  67. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  68. package/{components/wework-chat-control/wework-chat-control-config.vue → uni-components/chat-control/chat-control-config.vue} +13 -16
  69. package/uni-components/chat-control/chat-control.vue +218 -0
  70. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  71. package/uni-components/chat-control/const.js +28 -0
  72. package/uni-components/chat-control/expression/expression.vue +41 -0
  73. package/uni-components/chat-control/image/image.vue +68 -0
  74. package/uni-components/chat-control/index.js +89 -0
  75. package/uni-components/chat-control/location/location.vue +110 -0
  76. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  77. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  78. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  79. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  80. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  81. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  82. package/uni-components/chat-control/system/system.vue +69 -0
  83. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  84. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  85. package/uni-components/chat-control/text/text.vue +67 -0
  86. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  87. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  88. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  89. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  90. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  91. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  92. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  93. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  94. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  95. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  96. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  97. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  98. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  99. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  100. package/uni-components/chat-control/url/icons/index.js +24 -0
  101. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  102. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  103. package/uni-components/chat-control/url/url.vue +306 -0
  104. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  105. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  106. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  107. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  108. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  109. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  110. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  111. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  112. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  113. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  114. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  115. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  116. package/uni-components/chat-control/utils.js +12 -0
  117. package/uni-components/chat-control/video/video.vue +156 -0
  118. package/uni-components/chat-control/voice/voice.vue +166 -0
  119. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  120. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  121. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  122. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  123. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  124. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  125. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  126. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  127. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  128. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  129. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  130. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  131. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  132. package/uni-components/chat-editor/chat-editor.vue +257 -0
  133. package/uni-components/chat-editor/index.js +10 -0
  134. package/uni-components/chat-editor/util.js +65 -0
  135. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  136. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  137. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  138. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  139. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  140. package/uni-components/chat-panel/chat-panel.vue +227 -0
  141. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  142. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  143. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  144. package/components/wework-chat-control/channel-card/channel-card.vue +0 -144
  145. package/components/wework-chat-control/metting/enterprise-wechat.png +0 -0
  146. package/components/wework-chat-control/metting/meeting-video.svg +0 -4
  147. package/components/wework-chat-control/metting/metting.vue +0 -181
  148. package/components/wework-chat-control/text/text-default.vue +0 -99
  149. package/components/wework-chat-control/text/text-quote.vue +0 -105
  150. package/components/wework-chat-control/url/url-channel-live.vue +0 -53
  151. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  152. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  153. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
@@ -0,0 +1,28 @@
1
+ <script>
2
+ import { jxSysText } from '../../../wework-chat-control'
3
+
4
+ export default {
5
+ name: 'SdkWeworkChatPanelControlsJxSysText',
6
+ functional: true,
7
+ props: {
8
+ dir: {
9
+ type: String
10
+ },
11
+ data: {
12
+ type: Object,
13
+ required: true
14
+ },
15
+ fetchUserMethod: {
16
+ type: Function
17
+ }
18
+ },
19
+ render (h, c) {
20
+ const { props } = c
21
+ return h(jxSysText, {
22
+ props: {
23
+ content: props.data.content
24
+ }
25
+ })
26
+ }
27
+ }
28
+ </script>
@@ -0,0 +1,35 @@
1
+ <script>
2
+ import SdkChatPanelBox from '../../../chat-panel/chat-panel-box'
3
+ import { link } from '../../../wework-chat-control'
4
+
5
+ export default {
6
+ name: 'SdkWeworkChatPanelControlsLink',
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(link, {
29
+ props: {
30
+ data: props.data
31
+ }
32
+ })])
33
+ }
34
+ }
35
+ </script>
@@ -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,24 +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>
364
+ <sdk-chat-control-custom-expression
365
+ v-bind="configData"
366
+ :id="item.id"
367
+ :content="msgContent"
368
+ ></sdk-chat-control-custom-expression>
377
369
  <template slot="append" slot-scope="{ updateProp }">
378
370
  <slot name="chat-append" :item="item" :update-chat-box-prop="updateProp"></slot>
379
371
  </template>
@@ -518,7 +510,7 @@
518
510
  :content="msgContent"
519
511
  ></sdk-chat-control-empty>
520
512
  </template>
521
- <template v-else>
513
+ <!-- <template v-else>
522
514
  <sdk-chat-panel-box
523
515
  :dir="dir"
524
516
  :data="item"
@@ -531,10 +523,10 @@
531
523
  :content="msgContent"
532
524
  ></sdk-chat-control-unknow>
533
525
  </sdk-chat-panel-box>
534
- </template>
526
+ </template> -->
535
527
  </div>
536
528
  </template>
537
- </wework-chat-control-config-msg>
529
+ </wechat-chat-control-config-msg>
538
530
  </template>
539
531
  <script>
540
532
  import SdkChatPanelBox from '../chat-panel/chat-panel-box'
@@ -553,7 +545,6 @@ import {
553
545
  channelVideo as SdkChatControlChannelVideo,
554
546
  // channelVideoCard as SdkChatControlChannelVideoCard,
555
547
  channelLive as SdkChatControlChannelLive,
556
- metting as SdkChatControlMetting,
557
548
  url as SdkChatControlUrl,
558
549
  fileUrl as SdkChatControlFileUrl,
559
550
  jxSysText as SdkChatControlJxSysText,
@@ -573,10 +564,10 @@ import {
573
564
  unknow as SdkChatControlUnknow
574
565
  } from '../wework-chat-control'
575
566
  import { MESSAGE_TYPE } from '../wework-chat-control/util'
576
- 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'
577
568
 
578
569
  export default {
579
- name: 'SdkWeworkPanelItem',
570
+ name: 'SdkWechatPanelItem',
580
571
  components: {
581
572
  SdkChatPanelBox,
582
573
  SdkChatControlText,
@@ -592,7 +583,6 @@ export default {
592
583
  SdkChatControlChannelVideo,
593
584
  // SdkChatControlChannelVideoCard,
594
585
  SdkChatControlChannelLive,
595
- SdkChatControlMetting,
596
586
  SdkChatControlFileUrl,
597
587
  // SdkChatControlTextWithAt,
598
588
  SdkChatControlUrl,
@@ -611,7 +601,7 @@ export default {
611
601
  // SdkChatControlRevokeMeMessage,
612
602
  // SdkChatControlRevokeOtherMessage,
613
603
  // SdkChatControlRevokeYouMessage,
614
- WeworkChatControlConfigMsg
604
+ WechatChatControlConfigMsg
615
605
  },
616
606
  props: {
617
607
  dir: {
@@ -657,4 +647,4 @@ export default {
657
647
  }
658
648
  }
659
649
  }
660
- </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.358",
3
+ "version": "1.0.359",
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",