@webitel/ui-sdk 25.4.73 → 25.4.75
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 +19 -0
- package/package.json +1 -1
- package/src/api/clients/index.js +2 -0
- package/src/api/clients/labels/labels.js +56 -0
- package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +2 -1
- package/src/api/clients//321/201ontacts/contacts.js +23 -3
- package/src/locale/en/en.js +12 -1
- package/src/locale/ru/ru.js +12 -1
- package/src/locale/ua/ua.js +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [v25.4.74] - 2025-04-28
|
|
2
|
+
### :sparkles: New Features
|
|
3
|
+
- [`412e739`](https://github.com/webitel/webitel-ui-sdk/commit/412e739dd3b9e56dd44a6f9f9848ae36f5b33348) - ui-datalist/filters/custom: simplify name retrieval in searchRecords using lodash.get [https://webitel.atlassian.net/browse/WTEL-6787](https://webitel.atlassian.net/browse/WTEL-6787) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
4
|
+
- [`c32196b`](https://github.com/webitel/webitel-ui-sdk/commit/c32196ba6a63167c714c2ac38d3ebf452c72d9d2) - add contacts filters[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
5
|
+
|
|
6
|
+
### :bug: Bug Fixes
|
|
7
|
+
- [`d5c2414`](https://github.com/webitel/webitel-ui-sdk/commit/d5c2414b00730ebca5a2c7064d92d12c59e40ff6) - merge master *(commit by [@Lera24](https://github.com/Lera24))*
|
|
8
|
+
- [`0b2e6ec`](https://github.com/webitel/webitel-ui-sdk/commit/0b2e6eca97f9df96fcde9e5eb6fa076b2e4b78ad) - contact group class [WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
9
|
+
- [`bf5ec5f`](https://github.com/webitel/webitel-ui-sdk/commit/bf5ec5fd453525637624b0e72532716ff0e02fcb) - add new type ts[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
10
|
+
- [`90af640`](https://github.com/webitel/webitel-ui-sdk/commit/90af6406e952e540868a73dd72cf8a218181b8c5) - delete console.log[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
11
|
+
- [`4941305`](https://github.com/webitel/webitel-ui-sdk/commit/49413051ac055e211a737cac59a36c9ab6df7cc3) - after code review[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
12
|
+
- [`6ee2156`](https://github.com/webitel/webitel-ui-sdk/commit/6ee2156513b47b74abf0572891b1b237d78c33e3) - small refactor[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
13
|
+
- [`88285eb`](https://github.com/webitel/webitel-ui-sdk/commit/88285eb22bbeacb84c02235fb83214809b8d5200) - conflict[WTEL-6410](https://webitel.atlassian.net/browse/WTEL-6410) *(commit by [@Lera24](https://github.com/Lera24))*
|
|
14
|
+
|
|
15
|
+
### :wrench: Chores
|
|
16
|
+
- [`e22cd75`](https://github.com/webitel/webitel-ui-sdk/commit/e22cd751edd85be79e8317f6d77a2eb2b1751b4c) - update @webitel/ui-datalist to version 1.0.20 [https://webitel.atlassian.net/browse/WTEL-6787](https://webitel.atlassian.net/browse/WTEL-6787) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [v25.4.73] - 2025-04-24
|
|
2
20
|
### :sparkles: New Features
|
|
3
21
|
- [`31667c2`](https://github.com/webitel/webitel-ui-sdk/commit/31667c2a12f8bb2c7be6ce70b0a0d50848c489f2) - add type extension and case assignee filter configurations *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
@@ -1987,3 +2005,4 @@
|
|
|
1987
2005
|
[v25.4.71]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.70...v25.4.71
|
|
1988
2006
|
[v25.4.72]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.71...v25.4.72
|
|
1989
2007
|
[v25.4.73]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.72...v25.4.73
|
|
2008
|
+
[v25.4.74]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.73...v25.4.74
|
package/package.json
CHANGED
package/src/api/clients/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import users from './users/users.js';
|
|
|
28
28
|
import sysTypes from './wtTypes/sysTypes/sysTypes';
|
|
29
29
|
import typeExtensions from './wtTypes/typeExtensions/typeExtensions';
|
|
30
30
|
import { contactChatMessagesHistory, contacts } from './сontacts/index.js';
|
|
31
|
+
import labels from './labels/labels.js';
|
|
31
32
|
|
|
32
33
|
export {
|
|
33
34
|
agentChats,
|
|
@@ -61,4 +62,5 @@ export {
|
|
|
61
62
|
teams,
|
|
62
63
|
typeExtensions,
|
|
63
64
|
users,
|
|
65
|
+
labels,
|
|
64
66
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDefaultGetParams,
|
|
3
|
+
getDefaultInstance, getDefaultOpenAPIConfig,
|
|
4
|
+
} from '../../defaults/index';
|
|
5
|
+
import applyTransform, {
|
|
6
|
+
camelToSnake,
|
|
7
|
+
merge,
|
|
8
|
+
notify,
|
|
9
|
+
sanitize,
|
|
10
|
+
snakeToCamel,
|
|
11
|
+
starToSearch,
|
|
12
|
+
} from '../../transformers/index';
|
|
13
|
+
import { LabelsApiFactory } from 'webitel-sdk';
|
|
14
|
+
|
|
15
|
+
const instance = getDefaultInstance();
|
|
16
|
+
const configuration = getDefaultOpenAPIConfig();
|
|
17
|
+
|
|
18
|
+
const service = new LabelsApiFactory(configuration, '', instance);
|
|
19
|
+
|
|
20
|
+
const getList = async (params) => {
|
|
21
|
+
const fieldsToSend = ['page', 'size', 'search', 'sort', 'fields', 'id'];
|
|
22
|
+
const {
|
|
23
|
+
page,
|
|
24
|
+
size,
|
|
25
|
+
search,
|
|
26
|
+
} = applyTransform(params, [
|
|
27
|
+
sanitize(fieldsToSend),
|
|
28
|
+
merge(getDefaultGetParams()),
|
|
29
|
+
starToSearch('search'),
|
|
30
|
+
camelToSnake(),
|
|
31
|
+
]);
|
|
32
|
+
try {
|
|
33
|
+
const response = await service.getLabels(page, size, search);
|
|
34
|
+
const { labels, next } = applyTransform(response.data, [
|
|
35
|
+
snakeToCamel(),
|
|
36
|
+
merge({ labels: [], next: false }),
|
|
37
|
+
]);
|
|
38
|
+
return {
|
|
39
|
+
items: labels,
|
|
40
|
+
next,
|
|
41
|
+
};
|
|
42
|
+
} catch (err) {
|
|
43
|
+
throw applyTransform(err, [notify]);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const getLabelsLookup = (params) =>
|
|
48
|
+
getList({
|
|
49
|
+
...params,
|
|
50
|
+
fields: params.fields || ['id', 'name'],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
getList,
|
|
55
|
+
getLookup: getLabelsLookup,
|
|
56
|
+
};
|
|
@@ -14,11 +14,12 @@ import applyTransform, {
|
|
|
14
14
|
const instance = getDefaultInstance();
|
|
15
15
|
|
|
16
16
|
const getSysTypeRecordsList = async ({ path, display, primary, ...params }) => {
|
|
17
|
-
const fieldsToSend = ['page', 'size', 'q', 'sort', 'fields', 'id'];
|
|
17
|
+
const fieldsToSend = ['page', 'size', 'q', 'sort', 'fields', 'id', 'ids'];
|
|
18
18
|
|
|
19
19
|
const url = applyTransform(params, [
|
|
20
20
|
merge(getDefaultGetParams()),
|
|
21
21
|
(params) => ({ ...params, q: params.search }),
|
|
22
|
+
(params) => ({ ...params, ids: params.id }),
|
|
22
23
|
sanitize(fieldsToSend),
|
|
23
24
|
camelToSnake(),
|
|
24
25
|
generateUrl(path),
|
|
@@ -38,8 +38,11 @@ const getList = async (params) => {
|
|
|
38
38
|
'fields',
|
|
39
39
|
'id',
|
|
40
40
|
'qin',
|
|
41
|
-
'groupId',
|
|
42
41
|
'notIdGroup',
|
|
42
|
+
'group',
|
|
43
|
+
'owner',
|
|
44
|
+
'label',
|
|
45
|
+
'user',
|
|
43
46
|
];
|
|
44
47
|
|
|
45
48
|
if (!params.fields) {
|
|
@@ -112,6 +115,20 @@ const getList = async (params) => {
|
|
|
112
115
|
if (params.parentId) {
|
|
113
116
|
changedParams.groupId = [params.parentId];
|
|
114
117
|
}
|
|
118
|
+
|
|
119
|
+
if(params.hasUser != null) {
|
|
120
|
+
changedParams.user = params.hasUser;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if(params.contactGroup) {
|
|
124
|
+
changedParams.group = [...params.contactGroup.list];
|
|
125
|
+
}
|
|
126
|
+
if(params.contactLabel) {
|
|
127
|
+
changedParams.label = params.contactLabel.map(item => item.label);
|
|
128
|
+
}
|
|
129
|
+
if(params.contactOwner) {
|
|
130
|
+
changedParams.owner = params.contactOwner;
|
|
131
|
+
}
|
|
115
132
|
}
|
|
116
133
|
|
|
117
134
|
const transformations = [
|
|
@@ -120,7 +137,7 @@ const getList = async (params) => {
|
|
|
120
137
|
camelToSnake(),
|
|
121
138
|
];
|
|
122
139
|
|
|
123
|
-
const { page, size, q, sort, fields, id, qin, mode, group_id, not_id_group } =
|
|
140
|
+
const { page, size, q, sort, fields, id, qin, mode, group_id, group, not_id_group, owner, label, user } =
|
|
124
141
|
applyTransform(changedParams, transformations);
|
|
125
142
|
|
|
126
143
|
try {
|
|
@@ -134,7 +151,10 @@ const getList = async (params) => {
|
|
|
134
151
|
qin,
|
|
135
152
|
mode,
|
|
136
153
|
not_id_group,
|
|
137
|
-
|
|
154
|
+
group,
|
|
155
|
+
owner,
|
|
156
|
+
label,
|
|
157
|
+
user,
|
|
138
158
|
);
|
|
139
159
|
|
|
140
160
|
const { items, next } = applyTransform(
|
package/src/locale/en/en.js
CHANGED
|
@@ -19,6 +19,7 @@ import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
|
|
|
19
19
|
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
20
20
|
import { AccessMode } from '../../modules/ObjectPermissions/_internals/enums/AccessMode.enum.js';
|
|
21
21
|
import { snakeToCamel } from '../../scripts';
|
|
22
|
+
import { FilterOption } from '../../../packages/ui-datalist/src/modules/filters/modules/filterConfig/enums/FilterOption';
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
25
|
// describes reusable buttons, actions, default titles, and other ui elements
|
|
@@ -169,6 +170,7 @@ export default {
|
|
|
169
170
|
totalDuration: 'Total duration',
|
|
170
171
|
transcription: 'Transcription',
|
|
171
172
|
attachment: 'Attachment | Attachments',
|
|
173
|
+
owner: 'Owner | Owners',
|
|
172
174
|
queue: {
|
|
173
175
|
queue: 'Queue | Queues',
|
|
174
176
|
type: {
|
|
@@ -555,7 +557,7 @@ export default {
|
|
|
555
557
|
contact: ({ linked }) => {
|
|
556
558
|
return linked('vocabulary.contact');
|
|
557
559
|
},
|
|
558
|
-
|
|
560
|
+
[FilterOption.ContactGroup]: ({ linked }) => {
|
|
559
561
|
return linked('cases.groupPerformers');
|
|
560
562
|
},
|
|
561
563
|
createdAt: ({ linked }) => {
|
|
@@ -585,9 +587,18 @@ export default {
|
|
|
585
587
|
hasTranscription: ({ linked }) => {
|
|
586
588
|
return linked('objects.transcription');
|
|
587
589
|
},
|
|
590
|
+
[FilterOption.HasUser]: ({ linked }) => {
|
|
591
|
+
return linked('objects.user');
|
|
592
|
+
},
|
|
588
593
|
impacted: ({ linked }) => {
|
|
589
594
|
return linked('cases.impacted');
|
|
590
595
|
},
|
|
596
|
+
[FilterOption.ContactLabel]: ({ linked }) => {
|
|
597
|
+
return linked('vocabulary.labels');
|
|
598
|
+
},
|
|
599
|
+
[FilterOption.ContactOwner]: ({ linked }) => {
|
|
600
|
+
return linked('objects.owner');
|
|
601
|
+
},
|
|
591
602
|
priority: ({ linked }) => {
|
|
592
603
|
return linked('vocabulary.priority');
|
|
593
604
|
},
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ChannelType,
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
|
+
import { FilterOption } from '../../../packages/ui-datalist/src/modules/filters/modules/filterConfig/enums/FilterOption';
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
AuditorSections,
|
|
@@ -168,6 +169,7 @@ export default {
|
|
|
168
169
|
totalDuration: 'Общая длительность',
|
|
169
170
|
transcription: 'Транскрипция',
|
|
170
171
|
attachment: 'Вложение | Вложения',
|
|
172
|
+
owner: 'Владелец | Владельцы',
|
|
171
173
|
queue: {
|
|
172
174
|
queue: 'Очередь | Очереди',
|
|
173
175
|
type: {
|
|
@@ -551,7 +553,7 @@ export default {
|
|
|
551
553
|
contact: ({ linked }) => {
|
|
552
554
|
return linked('vocabulary.contact');
|
|
553
555
|
},
|
|
554
|
-
|
|
556
|
+
[FilterOption.ContactGroup]: ({ linked }) => {
|
|
555
557
|
return linked('cases.groupPerformers');
|
|
556
558
|
},
|
|
557
559
|
createdAt: ({ linked }) => {
|
|
@@ -581,9 +583,18 @@ export default {
|
|
|
581
583
|
hasTranscription: ({ linked }) => {
|
|
582
584
|
return linked('objects.transcription');
|
|
583
585
|
},
|
|
586
|
+
[FilterOption.HasUser]: ({ linked }) => {
|
|
587
|
+
return linked('objects.user');
|
|
588
|
+
},
|
|
584
589
|
impacted: ({ linked }) => {
|
|
585
590
|
return linked('cases.impacted');
|
|
586
591
|
},
|
|
592
|
+
[FilterOption.ContactLabel]: ({ linked }) => {
|
|
593
|
+
return linked('vocabulary.labels');
|
|
594
|
+
},
|
|
595
|
+
[FilterOption.ContactOwner]: ({ linked }) => {
|
|
596
|
+
return linked('objects.owner');
|
|
597
|
+
},
|
|
587
598
|
priority: ({ linked }) => {
|
|
588
599
|
return linked('vocabulary.priority');
|
|
589
600
|
},
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ChannelType,
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
|
+
import { FilterOption } from '../../../packages/ui-datalist/src/modules/filters/modules/filterConfig/enums/FilterOption';
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
AuditorSections,
|
|
@@ -168,6 +169,7 @@ export default {
|
|
|
168
169
|
totalDuration: 'Загальна тривалість',
|
|
169
170
|
transcription: 'Транскрипція',
|
|
170
171
|
attachment: 'Вкладення | Вкладення',
|
|
172
|
+
owner: 'Власник | Власники',
|
|
171
173
|
queue: {
|
|
172
174
|
queue: 'Черга | Черги',
|
|
173
175
|
type: {
|
|
@@ -551,7 +553,7 @@ export default {
|
|
|
551
553
|
contact: ({ linked }) => {
|
|
552
554
|
return linked('vocabulary.contact');
|
|
553
555
|
},
|
|
554
|
-
|
|
556
|
+
[FilterOption.ContactGroup]: ({ linked }) => {
|
|
555
557
|
return linked('cases.groupPerformers');
|
|
556
558
|
},
|
|
557
559
|
createdAt: ({ linked }) => {
|
|
@@ -581,9 +583,18 @@ export default {
|
|
|
581
583
|
hasTranscription: ({ linked }) => {
|
|
582
584
|
return linked('objects.transcription');
|
|
583
585
|
},
|
|
586
|
+
[FilterOption.HasUser]: ({ linked }) => {
|
|
587
|
+
return linked('objects.user');
|
|
588
|
+
},
|
|
584
589
|
impacted: ({ linked }) => {
|
|
585
590
|
return linked('cases.impacted');
|
|
586
591
|
},
|
|
592
|
+
[FilterOption.ContactLabel]: ({ linked }) => {
|
|
593
|
+
return linked('vocabulary.labels');
|
|
594
|
+
},
|
|
595
|
+
[FilterOption.ContactOwner]: ({ linked }) => {
|
|
596
|
+
return linked('objects.owner');
|
|
597
|
+
},
|
|
587
598
|
priority: ({ linked }) => {
|
|
588
599
|
return linked('vocabulary.priority');
|
|
589
600
|
},
|