@quoreadmin/ui 1.10.27 → 1.10.30
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/index.css +1 -1
- package/dist/index103.js +11 -6
- package/dist/index147.js +147 -147
- package/dist/index157.js +160 -160
- package/dist/index186.js +4 -4
- package/dist/index193.js +8 -8
- package/dist/index195.js +8 -8
- package/dist/index198.js +17 -17
- package/dist/index201.js +26 -26
- package/dist/index202.js +1 -1
- package/dist/index203.js +1 -1
- package/dist/index206.js +2 -2
- package/dist/index208.js +14 -14
- package/dist/index209.js +1 -1
- package/dist/index210.js +1 -1
- package/dist/index211.js +3 -3
- package/dist/index212.js +6 -6
- package/dist/index216.js +2 -2
- package/dist/index217.js +1 -1
- package/dist/index219.js +4 -4
- package/dist/index221.js +1 -1
- package/dist/index222.js +1 -1
- package/dist/index223.js +1 -1
- package/dist/index224.js +4 -4
- package/dist/index226.js +1 -1
- package/dist/index227.js +2 -2
- package/dist/index228.js +2 -2
- package/dist/index229.js +1 -1
- package/dist/index23.js +47 -27
- package/dist/index230.js +159 -159
- package/dist/index231.js +228 -20
- package/dist/index232.js +36 -19
- package/dist/index233.js +10 -22
- package/dist/index234.js +129 -167
- package/dist/index235.js +19 -69
- package/dist/index236.js +20 -34
- package/dist/index237.js +21 -39
- package/dist/index238.js +185 -113
- package/dist/index239.js +57 -25
- package/dist/index240.js +31 -77
- package/dist/index241.js +39 -19
- package/dist/index242.js +126 -19
- package/dist/index243.js +34 -16
- package/dist/index244.js +80 -20
- package/dist/index245.js +19 -160
- package/dist/index246.js +20 -228
- package/dist/index247.js +19 -36
- package/dist/index248.js +20 -10
- package/dist/index249.js +3709 -22
- package/dist/index250.js +60 -22
- package/dist/index251.js +83 -20
- package/dist/index252.js +39 -823
- package/dist/index253.js +198 -685
- package/dist/index254.js +9 -175
- package/dist/index255.js +57 -22
- package/dist/index256.js +61 -20
- package/dist/index257.js +54 -20
- package/dist/index258.js +81 -3
- package/dist/index259.js +711 -170
- package/dist/index260.js +41 -127
- package/dist/index261.js +55 -1214
- package/dist/index262.js +11 -20
- package/dist/index263.js +705 -22
- package/dist/index264.js +820 -22
- package/dist/index265.js +15 -22
- package/dist/index266.js +15 -13
- package/dist/index267.js +12 -12
- package/dist/index268.js +836 -2
- package/dist/index269.js +702 -2
- package/dist/index270.js +164 -241
- package/dist/index271.js +21 -7
- package/dist/index272.js +20 -138
- package/dist/index273.js +20 -83
- package/dist/index274.js +3 -54
- package/dist/index275.js +173 -65
- package/dist/index276.js +132 -25
- package/dist/index277.js +1223 -22
- package/dist/index278.js +13 -15
- package/dist/index279.js +22 -16
- package/dist/index280.js +22 -17
- package/dist/index281.js +28 -22
- package/dist/index282.js +20 -3
- package/dist/index283.js +19 -26
- package/dist/index284.js +2 -3709
- package/dist/index285.js +2 -60
- package/dist/index286.js +242 -72
- package/dist/index287.js +7 -51
- package/dist/index288.js +132 -209
- package/dist/index289.js +83 -10
- package/dist/index290.js +3 -57
- package/dist/index291.js +26 -60
- package/dist/index292.js +51 -51
- package/dist/index293.js +76 -78
- package/dist/index294.js +25 -727
- package/dist/index295.js +22 -47
- package/dist/index296.js +22 -64
- package/dist/index297.js +15 -10
- package/dist/index298.js +16 -704
- package/dist/index299.js +23 -820
- package/dist/index301.js +1534 -79
- package/dist/index302.js +386 -22
- package/dist/index303.js +2698 -902
- package/dist/index304.js +85 -21
- package/dist/index305.js +3798 -20
- package/dist/index306.js +59 -19
- package/dist/index307.js +15 -69
- package/dist/index308.js +84 -19
- package/dist/index309.js +201 -18
- package/dist/index310.js +246 -22
- package/dist/index311.js +78 -21
- package/dist/index312.js +22 -63
- package/dist/index313.js +920 -250
- package/dist/index314.js +21 -5
- package/dist/index315.js +19 -149
- package/dist/index316.js +19 -68
- package/dist/index317.js +64 -86
- package/dist/index318.js +19 -29
- package/dist/index319.js +19 -16
- package/dist/index320.js +21 -74
- package/dist/index321.js +21 -3
- package/dist/index322.js +63 -2
- package/dist/index323.js +227 -76
- package/dist/index324.js +5 -57
- package/dist/index325.js +133 -5
- package/dist/index326.js +67 -4
- package/dist/index327.js +79 -178
- package/dist/index328.js +26 -60
- package/dist/index329.js +8 -74
- package/dist/index330.js +73 -35
- package/dist/index331.js +3 -8
- package/dist/index332.js +2 -13
- package/dist/index333.js +78 -50
- package/dist/index334.js +53 -11
- package/dist/index335.js +4 -12
- package/dist/index336.js +4 -57
- package/dist/index337.js +175 -48
- package/dist/index338.js +60 -28
- package/dist/index339.js +75 -2
- package/dist/index340.js +10 -5
- package/dist/index341.js +10 -2
- package/dist/index342.js +12 -21
- package/dist/index343.js +9 -40
- package/dist/index344.js +17 -2
- package/dist/index345.js +9 -11
- package/dist/index346.js +12 -19
- package/dist/index347.js +55 -10
- package/dist/index348.js +12 -10
- package/dist/index349.js +12 -15
- package/dist/index350.js +58 -2
- package/dist/index351.js +52 -9
- package/dist/index352.js +30 -9
- package/dist/index353.js +2 -14
- package/dist/index354.js +4 -1533
- package/dist/index355.js +2 -386
- package/dist/index356.js +22 -2730
- package/dist/index357.js +37 -82
- package/dist/index358.js +2 -3798
- package/dist/index359.js +11 -60
- package/dist/index360.js +20 -15
- package/dist/index361.js +2 -84
- package/dist/index362.js +9 -202
- package/dist/index363.js +31 -240
- package/dist/index364.js +1 -1
- package/dist/index365.js +1 -1
- package/dist/index366.js +1 -1
- package/dist/index367.js +1 -1
- package/dist/index368.js +14 -12
- package/dist/index369.js +1 -2
- package/dist/index370.js +22 -18
- package/dist/index371.js +2 -2
- package/dist/index372.js +3 -6
- package/dist/index373.js +3 -4
- package/dist/index374.js +2 -2
- package/dist/index375.js +2 -2
- package/dist/index376.js +1 -1
- package/dist/index378.js +20 -32
- package/dist/index379.js +45 -58
- package/dist/index380.js +100 -16
- package/dist/index381.js +90 -30
- package/dist/index382.js +98 -11
- package/dist/index383.js +17 -4
- package/dist/index384.js +30 -3
- package/dist/index385.js +11 -13
- package/dist/index386.js +4 -7
- package/dist/index387.js +3 -13
- package/dist/index388.js +13 -5
- package/dist/index389.js +7 -36
- package/dist/index390.js +11 -36
- package/dist/index391.js +5 -30
- package/dist/index392.js +33 -64
- package/dist/index393.js +29 -99
- package/dist/index394.js +28 -91
- package/dist/index395.js +59 -96
- package/dist/index396.js +1 -1
- package/dist/index402.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/src/components/event/event.d.ts +12 -0
- package/dist/src/components/event/event.stories.d.ts +2 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +9 -3
- package/package.json +2 -2
package/dist/index157.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as Be, ref as h, computed as y, watch as ce, nextTick as me, onUnmounted as Ee, openBlock as s, createElementBlock as m, normalizeClass as
|
|
1
|
+
import { defineComponent as Be, ref as h, computed as y, watch as ce, nextTick as me, onUnmounted as Ee, openBlock as s, createElementBlock as m, normalizeClass as H, createElementVNode as f, createVNode as E, Fragment as P, createCommentVNode as _, toDisplayString as g, createTextVNode as fe, createBlock as de, Teleport as Pe, Transition as ze, withCtx as F, renderList as ne } from "vue";
|
|
2
2
|
import Ke from "./index46.js";
|
|
3
3
|
import Le from "./index7.js";
|
|
4
|
-
import
|
|
4
|
+
import oe from "./index28.js";
|
|
5
5
|
import { useI18n as $e } from "vue-i18n";
|
|
6
6
|
const Ne = {
|
|
7
7
|
key: 0,
|
|
@@ -45,124 +45,124 @@ const Ne = {
|
|
|
45
45
|
},
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
47
|
setup(i, { emit: ve }) {
|
|
48
|
-
const a = i,
|
|
48
|
+
const a = i, x = ve, { t: z } = $e(), d = h(""), p = h(""), v = h(""), M = h(null), T = h(null), K = h(null), I = h(!1);
|
|
49
49
|
let S = "", w = "";
|
|
50
|
-
const
|
|
51
|
-
let G, j
|
|
52
|
-
const
|
|
50
|
+
const q = h(!1), b = h(12), D = h(0), A = h("AM"), O = h(null), U = h(null), W = h(null);
|
|
51
|
+
let Q, G, j;
|
|
52
|
+
const V = 44, L = y(() => a.format === "24h" ? Array.from({ length: 24 }, (e, t) => t) : Array.from({ length: 12 }, (e, t) => t + 1)), $ = y(() => {
|
|
53
53
|
const e = [];
|
|
54
54
|
for (let t = 0; t < 60; t += a.step)
|
|
55
55
|
e.push(t);
|
|
56
56
|
return e;
|
|
57
|
-
}),
|
|
57
|
+
}), J = y(() => {
|
|
58
58
|
const e = [], t = a.minTime ? k(a.minTime) : null, l = a.maxTime ? k(a.maxTime) : null;
|
|
59
|
-
for (let
|
|
60
|
-
if (t !== null &&
|
|
61
|
-
if (l !== null &&
|
|
62
|
-
const
|
|
59
|
+
for (let n = 0; n < 1440; n += a.step) {
|
|
60
|
+
if (t !== null && n < t) continue;
|
|
61
|
+
if (l !== null && n > l) break;
|
|
62
|
+
const o = Math.floor(n / 60), r = n % 60, u = C(o, r, a.format);
|
|
63
63
|
e.push({ label: u, value: u });
|
|
64
64
|
}
|
|
65
65
|
if (a.customTimes.length) {
|
|
66
|
-
for (const
|
|
67
|
-
if (e.some((r) => r.value ===
|
|
68
|
-
const
|
|
69
|
-
|
|
66
|
+
for (const n of a.customTimes) {
|
|
67
|
+
if (e.some((r) => r.value === n.value)) continue;
|
|
68
|
+
const o = k(n.value);
|
|
69
|
+
o !== null && (t !== null && o < t || l !== null && o > l) || e.push(n);
|
|
70
70
|
}
|
|
71
|
-
e.sort((
|
|
72
|
-
const r = k(
|
|
71
|
+
e.sort((n, o) => {
|
|
72
|
+
const r = k(n.value) ?? 0, u = k(o.value) ?? 0;
|
|
73
73
|
return r - u;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
if (a.showNow) {
|
|
77
|
-
const
|
|
78
|
-
if ((t === null ||
|
|
79
|
-
const
|
|
80
|
-
e.unshift({ label: `${
|
|
77
|
+
const n = /* @__PURE__ */ new Date(), o = n.getHours(), r = n.getMinutes(), u = o * 60 + r;
|
|
78
|
+
if ((t === null || u >= t) && (l === null || u <= l)) {
|
|
79
|
+
const le = C(o, r, a.format);
|
|
80
|
+
e.unshift({ label: `${z("HC_NOW")} (${le})`, value: le });
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
return e;
|
|
84
84
|
}), pe = y(() => {
|
|
85
85
|
if (!a.modelValue) return null;
|
|
86
|
-
const e =
|
|
86
|
+
const e = J.value.find(
|
|
87
87
|
(l) => l.value === a.modelValue
|
|
88
88
|
);
|
|
89
89
|
if (e) return e;
|
|
90
90
|
const t = k(a.modelValue);
|
|
91
91
|
if (t !== null) {
|
|
92
|
-
const l =
|
|
92
|
+
const l = J.value.find(
|
|
93
93
|
(u) => k(u.value) === t
|
|
94
94
|
);
|
|
95
95
|
if (l) return l;
|
|
96
|
-
const
|
|
96
|
+
const n = Math.floor(t / 60), o = t % 60, r = C(n, o, a.format);
|
|
97
97
|
return { label: r, value: r };
|
|
98
98
|
}
|
|
99
99
|
return { label: a.modelValue, value: a.modelValue };
|
|
100
|
-
}), he = y(() => a.modelValue || ""),
|
|
101
|
-
() => !d.value && !p.value && !
|
|
102
|
-
), ke = y(() => v.value ?
|
|
103
|
-
{ value: "AM", label:
|
|
104
|
-
{ value: "PM", label:
|
|
100
|
+
}), he = y(() => a.modelValue || ""), X = y(
|
|
101
|
+
() => !d.value && !p.value && !I.value
|
|
102
|
+
), ke = y(() => v.value ? z(`HC_${v.value}`) : ""), ge = y(() => [
|
|
103
|
+
{ value: "AM", label: z("HC_AM") },
|
|
104
|
+
{ value: "PM", label: z("HC_PM") }
|
|
105
105
|
]), k = (e) => {
|
|
106
106
|
if (!e) return null;
|
|
107
107
|
const t = e.trim(), l = t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);
|
|
108
108
|
if (l) {
|
|
109
|
-
let
|
|
109
|
+
let o = parseInt(l[1], 10);
|
|
110
110
|
const r = parseInt(l[2], 10), u = l[3].toLowerCase();
|
|
111
|
-
return u === "pm" &&
|
|
111
|
+
return u === "pm" && o !== 12 && (o += 12), u === "am" && o === 12 && (o = 0), o * 60 + r;
|
|
112
112
|
}
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
113
|
+
const n = t.match(/^(\d{1,2}):(\d{2})$/);
|
|
114
|
+
if (n) {
|
|
115
|
+
const o = parseInt(n[1], 10), r = parseInt(n[2], 10);
|
|
116
|
+
if (o >= 0 && o <= 23 && r >= 0 && r <= 59)
|
|
117
|
+
return o * 60 + r;
|
|
118
118
|
}
|
|
119
119
|
return null;
|
|
120
|
-
},
|
|
121
|
-
const
|
|
120
|
+
}, C = (e, t, l) => {
|
|
121
|
+
const n = t.toString().padStart(2, "0");
|
|
122
122
|
if (l === "24h")
|
|
123
|
-
return `${e.toString().padStart(2, "0")}:${
|
|
124
|
-
const
|
|
125
|
-
return `${e % 12 || 12}:${
|
|
126
|
-
}, re = (e, t, l,
|
|
123
|
+
return `${e.toString().padStart(2, "0")}:${n}`;
|
|
124
|
+
const o = e >= 12 ? "PM" : "AM";
|
|
125
|
+
return `${e % 12 || 12}:${n} ${o}`;
|
|
126
|
+
}, re = (e, t, l, n, o) => {
|
|
127
127
|
if (!t) {
|
|
128
|
-
let
|
|
129
|
-
for (let
|
|
130
|
-
const se = e * 10 +
|
|
131
|
-
if (se >= l && se <=
|
|
132
|
-
|
|
128
|
+
let ae = !1;
|
|
129
|
+
for (let R = 0; R <= 9; R++) {
|
|
130
|
+
const se = e * 10 + R;
|
|
131
|
+
if (se >= l && se <= n) {
|
|
132
|
+
ae = !0;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return ae ? {
|
|
137
137
|
value: e.toString(),
|
|
138
138
|
buffer: e.toString(),
|
|
139
139
|
complete: !1
|
|
140
|
-
} : e >= l && e <=
|
|
140
|
+
} : e >= l && e <= n ? { value: o ? e.toString().padStart(2, "0") : e.toString(), buffer: "", complete: !0 } : { value: "", buffer: "", complete: !1 };
|
|
141
141
|
}
|
|
142
142
|
const r = parseInt(t) * 10 + e;
|
|
143
|
-
if (r >= l && r <=
|
|
144
|
-
return { value:
|
|
143
|
+
if (r >= l && r <= n)
|
|
144
|
+
return { value: o ? r.toString().padStart(2, "0") : r.toString(), buffer: "", complete: !0 };
|
|
145
145
|
const u = parseInt(t);
|
|
146
|
-
return { value: u >= l && u <=
|
|
147
|
-
},
|
|
146
|
+
return { value: u >= l && u <= n ? o ? u.toString().padStart(2, "0") : u.toString() : "", buffer: "", complete: !0 };
|
|
147
|
+
}, N = () => {
|
|
148
148
|
if (!S) return;
|
|
149
|
-
const e = a.format === "12h" ? 1 : 0, t = a.format === "12h" ? 12 : 23, l = a.format === "24h",
|
|
150
|
-
|
|
151
|
-
},
|
|
149
|
+
const e = a.format === "12h" ? 1 : 0, t = a.format === "12h" ? 12 : 23, l = a.format === "24h", n = parseInt(S);
|
|
150
|
+
n >= e && n <= t && (d.value = l ? n.toString().padStart(2, "0") : n.toString()), S = "";
|
|
151
|
+
}, B = () => {
|
|
152
152
|
if (!w) return;
|
|
153
153
|
const e = parseInt(w);
|
|
154
154
|
e >= 0 && e <= 59 && (p.value = e.toString().padStart(2, "0")), w = "";
|
|
155
155
|
}, c = () => {
|
|
156
156
|
const e = parseInt(d.value, 10), t = parseInt(p.value, 10);
|
|
157
157
|
if (isNaN(e) || isNaN(t)) {
|
|
158
|
-
!d.value && !p.value && !v.value &&
|
|
158
|
+
!d.value && !p.value && !v.value && x("update:modelValue", "");
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
if (a.format === "12h" && !v.value) return;
|
|
162
162
|
let l;
|
|
163
163
|
a.format === "12h" ? (l = e % 12, v.value === "PM" && (l += 12)) : l = e;
|
|
164
|
-
const
|
|
165
|
-
|
|
164
|
+
const n = l * 60 + t, o = a.minTime ? k(a.minTime) : null, r = a.maxTime ? k(a.maxTime) : null;
|
|
165
|
+
o !== null && n < o || r !== null && n > r || x("update:modelValue", C(l, t, a.format));
|
|
166
166
|
}, be = () => {
|
|
167
167
|
if (!a.modelValue) {
|
|
168
168
|
d.value = "", p.value = "", v.value = "";
|
|
@@ -172,10 +172,10 @@ const Ne = {
|
|
|
172
172
|
if (e === null) return;
|
|
173
173
|
const t = Math.floor(e / 60), l = e % 60;
|
|
174
174
|
a.format === "12h" ? (d.value = (t % 12 || 12).toString(), p.value = l.toString().padStart(2, "0"), v.value = t >= 12 ? "PM" : "AM") : (d.value = t.toString().padStart(2, "0"), p.value = l.toString().padStart(2, "0"));
|
|
175
|
+
}, Y = () => {
|
|
176
|
+
T.value?.focus();
|
|
175
177
|
}, Z = () => {
|
|
176
|
-
|
|
177
|
-
}, ee = () => {
|
|
178
|
-
a.format === "12h" && $.value?.focus();
|
|
178
|
+
a.format === "12h" && K.value?.focus();
|
|
179
179
|
}, ie = (e) => {
|
|
180
180
|
let t = parseInt(d.value) || (a.format === "12h" ? 12 : 0);
|
|
181
181
|
t += e, a.format === "12h" ? (t > 12 && (t = 1), t < 1 && (t = 12), d.value = t.toString()) : (t > 23 && (t = 0), t < 0 && (t = 23), d.value = t.toString().padStart(2, "0")), S = "", c();
|
|
@@ -187,14 +187,14 @@ const Ne = {
|
|
|
187
187
|
}, Me = (e) => {
|
|
188
188
|
if (e.key >= "0" && e.key <= "9") {
|
|
189
189
|
e.preventDefault();
|
|
190
|
-
const t = a.format === "12h" ? 1 : 0, l = a.format === "12h" ? 12 : 23,
|
|
190
|
+
const t = a.format === "12h" ? 1 : 0, l = a.format === "12h" ? 12 : 23, n = a.format === "24h", o = re(
|
|
191
191
|
parseInt(e.key),
|
|
192
192
|
S,
|
|
193
193
|
t,
|
|
194
194
|
l,
|
|
195
|
-
|
|
195
|
+
n
|
|
196
196
|
);
|
|
197
|
-
d.value =
|
|
197
|
+
d.value = o.value, S = o.buffer, o.complete && (c(), Y());
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
switch (e.key) {
|
|
@@ -205,10 +205,10 @@ const Ne = {
|
|
|
205
205
|
e.preventDefault(), ie(-1);
|
|
206
206
|
break;
|
|
207
207
|
case "ArrowRight":
|
|
208
|
-
e.preventDefault(),
|
|
208
|
+
e.preventDefault(), N(), c(), Y();
|
|
209
209
|
break;
|
|
210
210
|
case "Tab":
|
|
211
|
-
e.shiftKey ? (
|
|
211
|
+
e.shiftKey ? (N(), c()) : (e.preventDefault(), N(), c(), Y());
|
|
212
212
|
break;
|
|
213
213
|
case "Backspace":
|
|
214
214
|
case "Delete":
|
|
@@ -230,7 +230,7 @@ const Ne = {
|
|
|
230
230
|
59,
|
|
231
231
|
!0
|
|
232
232
|
);
|
|
233
|
-
p.value = t.value, w = t.buffer, t.complete && (c(),
|
|
233
|
+
p.value = t.value, w = t.buffer, t.complete && (c(), Z());
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
switch (e.key) {
|
|
@@ -241,13 +241,13 @@ const Ne = {
|
|
|
241
241
|
e.preventDefault(), ue(-1);
|
|
242
242
|
break;
|
|
243
243
|
case "ArrowRight":
|
|
244
|
-
e.preventDefault(),
|
|
244
|
+
e.preventDefault(), B(), c(), a.format === "12h" && Z();
|
|
245
245
|
break;
|
|
246
246
|
case "Tab":
|
|
247
|
-
e.shiftKey ? (e.preventDefault(),
|
|
247
|
+
e.shiftKey ? (e.preventDefault(), B(), c(), M.value?.focus()) : (B(), c(), a.format === "12h" && (e.preventDefault(), Z()));
|
|
248
248
|
break;
|
|
249
249
|
case "ArrowLeft":
|
|
250
|
-
e.preventDefault(),
|
|
250
|
+
e.preventDefault(), B(), c(), M.value?.focus();
|
|
251
251
|
break;
|
|
252
252
|
case "Backspace":
|
|
253
253
|
case "Delete":
|
|
@@ -272,10 +272,10 @@ const Ne = {
|
|
|
272
272
|
e.preventDefault(), ye();
|
|
273
273
|
break;
|
|
274
274
|
case "ArrowLeft":
|
|
275
|
-
e.preventDefault(),
|
|
275
|
+
e.preventDefault(), T.value?.focus();
|
|
276
276
|
break;
|
|
277
277
|
case "Tab":
|
|
278
|
-
e.shiftKey && (e.preventDefault(),
|
|
278
|
+
e.shiftKey && (e.preventDefault(), T.value?.focus());
|
|
279
279
|
break;
|
|
280
280
|
case "Backspace":
|
|
281
281
|
case "Delete":
|
|
@@ -284,113 +284,113 @@ const Ne = {
|
|
|
284
284
|
default:
|
|
285
285
|
!e.ctrlKey && !e.metaKey && !e.altKey && e.key.length === 1 && e.preventDefault();
|
|
286
286
|
}
|
|
287
|
+
}, ee = () => {
|
|
288
|
+
I.value = !0;
|
|
287
289
|
}, te = () => {
|
|
288
|
-
B.value = !0;
|
|
289
|
-
}, le = () => {
|
|
290
290
|
requestAnimationFrame(() => {
|
|
291
291
|
const e = document.activeElement;
|
|
292
|
-
e !== M.value && e !==
|
|
292
|
+
e !== M.value && e !== T.value && e !== K.value && (I.value = !1, N(), B(), c());
|
|
293
293
|
});
|
|
294
|
-
},
|
|
294
|
+
}, _e = (e) => {
|
|
295
295
|
if (!a.disabled && !(e.target instanceof HTMLInputElement)) {
|
|
296
|
-
if (
|
|
297
|
-
|
|
296
|
+
if (X.value) {
|
|
297
|
+
I.value = !0, me(() => M.value?.focus());
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
d.value ? p.value ? a.format === "12h" && !v.value ?
|
|
300
|
+
d.value ? p.value ? a.format === "12h" && !v.value ? K.value?.focus() : M.value?.focus() : T.value?.focus() : M.value?.focus();
|
|
301
301
|
}
|
|
302
|
-
},
|
|
302
|
+
}, Te = (e) => {
|
|
303
303
|
if (!e) {
|
|
304
|
-
|
|
304
|
+
x("update:modelValue", "");
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
|
-
|
|
307
|
+
x("update:modelValue", e.value);
|
|
308
308
|
}, qe = (e) => a.format === "24h" ? e.toString().padStart(2, "0") : e.toString(), De = () => {
|
|
309
309
|
if (!a.modelValue) {
|
|
310
|
-
const
|
|
311
|
-
b.value = a.format === "12h" ?
|
|
310
|
+
const o = /* @__PURE__ */ new Date();
|
|
311
|
+
b.value = a.format === "12h" ? o.getHours() % 12 || 12 : o.getHours(), D.value = Math.floor(o.getMinutes() / a.step) * a.step, A.value = o.getHours() >= 12 ? "PM" : "AM";
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
const e = k(a.modelValue);
|
|
315
315
|
if (e === null) return;
|
|
316
316
|
const t = Math.floor(e / 60), l = e % 60;
|
|
317
|
-
a.format === "12h" ? (b.value = t % 12 || 12,
|
|
318
|
-
const
|
|
319
|
-
|
|
317
|
+
a.format === "12h" ? (b.value = t % 12 || 12, A.value = t >= 12 ? "PM" : "AM") : b.value = t;
|
|
318
|
+
const n = Math.round(l / a.step) * a.step;
|
|
319
|
+
D.value = n >= 60 ? 60 - a.step : n;
|
|
320
320
|
}, Ae = (e = !0) => {
|
|
321
321
|
const t = e ? "smooth" : "instant";
|
|
322
|
-
if (
|
|
323
|
-
const l =
|
|
324
|
-
l >= 0 &&
|
|
325
|
-
top: l *
|
|
322
|
+
if (O.value) {
|
|
323
|
+
const l = L.value.indexOf(b.value);
|
|
324
|
+
l >= 0 && O.value.scrollTo({
|
|
325
|
+
top: l * V,
|
|
326
326
|
behavior: t
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
if (
|
|
330
|
-
const l =
|
|
331
|
-
l >= 0 &&
|
|
332
|
-
top: l *
|
|
329
|
+
if (U.value) {
|
|
330
|
+
const l = $.value.indexOf(D.value);
|
|
331
|
+
l >= 0 && U.value.scrollTo({
|
|
332
|
+
top: l * V,
|
|
333
333
|
behavior: t
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
-
if (
|
|
337
|
-
const l =
|
|
338
|
-
|
|
339
|
-
top: l *
|
|
336
|
+
if (W.value && a.format === "12h") {
|
|
337
|
+
const l = A.value === "AM" ? 0 : 1;
|
|
338
|
+
W.value.scrollTo({
|
|
339
|
+
top: l * V,
|
|
340
340
|
behavior: t
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
}, Ve = () => {
|
|
344
|
-
a.disabled || (De(),
|
|
344
|
+
a.disabled || (De(), q.value = !0);
|
|
345
345
|
}, He = (e) => {
|
|
346
|
-
clearTimeout(
|
|
347
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
348
|
-
b.value =
|
|
346
|
+
clearTimeout(Q), Q = setTimeout(() => {
|
|
347
|
+
const t = e.target, l = Math.round(t.scrollTop / V), n = Math.max(0, Math.min(l, L.value.length - 1));
|
|
348
|
+
b.value = L.value[n];
|
|
349
349
|
}, 60);
|
|
350
350
|
}, xe = (e) => {
|
|
351
|
-
clearTimeout(
|
|
352
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
351
|
+
clearTimeout(G), G = setTimeout(() => {
|
|
352
|
+
const t = e.target, l = Math.round(t.scrollTop / V), n = Math.max(
|
|
353
353
|
0,
|
|
354
|
-
Math.min(l,
|
|
354
|
+
Math.min(l, $.value.length - 1)
|
|
355
355
|
);
|
|
356
|
-
|
|
356
|
+
D.value = $.value[n];
|
|
357
357
|
}, 60);
|
|
358
358
|
}, Ie = (e) => {
|
|
359
|
-
clearTimeout(
|
|
360
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
361
|
-
|
|
359
|
+
clearTimeout(j), j = setTimeout(() => {
|
|
360
|
+
const t = e.target, l = Math.round(t.scrollTop / V);
|
|
361
|
+
A.value = l <= 0 ? "AM" : "PM";
|
|
362
362
|
}, 60);
|
|
363
363
|
}, Ce = () => {
|
|
364
364
|
let e;
|
|
365
|
-
a.format === "12h" ? (e = b.value % 12,
|
|
366
|
-
let t = e * 60 +
|
|
367
|
-
const l = a.minTime ? k(a.minTime) : null,
|
|
368
|
-
l !== null && t < l && (t = l),
|
|
369
|
-
const
|
|
370
|
-
|
|
365
|
+
a.format === "12h" ? (e = b.value % 12, A.value === "PM" && (e += 12)) : e = b.value;
|
|
366
|
+
let t = e * 60 + D.value;
|
|
367
|
+
const l = a.minTime ? k(a.minTime) : null, n = a.maxTime ? k(a.maxTime) : null;
|
|
368
|
+
l !== null && t < l && (t = l), n !== null && t > n && (t = n);
|
|
369
|
+
const o = Math.floor(t / 60) % 24, r = t % 60, u = C(o, r, a.format);
|
|
370
|
+
x("update:modelValue", u), q.value = !1;
|
|
371
371
|
};
|
|
372
372
|
return ce(
|
|
373
373
|
[() => a.modelValue, () => a.format],
|
|
374
374
|
() => be(),
|
|
375
375
|
{ immediate: !0 }
|
|
376
|
-
), ce(
|
|
376
|
+
), ce(q, async (e) => {
|
|
377
377
|
e && (await me(), requestAnimationFrame(() => {
|
|
378
378
|
Ae(!1);
|
|
379
379
|
}));
|
|
380
380
|
}), Ee(() => {
|
|
381
|
-
clearTimeout(
|
|
381
|
+
clearTimeout(Q), clearTimeout(G), clearTimeout(j);
|
|
382
382
|
}), (e, t) => (s(), m("div", {
|
|
383
|
-
class:
|
|
383
|
+
class: H(["q-time-picker", { "q-time-picker--disabled": i.disabled }])
|
|
384
384
|
}, [
|
|
385
|
-
i.mobile ? (s(), m(
|
|
385
|
+
i.mobile ? (s(), m(P, { key: 1 }, [
|
|
386
386
|
f("div", {
|
|
387
|
-
class:
|
|
387
|
+
class: H(["q-time-picker__trigger", {
|
|
388
388
|
"q-time-picker__trigger--disabled": i.disabled,
|
|
389
389
|
[`q-time-picker__trigger--${i.size}`]: !0
|
|
390
390
|
}]),
|
|
391
391
|
onClick: Ve
|
|
392
392
|
}, [
|
|
393
|
-
|
|
393
|
+
E(oe, {
|
|
394
394
|
icon: "clock",
|
|
395
395
|
type: "outline",
|
|
396
396
|
width: 20,
|
|
@@ -403,7 +403,7 @@ const Ne = {
|
|
|
403
403
|
fe(g(he.value) + " ", 1),
|
|
404
404
|
i.timezone ? (s(), m("span", Ge, g(i.timezone), 1)) : _("", !0)
|
|
405
405
|
])) : (s(), m("span", je, g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)),
|
|
406
|
-
|
|
406
|
+
E(oe, {
|
|
407
407
|
icon: "chevron-down",
|
|
408
408
|
type: "line",
|
|
409
409
|
size: "sm",
|
|
@@ -412,40 +412,40 @@ const Ne = {
|
|
|
412
412
|
})
|
|
413
413
|
], 2),
|
|
414
414
|
(s(), de(Pe, { to: "#body" }, [
|
|
415
|
-
|
|
416
|
-
default:
|
|
417
|
-
|
|
415
|
+
E(ze, { name: "slide-up-fade" }, {
|
|
416
|
+
default: F(() => [
|
|
417
|
+
q.value ? (s(), de(Le, {
|
|
418
418
|
key: 0,
|
|
419
|
-
modelValue:
|
|
420
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
419
|
+
modelValue: q.value,
|
|
420
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => q.value = l),
|
|
421
421
|
"content-class": "px-4 pb-6 bg-gray-0",
|
|
422
422
|
"header-class": "border-b border-solid bg-gray-0 border-gray-10 !pb-4 rounded-t-lg",
|
|
423
423
|
"show-close-button": !1,
|
|
424
424
|
class: "q-time-picker-sheet"
|
|
425
425
|
}, {
|
|
426
|
-
header:
|
|
426
|
+
header: F(() => [
|
|
427
427
|
fe(g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)
|
|
428
428
|
]),
|
|
429
|
-
headerAction:
|
|
429
|
+
headerAction: F(() => [
|
|
430
430
|
f("button", {
|
|
431
431
|
class: "q-time-picker__done-btn",
|
|
432
432
|
type: "button",
|
|
433
433
|
onClick: Ce
|
|
434
434
|
}, g(e.$t(i.mobileButtonLabel)), 1)
|
|
435
435
|
]),
|
|
436
|
-
default:
|
|
436
|
+
default: F(() => [
|
|
437
437
|
f("div", Je, [
|
|
438
438
|
t[8] || (t[8] = f("div", { class: "q-time-picker__wheel-highlight" }, null, -1)),
|
|
439
439
|
f("div", {
|
|
440
440
|
ref_key: "hourColumnRef",
|
|
441
|
-
ref:
|
|
441
|
+
ref: O,
|
|
442
442
|
class: "q-time-picker__wheel-column",
|
|
443
443
|
onScroll: He
|
|
444
444
|
}, [
|
|
445
445
|
t[2] || (t[2] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
446
|
-
(s(!0), m(
|
|
446
|
+
(s(!0), m(P, null, ne(L.value, (l) => (s(), m("div", {
|
|
447
447
|
key: l,
|
|
448
|
-
class:
|
|
448
|
+
class: H(["q-time-picker__wheel-item", {
|
|
449
449
|
"q-time-picker__wheel-item--selected": l === b.value
|
|
450
450
|
}])
|
|
451
451
|
}, g(qe(l)), 3))), 128)),
|
|
@@ -454,15 +454,15 @@ const Ne = {
|
|
|
454
454
|
t[9] || (t[9] = f("div", { class: "q-time-picker__wheel-separator" }, ":", -1)),
|
|
455
455
|
f("div", {
|
|
456
456
|
ref_key: "minuteColumnRef",
|
|
457
|
-
ref:
|
|
457
|
+
ref: U,
|
|
458
458
|
class: "q-time-picker__wheel-column",
|
|
459
459
|
onScroll: xe
|
|
460
460
|
}, [
|
|
461
461
|
t[4] || (t[4] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
462
|
-
(s(!0), m(
|
|
462
|
+
(s(!0), m(P, null, ne($.value, (l) => (s(), m("div", {
|
|
463
463
|
key: l,
|
|
464
|
-
class:
|
|
465
|
-
"q-time-picker__wheel-item--selected": l ===
|
|
464
|
+
class: H(["q-time-picker__wheel-item", {
|
|
465
|
+
"q-time-picker__wheel-item--selected": l === D.value
|
|
466
466
|
}])
|
|
467
467
|
}, g(l.toString().padStart(2, "0")), 3))), 128)),
|
|
468
468
|
t[5] || (t[5] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1))
|
|
@@ -470,15 +470,15 @@ const Ne = {
|
|
|
470
470
|
i.format === "12h" ? (s(), m("div", {
|
|
471
471
|
key: 0,
|
|
472
472
|
ref_key: "periodColumnRef",
|
|
473
|
-
ref:
|
|
473
|
+
ref: W,
|
|
474
474
|
class: "q-time-picker__wheel-column q-time-picker__wheel-column--period",
|
|
475
475
|
onScroll: Ie
|
|
476
476
|
}, [
|
|
477
477
|
t[6] || (t[6] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
478
|
-
(s(!0), m(
|
|
478
|
+
(s(!0), m(P, null, ne(ge.value, (l) => (s(), m("div", {
|
|
479
479
|
key: l.value,
|
|
480
|
-
class:
|
|
481
|
-
"q-time-picker__wheel-item--selected": l.value ===
|
|
480
|
+
class: H(["q-time-picker__wheel-item", {
|
|
481
|
+
"q-time-picker__wheel-item--selected": l.value === A.value
|
|
482
482
|
}])
|
|
483
483
|
}, g(l.label), 3))), 128)),
|
|
484
484
|
t[7] || (t[7] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1))
|
|
@@ -493,13 +493,13 @@ const Ne = {
|
|
|
493
493
|
]))
|
|
494
494
|
], 64)) : (s(), m("div", Ne, [
|
|
495
495
|
f("div", {
|
|
496
|
-
class:
|
|
497
|
-
"q-time-picker__segments--focused":
|
|
496
|
+
class: H(["q-time-picker__segments", {
|
|
497
|
+
"q-time-picker__segments--focused": I.value,
|
|
498
498
|
"q-time-picker__segments--empty": !d.value && !p.value
|
|
499
499
|
}]),
|
|
500
|
-
onClick:
|
|
500
|
+
onClick: _e
|
|
501
501
|
}, [
|
|
502
|
-
|
|
502
|
+
E(oe, {
|
|
503
503
|
icon: "clock",
|
|
504
504
|
type: "outline",
|
|
505
505
|
width: 20,
|
|
@@ -508,7 +508,7 @@ const Ne = {
|
|
|
508
508
|
color: "inkwell-10",
|
|
509
509
|
class: "q-time-picker__clock-icon"
|
|
510
510
|
}),
|
|
511
|
-
|
|
511
|
+
X.value ? _("", !0) : (s(), m(P, { key: 0 }, [
|
|
512
512
|
f("input", {
|
|
513
513
|
ref_key: "hourInputRef",
|
|
514
514
|
ref: M,
|
|
@@ -518,42 +518,42 @@ const Ne = {
|
|
|
518
518
|
inputmode: "numeric",
|
|
519
519
|
placeholder: "--",
|
|
520
520
|
onKeydown: Me,
|
|
521
|
-
onFocus:
|
|
522
|
-
onBlur:
|
|
521
|
+
onFocus: ee,
|
|
522
|
+
onBlur: te
|
|
523
523
|
}, null, 40, Re),
|
|
524
524
|
t[1] || (t[1] = f("span", { class: "q-time-picker__segment-colon" }, ":", -1)),
|
|
525
525
|
f("input", {
|
|
526
526
|
ref_key: "minuteInputRef",
|
|
527
|
-
ref:
|
|
527
|
+
ref: T,
|
|
528
528
|
value: p.value,
|
|
529
529
|
class: "q-time-picker__segment q-time-picker__segment--minute",
|
|
530
530
|
tabindex: i.disabled ? -1 : 0,
|
|
531
531
|
inputmode: "numeric",
|
|
532
532
|
placeholder: "--",
|
|
533
533
|
onKeydown: Se,
|
|
534
|
-
onFocus:
|
|
535
|
-
onBlur:
|
|
534
|
+
onFocus: ee,
|
|
535
|
+
onBlur: te
|
|
536
536
|
}, null, 40, Fe),
|
|
537
537
|
i.format === "12h" ? (s(), m("input", {
|
|
538
538
|
key: 0,
|
|
539
539
|
ref_key: "periodInputRef",
|
|
540
|
-
ref:
|
|
540
|
+
ref: K,
|
|
541
541
|
value: ke.value,
|
|
542
542
|
class: "q-time-picker__segment q-time-picker__segment--period",
|
|
543
543
|
tabindex: i.disabled ? -1 : 0,
|
|
544
544
|
placeholder: "--",
|
|
545
545
|
onKeydown: we,
|
|
546
|
-
onFocus:
|
|
547
|
-
onBlur:
|
|
546
|
+
onFocus: ee,
|
|
547
|
+
onBlur: te
|
|
548
548
|
}, null, 40, Oe)) : _("", !0),
|
|
549
549
|
i.timezone ? (s(), m("span", Ue, g(i.timezone), 1)) : _("", !0)
|
|
550
550
|
], 64)),
|
|
551
|
-
|
|
551
|
+
X.value ? (s(), m("span", We, g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)) : _("", !0)
|
|
552
552
|
], 2),
|
|
553
|
-
|
|
553
|
+
E(Ke, {
|
|
554
554
|
id: i.id,
|
|
555
555
|
"model-value": pe.value,
|
|
556
|
-
options:
|
|
556
|
+
options: J.value,
|
|
557
557
|
placeholder: "",
|
|
558
558
|
disabled: i.disabled,
|
|
559
559
|
required: i.required,
|
|
@@ -564,7 +564,7 @@ const Ne = {
|
|
|
564
564
|
"close-on-select": !0,
|
|
565
565
|
"track-by": "value",
|
|
566
566
|
label: "label",
|
|
567
|
-
"onUpdate:modelValue":
|
|
567
|
+
"onUpdate:modelValue": Te
|
|
568
568
|
}, null, 8, ["id", "model-value", "options", "disabled", "required", "floating-label", "size", "allow-empty"])
|
|
569
569
|
]))
|
|
570
570
|
], 2));
|
package/dist/index186.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createVNode as s, defineComponent as nt, ref as k, onMounted as me, onUnmounted as at, h as Ye, watchEffect as Y, Teleport as lt, Transition as ot, computed as A, toRef as rt, inject as ge, watch as st, openBlock as ye, createElementBlock as be, provide as we, shallowRef as it, createElementVNode as Z, isVNode as ut } from "vue";
|
|
2
|
-
import { format as Ce } from "./
|
|
3
|
-
import { parse as ct } from "./
|
|
4
|
-
import { getWeek as Ie } from "./
|
|
5
|
-
import dt from "./
|
|
2
|
+
import { format as Ce } from "./index230.js";
|
|
3
|
+
import { parse as ct } from "./index231.js";
|
|
4
|
+
import { getWeek as Ie } from "./index232.js";
|
|
5
|
+
import dt from "./index233.js";
|
|
6
6
|
var ft = Object.defineProperty, pt = Object.defineProperties, vt = Object.getOwnPropertyDescriptors, le = Object.getOwnPropertySymbols, Ue = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable, Se = (t, e, n) => e in t ? ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e) => {
|
|
7
7
|
for (var n in e || (e = {}))
|
|
8
8
|
Ue.call(e, n) && Se(t, n, e[n]);
|