@webitel/ui-sdk 26.8.62 → 26.8.64

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 (79) hide show
  1. package/dist/{caseConverters-DXegZoCt.js → caseConverters-6cy_SaV5.js} +8 -8
  2. package/dist/{clients-DhLhM1vv.js → clients-CB9U4xyd.js} +300 -216
  3. package/dist/{components-B78DPWWV.js → components-0bFcL-uW.js} +5228 -3247
  4. package/dist/{composables-BtWSAI5D.js → composables-DbGvukRz.js} +3 -3
  5. package/dist/{debounce-Bp3jy7S5.js → debounce-CCzQDuk5.js} +2 -2
  6. package/dist/{deep-copy-CTgLtgMO.js → deep-copy-CjYHLk2X.js} +1 -1
  7. package/dist/{dist-CAOIU8xq.js → dist-C_fngTiN.js} +1 -1
  8. package/dist/{dist-Crpfx4FA.js → dist-CugChoYz.js} +1 -1
  9. package/dist/{enums-DY3jIXFF.js → enums-CM8hOd_m.js} +29 -28
  10. package/dist/genClient-DVFU4u-o.js +2088 -0
  11. package/dist/{rolldown-runtime-BEcgMyyN.js → rolldown-runtime-to5KK-CW.js} +5 -2
  12. package/dist/{side-channel-8SnAuRMA.js → side-channel-M3LABDql.js} +2 -2
  13. package/dist/ui-sdk.css +1 -1
  14. package/dist/ui-sdk.js +42 -42
  15. package/dist/ui-sdk.umd.cjs +642 -641
  16. package/dist/{useValidation-Bvastl-C.js → useValidation-CDgb424A.js} +2 -2
  17. package/dist/{useWtTable-DLWucXPx.js → useWtTable-BbNT2rXz.js} +1 -1
  18. package/dist/utils-DqYQ_mrQ.js +1902 -0
  19. package/dist/{vue-i18n-Db_oYfO8.js → vue-i18n-DNulhn2J.js} +2 -2
  20. package/dist/{vue-router-Dwey8MMv.js → vue-router-B9nAVQtl.js} +1 -1
  21. package/dist/{wt-action-bar-C4JukltF.js → wt-action-bar-Dx2j2yCn.js} +3 -3
  22. package/dist/{wt-button-2_aOV7LX.js → wt-button-l_CCN7zG.js} +2 -2
  23. package/dist/{wt-chat-emoji-7HuNq3jZ.js → wt-chat-emoji-CeTjymhG.js} +4 -4
  24. package/dist/{wt-datepicker-DmGisBuB.js → wt-datepicker-Dcg6mx6P.js} +3 -3
  25. package/dist/{wt-display-chip-items-IGLJniJK.js → wt-display-chip-items-9KCOYg0J.js} +2 -2
  26. package/dist/{wt-dual-panel-C98aGU8o.js → wt-dual-panel-sCqa1h4_.js} +1 -1
  27. package/dist/{wt-expansion-card-CEMaWXCy.js → wt-expansion-card-DKEhPBa9.js} +2 -2
  28. package/dist/{wt-expansion-panel-BjeXHSay.js → wt-expansion-panel-BnQ9Ow8D.js} +1 -1
  29. package/dist/{wt-galleria-DMCgiiju.js → wt-galleria-CNwBmLcX.js} +2 -2
  30. package/dist/{wt-icon-Ct0E7k_d.js → wt-icon-CjNYdMOP.js} +2 -2
  31. package/dist/{wt-icon-action-DB6P4E4K.js → wt-icon-action-DX9R-hzG.js} +2 -2
  32. package/dist/{wt-icon-btn-DZa_qsai.js → wt-icon-btn-BbPNcD-O.js} +1 -1
  33. package/dist/{wt-notifications-bar-BEomlIrN.js → wt-notifications-bar-BTt1vqwz.js} +2 -2
  34. package/dist/{wt-pagination-G2ZGU4Pi.js → wt-pagination-DNjYIHjv.js} +1 -1
  35. package/dist/{wt-player-CzNYyH1h.js → wt-player-CoB2InY0.js} +5 -5
  36. package/dist/{wt-popover-BCYPu5NC.js → wt-popover-B0SIrVz6.js} +1 -1
  37. package/dist/{wt-screen-recordings-action-DI1qlUi1.js → wt-screen-recordings-action-DCdRUBbd.js} +1 -0
  38. package/dist/{wt-search-bar-D0qgd2ve.js → wt-search-bar-DlNX3Sr8.js} +2 -2
  39. package/dist/{wt-selection-popup-CjYw4ppb.js → wt-selection-popup-C74__W9Z.js} +1 -1
  40. package/dist/{wt-send-message-popup-OndM1N5f.js → wt-send-message-popup-COrWsZPZ.js} +22 -22
  41. package/dist/{wt-slider-BPzRTeYU.js → wt-slider-4xCDNWv-.js} +1 -1
  42. package/dist/{wt-start-page-BFQExFUj.js → wt-start-page-BUjRx6RA.js} +1 -1
  43. package/dist/{wt-status-select-BuojqV_1.js → wt-status-select-C2-LFbrZ.js} +10 -10
  44. package/dist/{wt-table-DWnt7b9t.js → wt-table-BBFNhnGG.js} +2 -2
  45. package/dist/{wt-table-column-select-D4c56HPB.js → wt-table-column-select-CuQbrCkx.js} +3 -3
  46. package/dist/{wt-time-input-BEBrSugB.js → wt-time-input-Ds40EseE.js} +4 -0
  47. package/dist/{wt-timepicker-BhTfiWhA.js → wt-timepicker-BltIOjh9.js} +19 -7
  48. package/dist/{wt-toast-eWzfeYuz.js → wt-toast-DHV4UvFz.js} +2 -2
  49. package/dist/{wt-tree-CMIpbXBo.js → wt-tree-DKSphRxr.js} +4 -4
  50. package/dist/{wt-tree-table-C-UM5kxp.js → wt-tree-table-9vnEJcX0.js} +2 -2
  51. package/dist/{wt-type-extension-value-input-BWUyeiLM.js → wt-type-extension-value-input-t0VfexsE.js} +18 -18
  52. package/dist/{wt-vidstack-player-C3MwI4DL.js → wt-vidstack-player-C3Rh5v9F.js} +5 -5
  53. package/package.json +5 -1
  54. package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +2 -2
  55. package/src/components/wt-time-input/wt-time-input.vue +2 -0
  56. package/src/components/wt-timepicker/wt-timepicker.vue +6 -0
  57. package/src/modules/Appearance/index.ts +2 -0
  58. package/src/scripts/convertDurationWithDays.ts +30 -0
  59. package/src/scripts/index.js +12 -0
  60. package/src/scripts/storageFile/downloadFilesAsZip.ts +55 -0
  61. package/src/scripts/storageFile/downloadStorageFile.ts +27 -0
  62. package/src/scripts/storageFile/getFileTypeIcon.ts +6 -0
  63. package/src/scripts/storageFile/getStorageFileUrl.ts +17 -0
  64. package/src/scripts/storageFile/openStorageFileInNewTab.ts +34 -0
  65. package/src/utils/index.ts +1 -0
  66. package/src/utils/prettifyDate.ts +14 -0
  67. package/types/.tsbuildinfo +1 -1
  68. package/types/modules/Appearance/index.d.ts +2 -0
  69. package/types/scripts/convertDurationWithDays.d.ts +1 -0
  70. package/types/scripts/index.d.ts +7 -1
  71. package/types/scripts/storageFile/downloadFilesAsZip.d.ts +11 -0
  72. package/types/scripts/storageFile/downloadStorageFile.d.ts +8 -0
  73. package/types/scripts/storageFile/getFileTypeIcon.d.ts +1 -0
  74. package/types/scripts/storageFile/getStorageFileUrl.d.ts +6 -0
  75. package/types/scripts/storageFile/openStorageFileInNewTab.d.ts +5 -0
  76. package/types/utils/index.d.ts +1 -0
  77. package/types/utils/prettifyDate.d.ts +1 -0
  78. package/dist/displayText-CtaxzaBz.js +0 -3
  79. package/dist/genClient-HHiOUj56.js +0 -2891
@@ -49,6 +49,8 @@ var o = /* @__PURE__ */ t({
49
49
  max: t.maxValue,
50
50
  min: t.minValue,
51
51
  v: t.v,
52
+ "regle-validation": t.regleValidation,
53
+ "custom-validators": t.customValidators,
52
54
  required: t.required,
53
55
  disabled: t.disabled,
54
56
  "hide-input-info": t.hideInputInfo
@@ -60,6 +62,8 @@ var o = /* @__PURE__ */ t({
60
62
  "max",
61
63
  "min",
62
64
  "v",
65
+ "regle-validation",
66
+ "custom-validators",
63
67
  "required",
64
68
  "disabled",
65
69
  "hide-input-info"
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { l as t, r as n } from "./enums-DY3jIXFF.js";
3
- import { t as r } from "./vue-i18n-Db_oYfO8.js";
4
- import { t as i } from "./useValidation-Bvastl-C.js";
2
+ import { l as t, r as n } from "./enums-CM8hOd_m.js";
3
+ import { t as r } from "./vue-i18n-DNulhn2J.js";
4
+ import { t as i } from "./useValidation-CDgb424A.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({
@@ -92,13 +92,17 @@ var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/
92
92
  disabled: e.disabled,
93
93
  label: B.value,
94
94
  v: S(A),
95
+ "regle-validation": S(M),
96
+ "custom-validators": S(j),
95
97
  "hide-input-info": "",
96
98
  onBlur: q
97
99
  }, null, 8, [
98
100
  "model-value",
99
101
  "disabled",
100
102
  "label",
101
- "v"
103
+ "v",
104
+ "regle-validation",
105
+ "custom-validators"
102
106
  ])) : s("", !0),
103
107
  R.value ? (_(), o(d, {
104
108
  key: 1,
@@ -109,13 +113,17 @@ var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/
109
113
  "min-value": U.value ? -1 : 0,
110
114
  "max-value": 60,
111
115
  v: S(A),
116
+ "regle-validation": S(M),
117
+ "custom-validators": S(j),
112
118
  "hide-input-info": ""
113
119
  }, null, 8, [
114
120
  "model-value",
115
121
  "disabled",
116
122
  "label",
117
123
  "min-value",
118
- "v"
124
+ "v",
125
+ "regle-validation",
126
+ "custom-validators"
119
127
  ])) : s("", !0),
120
128
  z.value ? (_(), o(d, {
121
129
  key: 2,
@@ -126,13 +134,17 @@ var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/
126
134
  "min-value": W.value ? -1 : 0,
127
135
  "max-value": 60,
128
136
  v: S(A),
137
+ "regle-validation": S(M),
138
+ "custom-validators": S(j),
129
139
  "hide-input-info": ""
130
140
  }, null, 8, [
131
141
  "model-value",
132
142
  "disabled",
133
143
  "label",
134
144
  "min-value",
135
- "v"
145
+ "v",
146
+ "regle-validation",
147
+ "custom-validators"
136
148
  ])) : s("", !0)
137
149
  ]),
138
150
  S(N) && S(F) ? (_(), o(m, {
@@ -151,6 +163,6 @@ var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/
151
163
  ], 2);
152
164
  };
153
165
  }
154
- }), [["__scopeId", "data-v-eec20219"]]);
166
+ }), [["__scopeId", "data-v-5c9f2a80"]]);
155
167
  //#endregion
156
168
  export { D as default };
@@ -1,5 +1,5 @@
1
- import { t as e } from "./wt-icon-Ct0E7k_d.js";
2
- import { i as t, l as n } from "./enums-DY3jIXFF.js";
1
+ import { t as e } from "./wt-icon-CjNYdMOP.js";
2
+ import { i as t, l as n } from "./enums-CM8hOd_m.js";
3
3
  import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, normalizeProps as d, normalizeStyle as f, openBlock as p, resolveComponent as m, toDisplayString as h, unref as g, useAttrs as _, withCtx as v } from "vue";
4
4
  //#region node_modules/mitt/dist/mitt.mjs
5
5
  function y(e) {
@@ -1,9 +1,9 @@
1
- import { a as e, t } from "./rolldown-runtime-BEcgMyyN.js";
2
- import { n, t as r } from "./dist-CAOIU8xq.js";
3
- import { n as i, t as a } from "./dist-Crpfx4FA.js";
1
+ import { o as e, t } from "./rolldown-runtime-to5KK-CW.js";
2
+ import { n, t as r } from "./dist-C_fngTiN.js";
3
+ import { n as i, t as a } from "./dist-CugChoYz.js";
4
4
  import { t as o } from "./_plugin-vue_export-helper-B3ysoDQm.js";
5
5
  import { t as s } from "./wt-expand-transition-C2p9bR4j.js";
6
- import { _ as c, a as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "./side-channel-8SnAuRMA.js";
6
+ import { _ as c, a as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "./side-channel-M3LABDql.js";
7
7
  import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as j, createVNode as M, defineComponent as N, guardReactiveProps as P, normalizeClass as F, normalizeProps as I, onMounted as L, openBlock as R, ref as z, renderList as B, renderSlot as V, resolveComponent as H, toDisplayString as U, unref as W, vShow as ee, watch as te, withCtx as G, withDirectives as ne } from "vue";
8
8
  //#region node_modules/object-keys/isArguments.js
9
9
  var re = /* @__PURE__ */ t(((e, t) => {
@@ -1,7 +1,7 @@
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-DZa_qsai.js";
4
- import { t as i } from "./useWtTable-DLWucXPx.js";
3
+ import { n, t as r } from "./wt-icon-btn-BbPNcD-O.js";
4
+ import { t as i } from "./useWtTable-BbNT2rXz.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
7
7
  var O = { class: "wt-tree-table-td__content" }, k = {
@@ -1,7 +1,7 @@
1
- import { t as e } from "./clients-DhLhM1vv.js";
2
- import { a as t, o as n, r, s as i } from "./components-B78DPWWV.js";
3
- import { t as a } from "./enums-DY3jIXFF.js";
4
- import { t as o } from "./vue-i18n-Db_oYfO8.js";
1
+ import { a as e, o as t, r as n, s as r } from "./components-0bFcL-uW.js";
2
+ import { t as i } from "./clients-CB9U4xyd.js";
3
+ import { t as a } from "./enums-CM8hOd_m.js";
4
+ import { t as o } from "./vue-i18n-DNulhn2J.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";
6
6
  //#endregion
7
7
  //#region src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue
@@ -34,11 +34,11 @@ var y = /* @__PURE__ */ d({
34
34
  searchMethod: O(y.field.lookup)
35
35
  })), E = s(() => ({ ...T.value })), D = (e) => {
36
36
  f.value = e;
37
- }, O = ({ path: t = "", display: n = "", primary: r = "" } = {}) => (i) => e.getLookup({
38
- ...i,
39
- path: t,
40
- display: n,
41
- primary: r
37
+ }, O = ({ path: e = "", display: t = "", primary: n = "" } = {}) => (r) => i.getLookup({
38
+ ...r,
39
+ path: e,
40
+ display: t,
41
+ primary: n
42
42
  }), k = (e) => {
43
43
  let t = e ?? {};
44
44
  if (Object.values(t).length === 0) return D(null);
@@ -52,7 +52,7 @@ var y = /* @__PURE__ */ d({
52
52
  name: e.name
53
53
  })));
54
54
  };
55
- return (e, o) => {
55
+ return (i, o) => {
56
56
  let s = g("wt-input-text"), f = g("wt-input-number");
57
57
  return d.field.kind === _(a).Text ? (m(), c(s, p({ key: 0 }, w.value, {
58
58
  "model-value": C.value,
@@ -60,44 +60,44 @@ var y = /* @__PURE__ */ d({
60
60
  }), null, 16, ["model-value"])) : d.field.kind === _(a).Number ? (m(), c(f, p({ key: 1 }, w.value, {
61
61
  "model-value": C.value,
62
62
  "onUpdate:modelValue": D
63
- }), null, 16, ["model-value"])) : d.field.kind === _(a).Boolean ? h(e.$slots, _(a).Boolean, {
63
+ }), null, 16, ["model-value"])) : d.field.kind === _(a).Boolean ? h(i.$slots, _(a).Boolean, {
64
64
  key: 2,
65
65
  defaultProps: { ...w.value }
66
- }, () => [u(_(t), p(w.value, {
66
+ }, () => [u(_(e), p(w.value, {
67
67
  "model-value": C.value,
68
68
  "onUpdate:modelValue": D
69
- }), null, 16, ["model-value"])]) : d.field.kind === _(a).Select ? h(e.$slots, _(a).Select, {
69
+ }), null, 16, ["model-value"])]) : d.field.kind === _(a).Select ? h(i.$slots, _(a).Select, {
70
70
  key: 3,
71
71
  defaultProps: {
72
72
  ...w.value,
73
73
  ...T.value,
74
74
  value: C.value
75
75
  }
76
- }, () => [u(_(n), p(w.value, {
76
+ }, () => [u(_(t), p(w.value, {
77
77
  "model-value": C.value,
78
78
  "search-method": O(d.field.lookup),
79
79
  "data-key": "id",
80
80
  "onUpdate:modelValue": k
81
- }), null, 16, ["model-value", "search-method"])]) : d.field.kind === _(a).Multiselect ? h(e.$slots, _(a).Multiselect, {
81
+ }), null, 16, ["model-value", "search-method"])]) : d.field.kind === _(a).Multiselect ? h(i.$slots, _(a).Multiselect, {
82
82
  key: 4,
83
83
  defaultProps: {
84
84
  ...w.value,
85
85
  ...E.value,
86
86
  value: C.value
87
87
  }
88
- }, () => [u(_(i), p({
88
+ }, () => [u(_(r), p({
89
89
  ...w.value,
90
90
  ...E.value
91
91
  }, {
92
92
  "model-value": C.value,
93
93
  "onUpdate:modelValue": A
94
- }), null, 16, ["model-value"])]) : d.field.kind === _(a).Calendar ? h(e.$slots, _(a).Calendar, {
94
+ }), null, 16, ["model-value"])]) : d.field.kind === _(a).Calendar ? h(i.$slots, _(a).Calendar, {
95
95
  key: 5,
96
96
  defaultProps: {
97
97
  ...w.value,
98
98
  value: C.value
99
99
  }
100
- }, () => [u(_(r), p(w.value, {
100
+ }, () => [u(_(n), p(w.value, {
101
101
  "model-value": C.value,
102
102
  "show-time": "",
103
103
  "onUpdate:modelValue": D
@@ -1,8 +1,8 @@
1
- import { D as e } from "./components-B78DPWWV.js";
1
+ import { k as e } from "./components-0bFcL-uW.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { l as n } from "./enums-DY3jIXFF.js";
4
- import "./wt-button-2_aOV7LX.js";
5
- import { t as r } from "./wt-icon-btn-DZa_qsai.js";
3
+ import { l as n } from "./enums-CM8hOd_m.js";
4
+ import "./wt-button-l_CCN7zG.js";
5
+ import { t as r } from "./wt-icon-btn-BbPNcD-O.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
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-aQcqC_v0.js";
@@ -13,7 +13,7 @@ import { a as ot, i as st, n as I, o as ct, r as L, t as lt } from "./vidstack-D
13
13
  import { t as R } from "./vidstack-_E7LrUjK-DaCLs8ge.js";
14
14
  import { n as ut, t as dt } from "./vidstack-CDOoBnJL-BCwLE1fB.js";
15
15
  import { i as ft, n as pt, r as mt, t as ht } from "./vidstack-CdfyZegh-Bn47J4h6.js";
16
- import { t as gt } from "./wt-slider-BPzRTeYU.js";
16
+ import { t as gt } from "./wt-slider-4xCDNWv-.js";
17
17
  import { computed as _t, createBlock as vt, createCommentVNode as yt, createElementBlock as bt, createElementVNode as z, createSlots as xt, createVNode as B, defineComponent as St, inject as Ct, normalizeClass as wt, onBeforeUnmount as Tt, onMounted as Et, openBlock as V, provide as Dt, ref as Ot, renderSlot as H, resolveComponent as kt, toDisplayString as At, toRefs as jt, unref as U, useTemplateRef as Mt, withCtx as Nt } from "vue";
18
18
  //#region node_modules/vidstack/prod/chunks/vidstack-CYE89tBD.js
19
19
  var Pt = ge();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.62",
3
+ "version": "26.8.64",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -351,6 +351,10 @@
351
351
  "types": "./types/modules/Userinfo/index.d.ts",
352
352
  "import": "./src/modules/Userinfo/index.ts"
353
353
  },
354
+ "./modules/Appearance": {
355
+ "types": "./types/modules/Appearance/index.d.ts",
356
+ "import": "./src/modules/Appearance/index.ts"
357
+ },
354
358
  "./modules/ObjectPermissions": {
355
359
  "types": "./types/modules/ObjectPermissions/index.d.ts",
356
360
  "import": "./src/modules/ObjectPermissions/index.ts"
@@ -111,7 +111,7 @@ const props = defineProps<{
111
111
 
112
112
  const { t } = useI18n();
113
113
 
114
- const computedLabel = computed(() => {
114
+ const resolvedLabel = computed(() => {
115
115
  return props.label || t(props.field?.name || 'vocabulary.labels');
116
116
  });
117
117
 
@@ -125,7 +125,7 @@ const value = computed<any>(() => {
125
125
  });
126
126
 
127
127
  const sharedChildrenProps = computed(() => ({
128
- label: computedLabel.value,
128
+ label: resolvedLabel.value,
129
129
  required: isRequired.value,
130
130
  v: props.v,
131
131
  }));
@@ -7,6 +7,8 @@
7
7
  :max="maxValue"
8
8
  :min="minValue"
9
9
  :v="v"
10
+ :regle-validation="regleValidation"
11
+ :custom-validators="customValidators"
10
12
  :required="required"
11
13
  :disabled="disabled"
12
14
  :hide-input-info="hideInputInfo"
@@ -36,6 +36,8 @@
36
36
  :disabled="disabled"
37
37
  :label="labelHours"
38
38
  :v="v"
39
+ :regle-validation="regleValidation"
40
+ :custom-validators="customValidators"
39
41
  hide-input-info
40
42
  @blur="onHoursBlurEvent"
41
43
  />
@@ -47,6 +49,8 @@
47
49
  :min-value="hour ? -1 : 0"
48
50
  :max-value="60"
49
51
  :v="v"
52
+ :regle-validation="regleValidation"
53
+ :custom-validators="customValidators"
50
54
  hide-input-info
51
55
  />
52
56
  <wt-time-input
@@ -57,6 +61,8 @@
57
61
  :min-value="min ? -1 : 0"
58
62
  :max-value="60"
59
63
  :v="v"
64
+ :regle-validation="regleValidation"
65
+ :custom-validators="customValidators"
60
66
  hide-input-info
61
67
  />
62
68
  </div>
@@ -0,0 +1,2 @@
1
+ export { default as WtDarkModeSwitcher } from './components/wt-dark-mode-switcher.vue';
2
+ export { createAppearanceStore } from './pinia/store/AppearanceStore';
@@ -0,0 +1,30 @@
1
+ export const convertDurationWithDays = (
2
+ duration: number,
3
+ timerFormatting = false,
4
+ ): string => {
5
+ if (!duration && !timerFormatting) return '00:00:00';
6
+
7
+ // Convert milliseconds to seconds because if timerFormatting is true, duration is in milliseconds
8
+ const totalSeconds = timerFormatting
9
+ ? Math.abs(Number(duration)) / 1000
10
+ : Math.abs(Number(duration));
11
+
12
+ const isNegative = duration < 0;
13
+
14
+ const days = Math.floor(totalSeconds / (24 * 60 * 60));
15
+ const hours = Math.floor((totalSeconds % (24 * 60 * 60)) / (60 * 60));
16
+ const minutes = Math.floor((totalSeconds % (60 * 60)) / 60);
17
+
18
+ if (timerFormatting) {
19
+ // Format: "Xd Xh Xm"
20
+ const formatted = `${days}d ${hours}h ${minutes}m`;
21
+ return isNegative ? `- ${formatted}` : formatted;
22
+ } else {
23
+ // Format: "DD:HH:MM" with manual zero-padding
24
+ const paddedDays = days < 10 ? `0${days}` : `${days}`;
25
+ const paddedHours = hours < 10 ? `0${hours}` : `${hours}`;
26
+ const paddedMinutes = minutes < 10 ? `0${minutes}` : `${minutes}`;
27
+ const formatted = `${paddedDays}:${paddedHours}:${paddedMinutes}`;
28
+ return isNegative ? `-${formatted}` : formatted;
29
+ }
30
+ };
@@ -17,6 +17,7 @@ import {
17
17
  smallerThen as sizeSmallerThen,
18
18
  } from './compareSize.ts';
19
19
  import convertDuration from './convertDuration.js';
20
+ import { convertDurationWithDays } from './convertDurationWithDays';
20
21
  import debounce from './debounce.js';
21
22
  import downloadFile from './downloadFile/downloadFile';
22
23
  import eventBus from './eventBus.js';
@@ -37,6 +38,11 @@ import {
37
38
  queryToSortAdapter,
38
39
  sortToQueryAdapter,
39
40
  } from './sortQueryAdapters.js';
41
+ import { downloadFilesAsZip } from './storageFile/downloadFilesAsZip';
42
+ import { downloadStorageFile } from './storageFile/downloadStorageFile';
43
+ import { getFileTypeIcon } from './storageFile/getFileTypeIcon';
44
+ import { getStorageFileUrl } from './storageFile/getStorageFileUrl';
45
+ import { openStorageFileInNewTab } from './storageFile/openStorageFileInNewTab';
40
46
  import updateObject from './updateObject.js';
41
47
 
42
48
  export {
@@ -44,13 +50,18 @@ export {
44
50
  camelToSnake,
45
51
  compareSize,
46
52
  convertDuration,
53
+ convertDurationWithDays,
47
54
  debounce,
48
55
  downloadFile,
56
+ downloadFilesAsZip,
57
+ downloadStorageFile,
49
58
  eventBus,
50
59
  getConnectionQuality,
51
60
  getEndOfDay,
61
+ getFileTypeIcon,
52
62
  getNextSortOrder,
53
63
  getStartOfDay,
64
+ getStorageFileUrl,
54
65
  isEmpty,
55
66
  isRelativeDatetimeValue,
56
67
  kebabToCamel,
@@ -59,6 +70,7 @@ export {
59
70
  objCamelToKebab,
60
71
  objCamelToSnake,
61
72
  objSnakeToCamel,
73
+ openStorageFileInNewTab,
62
74
  prettifyFileSize,
63
75
  prettifyTime,
64
76
  preventHiddenPageCallsDecorator,
@@ -0,0 +1,55 @@
1
+ import { saveAs } from 'file-saver-es';
2
+ import JSZip from 'jszip';
3
+
4
+ interface FileToDownload {
5
+ id: string;
6
+ name: string;
7
+ }
8
+
9
+ interface DownloadFilesAsZipParams {
10
+ filesToDownload: FileToDownload[];
11
+ apiUrl: string;
12
+ token: string;
13
+ }
14
+
15
+ export const downloadFilesAsZip = async ({
16
+ filesToDownload,
17
+ apiUrl,
18
+ token,
19
+ }: DownloadFilesAsZipParams) => {
20
+ if (!filesToDownload?.length) return;
21
+
22
+ const zip = new JSZip();
23
+
24
+ const filePromises = filesToDownload.map(async (item) => {
25
+ const { id, name } = item;
26
+ const fileUrl = `${apiUrl}/storage/file/${id}/download?access_token=${token}`;
27
+
28
+ try {
29
+ const response = await fetch(fileUrl);
30
+ if (!response.ok) throw new Error(`Failed to download ${name}`);
31
+
32
+ const blob = await response.blob();
33
+ zip.file(name, blob, {
34
+ binary: true,
35
+ });
36
+ } catch (error) {
37
+ throw new Error(`Failed to download ${name}`, {
38
+ cause: error,
39
+ });
40
+ }
41
+ });
42
+
43
+ await Promise.all(filePromises);
44
+
45
+ try {
46
+ const zipBlob = await zip.generateAsync({
47
+ type: 'blob',
48
+ });
49
+ saveAs(zipBlob, 'files.zip');
50
+ } catch (error) {
51
+ throw new Error('Failed to create ZIP file', {
52
+ cause: error,
53
+ });
54
+ }
55
+ };
@@ -0,0 +1,27 @@
1
+ import { getStorageFileUrl } from './getStorageFileUrl';
2
+
3
+ interface DownloadStorageFileParams {
4
+ id?: string;
5
+ name?: string;
6
+ type?: string;
7
+ url?: string;
8
+ }
9
+
10
+ export const downloadStorageFile = ({
11
+ id,
12
+ name,
13
+ type,
14
+ url,
15
+ }: DownloadStorageFileParams) => {
16
+ const a = document.createElement('a');
17
+
18
+ a.href =
19
+ url ||
20
+ getStorageFileUrl({
21
+ id: id as string,
22
+ type,
23
+ });
24
+ a.target = '_blank';
25
+ a.download = name ?? '';
26
+ a.click();
27
+ };
@@ -0,0 +1,6 @@
1
+ export const getFileTypeIcon = (mimeType: string): string => {
2
+ if (mimeType.includes('image')) return 'preview-tag-image';
3
+ if (mimeType.includes('video')) return 'preview-tag-video';
4
+ if (mimeType.includes('audio')) return 'preview-tag-audio';
5
+ return 'attach';
6
+ };
@@ -0,0 +1,17 @@
1
+ interface GetStorageFileUrlParams {
2
+ id: string;
3
+ type?: string;
4
+ }
5
+
6
+ export const getStorageFileUrl = ({
7
+ id,
8
+ type,
9
+ }: GetStorageFileUrlParams): string => {
10
+ const token = localStorage.getItem('access-token');
11
+ let url = `${import.meta.env.VITE_API_URL}/storage/file/${id}/download?access_token=${token}`;
12
+
13
+ const source = type?.match(/source=[^;]+/)?.[0];
14
+ if (source) url = `${url}&${source}`;
15
+
16
+ return url;
17
+ };
@@ -0,0 +1,34 @@
1
+ import { getStorageFileUrl } from './getStorageFileUrl';
2
+
3
+ interface OpenStorageFileInNewTabParams {
4
+ id?: string;
5
+ }
6
+
7
+ export const openStorageFileInNewTab = async (
8
+ item?: OpenStorageFileInNewTabParams,
9
+ ) => {
10
+ if (!item?.id) return;
11
+
12
+ // opened synchronously, before the awaits below, so browsers don't
13
+ // treat it as a blocked popup once the user-gesture context is gone
14
+ const newTab = window.open('', '_blank');
15
+
16
+ try {
17
+ const url = getStorageFileUrl({
18
+ id: item.id,
19
+ });
20
+
21
+ const response = await fetch(url);
22
+ if (!response.ok) {
23
+ throw new Error(`Failed to fetch file: ${response.statusText}`);
24
+ }
25
+
26
+ const blob = await response.blob();
27
+ const fileURL = URL.createObjectURL(blob);
28
+
29
+ if (newTab) newTab.location.href = fileURL;
30
+ } catch (error) {
31
+ newTab?.close();
32
+ console.error('Error opening file:', error);
33
+ }
34
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './displayText';
2
2
  export * from './formatDate';
3
+ export * from './prettifyDate';
@@ -0,0 +1,14 @@
1
+ import { FormatDateMode } from '../enums';
2
+ import { formatDate } from './formatDate';
3
+
4
+ export function prettifyDate(
5
+ timestamp: string | number,
6
+ timezone?: string,
7
+ ): string {
8
+ const value = Number(timestamp);
9
+ if (!value) return '';
10
+
11
+ return formatDate(new Date(value), FormatDateMode.DATETIME_SHORT, {
12
+ timezone,
13
+ });
14
+ }