@webitel/ui-sdk 24.12.48 → 24.12.50

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": "24.12.48",
3
+ "version": "24.12.50",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -129,7 +129,7 @@
129
129
  "plyr": "3.7.8",
130
130
  "query-string": "^9.1.1",
131
131
  "sortablejs": "^1.15.3",
132
- "vue-i18n": "^9.14.1",
132
+ "vue-i18n": "^11.0.1",
133
133
  "vue-multiselect": "^3.1.0",
134
134
  "vue-observe-visibility": "^2.0.0-alpha.1",
135
135
  "vue-router": "^4.4.5",
@@ -180,7 +180,7 @@
180
180
  "@rollup/rollup-linux-x64-gnu": "4.9.5"
181
181
  },
182
182
  "engines": {
183
- "npm": "10.9.0",
184
- "node": "v22.12.0"
183
+ "npm": "10",
184
+ "node": "v22"
185
185
  }
186
186
  }
@@ -0,0 +1,14 @@
1
+ import { IconAction } from '../../enums/index.js';
2
+
3
+ export const WtIconActionIconMappings = Object.freeze({
4
+ [IconAction.ADD]: 'plus',
5
+ [IconAction.DELETE]: 'bucket',
6
+ [IconAction.DOWNLOAD]: 'download',
7
+ [IconAction.EDIT]: 'edit',
8
+ [IconAction.HISTORY]: 'history',
9
+ [IconAction.REFRESH]: 'refresh',
10
+ [IconAction.EXPAND]: 'expand',
11
+ [IconAction.COLLAPSE]: 'collapse',
12
+ [IconAction.FILTERS]: 'filter',
13
+ [IconAction.COLUMNS]: 'column-select',
14
+ });
@@ -14,8 +14,9 @@
14
14
  <script setup>
15
15
  import { computed } from 'vue';
16
16
  import { useI18n } from 'vue-i18n';
17
- import { IActionData } from './IActionData.js';
17
+
18
18
  import IconAction from '../../enums/IconAction/IconAction.enum.js';
19
+ import { WtIconActionIconMappings } from './iconMappings.js';
19
20
 
20
21
  const props = defineProps({
21
22
  /**
@@ -45,16 +46,19 @@ const emit = defineEmits(['click']);
45
46
  const { t } = useI18n();
46
47
 
47
48
  const iconAction = computed(() => {
48
- const data = IActionData[props.action];
49
+ const icon = WtIconActionIconMappings[props.action];
49
50
 
50
- if (!data) {
51
+ if (!icon) {
51
52
  console.error(
52
53
  `Unknown action for wt-icon-action component: ${props.action}`,
53
54
  );
54
55
  return { icon: 'edit', hint: props.action };
55
56
  }
56
57
 
57
- return data;
58
+ return {
59
+ icon,
60
+ hint: `webitelUI.iconAction.hints.${props.action}`,
61
+ };
58
62
  });
59
63
  </script>
60
64
 
@@ -5,7 +5,9 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
+
8
9
  import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
+ import { IconAction } from '../../enums/index.js';
9
11
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
10
12
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
13
  import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
@@ -18,6 +20,9 @@ import { snakeToCamel } from '../../scripts/caseConverters.js';
18
20
  export default {
19
21
  // describes reusable buttons, actions, default titles, and other ui elements
20
22
  reusable: {
23
+ download: 'Download',
24
+ history: 'History',
25
+ filter: ({ plural }) => plural(['Filter', 'Filters']),
21
26
  total: 'Total',
22
27
  ok: 'Ok',
23
28
  save: 'Save',
@@ -349,11 +354,18 @@ export default {
349
354
  breakOut: 'Break Out',
350
355
  },
351
356
  iconAction: {
352
- deleteActionHint: 'Delete',
353
- editActionHint: 'Edit',
354
- addActionHint: 'Add',
355
- historyActionHint: 'History',
356
- downloadActionHint: 'Download',
357
+ hints: {
358
+ [IconAction.DELETE]: ({ linked }) => linked('reusable.delete'),
359
+ [IconAction.EDIT]: ({ linked }) => linked('reusable.edit'),
360
+ [IconAction.ADD]: ({ linked }) => linked('reusable.add'),
361
+ [IconAction.HISTORY]: ({ linked }) => linked('reusable.history'),
362
+ [IconAction.DOWNLOAD]: ({ linked }) => linked('reusable.download'),
363
+ [IconAction.FILTERS]: ({ linked }) => linked('reusable.filter'),
364
+ [IconAction.COLUMNS]: 'Select columns',
365
+ [IconAction.REFRESH]: ({ linked }) => linked('reusable.refresh'),
366
+ [IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
367
+ [IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
368
+ },
357
369
  },
358
370
  errorPages: {
359
371
  goBack: 'Go back',
@@ -5,7 +5,9 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
+
8
9
  import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
+ import { IconAction } from '../../enums/index.js';
9
11
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
10
12
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
13
  import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
@@ -18,6 +20,9 @@ import { snakeToCamel } from '../../scripts/caseConverters.js';
18
20
  export default {
19
21
  // describes reusable buttons, actions, default titles, and other ui elements
20
22
  reusable: {
23
+ download: 'Скачать',
24
+ history: 'История',
25
+ filter: 'Фильтр | Фильтры',
21
26
  total: 'Всего',
22
27
  ok: 'Ок',
23
28
  save: 'Сохранить',
@@ -347,11 +352,18 @@ export default {
347
352
  breakOut: 'Принудительный перерыв',
348
353
  },
349
354
  iconAction: {
350
- deleteActionHint: 'Удалить',
351
- editActionHint: 'Редактировать',
352
- addActionHint: 'Добавить',
353
- historyActionHint: 'История',
354
- downloadActionHint: 'Скачать',
355
+ hints: {
356
+ [IconAction.DELETE]: ({ linked }) => linked('reusable.delete'),
357
+ [IconAction.EDIT]: ({ linked }) => linked('reusable.edit'),
358
+ [IconAction.ADD]: ({ linked }) => linked('reusable.add'),
359
+ [IconAction.HISTORY]: ({ linked }) => linked('reusable.history'),
360
+ [IconAction.DOWNLOAD]: ({ linked }) => linked('reusable.download'),
361
+ [IconAction.FILTERS]: ({ linked }) => linked('reusable.filter', 2),
362
+ [IconAction.COLUMNS]: 'Добавить колонки',
363
+ [IconAction.REFRESH]: ({ linked }) => linked('reusable.refresh'),
364
+ [IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
365
+ [IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
366
+ },
355
367
  },
356
368
  errorPages: {
357
369
  goBack: 'Вернуться назад',
@@ -5,7 +5,9 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
+
8
9
  import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
+ import { IconAction } from '../../enums/index.js';
9
11
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
10
12
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
13
  import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
@@ -18,6 +20,9 @@ import { snakeToCamel } from '../../scripts/caseConverters.js';
18
20
  export default {
19
21
  // describes reusable buttons, actions, default titles, and other ui elements
20
22
  reusable: {
23
+ download: 'Завантажити',
24
+ history: 'Історія',
25
+ filter: 'Фільтр | Фільтри',
21
26
  total: 'Всього',
22
27
  ok: 'Ок',
23
28
  save: 'Зберегти',
@@ -347,11 +352,18 @@ export default {
347
352
  breakOut: 'Примусова перерва',
348
353
  },
349
354
  iconAction: {
350
- deleteActionHint: 'Видалити',
351
- editActionHint: 'Редагувати',
352
- addActionHint: 'Додати',
353
- historyActionHint: 'Історія',
354
- downloadActionHint: 'Скачати',
355
+ hints: {
356
+ [IconAction.DELETE]: ({ linked }) => linked('reusable.delete'),
357
+ [IconAction.EDIT]: ({ linked }) => linked('reusable.edit'),
358
+ [IconAction.ADD]: ({ linked }) => linked('reusable.add'),
359
+ [IconAction.HISTORY]: ({ linked }) => linked('reusable.history'),
360
+ [IconAction.DOWNLOAD]: ({ linked }) => linked('reusable.download'),
361
+ [IconAction.FILTERS]: ({ linked }) => linked('reusable.filter', 2),
362
+ [IconAction.COLUMNS]: 'Додати колонки',
363
+ [IconAction.REFRESH]: ({ linked }) => linked('reusable.refresh'),
364
+ [IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
365
+ [IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
366
+ },
355
367
  },
356
368
  errorPages: {
357
369
  goBack: 'Повернутись назад',
@@ -1,46 +0,0 @@
1
- import IconAction from '../../enums/IconAction/IconAction.enum.js';
2
-
3
- const IActionData = Object.freeze({
4
- [IconAction.ADD]: {
5
- value: IconAction.ADD,
6
- icon: 'plus',
7
- hint: 'webitelUI.iconAction.addActionHint',
8
- },
9
- [IconAction.DELETE]: {
10
- value: IconAction.DELETE,
11
- icon: 'bucket',
12
- hint: 'webitelUI.iconAction.deleteActionHint',
13
- },
14
- [IconAction.DOWNLOAD]: {
15
- value: IconAction.DOWNLOAD,
16
- icon: 'download',
17
- hint: 'webitelUI.iconAction.downloadActionHint',
18
- },
19
- [IconAction.EDIT]: {
20
- value: IconAction.EDIT,
21
- icon: 'edit',
22
- hint: 'webitelUI.iconAction.editActionHint',
23
- },
24
- [IconAction.HISTORY]: {
25
- value: IconAction.HISTORY,
26
- icon: 'history',
27
- hint: 'webitelUI.iconAction.historyActionHint',
28
- },
29
- [IconAction.REFRESH]: {
30
- value: IconAction.REFRESH,
31
- icon: 'refresh',
32
- hint: 'reusable.refresh',
33
- },
34
- [IconAction.EXPAND]: {
35
- value: IconAction.EXPAND,
36
- icon: 'expand',
37
- hint: 'reusable.expand',
38
- },
39
- [IconAction.COLLAPSE]: {
40
- value: IconAction.COLLAPSE,
41
- icon: 'collapse',
42
- hint: 'reusable.collapse',
43
- },
44
- });
45
-
46
- export { IActionData };