@webitel/ui-sdk 24.6.28 → 24.6.31

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 (48) hide show
  1. package/dist/ui-sdk.css +1 -1
  2. package/dist/ui-sdk.js +10794 -8064
  3. package/dist/ui-sdk.umd.cjs +21 -11
  4. package/package.json +1 -1
  5. package/src/api/axios/generateInstance.js +5 -2
  6. package/src/api/clients/users/__tests__/users.spec.js +88 -42
  7. package/src/components/wt-app-header/wt-app-navigator.vue +2 -0
  8. package/src/components/wt-app-header/wt-header-actions.vue +2 -0
  9. package/src/components/wt-button/wt-button.vue +2 -0
  10. package/src/components/wt-checkbox/wt-checkbox.vue +1 -1
  11. package/src/components/wt-chip/wt-chip.scss +2 -0
  12. package/src/components/wt-context-menu/wt-context-menu.vue +1 -0
  13. package/src/components/wt-datepicker/wt-datepicker.vue +1 -0
  14. package/src/components/wt-dummy/wt-dummy.vue +2 -0
  15. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +2 -0
  16. package/src/components/wt-headline/wt-headline.vue +1 -0
  17. package/src/components/wt-headline-nav/wt-headline-nav.vue +2 -0
  18. package/src/components/wt-indicator/wt-indicator.vue +1 -0
  19. package/src/components/wt-input/wt-input.vue +1 -0
  20. package/src/components/wt-input-info/wt-input-info.vue +1 -0
  21. package/src/components/wt-label/wt-label.vue +1 -0
  22. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +1 -1
  23. package/src/components/wt-notification/wt-notification.vue +3 -2
  24. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +1 -0
  25. package/src/components/wt-pagination/wt-pagination.vue +1 -0
  26. package/src/components/wt-player/wt-player.vue +2 -0
  27. package/src/components/wt-popup/wt-popup.vue +1 -0
  28. package/src/components/wt-radio/wt-radio.vue +1 -1
  29. package/src/components/wt-search-bar/wt-search-bar.vue +1 -0
  30. package/src/components/wt-select/_multiselect.scss +1 -0
  31. package/src/components/wt-switcher/wt-switcher.vue +1 -1
  32. package/src/components/wt-table/wt-table.vue +1 -0
  33. package/src/components/wt-table-column-select/wt-table-column-select.vue +2 -0
  34. package/src/components/wt-tabs/wt-tabs.vue +1 -0
  35. package/src/components/wt-textarea/wt-textarea.vue +1 -0
  36. package/src/components/wt-time-input/wt-time-input.vue +2 -0
  37. package/src/components/wt-tooltip/wt-tooltip.vue +1 -0
  38. package/src/css/main.scss +0 -1
  39. package/src/enums/QueueType/QueueType.enum.js +1 -1
  40. package/src/locale/en/en.js +2 -1
  41. package/src/locale/es/es.js +2 -1
  42. package/src/locale/kz/kz.js +2 -1
  43. package/src/locale/ru/ru.js +2 -1
  44. package/src/locale/ua/ua.js +2 -1
  45. package/src/modules/CardStoreModule/store/CardStoreModule.js +2 -1
  46. package/src/modules/Filters/store/FiltersStoreModule.js +1 -1
  47. package/src/modules/TableStoreModule/store/TableStoreModule.js +14 -8
  48. package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +2 -2
@@ -3,7 +3,8 @@ import {
3
3
  queryToSortAdapter,
4
4
  sortToQueryAdapter,
5
5
  } from '../../../scripts/sortQueryAdapters.js';
6
- import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
6
+ import BaseStoreModule
7
+ from '../../../store/BaseStoreModules/BaseStoreModule.js';
7
8
  import FilterEvent from '../../Filters/enums/FilterEvent.enum.js';
8
9
 
9
10
  export default class TableStoreModule extends BaseStoreModule {
@@ -66,7 +67,12 @@ export default class TableStoreModule extends BaseStoreModule {
66
67
  },
67
68
 
68
69
  // FIXME: maybe move to filters module?
69
- HANDLE_FILTERS_RESTORE: (context) => {
70
+ HANDLE_FILTERS_RESTORE: async (context, {
71
+ fields,
72
+ sort,
73
+ }) => {
74
+ if (sort) await context.dispatch('HANDLE_SORT_CHANGE', { value: sort });
75
+ if (fields?.length) await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
70
76
  return context.dispatch('LOAD_DATA_LIST');
71
77
  },
72
78
 
@@ -78,7 +84,7 @@ export default class TableStoreModule extends BaseStoreModule {
78
84
  await context.dispatch('HANDLE_SORT_CHANGE', payload);
79
85
  }
80
86
 
81
- if (context.getters.FILTERS.page && payload.value !== 'page') {
87
+ if (context.getters.FILTERS().page && payload.value !== 'page') {
82
88
  await context.dispatch('SET_FILTER', {
83
89
  name: 'page',
84
90
  value: 1,
@@ -90,19 +96,19 @@ export default class TableStoreModule extends BaseStoreModule {
90
96
  },
91
97
 
92
98
  // FIXME: maybe move to filters module?
93
- HANDLE_FIELDS_CHANGE: (context, payload) => {
99
+ HANDLE_FIELDS_CHANGE: (context, { value }) => {
94
100
  const headers = context.state.headers.map((header) => ({
95
101
  ...header,
96
- show: payload.value.includes(header.value),
102
+ show: value.includes(header.value),
97
103
  }));
98
104
 
99
105
  context.commit('SET', { path: 'headers', value: headers });
100
106
  },
101
107
 
102
108
  // FIXME: maybe move to filters module?
103
- HANDLE_SORT_CHANGE: (context, payload) => {
104
- const nextSort = queryToSortAdapter(payload.value?.slice(0, 1) || '');
105
- const field = nextSort ? payload.value.slice(1) : payload.value;
109
+ HANDLE_SORT_CHANGE: (context, { value }) => {
110
+ const nextSort = queryToSortAdapter(value?.slice(0, 1) || '');
111
+ const field = nextSort ? value.slice(1) : value;
106
112
 
107
113
  const headers = context.state.headers.map(({
108
114
  sort: currentSort,
@@ -147,14 +147,14 @@ describe('TableStoreModule integration with FiltersStoreModule', () => {
147
147
  callback: (payload) => store.dispatch('table/ON_FILTER_EVENT', payload),
148
148
  });
149
149
 
150
- expect(store.getters['table/filters/GET_FILTER']('page')).toBe(12);
150
+ expect(store.getters['table/FILTERS']().page).toBe(12);
151
151
 
152
152
  await store.dispatch('table/filters/SET_FILTER', {
153
153
  name: 'vi',
154
154
  value: 24,
155
155
  });
156
156
 
157
- expect(store.getters['table/filters/GET_FILTER']('page')).toBe(1);
157
+ expect(store.getters['table/FILTERS']().page).toBe(1);
158
158
 
159
159
  await store.dispatch('table/filters/FLUSH_SUBSCRIBERS');
160
160
  });