@fle-ui/plus-im-record 0.0.8-beta.0 → 0.0.8-beta.1

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 (79) hide show
  1. package/es/@types/index.d.ts +620 -0
  2. package/es/CardTag/index.d.ts +3 -0
  3. package/es/CardTag/index.js +18 -0
  4. package/es/ChatMessageItem/index.d.ts +15 -0
  5. package/es/ChatMessageItem/index.js +130 -0
  6. package/es/ChatMessageItem/index.less +108 -0
  7. package/es/ChatMessageList/index.d.ts +28 -0
  8. package/es/ChatMessageList/index.js +58 -0
  9. package/es/ChatMessageList/index.less +34 -0
  10. package/es/GoodsCard/index.d.ts +15 -0
  11. package/es/GoodsCard/index.js +95 -0
  12. package/es/GoodsCard/index.less +49 -0
  13. package/es/GoodsOrderCard/index.d.ts +14 -0
  14. package/es/GoodsOrderCard/index.js +161 -0
  15. package/es/GoodsOrderCard/index.less +81 -0
  16. package/es/Icon/index.d.ts +8 -0
  17. package/es/Icon/index.js +11 -0
  18. package/es/ParseSession/AudioPlayer.d.ts +14 -0
  19. package/es/ParseSession/AudioPlayer.js +89 -0
  20. package/es/ParseSession/audioAndVideoTool.d.ts +3 -0
  21. package/es/ParseSession/audioAndVideoTool.js +21 -0
  22. package/es/ParseSession/index.d.ts +15 -0
  23. package/es/ParseSession/index.js +492 -0
  24. package/es/ParseSession/index.less +226 -0
  25. package/es/api/index.d.ts +30 -0
  26. package/es/api/index.js +48 -0
  27. package/es/audioAndVideoTool.d.ts +3 -0
  28. package/es/audioAndVideoTool.js +21 -0
  29. package/es/common/const/index.d.ts +46 -0
  30. package/es/common/const/index.js +82 -0
  31. package/es/common/utils/index.d.ts +33 -0
  32. package/es/common/utils/index.js +169 -0
  33. package/es/index.d.ts +28 -0
  34. package/es/index.js +77 -0
  35. package/es/styles/extends.less +50 -0
  36. package/es/styles/index.less +35 -0
  37. package/es/styles/vars.less +8 -0
  38. package/es/utils/index.d.ts +14 -0
  39. package/es/utils/index.js +50 -0
  40. package/lib/@types/index.d.ts +620 -0
  41. package/lib/CardTag/index.d.ts +3 -0
  42. package/lib/CardTag/index.js +25 -0
  43. package/lib/ChatMessageItem/index.d.ts +15 -0
  44. package/lib/ChatMessageItem/index.js +136 -0
  45. package/lib/ChatMessageItem/index.less +108 -0
  46. package/lib/ChatMessageList/index.d.ts +28 -0
  47. package/lib/ChatMessageList/index.js +65 -0
  48. package/lib/ChatMessageList/index.less +34 -0
  49. package/lib/GoodsCard/index.d.ts +15 -0
  50. package/lib/GoodsCard/index.js +105 -0
  51. package/lib/GoodsCard/index.less +49 -0
  52. package/lib/GoodsOrderCard/index.d.ts +14 -0
  53. package/lib/GoodsOrderCard/index.js +169 -0
  54. package/lib/GoodsOrderCard/index.less +81 -0
  55. package/lib/Icon/index.d.ts +8 -0
  56. package/lib/Icon/index.js +18 -0
  57. package/lib/ParseSession/AudioPlayer.d.ts +14 -0
  58. package/lib/ParseSession/AudioPlayer.js +98 -0
  59. package/lib/ParseSession/audioAndVideoTool.d.ts +3 -0
  60. package/lib/ParseSession/audioAndVideoTool.js +27 -0
  61. package/lib/ParseSession/index.d.ts +15 -0
  62. package/lib/ParseSession/index.js +494 -0
  63. package/lib/ParseSession/index.less +226 -0
  64. package/lib/api/index.d.ts +30 -0
  65. package/lib/api/index.js +55 -0
  66. package/lib/audioAndVideoTool.d.ts +3 -0
  67. package/lib/audioAndVideoTool.js +27 -0
  68. package/lib/common/const/index.d.ts +46 -0
  69. package/lib/common/const/index.js +88 -0
  70. package/lib/common/utils/index.d.ts +33 -0
  71. package/lib/common/utils/index.js +183 -0
  72. package/lib/index.d.ts +28 -0
  73. package/lib/index.js +86 -0
  74. package/lib/styles/extends.less +50 -0
  75. package/lib/styles/index.less +35 -0
  76. package/lib/styles/vars.less +8 -0
  77. package/lib/utils/index.d.ts +14 -0
  78. package/lib/utils/index.js +56 -0
  79. package/package.json +2 -2
@@ -0,0 +1,226 @@
1
+ @prefix: chart-messages-item;
2
+
3
+ .@{prefix} {
4
+ &-text {
5
+ padding: 8px;
6
+ }
7
+
8
+ &-ref {
9
+ padding: 12px;
10
+ padding-bottom: 16px;
11
+ &-body {
12
+ border-left: 2px solid #c2d4ff;
13
+ padding-left: 8px;
14
+ }
15
+ &-text-body {
16
+ // width: 328px;
17
+ max-height: 115px;
18
+ font-size: 12px;
19
+ color: #777;
20
+ overflow: hidden;
21
+ display: -webkit-box;
22
+ word-break: break-all;
23
+ -webkit-line-clamp: 3;
24
+ -webkit-box-orient: vertical;
25
+ text-overflow: ellipsis;
26
+ }
27
+ &-img-body {
28
+ width: 170px;
29
+ height: 115px;
30
+ img {
31
+ width: 100%;
32
+ height: 100%;
33
+ object-fit: contain;
34
+ }
35
+ }
36
+ &-video-body {
37
+ width: 170px;
38
+ height: 115px;
39
+ video {
40
+ width: 100%;
41
+ height: 100%;
42
+ object-fit: contain;
43
+ }
44
+ }
45
+ &-nickname {
46
+ font-size: 12px;
47
+ color: #777;
48
+ font-weight: 600;
49
+ margin-bottom: 8px;
50
+ }
51
+ }
52
+ &-image {
53
+ // padding: 4px;
54
+ border-radius: 6px;
55
+ max-width: 200px;
56
+ max-height: 200px;
57
+ }
58
+
59
+ video {
60
+ width: 100%;
61
+ height: 100%;
62
+ max-width: 200px;
63
+ max-height: 200px;
64
+ border-radius: 6px;
65
+ object-fit: fill;
66
+ }
67
+
68
+ &-audio {
69
+ padding: 8px;
70
+
71
+ &-in,
72
+ &-out {
73
+ max-width: 90px;
74
+ min-width: 64px;
75
+ display: flex;
76
+ justify-content: space-between;
77
+ cursor: pointer;
78
+ .@{prefix}-audio-icon {
79
+ display: flex;
80
+ justify-content: center;
81
+ align-items: center;
82
+ margin-top: 2px;
83
+ width: 16px;
84
+ height: 16px;
85
+ font-size: 16px;
86
+ img {
87
+ display: block;
88
+ height: 100%;
89
+ transform: translate(2px, 0);
90
+ }
91
+ }
92
+ }
93
+ &-in {
94
+ flex-direction: row-reverse;
95
+ .@{prefix}-audio-icon {
96
+ transform: rotate(180deg);
97
+ }
98
+ }
99
+ }
100
+
101
+ &-file {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ padding: 8px 8px 8px 12px;
105
+ &-icon {
106
+ font-size: 28px;
107
+ color: #2c6bffff;
108
+ }
109
+ &-info {
110
+ padding-left: 10px;
111
+ display: flex;
112
+ flex-direction: column;
113
+ color: #777;
114
+ }
115
+ }
116
+
117
+ &-helps {
118
+ width: 276px;
119
+ color: #333;
120
+ img {
121
+ display: block;
122
+ width: 276px;
123
+ }
124
+ p {
125
+ margin: 0;
126
+ padding: 10px 8px;
127
+ font-size: 14px;
128
+ border-top: 1px solid #e4ecff;
129
+ cursor: pointer;
130
+ display: flex;
131
+ gap: 8px;
132
+ .title {
133
+ flex: 1;
134
+ word-break: break-all;
135
+ }
136
+ }
137
+ }
138
+
139
+ &-faqlink {
140
+ padding: 8px;
141
+ h3 {
142
+ margin: 0;
143
+ font-size: 14px;
144
+ color: #333;
145
+ font-weight: 600;
146
+ }
147
+ }
148
+
149
+ &-form {
150
+ width: 272px;
151
+ .fx-form {
152
+ padding: 0 10px 10px 10px;
153
+ }
154
+
155
+ img {
156
+ display: block;
157
+ width: 272px;
158
+ margin-bottom: 16px;
159
+ }
160
+
161
+ &-code {
162
+ display: flex;
163
+ justify-content: space-between;
164
+ }
165
+
166
+ .fx-form-item {
167
+ margin-bottom: 20px;
168
+ .fx-form-item-explain-error {
169
+ font-size: 12px;
170
+ }
171
+ .fx-input[disabled] {
172
+ color: #999;
173
+ }
174
+ }
175
+ .fx-btn-primary:disabled {
176
+ color: #999;
177
+ }
178
+ }
179
+
180
+ &-charthistory {
181
+ padding: 8px;
182
+ min-width: 272px;
183
+ max-width: 400px;
184
+ cursor: pointer;
185
+ h4 {
186
+ font-weight: 600;
187
+ margin-bottom: 5px;
188
+ color: #333;
189
+ }
190
+ p {
191
+ margin-bottom: 4px;
192
+ font-size: 12px;
193
+ color: #777;
194
+ }
195
+ &-from {
196
+ display: flex;
197
+ align-items: center;
198
+ border-top: 1px solid #eee;
199
+ padding-top: 5px;
200
+ color: #777;
201
+ font-size: 12px;
202
+ &-icon {
203
+ display: flex;
204
+ justify-content: center;
205
+ align-items: center;
206
+ width: 16px;
207
+ height: 16px;
208
+ border-radius: 50%;
209
+ margin-right: 3px;
210
+ background-color: #2c6bffff;
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ .fx-preview-toolbar-wrapper {
217
+ position: fixed;
218
+ bottom: 32px;
219
+ left: 50%;
220
+ padding: 0 24px;
221
+ color: #fff;
222
+ font-size: 20px;
223
+ background-color: rgba(0, 0, 0, 0.1);
224
+ border-radius: 100px;
225
+ transform: translateX(-50%);
226
+ }
@@ -0,0 +1,30 @@
1
+ declare const baseURLMap: {
2
+ dev: string;
3
+ test: string;
4
+ qa: string;
5
+ prod: string;
6
+ };
7
+ export type Env = keyof typeof baseURLMap;
8
+ interface ApiMethods {
9
+ getAccountInfoByAccid: (data: {
10
+ accids: string[];
11
+ }) => Promise<any>;
12
+ getProductById: (data: {
13
+ productId: number;
14
+ relationId: string | number;
15
+ relationType: string | number;
16
+ orderProductId?: number;
17
+ }) => Promise<any>;
18
+ getCSOrder: (data: {
19
+ orderSn: number | string;
20
+ orderId: any;
21
+ accid?: string;
22
+ relationId?: string | number;
23
+ relationType?: number;
24
+ }) => Promise<any>;
25
+ getContact: (params: {
26
+ msgId?: string;
27
+ }) => Promise<any>;
28
+ }
29
+ export declare const apiCreate: (_env?: Env, token?: string) => ApiMethods;
30
+ export {};
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.apiCreate = void 0;
7
+ var _request = _interopRequireDefault(require("@fle-tools/request"));
8
+ var _jsCookie = _interopRequireDefault(require("js-cookie"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
+ var baseURLMap = {
17
+ dev: 'https://dev-gateway.fxqifu.net/pangu',
18
+ test: 'https://qa-gateway.fxqifu.net/pangu',
19
+ qa: 'https://qa-gateway.fxqifu.net/pangu',
20
+ prod: 'https://gateway.fxqifu.net/pangu'
21
+ };
22
+ var apiCreate = exports.apiCreate = function apiCreate(_env, token) {
23
+ var localStorageEnv = Object.keys(baseURLMap).includes(localStorage.getItem('env') || '') ? localStorage.getItem('env') : '';
24
+ var env = _env || localStorageEnv || 'prod';
25
+ var baseURL = baseURLMap[env];
26
+ var service = (0, _request.default)({
27
+ baseUrl: baseURL,
28
+ timeout: 30000,
29
+ beforeRequestResolve: function beforeRequestResolve(config) {
30
+ config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
31
+ authority_token: token || _jsCookie.default.get('token')
32
+ });
33
+ }
34
+ });
35
+ return {
36
+ // 获取用户头像名字信息
37
+ getAccountInfoByAccid: function getAccountInfoByAccid(data) {
38
+ return service.post("/ll/provider/message/user/info-list", data);
39
+ },
40
+ // 获取商品信息
41
+ getProductById: function getProductById(data) {
42
+ return service.post('/ll/provider/message/product/get', data);
43
+ },
44
+ // 获取订单信息
45
+ getCSOrder: function getCSOrder(data) {
46
+ return service.post('/ll/provider/message/order/get', data);
47
+ },
48
+ // 获取联系人信息(表单)
49
+ getContact: function getContact(params) {
50
+ return service.get('/ll/provider/message/contact/get', {
51
+ params: params
52
+ });
53
+ }
54
+ };
55
+ };
@@ -0,0 +1,3 @@
1
+ export declare const pauseAllAudio: () => HTMLAudioElement;
2
+ export declare const pauseOtherVideo: (idClient: string) => void;
3
+ export declare const pauseAllVideo: () => void;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pauseOtherVideo = exports.pauseAllVideo = exports.pauseAllAudio = void 0;
7
+ var pauseAllAudio = exports.pauseAllAudio = function pauseAllAudio() {
8
+ var audio = document.getElementById('fxMessageAudio');
9
+ audio === null || audio === void 0 ? void 0 : audio.pause();
10
+ return audio;
11
+ };
12
+ var pauseOtherVideo = exports.pauseOtherVideo = function pauseOtherVideo(idClient) {
13
+ var videoElements = document.getElementsByTagName('video');
14
+ for (var i = 0; i < videoElements.length; i++) {
15
+ if (videoElements[i].id !== "fxMessageVideo-".concat(idClient)) {
16
+ videoElements[i].pause();
17
+ }
18
+ }
19
+ };
20
+ var pauseAllVideo = exports.pauseAllVideo = function pauseAllVideo() {
21
+ var videoElements = document.getElementsByTagName('video');
22
+ for (var i = 0; i < videoElements.length; i++) {
23
+ if (videoElements[i].id.startsWith('fxMessageVideo-')) {
24
+ videoElements[i].pause();
25
+ }
26
+ }
27
+ };
@@ -0,0 +1,46 @@
1
+ export declare const defaultAvatar = "https://qa-oss.elebuys.com/tmpdir/202402221617520002519945.png";
2
+ export declare const fallbackImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEk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NNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==";
3
+ export declare const imMsgTypes: {
4
+ text: string;
5
+ image: string;
6
+ video: string;
7
+ audio: string;
8
+ link: string;
9
+ file: string;
10
+ faq: string;
11
+ faqLink: string;
12
+ formCustomer: string;
13
+ tip: string;
14
+ event: string;
15
+ order: string;
16
+ product: string;
17
+ orderGoods: string;
18
+ offlineSupport: string;
19
+ chatrecord: string;
20
+ };
21
+ export declare const msgEventTypes: {
22
+ userClose: number;
23
+ csClose: number;
24
+ sysClose: number;
25
+ userEnter: number;
26
+ transferOk: number;
27
+ lineUp: number;
28
+ lineOverLimit: number;
29
+ formCustomer: number;
30
+ csOffLine: number;
31
+ };
32
+ export declare const roleTypes: {
33
+ cs: 'cs';
34
+ user: 'user';
35
+ };
36
+ export declare const fileTypes: {
37
+ img: string[];
38
+ audio: string[];
39
+ video: string[];
40
+ file: string[];
41
+ };
42
+ export declare const networkHintMap: any;
43
+ export declare const cardTagMap: Record<string, {
44
+ label: string;
45
+ color: string;
46
+ }>;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.roleTypes = exports.networkHintMap = exports.msgEventTypes = exports.imMsgTypes = exports.fileTypes = exports.fallbackImg = exports.defaultAvatar = exports.cardTagMap = void 0;
7
+ var defaultAvatar = exports.defaultAvatar = 'https://qa-oss.elebuys.com/tmpdir/202402221617520002519945.png';
8
+ var fallbackImg = exports.fallbackImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJE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Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==';
9
+ var imMsgTypes = exports.imMsgTypes = {
10
+ text: 'text',
11
+ image: 'image',
12
+ video: 'video',
13
+ audio: 'audio',
14
+ link: 'link',
15
+ file: 'file',
16
+ faq: 'faq',
17
+ faqLink: 'faqLink',
18
+ formCustomer: 'formCustomer',
19
+ tip: 'tip',
20
+ event: 'event',
21
+ order: 'order',
22
+ product: 'product',
23
+ orderGoods: 'order-goods',
24
+ offlineSupport: 'offline-support',
25
+ chatrecord: 'chatrecord'
26
+ };
27
+ var msgEventTypes = exports.msgEventTypes = {
28
+ userClose: 101,
29
+ csClose: 102,
30
+ sysClose: 103,
31
+ userEnter: 111,
32
+ transferOk: 121,
33
+ lineUp: 131,
34
+ lineOverLimit: 132,
35
+ formCustomer: 201,
36
+ csOffLine: 301 // 客服离线
37
+ };
38
+ var roleTypes = exports.roleTypes = {
39
+ cs: 'cs',
40
+ user: 'user'
41
+ };
42
+ var fileTypes = exports.fileTypes = {
43
+ img: ['.jpg', '.png', '.jpeg', '.gif'],
44
+ audio: ['.ogg', '.mp3'],
45
+ video: ['.mp4', '.mov'],
46
+ file: ['.txt', '.zip', '.rar', '.z7', '.doc', '.docm', '.docx', '.ppt', '.pptm', '.pptx', '.xls', '.xlsx', '.pdf']
47
+ };
48
+ var networkHintMap = exports.networkHintMap = {
49
+ logined: '暂无会话',
50
+ willReconnect: '即将重连...',
51
+ disconnect: '连接已断开',
52
+ kicked: '已在其他设备登录',
53
+ default: '暂无会话'
54
+ };
55
+ var cardTagMap = exports.cardTagMap = {
56
+ '1': {
57
+ label: '电商精选',
58
+ color: '#FF3013'
59
+ },
60
+ '2': {
61
+ label: '生鲜电商',
62
+ color: '#D5A704'
63
+ },
64
+ '3': {
65
+ label: '超市精选',
66
+ color: '#0064E0'
67
+ },
68
+ '4': {
69
+ label: '虚拟商品',
70
+ color: '#AC30E3'
71
+ },
72
+ '5': {
73
+ label: '生鲜蛋糕',
74
+ color: '#4D2EF6'
75
+ },
76
+ '6': {
77
+ label: '自有供应商商品',
78
+ color: '#0064E0'
79
+ },
80
+ '7': {
81
+ label: '精选商品',
82
+ color: '#FF0036'
83
+ },
84
+ '8': {
85
+ label: '自有商品',
86
+ color: '#FF3013'
87
+ }
88
+ };
@@ -0,0 +1,33 @@
1
+ export declare function getSessionIdFromMsg(msg: {
2
+ from: any;
3
+ to: any;
4
+ scene: any;
5
+ }, myAccount: any): string;
6
+ export declare function paserAttach(attach?: any): any;
7
+ export declare function getSimplifyMsg(attach?: any): any;
8
+ export declare function concatMsgs<T>(arr1?: any[], arr2?: any[]): T[];
9
+ export declare function getDateDiff(dateTimeStamp: number): string;
10
+ export declare function downloadByUrl(src: string): void;
11
+ /**
12
+ * 将文字写入剪切板
13
+ * @param {string} text
14
+ * @returns {Promise} 返回promise对象
15
+ */
16
+ export declare function copyText(text?: string): Promise<void>;
17
+ export declare const matchs: {
18
+ paserProductFromUrl: (str: string) => string | null | undefined;
19
+ paserOrderFromUrl: (str: string) => string | null | undefined;
20
+ };
21
+ declare const _default: {
22
+ getSessionIdFromMsg: typeof getSessionIdFromMsg;
23
+ paserAttach: typeof paserAttach;
24
+ getDateDiff: typeof getDateDiff;
25
+ downloadByUrl: typeof downloadByUrl;
26
+ copyText: typeof copyText;
27
+ getSimplifyMsg: typeof getSimplifyMsg;
28
+ matchs: {
29
+ paserProductFromUrl: (str: string) => string | null | undefined;
30
+ paserOrderFromUrl: (str: string) => string | null | undefined;
31
+ };
32
+ };
33
+ export default _default;