@aochuang/client-sdk 1.0.340 → 1.0.342

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 (38) 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/calling/calling.vue +3 -0
  4. package/components/wechat-chat-control/voice/voice.vue +4 -0
  5. package/components/wework-chat-control/company-card/company-card.vue +1 -1
  6. package/components/wework-chat-control/file-url/file-url.vue +5 -2
  7. package/components/wework-chat-control/image/image.vue +2 -137
  8. package/components/wework-chat-control/index.js +6 -6
  9. package/components/wework-chat-control/text/text.vue +3 -22
  10. package/components/wework-chat-control/util.js +6 -12
  11. package/components/wework-chat-control/video/video.vue +2 -10
  12. package/components/wework-chat-control/voice/voice.vue +1 -1
  13. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  14. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  15. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  16. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  17. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  18. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  19. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  20. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  21. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  22. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  23. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  24. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  25. package/components/wework-chat-panel/chat-panel-item.vue +35 -12
  26. package/components/wework-chat-panel/chat-panel.vue +12 -95
  27. package/package.json +1 -1
  28. package/services/client-chat/client-chat-wechat/client-chat.js +20 -8
  29. package/services/client-chat/client-chat-wework/client-chat-concats.js +17 -81
  30. package/services/client-chat/client-chat-wework/client-chat-message.js +5 -5
  31. package/services/client-chat/client-chat-wework/client-chat-session.js +2 -50
  32. package/services/client-chat/client-chat-wework/client-chat-socket.js +1 -5
  33. package/services/client-chat/client-chat-wework/client-chat.js +6 -258
  34. package/services/client-chat/client-chat-wework/utils.js +5 -5
  35. package/components/wework-chat-control/wework-chat-control-config-item.vue +0 -24
  36. package/components/wework-chat-control/wework-chat-control-config-msg.vue +0 -25
  37. package/components/wework-chat-control/wework-chat-control-config.vue +0 -62
  38. package/components/wework-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +0 -73
@@ -1,62 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'SdkWeworkChatControlConfig',
4
- provide () {
5
- return {
6
- SdkWeworkChatControlConfig: this
7
- }
8
- },
9
- inject: {
10
- // 可以继承上级的
11
- SdkWeworkChatControlConfig: {
12
- default: null
13
- }
14
- },
15
- props: {
16
- /**
17
- * 这个是组件级别的配置,weworkChatPanel是消息级别的配置,后面是消息级别配置覆盖组件级别的配置
18
- * {
19
- * 1: {
20
- * formatter () {
21
- * xxx
22
- * }
23
- * }
24
- * }
25
- */
26
- controlConfig: {
27
- type: Object
28
- },
29
- /**
30
- * 消息级别配置,消息级别配置会覆盖控件级别配置
31
- * 主要是项目里面有几种实用场景,第一种聊天记录,第二种风控,第三种消息预览
32
- */
33
- messageConfig: {
34
- type: Function
35
- }
36
- },
37
- render () {
38
- return this.$slots.default
39
- },
40
- methods: {
41
- getControlConfig (msgType) {
42
- if (!this.controlConfig) {
43
- return
44
- }
45
- return this.controlConfig[msgType]
46
- },
47
- getMessageConfig (msgData) {
48
- const controlConfig = this.getControlConfig(msgData.msgType)
49
- if (!this.messageConfig) {
50
- return controlConfig
51
- }
52
- const messageConfig = this.messageConfig({
53
- item: msgData
54
- })
55
- if (!messageConfig) {
56
- return controlConfig
57
- }
58
- return Object.assign({}, controlConfig, messageConfig)
59
- }
60
- }
61
- }
62
- </script>
@@ -1,73 +0,0 @@
1
- <template>
2
- <div class="sdk-wework-panel-chat-status">
3
- <!-- status: 0 success, 1 sending, 2 failed, 3 timeout -->
4
- <template v-if="data.status === 1">
5
- <ui-loading size="mini"></ui-loading>
6
- </template>
7
- <template v-else-if="data.status === 2">
8
- <bi-tooltip :text="data.resultMsg || '发送失败'">
9
- <span class="sdk-wework-panel-chat-status__error">
10
- <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667z m0-486.997334L391.338667 330.965333 330.965333 391.338667 451.669333 512l-120.704 120.661333 60.373334 60.373334L512 572.330667l120.661333 120.704 60.373334-60.373334L572.330667 512l120.704-120.661333-60.373334-60.373334L512 451.669333z" fill="currentColor"></path></svg>
11
- </span>
12
- </bi-tooltip>
13
- </template>
14
- <template v-else-if="data.status === 3">
15
- <bi-tooltip :text="data.resultMsg || '发送超时'">
16
- <span class="sdk-wework-panel-chat-status__error">
17
- <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667z m42.666667-426.666667V298.666667h-85.333334v298.666666h256v-85.333333h-170.666666z" fill="currentColor"></path></svg>
18
- </span>
19
- </bi-tooltip>
20
- </template>
21
- <template v-if="data.recalled">
22
- <bi-tooltip text="消息已撤回">
23
- <span class="sdk-wework-panel-chat-status__error sdk-wework-panel-chat-status__recalled">
24
- <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 0c282.752 0 512 229.248 512 512s-229.248 512-512 512S0 794.752 0 512 229.248 0 512 0z m-50.261333 255.317333c-7.765333-39.338667-39.893333-15.36-39.893334-15.36l-213.76 192c-47.616 34.944-2.730667 60.458667-2.730666 60.458667l211.541333 190.933333c42.410667 33.066667 45.866667-17.749333 45.866667-17.749333v-86.442667c215.125333-70.144 303.36 208.341333 303.36 208.341334 7.936 15.957333 13.824 0 13.824 0C862.933333 368.682667 461.952 348.586667 461.952 348.586667z" fill="currentColor"></path></svg>
25
- </span>
26
- </bi-tooltip>
27
- </template>
28
- </div>
29
- </template>
30
-
31
- <script>
32
- import { Tooltip as BiTooltip } from '@aochuang/common/common'
33
- import { Loading as UiLoading } from '@aochuang/common/components'
34
-
35
- export default {
36
- name: 'SdkWeworkPanelChatStatus',
37
- components: {
38
- BiTooltip,
39
- UiLoading
40
- },
41
- props: {
42
- data: {
43
- type: Object,
44
- required: true
45
- },
46
- updateChatBoxProp: {
47
- type: Function
48
- }
49
- }
50
- }
51
- </script>
52
-
53
- <style lang="less">
54
- .sdk-wework-panel-chat-status__error {
55
- display: flex;
56
- flex-direction: row;
57
- align-items: center;
58
- font-size: 12px;
59
- color: #c00;
60
- width: 16px;
61
- height: 16px;
62
- svg {
63
- width: 100%;
64
- height: 100%;
65
- }
66
- }
67
- .sdk-wework-panel-chat-status__recalled {
68
- opacity: .6;
69
- }
70
- .sdk-wework-panel-chat-status {
71
- margin: 0 6px;
72
- }
73
- </style>