@webitel/ui-sdk 26.6.84 → 26.6.85
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/{components-DRYvDFUw.js → components-BuLx9sx8.js} +4 -4
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{wt-chat-emoji-CoyN97-5.js → wt-chat-emoji-yV5DEH_U.js} +1 -1
- package/dist/{wt-datepicker-D2NUlmuX.js → wt-datepicker-slYQKBRT.js} +68 -79
- package/dist/{wt-display-chip-items-BLskmlas.js → wt-display-chip-items-Cvehy_gX.js} +1 -1
- package/dist/{wt-send-message-popup-CgFHdZeN.js → wt-send-message-popup-DbS2qd1N.js} +1 -1
- package/dist/{wt-type-extension-value-input-ChqHhqXh.js → wt-type-extension-value-input-DIa6DhuQ.js} +1 -1
- package/dist/{wt-vidstack-player-V88ZHB7B.js → wt-vidstack-player-DADeF449.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-card/wt-card.vue +1 -1
- package/src/components/wt-datepicker/_internals/composables/useRestoreOnBlur.ts +3 -19
- package/src/components/wt-datepicker/wt-datepicker.vue +1 -4
- package/src/enums/MimeTypes/MimeTypes.enum.ts +2 -0
- package/types/components/wt-datepicker/_internals/composables/useRestoreOnBlur.d.ts +2 -4
- package/types/enums/MimeTypes/MimeTypes.enum.d.ts +1 -0
|
@@ -3,10 +3,10 @@ import { d as t, f as n, l as r, r as i } from "./enums-De8CDKZ1.js";
|
|
|
3
3
|
import { a, i as o, n as s, r as c, t as l } from "./toZonedTime-B8L5kbse.js";
|
|
4
4
|
import { t as u } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { t as d } from "./useValidation-DGl2otXJ.js";
|
|
6
|
-
import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as
|
|
7
|
-
import
|
|
6
|
+
import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as ee, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, guardReactiveProps as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeProps as C, onMounted as w, onUnmounted as T, openBlock as E, renderSlot as D, resolveComponent as O, toDisplayString as k, toRefs as A, unref as j, useModel as M, useTemplateRef as N, vShow as P, withCtx as F, withDirectives as I } from "vue";
|
|
7
|
+
import L from "primevue/datepicker";
|
|
8
8
|
//#region node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js
|
|
9
|
-
function
|
|
9
|
+
function R(e, t, n) {
|
|
10
10
|
if (typeof e == "string" && !e.match(c)) return s(e, {
|
|
11
11
|
...n,
|
|
12
12
|
timeZone: t
|
|
@@ -17,7 +17,7 @@ function z(e, t, n) {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/wt-datepicker/_internals/composables/useOverlayAnchor.ts
|
|
20
|
-
function
|
|
20
|
+
function z() {
|
|
21
21
|
let e = null;
|
|
22
22
|
function t(e, t) {
|
|
23
23
|
e.style.width !== t && (e.style.width = t, e.style.minWidth = "");
|
|
@@ -45,7 +45,7 @@ function B() {
|
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/components/wt-datepicker/_internals/composables/usePreventZeroPad.ts
|
|
48
|
-
function
|
|
48
|
+
function B(e) {
|
|
49
49
|
let t = null;
|
|
50
50
|
function n(e) {
|
|
51
51
|
let n = e.target, r = n.value, i = n.selectionStart ?? 0, a = r.split("/"), o = 0;
|
|
@@ -76,46 +76,37 @@ function V(e) {
|
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/components/wt-datepicker/_internals/composables/useRestoreOnBlur.ts
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
function a() {
|
|
87
|
-
if (n()) return;
|
|
88
|
-
let e = t();
|
|
89
|
-
e && e.rawValue === null && r !== null && S(() => {
|
|
90
|
-
e.updateModel(new Date(r.getTime()));
|
|
79
|
+
function V(e, t) {
|
|
80
|
+
function n() {
|
|
81
|
+
if (t()) return;
|
|
82
|
+
let n = e();
|
|
83
|
+
n && n.rawValue === null && S(() => {
|
|
84
|
+
n.updateModel(/* @__PURE__ */ new Date());
|
|
91
85
|
});
|
|
92
86
|
}
|
|
93
|
-
return {
|
|
94
|
-
onBlur: a,
|
|
95
|
-
watchRestoreOnBlurLastValidValue: i
|
|
96
|
-
};
|
|
87
|
+
return { onBlur: n };
|
|
97
88
|
}
|
|
98
89
|
//#endregion
|
|
99
90
|
//#region src/components/wt-datepicker/wt-datepicker.vue?vue&type=script&setup=true&lang.ts
|
|
100
|
-
var
|
|
91
|
+
var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" }, W = [
|
|
101
92
|
"onMousedown",
|
|
102
93
|
"onMouseup",
|
|
103
94
|
"onMouseleave"
|
|
104
|
-
],
|
|
95
|
+
], G = [
|
|
105
96
|
"onMousedown",
|
|
106
97
|
"onMouseup",
|
|
107
98
|
"onMouseleave"
|
|
108
|
-
],
|
|
99
|
+
], K = [
|
|
109
100
|
"onMousedown",
|
|
110
101
|
"onMouseup",
|
|
111
102
|
"onMouseleave"
|
|
112
|
-
],
|
|
103
|
+
], q = [
|
|
113
104
|
"onMousedown",
|
|
114
105
|
"onMouseup",
|
|
115
106
|
"onMouseleave"
|
|
116
|
-
],
|
|
107
|
+
], J = /*#__PURE__*/ e(/* @__PURE__ */ v({
|
|
117
108
|
__name: "wt-datepicker",
|
|
118
|
-
props: /*@__PURE__*/
|
|
109
|
+
props: /*@__PURE__*/ b({
|
|
119
110
|
showTime: { type: Boolean },
|
|
120
111
|
minDate: {},
|
|
121
112
|
maxDate: {},
|
|
@@ -195,7 +186,7 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
195
186
|
modelValue: { default: null },
|
|
196
187
|
modelModifiers: {}
|
|
197
188
|
}),
|
|
198
|
-
emits: /*@__PURE__*/
|
|
189
|
+
emits: /*@__PURE__*/ b([
|
|
199
190
|
"update:modelValue",
|
|
200
191
|
"value-change",
|
|
201
192
|
"input",
|
|
@@ -211,7 +202,7 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
211
202
|
"keydown"
|
|
212
203
|
], ["update:modelValue"]),
|
|
213
204
|
setup(e, { emit: a }) {
|
|
214
|
-
let o = e, s = M(e, "modelValue"), { t: c } = u(),
|
|
205
|
+
let o = e, s = M(e, "modelValue"), { t: c } = u(), v = f({
|
|
215
206
|
get() {
|
|
216
207
|
if (!s.value) return null;
|
|
217
208
|
let e = /* @__PURE__ */ new Date(+s.value);
|
|
@@ -223,47 +214,45 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
223
214
|
s.value = null;
|
|
224
215
|
return;
|
|
225
216
|
}
|
|
226
|
-
let t = o.timezone ?
|
|
217
|
+
let t = o.timezone ? R(e, o.timezone) : e;
|
|
227
218
|
s.value = t.getTime();
|
|
228
219
|
}
|
|
229
|
-
}),
|
|
230
|
-
|
|
231
|
-
let { onBlur: T
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (o.showTime && y.value) {
|
|
235
|
-
let e = y.value;
|
|
220
|
+
}), b = N("datepicker"), w = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
|
|
221
|
+
B(() => b.value?.$el?.querySelector("input"));
|
|
222
|
+
let { onBlur: T } = V(() => b.value, () => !!o.clearable), J = f(() => o.placholder || `dd/mm/yyyy ${o.showTime ? "hh:mm" : ""}`), { lock: Y, unlock: X } = z(), Z = () => {
|
|
223
|
+
if (o.showTime && v.value) {
|
|
224
|
+
let e = v.value;
|
|
236
225
|
S(() => {
|
|
237
|
-
|
|
226
|
+
v.value = new Date(e.getTime());
|
|
238
227
|
});
|
|
239
228
|
}
|
|
240
229
|
setTimeout(() => {
|
|
241
|
-
|
|
242
|
-
let e =
|
|
243
|
-
e && (e.style.minWidth = "",
|
|
230
|
+
b.value?.alignOverlay();
|
|
231
|
+
let e = b.value?.overlay;
|
|
232
|
+
e && (e.style.minWidth = "", Y(e));
|
|
244
233
|
}, 0);
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
v:
|
|
249
|
-
customValidators:
|
|
234
|
+
}, Q = () => {
|
|
235
|
+
X();
|
|
236
|
+
}, te = f(() => o.required ? `${o.label}*` : o.label), { v: ne, customValidators: re } = A(o), { isValidation: ie, invalid: ae, validationText: $, validationTextColor: oe } = d({
|
|
237
|
+
v: ne,
|
|
238
|
+
customValidators: re
|
|
250
239
|
});
|
|
251
240
|
return (a, o) => {
|
|
252
241
|
let s = O("wt-label"), l = O("wt-button"), u = O("wt-icon-btn"), d = O("wt-message");
|
|
253
|
-
return E(),
|
|
254
|
-
|
|
242
|
+
return E(), ee("div", H, [
|
|
243
|
+
_(s, x(e.labelProps, { disabled: e.disabled }, {
|
|
255
244
|
for: w,
|
|
256
|
-
invalid: j(
|
|
245
|
+
invalid: j(ae)
|
|
257
246
|
}), {
|
|
258
|
-
default:
|
|
247
|
+
default: F(() => [D(a.$slots, "label", C(y({ label: e.label })), () => [g(k(te.value), 1)], !0)], void 0, !0),
|
|
259
248
|
_: 3
|
|
260
249
|
}, 16, ["disabled", "invalid"]),
|
|
261
|
-
|
|
250
|
+
_(j(L), {
|
|
262
251
|
ref_key: "datepicker",
|
|
263
|
-
ref:
|
|
252
|
+
ref: b,
|
|
264
253
|
id: w,
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue": o[0] ||= (e) =>
|
|
254
|
+
modelValue: v.value,
|
|
255
|
+
"onUpdate:modelValue": o[0] ||= (e) => v.value = e,
|
|
267
256
|
"date-format": "dd/mm/yy",
|
|
268
257
|
"input-class": "typo-body-1",
|
|
269
258
|
required: e.required,
|
|
@@ -271,8 +260,8 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
271
260
|
"show-time": e.showTime,
|
|
272
261
|
"min-date": e.minDate,
|
|
273
262
|
"max-date": e.maxDate,
|
|
274
|
-
placeholder:
|
|
275
|
-
"show-clear": e.clearable &&
|
|
263
|
+
placeholder: J.value,
|
|
264
|
+
"show-clear": e.clearable && v.value,
|
|
276
265
|
"show-button-bar": "",
|
|
277
266
|
fluid: "",
|
|
278
267
|
pt: {
|
|
@@ -284,70 +273,70 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
284
273
|
minute: { class: "typo-body-2" },
|
|
285
274
|
panel: { style: { maxWidth: "380px" } }
|
|
286
275
|
},
|
|
287
|
-
onShow:
|
|
288
|
-
onHide:
|
|
276
|
+
onShow: Z,
|
|
277
|
+
onHide: Q,
|
|
289
278
|
onBlur: j(T)
|
|
290
279
|
}, {
|
|
291
|
-
buttonbar:
|
|
280
|
+
buttonbar: F(({ todayCallback: i, clearCallback: a }) => [h("div", U, [_(l, {
|
|
292
281
|
color: j(n).SECONDARY,
|
|
293
282
|
variant: j(t).OUTLINED,
|
|
294
283
|
size: j(r).SM,
|
|
295
284
|
onClick: i
|
|
296
285
|
}, {
|
|
297
|
-
default:
|
|
286
|
+
default: F(() => [g(k(j(c)("reusable.today")), 1)], void 0, !0),
|
|
298
287
|
_: 1
|
|
299
288
|
}, 8, [
|
|
300
289
|
"color",
|
|
301
290
|
"variant",
|
|
302
291
|
"size",
|
|
303
292
|
"onClick"
|
|
304
|
-
]),
|
|
293
|
+
]), I(_(l, {
|
|
305
294
|
color: j(n).SECONDARY,
|
|
306
295
|
variant: j(t).OUTLINED,
|
|
307
296
|
size: j(r).SM,
|
|
308
297
|
onClick: a
|
|
309
298
|
}, {
|
|
310
|
-
default:
|
|
299
|
+
default: F(() => [g(k(j(c)("reusable.clear")), 1)], void 0, !0),
|
|
311
300
|
_: 1
|
|
312
301
|
}, 8, [
|
|
313
302
|
"color",
|
|
314
303
|
"variant",
|
|
315
304
|
"size",
|
|
316
305
|
"onClick"
|
|
317
|
-
]), [[P, e.clearable &&
|
|
318
|
-
prevbutton:
|
|
306
|
+
]), [[P, e.clearable && v.value]])])]),
|
|
307
|
+
prevbutton: F(({ actionCallback: e }) => [_(u, {
|
|
319
308
|
icon: "arrow-left",
|
|
320
309
|
onClick: e
|
|
321
310
|
}, null, 8, ["onClick"])]),
|
|
322
|
-
nextbutton:
|
|
311
|
+
nextbutton: F(({ actionCallback: e }) => [_(u, {
|
|
323
312
|
icon: "arrow-right",
|
|
324
313
|
onClick: e
|
|
325
314
|
}, null, 8, ["onClick"])]),
|
|
326
|
-
clearicon:
|
|
315
|
+
clearicon: F(({ clearCallback: e }) => [_(u, {
|
|
327
316
|
icon: "close",
|
|
328
317
|
class: "wt-datepicker__clear-icon",
|
|
329
318
|
onClick: e
|
|
330
319
|
}, null, 8, ["onClick"])]),
|
|
331
|
-
hourincrementbutton:
|
|
320
|
+
hourincrementbutton: F(({ callbacks: e }) => [h("span", {
|
|
332
321
|
onMousedown: e.mousedown,
|
|
333
322
|
onMouseup: e.mouseup,
|
|
334
323
|
onMouseleave: e.mouseleave
|
|
335
|
-
}, [
|
|
336
|
-
hourdecrementbutton:
|
|
324
|
+
}, [_(u, { icon: "arrow-up" })], 40, W)]),
|
|
325
|
+
hourdecrementbutton: F(({ callbacks: e }) => [h("span", {
|
|
337
326
|
onMousedown: e.mousedown,
|
|
338
327
|
onMouseup: e.mouseup,
|
|
339
328
|
onMouseleave: e.mouseleave
|
|
340
|
-
}, [
|
|
341
|
-
minuteincrementbutton:
|
|
329
|
+
}, [_(u, { icon: "arrow-down" })], 40, G)]),
|
|
330
|
+
minuteincrementbutton: F(({ callbacks: e }) => [h("span", {
|
|
342
331
|
onMousedown: e.mousedown,
|
|
343
332
|
onMouseup: e.mouseup,
|
|
344
333
|
onMouseleave: e.mouseleave
|
|
345
|
-
}, [
|
|
346
|
-
minutedecrementbutton:
|
|
334
|
+
}, [_(u, { icon: "arrow-up" })], 40, K)]),
|
|
335
|
+
minutedecrementbutton: F(({ callbacks: e }) => [h("span", {
|
|
347
336
|
onMousedown: e.mousedown,
|
|
348
337
|
onMouseup: e.mouseup,
|
|
349
338
|
onMouseleave: e.mouseleave
|
|
350
|
-
}, [
|
|
339
|
+
}, [_(u, { icon: "arrow-down" })], 40, q)]),
|
|
351
340
|
_: 1
|
|
352
341
|
}, 8, [
|
|
353
342
|
"modelValue",
|
|
@@ -360,13 +349,13 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
360
349
|
"show-clear",
|
|
361
350
|
"onBlur"
|
|
362
351
|
]),
|
|
363
|
-
j(
|
|
352
|
+
j(ie) && j($) ? (E(), p(d, {
|
|
364
353
|
key: 0,
|
|
365
|
-
color: j(
|
|
354
|
+
color: j(oe),
|
|
366
355
|
variant: j(i).SIMPLE,
|
|
367
356
|
size: j(r).SM
|
|
368
357
|
}, {
|
|
369
|
-
default:
|
|
358
|
+
default: F(() => [g(k(j($)), 1)], void 0, !0),
|
|
370
359
|
_: 1
|
|
371
360
|
}, 8, [
|
|
372
361
|
"color",
|
|
@@ -376,6 +365,6 @@ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" },
|
|
|
376
365
|
]);
|
|
377
366
|
};
|
|
378
367
|
}
|
|
379
|
-
}), [["__scopeId", "data-v-
|
|
368
|
+
}), [["__scopeId", "data-v-d1bf89b4"]]);
|
|
380
369
|
//#endregion
|
|
381
|
-
export {
|
|
370
|
+
export { J as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-BuLx9sx8.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, r as t } from "./clients-IxWZVjVW.js";
|
|
2
|
-
import { n } from "./components-
|
|
2
|
+
import { n } from "./components-BuLx9sx8.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.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";
|
|
5
5
|
//#endregion
|
package/dist/{wt-type-extension-value-input-ChqHhqXh.js → wt-type-extension-value-input-DIa6DhuQ.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./clients-IxWZVjVW.js";
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-BuLx9sx8.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";
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { nextTick, type WritableComputedRef, watch } from 'vue';
|
|
|
5
5
|
*
|
|
6
6
|
* https://webitel.atlassian.net/browse/WTEL-9880
|
|
7
7
|
*
|
|
8
|
-
* When the datepicker is not clearable,
|
|
8
|
+
* When the datepicker is not clearable, set current date value on blur
|
|
9
9
|
* if the user left the field empty or typed an invalid date.
|
|
10
10
|
*
|
|
11
11
|
* Since the parent model never becomes null (null writes are blocked in the
|
|
@@ -14,40 +14,24 @@ import { nextTick, type WritableComputedRef, watch } from 'vue';
|
|
|
14
14
|
* redraws the input.
|
|
15
15
|
*/
|
|
16
16
|
export function useRestoreOnBlur(
|
|
17
|
-
modelValue: WritableComputedRef<Date | null>,
|
|
18
17
|
getDatepicker: () => {
|
|
19
18
|
rawValue: Date | null;
|
|
20
19
|
updateModel: (v: Date) => void;
|
|
21
20
|
} | null,
|
|
22
21
|
isClearable: () => boolean,
|
|
23
22
|
) {
|
|
24
|
-
let lastValid: Date | null = null;
|
|
25
|
-
|
|
26
|
-
function watchRestoreOnBlurLastValidValue() {
|
|
27
|
-
watch(
|
|
28
|
-
modelValue,
|
|
29
|
-
(value) => {
|
|
30
|
-
if (value !== null) lastValid = value;
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
immediate: true,
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
23
|
function onBlur() {
|
|
39
24
|
if (isClearable()) return;
|
|
40
25
|
const datePickerEl = getDatepicker();
|
|
41
26
|
if (!datePickerEl) return;
|
|
42
|
-
if (datePickerEl.rawValue === null
|
|
27
|
+
if (datePickerEl.rawValue === null) {
|
|
43
28
|
nextTick(() => {
|
|
44
|
-
datePickerEl.updateModel(new Date(
|
|
29
|
+
datePickerEl.updateModel(new Date());
|
|
45
30
|
});
|
|
46
31
|
}
|
|
47
32
|
}
|
|
48
33
|
|
|
49
34
|
return {
|
|
50
35
|
onBlur,
|
|
51
|
-
watchRestoreOnBlurLastValidValue,
|
|
52
36
|
};
|
|
53
37
|
}
|
|
@@ -210,14 +210,11 @@ const datepickerId = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
|
|
|
210
210
|
|
|
211
211
|
usePreventZeroPad(() => datepicker.value?.$el?.querySelector('input'));
|
|
212
212
|
|
|
213
|
-
const { onBlur
|
|
214
|
-
modelValue,
|
|
213
|
+
const { onBlur } = useRestoreOnBlur(
|
|
215
214
|
() => datepicker.value,
|
|
216
215
|
() => !!props.clearable,
|
|
217
216
|
);
|
|
218
217
|
|
|
219
|
-
watchRestoreOnBlurLastValidValue();
|
|
220
|
-
|
|
221
218
|
const getPlaceholder = computed(() => {
|
|
222
219
|
return props.placholder || `dd/mm/yyyy ${props.showTime ? 'hh:mm' : ''}`;
|
|
223
220
|
});
|
|
@@ -16,6 +16,8 @@ export const MimeTypes = {
|
|
|
16
16
|
APPLICATION_MSWORD: 'application/msword',
|
|
17
17
|
APPLICATION_DOCX:
|
|
18
18
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
19
|
+
APPLICATION_XLSX:
|
|
20
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
19
21
|
} as const;
|
|
20
22
|
|
|
21
23
|
export type MimeTypes = (typeof MimeTypes)[keyof typeof MimeTypes];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type WritableComputedRef } from 'vue';
|
|
2
1
|
/**
|
|
3
2
|
* @author @HlukhovYe
|
|
4
3
|
*
|
|
5
4
|
* https://webitel.atlassian.net/browse/WTEL-9880
|
|
6
5
|
*
|
|
7
|
-
* When the datepicker is not clearable,
|
|
6
|
+
* When the datepicker is not clearable, set current date value on blur
|
|
8
7
|
* if the user left the field empty or typed an invalid date.
|
|
9
8
|
*
|
|
10
9
|
* Since the parent model never becomes null (null writes are blocked in the
|
|
@@ -12,10 +11,9 @@ import { type WritableComputedRef } from 'vue';
|
|
|
12
11
|
* call PrimeVue's internal updateModel() directly so it resyncs rawValue and
|
|
13
12
|
* redraws the input.
|
|
14
13
|
*/
|
|
15
|
-
export declare function useRestoreOnBlur(
|
|
14
|
+
export declare function useRestoreOnBlur(getDatepicker: () => {
|
|
16
15
|
rawValue: Date | null;
|
|
17
16
|
updateModel: (v: Date) => void;
|
|
18
17
|
} | null, isClearable: () => boolean): {
|
|
19
18
|
onBlur: () => void;
|
|
20
|
-
watchRestoreOnBlurLastValidValue: () => void;
|
|
21
19
|
};
|
|
@@ -12,5 +12,6 @@ export declare const MimeTypes: {
|
|
|
12
12
|
readonly APPLICATION_PDF: "application/pdf";
|
|
13
13
|
readonly APPLICATION_MSWORD: "application/msword";
|
|
14
14
|
readonly APPLICATION_DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
15
|
+
readonly APPLICATION_XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
15
16
|
};
|
|
16
17
|
export type MimeTypes = (typeof MimeTypes)[keyof typeof MimeTypes];
|