@webitel/ui-sdk 24.12.11 → 24.12.13
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.
- package/CHANGELOG.md +12 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +2276 -2290
- package/dist/ui-sdk.umd.cjs +15 -15
- package/package.json +1 -1
- package/src/api/clients/agents/agentChats.js +17 -6
- package/src/components/wt-action-bar/wt-action-bar.vue +1 -9
package/package.json
CHANGED
|
@@ -2,10 +2,12 @@ import { AgentChatServiceApiFactory } from 'webitel-sdk';
|
|
|
2
2
|
import {
|
|
3
3
|
getDefaultInstance,
|
|
4
4
|
getDefaultOpenAPIConfig,
|
|
5
|
+
getDefaultGetParams,
|
|
5
6
|
} from '../../defaults/index.js';
|
|
6
7
|
import applyTransform, {
|
|
8
|
+
merge,
|
|
7
9
|
notify,
|
|
8
|
-
snakeToCamel,
|
|
10
|
+
snakeToCamel, starToSearch,
|
|
9
11
|
} from '../../transformers/index.js';
|
|
10
12
|
import i18n from '../../../locale/i18n.js';
|
|
11
13
|
|
|
@@ -17,21 +19,30 @@ const configuration = getDefaultOpenAPIConfig();
|
|
|
17
19
|
const agentChatsService = new AgentChatServiceApiFactory(configuration, '', instance);
|
|
18
20
|
|
|
19
21
|
const getChatsList = async (params) => {
|
|
20
|
-
const {
|
|
22
|
+
const {
|
|
23
|
+
size,
|
|
24
|
+
page,
|
|
25
|
+
onlyClosed
|
|
26
|
+
} = applyTransform(params, [
|
|
27
|
+
merge(getDefaultGetParams()),
|
|
28
|
+
]);
|
|
21
29
|
|
|
22
30
|
try {
|
|
23
31
|
const response = await agentChatsService.getAgentChats(
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
size,
|
|
33
|
+
page,
|
|
26
34
|
undefined,
|
|
27
35
|
undefined,
|
|
28
36
|
undefined,
|
|
29
37
|
onlyClosed,
|
|
30
38
|
);
|
|
31
|
-
const { items } = applyTransform(response.data, [
|
|
39
|
+
const { items, next } = applyTransform(response.data, [
|
|
32
40
|
snakeToCamel(),
|
|
33
41
|
]);
|
|
34
|
-
return
|
|
42
|
+
return {
|
|
43
|
+
items,
|
|
44
|
+
next,
|
|
45
|
+
};
|
|
35
46
|
} catch (err) {
|
|
36
47
|
throw applyTransform(err, [notify]);
|
|
37
48
|
}
|
|
@@ -47,14 +47,6 @@ const props = defineProps({
|
|
|
47
47
|
default: 'table',
|
|
48
48
|
validator: (v) => ['table', 'section'].includes(v),
|
|
49
49
|
},
|
|
50
|
-
/**
|
|
51
|
-
* see `IconAction` enum
|
|
52
|
-
*/
|
|
53
|
-
actions: {
|
|
54
|
-
type: Array,
|
|
55
|
-
default: () => [],
|
|
56
|
-
validator: (v) => v.every((action) => Object.values(IconAction).includes(action)),
|
|
57
|
-
},
|
|
58
50
|
|
|
59
51
|
/**
|
|
60
52
|
* Not implemented
|
|
@@ -112,7 +104,7 @@ const shownActions = computed(() => {
|
|
|
112
104
|
|
|
113
105
|
if(props.exclude.length) return actionsOrder.filter((action) => !props.exclude.includes(action));
|
|
114
106
|
|
|
115
|
-
return actionsOrder
|
|
107
|
+
return actionsOrder;
|
|
116
108
|
});
|
|
117
109
|
</script>
|
|
118
110
|
|