@webitel/ui-sdk 26.6.68 → 26.6.70

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.
@@ -1,4 +1,4 @@
1
- import "./components-rjTUkhKS.js";
1
+ import "./components-BGDAdIES.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-CoY-pIuZ.js";
4
4
  import { t as n } from "./wt-button-uY5Q1GAg.js";
@@ -144,7 +144,7 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
144
144
  }
145
145
  s.value = (o.timezone ? L(e, o.timezone) : e).getTime();
146
146
  }
147
- }), x = M("datepicker"), W = `datepicker-${Math.random().toString(36).slice(2, 11)}`, G = () => {
147
+ }), x = M("datepicker"), W = `datepicker-${Math.random().toString(36).slice(2, 11)}`, G = f(() => o.placholder || `dd/mm/yyyy ${o.showTime ? "hh:mm" : ""}`), K = () => {
148
148
  if (o.showTime && y.value) {
149
149
  let e = y.value;
150
150
  C(() => {
@@ -153,19 +153,21 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
153
153
  }
154
154
  setTimeout(() => {
155
155
  x.value?.alignOverlay();
156
+ let e = x.value?.overlay;
157
+ e && (e.style.minWidth = "");
156
158
  }, 0);
157
- }, K = f(() => o.required ? `${o.label}*` : o.label), { v: q, customValidators: J } = k(o), { isValidation: Y, invalid: X, validationText: Z, validationTextColor: Q } = d({
158
- v: q,
159
- customValidators: J
159
+ }, q = f(() => o.required ? `${o.label}*` : o.label), { v: J, customValidators: Y } = k(o), { isValidation: X, invalid: Z, validationText: Q, validationTextColor: $ } = d({
160
+ v: J,
161
+ customValidators: Y
160
162
  });
161
163
  return (a, o) => {
162
164
  let s = D("wt-label"), l = D("wt-button"), u = D("wt-icon-btn"), d = D("wt-message");
163
165
  return T(), h("div", R, [
164
166
  v(s, S(e.labelProps, { disabled: e.disabled }, {
165
167
  for: W,
166
- invalid: A(X)
168
+ invalid: A(Z)
167
169
  }), {
168
- default: P(() => [E(a.$slots, "label", w(b({ label: e.label })), () => [_(O(K.value), 1)], !0)], void 0, !0),
170
+ default: P(() => [E(a.$slots, "label", w(b({ label: e.label })), () => [_(O(q.value), 1)], !0)], void 0, !0),
169
171
  _: 3
170
172
  }, 16, ["disabled", "invalid"]),
171
173
  v(A(I), {
@@ -180,7 +182,7 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
180
182
  "show-time": e.showTime,
181
183
  "min-date": e.minDate,
182
184
  "max-date": e.maxDate,
183
- placeholder: e.placholder,
185
+ placeholder: G.value,
184
186
  "show-clear": e.clearable && y.value,
185
187
  "show-button-bar": "",
186
188
  fluid: "",
@@ -190,9 +192,10 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
190
192
  tableHeaderCell: { class: "typo-body-2-bold" },
191
193
  day: { class: "typo-body-2" },
192
194
  hour: { class: "typo-body-2" },
193
- minute: { class: "typo-body-2" }
195
+ minute: { class: "typo-body-2" },
196
+ panel: { style: { maxWidth: "380px" } }
194
197
  },
195
- onShow: G
198
+ onShow: K
196
199
  }, {
197
200
  buttonbar: P(({ todayCallback: i, clearCallback: a }) => [g("div", z, [v(l, {
198
201
  color: A(n).SECONDARY,
@@ -265,13 +268,13 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
265
268
  "placeholder",
266
269
  "show-clear"
267
270
  ]),
268
- A(Y) && A(Z) ? (T(), p(d, {
271
+ A(X) && A(Q) ? (T(), p(d, {
269
272
  key: 0,
270
- color: A(Q),
273
+ color: A($),
271
274
  variant: A(i).SIMPLE,
272
275
  size: A(r).SM
273
276
  }, {
274
- default: P(() => [_(O(A(Z)), 1)], void 0, !0),
277
+ default: P(() => [_(O(A(Q)), 1)], void 0, !0),
275
278
  _: 1
276
279
  }, 8, [
277
280
  "color",
@@ -281,6 +284,6 @@ var R = { class: "wt-datepicker" }, z = { class: "wt-datepicker__button-bar" },
281
284
  ]);
282
285
  };
283
286
  }
284
- }), [["__scopeId", "data-v-07d7fc7e"]]);
287
+ }), [["__scopeId", "data-v-24efc01b"]]);
285
288
  //#endregion
286
289
  export { W as default };
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-rjTUkhKS.js";
1
+ import { C as e, i as t } from "./components-BGDAdIES.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { t as r } from "./displayText-CtaxzaBz.js";
4
4
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -3,7 +3,7 @@ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-CoY-pIuZ.js";
4
4
  import { t as r } from "./wt-button-uY5Q1GAg.js";
5
5
  import { n as i, t as a } from "./useVidstackSrc-epUQZhkL.js";
6
- import { t as o } from "./wt-popover-BdwrokVy.js";
6
+ import { t as o } from "./wt-popover-ChCN6b1o.js";
7
7
  import { t as s } from "./wt-slider-BPzRTeYU.js";
8
8
  import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, openBlock as _, ref as v, renderList as y, resolveComponent as b, toDisplayString as x, toRefs as S, unref as C, watch as w, withCtx as T } from "vue";
9
9
  //#region src/components/_shared/settings-panel/components/speed-settings/speed-settings.vue?vue&type=script&setup=true&lang.ts
@@ -4,7 +4,7 @@ import { createElementBlock as t, createVNode as n, defineComponent as r, guardR
4
4
  var _ = (e, t) => {
5
5
  let n = (n) => {
6
6
  let r = n.target;
7
- if (r?.closest(".p-select-overlay, .p-multiselect-overlay")) {
7
+ if (r?.closest(".p-select-overlay, .p-multiselect-overlay, .p-datepicker-panel")) {
8
8
  let t = e.value?.outsideClickListener;
9
9
  if (!t) return;
10
10
  document.removeEventListener("click", t), document.addEventListener("click", () => {
@@ -1,4 +1,4 @@
1
- import { n as e } from "./components-rjTUkhKS.js";
1
+ import { n as e } from "./components-BGDAdIES.js";
2
2
  import { t } from "./vue-i18n-lTFLGg_9.js";
3
3
  import { n, r } from "./clients-B1AOAvEK.js";
4
4
  import { createBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,4 +1,4 @@
1
- import { a as e, o as t, r as n, s as r } from "./components-rjTUkhKS.js";
1
+ import { a as e, o as t, r as n, s as r } from "./components-BGDAdIES.js";
2
2
  import { t as i } from "./enums-CoY-pIuZ.js";
3
3
  import { t as a } from "./vue-i18n-lTFLGg_9.js";
4
4
  import { t as o } from "./clients-B1AOAvEK.js";
@@ -1,4 +1,4 @@
1
- import { w as e } from "./components-rjTUkhKS.js";
1
+ import { w as e } from "./components-BGDAdIES.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-CoY-pIuZ.js";
4
4
  import "./wt-button-uY5Q1GAg.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.6.68",
3
+ "version": "26.6.70",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -18,7 +18,7 @@
18
18
  :show-time="showTime"
19
19
  :min-date="minDate"
20
20
  :max-date="maxDate"
21
- :placeholder="placholder"
21
+ :placeholder="getPlaceholder"
22
22
  :show-clear="clearable && modelValue"
23
23
  show-button-bar
24
24
  fluid
@@ -40,6 +40,11 @@
40
40
  },
41
41
  minute: {
42
42
  class: 'typo-body-2'
43
+ },
44
+ panel: {
45
+ style: {
46
+ maxWidth: '380px',
47
+ }
43
48
  }
44
49
  }"
45
50
  @show="onPanelShow"
@@ -194,6 +199,10 @@ const datepicker = useTemplateRef<HTMLDivElement>('datepicker');
194
199
 
195
200
  const datepickerId = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
196
201
 
202
+ const getPlaceholder = computed(() => {
203
+ return props.placholder || `dd/mm/yyyy ${props.showTime ? 'hh:mm' : ''}`;
204
+ });
205
+
197
206
  // PrimeVue initializes its internal currentHour/currentMinute from new Date() when the
198
207
  // overlay opens, ignoring the model value. Re-assigning the same value forces a re-sync.
199
208
  const onPanelShow = () => {
@@ -207,6 +216,8 @@ const onPanelShow = () => {
207
216
  // align overlay, because on first render it is not aligned correctly
208
217
  setTimeout(() => {
209
218
  datepicker.value?.alignOverlay();
219
+ const panel = datepicker.value?.overlay;
220
+ if (panel) panel.style.minWidth = '';
210
221
  }, 0);
211
222
  };
212
223
 
@@ -29,7 +29,11 @@ export const usePopoverOverlayFix = (
29
29
  const onDocumentPointerdown = (event: PointerEvent) => {
30
30
  const target = event.target as Element;
31
31
 
32
- if (target?.closest('.p-select-overlay, .p-multiselect-overlay')) {
32
+ if (
33
+ target?.closest(
34
+ '.p-select-overlay, .p-multiselect-overlay, .p-datepicker-panel',
35
+ )
36
+ ) {
33
37
  const outsideClickListener = innerPopover.value?.outsideClickListener;
34
38
  if (!outsideClickListener) return;
35
39
  document.removeEventListener('click', outsideClickListener);