@webitel/ui-sdk 26.6.94 → 26.6.96

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 (165) hide show
  1. package/dist/{clients-Bj07uFky.js → clients-Ban2DI-G.js} +8 -7
  2. package/dist/{components-l3RJbNmv.js → components-Bim818Xf.js} +13 -8
  3. package/dist/{composables-vmCh4eqT.js → composables-CeAM_2lo.js} +12 -14
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.js +605 -605
  6. package/dist/ui-sdk.umd.cjs +38 -38
  7. package/dist/useValidation-lRiKF7xV.js +39 -0
  8. package/dist/{useVidstackSrc-epUQZhkL.js → useVidstackSrc-B4mUti_c.js} +1 -1
  9. package/dist/{vidstack-C6nBVWwn-BlZqtkYB.js → vidstack-C6nBVWwn-cKiWT0KJ.js} +2 -2
  10. package/dist/{vidstack-CI5oafcm-DAV7Lilr.js → vidstack-CI5oafcm-DfWpvayJ.js} +1 -1
  11. package/dist/{vidstack-DUnfBERX2-Cl6yTfB3.js → vidstack-DUnfBERX2-BJtKHFxc.js} +1 -1
  12. package/dist/{vidstack-audio-CH4wIf0F.js → vidstack-audio-BCPraiiR.js} +1 -1
  13. package/dist/{vidstack-dash-CmlmZIFT.js → vidstack-dash-MBx5aEEA.js} +2 -2
  14. package/dist/{vidstack-hls-D1sxUvBd.js → vidstack-hls-BbZsbfaO.js} +2 -2
  15. package/dist/vidstack-video-DwlbGwN7.js +2 -0
  16. package/dist/{wt-chat-emoji-CGf8vRlv.js → wt-chat-emoji-CX65m8Dd.js} +1 -1
  17. package/dist/{wt-datepicker-D2GjAUWU.js → wt-datepicker-BP9bBbGY.js} +1 -1
  18. package/dist/{wt-display-chip-items-C3TZt4Gn.js → wt-display-chip-items-tL17x2-U.js} +1 -1
  19. package/dist/{wt-expansion-card-DvLD-TP4.js → wt-expansion-card-DET-o0Jq.js} +1 -1
  20. package/dist/{wt-galleria-DT0SOjXk.js → wt-galleria-B6kMr_xS.js} +1 -1
  21. package/dist/{wt-icon-btn-BIU9YjS8.js → wt-icon-btn-DYjjSl-C.js} +5 -2
  22. package/dist/{wt-player-_mTlxsCu.js → wt-player-Bbirdlj9.js} +1 -1
  23. package/dist/{wt-search-bar-CUxiGcoz.js → wt-search-bar-D50lqCd8.js} +1 -1
  24. package/dist/{wt-send-message-popup-CCSOL-wH.js → wt-send-message-popup-8TZWTO40.js} +2 -2
  25. package/dist/{wt-table-DS_2J5zF.js → wt-table-C39WpJH8.js} +1 -1
  26. package/dist/{wt-timepicker-Bxdc4s3_.js → wt-timepicker-CYNrvbWf.js} +1 -1
  27. package/dist/{wt-tree-table-2K7cdct7.js → wt-tree-table-umRsVKWt.js} +1 -1
  28. package/dist/{wt-type-extension-value-input-Bl8jpyTn.js → wt-type-extension-value-input-D1wNUHkh.js} +2 -2
  29. package/dist/{wt-vidstack-player-BaH2oaMr.js → wt-vidstack-player-Z3cdtFBu.js} +10 -10
  30. package/package.json +3 -2
  31. package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +18 -4
  32. package/src/api/types/ApiModule.d.ts +28 -9
  33. package/src/components/_internals/composables/useGalleriaFullscreen/useGalleriaFullscreen.ts +25 -9
  34. package/src/components/_internals/composables/useSelect/useSelect.ts +3 -5
  35. package/src/components/_internals/composables/useSelect/useSelectCustomValues.ts +0 -3
  36. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +7 -2
  37. package/src/components/_internals/composables/useWtTable/useWtTable.ts +1 -1
  38. package/src/components/wt-badge-new/types/WtBadge.d.ts +12 -0
  39. package/src/components/wt-badge-new/wt-badge.vue +2 -12
  40. package/src/components/wt-button/wt-button.vue +2 -1
  41. package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
  42. package/src/components/wt-popup/wt-popup.vue +3 -1
  43. package/src/components/wt-slider/wt-slider.vue +1 -1
  44. package/src/components/wt-table/types/WtTable.d.ts +5 -1
  45. package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/time-group.vue +0 -2
  46. package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/playback-controls-panel.vue +0 -1
  47. package/src/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue +1 -2
  48. package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +1 -9
  49. package/src/composables/index.d.ts +9 -0
  50. package/src/composables/index.ts +1 -0
  51. package/src/composables/useEventBus/useEventBus.d.ts +11 -0
  52. package/src/composables/useEventBus/useEventBus.ts +16 -0
  53. package/src/enums/BroadcastChannelName/BroadcastChannelName.d.ts +4 -0
  54. package/src/enums/BroadcastChannelName/UserSettingsBroadcastMessage.d.ts +12 -0
  55. package/src/enums/ButtonColor/ButtonColor.d.ts +11 -0
  56. package/src/enums/ButtonVariant/ButtonVariant.d.ts +6 -0
  57. package/src/enums/ChipColor/ChipColor.d.ts +11 -0
  58. package/src/enums/ComponentSize/ComponentSize.d.ts +17 -0
  59. package/src/enums/ConnectionQualityLevel/ConnectionQualityLevel.enum.d.ts +6 -0
  60. package/src/enums/CrudAction/CrudAction.d.ts +7 -0
  61. package/src/enums/DefaultWorkspaceTabSettings/DefaultWorkspaceTabSettings.d.ts +9 -0
  62. package/src/enums/EmptyCause/EmptyCause.d.ts +6 -0
  63. package/src/enums/FormatDateMode/FormatDateMode.d.ts +8 -0
  64. package/src/enums/IconColor/IconColor.d.ts +17 -0
  65. package/src/enums/LoginOptions/LoginOptions.d.ts +6 -0
  66. package/src/enums/MessageColor/MessageColor.d.ts +9 -0
  67. package/src/enums/MessageVariant/MessageVariant.d.ts +6 -0
  68. package/src/enums/MimeTypes/MimeTypes.enum.d.ts +17 -0
  69. package/src/enums/ProcessingTableColumnType/ProcessingTableColumnType.d.ts +8 -0
  70. package/src/enums/QueueType/QueueType.enum.d.ts +28 -0
  71. package/src/enums/RelativeDatetimeValue/RelativeDatetimeValue.d.ts +7 -0
  72. package/src/enums/RingtoneType/RingtoneType.d.ts +6 -0
  73. package/src/enums/SingleSignOnProvider/SingleSignOnProvider.d.ts +7 -0
  74. package/src/enums/SingleSignOnProviderIconMappings/SingleSignOnProviderIconMappings.d.ts +3 -0
  75. package/src/enums/WebitelApplications/AdminSections.d.ts +46 -0
  76. package/src/enums/WebitelApplications/AuditorSections.d.ts +4 -0
  77. package/src/enums/WebitelApplications/CrmSections.d.ts +16 -0
  78. package/src/enums/WebitelApplications/SupervisorSections.d.ts +6 -0
  79. package/src/enums/WebitelApplications/WfmSections.d.ts +6 -0
  80. package/src/enums/WebitelApplications/WtApplication.d.ts +12 -0
  81. package/src/enums/WtObject/WtObject.d.ts +63 -0
  82. package/src/enums/WtTypeExtensionFieldKind/WtTypeExtensionFieldKind.d.ts +13 -0
  83. package/src/enums/index.d.ts +38 -0
  84. package/src/install.ts +2 -1
  85. package/src/locale/en/en.js +1 -0
  86. package/src/locale/es/es.js +1 -0
  87. package/src/locale/kz/kz.js +1 -0
  88. package/src/locale/pl/pl.js +1 -0
  89. package/src/locale/ro/ro.js +1 -0
  90. package/src/locale/ru/ru.js +1 -0
  91. package/src/locale/uk/uk.js +1 -0
  92. package/src/locale/uz/uz.js +1 -0
  93. package/src/locale/vi/vi.js +1 -0
  94. package/src/mixins/validationMixin/regle/useRegleValidation.ts +4 -4
  95. package/src/mixins/validationMixin/useValidation.ts +8 -3
  96. package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +63 -40
  97. package/src/modules/CSVExport/composables/useCSVExport.ts +1 -1
  98. package/src/modules/CallSession/modules/ScreenSharing/screen-sharing.vue +1 -2
  99. package/src/modules/CallSession/modules/VideoCall/composables/useDocumentPiP/domTraversal.ts +2 -2
  100. package/src/modules/CallSession/modules/VideoCall/video-call.vue +1 -1
  101. package/src/modules/CallSession/types/index.ts +3 -3
  102. package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +1 -1
  103. package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +1 -1
  104. package/src/modules/UserNotifications/maps/userNotificationConfigsMap.ts +10 -7
  105. package/src/modules/UserNotifications/stores/userNotificationsStore.ts +1 -0
  106. package/src/modules/UserNotifications/types/UserNotifications.ts +2 -1
  107. package/src/modules/Userinfo/constants/UserSettingsConstants.d.ts +1 -0
  108. package/src/scripts/__tests__/isEmpty.spec.js +1 -1
  109. package/src/scripts/downloadFile/types/downloadFile.types.ts +7 -1
  110. package/src/scripts/index.js +1 -1
  111. package/src/scripts/{isEmpty.js → isEmpty.ts} +10 -1
  112. package/src/scripts/normalizeDatetime.ts +4 -2
  113. package/src/utils/displayText.d.ts +2 -0
  114. package/src/utils/formatDate.d.ts +4 -0
  115. package/src/utils/index.d.ts +2 -0
  116. package/src/validations/config/errors/customZodErrorsHandler.ts +8 -4
  117. package/types/api/defaults/getDefaultInstance/getDefaultInstance.d.ts +1 -1
  118. package/types/components/_internals/composables/useSelect/useSelect.d.ts +2 -2
  119. package/types/components/_internals/composables/useSelect/useSelectCustomValues.d.ts +1 -4
  120. package/types/components/_internals/composables/useWtTable/useWtTable.d.ts +1 -0
  121. package/types/components/on-demand/wt-call-media-action/wt-call-media-action.vue.d.ts +2 -2
  122. package/types/components/on-demand/wt-selection-popup/wt-selection-popup.vue.d.ts +4 -4
  123. package/types/components/wt-action-bar/WtActionBarActionsOrder.d.ts +2 -2
  124. package/types/components/wt-action-bar/wt-action-bar.vue.d.ts +17 -17
  125. package/types/components/wt-badge-new/wt-badge.vue.d.ts +3 -2
  126. package/types/components/wt-button/wt-button.vue.d.ts +2 -1
  127. package/types/components/wt-inline-add-panel/wt-inline-add-panel.vue.d.ts +3 -3
  128. package/types/components/wt-popup/wt-popup.vue.d.ts +2 -0
  129. package/types/components/wt-search-bar/wt-search-bar.vue.d.ts +2 -2
  130. package/types/components/wt-status-select/wt-status-select.vue.d.ts +2 -2
  131. package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +1 -1
  132. package/types/composables/index.d.ts +1 -0
  133. package/types/composables/useEventBus/useEventBus.d.ts +11 -0
  134. package/types/locale/en/en.d.ts +1 -0
  135. package/types/locale/es/es.d.ts +1 -0
  136. package/types/locale/i18n.d.ts +9 -0
  137. package/types/locale/index.d.ts +9 -0
  138. package/types/locale/kz/kz.d.ts +1 -0
  139. package/types/locale/pl/pl.d.ts +1 -0
  140. package/types/locale/ro/ro.d.ts +1 -0
  141. package/types/locale/ru/ru.d.ts +1 -0
  142. package/types/locale/uk/uk.d.ts +1 -0
  143. package/types/locale/uz/uz.d.ts +1 -0
  144. package/types/locale/vi/vi.d.ts +1 -0
  145. package/types/mixins/validationMixin/regle/useRegleValidation.d.ts +2 -2
  146. package/types/mixins/validationMixin/useValidation.d.ts +9 -4
  147. package/types/mixins/validationMixin/validationMixin.d.ts +1 -1
  148. package/types/mixins/validationMixin/vuelidate/useVuelidateValidation.d.ts +14 -9
  149. package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +4 -1
  150. package/types/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue.d.ts +2 -2
  151. package/types/modules/CallSession/types/index.d.ts +3 -3
  152. package/types/modules/TableComponentModule/composables/useTableEmpty.d.ts +1 -1
  153. package/types/modules/UploadCsvPopup/composable/useUploadCsv.d.ts +1 -1
  154. package/types/modules/UploadCsvPopup/scripts/parseCSV.d.ts +1 -1
  155. package/types/modules/UserNotifications/maps/userNotificationConfigsMap.d.ts +2 -2
  156. package/types/modules/UserNotifications/types/UserNotifications.d.ts +2 -1
  157. package/types/scripts/caseConverters.d.ts +1 -1
  158. package/types/scripts/downloadFile/types/downloadFile.types.d.ts +6 -1
  159. package/types/scripts/index.d.ts +1 -1
  160. package/types/scripts/isEmpty.d.ts +2 -1
  161. package/types/scripts/normalizeDatetime.d.ts +1 -1
  162. package/types/validations/config/errors/customZodErrorsHandler.d.ts +1 -1
  163. package/dist/useValidation-BedhHNX5.js +0 -37
  164. package/dist/vidstack-video-iy3-Vo1A.js +0 -2
  165. package/types/install.d.ts +0 -15
@@ -207,6 +207,7 @@ export default deepmerge(
207
207
  draftPlaceholder: 'Write a message...',
208
208
  },
209
209
  queue: {
210
+ progressiveCount: 'Progressive call count',
210
211
  queue: 'Queue | Queues',
211
212
  queueType: 'Queue type | Queue types',
212
213
  type: {
@@ -199,6 +199,7 @@ export default {
199
199
  draftPlaceholder: 'Escribe un mensaje...',
200
200
  },
201
201
  queue: {
202
+ progressiveCount: 'Contador de llamadas progresivas',
202
203
  queue: 'Cola | Colas',
203
204
  queueType: 'Tipo de cola | Tipos de colas',
204
205
  type: {
@@ -204,6 +204,7 @@ export default {
204
204
  draftPlaceholder: 'Хабарлама жазыңыз...',
205
205
  },
206
206
  queue: {
207
+ progressiveCount: 'Прогрессивті қоңырау саны',
207
208
  queue: 'Кезек | Кезектер',
208
209
  queueType: 'Кезек түрі | Кезек түрлері',
209
210
  type: {
@@ -204,6 +204,7 @@ export default {
204
204
  draftPlaceholder: 'Napisz wiadomość...',
205
205
  },
206
206
  queue: {
207
+ progressiveCount: 'Liczba rozmów progresywnych',
207
208
  queue: 'Kolejka | Kolejki',
208
209
  queueType: 'Typ kolejki | Typy kolejek',
209
210
  type: {
@@ -204,6 +204,7 @@ export default {
204
204
  draftPlaceholder: 'Scrie un mesaj...',
205
205
  },
206
206
  queue: {
207
+ progressiveCount: 'Număr apeluri progresive',
207
208
  queue: 'Coadă | Cozi',
208
209
  queueType: 'Tip de coadă | Tipuri de cozi',
209
210
  type: {
@@ -200,6 +200,7 @@ export default {
200
200
  draftPlaceholder: 'Напишите сообщение...',
201
201
  },
202
202
  queue: {
203
+ progressiveCount: 'Количество одновременных звонков',
203
204
  queue: 'Очередь | Очереди',
204
205
  queueType: 'Тип очереди | Типы очередей',
205
206
  type: {
@@ -199,6 +199,7 @@ export default {
199
199
  draftPlaceholder: 'Напишіть повідомлення...',
200
200
  },
201
201
  queue: {
202
+ progressiveCount: 'Кількість одночасних дзвінків',
202
203
  queue: 'Черга | Черги',
203
204
  queueType: 'Тип черги | Типи черг',
204
205
  type: {
@@ -204,6 +204,7 @@ export default {
204
204
  draftPlaceholder: 'Xabar yozing...',
205
205
  },
206
206
  queue: {
207
+ progressiveCount: 'Progressiv qo‘ng‘iroqlar soni',
207
208
  queue: 'Navbat | Navbatlar',
208
209
  queueType: 'Navbat turi | Navbat turlari',
209
210
  type: {
@@ -204,6 +204,7 @@ export default {
204
204
  draftPlaceholder: 'Viết tin nhắn...',
205
205
  },
206
206
  queue: {
207
+ progressiveCount: 'Số cuộc gọi tiến trình',
207
208
  queue: 'Hàng chờ | Hàng chờ',
208
209
  queueType: 'Loại hàng đợi | Các loại hàng đợi',
209
210
  type: {
@@ -2,23 +2,23 @@ import type { RegleFieldStatus } from '@regle/core';
2
2
  import { type ComputedRef, computed, type Ref } from 'vue';
3
3
 
4
4
  export type UseFieldValidationParams = {
5
- field: Ref<RegleFieldStatus<string>>;
5
+ field?: Ref<RegleFieldStatus<string>>;
6
6
  };
7
7
 
8
8
  export type UseFieldValidationReturn = {
9
9
  invalid: ComputedRef<boolean | null>; // null if is not validated
10
- validationText?: ComputedRef<string>;
10
+ validationText?: ComputedRef<string | undefined>;
11
11
  };
12
12
 
13
13
  export const useFieldValidation = ({
14
14
  field: fieldRef,
15
15
  }: UseFieldValidationParams): UseFieldValidationReturn => {
16
16
  const invalid = computed(() => {
17
- return fieldRef.value.$error;
17
+ return fieldRef?.value.$error ?? null;
18
18
  });
19
19
 
20
20
  const validationText = computed(() => {
21
- return fieldRef.value?.$errors?.at(0);
21
+ return fieldRef?.value?.$errors?.at(0);
22
22
  });
23
23
 
24
24
  return {
@@ -10,15 +10,20 @@ import {
10
10
  useFieldValidation as useVuelidateValidation,
11
11
  } from './vuelidate/useVuelidateValidation';
12
12
 
13
- type CompatVuelidateParams = {
14
- v: UseVuelidateFieldValidationParams['field'];
13
+ type UseValidationParams = {
14
+ /** vuelidate field validation (compat) */
15
+ v?: UseVuelidateFieldValidationParams['field'];
16
+ /** vuelidate custom validations (compat) */
17
+ customValidators?: UseVuelidateFieldValidationParams['customValidators'];
18
+ /** regle field validation */
19
+ regleValidation?: UseRegleFieldValidationParams['field'];
15
20
  };
16
21
 
17
22
  export const useValidation = ({
18
23
  v: vuelidateValidation,
19
24
  customValidators: inputCustomValidators, // vuelidate custom validations, compat
20
25
  regleValidation,
21
- }: UseRegleFieldValidationParams | CompatVuelidateParams) => {
26
+ }: UseValidationParams) => {
22
27
  const {
23
28
  isValidation: isVuelidateValidation,
24
29
  invalid: vuelidateInvalid,
@@ -1,10 +1,22 @@
1
1
  import type { Validation } from '@vuelidate/core';
2
- import { computed, isReactive, type Ref } from 'vue';
2
+ import {
3
+ type ComputedRef,
4
+ computed,
5
+ isReactive,
6
+ isRef,
7
+ type Ref,
8
+ unref,
9
+ } from 'vue';
3
10
  import { useI18n } from 'vue-i18n';
4
11
 
12
+ type CompatCustomValidator = {
13
+ name: string;
14
+ text: string;
15
+ };
16
+
5
17
  export type UseFieldValidationParams = {
6
- field: Ref<Validation>;
7
- customValidators?: Array<object>;
18
+ field?: Ref<Validation>;
19
+ customValidators?: CompatCustomValidator[];
8
20
  };
9
21
 
10
22
  export const useFieldValidation = ({
@@ -14,11 +26,15 @@ export const useFieldValidation = ({
14
26
  const { t } = useI18n();
15
27
 
16
28
  // support vue options api, where v is a reactive, not ref
17
- let v = inputV;
18
- let customValidators = inputCustomValidators;
29
+ let v: Ref<Validation> | ComputedRef<Validation | undefined> | undefined =
30
+ inputV;
31
+ let customValidators:
32
+ | CompatCustomValidator[]
33
+ | ComputedRef<CompatCustomValidator[] | undefined>
34
+ | undefined = inputCustomValidators;
19
35
 
20
- if (isReactive(v)) {
21
- v = computed(() => inputV);
36
+ if (isReactive(inputV)) {
37
+ v = computed(() => unref(inputV));
22
38
  customValidators = computed(() => inputCustomValidators);
23
39
  }
24
40
  // end
@@ -26,66 +42,73 @@ export const useFieldValidation = ({
26
42
  const isValidation = computed(
27
43
  () => !!v && !!v.value && !!Object.keys(v.value).length,
28
44
  );
29
- const invalid = computed(() => isValidation.value && v.value.$error);
45
+ const invalid = computed(() => isValidation.value && v?.value?.$error);
30
46
 
31
47
  const validationText = computed(() => {
32
48
  let validationText = '';
33
- if (isValidation.value && invalid.value) {
34
- if (v.value.required?.$invalid) validationText = t('validation.required');
35
- else if (v.value.numeric?.$invalid)
49
+ const validation = v?.value;
50
+ if (validation && isValidation.value && invalid.value) {
51
+ if (validation.required?.$invalid)
52
+ validationText = t('validation.required');
53
+ else if (validation.numeric?.$invalid)
36
54
  validationText = t('validation.numeric');
37
- else if (v.value.email?.$invalid) validationText = t('validation.email');
38
- else if (v.value.gatewayHostValidator?.$invalid)
55
+ else if (validation.email?.$invalid)
56
+ validationText = t('validation.email');
57
+ else if (validation.gatewayHostValidator?.$invalid)
39
58
  validationText = t('validation.gatewayHostValidator');
40
- else if (v.value.ipValidator?.$invalid)
59
+ else if (validation.ipValidator?.$invalid)
41
60
  validationText = t('validation.ipValidator');
42
- else if (v.value.macValidator?.$invalid)
61
+ else if (validation.macValidator?.$invalid)
43
62
  validationText = t('validation.macValidator');
44
- else if (v.value.minValue?.$invalid)
63
+ else if (validation.minValue?.$invalid)
45
64
  validationText = t('validation.minValue', {
46
- min: v.value.minValue.$params.min,
65
+ min: validation.minValue.$params.min,
47
66
  });
48
- else if (v.value.maxValue?.$invalid)
67
+ else if (validation.maxValue?.$invalid)
49
68
  validationText = t('validation.maxValue', {
50
- max: v.value.maxValue.$params.max,
69
+ max: validation.maxValue.$params.max,
51
70
  });
52
- else if (v.value.maxLength?.$invalid)
71
+ else if (validation.maxLength?.$invalid)
53
72
  validationText = t('validation.maxLength', {
54
- max: v.value.maxLength.$params.max,
73
+ max: validation.maxLength.$params.max,
55
74
  });
56
- else if (v.value.sipAccountValidator?.$invalid)
75
+ else if (validation.sipAccountValidator?.$invalid)
57
76
  validationText = t('validation.sipAccountValidator');
58
- else if (v.value.minLength?.$invalid)
77
+ else if (validation.minLength?.$invalid)
59
78
  validationText = t('validation.minLength', {
60
- min: v.value.minLength.$params.min,
79
+ min: validation.minLength.$params.min,
61
80
  });
62
- else if (v.value.url?.$invalid) validationText = `${t('validation.url')}`;
63
- else if (v.value.regExpValidator?.$invalid)
81
+ else if (validation.url?.$invalid)
82
+ validationText = `${t('validation.url')}`;
83
+ else if (validation.regExpValidator?.$invalid)
64
84
  validationText = `${t('validation.regExpValidator')}`;
65
- else if (v.value.sameAs?.$invalid)
85
+ else if (validation.sameAs?.$invalid)
66
86
  validationText = `${t('validation.sameAs')}`;
67
- else if (v.value.domainValidator?.$invalid)
87
+ else if (validation.domainValidator?.$invalid)
68
88
  validationText = `${t('validation.domainValidator')}`;
69
- else if (v.value.decimalValidator?.$invalid)
70
- validationText = `${t('validation.decimalValidator')} ${v.value.decimalValidator.$params.count}`;
71
- else if (v.value.websocketValidator?.$invalid)
89
+ else if (validation.decimalValidator?.$invalid)
90
+ validationText = `${t('validation.decimalValidator')} ${validation.decimalValidator.$params.count}`;
91
+ else if (validation.websocketValidator?.$invalid)
72
92
  validationText = `${t('validation.websocketValidator')}`;
73
- else if (v.value.integer?.$invalid)
93
+ else if (validation.integer?.$invalid)
74
94
  validationText = `${t('validation.integer')}`;
75
- else if (v.value.regex?.$invalid)
95
+ else if (validation.regex?.$invalid)
76
96
  validationText =
77
- v.value.regex?.$message ||
78
- `${t('validation.isRegExpMatched')} ${v.value.regex?.$params?.regex}`;
79
- else if (v.value.nameAlreadyInUse?.$invalid) {
97
+ validation.regex?.$message ||
98
+ `${t('validation.isRegExpMatched')} ${validation.regex?.$params?.regex}`;
99
+ else if (validation.nameAlreadyInUse?.$invalid) {
80
100
  validationText = t('validation.nameAlreadyInUse');
81
- } else if (v.value.phoneNumberSymbolsValidator?.$invalid) {
101
+ } else if (validation.phoneNumberSymbolsValidator?.$invalid) {
82
102
  validationText = t('validation.phoneNumberSymbolsValidator');
83
103
  }
84
104
  }
85
105
 
86
- if (customValidators?.value) {
87
- for (const { name, text } of customValidators.value) {
88
- if (v.value[name]?.$invalid) validationText = text;
106
+ const resolvedCustomValidators = isRef(customValidators)
107
+ ? customValidators.value
108
+ : undefined;
109
+ if (resolvedCustomValidators) {
110
+ for (const { name, text } of resolvedCustomValidators) {
111
+ if (validation?.[name]?.$invalid) validationText = text;
89
112
  }
90
113
  return validationText;
91
114
  }
@@ -41,7 +41,7 @@ export function useCSVExport({ selected }: { selected: Ref<number[]> }) {
41
41
 
42
42
  async function exportCSV(exportParams?: Record<string, unknown>) {
43
43
  const routeQuery = route.query;
44
- const params = {
44
+ const params: Record<string, unknown> = {
45
45
  ...(exportParams || routeQuery),
46
46
  size: CSV_EXPORT_BATCH_SIZE,
47
47
  };
@@ -34,8 +34,7 @@
34
34
 
35
35
  <script setup lang="ts">
36
36
  import { WtVidstackPlayer } from '@webitel/ui-sdk/components';
37
- import { defineEmits, useAttrs } from 'vue';
38
-
37
+ import { useAttrs } from 'vue';
39
38
  import {
40
39
  RecordingIndicator,
41
40
  ScreenSharingControlsPanel,
@@ -5,12 +5,12 @@ export const domTraversal = (
5
5
  if (root instanceof Element) {
6
6
  visit(root);
7
7
  if (root.shadowRoot) {
8
- for (const child of root.shadowRoot.children) {
8
+ for (const child of Array.from(root.shadowRoot.children)) {
9
9
  domTraversal(child, visit);
10
10
  }
11
11
  }
12
12
  }
13
- for (const child of root.children) {
13
+ for (const child of Array.from(root.children)) {
14
14
  domTraversal(child, visit);
15
15
  }
16
16
  };
@@ -274,7 +274,7 @@ const emitKeys = {
274
274
  [VideoCallAction.Settings]: `action:${VideoCallAction.Settings}`,
275
275
  [VideoCallAction.Chat]: `action:${VideoCallAction.Chat}`,
276
276
  [VideoCallAction.Hangup]: `action:${VideoCallAction.Hangup}`,
277
- };
277
+ } as const;
278
278
 
279
279
  const { t } = useI18n();
280
280
 
@@ -1,4 +1,4 @@
1
- import { ScreenSharingSession } from './ScreenSharingSession';
2
- import { ScreenshotStatus } from './ScreenshotStatus';
1
+ import type { ScreenSharingSession } from './ScreenSharingSession';
2
+ import type { ScreenshotStatus } from './ScreenshotStatus';
3
3
 
4
- export { ScreenSharingSession, ScreenshotStatus };
4
+ export type { ScreenSharingSession, ScreenshotStatus };
@@ -20,7 +20,7 @@ const useUploadCsv = ({ props, emit, skipHeaders, separator }) => {
20
20
  const parsedFile = ref(null);
21
21
  const isParsingPreview = ref(false);
22
22
  const parseErrorStackTrace = ref('');
23
- const csvPreview = ref([
23
+ const csvPreview = ref<unknown[]>([
24
24
  [],
25
25
  ]);
26
26
 
@@ -1,6 +1,6 @@
1
1
  import { parse } from 'csv-parse/browser/esm';
2
2
 
3
- const parseCSV = (csvStr, options = {}) =>
3
+ const parseCSV = (csvStr, options = {}): Promise<unknown[]> =>
4
4
  new Promise((resolve, reject) => {
5
5
  parse(
6
6
  csvStr,
@@ -1,21 +1,24 @@
1
- import { ApiUserWarningId } from '@webitel/api-services/gen/models';
1
+ import {
2
+ type ApiUserWarning,
3
+ ApiUserWarningId,
4
+ } from '@webitel/api-services/gen/models';
2
5
  import type { NotificationsType } from '../types/UserNotifications';
3
6
 
4
7
  const HOURS_IN_DAY = 24;
5
8
 
6
9
  export const USER_NOTIFICATION_CONFIGS_MAP = new Map<
7
10
  ApiUserWarningId,
8
- (warningId: ApiUserWarningId) => NotificationsType
11
+ (warning: ApiUserWarning) => NotificationsType
9
12
  >([
10
13
  [
11
14
  ApiUserWarningId.PasswordExpiresSoon,
12
15
  ({ warningData: data }) => ({
13
16
  type: 'info',
14
- localeKey: data.passwordExpiry.daysRemaining
17
+ localeKey: data?.passwordExpiry?.daysRemaining
15
18
  ? 'passwordExpirationMessageDays'
16
19
  : 'passwordExpirationMessageHours',
17
20
  params: {
18
- amount: data.passwordExpiry.daysRemaining || HOURS_IN_DAY,
21
+ amount: data?.passwordExpiry?.daysRemaining || HOURS_IN_DAY,
19
22
  },
20
23
  }),
21
24
  ],
@@ -25,8 +28,8 @@ export const USER_NOTIFICATION_CONFIGS_MAP = new Map<
25
28
  type: 'info',
26
29
  localeKey: 'licenseExpirationSoonMessage',
27
30
  params: {
28
- amount: data.licenseExpiry.daysRemaining,
29
- name: data.licenseExpiry.licenseName,
31
+ amount: data?.licenseExpiry?.daysRemaining,
32
+ name: data?.licenseExpiry?.licenseName,
30
33
  },
31
34
  }),
32
35
  ],
@@ -36,7 +39,7 @@ export const USER_NOTIFICATION_CONFIGS_MAP = new Map<
36
39
  type: 'info',
37
40
  localeKey: 'licenseExpirationMessage',
38
41
  params: {
39
- name: data.licenseExpiry.licenseName,
42
+ name: data?.licenseExpiry?.licenseName,
40
43
  },
41
44
  }),
42
45
  ],
@@ -59,6 +59,7 @@ export const createUserNotificationsStore = () => {
59
59
  const mapNotifications = (array: ApiUserWarning[]) => {
60
60
  return array
61
61
  .map((warning) => {
62
+ if (!warning.id) return null;
62
63
  const map = USER_NOTIFICATION_CONFIGS_MAP.get(warning.id);
63
64
  if (!map) return null;
64
65
  return map(warning);
@@ -1,5 +1,6 @@
1
1
  interface UserNotificationsConfigsParams {
2
- amount?: number;
2
+ /** generated API types serialize int64 counters as strings */
3
+ amount?: number | string;
3
4
  name?: string;
4
5
  }
5
6
 
@@ -0,0 +1 @@
1
+ export declare const TIMEZONE_STORAGE_KEY = "user-timezone-setting";
@@ -1,4 +1,4 @@
1
- import isEmpty from '../isEmpty.js';
1
+ import isEmpty from '../isEmpty';
2
2
 
3
3
  describe('isEmpty', () => {
4
4
  it('falsy cases (not empty)', () => {
@@ -1,7 +1,13 @@
1
1
  import type { FileFormat } from './fileFormat.types';
2
2
 
3
+ /** Minimal shape of the (axios-style) HTTP response consumed by `downloadFile`. */
4
+ export interface DownloadFileResponse {
5
+ data: BlobPart;
6
+ headers?: Record<string, string | undefined>;
7
+ }
8
+
3
9
  export interface DownloadFileOptions {
4
- response: never;
10
+ response: DownloadFileResponse;
5
11
  fileFormat: FileFormat;
6
12
  filename?: string;
7
13
  mimetype?: string;
@@ -22,7 +22,7 @@ import downloadFile from './downloadFile/downloadFile';
22
22
  import eventBus from './eventBus.js';
23
23
  import { getConnectionQuality } from './getConnectionQuality.ts';
24
24
  import { getEndOfDay, getStartOfDay } from './getDefaultFilterDate.js';
25
- import isEmpty from './isEmpty.js';
25
+ import isEmpty from './isEmpty';
26
26
  import { wtlog } from './logger.js';
27
27
  import {
28
28
  isRelativeDatetimeValue,
@@ -1,6 +1,15 @@
1
+ type EmptyValue =
2
+ | undefined
3
+ | null
4
+ | ''
5
+ | 0
6
+ | false
7
+ | never[]
8
+ | Record<PropertyKey, never>;
9
+
1
10
  // checks if value is Falsy,
2
11
  // including empty arrays or objects
3
- const isEmpty = (value) => {
12
+ const isEmpty = <T>(value: T): value is Extract<T, EmptyValue> => {
4
13
  if (Array.isArray(value)) return !value.length;
5
14
  if (typeof value === 'object') return !value || !Object.keys(value).length;
6
15
  return !value;
@@ -24,8 +24,10 @@ export type NormalizeDatetimeOptions = {
24
24
  round?: RelativeDatetimeRoundOption;
25
25
  };
26
26
 
27
- export const isRelativeDatetimeValue = (value: string): boolean => {
28
- return Object.values(RelativeDatetimeValue).includes(value);
27
+ export const isRelativeDatetimeValue = (
28
+ value: string,
29
+ ): value is RelativeDatetimeValue => {
30
+ return (Object.values(RelativeDatetimeValue) as string[]).includes(value);
29
31
  };
30
32
 
31
33
  const convertRelativeDatetimeToTimestamp = (
@@ -0,0 +1,2 @@
1
+ export declare const EMPTY_SYMBOL = "-";
2
+ export declare const displayText: (text: string) => string;
@@ -0,0 +1,4 @@
1
+ import type { FormatDateMode } from '../enums';
2
+ export declare function formatDate(date: string | number | Date, to: (typeof FormatDateMode)[keyof typeof FormatDateMode], { timezone, }?: {
3
+ timezone?: string;
4
+ }): string;
@@ -0,0 +1,2 @@
1
+ export * from './displayText';
2
+ export * from './formatDate';
@@ -4,7 +4,7 @@ import type { z } from 'zod/v4';
4
4
  import { isEmpty } from '../../../scripts';
5
5
 
6
6
  export const customZodErrorsHandler =
7
- (t: I18nComposerTranslation) => (issue: z.core.$ZodIssue) => {
7
+ (t: I18nComposerTranslation) => (issue: z.core.$ZodRawIssue) => {
8
8
  switch (issue.code) {
9
9
  case 'too_small':
10
10
  return handleTooSmall(issue);
@@ -17,7 +17,9 @@ export const customZodErrorsHandler =
17
17
  return issue.code;
18
18
  }
19
19
 
20
- function handleTooSmall(issue: z.core.$ZodIssueTooSmall) {
20
+ function handleTooSmall(
21
+ issue: z.core.$ZodRawIssue<z.core.$ZodIssueTooSmall>,
22
+ ) {
21
23
  const showRequiredMsg = () => {
22
24
  return t('validation.required');
23
25
  };
@@ -40,7 +42,7 @@ export const customZodErrorsHandler =
40
42
  });
41
43
  }
42
44
 
43
- function handleTooBig(issue: z.core.$ZodIssueTooBig) {
45
+ function handleTooBig(issue: z.core.$ZodRawIssue<z.core.$ZodIssueTooBig>) {
44
46
  // if string, show "length" error
45
47
  if (issue.origin === 'string') {
46
48
  return t('validation.maxLength', {
@@ -55,7 +57,9 @@ export const customZodErrorsHandler =
55
57
  }
56
58
 
57
59
  function handleInvalid(
58
- issue: z.core.$ZodIssueInvalidType | z.core.$ZodIssueInvalidValue,
60
+ issue:
61
+ | z.core.$ZodRawIssue<z.core.$ZodIssueInvalidType>
62
+ | z.core.$ZodRawIssue<z.core.$ZodIssueInvalidValue>,
59
63
  ) {
60
64
  if (isEmpty(issue.input)) {
61
65
  return t('validation.required');
@@ -1,2 +1,2 @@
1
1
  export default getDefaultInstance;
2
- export function getDefaultInstance(): import("axios").AxiosInstance;
2
+ export function getDefaultInstance(): import("@aliasedDeps/api-services/axios").AxiosInstance;
@@ -1,4 +1,4 @@
1
- export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, strictApiOptions, emit, }: {
1
+ export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues: _manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, strictApiOptions, emit, }: {
2
2
  selected: any;
3
3
  options: any;
4
4
  optionLabel: any;
@@ -12,7 +12,7 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
12
12
  selectId: any;
13
13
  isSingle: any;
14
14
  strictApiOptions?: any;
15
- emit?: () => void;
15
+ emit?: (_event: string, ..._args: unknown[]) => void;
16
16
  }) => {
17
17
  isLoading: import("vue").Ref<boolean, boolean>;
18
18
  showFooterLoader: import("vue").Ref<boolean, boolean>;
@@ -1,17 +1,14 @@
1
- export declare const useSelectCustomValues: ({ selected, filteredOptions, options, optionValue, dataKey, filterText, filterOptions, updateSelectedOptionsCache, selectRef, allowCustomValues, manualCustomValues, isSingle, emit, }: {
1
+ export declare const useSelectCustomValues: ({ selected, filteredOptions, options, dataKey, filterText, filterOptions, updateSelectedOptionsCache, selectRef, allowCustomValues, isSingle, }: {
2
2
  selected: any;
3
3
  filteredOptions: any;
4
4
  options: any;
5
- optionValue: any;
6
5
  dataKey: any;
7
6
  filterText: any;
8
7
  filterOptions: any;
9
8
  updateSelectedOptionsCache: any;
10
9
  selectRef: any;
11
10
  allowCustomValues: any;
12
- manualCustomValues: any;
13
11
  isSingle: any;
14
- emit: any;
15
12
  }) => {
16
13
  onInputKeydown: () => void;
17
14
  };
@@ -1,3 +1,4 @@
1
+ import type { WtTableHeader } from '../../../wt-table/types/WtTable';
1
2
  export declare const useWtTable: ({ headers }: {
2
3
  headers: any;
3
4
  }) => {
@@ -4,11 +4,11 @@ interface Props {
4
4
  playingFileId?: string;
5
5
  }
6
6
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- stop: () => any;
8
7
  play: (file: EngineCallFile) => any;
8
+ stop: () => any;
9
9
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
10
- onStop?: () => any;
11
10
  onPlay?: (file: EngineCallFile) => any;
11
+ onStop?: () => any;
12
12
  }>, {
13
13
  playingFileId: string;
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -25,9 +25,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
25
25
  default: () => any[];
26
26
  };
27
27
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
- add: (...args: any[]) => void;
29
- close: (...args: any[]) => void;
30
28
  change: (...args: any[]) => void;
29
+ close: (...args: any[]) => void;
30
+ add: (...args: any[]) => void;
31
31
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
32
  /**
33
33
  * Popup title
@@ -49,9 +49,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
49
49
  default: () => any[];
50
50
  };
51
51
  }>> & Readonly<{
52
- onAdd?: (...args: any[]) => any;
53
- onClose?: (...args: any[]) => any;
54
52
  onChange?: (...args: any[]) => any;
53
+ onClose?: (...args: any[]) => any;
54
+ onAdd?: (...args: any[]) => any;
55
55
  }>, {
56
56
  options: unknown[];
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;