@webitel/ui-sdk 24.10.2 → 24.10.4

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 (201) hide show
  1. package/dist/ui-sdk.css +1 -1
  2. package/dist/ui-sdk.js +111 -114
  3. package/dist/ui-sdk.umd.cjs +8 -8
  4. package/package.json +6 -4
  5. package/src/api/axios/generateInstance.js +1 -4
  6. package/src/api/clients/agents/agents.js +31 -78
  7. package/src/api/clients/buckets/buckets.js +17 -57
  8. package/src/api/clients/calendars/calendars.js +18 -71
  9. package/src/api/clients/chatGateways/chatGateways.js +23 -61
  10. package/src/api/clients/chatGateways/defaults/webChatGateway.js +6 -8
  11. package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +3 -3
  12. package/src/api/clients/communications/communications.js +20 -62
  13. package/src/api/clients/configurations/configurations.js +18 -3
  14. package/src/api/clients/flows/flow.js +17 -60
  15. package/src/api/clients/gateways/gateways.js +20 -59
  16. package/src/api/clients/index.js +1 -1
  17. package/src/api/clients/lists/blacklists.js +18 -60
  18. package/src/api/clients/media/media.js +13 -43
  19. package/src/api/clients/queues/defaults/processing.js +10 -6
  20. package/src/api/clients/queues/queues.js +21 -69
  21. package/src/api/clients/roles/roles.js +15 -33
  22. package/src/api/clients/users/__tests__/users.spec.js +43 -26
  23. package/src/api/clients/users/users.js +21 -56
  24. package/src/api/crm/contactChatMessagesHistory.js +8 -23
  25. package/src/api/crm/index.js +1 -3
  26. package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +1 -4
  27. package/src/api/defaults/getDefaultInstance/getDefaultInstance.js +10 -11
  28. package/src/api/defaults/getDefaultOpenAPIConfig/getDefaultOpenAPIConfig.js +6 -5
  29. package/src/api/defaults/index.js +2 -4
  30. package/src/api/history/index.js +1 -3
  31. package/src/api/history/transcript/callTranscript.js +10 -30
  32. package/src/api/interceptors/request/updateToken.interceptor.js +1 -2
  33. package/src/api/transformers/merge/merge.transformer.js +4 -1
  34. package/src/api/transformers/mergeEach/mergeEach.transformer.js +4 -4
  35. package/src/api/transformers/notify/notify.transformer.js +9 -6
  36. package/src/api/transformers/starToSearch/starToSearch.transformer.js +8 -6
  37. package/src/components/index.js +3 -6
  38. package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +2 -4
  39. package/src/components/transitions/wt-expand-transition.vue +2 -3
  40. package/src/components/wt-app-header/__tests__/WtAppNavigator.spec.js +1 -2
  41. package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +1 -2
  42. package/src/components/wt-app-header/wt-app-navigator.vue +15 -9
  43. package/src/components/wt-avatar/wt-avatar.vue +8 -3
  44. package/src/components/wt-button/wt-button.vue +0 -1
  45. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -5
  46. package/src/components/wt-button-select/wt-button-select.vue +0 -1
  47. package/src/components/wt-context-menu/wt-context-menu.vue +32 -35
  48. package/src/components/wt-dummy/wt-dummy.vue +2 -5
  49. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +10 -7
  50. package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +4 -8
  51. package/src/components/wt-icon/wt-icon.vue +0 -1
  52. package/src/components/wt-indicator/__tests__/WtIndicator.spec.js +3 -2
  53. package/src/components/wt-indicator/wt-indicator.vue +10 -1
  54. package/src/components/wt-input/wt-input.vue +7 -10
  55. package/src/components/wt-item-link/wt-item-link.vue +7 -4
  56. package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +7 -15
  57. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +7 -7
  58. package/src/components/wt-notification/wt-notification.vue +1 -2
  59. package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +6 -3
  60. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +4 -1
  61. package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +1 -2
  62. package/src/components/wt-pagination/wt-pagination.vue +1 -3
  63. package/src/components/wt-player/scripts/__tests__/createPlyrURL.spec.js +4 -8
  64. package/src/components/wt-player/wt-player.vue +13 -4
  65. package/src/components/wt-popup/wt-popup.vue +2 -1
  66. package/src/components/wt-search-bar/wt-search-bar.vue +1 -1
  67. package/src/components/wt-select/mixins/multiselectMixin.js +2 -5
  68. package/src/components/wt-select/wt-select.vue +12 -11
  69. package/src/components/wt-slider/wt-slider.vue +4 -2
  70. package/src/components/wt-status-select/wt-status-select.vue +10 -6
  71. package/src/components/wt-stepper/wt-stepper.vue +6 -4
  72. package/src/components/wt-switcher/wt-switcher.vue +1 -3
  73. package/src/components/wt-table/__tests__/WtTable.spec.js +2 -5
  74. package/src/components/wt-table/wt-table.vue +18 -16
  75. package/src/components/wt-table-column-select/wt-table-column-select.vue +9 -8
  76. package/src/components/wt-tabs/wt-tabs.vue +1 -3
  77. package/src/components/wt-tags-input/mixin/taggableMixin.js +7 -7
  78. package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +2 -4
  79. package/src/components/wt-textarea/wt-textarea.vue +3 -2
  80. package/src/components/wt-timepicker/wt-timepicker.vue +1 -3
  81. package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +1 -3
  82. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +8 -12
  83. package/src/components/wt-tooltip/wt-tooltip.vue +13 -13
  84. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +6 -4
  85. package/src/composables/useCachedInterval/useCachedInterval.js +3 -8
  86. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +11 -33
  87. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +11 -9
  88. package/src/enums/WebitelApplications/AdminSections.enum.js +28 -28
  89. package/src/enums/WebitelApplications/CrmSections.enum.js +1 -1
  90. package/src/locale/en/en.js +12 -15
  91. package/src/locale/es/es.js +4 -8
  92. package/src/locale/kz/kz.js +5 -7
  93. package/src/locale/ru/ru.js +7 -11
  94. package/src/locale/ua/ua.js +13 -17
  95. package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +1 -2
  96. package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +4 -2
  97. package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +4 -1
  98. package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +1 -1
  99. package/src/mixins/dataFilterMixins/apiFilterMixin.js +1 -2
  100. package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +1 -2
  101. package/src/mixins/dataFilterMixins/enumFilterMixin.js +5 -6
  102. package/src/mixins/dataFilterMixins/paginationFilterMixin.js +1 -2
  103. package/src/mixins/dataFilterMixins/sortFilterMixin.js +1 -4
  104. package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +1 -2
  105. package/src/mixins/validationMixin/useValidation.js +25 -19
  106. package/src/mixins/validationMixin/validationMixin.js +22 -10
  107. package/src/modules/AgentStatusSelect/api/pause-cause.js +3 -11
  108. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +16 -18
  109. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +1 -2
  110. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +12 -12
  111. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +0 -1
  112. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +20 -7
  113. package/src/modules/Appearance/components/__tests__/wt-dark-mode-switcher.spec.js +2 -4
  114. package/src/modules/Appearance/components/wt-dark-mode-switcher.vue +0 -1
  115. package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +1 -2
  116. package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +15 -25
  117. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +11 -20
  118. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +1 -4
  119. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +4 -7
  120. package/src/modules/AuditForm/components/audit-form-question.vue +18 -17
  121. package/src/modules/AuditForm/components/audit-form.vue +12 -14
  122. package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +1 -2
  123. package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +1 -3
  124. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +11 -15
  125. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +1 -4
  126. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +16 -20
  127. package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +1 -3
  128. package/src/modules/CSVExport/CSVExport.js +3 -7
  129. package/src/modules/CSVExport/XLSExport.js +6 -7
  130. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +1 -2
  131. package/src/modules/CSVExport/mixins/exportCSVMixin.js +2 -5
  132. package/src/modules/CSVExport/mixins/exportXLSMixin.js +2 -4
  133. package/src/modules/CardStoreModule/store/CardStoreModule.js +2 -6
  134. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +13 -10
  135. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +5 -14
  136. package/src/modules/FilesExport/FilesExport.js +4 -3
  137. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +12 -12
  138. package/src/modules/FilesExport/mixins/exportFilesMixin.js +6 -7
  139. package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -2
  140. package/src/modules/Filters/classes/BaseFilterSchema.js +21 -23
  141. package/src/modules/Filters/components/filter-pagination.vue +7 -3
  142. package/src/modules/Filters/components/filter-search.vue +21 -12
  143. package/src/modules/Filters/components/filter-table-fields.vue +1 -3
  144. package/src/modules/Filters/scripts/getters/index.js +1 -5
  145. package/src/modules/Filters/scripts/getters/queryGetter.js +8 -3
  146. package/src/modules/Filters/scripts/getters/valueGetter.js +1 -2
  147. package/src/modules/Filters/scripts/restores/index.js +1 -4
  148. package/src/modules/Filters/scripts/setters/index.js +1 -5
  149. package/src/modules/Filters/scripts/setters/querySetter.js +24 -22
  150. package/src/modules/Filters/scripts/utils/changeRouteQuery.js +16 -15
  151. package/src/modules/Filters/store/FiltersStoreModule.js +51 -45
  152. package/src/modules/Filters/store/__tests__/FiltersStoreModule.spec.js +51 -45
  153. package/src/modules/Notifications/store/NotificationsStoreModule.js +41 -38
  154. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  155. package/src/modules/QueryFilters/api/defaults.js +2 -3
  156. package/src/modules/QueryFilters/classes/ApiFilterSchema.js +1 -4
  157. package/src/modules/QueryFilters/classes/EnumFilterSchema.js +1 -4
  158. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +1 -2
  159. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +2 -4
  160. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -4
  161. package/src/modules/QueryFilters/components/filter-table-fields.vue +1 -5
  162. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +4 -3
  163. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -4
  164. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +4 -2
  165. package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +4 -1
  166. package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +1 -1
  167. package/src/modules/QueryFilters/mixins/apiFilterMixin.js +1 -1
  168. package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +4 -2
  169. package/src/modules/QueryFilters/mixins/enumFilterMixin.js +9 -11
  170. package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +2 -4
  171. package/src/modules/QueryFilters/mixins/sortFilterMixin.js +2 -5
  172. package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +13 -17
  173. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +15 -16
  174. package/src/modules/TableStoreModule/store/TableStoreModule.js +14 -33
  175. package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +69 -83
  176. package/src/modules/Userinfo/api/userinfo.js +6 -19
  177. package/src/modules/Userinfo/classes/ApplicationsAccess.js +5 -12
  178. package/src/modules/Userinfo/store/UserinfoStoreModule.js +38 -41
  179. package/src/plugins/breakpoint/breakpoint.plugin.js +11 -16
  180. package/src/scripts/__tests__/caseConverters.spec.js +1 -4
  181. package/src/scripts/__tests__/debounce.spec.js +3 -1
  182. package/src/scripts/__tests__/prettifyFileSize.spec.js +2 -2
  183. package/src/scripts/__tests__/preventHiddenPageCallsDecorator.spec.js +7 -4
  184. package/src/scripts/__tests__/updateObject.spec.js +3 -5
  185. package/src/scripts/caseConverters.js +22 -38
  186. package/src/scripts/debounce.js +1 -5
  187. package/src/scripts/editProxy.js +8 -7
  188. package/src/scripts/prettifyFileSize.js +1 -1
  189. package/src/scripts/preventHiddenPageCallsDecorator.js +3 -6
  190. package/src/store/BaseStoreModules/ApiStoreModule.js +7 -33
  191. package/src/store/BaseStoreModules/BaseStoreModule.js +14 -23
  192. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +7 -28
  193. package/src/store/helpers/getNamespacedState.js +2 -4
  194. package/src/store/new/modules/apiStoreModule/apiStoreModule.js +7 -27
  195. package/src/store/new/modules/cardStoreModule/cardStoreModule.js +0 -1
  196. package/src/store/new/modules/tableStoreModule/__tests__/tableStoreModule.spec.js +64 -77
  197. package/src/store/new/modules/tableStoreModule/tableStoreModule.js +12 -29
  198. package/src/tests/mocks/axiosMock.js +25 -19
  199. package/src/validators/decimalValidator.js +5 -4
  200. package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +1 -2
  201. package/src/validators/websocketValidator/websocketValidator.js +1 -1
@@ -136,8 +136,9 @@ export default {
136
136
  // cant test this thing cause vue test utils doesnt render elements width :/
137
137
  const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
138
138
  const inputEl = this.$refs['wt-textarea'];
139
- const defaultInputPadding = getComputedStyle(document.documentElement)
140
- .getPropertyValue('--textarea-padding');
139
+ const defaultInputPadding = getComputedStyle(document.documentElement).getPropertyValue(
140
+ '--textarea-padding',
141
+ );
141
142
  inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
142
143
  },
143
144
  },
@@ -129,9 +129,7 @@ export default {
129
129
  },
130
130
  sec: {
131
131
  get() {
132
- return this.dateMode
133
- ? new Date(+this.value).getSeconds()
134
- : Math.floor(this.value % 60);
132
+ return this.dateMode ? new Date(+this.value).getSeconds() : Math.floor(this.value % 60);
135
133
  },
136
134
  set(value) {
137
135
  const newValue = this.dateMode
@@ -19,9 +19,7 @@ const HIDE_EVENT_MAP = {
19
19
  };
20
20
 
21
21
  // eslint-disable-next-line import/prefer-default-export
22
- export const useTooltipTriggerSubscriptions = ({
23
- target, triggers, show, hide,
24
- }) => {
22
+ export const useTooltipTriggerSubscriptions = ({ target, triggers, show, hide }) => {
25
23
  const subscribeTriggers = () => {
26
24
  const setEventListeners = (target, triggers) => {
27
25
  triggers.forEach((trigger) => {
@@ -9,13 +9,13 @@
9
9
 
10
10
  <script setup>
11
11
  /*
12
- * We need to create separate floating component so that we could set
13
- * eventListeners on it at mount
14
- *
15
- * wt-tooltip itself can't do it, because floating is rendered conditionally
16
- * through v-if so that there's no way to attach eventListeners to floating
17
- * on tooltip mount
18
- * */
12
+ * We need to create separate floating component so that we could set
13
+ * eventListeners on it at mount
14
+ *
15
+ * wt-tooltip itself can't do it, because floating is rendered conditionally
16
+ * through v-if so that there's no way to attach eventListeners to floating
17
+ * on tooltip mount
18
+ * */
19
19
 
20
20
  import { ref } from 'vue';
21
21
  import { useTooltipTriggerSubscriptions } from './useTooltipTriggerSubscriptions.js';
@@ -27,10 +27,7 @@ const props = defineProps({
27
27
  },
28
28
  });
29
29
 
30
- const emit = defineEmits([
31
- 'show',
32
- 'hide',
33
- ]);
30
+ const emit = defineEmits(['show', 'hide']);
34
31
 
35
32
  const floating = ref(null);
36
33
 
@@ -40,7 +37,6 @@ useTooltipTriggerSubscriptions({
40
37
  show: () => emit('show'),
41
38
  hide: () => emit('hide'),
42
39
  });
43
-
44
40
  </script>
45
41
 
46
42
  <style lang="scss" scoped>
@@ -29,10 +29,10 @@
29
29
 
30
30
  <script setup>
31
31
  import { autoPlacement, autoUpdate, flip, offset, shift, useFloating } from '@floating-ui/vue';
32
- import { onMounted, onBeforeUnmount, ref, watch } from 'vue';
32
+ import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
33
+ import debounce from '../../scripts/debounce.js';
33
34
  import { useTooltipTriggerSubscriptions } from './_internals/useTooltipTriggerSubscriptions.js';
34
35
  import WtTooltipFloating from './_internals/wt-tooltip-floating.vue';
35
- import debounce from '../../scripts/debounce.js';
36
36
 
37
37
  const props = defineProps({
38
38
  visible: {
@@ -103,10 +103,7 @@ const { floatingStyles } = useFloating(activator, floating, {
103
103
  TOGGLE BECAUSE OF PERFORMANCE ISSUES, RELATED TO USAGE OF AUTO_UPDATE OF POSITIONS
104
104
  */
105
105
  whileElementsMounted: autoUpdate, // https://floating-ui.com/docs/vue#anchoring
106
- middleware: [
107
- shift(), offset(4),
108
- props.placement === 'auto' ? autoPlacement() : flip(),
109
- ],
106
+ middleware: [shift(), offset(4), props.placement === 'auto' ? autoPlacement() : flip()],
110
107
  });
111
108
 
112
109
  useTooltipTriggerSubscriptions({
@@ -116,18 +113,21 @@ useTooltipTriggerSubscriptions({
116
113
  hide: hideTooltip,
117
114
  });
118
115
 
119
- watch(() => props.visible, (value) => {
120
- if (value) showTooltip();
121
- else hideTooltip();
122
- });
116
+ watch(
117
+ () => props.visible,
118
+ (value) => {
119
+ if (value) showTooltip();
120
+ else hideTooltip();
121
+ },
122
+ );
123
123
 
124
124
  onMounted(() => {
125
125
  if (props.visible) showTooltip();
126
126
  });
127
127
 
128
- onBeforeUnmount( () => {
129
- removeScrollListener()
130
- })
128
+ onBeforeUnmount(() => {
129
+ removeScrollListener();
130
+ });
131
131
  </script>
132
132
 
133
133
  <style lang="scss">
@@ -6,9 +6,11 @@ describe('useCachedInterval', () => {
6
6
  const { subscribe } = useCachedInterval({ timeout: 10 });
7
7
  subscribe(callback);
8
8
  expect(callback).toHaveBeenCalledTimes(1);
9
- return await new Promise((resolve, reject) => setTimeout(() => {
10
- expect(callback).toHaveBeenCalledTimes(2);
11
- resolve();
12
- }, 10));
9
+ return await new Promise((resolve, reject) =>
10
+ setTimeout(() => {
11
+ expect(callback).toHaveBeenCalledTimes(2);
12
+ resolve();
13
+ }, 10),
14
+ );
13
15
  });
14
16
  });
@@ -1,20 +1,15 @@
1
1
  import { onBeforeUnmount } from 'vue';
2
- import preventHiddenPageCallsDecorator
3
- from '../../scripts/preventHiddenPageCallsDecorator.js';
2
+ import preventHiddenPageCallsDecorator from '../../scripts/preventHiddenPageCallsDecorator.js';
4
3
 
5
4
  // eslint-disable-next-line import/prefer-default-export
6
- export const useCachedInterval = ({
7
- timeout,
8
- localStorageKey = 'auto-refresh',
9
- }) => {
5
+ export const useCachedInterval = ({ timeout, localStorageKey = 'auto-refresh' }) => {
10
6
  let interval = null;
11
7
 
12
8
  onBeforeUnmount(() => {
13
9
  if (interval) clearInterval(interval);
14
10
  });
15
11
  const subscribe = (callback) => {
16
- const _timeout = timeout || +localStorage.getItem(localStorageKey) || 5 *
17
- 60 * 1000;
12
+ const _timeout = timeout || +localStorage.getItem(localStorageKey) || 5 * 60 * 1000;
18
13
  callback();
19
14
  interval = setInterval(preventHiddenPageCallsDecorator(callback), _timeout);
20
15
  };
@@ -1,82 +1,60 @@
1
- import {
2
- useRepresentableAgentPauseCause,
3
- } from '../useRepresentableAgentPauseCause.js';
1
+ import { useRepresentableAgentPauseCause } from '../useRepresentableAgentPauseCause.js';
4
2
 
5
3
  describe('useRepresentableAgentPauseCause', () => {
6
4
  it('correctly computes duration', () => {
7
5
  const pauseCauses = { value: [{ durationMin: 10, limitMin: 12 }] };
8
- const {
9
- representablePauseCause,
10
- } = useRepresentableAgentPauseCause(pauseCauses);
6
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
11
7
  expect(representablePauseCause.value[0].duration).toBe('00:10');
12
8
  });
13
9
  it('isOverflow with limit = 0 returns false', () => {
14
10
  const pauseCauses = { value: [{ durationMin: 10, limitMin: 0 }] };
15
- const {
16
- representablePauseCause,
17
- } = useRepresentableAgentPauseCause(pauseCauses);
11
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
18
12
  expect(representablePauseCause.value[0].isOverflow).toBe(false);
19
13
  });
20
14
  it('isOverflow with duration < limit returns false', () => {
21
15
  const pauseCauses = { value: [{ durationMin: 10, limitMin: 12 }] };
22
- const {
23
- representablePauseCause,
24
- } = useRepresentableAgentPauseCause(pauseCauses);
16
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
25
17
  expect(representablePauseCause.value[0].isOverflow).toBe(false);
26
18
  });
27
19
  it('isOverflow with duration > limit returns true', () => {
28
20
  const pauseCauses = { value: [{ durationMin: 14, limitMin: 12 }] };
29
- const {
30
- representablePauseCause,
31
- } = useRepresentableAgentPauseCause(pauseCauses);
21
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
32
22
  expect(representablePauseCause.value[0].isOverflow).toBe(true);
33
23
  });
34
24
 
35
25
  it('isOverflow with duration = limit returns false', () => {
36
26
  const pauseCauses = { value: [{ durationMin: 12, limitMin: 12 }] };
37
- const {
38
- representablePauseCause,
39
- } = useRepresentableAgentPauseCause(pauseCauses);
27
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
40
28
  expect(representablePauseCause.value[0].isOverflow).toBe(false);
41
29
  });
42
30
 
43
31
  it('correctly computes progressColor', () => {
44
32
  const pauseCauses = { value: [{ durationMin: 10, limitMin: 12 }] };
45
- const {
46
- representablePauseCause,
47
- } = useRepresentableAgentPauseCause(pauseCauses);
33
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
48
34
  expect(representablePauseCause.value[0].progressColor).toBe('primary');
49
35
  });
50
36
 
51
37
  it('correctly computes progressColor with duration > limit', () => {
52
38
  const pauseCauses = { value: [{ durationMin: 14, limitMin: 12 }] };
53
- const {
54
- representablePauseCause,
55
- } = useRepresentableAgentPauseCause(pauseCauses);
39
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
56
40
  expect(representablePauseCause.value[0].progressColor).toBe('error');
57
41
  });
58
42
 
59
43
  it('correctly computes progressColor with duration < limit', () => {
60
44
  const pauseCauses = { value: [{ durationMin: 3, limitMin: 12 }] };
61
- const {
62
- representablePauseCause,
63
- } = useRepresentableAgentPauseCause(pauseCauses);
45
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
64
46
  expect(representablePauseCause.value[0].progressColor).toBe('success');
65
47
  });
66
48
 
67
49
  it('correctly computes progressColor with duration = limit', () => {
68
50
  const pauseCauses = { value: [{ durationMin: 12, limitMin: 12 }] };
69
- const {
70
- representablePauseCause,
71
- } = useRepresentableAgentPauseCause(pauseCauses);
51
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
72
52
  expect(representablePauseCause.value[0].progressColor).toBe('primary');
73
53
  });
74
54
 
75
55
  it('correctly computes limit', () => {
76
56
  const pauseCauses = { value: [{ durationMin: 12, limitMin: 12 }] };
77
- const {
78
- representablePauseCause,
79
- } = useRepresentableAgentPauseCause(pauseCauses);
57
+ const { representablePauseCause } = useRepresentableAgentPauseCause(pauseCauses);
80
58
  expect(representablePauseCause.value[0].limit).toBe('00:12');
81
59
  });
82
60
  });
@@ -8,7 +8,7 @@ const prettifyPauseCauseDuration = (min) => {
8
8
  };
9
9
 
10
10
  const isDurationOverflow = ({ durationMin, limitMin }) => {
11
- return (durationMin > limitMin) && limitMin !== 0;
11
+ return durationMin > limitMin && limitMin !== 0;
12
12
  };
13
13
 
14
14
  const duration = ({ durationMin, limitMin }) => {
@@ -19,19 +19,21 @@ const duration = ({ durationMin, limitMin }) => {
19
19
 
20
20
  const pauseCauseProgressColor = ({ durationMin, limitMin }) => {
21
21
  if (isDurationOverflow({ durationMin, limitMin })) return 'error';
22
- if (durationMin <= (limitMin * 0.75)) return 'success';
22
+ if (durationMin <= limitMin * 0.75) return 'success';
23
23
  return 'primary';
24
24
  };
25
25
 
26
26
  // eslint-disable-next-line import/prefer-default-export
27
27
  export const useRepresentableAgentPauseCause = (pauseCauses) => {
28
- const representablePauseCause = computed(() => pauseCauses.value.map((pauseCause) => ({
29
- ...pauseCause,
30
- duration: duration(pauseCause),
31
- progressColor: pauseCauseProgressColor(pauseCause),
32
- isOverflow: isDurationOverflow(pauseCause),
33
- limit: prettifyPauseCauseDuration(pauseCause.limitMin),
34
- })));
28
+ const representablePauseCause = computed(() =>
29
+ pauseCauses.value.map((pauseCause) => ({
30
+ ...pauseCause,
31
+ duration: duration(pauseCause),
32
+ progressColor: pauseCauseProgressColor(pauseCause),
33
+ isOverflow: isDurationOverflow(pauseCause),
34
+ limit: prettifyPauseCauseDuration(pauseCause.limitMin),
35
+ })),
36
+ );
35
37
 
36
38
  return { representablePauseCause };
37
39
  };
@@ -1,45 +1,45 @@
1
1
  const AdminSections = Object.freeze({
2
2
  // DIRECTORY
3
- LICENSE: 'license', // permissions: add
4
- USERS: 'users', // scope: users
5
- DEVICES: 'devices', // scope: devices
3
+ LICENSE: 'license', // permissions: add
4
+ USERS: 'users', // scope: users
5
+ DEVICES: 'devices', // scope: devices
6
6
 
7
7
  // ROUTING
8
- FLOW: 'flow', // scope: flow
9
- DIALPLAN: 'dialplan', // scope: acr_routing
10
- GATEWAYS: 'gateways', // scope: gateways
11
- CHATPLAN: 'chatplan', // scope: acr_routing
12
- CHAT_GATEWAYS: 'chat-gateways', // scope: chats
8
+ FLOW: 'flow', // scope: flow
9
+ DIALPLAN: 'dialplan', // scope: acr_routing
10
+ GATEWAYS: 'gateways', // scope: gateways
11
+ CHATPLAN: 'chatplan', // scope: acr_routing
12
+ CHAT_GATEWAYS: 'chat-gateways', // scope: chats
13
13
 
14
14
  // LOOKUPS
15
- BLACKLIST: 'blacklist', // scope: cc_list
16
- REGIONS: 'regions', // scope: lookups
17
- CALENDARS: 'calendars', // scope: calendars
18
- COMMUNICATIONS: 'communications', // scope: lookups
19
- PAUSE_CAUSE: 'pause-cause', // scope: lookups
20
- MEDIA: 'media', // scope: media_file
15
+ BLACKLIST: 'blacklist', // scope: cc_list
16
+ REGIONS: 'regions', // scope: lookups
17
+ CALENDARS: 'calendars', // scope: calendars
18
+ COMMUNICATIONS: 'communications', // scope: lookups
19
+ PAUSE_CAUSE: 'pause-cause', // scope: lookups
20
+ MEDIA: 'media', // scope: media_file
21
21
 
22
22
  // CONTACT CENTER
23
- SKILLS: 'skills', // scope: lookups
24
- AGENTS: 'agents', // scope: cc_agent
25
- BUCKETS: 'buckets', // scope: cc_bucket
26
- QUEUES: 'queues', // scope: cc_queue
27
- MEMBERS: 'members', // scope: cc_queue
28
- RESOURCE_GROUPS: 'resource-groups', // scope: cc_resource_group
29
- RESOURCES: 'resources', // scope: cc_resource
30
- TEAMS: 'teams', // scope: cc_team
23
+ SKILLS: 'skills', // scope: lookups
24
+ AGENTS: 'agents', // scope: cc_agent
25
+ BUCKETS: 'buckets', // scope: cc_bucket
26
+ QUEUES: 'queues', // scope: cc_queue
27
+ MEMBERS: 'members', // scope: cc_queue
28
+ RESOURCE_GROUPS: 'resource-groups', // scope: cc_resource_group
29
+ RESOURCES: 'resources', // scope: cc_resource
30
+ TEAMS: 'teams', // scope: cc_team
31
31
 
32
32
  // INTEGRATIONS
33
- STORAGE: 'storage', // scope: storage_profile
34
- COGNITIVE_PROFILES: 'cognitive-profiles', // scope: cognitive_profile
35
- EMAIL_PROFILES: 'email-profiles', // scope: email_profile
36
- SINGLE_SIGN_ON: 'single-sign-on', // scope: single-sign-on
33
+ STORAGE: 'storage', // scope: storage_profile
34
+ COGNITIVE_PROFILES: 'cognitive-profiles', // scope: cognitive_profile
35
+ EMAIL_PROFILES: 'email-profiles', // scope: email_profile
36
+ SINGLE_SIGN_ON: 'single-sign-on', // scope: single-sign-on
37
37
  IMPORT_CSV: 'import-csv',
38
38
  TRIGGERS: 'triggers',
39
39
 
40
40
  // PERMISSIONS
41
- OBJECTS: 'objects', // permissions: add
42
- ROLES: 'roles', // scope: roles
41
+ OBJECTS: 'objects', // permissions: add
42
+ ROLES: 'roles', // scope: roles
43
43
 
44
44
  // SYSTEM
45
45
  CHANGELOGS: 'changelogs',
@@ -1,6 +1,6 @@
1
1
  const CrmSections = Object.freeze({
2
2
  CONTACTS: 'contacts',
3
- CONFIGURATION: 'configuration'
3
+ CONFIGURATION: 'configuration',
4
4
  });
5
5
 
6
6
  export default CrmSections;
@@ -5,18 +5,13 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import ChatGatewayProvider
9
- from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
8
+ import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
9
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
11
- import AdminSections
12
- from '../../enums/WebitelApplications/AdminSections.enum.js';
13
- import AuditorSections
14
- from '../../enums/WebitelApplications/AuditorSections.enum.js';
10
+ import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
+ import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
15
12
  import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
16
- import SupervisorSections
17
- from '../../enums/WebitelApplications/SupervisorSections.enum.js';
18
- import WebitelApplications
19
- from '../../enums/WebitelApplications/WebitelApplications.enum.js';
13
+ import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
14
+ import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
20
15
  import { snakeToCamel } from '../../scripts/caseConverters.js';
21
16
 
22
17
  export default {
@@ -57,7 +52,7 @@ export default {
57
52
  retry: 'Retry',
58
53
  downloadAll: 'Download all',
59
54
  warning: 'Warning',
60
- doNotSave: 'Don\'t save',
55
+ doNotSave: "Don't save",
61
56
  required: 'Required',
62
57
  copy: 'Copy',
63
58
  new: 'New',
@@ -340,8 +335,8 @@ export default {
340
335
  text: 'Sorry, you have not enough privileges to see this page.',
341
336
  },
342
337
  page404: {
343
- title: 'Looks like you\'re lost',
344
- text: 'Sorry, we can\'t find the page you want.',
338
+ title: "Looks like you're lost",
339
+ text: "Sorry, we can't find the page you want.",
345
340
  },
346
341
  },
347
342
  copyAction: {
@@ -362,7 +357,8 @@ export default {
362
357
  },
363
358
  deleteConfirmationPopup: {
364
359
  title: 'Confirm deletion',
365
- askingAlert: 'Are you sure you want\n to delete {count} record? | Are you sure you want\n to delete {count} records?',
360
+ askingAlert:
361
+ 'Are you sure you want\n to delete {count} record? | Are you sure you want\n to delete {count} records?',
366
362
  deleteAll: 'ALL',
367
363
  },
368
364
  dummy: {
@@ -376,7 +372,8 @@ export default {
376
372
  },
377
373
  statusSelectErrorPopup: {
378
374
  title: 'Attention',
379
- message: 'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
375
+ message:
376
+ 'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
380
377
  },
381
378
  },
382
379
  saveFailedPopup: {
@@ -6,14 +6,10 @@ import {
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
8
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
9
- import AdminSections
10
- from '../../enums/WebitelApplications/AdminSections.enum.js';
11
- import AuditorSections
12
- from '../../enums/WebitelApplications/AuditorSections.enum.js';
13
- import SupervisorSections
14
- from '../../enums/WebitelApplications/SupervisorSections.enum.js';
15
- import WebitelApplications
16
- from '../../enums/WebitelApplications/WebitelApplications.enum.js';
9
+ import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
10
+ import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
11
+ import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
12
+ import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
17
13
  import { snakeToCamel } from '../../scripts/caseConverters.js';
18
14
 
19
15
  export default {
@@ -6,13 +6,10 @@ import {
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
8
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
9
- import AdminSections
10
- from '../../enums/WebitelApplications/AdminSections.enum.js';
9
+ import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
10
  import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
12
- import SupervisorSections
13
- from '../../enums/WebitelApplications/SupervisorSections.enum.js';
14
- import WebitelApplications
15
- from '../../enums/WebitelApplications/WebitelApplications.enum.js';
11
+ import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
12
+ import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
16
13
  import { snakeToCamel } from '../../scripts/caseConverters.js';
17
14
 
18
15
  export default {
@@ -311,7 +308,8 @@ export default {
311
308
  },
312
309
  deleteConfirmationPopup: {
313
310
  title: 'Жоюды растаңыз',
314
- askingAlert: '{count} жазбасын жойғыңыз келетініне сенімдісіз бе? | {count} жазбасын жойғыңыз келетініне сенімдісіз бе?',
311
+ askingAlert:
312
+ '{count} жазбасын жойғыңыз келетініне сенімдісіз бе? | {count} жазбасын жойғыңыз келетініне сенімдісіз бе?',
315
313
  undoneActionAlert: 'Бұл әрекетті қайтару мүмкін емес.',
316
314
  deleteAll: 'БАРЛЫҒЫ',
317
315
  },
@@ -5,18 +5,13 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import ChatGatewayProvider
9
- from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
8
+ import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
9
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
11
- import AdminSections
12
- from '../../enums/WebitelApplications/AdminSections.enum.js';
13
- import AuditorSections
14
- from '../../enums/WebitelApplications/AuditorSections.enum.js';
10
+ import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
+ import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
15
12
  import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
16
- import SupervisorSections
17
- from '../../enums/WebitelApplications/SupervisorSections.enum.js';
18
- import WebitelApplications
19
- from '../../enums/WebitelApplications/WebitelApplications.enum.js';
13
+ import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
14
+ import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
20
15
  import { snakeToCamel } from '../../scripts/caseConverters.js';
21
16
 
22
17
  export default {
@@ -360,7 +355,8 @@ export default {
360
355
  },
361
356
  deleteConfirmationPopup: {
362
357
  title: 'Подтвердите удаление',
363
- askingAlert: 'Вы уверенны, что хотите\n удалить {count} запись? | Вы уверенны, что хотите\n удалить {count} записей?',
358
+ askingAlert:
359
+ 'Вы уверенны, что хотите\n удалить {count} запись? | Вы уверенны, что хотите\n удалить {count} записей?',
364
360
  deleteAll: 'ВСЕ',
365
361
  },
366
362
  dummy: {
@@ -5,18 +5,13 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import ChatGatewayProvider
9
- from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
8
+ import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
10
9
  import QueueType from '../../enums/QueueType/QueueType.enum.js';
11
- import AdminSections
12
- from '../../enums/WebitelApplications/AdminSections.enum.js';
13
- import AuditorSections
14
- from '../../enums/WebitelApplications/AuditorSections.enum.js';
10
+ import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
11
+ import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
15
12
  import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
16
- import SupervisorSections
17
- from '../../enums/WebitelApplications/SupervisorSections.enum.js';
18
- import WebitelApplications
19
- from '../../enums/WebitelApplications/WebitelApplications.enum.js';
13
+ import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
14
+ import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
20
15
  import { snakeToCamel } from '../../scripts/caseConverters.js';
21
16
 
22
17
  export default {
@@ -59,7 +54,7 @@ export default {
59
54
  downloadAll: 'Завантажити все',
60
55
  warning: 'Попередження',
61
56
  doNotSave: 'Не зберігати',
62
- required: 'Обов\'язковий',
57
+ required: "Обов'язковий",
63
58
  copy: 'Скопіювати',
64
59
  new: 'Новий',
65
60
  createdAt: 'Створено',
@@ -118,7 +113,7 @@ export default {
118
113
  supervisor: 'Супервізор | Супервізори',
119
114
  auditor: 'Аудитор | Аудитори',
120
115
  region: 'Регіон | Регіони',
121
- communicationType: 'Тип зв\'язку | Типи зв\'язку',
116
+ communicationType: "Тип зв'язку | Типи зв'язку",
122
117
  grantee: 'Отримувач | Отримувачі',
123
118
  user: 'Користувач | Користувачі',
124
119
  queue: {
@@ -128,7 +123,7 @@ export default {
128
123
  [QueueType.OUTBOUND_IVR_QUEUE]: 'Вихідний IVR',
129
124
  [QueueType.PREDICTIVE_DIALER]: 'Предиктивний обзвін',
130
125
  [QueueType.PROGRESSIVE_DIALER]: 'Прогресивний обзвін',
131
- [QueueType.PREVIEW_DIALER]: 'Прев\'ю обзвін',
126
+ [QueueType.PREVIEW_DIALER]: "Прев'ю обзвін",
132
127
  [QueueType.CHAT_INBOUND_QUEUE]: 'Черга чатів',
133
128
  [QueueType.INBOUND_JOB_QUEUE]: 'Вхідна черга завдань',
134
129
  [QueueType.OUTBOUND_JOB_QUEUE]: 'Вихідна черга завдань',
@@ -168,7 +163,7 @@ export default {
168
163
  [ChannelState.Offering]: 'Розподіл',
169
164
  [ChannelState.Answered]: 'Прийнятий',
170
165
  [ChannelState.Active]: 'Активний',
171
- [ChannelState.Bridged]: 'З\'єднаний',
166
+ [ChannelState.Bridged]: 'єднаний",
172
167
  [ChannelState.Hold]: 'Утримання',
173
168
  [ChannelState.Missed]: 'Пропущений',
174
169
  [snakeToCamel(ChannelState.WrapTime)]: 'Постобробка',
@@ -230,7 +225,7 @@ export default {
230
225
  [AdminSections.BLACKLIST]: 'Cписки',
231
226
  [AdminSections.CALENDARS]: 'Календарі',
232
227
  [AdminSections.REGIONS]: 'Розташування',
233
- [AdminSections.COMMUNICATIONS]: 'Типи зв\'язку',
228
+ [AdminSections.COMMUNICATIONS]: "Типи зв'язку",
234
229
  [AdminSections.PAUSE_CAUSE]: 'Статуси оператора',
235
230
  [AdminSections.AGENTS]: 'Оператори',
236
231
  [AdminSections.TEAMS]: 'Команди',
@@ -252,7 +247,7 @@ export default {
252
247
  },
253
248
  },
254
249
  validation: {
255
- required: 'Обов\'язкове поле',
250
+ required: "Обов'язкове поле",
256
251
  numeric: 'Необхідно ввести цифрові значення',
257
252
  email: 'Необхідно ввести адресу електронної пошти',
258
253
  gatewayHostValidator: 'Необхідно ввести IPv4 або FQDN',
@@ -360,7 +355,8 @@ export default {
360
355
  },
361
356
  deleteConfirmationPopup: {
362
357
  title: 'Підтвердіть видалення',
363
- askingAlert: 'Ви впевнені, що хочете\n видалити {count} запис? | Ви впевнені, що хочете\n видалити {count} записів?',
358
+ askingAlert:
359
+ 'Ви впевнені, що хочете\n видалити {count} запис? | Ви впевнені, що хочете\n видалити {count} записів?',
364
360
  deleteAll: 'ВСІ',
365
361
  },
366
362
  dummy: {
@@ -21,8 +21,7 @@ const router = createRouter({
21
21
  describe('Enum filter mixin', () => {
22
22
  let wrapper;
23
23
  const Component = {
24
- render() {
25
- },
24
+ render() {},
26
25
  mixins: [enumFilterMixin],
27
26
  data: () => ({
28
27
  filterQuery: 'type',