redmine-ui-kit 1.0.3 → 1.0.5
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/redmine-ui-kit.js +120 -122
- package/dist/redmine-ui-kit.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/redmine-ui-kit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Se, openBlock as m, createElementBlock as $, normalizeStyle as pt, createElementVNode as Y, useSlots as
|
|
1
|
+
import { defineComponent as Se, openBlock as m, createElementBlock as $, normalizeStyle as pt, createElementVNode as Y, useSlots as Zt, computed as V, normalizeClass as ve, withModifiers as Fe, Fragment as ye, createTextVNode as Ze, toDisplayString as me, renderSlot as z, withDirectives as Le, vShow as _t, unref as c, isRef as ot, vModelCheckbox as zl, createCommentVNode as D, ref as H, onMounted as et, nextTick as Rt, withKeys as de, vModelText as Ao, createBlock as pe, withCtx as ie, watchEffect as ql, watch as vt, renderList as Ne, createVNode as Ee, Transition as rt, reactive as Gt, toRef as ra, onUnmounted as bo, mergeProps as Be, createSlots as Qe, normalizeProps as Je, guardReactiveProps as yt, Teleport as Kl, resolveDynamicComponent as on, onBeforeUpdate as Xl, getCurrentScope as Ql, onScopeDispose as Zl } from "vue";
|
|
2
2
|
const Gl = /* @__PURE__ */ Y("span", null, null, -1), Jl = [
|
|
3
3
|
Gl
|
|
4
4
|
], d0 = /* @__PURE__ */ Se({
|
|
@@ -30,7 +30,7 @@ const eu = ["disabled"], tu = { class: "rm-button__label" }, nu = { class: "rm-b
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["click"],
|
|
32
32
|
setup(e) {
|
|
33
|
-
const t =
|
|
33
|
+
const t = Zt(), n = V(() => !!t.icon);
|
|
34
34
|
return (r, a) => (m(), $("button", {
|
|
35
35
|
class: ve([
|
|
36
36
|
"rm-button",
|
|
@@ -50,7 +50,7 @@ const eu = ["disabled"], tu = { class: "rm-button__label" }, nu = { class: "rm-b
|
|
|
50
50
|
Ze(me(e.label), 1)
|
|
51
51
|
], 64)) : z(r.$slots, "default", { key: 1 })
|
|
52
52
|
]),
|
|
53
|
-
|
|
53
|
+
Le(Y("div", nu, [
|
|
54
54
|
z(r.$slots, "icon")
|
|
55
55
|
], 512), [
|
|
56
56
|
[_t, c(n)]
|
|
@@ -96,7 +96,7 @@ const iu = { class: "rm-checkbox" }, lu = ["id", "name", "disabled"], uu = ["for
|
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
return (a, o) => (m(), $("div", iu, [
|
|
99
|
-
|
|
99
|
+
Le(Y("input", {
|
|
100
100
|
id: `${e.name}_checkbox`,
|
|
101
101
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => ot(r) ? r.value = i : null),
|
|
102
102
|
type: "checkbox",
|
|
@@ -275,7 +275,7 @@ const bu = ["for"], gu = { class: "rm-input-wrapper" }, wu = ["id", "maxlength",
|
|
|
275
275
|
class: "rm-input__label"
|
|
276
276
|
}, me(e.label), 9, bu)) : D("", !0),
|
|
277
277
|
Y("div", gu, [
|
|
278
|
-
e.isAutoGrow ?
|
|
278
|
+
e.isAutoGrow ? Le((m(), $("textarea", {
|
|
279
279
|
key: 0,
|
|
280
280
|
id: c(r),
|
|
281
281
|
ref_key: "textareaRef",
|
|
@@ -293,7 +293,7 @@ const bu = ["for"], gu = { class: "rm-input-wrapper" }, wu = ["id", "maxlength",
|
|
|
293
293
|
onChange: A[1] || (A[1] = ({ target: F }) => t("change", F.value))
|
|
294
294
|
}, null, 40, wu)), [
|
|
295
295
|
[Ao, c(u)]
|
|
296
|
-
]) :
|
|
296
|
+
]) : Le((m(), $("input", {
|
|
297
297
|
key: 1,
|
|
298
298
|
id: c(r),
|
|
299
299
|
"onUpdate:modelValue": A[2] || (A[2] = (F) => ot(u) ? u.value = F : null),
|
|
@@ -310,7 +310,7 @@ const bu = ["for"], gu = { class: "rm-input-wrapper" }, wu = ["id", "maxlength",
|
|
|
310
310
|
}, null, 40, Ou)), [
|
|
311
311
|
[Ao, c(u)]
|
|
312
312
|
]),
|
|
313
|
-
|
|
313
|
+
Le(Y("span", { class: "rm-input__hint" }, me(e.hint), 513), [
|
|
314
314
|
[_t, a.value]
|
|
315
315
|
])
|
|
316
316
|
])
|
|
@@ -324,7 +324,7 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
324
324
|
beforeUnmount() {
|
|
325
325
|
document.body.style.overflow = "visible", document.documentElement.style.overflow = "visible";
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, zt = "__v-click-outside", dl = typeof window < "u", Tu = typeof navigator < "u", Du = dl && ("ontouchstart" in window || Tu && navigator.maxTouchPoints > 0), xu = Du ? ["touchstart"] : ["click"], Su = (e) => {
|
|
328
328
|
if (typeof e != "function")
|
|
329
329
|
throw new Error("[v-click-outside]: Binding value must be a function");
|
|
330
330
|
return {
|
|
@@ -339,26 +339,26 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
339
339
|
events: n,
|
|
340
340
|
handler: r
|
|
341
341
|
} = Su(t);
|
|
342
|
-
e[
|
|
342
|
+
e[zt] = n.map((a) => ({
|
|
343
343
|
event: a,
|
|
344
344
|
srcTarget: document.documentElement,
|
|
345
345
|
handler: (o) => Ru({ el: e, event: o, handler: r })
|
|
346
|
-
})), e[
|
|
346
|
+
})), e[zt].forEach(
|
|
347
347
|
({ event: a, srcTarget: o, handler: i }) => setTimeout(() => {
|
|
348
|
-
e[
|
|
348
|
+
e[zt] && o.addEventListener(a, i);
|
|
349
349
|
}, 0)
|
|
350
350
|
);
|
|
351
351
|
}, yl = (e) => {
|
|
352
|
-
(e[
|
|
352
|
+
(e[zt] || []).forEach(
|
|
353
353
|
({ event: n, srcTarget: r, handler: a }) => r.removeEventListener(n, a)
|
|
354
|
-
), delete e[
|
|
354
|
+
), delete e[zt];
|
|
355
355
|
}, Mu = (e, { value: t, oldValue: n }) => {
|
|
356
356
|
JSON.stringify(t) !== JSON.stringify(n) && (yl(e), pl(e, { value: t }));
|
|
357
357
|
}, Cu = {
|
|
358
358
|
beforeMount: pl,
|
|
359
359
|
updated: Mu,
|
|
360
360
|
unmounted: yl
|
|
361
|
-
},
|
|
361
|
+
}, Jt = dl ? Cu : {}, Nu = ["onClick"], Au = { class: "rm-modal-wrapper" }, Iu = ["src"], Eu = { class: "rm-modal__content" }, v0 = /* @__PURE__ */ Se({
|
|
362
362
|
__name: "RMModal",
|
|
363
363
|
props: {
|
|
364
364
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -370,12 +370,12 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
370
370
|
function r() {
|
|
371
371
|
n.persistent || t("close");
|
|
372
372
|
}
|
|
373
|
-
return (a, o) => e.isActive ?
|
|
373
|
+
return (a, o) => e.isActive ? Le((m(), $("div", {
|
|
374
374
|
key: 0,
|
|
375
375
|
class: "rm-modal",
|
|
376
376
|
onClick: Fe(r, ["self"])
|
|
377
377
|
}, [
|
|
378
|
-
|
|
378
|
+
Y("div", Au, [
|
|
379
379
|
e.persistent ? D("", !0) : (m(), pe(mt, {
|
|
380
380
|
key: 0,
|
|
381
381
|
class: "rm-modal__close",
|
|
@@ -392,8 +392,6 @@ const ku = "data:image/svg+xml;base64,PHN2ZwogICAgd2lkdGg9IjIyIgogICAgaGVpZ2h0PS
|
|
|
392
392
|
Y("div", Eu, [
|
|
393
393
|
z(a.$slots, "default")
|
|
394
394
|
])
|
|
395
|
-
])), [
|
|
396
|
-
[c(Yt), r]
|
|
397
395
|
])
|
|
398
396
|
], 8, Nu)), [
|
|
399
397
|
[c(Pu), e.isActive]
|
|
@@ -472,7 +470,7 @@ const Bu = (e, t = 150) => {
|
|
|
472
470
|
},
|
|
473
471
|
emits: ["update:modelValue", "close", "clear", "select", "chips:remove"],
|
|
474
472
|
setup(e, { emit: t }) {
|
|
475
|
-
const n = e, r =
|
|
473
|
+
const n = e, r = Zt(), a = H(n.focused), o = H([]), i = H(""), u = H(0), f = H(), y = H(), w = V({
|
|
476
474
|
get() {
|
|
477
475
|
return n.modelValue;
|
|
478
476
|
},
|
|
@@ -514,7 +512,7 @@ const Bu = (e, t = 150) => {
|
|
|
514
512
|
const O = window.innerHeight, { bottom: B } = y.value.getBoundingClientRect();
|
|
515
513
|
O > B || (u.value = B - O + 8);
|
|
516
514
|
}
|
|
517
|
-
return (O, B) =>
|
|
515
|
+
return (O, B) => Le((m(), $("div", {
|
|
518
516
|
class: ve(["rm-select", { "rm-select--with-chips": e.useChips }])
|
|
519
517
|
}, [
|
|
520
518
|
Y("label", {
|
|
@@ -588,7 +586,7 @@ const Bu = (e, t = 150) => {
|
|
|
588
586
|
]),
|
|
589
587
|
Ee(rt, { name: "fade" }, {
|
|
590
588
|
default: ie(() => [
|
|
591
|
-
|
|
589
|
+
Le(Y("ul", {
|
|
592
590
|
ref_key: "selectOptions",
|
|
593
591
|
ref: y,
|
|
594
592
|
class: "rm-select-inner"
|
|
@@ -608,7 +606,7 @@ const Bu = (e, t = 150) => {
|
|
|
608
606
|
_: 3
|
|
609
607
|
})
|
|
610
608
|
], 2)), [
|
|
611
|
-
[c(
|
|
609
|
+
[c(Jt), () => a.value = !1]
|
|
612
610
|
]);
|
|
613
611
|
}
|
|
614
612
|
});
|
|
@@ -680,7 +678,7 @@ const as = /* @__PURE__ */ Zu(Gu, [["render", rs]]), os = {
|
|
|
680
678
|
function y() {
|
|
681
679
|
n.editByFocus && (r.value = !0);
|
|
682
680
|
}
|
|
683
|
-
return (w, d) =>
|
|
681
|
+
return (w, d) => Le((m(), $("div", {
|
|
684
682
|
class: ve(["rm-editable", { active: r.value }])
|
|
685
683
|
}, [
|
|
686
684
|
r.value ? (m(), $("div", os, [
|
|
@@ -726,7 +724,7 @@ const as = /* @__PURE__ */ Zu(Gu, [["render", rs]]), os = {
|
|
|
726
724
|
])) : D("", !0)
|
|
727
725
|
])) : D("", !0)
|
|
728
726
|
], 2)), [
|
|
729
|
-
[c(
|
|
727
|
+
[c(Jt), f]
|
|
730
728
|
]);
|
|
731
729
|
}
|
|
732
730
|
});
|
|
@@ -763,7 +761,7 @@ const ps = { render: ds }, ys = {
|
|
|
763
761
|
return (n, r) => (m(), pe(rt, { name: "slide" }, {
|
|
764
762
|
default: ie(() => [
|
|
765
763
|
e.visibility ? (m(), $("div", ys, [
|
|
766
|
-
|
|
764
|
+
Le((m(), $("div", {
|
|
767
765
|
class: ve(["rm-alert", e.status])
|
|
768
766
|
}, [
|
|
769
767
|
Y("div", ms, [
|
|
@@ -788,7 +786,7 @@ const ps = { render: ds }, ys = {
|
|
|
788
786
|
})
|
|
789
787
|
])
|
|
790
788
|
], 2)), [
|
|
791
|
-
[c(
|
|
789
|
+
[c(Jt), () => t("close")]
|
|
792
790
|
])
|
|
793
791
|
])) : D("", !0)
|
|
794
792
|
]),
|
|
@@ -811,7 +809,7 @@ const bs = {
|
|
|
811
809
|
setup(e, { emit: t }) {
|
|
812
810
|
return (n, r) => (m(), pe(rt, { name: "fade" }, {
|
|
813
811
|
default: ie(() => [
|
|
814
|
-
e.visibility ?
|
|
812
|
+
e.visibility ? Le((m(), $("div", bs, [
|
|
815
813
|
Y("h3", gs, me(e.title), 1),
|
|
816
814
|
Y("div", ws, [
|
|
817
815
|
Ee(mt, {
|
|
@@ -824,7 +822,7 @@ const bs = {
|
|
|
824
822
|
}, null, 8, ["label"])
|
|
825
823
|
])
|
|
826
824
|
])), [
|
|
827
|
-
[c(
|
|
825
|
+
[c(Jt), () => t("cancel")]
|
|
828
826
|
]) : D("", !0)
|
|
829
827
|
]),
|
|
830
828
|
_: 1
|
|
@@ -843,10 +841,10 @@ const Os = {
|
|
|
843
841
|
setup(e, { emit: t }) {
|
|
844
842
|
return (n, r) => (m(), pe(rt, { name: "slide" }, {
|
|
845
843
|
default: ie(() => [
|
|
846
|
-
e.isActive ?
|
|
844
|
+
e.isActive ? Le((m(), $("div", Os, [
|
|
847
845
|
z(n.$slots, "default")
|
|
848
846
|
])), [
|
|
849
|
-
[c(
|
|
847
|
+
[c(Jt), () => t("update:isActive", !1)]
|
|
850
848
|
]) : D("", !0)
|
|
851
849
|
]),
|
|
852
850
|
_: 3
|
|
@@ -975,7 +973,7 @@ function sn(e) {
|
|
|
975
973
|
function hl(e) {
|
|
976
974
|
return ee(1, arguments), e instanceof Date || sn(e) === "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
977
975
|
}
|
|
978
|
-
function
|
|
976
|
+
function qt(e) {
|
|
979
977
|
if (ee(1, arguments), !hl(e) && typeof e != "number")
|
|
980
978
|
return !1;
|
|
981
979
|
var t = le(e);
|
|
@@ -1909,7 +1907,7 @@ var Gs = {
|
|
|
1909
1907
|
return Gs[t];
|
|
1910
1908
|
};
|
|
1911
1909
|
const ec = Js;
|
|
1912
|
-
function
|
|
1910
|
+
function Ht(e) {
|
|
1913
1911
|
return function(t, n) {
|
|
1914
1912
|
var r = n != null && n.context ? String(n.context) : "standalone", a;
|
|
1915
1913
|
if (r === "formatting" && e.formattingValues) {
|
|
@@ -2016,26 +2014,26 @@ var tc = {
|
|
|
2016
2014
|
return r + "th";
|
|
2017
2015
|
}, uc = {
|
|
2018
2016
|
ordinalNumber: lc,
|
|
2019
|
-
era:
|
|
2017
|
+
era: Ht({
|
|
2020
2018
|
values: tc,
|
|
2021
2019
|
defaultWidth: "wide"
|
|
2022
2020
|
}),
|
|
2023
|
-
quarter:
|
|
2021
|
+
quarter: Ht({
|
|
2024
2022
|
values: nc,
|
|
2025
2023
|
defaultWidth: "wide",
|
|
2026
2024
|
argumentCallback: function(t) {
|
|
2027
2025
|
return t - 1;
|
|
2028
2026
|
}
|
|
2029
2027
|
}),
|
|
2030
|
-
month:
|
|
2028
|
+
month: Ht({
|
|
2031
2029
|
values: rc,
|
|
2032
2030
|
defaultWidth: "wide"
|
|
2033
2031
|
}),
|
|
2034
|
-
day:
|
|
2032
|
+
day: Ht({
|
|
2035
2033
|
values: ac,
|
|
2036
2034
|
defaultWidth: "wide"
|
|
2037
2035
|
}),
|
|
2038
|
-
dayPeriod:
|
|
2036
|
+
dayPeriod: Ht({
|
|
2039
2037
|
values: oc,
|
|
2040
2038
|
defaultWidth: "wide",
|
|
2041
2039
|
formattingValues: ic,
|
|
@@ -2043,7 +2041,7 @@ var tc = {
|
|
|
2043
2041
|
})
|
|
2044
2042
|
};
|
|
2045
2043
|
const sc = uc;
|
|
2046
|
-
function
|
|
2044
|
+
function Ft(e) {
|
|
2047
2045
|
return function(t) {
|
|
2048
2046
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = t.match(a);
|
|
2049
2047
|
if (!o)
|
|
@@ -2137,13 +2135,13 @@ var pc = /^(\d+)(th|st|nd|rd)?/i, yc = /\d+/i, mc = {
|
|
|
2137
2135
|
return parseInt(t, 10);
|
|
2138
2136
|
}
|
|
2139
2137
|
}),
|
|
2140
|
-
era:
|
|
2138
|
+
era: Ft({
|
|
2141
2139
|
matchPatterns: mc,
|
|
2142
2140
|
defaultMatchWidth: "wide",
|
|
2143
2141
|
parsePatterns: vc,
|
|
2144
2142
|
defaultParseWidth: "any"
|
|
2145
2143
|
}),
|
|
2146
|
-
quarter:
|
|
2144
|
+
quarter: Ft({
|
|
2147
2145
|
matchPatterns: hc,
|
|
2148
2146
|
defaultMatchWidth: "wide",
|
|
2149
2147
|
parsePatterns: _c,
|
|
@@ -2152,19 +2150,19 @@ var pc = /^(\d+)(th|st|nd|rd)?/i, yc = /\d+/i, mc = {
|
|
|
2152
2150
|
return t + 1;
|
|
2153
2151
|
}
|
|
2154
2152
|
}),
|
|
2155
|
-
month:
|
|
2153
|
+
month: Ft({
|
|
2156
2154
|
matchPatterns: bc,
|
|
2157
2155
|
defaultMatchWidth: "wide",
|
|
2158
2156
|
parsePatterns: gc,
|
|
2159
2157
|
defaultParseWidth: "any"
|
|
2160
2158
|
}),
|
|
2161
|
-
day:
|
|
2159
|
+
day: Ft({
|
|
2162
2160
|
matchPatterns: wc,
|
|
2163
2161
|
defaultMatchWidth: "wide",
|
|
2164
2162
|
parsePatterns: Oc,
|
|
2165
2163
|
defaultParseWidth: "any"
|
|
2166
2164
|
}),
|
|
2167
|
-
dayPeriod:
|
|
2165
|
+
dayPeriod: Ft({
|
|
2168
2166
|
matchPatterns: $c,
|
|
2169
2167
|
defaultMatchWidth: "any",
|
|
2170
2168
|
parsePatterns: kc,
|
|
@@ -2186,7 +2184,7 @@ var Dc = {
|
|
|
2186
2184
|
};
|
|
2187
2185
|
const Pl = Dc;
|
|
2188
2186
|
var xc = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Sc = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Rc = /^'([^]*?)'?$/, Mc = /''/g, Cc = /[a-zA-Z]/;
|
|
2189
|
-
function
|
|
2187
|
+
function Kt(e, t, n) {
|
|
2190
2188
|
var r, a, o, i, u, f, y, w, d, s, g, k, A, F, q, K, O, B;
|
|
2191
2189
|
ee(2, arguments);
|
|
2192
2190
|
var X = String(t), P = gt(), T = (r = (a = n == null ? void 0 : n.locale) !== null && a !== void 0 ? a : P.locale) !== null && r !== void 0 ? r : Pl, M = ae((o = (i = (u = (f = n == null ? void 0 : n.firstWeekContainsDate) !== null && f !== void 0 ? f : n == null || (y = n.locale) === null || y === void 0 || (w = y.options) === null || w === void 0 ? void 0 : w.firstWeekContainsDate) !== null && u !== void 0 ? u : P.firstWeekContainsDate) !== null && i !== void 0 ? i : (d = P.locale) === null || d === void 0 || (s = d.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
|
|
@@ -2200,7 +2198,7 @@ function Xt(e, t, n) {
|
|
|
2200
2198
|
if (!T.formatLong)
|
|
2201
2199
|
throw new RangeError("locale must contain formatLong property");
|
|
2202
2200
|
var Q = le(e);
|
|
2203
|
-
if (!
|
|
2201
|
+
if (!qt(Q))
|
|
2204
2202
|
throw new RangeError("Invalid time value");
|
|
2205
2203
|
var L = Xn(Q), Z = _l(Q, L), oe = {
|
|
2206
2204
|
firstWeekContainsDate: M,
|
|
@@ -6432,13 +6430,13 @@ function mm(e, t) {
|
|
|
6432
6430
|
var n = e.match(cm);
|
|
6433
6431
|
if (!n)
|
|
6434
6432
|
return new Date(NaN);
|
|
6435
|
-
var r = !!n[4], a =
|
|
6433
|
+
var r = !!n[4], a = Wt(n[1]), o = Wt(n[2]) - 1, i = Wt(n[3]), u = Wt(n[4]), f = Wt(n[5]) - 1;
|
|
6436
6434
|
if (r)
|
|
6437
6435
|
return Om(t, u, f) ? _m(t, u, f) : new Date(NaN);
|
|
6438
6436
|
var y = new Date(0);
|
|
6439
6437
|
return !gm(t, o, i) || !wm(t, a) ? new Date(NaN) : (y.setUTCFullYear(t, o, Math.max(a, i)), y);
|
|
6440
6438
|
}
|
|
6441
|
-
function
|
|
6439
|
+
function Wt(e) {
|
|
6442
6440
|
return e ? parseInt(e) : 1;
|
|
6443
6441
|
}
|
|
6444
6442
|
function vm(e) {
|
|
@@ -6485,7 +6483,7 @@ function $m(e, t, n) {
|
|
|
6485
6483
|
function km(e, t) {
|
|
6486
6484
|
return t >= 0 && t <= 59;
|
|
6487
6485
|
}
|
|
6488
|
-
function
|
|
6486
|
+
function Xt(e, t) {
|
|
6489
6487
|
ee(2, arguments);
|
|
6490
6488
|
var n = le(e), r = ae(t), a = n.getFullYear(), o = n.getDate(), i = new Date(0);
|
|
6491
6489
|
i.setFullYear(a, r, 15), i.setHours(0, 0, 0, 0);
|
|
@@ -6503,7 +6501,7 @@ function ze(e, t) {
|
|
|
6503
6501
|
if (ee(2, arguments), jn(t) !== "object" || t === null)
|
|
6504
6502
|
throw new RangeError("values parameter must be an object");
|
|
6505
6503
|
var n = le(e);
|
|
6506
|
-
return isNaN(n.getTime()) ? new Date(NaN) : (t.year != null && n.setFullYear(t.year), t.month != null && (n =
|
|
6504
|
+
return isNaN(n.getTime()) ? new Date(NaN) : (t.year != null && n.setFullYear(t.year), t.month != null && (n = Xt(n, t.month)), t.date != null && n.setDate(ae(t.date)), t.hours != null && n.setHours(ae(t.hours)), t.minutes != null && n.setMinutes(ae(t.minutes)), t.seconds != null && n.setSeconds(ae(t.seconds)), t.milliseconds != null && n.setMilliseconds(ae(t.milliseconds)), n);
|
|
6507
6505
|
}
|
|
6508
6506
|
function Al(e, t) {
|
|
6509
6507
|
ee(2, arguments);
|
|
@@ -6656,7 +6654,7 @@ function pv(e, t) {
|
|
|
6656
6654
|
}
|
|
6657
6655
|
const Ul = /* @__PURE__ */ Mt(sv, [["render", pv]]), Gi = (e, t) => {
|
|
6658
6656
|
const n = vo(e, t.slice(0, e.length), new Date());
|
|
6659
|
-
return
|
|
6657
|
+
return qt(n) && hl(n) ? n : null;
|
|
6660
6658
|
}, yv = (e, t) => {
|
|
6661
6659
|
if (typeof t == "string")
|
|
6662
6660
|
return Gi(e, t);
|
|
@@ -6688,17 +6686,17 @@ const Ul = /* @__PURE__ */ Mt(sv, [["render", pv]]), Gi = (e, t) => {
|
|
|
6688
6686
|
}, nt = (e, t, n, r) => {
|
|
6689
6687
|
let a = e ? N(e) : N();
|
|
6690
6688
|
return (t || t === 0) && (a = Al(a, +t)), (n || n === 0) && (a = Il(a, +n)), (r || r === 0) && (a = El(a, +r)), So(a, 0);
|
|
6691
|
-
}, He = (e, t) => !e || !t ? !1 : ko(st(e), st(t)), xe = (e, t) => !e || !t ? !1 : Tl(st(e), st(t)), Ke = (e, t) => !e || !t ? !1 : $o(st(e), st(t)), Ll = (e, t, n) => e && e[0] && e[1] ? Ke(n, e[0]) && He(n, e[1]) : e && e[0] && t ? Ke(n, e[0]) && He(n, t) || He(n, e[0]) && Ke(n, t) : !1,
|
|
6689
|
+
}, He = (e, t) => !e || !t ? !1 : ko(st(e), st(t)), xe = (e, t) => !e || !t ? !1 : Tl(st(e), st(t)), Ke = (e, t) => !e || !t ? !1 : $o(st(e), st(t)), Ll = (e, t, n) => e && e[0] && e[1] ? Ke(n, e[0]) && He(n, e[1]) : e && e[0] && t ? Ke(n, e[0]) && He(n, t) || He(n, e[0]) && Ke(n, t) : !1, jt = Gt({
|
|
6692
6690
|
menuFocused: !1,
|
|
6693
6691
|
shiftKeyInMenu: !1
|
|
6694
6692
|
}), Vl = () => {
|
|
6695
6693
|
const e = (n) => {
|
|
6696
|
-
|
|
6694
|
+
jt.menuFocused = n;
|
|
6697
6695
|
}, t = (n) => {
|
|
6698
|
-
|
|
6696
|
+
jt.shiftKeyInMenu !== n && (jt.shiftKeyInMenu = n);
|
|
6699
6697
|
};
|
|
6700
6698
|
return {
|
|
6701
|
-
control: V(() => ({ shiftKeyInMenu:
|
|
6699
|
+
control: V(() => ({ shiftKeyInMenu: jt.shiftKeyInMenu, menuFocused: jt.menuFocused })),
|
|
6702
6700
|
setMenuFocused: e,
|
|
6703
6701
|
setShiftKey: t
|
|
6704
6702
|
};
|
|
@@ -7126,7 +7124,7 @@ const Vv = (e, t = 3) => {
|
|
|
7126
7124
|
text: n.format(r),
|
|
7127
7125
|
value: a
|
|
7128
7126
|
}));
|
|
7129
|
-
}, jv = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e],
|
|
7127
|
+
}, jv = (e) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e], Ue = (e) => {
|
|
7130
7128
|
const t = c(e);
|
|
7131
7129
|
return t != null && t.$el ? t == null ? void 0 : t.$el : t;
|
|
7132
7130
|
}, zv = (e) => Object.assign({ type: "dot" }, e), Wl = (e) => Array.isArray(e) ? !!e[0] && !!e[1] : !1, Ar = {
|
|
@@ -7192,7 +7190,7 @@ const Vv = (e, t = 3) => {
|
|
|
7192
7190
|
if (typeof e.format == "function")
|
|
7193
7191
|
return e.format(l);
|
|
7194
7192
|
const x = v || o(), S = e.formatLocale ? { locale: e.formatLocale } : void 0;
|
|
7195
|
-
return Array.isArray(l) ? `${
|
|
7193
|
+
return Array.isArray(l) ? `${Kt(l[0], x, S)} ${e.modelAuto && !l[1] ? "" : n.value.textInputOptions.rangeSeparator || "-"} ${l[1] ? Kt(l[1], x, S) : ""}` : Kt(l, x, S);
|
|
7196
7194
|
}, u = (l) => e.timezone ? Uv(l, e.timezone) : l, f = (l) => e.timezone ? Lv(l, e.timezone) : l, y = V(() => (l) => {
|
|
7197
7195
|
var v;
|
|
7198
7196
|
return (v = e.hideNavigation) == null ? void 0 : v.includes(l);
|
|
@@ -7206,12 +7204,12 @@ const Vv = (e, t = 3) => {
|
|
|
7206
7204
|
seconds: Bt(N())
|
|
7207
7205
|
};
|
|
7208
7206
|
return Object.assign(v, l);
|
|
7209
|
-
}, s = () => e.range ? e.startTime && Array.isArray(e.startTime) ? [d(e.startTime[0]), d(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? d(e.startTime) : null, g = (l) => !w(l), k = (l) => Array.isArray(l) ?
|
|
7207
|
+
}, s = () => e.range ? e.startTime && Array.isArray(e.startTime) ? [d(e.startTime[0]), d(e.startTime[1])] : null : e.startTime && !Array.isArray(e.startTime) ? d(e.startTime) : null, g = (l) => !w(l), k = (l) => Array.isArray(l) ? qt(l[0]) && (l[1] ? qt(l[1]) : !0) : l ? qt(l) : !1, A = (l) => l instanceof Date ? l : sm(l), F = (l) => {
|
|
7210
7208
|
const v = aa(u(l), { weekStartsOn: +e.weekStart }), x = Rs(u(l), { weekStartsOn: +e.weekStart });
|
|
7211
7209
|
return [v, x];
|
|
7212
7210
|
}, q = (l, v) => Array.isArray(v) ? v.some((x) => xe(u(N(x)), u(l))) : v(l), K = (l, v, x) => {
|
|
7213
7211
|
let S = l ? N(l) : N();
|
|
7214
|
-
return (v || v === 0) && (S =
|
|
7212
|
+
return (v || v === 0) && (S = Xt(S, v)), x && (S = xt(S, x)), S;
|
|
7215
7213
|
}, O = (l) => ze(N(), { hours: ft(l), minutes: dt(l), seconds: Bt(l) }), B = (l) => ze(N(), {
|
|
7216
7214
|
hours: +l.hours || 0,
|
|
7217
7215
|
minutes: +l.minutes || 0,
|
|
@@ -7296,7 +7294,7 @@ const Vv = (e, t = 3) => {
|
|
|
7296
7294
|
defaults: n,
|
|
7297
7295
|
hideNavigationButtons: y
|
|
7298
7296
|
};
|
|
7299
|
-
}, ke =
|
|
7297
|
+
}, ke = Gt({
|
|
7300
7298
|
monthYear: [],
|
|
7301
7299
|
calendar: [],
|
|
7302
7300
|
time: [],
|
|
@@ -7307,7 +7305,7 @@ const Vv = (e, t = 3) => {
|
|
|
7307
7305
|
1: []
|
|
7308
7306
|
},
|
|
7309
7307
|
monthPicker: []
|
|
7310
|
-
}), Zr = H(null), an = H(!1), Gr = H(!1), Jr = H(!1), ea = H(!1), je = H(0),
|
|
7308
|
+
}), Zr = H(null), an = H(!1), Gr = H(!1), Jr = H(!1), ea = H(!1), je = H(0), Ye = H(0), wt = () => {
|
|
7311
7309
|
const e = V(() => an.value ? [...ke.selectionGrid, ke.actionRow].filter((d) => d.length) : Gr.value ? [
|
|
7312
7310
|
...ke.timePicker[0],
|
|
7313
7311
|
...ke.timePicker[1],
|
|
@@ -7316,12 +7314,12 @@ const Vv = (e, t = 3) => {
|
|
|
7316
7314
|
].filter((d) => d.length) : Jr.value ? [...ke.monthPicker, ke.actionRow] : [ke.monthYear, ...ke.calendar, ke.time, ke.actionRow].filter((d) => d.length)), t = (d) => {
|
|
7317
7315
|
je.value = d ? je.value + 1 : je.value - 1;
|
|
7318
7316
|
let s = null;
|
|
7319
|
-
e.value[
|
|
7317
|
+
e.value[Ye.value] && (s = e.value[Ye.value][je.value]), s || (je.value = d ? je.value - 1 : je.value + 1);
|
|
7320
7318
|
}, n = (d) => {
|
|
7321
|
-
|
|
7319
|
+
Ye.value === 0 && !d || Ye.value === e.value.length && d || (Ye.value = d ? Ye.value + 1 : Ye.value - 1, e.value[Ye.value] ? e.value[Ye.value] && !e.value[Ye.value][je.value] && je.value !== 0 && (je.value = e.value[Ye.value].length - 1) : Ye.value = d ? Ye.value - 1 : Ye.value + 1);
|
|
7322
7320
|
}, r = (d) => {
|
|
7323
7321
|
let s = null;
|
|
7324
|
-
e.value[
|
|
7322
|
+
e.value[Ye.value] && (s = e.value[Ye.value][je.value]), s ? s.focus({ preventScroll: !an.value }) : je.value = d ? je.value - 1 : je.value + 1;
|
|
7325
7323
|
}, a = () => {
|
|
7326
7324
|
t(!0), r(!0);
|
|
7327
7325
|
}, o = () => {
|
|
@@ -7335,7 +7333,7 @@ const Vv = (e, t = 3) => {
|
|
|
7335
7333
|
}, y = (d, s) => {
|
|
7336
7334
|
ke[s] = d;
|
|
7337
7335
|
}, w = () => {
|
|
7338
|
-
je.value = 0,
|
|
7336
|
+
je.value = 0, Ye.value = 0;
|
|
7339
7337
|
};
|
|
7340
7338
|
return {
|
|
7341
7339
|
buildMatrix: f,
|
|
@@ -7382,7 +7380,7 @@ const Vv = (e, t = 3) => {
|
|
|
7382
7380
|
vt(s, () => {
|
|
7383
7381
|
e.multiCalendars || X();
|
|
7384
7382
|
});
|
|
7385
|
-
const k = H([{ month: Pe(N()), year: Te(N()) }]), A =
|
|
7383
|
+
const k = H([{ month: Pe(N()), year: Te(N()) }]), A = Gt({
|
|
7386
7384
|
hours: e.range ? [ft(N()), ft(N())] : ft(N()),
|
|
7387
7385
|
minutes: e.range ? [dt(N()), dt(N())] : dt(N()),
|
|
7388
7386
|
seconds: e.range ? [0, 0] : 0
|
|
@@ -7397,7 +7395,7 @@ const Vv = (e, t = 3) => {
|
|
|
7397
7395
|
A[p] = C;
|
|
7398
7396
|
};
|
|
7399
7397
|
et(() => {
|
|
7400
|
-
s.value || (e.startDate && (O(0, Pe(N(e.startDate)), Te(N(e.startDate))), d.value.multiCalendars &&
|
|
7398
|
+
s.value || (e.startDate && (O(0, Pe(N(e.startDate)), Te(N(e.startDate))), d.value.multiCalendars && Ut(0)), d.value.startTime && b()), X(!0);
|
|
7401
7399
|
});
|
|
7402
7400
|
const X = (p = !1) => {
|
|
7403
7401
|
if (s.value)
|
|
@@ -7526,7 +7524,7 @@ const Vv = (e, t = 3) => {
|
|
|
7526
7524
|
);
|
|
7527
7525
|
}, be = () => {
|
|
7528
7526
|
g.value.length && (g.value[0] && !g.value[1] ? $e(0) : ($e(0), $e(1), n()), s.value = g.value.slice(), g.value[0] && g.value[1] && e.autoApply && t("auto-apply"), g.value[0] && !g.value[1] && e.modelAuto && e.autoApply && t("auto-apply"));
|
|
7529
|
-
},
|
|
7527
|
+
}, Yt = (p, C = !1) => {
|
|
7530
7528
|
if (!(i(p.value) || !p.current && e.hideOffsetDates)) {
|
|
7531
7529
|
if (e.weekPicker)
|
|
7532
7530
|
return De(p);
|
|
@@ -7537,7 +7535,7 @@ const Vv = (e, t = 3) => {
|
|
|
7537
7535
|
}, ct = (p) => {
|
|
7538
7536
|
const C = p.find((te) => te.current);
|
|
7539
7537
|
return C ? Yc(C.value) : "";
|
|
7540
|
-
},
|
|
7538
|
+
}, Ut = (p) => {
|
|
7541
7539
|
for (let C = p - 1; C >= 0; C--) {
|
|
7542
7540
|
const te = It(ze(N(), { month: F.value(C + 1), year: q.value(C + 1) }), 1);
|
|
7543
7541
|
O(C, Pe(te), Te(te));
|
|
@@ -7546,9 +7544,9 @@ const Vv = (e, t = 3) => {
|
|
|
7546
7544
|
const te = ut(ze(N(), { month: F.value(C - 1), year: q.value(C - 1) }), 1);
|
|
7547
7545
|
O(C, Pe(te), Te(te));
|
|
7548
7546
|
}
|
|
7549
|
-
}, $t = (p) => y(N(), F.value(p), q.value(p)),
|
|
7547
|
+
}, $t = (p) => y(N(), F.value(p), q.value(p)), Lt = (p) => nt(p, A.hours, A.minutes, E()), Br = (p, C) => {
|
|
7550
7548
|
const te = e.monthPicker ? F.value(p) !== C.month || !C.fromNav : q.value(p) !== C.year;
|
|
7551
|
-
if (O(p, C.month, C.year), d.value.multiCalendars && !e.multiCalendarsSolo &&
|
|
7549
|
+
if (O(p, C.month, C.year), d.value.multiCalendars && !e.multiCalendarsSolo && Ut(p), e.monthPicker || e.yearPicker)
|
|
7552
7550
|
if (e.range) {
|
|
7553
7551
|
if (te) {
|
|
7554
7552
|
let ne = s.value ? s.value.slice() : [];
|
|
@@ -7566,9 +7564,9 @@ const Vv = (e, t = 3) => {
|
|
|
7566
7564
|
n();
|
|
7567
7565
|
}, en = (p, C) => {
|
|
7568
7566
|
const te = ze(N(), { month: F.value(C), year: q.value(C) }), ne = p < 0 ? ut(te, 1) : It(te, 1);
|
|
7569
|
-
w(Pe(ne), Te(ne), p < 0, e.preventMinMaxNavigation) && (O(C, Pe(ne), Te(ne)), d.value.multiCalendars && !e.multiCalendarsSolo &&
|
|
7570
|
-
},
|
|
7571
|
-
sl(p) && sl(s.value) && Pt(A.hours) && Pt(A.minutes) ? (p[0] && s.value[0] && (s.value[0] = nt(p[0], A.hours[0], A.minutes[0], E())), p[1] && s.value[1] && (s.value[1] = nt(p[1], A.hours[1], A.minutes[1], E(!1)))) : e.multiDates && Array.isArray(s.value) ? s.value[s.value.length - 1] =
|
|
7567
|
+
w(Pe(ne), Te(ne), p < 0, e.preventMinMaxNavigation) && (O(C, Pe(ne), Te(ne)), d.value.multiCalendars && !e.multiCalendarsSolo && Ut(C), t("update-month-year", { instance: C, month: Pe(ne), year: Te(ne) }), r());
|
|
7568
|
+
}, Vt = (p) => {
|
|
7569
|
+
sl(p) && sl(s.value) && Pt(A.hours) && Pt(A.minutes) ? (p[0] && s.value[0] && (s.value[0] = nt(p[0], A.hours[0], A.minutes[0], E())), p[1] && s.value[1] && (s.value[1] = nt(p[1], A.hours[1], A.minutes[1], E(!1)))) : e.multiDates && Array.isArray(s.value) ? s.value[s.value.length - 1] = Lt(p) : !e.range && !cl(p) && (s.value = Lt(p)), t("time-update");
|
|
7572
7570
|
}, Ur = (p, C = !0, te = !1) => {
|
|
7573
7571
|
const ne = C ? p : A.hours, Oe = !C && !te ? p : A.minutes, at = te ? p : A.seconds;
|
|
7574
7572
|
if (e.range && cl(s.value) && Pt(ne) && Pt(Oe) && Pt(at) && !e.disableTimeRangeValidation) {
|
|
@@ -7579,11 +7577,11 @@ const Vv = (e, t = 3) => {
|
|
|
7579
7577
|
if (B("hours", ne), B("minutes", Oe), B("seconds", at), s.value)
|
|
7580
7578
|
if (e.multiDates) {
|
|
7581
7579
|
const kt = W();
|
|
7582
|
-
kt &&
|
|
7580
|
+
kt && Vt(kt);
|
|
7583
7581
|
} else
|
|
7584
|
-
|
|
7582
|
+
Vt(s.value);
|
|
7585
7583
|
else
|
|
7586
|
-
e.timePicker &&
|
|
7584
|
+
e.timePicker && Vt(e.range ? [N(), N()] : N());
|
|
7587
7585
|
n();
|
|
7588
7586
|
}, Lr = (p, C) => {
|
|
7589
7587
|
e.monthChangeOnScroll && en(e.monthChangeOnScroll !== "inverse" ? -p.deltaY : p.deltaY, C);
|
|
@@ -7602,7 +7600,7 @@ const Vv = (e, t = 3) => {
|
|
|
7602
7600
|
isDisabled: i,
|
|
7603
7601
|
updateTime: Ur,
|
|
7604
7602
|
getWeekNum: ct,
|
|
7605
|
-
selectDate:
|
|
7603
|
+
selectDate: Yt,
|
|
7606
7604
|
updateMonthYear: Br,
|
|
7607
7605
|
handleScroll: Lr,
|
|
7608
7606
|
getMarker: (p) => e.markers.find((C) => xe(u(p.value), u(C.date))),
|
|
@@ -7672,12 +7670,12 @@ const Vv = (e, t = 3) => {
|
|
|
7672
7670
|
var h;
|
|
7673
7671
|
const J = (ce) => {
|
|
7674
7672
|
var _;
|
|
7675
|
-
return
|
|
7673
|
+
return Kt(ce, (_ = s.value.textInputOptions) == null ? void 0 : _.format);
|
|
7676
7674
|
};
|
|
7677
7675
|
return `${J(r.value[0])} ${(h = s.value.textInputOptions) == null ? void 0 : h.rangeSeparator} ${r.value[1] ? J(r.value[1]) : ""}`;
|
|
7678
7676
|
}, E = () => {
|
|
7679
7677
|
var h;
|
|
7680
|
-
return n.value && r.value ? Array.isArray(r.value) ? oe() :
|
|
7678
|
+
return n.value && r.value ? Array.isArray(r.value) ? oe() : Kt(r.value, (h = s.value.textInputOptions) == null ? void 0 : h.format) : i(r.value);
|
|
7681
7679
|
}, b = () => {
|
|
7682
7680
|
var h;
|
|
7683
7681
|
return r.value ? t.multiDates ? r.value.map((J) => i(J)).join("; ") : t.textInput && typeof ((h = s.value.textInputOptions) == null ? void 0 : h.format) == "string" ? E() : i(r.value) : "";
|
|
@@ -7756,7 +7754,7 @@ const nh = (e, t, n, r) => {
|
|
|
7756
7754
|
const { width: M, height: j } = T.getBoundingClientRect(), { top: Q, left: L } = r.altPosition ? f(T) : u(T);
|
|
7757
7755
|
return { top: Q, left: L, width: M, height: j };
|
|
7758
7756
|
}, g = () => {
|
|
7759
|
-
const T =
|
|
7757
|
+
const T = Ue(t);
|
|
7760
7758
|
if (T) {
|
|
7761
7759
|
const { top: M, left: j, width: Q, height: L } = s(T);
|
|
7762
7760
|
a.value.top = `${M + L / 2}px`, a.value.transform = "translateY(-50%)", d(j, Q, !0);
|
|
@@ -7764,7 +7762,7 @@ const nh = (e, t, n, r) => {
|
|
|
7764
7762
|
}, k = () => {
|
|
7765
7763
|
a.value.left = "50%", a.value.top = "50%", a.value.transform = "translate(-50%, -50%)", a.value.position = "fixed";
|
|
7766
7764
|
}, A = () => {
|
|
7767
|
-
const T =
|
|
7765
|
+
const T = Ue(t);
|
|
7768
7766
|
a.value = r.altPosition(T);
|
|
7769
7767
|
}, F = (T = !0) => {
|
|
7770
7768
|
if (!r.inline)
|
|
@@ -7794,7 +7792,7 @@ const nh = (e, t, n, r) => {
|
|
|
7794
7792
|
const { height: j } = M.getBoundingClientRect(), { top: Q, height: L } = T.getBoundingClientRect(), Z = window.innerHeight - Q - L, oe = Q;
|
|
7795
7793
|
return j <= Z ? K(T, M) : j > Z && j <= oe ? O(T, M) : Z >= oe ? K(T, M) : O(T, M);
|
|
7796
7794
|
}, P = () => {
|
|
7797
|
-
const T =
|
|
7795
|
+
const T = Ue(t), M = Ue(e);
|
|
7798
7796
|
if (T && M)
|
|
7799
7797
|
return r.autoPosition ? X(T, M) : K(T, M);
|
|
7800
7798
|
};
|
|
@@ -8143,7 +8141,7 @@ const nh = (e, t, n, r) => {
|
|
|
8143
8141
|
setup(e, { emit: t }) {
|
|
8144
8142
|
const n = e, { formatDate: r, isValidTime: a, defaults: o } = tt(n), { buildMatrix: i } = wt(), u = H(null), f = H(null);
|
|
8145
8143
|
et(() => {
|
|
8146
|
-
n.arrowNavigation && i([
|
|
8144
|
+
n.arrowNavigation && i([Ue(u), Ue(f)], "actionRow");
|
|
8147
8145
|
});
|
|
8148
8146
|
const y = V(() => n.range && !n.partialRange && n.internalModelValue ? n.internalModelValue.length === 2 : !0), w = V(() => !s.value || !g.value || !y.value), d = V(() => ({
|
|
8149
8147
|
dp__action: !0,
|
|
@@ -8282,7 +8280,7 @@ const nh = (e, t, n, r) => {
|
|
|
8282
8280
|
})), X = V(() => (b) => r.hideOffsetDates ? b.current : !0), P = V(() => r.specificMode ? { height: `${r.modeHeight}px` } : void 0), T = (b, W, l) => {
|
|
8283
8281
|
var v, x;
|
|
8284
8282
|
if (n("set-hover-date", b), (x = (v = b.marker) == null ? void 0 : v.tooltip) != null && x.length) {
|
|
8285
|
-
const S =
|
|
8283
|
+
const S = Ue(y.value[W][l]);
|
|
8286
8284
|
if (S) {
|
|
8287
8285
|
const { width: U, height: h } = S.getBoundingClientRect();
|
|
8288
8286
|
f.value = {
|
|
@@ -8476,7 +8474,7 @@ const nh = (e, t, n, r) => {
|
|
|
8476
8474
|
], 2)
|
|
8477
8475
|
], 40, Ph));
|
|
8478
8476
|
}
|
|
8479
|
-
}), Th = ["onKeydown"], Dh = { class: "dp__selection_grid_header" }, xh = ["aria-selected", "aria-disabled", "data-test", "onClick", "onKeydown", "onMouseover"], Sh = ["aria-label", "onKeydown"],
|
|
8477
|
+
}), Th = ["onKeydown"], Dh = { class: "dp__selection_grid_header" }, xh = ["aria-selected", "aria-disabled", "data-test", "onClick", "onKeydown", "onMouseover"], Sh = ["aria-label", "onKeydown"], Qt = /* @__PURE__ */ Se({
|
|
8480
8478
|
__name: "SelectionGrid",
|
|
8481
8479
|
props: {
|
|
8482
8480
|
items: { type: Array, default: () => [] },
|
|
@@ -8511,7 +8509,7 @@ const nh = (e, t, n, r) => {
|
|
|
8511
8509
|
var b;
|
|
8512
8510
|
r.arrowNavigation && ((b = r.headerRefs) != null && b.length ? i(E) : a(E));
|
|
8513
8511
|
}, A = () => {
|
|
8514
|
-
const E =
|
|
8512
|
+
const E = Ue(w);
|
|
8515
8513
|
E && (r.textInput || E.focus({ preventScroll: !0 }), f.value = E.clientHeight < E.scrollHeight);
|
|
8516
8514
|
}, F = V(
|
|
8517
8515
|
() => ({
|
|
@@ -8525,7 +8523,7 @@ const nh = (e, t, n, r) => {
|
|
|
8525
8523
|
(U) => xe(
|
|
8526
8524
|
U,
|
|
8527
8525
|
xt(
|
|
8528
|
-
r.monthPicker ?
|
|
8526
|
+
r.monthPicker ? Xt(new Date(), b.value) : new Date(),
|
|
8529
8527
|
r.monthPicker ? r.year : b.value
|
|
8530
8528
|
)
|
|
8531
8529
|
)
|
|
@@ -8559,9 +8557,9 @@ const nh = (e, t, n, r) => {
|
|
|
8559
8557
|
const b = r.maxValue || r.maxValue === 0, W = r.minValue || r.minValue === 0;
|
|
8560
8558
|
return !b && !W ? !1 : b && W ? +E > +r.maxValue || +E < +r.minValue : b ? +E > +r.maxValue : W ? +E < +r.minValue : !1;
|
|
8561
8559
|
}, T = () => {
|
|
8562
|
-
const E =
|
|
8560
|
+
const E = Ue(y);
|
|
8563
8561
|
if (E) {
|
|
8564
|
-
const b =
|
|
8562
|
+
const b = Ue(w);
|
|
8565
8563
|
b && (b.scrollTop = E.offsetTop - b.offsetTop - (b.getBoundingClientRect().height / 2 - E.getBoundingClientRect().height));
|
|
8566
8564
|
}
|
|
8567
8565
|
}, M = (E) => {
|
|
@@ -8571,10 +8569,10 @@ const nh = (e, t, n, r) => {
|
|
|
8571
8569
|
return Ll(
|
|
8572
8570
|
r.multiModelValue,
|
|
8573
8571
|
xt(
|
|
8574
|
-
r.monthPicker ?
|
|
8572
|
+
r.monthPicker ? Xt(new Date(), s.value || 0) : new Date(),
|
|
8575
8573
|
r.monthPicker ? b : s.value || b
|
|
8576
8574
|
),
|
|
8577
|
-
xt(r.monthPicker ?
|
|
8575
|
+
xt(r.monthPicker ? Xt(new Date(), E) : new Date(), b)
|
|
8578
8576
|
);
|
|
8579
8577
|
}, Q = () => {
|
|
8580
8578
|
n("toggle"), n("reset-flow");
|
|
@@ -8640,7 +8638,7 @@ const nh = (e, t, n, r) => {
|
|
|
8640
8638
|
], 2)
|
|
8641
8639
|
], 42, xh))), 128))
|
|
8642
8640
|
]))), 128)),
|
|
8643
|
-
E.$slots["button-icon"] ?
|
|
8641
|
+
E.$slots["button-icon"] ? Le((m(), $("div", {
|
|
8644
8642
|
key: 0,
|
|
8645
8643
|
role: "button",
|
|
8646
8644
|
"aria-label": (W = e.ariaLabels) == null ? void 0 : W.toggleOverlay,
|
|
@@ -8706,7 +8704,7 @@ const nh = (e, t, n, r) => {
|
|
|
8706
8704
|
css: c(a)
|
|
8707
8705
|
}, {
|
|
8708
8706
|
default: ie(() => [
|
|
8709
|
-
e.showSelectionGrid ? (m(), pe(
|
|
8707
|
+
e.showSelectionGrid ? (m(), pe(Qt, Be({ key: 0 }, {
|
|
8710
8708
|
modelValue: e.modelValue,
|
|
8711
8709
|
items: e.items,
|
|
8712
8710
|
disabledValues: e.disabledValues,
|
|
@@ -8835,7 +8833,7 @@ const nh = (e, t, n, r) => {
|
|
|
8835
8833
|
fromNav: !0
|
|
8836
8834
|
});
|
|
8837
8835
|
}, ce = (_, I) => {
|
|
8838
|
-
r.arrowNavigation && (g.value[I] =
|
|
8836
|
+
r.arrowNavigation && (g.value[I] = Ue(_), u(g.value, "monthYear"));
|
|
8839
8837
|
};
|
|
8840
8838
|
return t({
|
|
8841
8839
|
toggleMonthPicker: S,
|
|
@@ -8992,7 +8990,7 @@ const nh = (e, t, n, r) => {
|
|
|
8992
8990
|
_: 3
|
|
8993
8991
|
}, 8, ["disabled", "aria-label"])) : D("", !0)
|
|
8994
8992
|
], 64)) : D("", !0),
|
|
8995
|
-
_.monthPicker ? (m(), pe(
|
|
8993
|
+
_.monthPicker ? (m(), pe(Qt, Be({ key: 1 }, c(P)("month"), {
|
|
8996
8994
|
"skip-active": _.range,
|
|
8997
8995
|
year: e.year,
|
|
8998
8996
|
"multi-model-value": c(Z),
|
|
@@ -9064,7 +9062,7 @@ const nh = (e, t, n, r) => {
|
|
|
9064
9062
|
css: c(i)
|
|
9065
9063
|
}, {
|
|
9066
9064
|
default: ie(() => [
|
|
9067
|
-
s.value ? (m(), pe(
|
|
9065
|
+
s.value ? (m(), pe(Qt, Be({ key: 0 }, c(P)("year"), {
|
|
9068
9066
|
modelValue: c(O),
|
|
9069
9067
|
"onUpdate:modelValue": I[15] || (I[15] = (be) => ot(O) ? O.value = be : null),
|
|
9070
9068
|
onToggle: U,
|
|
@@ -9105,7 +9103,7 @@ const nh = (e, t, n, r) => {
|
|
|
9105
9103
|
key: "0"
|
|
9106
9104
|
} : void 0
|
|
9107
9105
|
]), 1040, ["skip-active", "year", "multi-model-value", "modelValue"])) : D("", !0),
|
|
9108
|
-
_.yearPicker ? (m(), pe(
|
|
9106
|
+
_.yearPicker ? (m(), pe(Qt, Be({ key: 2 }, c(P)("year"), {
|
|
9109
9107
|
modelValue: c(O),
|
|
9110
9108
|
"onUpdate:modelValue": I[19] || (I[19] = (se) => ot(O) ? O.value = se : null),
|
|
9111
9109
|
"multi-model-value": c(Z),
|
|
@@ -9154,7 +9152,7 @@ const nh = (e, t, n, r) => {
|
|
|
9154
9152
|
"overlay-closed"
|
|
9155
9153
|
],
|
|
9156
9154
|
setup(e, { expose: t, emit: n }) {
|
|
9157
|
-
const r = e, { setTimePickerElements: a, setTimePickerBackRef: o } = wt(), { defaults: i } = tt(r), { transitionName: u, showTransition: f } = Er(i.value.transitions), y =
|
|
9155
|
+
const r = e, { setTimePickerElements: a, setTimePickerBackRef: o } = wt(), { defaults: i } = tt(r), { transitionName: u, showTransition: f } = Er(i.value.transitions), y = Gt({
|
|
9158
9156
|
hours: !1,
|
|
9159
9157
|
minutes: !1,
|
|
9160
9158
|
seconds: !1
|
|
@@ -9315,7 +9313,7 @@ const nh = (e, t, n, r) => {
|
|
|
9315
9313
|
css: c(f)
|
|
9316
9314
|
}, {
|
|
9317
9315
|
default: ie(() => [
|
|
9318
|
-
y[S.type] ? (m(), pe(
|
|
9316
|
+
y[S.type] ? (m(), pe(Qt, {
|
|
9319
9317
|
key: 0,
|
|
9320
9318
|
items: X(S.type),
|
|
9321
9319
|
"disabled-values": c(i).filters.times[S.type].concat(c(T)(S.type)),
|
|
@@ -9372,9 +9370,9 @@ const nh = (e, t, n, r) => {
|
|
|
9372
9370
|
"overlay-closed"
|
|
9373
9371
|
],
|
|
9374
9372
|
setup(e, { expose: t, emit: n }) {
|
|
9375
|
-
const r = e, { buildMatrix: a, setTimePicker: o } = wt(), i =
|
|
9373
|
+
const r = e, { buildMatrix: a, setTimePicker: o } = wt(), i = Zt(), { hideNavigationButtons: u, defaults: f } = tt(r), { transitionName: y, showTransition: w } = Er(f.value.transitions), d = H(null), s = H(null), g = H([]), k = H(null);
|
|
9376
9374
|
et(() => {
|
|
9377
|
-
n("mount"), !r.timePicker && r.arrowNavigation ? a([
|
|
9375
|
+
n("mount"), !r.timePicker && r.arrowNavigation ? a([Ue(d.value)], "time") : o(!0, r.timePicker);
|
|
9378
9376
|
});
|
|
9379
9377
|
const A = V(() => r.range && r.modelAuto ? Wl(r.internalModelValue) : !0), F = H(!1), q = (L) => ({
|
|
9380
9378
|
hours: Array.isArray(r.hours) ? r.hours[L] : r.hours,
|
|
@@ -9407,7 +9405,7 @@ const nh = (e, t, n, r) => {
|
|
|
9407
9405
|
return t({ toggleTimePicker: O }), (L, Z) => {
|
|
9408
9406
|
var oe;
|
|
9409
9407
|
return m(), $("div", null, [
|
|
9410
|
-
L.timePicker ? D("", !0) :
|
|
9408
|
+
L.timePicker ? D("", !0) : Le((m(), $("div", {
|
|
9411
9409
|
key: 0,
|
|
9412
9410
|
class: ve(c(B)),
|
|
9413
9411
|
role: "button",
|
|
@@ -9452,7 +9450,7 @@ const nh = (e, t, n, r) => {
|
|
|
9452
9450
|
setSeconds: j
|
|
9453
9451
|
}) : D("", !0),
|
|
9454
9452
|
L.$slots["time-picker-overlay"] ? D("", !0) : (m(), $("div", qh, [
|
|
9455
|
-
(m(!0), $(ye, null, Ne(c(K), (b, W) =>
|
|
9453
|
+
(m(!0), $(ye, null, Ne(c(K), (b, W) => Le((m(), pe(Wh, Be({ key: W }, {
|
|
9456
9454
|
...L.$props,
|
|
9457
9455
|
order: W,
|
|
9458
9456
|
hours: b.hours,
|
|
@@ -9480,7 +9478,7 @@ const nh = (e, t, n, r) => {
|
|
|
9480
9478
|
[_t, W === 0 ? !0 : c(A)]
|
|
9481
9479
|
])), 128))
|
|
9482
9480
|
])),
|
|
9483
|
-
L.timePicker ? D("", !0) :
|
|
9481
|
+
L.timePicker ? D("", !0) : Le((m(), $("div", {
|
|
9484
9482
|
key: 2,
|
|
9485
9483
|
ref_key: "closeTimePickerBtn",
|
|
9486
9484
|
ref: s,
|
|
@@ -9625,7 +9623,7 @@ const nh = (e, t, n, r) => {
|
|
|
9625
9623
|
"recalculate-position"
|
|
9626
9624
|
],
|
|
9627
9625
|
setup(e, { expose: t, emit: n }) {
|
|
9628
|
-
const r = e, { setMenuFocused: a, setShiftKey: o, control: i } = Vl(), { getCalendarDays: u, defaults: f } = tt(r), y =
|
|
9626
|
+
const r = e, { setMenuFocused: a, setShiftKey: o, control: i } = Vl(), { getCalendarDays: u, defaults: f } = tt(r), y = Zt(), w = H(null), d = Gt({
|
|
9629
9627
|
timePicker: !!(!r.enableTimePicker || r.timePicker || r.monthPicker),
|
|
9630
9628
|
monthYearInput: !!r.timePicker,
|
|
9631
9629
|
calendar: !1
|
|
@@ -9633,7 +9631,7 @@ const nh = (e, t, n, r) => {
|
|
|
9633
9631
|
et(() => {
|
|
9634
9632
|
var R;
|
|
9635
9633
|
q.value = !0, !((R = r.presetRanges) != null && R.length) && !y["left-sidebar"] && !y["right-sidebar"] && ct();
|
|
9636
|
-
const G =
|
|
9634
|
+
const G = Ue(A);
|
|
9637
9635
|
if (G && !r.textInput && !r.inline && (a(!0), M()), G) {
|
|
9638
9636
|
const We = (Xe) => {
|
|
9639
9637
|
!r.monthYearComponent && !r.timePickerComponent && !Object.keys(y).length && Xe.preventDefault(), Xe.stopImmediatePropagation(), Xe.stopPropagation();
|
|
@@ -9652,7 +9650,7 @@ const nh = (e, t, n, r) => {
|
|
|
9652
9650
|
(G, We) => G.triggerTransition(oe.value(We), E.value(We))
|
|
9653
9651
|
);
|
|
9654
9652
|
}, M = () => {
|
|
9655
|
-
const R =
|
|
9653
|
+
const R = Ue(A);
|
|
9656
9654
|
R && R.focus({ preventScroll: !0 });
|
|
9657
9655
|
}, j = () => {
|
|
9658
9656
|
var R;
|
|
@@ -9686,12 +9684,12 @@ const nh = (e, t, n, r) => {
|
|
|
9686
9684
|
},
|
|
9687
9685
|
{ deep: !0 }
|
|
9688
9686
|
);
|
|
9689
|
-
const Re = Dt(y, "calendar"), Ge = Dt(y, "action"), se = Dt(y, "timePicker"), fe = Dt(y, "monthYear"), $e = V(() => r.openOnTop ? "dp__arrow_bottom" : "dp__arrow_top"), be = V(() => Fv(r.yearRange)),
|
|
9690
|
-
const R =
|
|
9687
|
+
const Re = Dt(y, "calendar"), Ge = Dt(y, "action"), se = Dt(y, "timePicker"), fe = Dt(y, "monthYear"), $e = V(() => r.openOnTop ? "dp__arrow_bottom" : "dp__arrow_top"), be = V(() => Fv(r.yearRange)), Yt = V(() => Wv(r.locale, r.monthNameFormat)), ct = () => {
|
|
9688
|
+
const R = Ue(w);
|
|
9691
9689
|
R && (F.value = R.getBoundingClientRect().width);
|
|
9692
|
-
},
|
|
9690
|
+
}, Ut = V(() => (R) => u(oe.value(R), E.value(R))), $t = V(
|
|
9693
9691
|
() => f.value.multiCalendars > 0 && r.range ? [...Array(f.value.multiCalendars).keys()] : [0]
|
|
9694
|
-
),
|
|
9692
|
+
), Lt = V(
|
|
9695
9693
|
() => (R) => R === 1
|
|
9696
9694
|
), Br = V(() => r.monthPicker || r.timePicker || r.yearPicker), Yr = V(
|
|
9697
9695
|
() => ({
|
|
@@ -9699,11 +9697,11 @@ const nh = (e, t, n, r) => {
|
|
|
9699
9697
|
})
|
|
9700
9698
|
), en = V(() => ({
|
|
9701
9699
|
dp__instance_calendar: f.value.multiCalendars > 0
|
|
9702
|
-
})),
|
|
9700
|
+
})), Vt = V(() => ({
|
|
9703
9701
|
dp__menu_disabled: r.disabled,
|
|
9704
9702
|
dp__menu_readonly: r.readonly
|
|
9705
9703
|
})), Ur = V(
|
|
9706
|
-
() => (R) => Vr(
|
|
9704
|
+
() => (R) => Vr(Ut, R)
|
|
9707
9705
|
), Lr = V(
|
|
9708
9706
|
() => ({
|
|
9709
9707
|
dp__menu: !0,
|
|
@@ -9780,7 +9778,7 @@ const nh = (e, t, n, r) => {
|
|
|
9780
9778
|
}, [
|
|
9781
9779
|
(R.disabled || R.readonly) && R.inline ? (m(), $("div", {
|
|
9782
9780
|
key: 0,
|
|
9783
|
-
class: ve(c(
|
|
9781
|
+
class: ve(c(Vt))
|
|
9784
9782
|
}, null, 2)) : D("", !0),
|
|
9785
9783
|
!R.inline && !R.teleportCenter ? (m(), $("div", {
|
|
9786
9784
|
key: 1,
|
|
@@ -9830,7 +9828,7 @@ const nh = (e, t, n, r) => {
|
|
|
9830
9828
|
ref: (_e) => {
|
|
9831
9829
|
_e && (s.value[Ct] = _e);
|
|
9832
9830
|
},
|
|
9833
|
-
months: c(
|
|
9831
|
+
months: c(Yt),
|
|
9834
9832
|
years: c(be),
|
|
9835
9833
|
month: c(oe)(re),
|
|
9836
9834
|
year: c(E)(re),
|
|
@@ -9864,8 +9862,8 @@ const nh = (e, t, n, r) => {
|
|
|
9864
9862
|
}, R.$props, {
|
|
9865
9863
|
"flow-step": K.value,
|
|
9866
9864
|
"onUpdate:flow-step": G[1] || (G[1] = (_e) => K.value = _e),
|
|
9867
|
-
onSelectDate: (_e) => c(v)(_e, !c(
|
|
9868
|
-
onHandleSpace: (_e) => C(_e, !c(
|
|
9865
|
+
onSelectDate: (_e) => c(v)(_e, !c(Lt)(re)),
|
|
9866
|
+
onHandleSpace: (_e) => C(_e, !c(Lt)(re)),
|
|
9869
9867
|
onSetHoverDate: G[2] || (G[2] = (_e) => c(De)(_e)),
|
|
9870
9868
|
onHandleScroll: (_e) => c(U)(_e, re),
|
|
9871
9869
|
onHandleSwipe: (_e) => c(J)(_e, re),
|
|
@@ -9970,7 +9968,7 @@ const nh = (e, t, n, r) => {
|
|
|
9970
9968
|
}, l0 = (e, t, n, r = {}) => {
|
|
9971
9969
|
const { window: a = a0, event: o = "pointerdown" } = r;
|
|
9972
9970
|
return a ? i0(a, o, (i) => {
|
|
9973
|
-
const u =
|
|
9971
|
+
const u = Ue(e), f = Ue(t);
|
|
9974
9972
|
!u || !f || u === i.target || i.composedPath().includes(u) || i.composedPath().includes(f) || n(i);
|
|
9975
9973
|
}, { passive: !0 }) : void 0;
|
|
9976
9974
|
}, u0 = /* @__PURE__ */ Se({
|
|
@@ -9993,7 +9991,7 @@ const nh = (e, t, n, r) => {
|
|
|
9993
9991
|
"invalid-select"
|
|
9994
9992
|
],
|
|
9995
9993
|
setup(e, { expose: t, emit: n }) {
|
|
9996
|
-
const r = e, a =
|
|
9994
|
+
const r = e, a = Zt(), o = H(!1), i = ra(r, "modelValue"), u = ra(r, "timezone"), f = H(null), y = H(null), w = H(!1), { setMenuFocused: d, setShiftKey: s } = Vl(), { clearArrowNav: g } = wt(), { validateDate: k, isValidTime: A, defaults: F } = tt(r);
|
|
9997
9995
|
et(() => {
|
|
9998
9996
|
j(r.modelValue), r.inline || (window.addEventListener("scroll", b), window.addEventListener("resize", W)), r.inline && (o.value = !0);
|
|
9999
9997
|
}), bo(() => {
|
|
@@ -10103,7 +10101,7 @@ const nh = (e, t, n, r) => {
|
|
|
10103
10101
|
onFocus: Re,
|
|
10104
10102
|
onBlur: Ge
|
|
10105
10103
|
}), Qe({ _: 2 }, [
|
|
10106
|
-
Ne(c(K), (be,
|
|
10104
|
+
Ne(c(K), (be, Yt) => ({
|
|
10107
10105
|
name: be,
|
|
10108
10106
|
fn: ie((ct) => [
|
|
10109
10107
|
z(fe.$slots, be, Je(yt(ct)))
|
|
@@ -10134,7 +10132,7 @@ const nh = (e, t, n, r) => {
|
|
|
10134
10132
|
onInvalidSelect: $e[4] || ($e[4] = (be) => fe.$emit("invalid-select", c(M))),
|
|
10135
10133
|
onRecalculatePosition: c(X)
|
|
10136
10134
|
}), Qe({ _: 2 }, [
|
|
10137
|
-
Ne(c(q), (be,
|
|
10135
|
+
Ne(c(q), (be, Yt) => ({
|
|
10138
10136
|
name: be,
|
|
10139
10137
|
fn: ie((ct) => [
|
|
10140
10138
|
z(fe.$slots, be, Je(yt({ ...ct })))
|
|
@@ -10186,7 +10184,7 @@ const c0 = { class: "rm-datepicker" }, O0 = /* @__PURE__ */ Se({
|
|
|
10186
10184
|
i && t("change", i);
|
|
10187
10185
|
}
|
|
10188
10186
|
return (i, u) => (m(), $("div", c0, [
|
|
10189
|
-
|
|
10187
|
+
Le(Y("p", { class: "rm-datepicker__label" }, me(e.label), 513), [
|
|
10190
10188
|
[_t, e.label]
|
|
10191
10189
|
]),
|
|
10192
10190
|
Ee(c(No), Be({
|