@webitel/ui-sdk 25.4.0 → 25.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.04.0",
3
+ "version": "25.04.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -20,7 +20,8 @@
20
20
  "link": "npm link",
21
21
  "update-node": "nvm install --lts && nvm alias default node",
22
22
  "i": "npm install",
23
- "lint:package": "publint"
23
+ "lint:package": "publint",
24
+ "orval": "orval"
24
25
  },
25
26
  "main": "./dist/ui-sdk.js",
26
27
  "type": "module",
@@ -118,6 +119,7 @@
118
119
  "axios": "^1.7.7",
119
120
  "clipboard-copy": "^4.0.1",
120
121
  "csv-stringify": "^5.5.3",
122
+ "date-fns": "^4.1.0",
121
123
  "deep-copy": "^1.4.2",
122
124
  "deep-equal": "^2.2.3",
123
125
  "deepmerge": "^4.3.1",
@@ -137,8 +139,7 @@
137
139
  "vue-observe-visibility": "^2.0.0-alpha.1",
138
140
  "vue-router": "^4.4.5",
139
141
  "webitel-sdk": "^24.10.29",
140
- "xlsx": "^0.18.5",
141
- "date-fns": "^4.1.0"
142
+ "xlsx": "^0.18.5"
142
143
  },
143
144
  "devDependencies": {
144
145
  "@eslint/js": "^9.17.0",
@@ -159,6 +160,7 @@
159
160
  "happy-dom": "^15.11.6",
160
161
  "markdown-it": "^14.1.0",
161
162
  "markdown-table": "^3.0.4",
163
+ "orval": "^7.6.0",
162
164
  "path": "^0.12.7",
163
165
  "pinia": "^2.3.0",
164
166
  "postcss": "^8.4.49",
@@ -1,5 +1,6 @@
1
- import { ContactsApiFactory } from 'webitel-sdk';
2
1
  import deepCopy from 'deep-copy';
2
+ import { ContactsApiFactory } from 'webitel-sdk';
3
+
3
4
  import {
4
5
  getDefaultGetListResponse,
5
6
  getDefaultGetParams,
@@ -63,6 +64,7 @@ const getList = async (params) => {
63
64
  name: item.name.commonName,
64
65
  managers: item.managers ? [...item.managers.data] : [],
65
66
  labels: item.labels ? [...item.labels.data] : [],
67
+ groups: getGroupsFromResponse(item),
66
68
  variables: item.variables ? [...item.variables.data] : [],
67
69
  timezones: item.timezones ? [...item.timezones.data] : [],
68
70
  phones: item.phones ? [...item.phones.data] : [],
@@ -153,6 +155,7 @@ const get = async ({ itemId: id }) => {
153
155
  'name',
154
156
  'about',
155
157
  'labels',
158
+ 'groups',
156
159
  'etag',
157
160
  'mode',
158
161
  'managers',
@@ -169,6 +172,7 @@ const get = async ({ itemId: id }) => {
169
172
  ...item,
170
173
  name: item.name.commonName,
171
174
  labels: item.labels ? [...item.labels.data] : [],
175
+ groups: getGroupsFromResponse(item),
172
176
  managers: item.managers ? [...item.managers.data] : [],
173
177
  timezones: item.timezones ? [...item.timezones.data] : [],
174
178
  variables: item.variables ? [...item.variables.data] : [],
@@ -189,7 +193,14 @@ const get = async ({ itemId: id }) => {
189
193
  }
190
194
  };
191
195
 
192
- const fieldsToSend = ['name', 'labels', 'about', 'managers', 'timezones'];
196
+ const fieldsToSend = [
197
+ 'name',
198
+ 'labels',
199
+ 'about',
200
+ 'managers',
201
+ 'timezones',
202
+ 'groups',
203
+ ];
193
204
 
194
205
  const sanitizeManagers = (itemInstance) => {
195
206
  // handle many managers and even no managers field cases
@@ -207,6 +218,12 @@ const sanitizeTimezones = (itemInstance) => {
207
218
  return { ...itemInstance, timezones };
208
219
  };
209
220
 
221
+ const sanitizeGroups = (itemInstance) => {
222
+ // handle many groups and even no groups field cases
223
+ const groups = (itemInstance.groups || []).map((item) => ({ group: item }));
224
+ return { ...itemInstance, groups };
225
+ };
226
+
210
227
  const preRequestHandler = (item) => {
211
228
  const copy = deepCopy(item);
212
229
  copy.name = {
@@ -215,11 +232,16 @@ const preRequestHandler = (item) => {
215
232
  return copy;
216
233
  };
217
234
 
235
+ const getGroupsFromResponse = (item) => {
236
+ return item.groups ? [...item.groups.data.map((el) => el.group)] : [];
237
+ };
238
+
218
239
  const add = async ({ itemInstance }) => {
219
240
  const item = applyTransform(itemInstance, [
220
241
  preRequestHandler,
221
242
  sanitizeManagers,
222
243
  sanitizeTimezones,
244
+ sanitizeGroups,
223
245
  sanitize(fieldsToSend),
224
246
  camelToSnake(),
225
247
  ]);
@@ -237,6 +259,7 @@ const update = async ({ itemInstance }) => {
237
259
  preRequestHandler,
238
260
  sanitizeManagers,
239
261
  sanitizeTimezones,
262
+ sanitizeGroups,
240
263
  sanitize(fieldsToSend),
241
264
  camelToSnake(),
242
265
  ]);
@@ -1,5 +1,6 @@
1
1
  import { objCamelToKebab } from '../../../scripts/caseConverters.js';
2
2
  import account from './account.svg';
3
+ import addFilter from './add-filter.svg';
3
4
  import adfs from './adfs.svg';
4
5
  import agent from './agent.svg';
5
6
  import api from './api.svg';
@@ -14,7 +15,6 @@ import assignee from './assignee.svg';
14
15
  import attach from './attach.svg';
15
16
  import attention from './attention.svg';
16
17
  import azure from './azure.svg';
17
- import addFilter from './add-filter.svg';
18
18
  import back from './back.svg';
19
19
  import bell from './bell.svg';
20
20
  import bellBadged from './bell-badged.svg';
@@ -96,6 +96,7 @@ import jobAccept from './job--accept.svg';
96
96
  import jobEnd from './job--end.svg';
97
97
  import json from './json.svg';
98
98
  import link from './link.svg';
99
+ import loadPreset from './load-preset.svg';
99
100
  import lock from './lock.svg';
100
101
  import logout from './logout.svg';
101
102
  import mail from './mail.svg';
@@ -194,9 +195,9 @@ import variableSelect from './variable-select.svg';
194
195
  import versions from './versions.svg';
195
196
  import videoCam from './video-cam.svg';
196
197
  import videoCamOff from './video-cam-off.svg';
198
+ import webitelLogo from './webitel-logo.svg';
197
199
  import zoomIn from './zoom-in.svg';
198
200
  import zoomOut from './zoom-out.svg';
199
- import loadPreset from './load-preset.svg';
200
201
 
201
202
  export default objCamelToKebab({
202
203
  account,
@@ -379,6 +380,8 @@ export default objCamelToKebab({
379
380
  undo,
380
381
  versions,
381
382
 
383
+ webitelLogo,
384
+
382
385
  previewTagAudio,
383
386
  previewTagVideo,
384
387
  previewTagApplication,
@@ -0,0 +1,19 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.8877 10.6113C21.2936 10.2675 21.4738 9.72554 21.3547 9.20674L21.2284 8.65711C21.1097 8.1402 20.7135 7.73242 20.2008 7.59931L2.5651 3.02104C1.96996 2.86654 1.53736 3.59791 1.94112 4.07596L7.9352 11.1731C8.44168 11.7727 9.33776 11.8478 9.93665 11.3406L14.0573 7.85113C14.6562 7.34398 15.5523 7.41899 16.0588 8.01867L18.4319 10.8285C18.9384 11.4282 19.8345 11.5032 20.4334 10.996L20.8877 10.6113Z" fill="url(#paint0_linear_11821_4528)"/>
3
+ <path d="M3.15862 17.881L0.0347845 8.11559C-0.179907 7.44445 0.651318 6.95324 1.10091 7.48557L7.60057 15.1813C8.10705 15.7809 9.00313 15.856 9.60202 15.3488L13.7227 11.8593C14.3216 11.3522 15.2177 11.4272 15.7241 12.0269L22.3924 19.9222C22.8257 20.4352 22.2984 21.2039 21.6874 20.9499L17.0965 19.0417C16.8851 18.9539 16.6556 18.9185 16.4276 18.9385L6.11233 19.8466C4.79002 19.963 3.56354 19.1468 3.15862 17.881Z" fill="url(#paint1_linear_11821_4528)"/>
4
+ <path d="M21.8834 14.9448C22.678 15.7203 24 15.1482 24 14.0288C24 12.9091 22.6773 12.3372 21.8828 13.1134C21.3711 13.6133 21.3713 14.4452 21.8834 14.9448Z" fill="url(#paint2_linear_11821_4528)"/>
5
+ <defs>
6
+ <linearGradient id="paint0_linear_11821_4528" x1="21.3838" y1="4.47761" x2="5.1167" y2="20.2543" gradientUnits="userSpaceOnUse">
7
+ <stop stop-color="#D93DF5"/>
8
+ <stop offset="1" stop-color="#1A2EB2"/>
9
+ </linearGradient>
10
+ <linearGradient id="paint1_linear_11821_4528" x1="21.3838" y1="4.47761" x2="5.1167" y2="20.2543" gradientUnits="userSpaceOnUse">
11
+ <stop stop-color="#D93DF5"/>
12
+ <stop offset="1" stop-color="#1A2EB2"/>
13
+ </linearGradient>
14
+ <linearGradient id="paint2_linear_11821_4528" x1="21.3838" y1="4.47761" x2="5.1167" y2="20.2543" gradientUnits="userSpaceOnUse">
15
+ <stop stop-color="#D93DF5"/>
16
+ <stop offset="1" stop-color="#1A2EB2"/>
17
+ </linearGradient>
18
+ </defs>
19
+ </svg>
@@ -486,6 +486,7 @@ export default {
486
486
  /* https://webitel.atlassian.net/browse/WTEL-6308?focusedCommentId=657415 */
487
487
  createdAt: {
488
488
  startOfToday: 'From the start of today',
489
+ startOfMonth: 'From this month',
489
490
  },
490
491
  },
491
492
  addFilter: ({ linked }) => {
@@ -483,6 +483,7 @@ export default {
483
483
  predefinedLabels: { /* https://webitel.atlassian.net/browse/WTEL-6308?focusedCommentId=657415 */
484
484
  createdAt: {
485
485
  startOfToday: 'С начала дня',
486
+ startOfMonth: 'С начала этого месяца',
486
487
  },
487
488
  },
488
489
  addFilter: ({ linked }) => {
@@ -483,6 +483,7 @@ export default {
483
483
  predefinedLabels: { /* https://webitel.atlassian.net/browse/WTEL-6308?focusedCommentId=657415 */
484
484
  createdAt: {
485
485
  startOfToday: 'Від початку дня',
486
+ startOfMonth: 'Від початку місяця',
486
487
  },
487
488
  },
488
489
  addFilter: ({ linked }) => {