@webitel/ui-sdk 26.6.95 → 26.6.97
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-CSWXogKF.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 +382 -382
- 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-Zfe96hoz.js} +1 -1
- package/dist/{wt-datepicker-D2GjAUWU.js → wt-datepicker-BtjegGDk.js} +175 -92
- package/dist/{wt-display-chip-items-C3TZt4Gn.js → wt-display-chip-items-YauywYzZ.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-DV1i1Q52.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-CpYbzjDU.js} +2 -2
- package/dist/{wt-vidstack-player-BaH2oaMr.js → wt-vidstack-player-CC6dwrnv.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-datepicker/_internals/composables/useAutoSeparator.ts +96 -0
- package/src/components/wt-datepicker/_internals/composables/useDatepicker.ts +78 -0
- package/src/components/wt-datepicker/_internals/composables/usePreventZeroPad.ts +10 -24
- package/src/components/wt-datepicker/_internals/composables/useStrictInput.ts +61 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +4 -8
- 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 +5 -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 +7 -0
- package/src/enums/CrudAction/CrudAction.d.ts +7 -0
- package/src/enums/DefaultWorkspaceTabSettings/DefaultWorkspaceTabSettings.d.ts +10 -0
- package/src/enums/EmptyCause/EmptyCause.d.ts +6 -0
- package/src/enums/FormatDateMode/FormatDateMode.d.ts +9 -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 +9 -0
- package/src/enums/QueueType/QueueType.enum.d.ts +28 -0
- package/src/enums/RelativeDatetimeValue/RelativeDatetimeValue.d.ts +8 -0
- package/src/enums/RingtoneType/RingtoneType.d.ts +6 -0
- package/src/enums/SingleSignOnProvider/SingleSignOnProvider.d.ts +8 -0
- package/src/enums/SingleSignOnProviderIconMappings/SingleSignOnProviderIconMappings.d.ts +7 -0
- package/src/enums/WebitelApplications/AdminSections.d.ts +46 -0
- package/src/enums/WebitelApplications/AuditorSections.d.ts +5 -0
- package/src/enums/WebitelApplications/CrmSections.d.ts +16 -0
- package/src/enums/WebitelApplications/SupervisorSections.d.ts +7 -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 +14 -0
- package/src/enums/index.d.ts +88 -0
- package/src/install.ts +2 -1
- 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 +10 -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-datepicker/_internals/composables/useAutoSeparator.d.ts +17 -0
- package/types/components/wt-datepicker/_internals/composables/useDatepicker.d.ts +19 -0
- package/types/components/wt-datepicker/_internals/composables/usePreventZeroPad.d.ts +9 -5
- package/types/components/wt-datepicker/_internals/composables/useStrictInput.d.ts +17 -0
- 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/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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { l as t, r as n } from "./enums-De8CDKZ1.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.js";
|
|
4
|
-
import { t as i } from "./useValidation-
|
|
4
|
+
import { t as i } from "./useValidation-lRiKF7xV.js";
|
|
5
5
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeProps as g, openBlock as _, renderSlot as v, resolveComponent as y, toDisplayString as b, toRefs as x, unref as S, withCtx as C } from "vue";
|
|
6
6
|
//#region src/components/wt-timepicker/wt-timepicker.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/ e(/* @__PURE__ */ d({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { n as t } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
3
|
-
import { n, t as r } from "./wt-icon-btn-
|
|
3
|
+
import { n, t as r } from "./wt-icon-btn-DYjjSl-C.js";
|
|
4
4
|
import { t as i } from "./useWtTable-D_PxqVHO.js";
|
|
5
5
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, normalizeStyle as g, onMounted as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toRef as w, unref as T, withCtx as E, withModifiers as D } from "vue";
|
|
6
6
|
//#region src/components/wt-tree-table-row/wt-tree-table-row.vue?vue&type=script&setup=true&lang.ts
|
package/dist/{wt-type-extension-value-input-Bl8jpyTn.js → wt-type-extension-value-input-CpYbzjDU.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-Ban2DI-G.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-CSWXogKF.js";
|
|
3
3
|
import { t as a } from "./enums-De8CDKZ1.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { w as e } from "./components-
|
|
1
|
+
import { w as e } from "./components-CSWXogKF.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { l as n } from "./enums-De8CDKZ1.js";
|
|
4
4
|
import "./wt-button-dC4nOW56.js";
|
|
5
|
-
import { t as r } from "./wt-icon-btn-
|
|
5
|
+
import { t as r } from "./wt-icon-btn-DYjjSl-C.js";
|
|
6
6
|
import { $ as i, C as a, D as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as ee, P as te, Q as g, R as ne, S as _, U as re, V as v, W as y, X as b, Y as ie, Z as x, _ as S, a as ae, b as oe, c as se, d as ce, et as le, f as ue, g as de, h as fe, i as C, it as pe, j as me, k as he, l as w, m as ge, n as T, nt as E, o as D, ot as _e, p as O, q as k, r as A, rt as ve, t as ye, tt as be, u as xe, v as j, w as Se, y as Ce, z as we } from "./vidstack-D9mvYVIz-DesuYgKV.js";
|
|
7
7
|
import { _ as M, a as Te, c as Ee, d as De, f as Oe, g as ke, h as Ae, i as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as N, u as ze } from "./vidstack-CgfrU1hS-CNTJkyzm.js";
|
|
8
|
-
import { _ as Be, a as Ve, c as He, f as Ue, g as We, h as Ge, i as Ke, l as qe, n as Je, r as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./useVidstackSrc-
|
|
8
|
+
import { _ as Be, a as Ve, c as He, f as Ue, g as We, h as Ge, i as Ke, l as qe, n as Je, r as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./useVidstackSrc-B4mUti_c.js";
|
|
9
9
|
import { i as nt, n as rt } from "./vidstack-mvRkf9tF-CoFf7dS9.js";
|
|
10
10
|
import { t as P } from "./vidstack-ijoHbXQB-DBClSWHE.js";
|
|
11
11
|
import { n as it, r as F, t as at } from "./vidstack-CZQo98ic-D3uTuzB9.js";
|
|
@@ -1297,7 +1297,7 @@ var Sn = class extends pn {
|
|
|
1297
1297
|
return "audio";
|
|
1298
1298
|
}
|
|
1299
1299
|
async load(e) {
|
|
1300
|
-
return new (await (import("./vidstack-audio-
|
|
1300
|
+
return new (await (import("./vidstack-audio-BCPraiiR.js"))).AudioProvider(this.target, e);
|
|
1301
1301
|
}
|
|
1302
1302
|
}, wn = class {
|
|
1303
1303
|
name = "video";
|
|
@@ -1309,7 +1309,7 @@ var Sn = class extends pn {
|
|
|
1309
1309
|
return "video";
|
|
1310
1310
|
}
|
|
1311
1311
|
async load(e) {
|
|
1312
|
-
return new (await (import("./vidstack-video-
|
|
1312
|
+
return new (await (import("./vidstack-video-DwlbGwN7.js"))).VideoProvider(this.target, e);
|
|
1313
1313
|
}
|
|
1314
1314
|
}, Tn = class e extends wn {
|
|
1315
1315
|
static supported = tt();
|
|
@@ -1318,7 +1318,7 @@ var Sn = class extends pn {
|
|
|
1318
1318
|
return e.supported && $e(t);
|
|
1319
1319
|
}
|
|
1320
1320
|
async load(e) {
|
|
1321
|
-
return new (await (import("./vidstack-hls-
|
|
1321
|
+
return new (await (import("./vidstack-hls-BbZsbfaO.js"))).HLSProvider(this.target, e);
|
|
1322
1322
|
}
|
|
1323
1323
|
}, En = class e extends wn {
|
|
1324
1324
|
static supported = Be();
|
|
@@ -1327,7 +1327,7 @@ var Sn = class extends pn {
|
|
|
1327
1327
|
return e.supported && We(t);
|
|
1328
1328
|
}
|
|
1329
1329
|
async load(e) {
|
|
1330
|
-
return new (await (import("./vidstack-dash-
|
|
1330
|
+
return new (await (import("./vidstack-dash-MBx5aEEA.js"))).DASHProvider(this.target, e);
|
|
1331
1331
|
}
|
|
1332
1332
|
}, Dn = class {
|
|
1333
1333
|
name = "vimeo";
|
|
@@ -1748,7 +1748,7 @@ var Sn = class extends pn {
|
|
|
1748
1748
|
throw e.code = "CAST_NOT_AVAILABLE", e;
|
|
1749
1749
|
}
|
|
1750
1750
|
if (nt("https://www.gstatic.com"), !this.#b) {
|
|
1751
|
-
let e = await import("./vidstack-DUnfBERX2-
|
|
1751
|
+
let e = await import("./vidstack-DUnfBERX2-BJtKHFxc.js");
|
|
1752
1752
|
this.#b = new e.GoogleCastLoader();
|
|
1753
1753
|
}
|
|
1754
1754
|
await this.#b.prompt(this.#n), e && this.#t.queue.enqueue("media-google-cast-request", e);
|
|
@@ -7366,7 +7366,7 @@ var Bo = { class: "controls-group__actions" }, Vo = /*#__PURE__*/ t(/* @__PURE__
|
|
|
7366
7366
|
})) : vt("", !0)
|
|
7367
7367
|
])], 2));
|
|
7368
7368
|
}
|
|
7369
|
-
}), [["__scopeId", "data-v-
|
|
7369
|
+
}), [["__scopeId", "data-v-b3831d88"]]), Jo = { class: "video-display-panel-wrapper" }, Yo = { class: "video-layout-content" }, Xo = { class: "video-layout-controls" }, Zo = /*#__PURE__*/ t(/* @__PURE__ */ xt({
|
|
7370
7370
|
__name: "video-layout",
|
|
7371
7371
|
props: {
|
|
7372
7372
|
title: {},
|
|
@@ -7456,7 +7456,7 @@ var Bo = { class: "controls-group__actions" }, Vo = /*#__PURE__*/ t(/* @__PURE__
|
|
|
7456
7456
|
_: 1
|
|
7457
7457
|
}));
|
|
7458
7458
|
}
|
|
7459
|
-
}), [["__scopeId", "data-v-
|
|
7459
|
+
}), [["__scopeId", "data-v-a6b8fc46"]]), rs = [
|
|
7460
7460
|
"autoplay",
|
|
7461
7461
|
"muted",
|
|
7462
7462
|
"src"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "26.6.
|
|
3
|
+
"version": "26.6.97",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npm run docs:dev",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"utils:i": "npm install",
|
|
23
23
|
"prepare": "husky || true",
|
|
24
24
|
"test:unit:ci": "npm run test:coverage",
|
|
25
|
-
"typecheck
|
|
25
|
+
"typecheck": "vue-tsc --noEmit -p ./tsconfig.json",
|
|
26
|
+
"typecheck:ci": "npm run typecheck"
|
|
26
27
|
},
|
|
27
28
|
"workspaces": [
|
|
28
29
|
"./packages/api-services",
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import deepCopy from 'deep-copy';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
WebitelProtoDataField,
|
|
4
|
+
WebitelProtoDataStruct,
|
|
5
|
+
} from 'webitel-sdk';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* TODO(types): `position` is returned by the API to order dynamic fields but is
|
|
9
|
+
* absent from the generated `WebitelProtoDataField` type. Extend locally until
|
|
10
|
+
* the generated SDK type includes it.
|
|
11
|
+
*/
|
|
12
|
+
type PositionedDataField = WebitelProtoDataField & {
|
|
13
|
+
position?: number;
|
|
14
|
+
};
|
|
3
15
|
|
|
4
16
|
export const sortDynamicFields = (
|
|
5
17
|
item: WebitelProtoDataStruct,
|
|
6
18
|
): WebitelProtoDataStruct => {
|
|
7
|
-
const
|
|
19
|
+
const sourceFields = (item.fields ?? []) as PositionedDataField[];
|
|
20
|
+
|
|
21
|
+
const unSortableFields = sourceFields.filter((field) => !field.position);
|
|
8
22
|
|
|
9
|
-
const sortableFields = deepCopy(
|
|
23
|
+
const sortableFields = deepCopy(sourceFields)
|
|
10
24
|
.filter((field) => field.position)
|
|
11
25
|
.sort((a, b) => {
|
|
12
|
-
return a.position - b.position;
|
|
26
|
+
return (a.position ?? 0) - (b.position ?? 0);
|
|
13
27
|
});
|
|
14
28
|
|
|
15
29
|
const fields = [
|
|
@@ -10,15 +10,34 @@ export interface ApiModule<Entity> {
|
|
|
10
10
|
items?: Entity[];
|
|
11
11
|
next?: boolean;
|
|
12
12
|
}>;
|
|
13
|
-
get?: (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
13
|
+
get?: (params: {
|
|
14
|
+
itemId?: Id;
|
|
15
|
+
/** preferred over itemId */
|
|
16
|
+
id?: Id;
|
|
17
|
+
parentId?: Id | null;
|
|
18
|
+
}) => Promise<Entity>;
|
|
19
|
+
add?: (params: {
|
|
20
|
+
itemInstance?: Entity;
|
|
21
|
+
parentId?: Id | null;
|
|
22
|
+
}) => Promise<Entity>;
|
|
23
|
+
update?: (params: {
|
|
24
|
+
itemId?: Id | null;
|
|
25
|
+
id?: Id;
|
|
20
26
|
itemInstance?: Entity;
|
|
27
|
+
parentId?: Id | null;
|
|
28
|
+
etag?: string;
|
|
29
|
+
}) => Promise<Entity>;
|
|
30
|
+
patch?: (params: {
|
|
31
|
+
id?: Id;
|
|
32
|
+
itemId?: Id | null;
|
|
33
|
+
changes?: Partial<Entity>;
|
|
34
|
+
parentId?: Id | null;
|
|
35
|
+
etag?: string;
|
|
21
36
|
}) => Promise<Entity>;
|
|
22
|
-
|
|
23
|
-
|
|
37
|
+
delete?: (params: {
|
|
38
|
+
itemId?: Id;
|
|
39
|
+
id?: Id;
|
|
40
|
+
parentId?: Id | null;
|
|
41
|
+
etag?: string;
|
|
42
|
+
}) => Promise<void>;
|
|
24
43
|
}
|
package/src/components/_internals/composables/useGalleriaFullscreen/useGalleriaFullscreen.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, ref } from 'vue';
|
|
2
2
|
|
|
3
|
+
/** Vendor-prefixed fullscreen APIs not present on the standard DOM lib types. */
|
|
4
|
+
interface FullscreenElement extends Element {
|
|
5
|
+
mozRequestFullScreen?: () => Promise<void>;
|
|
6
|
+
webkitRequestFullscreen?: () => Promise<void>;
|
|
7
|
+
msRequestFullscreen?: () => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface FullscreenDocument extends Document {
|
|
11
|
+
mozCancelFullScreen?: () => Promise<void>;
|
|
12
|
+
webkitExitFullscreen?: () => Promise<void>;
|
|
13
|
+
msExitFullscreen?: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
3
16
|
export const useGalleriaFullscreen = () => {
|
|
4
17
|
const fullScreen = ref(false);
|
|
5
18
|
const toggleFullScreen = () => {
|
|
@@ -13,7 +26,9 @@ export const useGalleriaFullscreen = () => {
|
|
|
13
26
|
fullScreen.value = !fullScreen.value;
|
|
14
27
|
};
|
|
15
28
|
const openFullScreen = () => {
|
|
16
|
-
const element = document.querySelector(
|
|
29
|
+
const element = document.querySelector<Element>(
|
|
30
|
+
'.p-galleria',
|
|
31
|
+
) as FullscreenElement;
|
|
17
32
|
if (element.requestFullscreen) {
|
|
18
33
|
element.requestFullscreen();
|
|
19
34
|
} else if (element.mozRequestFullScreen) {
|
|
@@ -28,14 +43,15 @@ export const useGalleriaFullscreen = () => {
|
|
|
28
43
|
}
|
|
29
44
|
};
|
|
30
45
|
const closeFullScreen = () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
const doc = document as FullscreenDocument;
|
|
47
|
+
if (doc.exitFullscreen) {
|
|
48
|
+
doc.exitFullscreen();
|
|
49
|
+
} else if (doc.mozCancelFullScreen) {
|
|
50
|
+
doc.mozCancelFullScreen();
|
|
51
|
+
} else if (doc.webkitExitFullscreen) {
|
|
52
|
+
doc.webkitExitFullscreen();
|
|
53
|
+
} else if (doc.msExitFullscreen) {
|
|
54
|
+
doc.msExitFullscreen();
|
|
39
55
|
}
|
|
40
56
|
};
|
|
41
57
|
const bindDocumentListeners = () => {
|
|
@@ -11,14 +11,15 @@ export const useSelect = ({
|
|
|
11
11
|
optionValue,
|
|
12
12
|
dataKey,
|
|
13
13
|
allowCustomValues,
|
|
14
|
-
|
|
14
|
+
// accepted for API compatibility; custom-value manual handling is currently disabled
|
|
15
|
+
manualCustomValues: _manualCustomValues = false,
|
|
15
16
|
filterInput,
|
|
16
17
|
selectRef,
|
|
17
18
|
searchMethod,
|
|
18
19
|
selectId,
|
|
19
20
|
isSingle,
|
|
20
21
|
strictApiOptions = undefined,
|
|
21
|
-
emit = () => {},
|
|
22
|
+
emit = (_event: string, ..._args: unknown[]) => {},
|
|
22
23
|
}) => {
|
|
23
24
|
const {
|
|
24
25
|
filterText,
|
|
@@ -71,16 +72,13 @@ export const useSelect = ({
|
|
|
71
72
|
selected,
|
|
72
73
|
filteredOptions,
|
|
73
74
|
options,
|
|
74
|
-
optionValue,
|
|
75
75
|
dataKey,
|
|
76
76
|
filterText,
|
|
77
77
|
filterOptions: filterOptionsAndScrollToTop,
|
|
78
78
|
updateSelectedOptionsCache,
|
|
79
79
|
selectRef,
|
|
80
80
|
allowCustomValues,
|
|
81
|
-
manualCustomValues,
|
|
82
81
|
isSingle,
|
|
83
|
-
emit,
|
|
84
82
|
});
|
|
85
83
|
|
|
86
84
|
onMounted(async () => {
|
|
@@ -5,16 +5,13 @@ export const useSelectCustomValues = ({
|
|
|
5
5
|
selected,
|
|
6
6
|
filteredOptions,
|
|
7
7
|
options,
|
|
8
|
-
optionValue,
|
|
9
8
|
dataKey,
|
|
10
9
|
filterText,
|
|
11
10
|
filterOptions,
|
|
12
11
|
updateSelectedOptionsCache,
|
|
13
12
|
selectRef,
|
|
14
13
|
allowCustomValues,
|
|
15
|
-
manualCustomValues,
|
|
16
14
|
isSingle,
|
|
17
|
-
emit,
|
|
18
15
|
}) => {
|
|
19
16
|
const makeCustomOption = (text: string) => {
|
|
20
17
|
const sample = options.value.length
|
|
@@ -75,7 +75,12 @@ export const useSelectOptions = ({
|
|
|
75
75
|
if (optionLabel.value && option[optionLabel.value])
|
|
76
76
|
return option[optionLabel.value];
|
|
77
77
|
if (option.locale) {
|
|
78
|
-
if (Array.isArray(option.locale))
|
|
78
|
+
if (Array.isArray(option.locale))
|
|
79
|
+
return t(
|
|
80
|
+
...(option.locale as [
|
|
81
|
+
string,
|
|
82
|
+
]),
|
|
83
|
+
);
|
|
79
84
|
return t(option.locale);
|
|
80
85
|
}
|
|
81
86
|
return option[defaultOptionLabel] || option;
|
|
@@ -213,7 +218,7 @@ export const useSelectOptions = ({
|
|
|
213
218
|
|
|
214
219
|
watch(
|
|
215
220
|
() => selected.value,
|
|
216
|
-
(newVal
|
|
221
|
+
(newVal) => {
|
|
217
222
|
updateSelectedOptionsCache();
|
|
218
223
|
addSelectedValueToList(newVal);
|
|
219
224
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, unref } from 'vue';
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
3
|
|
|
4
|
-
import type { WtTableHeader } from '
|
|
4
|
+
import type { WtTableHeader } from '../../../wt-table/types/WtTable';
|
|
5
5
|
|
|
6
6
|
export const useWtTable = ({ headers }) => {
|
|
7
7
|
const { t } = useI18n();
|
|
@@ -13,21 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
<script setup lang="ts">
|
|
15
15
|
import { ComponentSize } from '../../enums';
|
|
16
|
+
import type { BadgeSeverity } from './types/WtBadge';
|
|
16
17
|
|
|
17
18
|
interface Props {
|
|
18
19
|
value: string | number;
|
|
19
|
-
severity?:
|
|
20
|
-
| 'secondary'
|
|
21
|
-
| 'info'
|
|
22
|
-
| 'success'
|
|
23
|
-
| 'warn'
|
|
24
|
-
| 'error'
|
|
25
|
-
| 'online'
|
|
26
|
-
| 'dnd'
|
|
27
|
-
| 'busy'
|
|
28
|
-
| 'pause'
|
|
29
|
-
| 'onlineCc'
|
|
30
|
-
| 'offline';
|
|
20
|
+
severity?: BadgeSeverity;
|
|
31
21
|
size?: ComponentSize;
|
|
32
22
|
}
|
|
33
23
|
|
|
@@ -57,6 +57,7 @@ import type { ButtonProps } from 'primevue';
|
|
|
57
57
|
import { computed, inject, ref, toRef, useAttrs, watch } from 'vue';
|
|
58
58
|
|
|
59
59
|
import { ButtonColor, ButtonVariant, ComponentSize } from '../../enums';
|
|
60
|
+
import type { BadgeSeverity } from '../wt-badge-new/types/WtBadge';
|
|
60
61
|
import WtBadge from '../wt-badge-new/wt-badge.vue';
|
|
61
62
|
import WtIcon from '../wt-icon/wt-icon.vue';
|
|
62
63
|
|
|
@@ -82,7 +83,7 @@ interface WtButtonProps extends /* @vue-ignore */ ButtonProps {
|
|
|
82
83
|
icon?: string;
|
|
83
84
|
iconPrefix?: string;
|
|
84
85
|
badge?: string;
|
|
85
|
-
badgeSeverity?:
|
|
86
|
+
badgeSeverity?: BadgeSeverity;
|
|
86
87
|
badgeAbsolutePosition?: boolean;
|
|
87
88
|
variant?: ButtonVariant;
|
|
88
89
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @HlukhovYe
|
|
3
|
+
*
|
|
4
|
+
* Automatically inserts date/time separators while the user types into the
|
|
5
|
+
* PrimeVue DatePicker input so they don't have to type '/' or ':' manually.
|
|
6
|
+
*
|
|
7
|
+
* Format without time: dd/mm/yyyy → inserts '/' after positions 2 and 5
|
|
8
|
+
* Format with time: dd/mm/yyyy hh:mm → also inserts ' ' after position 10
|
|
9
|
+
* and ':' after position 13
|
|
10
|
+
*
|
|
11
|
+
* The handler runs in the bubble phase (after PrimeVue's own input handler).
|
|
12
|
+
* Listener registration is handled by useDatepicker.
|
|
13
|
+
*/
|
|
14
|
+
export function createAutoSeparatorHandler(showTime: () => boolean) {
|
|
15
|
+
const DATE_SEPARATORS: Array<{
|
|
16
|
+
afterPos: number;
|
|
17
|
+
sep: string;
|
|
18
|
+
}> = [
|
|
19
|
+
{
|
|
20
|
+
afterPos: 2,
|
|
21
|
+
sep: '/',
|
|
22
|
+
}, // dd → dd/
|
|
23
|
+
{
|
|
24
|
+
afterPos: 5,
|
|
25
|
+
sep: '/',
|
|
26
|
+
}, // mm → mm/
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
const TIME_SEPARATORS: Array<{
|
|
30
|
+
afterPos: number;
|
|
31
|
+
sep: string;
|
|
32
|
+
}> = [
|
|
33
|
+
{
|
|
34
|
+
afterPos: 10,
|
|
35
|
+
sep: ' ',
|
|
36
|
+
}, // yyyy → yyyy<space>
|
|
37
|
+
{
|
|
38
|
+
afterPos: 13,
|
|
39
|
+
sep: ':',
|
|
40
|
+
}, // hh → hh:
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
let lastLength = 0;
|
|
44
|
+
let injecting = false;
|
|
45
|
+
|
|
46
|
+
function onInputBubble(event: Event) {
|
|
47
|
+
if (injecting) return;
|
|
48
|
+
const input = event.target as HTMLInputElement;
|
|
49
|
+
const value = input.value;
|
|
50
|
+
const cursor = input.selectionStart ?? value.length;
|
|
51
|
+
const currentLength = value.length;
|
|
52
|
+
|
|
53
|
+
const isDeleting = currentLength < lastLength;
|
|
54
|
+
lastLength = currentLength;
|
|
55
|
+
if (isDeleting) return;
|
|
56
|
+
|
|
57
|
+
const separators = showTime()
|
|
58
|
+
? [
|
|
59
|
+
...DATE_SEPARATORS,
|
|
60
|
+
...TIME_SEPARATORS,
|
|
61
|
+
]
|
|
62
|
+
: DATE_SEPARATORS;
|
|
63
|
+
|
|
64
|
+
// Find the first separator position the cursor has reached or passed
|
|
65
|
+
// where the separator character is missing. Covers two cases:
|
|
66
|
+
// 1. Normal typing: cursor === afterPos (just finished a segment).
|
|
67
|
+
// 2. Separator was deleted then user typed next digit: cursor > afterPos
|
|
68
|
+
// but value[afterPos] is a digit instead of the separator.
|
|
69
|
+
for (const { afterPos, sep } of separators) {
|
|
70
|
+
if (cursor < afterPos) break;
|
|
71
|
+
if (value[afterPos] === sep) continue;
|
|
72
|
+
const newValue = value.slice(0, afterPos) + sep + value.slice(afterPos);
|
|
73
|
+
input.value = newValue;
|
|
74
|
+
lastLength = newValue.length;
|
|
75
|
+
const newCursor = cursor + sep.length;
|
|
76
|
+
input.setSelectionRange(newCursor, newCursor);
|
|
77
|
+
injecting = true;
|
|
78
|
+
input.dispatchEvent(
|
|
79
|
+
new Event('input', {
|
|
80
|
+
bubbles: true,
|
|
81
|
+
}),
|
|
82
|
+
);
|
|
83
|
+
injecting = false;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function resetLength(input: HTMLInputElement) {
|
|
89
|
+
lastLength = input.value.length;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
onInputBubble,
|
|
94
|
+
resetLength,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { createAutoSeparatorHandler } from './useAutoSeparator';
|
|
3
|
+
import { useOverlayAnchor } from './useOverlayAnchor';
|
|
4
|
+
import { createPreventZeroPadHandlers } from './usePreventZeroPad';
|
|
5
|
+
import { useRestoreOnBlur } from './useRestoreOnBlur';
|
|
6
|
+
import { createStrictInputHandler } from './useStrictInput';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @author @HlukhovYe
|
|
10
|
+
*
|
|
11
|
+
* Single composable entry point for wt-datepicker. Composes all input-handling
|
|
12
|
+
* and overlay logic into a minimal set of DOM listeners — one capture input,
|
|
13
|
+
* one bubble input, one keydown — so the browser dispatches each event once.
|
|
14
|
+
*
|
|
15
|
+
* Returns:
|
|
16
|
+
* onBlur — forward to p-datepicker's @blur
|
|
17
|
+
* lockOverlay / unlockOverlay — forward to onPanelShow / onPanelHide
|
|
18
|
+
*/
|
|
19
|
+
export function useDatepicker(
|
|
20
|
+
getInput: () => HTMLInputElement | null,
|
|
21
|
+
getDatepicker: () => {
|
|
22
|
+
rawValue: Date | null;
|
|
23
|
+
updateModel: (v: Date) => void;
|
|
24
|
+
} | null,
|
|
25
|
+
showTime: () => boolean,
|
|
26
|
+
isClearable: () => boolean,
|
|
27
|
+
) {
|
|
28
|
+
const { onInputCapture: zeroPadCapture, onInputBubble: zeroPadBubble } =
|
|
29
|
+
createPreventZeroPadHandlers();
|
|
30
|
+
|
|
31
|
+
const { onInputBubble: separatorBubble, resetLength } =
|
|
32
|
+
createAutoSeparatorHandler(showTime);
|
|
33
|
+
|
|
34
|
+
const { onKeydown } = createStrictInputHandler(showTime);
|
|
35
|
+
|
|
36
|
+
const { lock: lockOverlay, unlock: unlockOverlay } = useOverlayAnchor();
|
|
37
|
+
|
|
38
|
+
const { onBlur } = useRestoreOnBlur(getDatepicker, isClearable);
|
|
39
|
+
|
|
40
|
+
function onInputCaptureHandler(event: Event) {
|
|
41
|
+
zeroPadCapture(event);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function onInputBubbleHandler(event: Event) {
|
|
45
|
+
// Zero-pad handler runs first: it may stop propagation if it restores a
|
|
46
|
+
// partial value, which also prevents the separator handler from seeing a
|
|
47
|
+
// half-formed string and injecting a separator too early.
|
|
48
|
+
zeroPadBubble(event);
|
|
49
|
+
separatorBubble(event);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
const input = getInput();
|
|
54
|
+
if (!input) return;
|
|
55
|
+
resetLength(input);
|
|
56
|
+
input.addEventListener('input', onInputCaptureHandler, {
|
|
57
|
+
capture: true,
|
|
58
|
+
});
|
|
59
|
+
input.addEventListener('input', onInputBubbleHandler);
|
|
60
|
+
input.addEventListener('keydown', onKeydown);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
onUnmounted(() => {
|
|
64
|
+
const input = getInput();
|
|
65
|
+
if (!input) return;
|
|
66
|
+
input.removeEventListener('input', onInputCaptureHandler, {
|
|
67
|
+
capture: true,
|
|
68
|
+
});
|
|
69
|
+
input.removeEventListener('input', onInputBubbleHandler);
|
|
70
|
+
input.removeEventListener('keydown', onKeydown);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
onBlur,
|
|
75
|
+
lockOverlay,
|
|
76
|
+
unlockOverlay,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { onMounted, onUnmounted } from 'vue';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* @author @HlukhovYe
|
|
5
3
|
*
|
|
@@ -9,12 +7,13 @@ import { onMounted, onUnmounted } from 'vue';
|
|
|
9
7
|
* is mid-typing. Without this, typing "2" into a cleared two-digit slot immediately
|
|
10
8
|
* reformats to "02", forcing the user to delete the leading zero before the second digit.
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
10
|
+
* Capture handler (before PrimeVue): snapshots the partial single-digit value.
|
|
11
|
+
* Bubble handler (after PrimeVue): if PrimeVue zero-padded the value, restores the
|
|
12
|
+
* snapshot and cancels further propagation so the model is not updated yet.
|
|
13
|
+
*
|
|
14
|
+
* Listener registration is handled by useDatepicker.
|
|
16
15
|
*/
|
|
17
|
-
export function
|
|
16
|
+
export function createPreventZeroPadHandlers() {
|
|
18
17
|
let pendingPartial: {
|
|
19
18
|
value: string;
|
|
20
19
|
cursor: number;
|
|
@@ -52,21 +51,8 @@ export function usePreventZeroPad(getInput: () => HTMLInputElement | null) {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
capture: true,
|
|
60
|
-
});
|
|
61
|
-
input.addEventListener('input', onInputBubble);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
onUnmounted(() => {
|
|
65
|
-
const input = getInput();
|
|
66
|
-
if (!input) return;
|
|
67
|
-
input.removeEventListener('input', onInputCapture, {
|
|
68
|
-
capture: true,
|
|
69
|
-
});
|
|
70
|
-
input.removeEventListener('input', onInputBubble);
|
|
71
|
-
});
|
|
54
|
+
return {
|
|
55
|
+
onInputCapture,
|
|
56
|
+
onInputBubble,
|
|
57
|
+
};
|
|
72
58
|
}
|