@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.
- package/dist/{clients-Bj07uFky.js → clients-Ban2DI-G.js} +8 -7
- package/dist/{components-l3RJbNmv.js → components-Bim818Xf.js} +13 -8
- package/dist/{composables-vmCh4eqT.js → composables-CeAM_2lo.js} +12 -14
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +605 -605
- package/dist/ui-sdk.umd.cjs +38 -38
- package/dist/useValidation-lRiKF7xV.js +39 -0
- package/dist/{useVidstackSrc-epUQZhkL.js → useVidstackSrc-B4mUti_c.js} +1 -1
- package/dist/{vidstack-C6nBVWwn-BlZqtkYB.js → vidstack-C6nBVWwn-cKiWT0KJ.js} +2 -2
- package/dist/{vidstack-CI5oafcm-DAV7Lilr.js → vidstack-CI5oafcm-DfWpvayJ.js} +1 -1
- package/dist/{vidstack-DUnfBERX2-Cl6yTfB3.js → vidstack-DUnfBERX2-BJtKHFxc.js} +1 -1
- package/dist/{vidstack-audio-CH4wIf0F.js → vidstack-audio-BCPraiiR.js} +1 -1
- package/dist/{vidstack-dash-CmlmZIFT.js → vidstack-dash-MBx5aEEA.js} +2 -2
- package/dist/{vidstack-hls-D1sxUvBd.js → vidstack-hls-BbZsbfaO.js} +2 -2
- package/dist/vidstack-video-DwlbGwN7.js +2 -0
- package/dist/{wt-chat-emoji-CGf8vRlv.js → wt-chat-emoji-CX65m8Dd.js} +1 -1
- package/dist/{wt-datepicker-D2GjAUWU.js → wt-datepicker-BP9bBbGY.js} +1 -1
- package/dist/{wt-display-chip-items-C3TZt4Gn.js → wt-display-chip-items-tL17x2-U.js} +1 -1
- package/dist/{wt-expansion-card-DvLD-TP4.js → wt-expansion-card-DET-o0Jq.js} +1 -1
- package/dist/{wt-galleria-DT0SOjXk.js → wt-galleria-B6kMr_xS.js} +1 -1
- package/dist/{wt-icon-btn-BIU9YjS8.js → wt-icon-btn-DYjjSl-C.js} +5 -2
- package/dist/{wt-player-_mTlxsCu.js → wt-player-Bbirdlj9.js} +1 -1
- package/dist/{wt-search-bar-CUxiGcoz.js → wt-search-bar-D50lqCd8.js} +1 -1
- package/dist/{wt-send-message-popup-CCSOL-wH.js → wt-send-message-popup-8TZWTO40.js} +2 -2
- package/dist/{wt-table-DS_2J5zF.js → wt-table-C39WpJH8.js} +1 -1
- package/dist/{wt-timepicker-Bxdc4s3_.js → wt-timepicker-CYNrvbWf.js} +1 -1
- package/dist/{wt-tree-table-2K7cdct7.js → wt-tree-table-umRsVKWt.js} +1 -1
- package/dist/{wt-type-extension-value-input-Bl8jpyTn.js → wt-type-extension-value-input-D1wNUHkh.js} +2 -2
- package/dist/{wt-vidstack-player-BaH2oaMr.js → wt-vidstack-player-Z3cdtFBu.js} +10 -10
- package/package.json +3 -2
- package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +18 -4
- package/src/api/types/ApiModule.d.ts +28 -9
- package/src/components/_internals/composables/useGalleriaFullscreen/useGalleriaFullscreen.ts +25 -9
- package/src/components/_internals/composables/useSelect/useSelect.ts +3 -5
- package/src/components/_internals/composables/useSelect/useSelectCustomValues.ts +0 -3
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +7 -2
- package/src/components/_internals/composables/useWtTable/useWtTable.ts +1 -1
- package/src/components/wt-badge-new/types/WtBadge.d.ts +12 -0
- package/src/components/wt-badge-new/wt-badge.vue +2 -12
- package/src/components/wt-button/wt-button.vue +2 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
- package/src/components/wt-popup/wt-popup.vue +3 -1
- package/src/components/wt-slider/wt-slider.vue +1 -1
- package/src/components/wt-table/types/WtTable.d.ts +5 -1
- package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/components/time-group.vue +0 -2
- package/src/components/wt-vidstack-player/components/panels/playback-controls-panel/playback-controls-panel.vue +0 -1
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-controls-panel/screen-sharing-controls-panel.vue +1 -2
- package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +1 -9
- package/src/composables/index.d.ts +9 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useEventBus/useEventBus.d.ts +11 -0
- package/src/composables/useEventBus/useEventBus.ts +16 -0
- package/src/enums/BroadcastChannelName/BroadcastChannelName.d.ts +4 -0
- package/src/enums/BroadcastChannelName/UserSettingsBroadcastMessage.d.ts +12 -0
- package/src/enums/ButtonColor/ButtonColor.d.ts +11 -0
- package/src/enums/ButtonVariant/ButtonVariant.d.ts +6 -0
- package/src/enums/ChipColor/ChipColor.d.ts +11 -0
- package/src/enums/ComponentSize/ComponentSize.d.ts +17 -0
- package/src/enums/ConnectionQualityLevel/ConnectionQualityLevel.enum.d.ts +6 -0
- package/src/enums/CrudAction/CrudAction.d.ts +7 -0
- package/src/enums/DefaultWorkspaceTabSettings/DefaultWorkspaceTabSettings.d.ts +9 -0
- package/src/enums/EmptyCause/EmptyCause.d.ts +6 -0
- package/src/enums/FormatDateMode/FormatDateMode.d.ts +8 -0
- package/src/enums/IconColor/IconColor.d.ts +17 -0
- package/src/enums/LoginOptions/LoginOptions.d.ts +6 -0
- package/src/enums/MessageColor/MessageColor.d.ts +9 -0
- package/src/enums/MessageVariant/MessageVariant.d.ts +6 -0
- package/src/enums/MimeTypes/MimeTypes.enum.d.ts +17 -0
- package/src/enums/ProcessingTableColumnType/ProcessingTableColumnType.d.ts +8 -0
- package/src/enums/QueueType/QueueType.enum.d.ts +28 -0
- package/src/enums/RelativeDatetimeValue/RelativeDatetimeValue.d.ts +7 -0
- package/src/enums/RingtoneType/RingtoneType.d.ts +6 -0
- package/src/enums/SingleSignOnProvider/SingleSignOnProvider.d.ts +7 -0
- package/src/enums/SingleSignOnProviderIconMappings/SingleSignOnProviderIconMappings.d.ts +3 -0
- package/src/enums/WebitelApplications/AdminSections.d.ts +46 -0
- package/src/enums/WebitelApplications/AuditorSections.d.ts +4 -0
- package/src/enums/WebitelApplications/CrmSections.d.ts +16 -0
- package/src/enums/WebitelApplications/SupervisorSections.d.ts +6 -0
- package/src/enums/WebitelApplications/WfmSections.d.ts +6 -0
- package/src/enums/WebitelApplications/WtApplication.d.ts +12 -0
- package/src/enums/WtObject/WtObject.d.ts +63 -0
- package/src/enums/WtTypeExtensionFieldKind/WtTypeExtensionFieldKind.d.ts +13 -0
- package/src/enums/index.d.ts +38 -0
- package/src/install.ts +2 -1
- package/src/locale/en/en.js +1 -0
- package/src/locale/es/es.js +1 -0
- package/src/locale/kz/kz.js +1 -0
- package/src/locale/pl/pl.js +1 -0
- package/src/locale/ro/ro.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/uk/uk.js +1 -0
- package/src/locale/uz/uz.js +1 -0
- package/src/locale/vi/vi.js +1 -0
- package/src/mixins/validationMixin/regle/useRegleValidation.ts +4 -4
- package/src/mixins/validationMixin/useValidation.ts +8 -3
- package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +63 -40
- package/src/modules/CSVExport/composables/useCSVExport.ts +1 -1
- package/src/modules/CallSession/modules/ScreenSharing/screen-sharing.vue +1 -2
- package/src/modules/CallSession/modules/VideoCall/composables/useDocumentPiP/domTraversal.ts +2 -2
- package/src/modules/CallSession/modules/VideoCall/video-call.vue +1 -1
- package/src/modules/CallSession/types/index.ts +3 -3
- package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +1 -1
- package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +1 -1
- package/src/modules/UserNotifications/maps/userNotificationConfigsMap.ts +10 -7
- package/src/modules/UserNotifications/stores/userNotificationsStore.ts +1 -0
- package/src/modules/UserNotifications/types/UserNotifications.ts +2 -1
- package/src/modules/Userinfo/constants/UserSettingsConstants.d.ts +1 -0
- package/src/scripts/__tests__/isEmpty.spec.js +1 -1
- package/src/scripts/downloadFile/types/downloadFile.types.ts +7 -1
- package/src/scripts/index.js +1 -1
- package/src/scripts/{isEmpty.js → isEmpty.ts} +10 -1
- package/src/scripts/normalizeDatetime.ts +4 -2
- package/src/utils/displayText.d.ts +2 -0
- package/src/utils/formatDate.d.ts +4 -0
- package/src/utils/index.d.ts +2 -0
- package/src/validations/config/errors/customZodErrorsHandler.ts +8 -4
- package/types/api/defaults/getDefaultInstance/getDefaultInstance.d.ts +1 -1
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +2 -2
- package/types/components/_internals/composables/useSelect/useSelectCustomValues.d.ts +1 -4
- package/types/components/_internals/composables/useWtTable/useWtTable.d.ts +1 -0
- package/types/components/on-demand/wt-call-media-action/wt-call-media-action.vue.d.ts +2 -2
- package/types/components/on-demand/wt-selection-popup/wt-selection-popup.vue.d.ts +4 -4
- package/types/components/wt-action-bar/WtActionBarActionsOrder.d.ts +2 -2
- package/types/components/wt-action-bar/wt-action-bar.vue.d.ts +17 -17
- package/types/components/wt-badge-new/wt-badge.vue.d.ts +3 -2
- package/types/components/wt-button/wt-button.vue.d.ts +2 -1
- package/types/components/wt-inline-add-panel/wt-inline-add-panel.vue.d.ts +3 -3
- package/types/components/wt-popup/wt-popup.vue.d.ts +2 -0
- package/types/components/wt-search-bar/wt-search-bar.vue.d.ts +2 -2
- package/types/components/wt-status-select/wt-status-select.vue.d.ts +2 -2
- package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +1 -1
- package/types/composables/index.d.ts +1 -0
- package/types/composables/useEventBus/useEventBus.d.ts +11 -0
- package/types/locale/en/en.d.ts +1 -0
- package/types/locale/es/es.d.ts +1 -0
- package/types/locale/i18n.d.ts +9 -0
- package/types/locale/index.d.ts +9 -0
- package/types/locale/kz/kz.d.ts +1 -0
- package/types/locale/pl/pl.d.ts +1 -0
- package/types/locale/ro/ro.d.ts +1 -0
- package/types/locale/ru/ru.d.ts +1 -0
- package/types/locale/uk/uk.d.ts +1 -0
- package/types/locale/uz/uz.d.ts +1 -0
- package/types/locale/vi/vi.d.ts +1 -0
- package/types/mixins/validationMixin/regle/useRegleValidation.d.ts +2 -2
- package/types/mixins/validationMixin/useValidation.d.ts +9 -4
- package/types/mixins/validationMixin/validationMixin.d.ts +1 -1
- package/types/mixins/validationMixin/vuelidate/useVuelidateValidation.d.ts +14 -9
- package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +4 -1
- package/types/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue.d.ts +2 -2
- package/types/modules/CallSession/types/index.d.ts +3 -3
- package/types/modules/TableComponentModule/composables/useTableEmpty.d.ts +1 -1
- package/types/modules/UploadCsvPopup/composable/useUploadCsv.d.ts +1 -1
- package/types/modules/UploadCsvPopup/scripts/parseCSV.d.ts +1 -1
- package/types/modules/UserNotifications/maps/userNotificationConfigsMap.d.ts +2 -2
- package/types/modules/UserNotifications/types/UserNotifications.d.ts +2 -1
- package/types/scripts/caseConverters.d.ts +1 -1
- package/types/scripts/downloadFile/types/downloadFile.types.d.ts +6 -1
- package/types/scripts/index.d.ts +1 -1
- package/types/scripts/isEmpty.d.ts +2 -1
- package/types/scripts/normalizeDatetime.d.ts +1 -1
- package/types/validations/config/errors/customZodErrorsHandler.d.ts +1 -1
- package/dist/useValidation-BedhHNX5.js +0 -37
- package/dist/vidstack-video-iy3-Vo1A.js +0 -2
- package/types/install.d.ts +0 -15
package/src/locale/en/en.js
CHANGED
package/src/locale/es/es.js
CHANGED
package/src/locale/kz/kz.js
CHANGED
package/src/locale/pl/pl.js
CHANGED
package/src/locale/ro/ro.js
CHANGED
package/src/locale/ru/ru.js
CHANGED
package/src/locale/uk/uk.js
CHANGED
package/src/locale/uz/uz.js
CHANGED
package/src/locale/vi/vi.js
CHANGED
|
@@ -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
|
|
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
|
|
17
|
+
return fieldRef?.value.$error ?? null;
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const validationText = computed(() => {
|
|
21
|
-
return fieldRef
|
|
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
|
|
14
|
-
|
|
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
|
-
}:
|
|
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 {
|
|
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
|
|
7
|
-
customValidators?:
|
|
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 =
|
|
18
|
-
|
|
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(
|
|
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
|
|
45
|
+
const invalid = computed(() => isValidation.value && v?.value?.$error);
|
|
30
46
|
|
|
31
47
|
const validationText = computed(() => {
|
|
32
48
|
let validationText = '';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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 (
|
|
38
|
-
|
|
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 (
|
|
59
|
+
else if (validation.ipValidator?.$invalid)
|
|
41
60
|
validationText = t('validation.ipValidator');
|
|
42
|
-
else if (
|
|
61
|
+
else if (validation.macValidator?.$invalid)
|
|
43
62
|
validationText = t('validation.macValidator');
|
|
44
|
-
else if (
|
|
63
|
+
else if (validation.minValue?.$invalid)
|
|
45
64
|
validationText = t('validation.minValue', {
|
|
46
|
-
min:
|
|
65
|
+
min: validation.minValue.$params.min,
|
|
47
66
|
});
|
|
48
|
-
else if (
|
|
67
|
+
else if (validation.maxValue?.$invalid)
|
|
49
68
|
validationText = t('validation.maxValue', {
|
|
50
|
-
max:
|
|
69
|
+
max: validation.maxValue.$params.max,
|
|
51
70
|
});
|
|
52
|
-
else if (
|
|
71
|
+
else if (validation.maxLength?.$invalid)
|
|
53
72
|
validationText = t('validation.maxLength', {
|
|
54
|
-
max:
|
|
73
|
+
max: validation.maxLength.$params.max,
|
|
55
74
|
});
|
|
56
|
-
else if (
|
|
75
|
+
else if (validation.sipAccountValidator?.$invalid)
|
|
57
76
|
validationText = t('validation.sipAccountValidator');
|
|
58
|
-
else if (
|
|
77
|
+
else if (validation.minLength?.$invalid)
|
|
59
78
|
validationText = t('validation.minLength', {
|
|
60
|
-
min:
|
|
79
|
+
min: validation.minLength.$params.min,
|
|
61
80
|
});
|
|
62
|
-
else if (
|
|
63
|
-
|
|
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 (
|
|
85
|
+
else if (validation.sameAs?.$invalid)
|
|
66
86
|
validationText = `${t('validation.sameAs')}`;
|
|
67
|
-
else if (
|
|
87
|
+
else if (validation.domainValidator?.$invalid)
|
|
68
88
|
validationText = `${t('validation.domainValidator')}`;
|
|
69
|
-
else if (
|
|
70
|
-
validationText = `${t('validation.decimalValidator')} ${
|
|
71
|
-
else if (
|
|
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 (
|
|
93
|
+
else if (validation.integer?.$invalid)
|
|
74
94
|
validationText = `${t('validation.integer')}`;
|
|
75
|
-
else if (
|
|
95
|
+
else if (validation.regex?.$invalid)
|
|
76
96
|
validationText =
|
|
77
|
-
|
|
78
|
-
`${t('validation.isRegExpMatched')} ${
|
|
79
|
-
else if (
|
|
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 (
|
|
101
|
+
} else if (validation.phoneNumberSymbolsValidator?.$invalid) {
|
|
82
102
|
validationText = t('validation.phoneNumberSymbolsValidator');
|
|
83
103
|
}
|
|
84
104
|
}
|
|
85
105
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
};
|
package/src/modules/CallSession/modules/VideoCall/composables/useDocumentPiP/domTraversal.ts
CHANGED
|
@@ -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,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
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
|
-
(
|
|
11
|
+
(warning: ApiUserWarning) => NotificationsType
|
|
9
12
|
>([
|
|
10
13
|
[
|
|
11
14
|
ApiUserWarningId.PasswordExpiresSoon,
|
|
12
15
|
({ warningData: data }) => ({
|
|
13
16
|
type: 'info',
|
|
14
|
-
localeKey: data
|
|
17
|
+
localeKey: data?.passwordExpiry?.daysRemaining
|
|
15
18
|
? 'passwordExpirationMessageDays'
|
|
16
19
|
: 'passwordExpirationMessageHours',
|
|
17
20
|
params: {
|
|
18
|
-
amount: data
|
|
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
|
|
29
|
-
name: data
|
|
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
|
|
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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TIMEZONE_STORAGE_KEY = "user-timezone-setting";
|
|
@@ -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:
|
|
10
|
+
response: DownloadFileResponse;
|
|
5
11
|
fileFormat: FileFormat;
|
|
6
12
|
filename?: string;
|
|
7
13
|
mimetype?: string;
|
package/src/scripts/index.js
CHANGED
|
@@ -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
|
|
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 = (
|
|
28
|
-
|
|
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 = (
|
|
@@ -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.$
|
|
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(
|
|
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:
|
|
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,
|
|
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
|
};
|
|
@@ -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>;
|