@quoreadmin/ui 1.10.12 → 1.10.14
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/index157.js +172 -163
- package/dist/index186.js +4 -4
- package/dist/index193.js +8 -8
- package/dist/index194.js +14 -3
- package/dist/index195.js +8 -8
- 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/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 +22 -3636
- package/dist/index250.js +22 -55
- package/dist/index251.js +20 -77
- package/dist/index252.js +823 -39
- package/dist/index253.js +685 -198
- package/dist/index254.js +175 -9
- package/dist/index255.js +22 -57
- package/dist/index256.js +20 -61
- package/dist/index257.js +20 -54
- package/dist/index258.js +3 -75
- package/dist/index259.js +170 -709
- package/dist/index260.js +128 -37
- package/dist/index261.js +1214 -55
- package/dist/index262.js +20 -11
- package/dist/index263.js +22 -705
- package/dist/index264.js +22 -820
- package/dist/index265.js +22 -15
- package/dist/index266.js +13 -15
- package/dist/index267.js +12 -12
- package/dist/index268.js +2 -836
- package/dist/index269.js +2 -702
- package/dist/index270.js +3630 -170
- package/dist/index271.js +55 -22
- package/dist/index272.js +77 -20
- package/dist/index273.js +52 -20
- package/dist/index274.js +215 -3
- package/dist/index275.js +10 -187
- package/dist/index276.js +52 -128
- package/dist/index277.js +52 -1214
- package/dist/index278.js +54 -20
- package/dist/index279.js +75 -22
- package/dist/index280.js +725 -21
- package/dist/index281.js +42 -29
- package/dist/index282.js +64 -20
- package/dist/index283.js +11 -20
- package/dist/index284.js +705 -2
- package/dist/index285.js +820 -2
- package/dist/index290.js +3 -54
- package/dist/index291.js +25 -77
- package/dist/index292.js +53 -25
- package/dist/index293.js +78 -21
- package/dist/index294.js +17 -13
- package/dist/index295.js +22 -16
- package/dist/index296.js +22 -17
- package/dist/index297.js +15 -22
- package/dist/index298.js +17 -2
- package/dist/index299.js +23 -1534
- package/dist/index3.js +2 -2
- package/dist/index300.js +2 -386
- package/dist/index301.js +1288 -2485
- package/dist/index302.js +370 -70
- package/dist/index303.js +2403 -3464
- package/dist/index304.js +77 -51
- package/dist/index305.js +3790 -13
- package/dist/index306.js +55 -79
- package/dist/index307.js +73 -196
- package/dist/index308.js +22 -246
- package/dist/index309.js +935 -3
- package/dist/index310.js +21 -26
- package/dist/index311.js +19 -78
- package/dist/index312.js +13 -15
- package/dist/index313.js +64 -930
- package/dist/index314.js +18 -21
- package/dist/index315.js +19 -20
- package/dist/index316.js +13 -11
- package/dist/index317.js +21 -68
- package/dist/index318.js +60 -16
- package/dist/index319.js +84 -19
- package/dist/index320.js +202 -22
- package/dist/index321.js +246 -22
- package/dist/index322.js +15 -63
- package/dist/index340.js +8 -36
- package/dist/index341.js +12 -8
- package/dist/index342.js +54 -12
- package/dist/index343.js +9 -52
- package/dist/index344.js +13 -11
- package/dist/index345.js +53 -9
- package/dist/index346.js +49 -55
- package/dist/index347.js +28 -49
- package/dist/index348.js +2 -31
- package/dist/index349.js +5 -2
- package/dist/index350.js +2 -5
- package/dist/index351.js +23 -2
- package/dist/index352.js +39 -21
- package/dist/index353.js +2 -41
- package/dist/index354.js +11 -2
- package/dist/index355.js +20 -11
- package/dist/index356.js +10 -20
- package/dist/index357.js +9 -9
- package/dist/index358.js +16 -9
- package/dist/index359.js +2 -17
- package/dist/index360.js +9 -2
- package/dist/index361.js +10 -9
- package/dist/index362.js +14 -10
- package/dist/index363.js +37 -14
- package/dist/index364.js +1 -1
- package/dist/index365.js +1 -1
- package/dist/index366.js +1 -1
- package/dist/index381.js +17 -91
- package/dist/index382.js +91 -98
- package/dist/index383.js +97 -16
- package/dist/index45.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index66.js +17 -17
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +1 -1
- package/package.json +1 -1
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
|
|
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 I, createElementVNode as f, createVNode as z, Fragment as K, createCommentVNode as T, toDisplayString as g, createTextVNode as fe, createBlock as de, Teleport as Pe, Transition as ze, withCtx as O, renderList as oe } from "vue";
|
|
2
2
|
import Ke from "./index46.js";
|
|
3
3
|
import $e from "./index7.js";
|
|
4
|
-
import
|
|
4
|
+
import ne from "./index28.js";
|
|
5
5
|
import { useI18n as Le } from "vue-i18n";
|
|
6
6
|
const Ne = {
|
|
7
7
|
key: 0,
|
|
@@ -43,35 +43,41 @@ const Ne = {
|
|
|
43
43
|
timezone: { default: "" }
|
|
44
44
|
},
|
|
45
45
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(
|
|
47
|
-
const a =
|
|
46
|
+
setup(i, { emit: ve }) {
|
|
47
|
+
const a = i, C = ve, { t: $ } = Le(), d = h(""), p = h(""), v = h(""), M = h(null), q = h(null), L = h(null), B = h(!1);
|
|
48
48
|
let S = "", w = "";
|
|
49
|
-
const
|
|
49
|
+
const D = h(!1), b = h(12), A = h(0), V = h("AM"), U = h(null), W = h(null), Q = h(null);
|
|
50
50
|
let G, j, J;
|
|
51
|
-
const
|
|
51
|
+
const H = 44, N = y(() => a.format === "24h" ? Array.from({ length: 24 }, (e, t) => t) : Array.from({ length: 12 }, (e, t) => t + 1)), R = y(() => {
|
|
52
52
|
const e = [];
|
|
53
53
|
for (let t = 0; t < 60; t += a.step)
|
|
54
54
|
e.push(t);
|
|
55
55
|
return e;
|
|
56
56
|
}), X = y(() => {
|
|
57
|
-
const e = [], t = a.minTime ? k(a.minTime) :
|
|
57
|
+
const e = [], t = a.minTime ? k(a.minTime) : null, l = a.maxTime ? k(a.maxTime) : null;
|
|
58
58
|
for (let o = 0; o < 1440; o += a.step) {
|
|
59
59
|
if (t !== null && o < t) continue;
|
|
60
60
|
if (l !== null && o > l) break;
|
|
61
|
-
const n = Math.floor(o / 60),
|
|
62
|
-
e.push({ label:
|
|
61
|
+
const n = Math.floor(o / 60), r = o % 60, u = E(n, r, a.format);
|
|
62
|
+
e.push({ label: u, value: u });
|
|
63
63
|
}
|
|
64
64
|
if (a.customTimes.length) {
|
|
65
|
-
for (const o of a.customTimes)
|
|
66
|
-
e.some((
|
|
65
|
+
for (const o of a.customTimes) {
|
|
66
|
+
if (e.some((r) => r.value === o.value)) continue;
|
|
67
|
+
const n = k(o.value);
|
|
68
|
+
n !== null && (t !== null && n < t || l !== null && n > l) || e.push(o);
|
|
69
|
+
}
|
|
67
70
|
e.sort((o, n) => {
|
|
68
|
-
const
|
|
69
|
-
return
|
|
71
|
+
const r = k(o.value) ?? 0, u = k(n.value) ?? 0;
|
|
72
|
+
return r - u;
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
if (a.showNow) {
|
|
73
|
-
const o = /* @__PURE__ */ new Date(), n = o.getHours() * 60 + o.getMinutes(),
|
|
74
|
-
|
|
76
|
+
const o = /* @__PURE__ */ new Date(), n = o.getHours() * 60 + o.getMinutes(), r = Math.round(n / a.step) * a.step, u = Math.floor(r / 60) % 24, ae = r % 60, x = u * 60 + ae;
|
|
77
|
+
if ((t === null || x >= t) && (l === null || x <= l)) {
|
|
78
|
+
const _ = E(u, ae, a.format);
|
|
79
|
+
e.unshift({ label: `${$("HC_NOW")} (${_})`, value: _ });
|
|
80
|
+
}
|
|
75
81
|
}
|
|
76
82
|
return e;
|
|
77
83
|
}), pe = y(() => {
|
|
@@ -83,69 +89,69 @@ const Ne = {
|
|
|
83
89
|
const t = k(a.modelValue);
|
|
84
90
|
if (t !== null) {
|
|
85
91
|
const l = X.value.find(
|
|
86
|
-
(
|
|
92
|
+
(u) => k(u.value) === t
|
|
87
93
|
);
|
|
88
94
|
if (l) return l;
|
|
89
|
-
const o = Math.floor(t / 60), n = t % 60,
|
|
90
|
-
return { label:
|
|
95
|
+
const o = Math.floor(t / 60), n = t % 60, r = E(o, n, a.format);
|
|
96
|
+
return { label: r, value: r };
|
|
91
97
|
}
|
|
92
98
|
return { label: a.modelValue, value: a.modelValue };
|
|
93
99
|
}), he = y(() => a.modelValue || ""), Y = y(
|
|
94
|
-
() => !d.value && !p.value && !
|
|
95
|
-
), ke = y(() => v.value ?
|
|
96
|
-
{ value: "AM", label:
|
|
97
|
-
{ value: "PM", label:
|
|
100
|
+
() => !d.value && !p.value && !B.value
|
|
101
|
+
), ke = y(() => v.value ? $(`HC_${v.value}`) : ""), ge = y(() => [
|
|
102
|
+
{ value: "AM", label: $("HC_AM") },
|
|
103
|
+
{ value: "PM", label: $("HC_PM") }
|
|
98
104
|
]), k = (e) => {
|
|
99
105
|
if (!e) return null;
|
|
100
106
|
const t = e.trim(), l = t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);
|
|
101
107
|
if (l) {
|
|
102
108
|
let n = parseInt(l[1], 10);
|
|
103
|
-
const
|
|
104
|
-
return
|
|
109
|
+
const r = parseInt(l[2], 10), u = l[3].toLowerCase();
|
|
110
|
+
return u === "pm" && n !== 12 && (n += 12), u === "am" && n === 12 && (n = 0), n * 60 + r;
|
|
105
111
|
}
|
|
106
112
|
const o = t.match(/^(\d{1,2}):(\d{2})$/);
|
|
107
113
|
if (o) {
|
|
108
|
-
const n = parseInt(o[1], 10),
|
|
109
|
-
if (n >= 0 && n <= 23 &&
|
|
110
|
-
return n * 60 +
|
|
114
|
+
const n = parseInt(o[1], 10), r = parseInt(o[2], 10);
|
|
115
|
+
if (n >= 0 && n <= 23 && r >= 0 && r <= 59)
|
|
116
|
+
return n * 60 + r;
|
|
111
117
|
}
|
|
112
118
|
return null;
|
|
113
|
-
},
|
|
119
|
+
}, E = (e, t, l) => {
|
|
114
120
|
const o = t.toString().padStart(2, "0");
|
|
115
121
|
if (l === "24h")
|
|
116
122
|
return `${e.toString().padStart(2, "0")}:${o}`;
|
|
117
123
|
const n = e >= 12 ? "PM" : "AM";
|
|
118
124
|
return `${e % 12 || 12}:${o} ${n}`;
|
|
119
|
-
},
|
|
125
|
+
}, re = (e, t, l, o, n) => {
|
|
120
126
|
if (!t) {
|
|
121
|
-
let
|
|
122
|
-
for (let
|
|
123
|
-
const se = e * 10 +
|
|
127
|
+
let x = !1;
|
|
128
|
+
for (let _ = 0; _ <= 9; _++) {
|
|
129
|
+
const se = e * 10 + _;
|
|
124
130
|
if (se >= l && se <= o) {
|
|
125
|
-
|
|
131
|
+
x = !0;
|
|
126
132
|
break;
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
|
-
return
|
|
135
|
+
return x ? {
|
|
130
136
|
value: e.toString(),
|
|
131
137
|
buffer: e.toString(),
|
|
132
138
|
complete: !1
|
|
133
139
|
} : e >= l && e <= o ? { value: n ? e.toString().padStart(2, "0") : e.toString(), buffer: "", complete: !0 } : { value: "", buffer: "", complete: !1 };
|
|
134
140
|
}
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
return { value: n ?
|
|
138
|
-
const
|
|
139
|
-
return { value:
|
|
140
|
-
},
|
|
141
|
+
const r = parseInt(t) * 10 + e;
|
|
142
|
+
if (r >= l && r <= o)
|
|
143
|
+
return { value: n ? r.toString().padStart(2, "0") : r.toString(), buffer: "", complete: !0 };
|
|
144
|
+
const u = parseInt(t);
|
|
145
|
+
return { value: u >= l && u <= o ? n ? u.toString().padStart(2, "0") : u.toString() : "", buffer: "", complete: !0 };
|
|
146
|
+
}, F = () => {
|
|
141
147
|
if (!S) return;
|
|
142
148
|
const e = a.format === "12h" ? 1 : 0, t = a.format === "12h" ? 12 : 23, l = a.format === "24h", o = parseInt(S);
|
|
143
149
|
o >= e && o <= t && (d.value = l ? o.toString().padStart(2, "0") : o.toString()), S = "";
|
|
144
|
-
},
|
|
150
|
+
}, P = () => {
|
|
145
151
|
if (!w) return;
|
|
146
152
|
const e = parseInt(w);
|
|
147
153
|
e >= 0 && e <= 59 && (p.value = e.toString().padStart(2, "0")), w = "";
|
|
148
|
-
},
|
|
154
|
+
}, c = () => {
|
|
149
155
|
const e = parseInt(d.value, 10), t = parseInt(p.value, 10);
|
|
150
156
|
if (isNaN(e) || isNaN(t)) {
|
|
151
157
|
!d.value && !p.value && !v.value && C("update:modelValue", "");
|
|
@@ -154,8 +160,8 @@ const Ne = {
|
|
|
154
160
|
if (a.format === "12h" && !v.value) return;
|
|
155
161
|
let l;
|
|
156
162
|
a.format === "12h" ? (l = e % 12, v.value === "PM" && (l += 12)) : l = e;
|
|
157
|
-
const o = l * 60 + t, n = a.minTime ? k(a.minTime) : null,
|
|
158
|
-
n !== null && o < n ||
|
|
163
|
+
const o = l * 60 + t, n = a.minTime ? k(a.minTime) : null, r = a.maxTime ? k(a.maxTime) : null;
|
|
164
|
+
n !== null && o < n || r !== null && o > r || C("update:modelValue", E(l, t, a.format));
|
|
159
165
|
}, be = () => {
|
|
160
166
|
if (!a.modelValue) {
|
|
161
167
|
d.value = "", p.value = "", v.value = "";
|
|
@@ -166,46 +172,46 @@ const Ne = {
|
|
|
166
172
|
const t = Math.floor(e / 60), l = e % 60;
|
|
167
173
|
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"));
|
|
168
174
|
}, Z = () => {
|
|
169
|
-
|
|
175
|
+
q.value?.focus();
|
|
170
176
|
}, ee = () => {
|
|
171
|
-
a.format === "12h" &&
|
|
172
|
-
}, re = (e) => {
|
|
173
|
-
let t = parseInt(d.value) || (a.format === "12h" ? 12 : 0);
|
|
174
|
-
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 = "", s();
|
|
177
|
+
a.format === "12h" && L.value?.focus();
|
|
175
178
|
}, ie = (e) => {
|
|
179
|
+
let t = parseInt(d.value) || (a.format === "12h" ? 12 : 0);
|
|
180
|
+
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();
|
|
181
|
+
}, ue = (e) => {
|
|
176
182
|
let t = parseInt(p.value);
|
|
177
|
-
isNaN(t) && (t = 0), t += e, t >= 60 && (t = 0), t < 0 && (t = 59), p.value = t.toString().padStart(2, "0"), w = "",
|
|
183
|
+
isNaN(t) && (t = 0), t += e, t >= 60 && (t = 0), t < 0 && (t = 59), p.value = t.toString().padStart(2, "0"), w = "", c();
|
|
178
184
|
}, ye = () => {
|
|
179
|
-
v.value ? v.value = v.value === "AM" ? "PM" : "AM" : v.value = "AM",
|
|
185
|
+
v.value ? v.value = v.value === "AM" ? "PM" : "AM" : v.value = "AM", c();
|
|
180
186
|
}, Me = (e) => {
|
|
181
187
|
if (e.key >= "0" && e.key <= "9") {
|
|
182
188
|
e.preventDefault();
|
|
183
|
-
const t = a.format === "12h" ? 1 : 0, l = a.format === "12h" ? 12 : 23, o = a.format === "24h", n =
|
|
189
|
+
const t = a.format === "12h" ? 1 : 0, l = a.format === "12h" ? 12 : 23, o = a.format === "24h", n = re(
|
|
184
190
|
parseInt(e.key),
|
|
185
191
|
S,
|
|
186
192
|
t,
|
|
187
193
|
l,
|
|
188
194
|
o
|
|
189
195
|
);
|
|
190
|
-
d.value = n.value, S = n.buffer, n.complete && (
|
|
196
|
+
d.value = n.value, S = n.buffer, n.complete && (c(), Z());
|
|
191
197
|
return;
|
|
192
198
|
}
|
|
193
199
|
switch (e.key) {
|
|
194
200
|
case "ArrowUp":
|
|
195
|
-
e.preventDefault(),
|
|
201
|
+
e.preventDefault(), ie(1);
|
|
196
202
|
break;
|
|
197
203
|
case "ArrowDown":
|
|
198
|
-
e.preventDefault(),
|
|
204
|
+
e.preventDefault(), ie(-1);
|
|
199
205
|
break;
|
|
200
206
|
case "ArrowRight":
|
|
201
|
-
e.preventDefault(),
|
|
207
|
+
e.preventDefault(), F(), c(), Z();
|
|
202
208
|
break;
|
|
203
209
|
case "Tab":
|
|
204
|
-
e.shiftKey ? (
|
|
210
|
+
e.shiftKey ? (F(), c()) : (e.preventDefault(), F(), c(), Z());
|
|
205
211
|
break;
|
|
206
212
|
case "Backspace":
|
|
207
213
|
case "Delete":
|
|
208
|
-
e.preventDefault(), d.value = "", S = "",
|
|
214
|
+
e.preventDefault(), d.value = "", S = "", c();
|
|
209
215
|
break;
|
|
210
216
|
case "ArrowLeft":
|
|
211
217
|
e.preventDefault();
|
|
@@ -216,35 +222,35 @@ const Ne = {
|
|
|
216
222
|
}, Se = (e) => {
|
|
217
223
|
if (e.key >= "0" && e.key <= "9") {
|
|
218
224
|
e.preventDefault();
|
|
219
|
-
const t =
|
|
225
|
+
const t = re(
|
|
220
226
|
parseInt(e.key),
|
|
221
227
|
w,
|
|
222
228
|
0,
|
|
223
229
|
59,
|
|
224
230
|
!0
|
|
225
231
|
);
|
|
226
|
-
p.value = t.value, w = t.buffer, t.complete && (
|
|
232
|
+
p.value = t.value, w = t.buffer, t.complete && (c(), ee());
|
|
227
233
|
return;
|
|
228
234
|
}
|
|
229
235
|
switch (e.key) {
|
|
230
236
|
case "ArrowUp":
|
|
231
|
-
e.preventDefault(),
|
|
237
|
+
e.preventDefault(), ue(1);
|
|
232
238
|
break;
|
|
233
239
|
case "ArrowDown":
|
|
234
|
-
e.preventDefault(),
|
|
240
|
+
e.preventDefault(), ue(-1);
|
|
235
241
|
break;
|
|
236
242
|
case "ArrowRight":
|
|
237
|
-
e.preventDefault(),
|
|
243
|
+
e.preventDefault(), P(), c(), a.format === "12h" && ee();
|
|
238
244
|
break;
|
|
239
245
|
case "Tab":
|
|
240
|
-
e.shiftKey ? (e.preventDefault(),
|
|
246
|
+
e.shiftKey ? (e.preventDefault(), P(), c(), M.value?.focus()) : (P(), c(), a.format === "12h" && (e.preventDefault(), ee()));
|
|
241
247
|
break;
|
|
242
248
|
case "ArrowLeft":
|
|
243
|
-
e.preventDefault(),
|
|
249
|
+
e.preventDefault(), P(), c(), M.value?.focus();
|
|
244
250
|
break;
|
|
245
251
|
case "Backspace":
|
|
246
252
|
case "Delete":
|
|
247
|
-
e.preventDefault(), p.value = "", w = "",
|
|
253
|
+
e.preventDefault(), p.value = "", w = "", c();
|
|
248
254
|
break;
|
|
249
255
|
default:
|
|
250
256
|
!e.ctrlKey && !e.metaKey && !e.altKey && e.key.length === 1 && e.preventDefault();
|
|
@@ -252,11 +258,11 @@ const Ne = {
|
|
|
252
258
|
}, we = (e) => {
|
|
253
259
|
const t = e.key.toLowerCase();
|
|
254
260
|
if (t === "a") {
|
|
255
|
-
e.preventDefault(), v.value = "AM",
|
|
261
|
+
e.preventDefault(), v.value = "AM", c();
|
|
256
262
|
return;
|
|
257
263
|
}
|
|
258
264
|
if (t === "p") {
|
|
259
|
-
e.preventDefault(), v.value = "PM",
|
|
265
|
+
e.preventDefault(), v.value = "PM", c();
|
|
260
266
|
return;
|
|
261
267
|
}
|
|
262
268
|
switch (e.key) {
|
|
@@ -265,32 +271,32 @@ const Ne = {
|
|
|
265
271
|
e.preventDefault(), ye();
|
|
266
272
|
break;
|
|
267
273
|
case "ArrowLeft":
|
|
268
|
-
e.preventDefault(),
|
|
274
|
+
e.preventDefault(), q.value?.focus();
|
|
269
275
|
break;
|
|
270
276
|
case "Tab":
|
|
271
|
-
e.shiftKey && (e.preventDefault(),
|
|
277
|
+
e.shiftKey && (e.preventDefault(), q.value?.focus());
|
|
272
278
|
break;
|
|
273
279
|
case "Backspace":
|
|
274
280
|
case "Delete":
|
|
275
|
-
e.preventDefault(), v.value = "",
|
|
281
|
+
e.preventDefault(), v.value = "", c();
|
|
276
282
|
break;
|
|
277
283
|
default:
|
|
278
284
|
!e.ctrlKey && !e.metaKey && !e.altKey && e.key.length === 1 && e.preventDefault();
|
|
279
285
|
}
|
|
280
286
|
}, te = () => {
|
|
281
|
-
|
|
287
|
+
B.value = !0;
|
|
282
288
|
}, le = () => {
|
|
283
289
|
requestAnimationFrame(() => {
|
|
284
290
|
const e = document.activeElement;
|
|
285
|
-
e !== M.value && e !==
|
|
291
|
+
e !== M.value && e !== q.value && e !== L.value && (B.value = !1, F(), P(), c());
|
|
286
292
|
});
|
|
287
293
|
}, _e = (e) => {
|
|
288
294
|
if (!a.disabled && !(e.target instanceof HTMLInputElement)) {
|
|
289
295
|
if (Y.value) {
|
|
290
|
-
|
|
296
|
+
B.value = !0, me(() => M.value?.focus());
|
|
291
297
|
return;
|
|
292
298
|
}
|
|
293
|
-
d.value ? p.value ? a.format === "12h" && !v.value ?
|
|
299
|
+
d.value ? p.value ? a.format === "12h" && !v.value ? L.value?.focus() : M.value?.focus() : q.value?.focus() : M.value?.focus();
|
|
294
300
|
}
|
|
295
301
|
}, Te = (e) => {
|
|
296
302
|
if (!e) {
|
|
@@ -301,86 +307,89 @@ const Ne = {
|
|
|
301
307
|
}, qe = (e) => a.format === "24h" ? e.toString().padStart(2, "0") : e.toString(), De = () => {
|
|
302
308
|
if (!a.modelValue) {
|
|
303
309
|
const n = /* @__PURE__ */ new Date();
|
|
304
|
-
b.value = a.format === "12h" ? n.getHours() % 12 || 12 : n.getHours(),
|
|
310
|
+
b.value = a.format === "12h" ? n.getHours() % 12 || 12 : n.getHours(), A.value = Math.floor(n.getMinutes() / a.step) * a.step, V.value = n.getHours() >= 12 ? "PM" : "AM";
|
|
305
311
|
return;
|
|
306
312
|
}
|
|
307
313
|
const e = k(a.modelValue);
|
|
308
314
|
if (e === null) return;
|
|
309
315
|
const t = Math.floor(e / 60), l = e % 60;
|
|
310
|
-
a.format === "12h" ? (b.value = t % 12 || 12,
|
|
316
|
+
a.format === "12h" ? (b.value = t % 12 || 12, V.value = t >= 12 ? "PM" : "AM") : b.value = t;
|
|
311
317
|
const o = Math.round(l / a.step) * a.step;
|
|
312
|
-
|
|
318
|
+
A.value = o >= 60 ? 60 - a.step : o;
|
|
313
319
|
}, Ae = (e = !0) => {
|
|
314
320
|
const t = e ? "smooth" : "instant";
|
|
315
321
|
if (U.value) {
|
|
316
|
-
const l =
|
|
322
|
+
const l = N.value.indexOf(b.value);
|
|
317
323
|
l >= 0 && U.value.scrollTo({
|
|
318
|
-
top: l *
|
|
324
|
+
top: l * H,
|
|
319
325
|
behavior: t
|
|
320
326
|
});
|
|
321
327
|
}
|
|
322
328
|
if (W.value) {
|
|
323
|
-
const l =
|
|
329
|
+
const l = R.value.indexOf(A.value);
|
|
324
330
|
l >= 0 && W.value.scrollTo({
|
|
325
|
-
top: l *
|
|
331
|
+
top: l * H,
|
|
326
332
|
behavior: t
|
|
327
333
|
});
|
|
328
334
|
}
|
|
329
335
|
if (Q.value && a.format === "12h") {
|
|
330
|
-
const l =
|
|
336
|
+
const l = V.value === "AM" ? 0 : 1;
|
|
331
337
|
Q.value.scrollTo({
|
|
332
|
-
top: l *
|
|
338
|
+
top: l * H,
|
|
333
339
|
behavior: t
|
|
334
340
|
});
|
|
335
341
|
}
|
|
336
342
|
}, Ve = () => {
|
|
337
|
-
a.disabled || (De(),
|
|
343
|
+
a.disabled || (De(), D.value = !0);
|
|
338
344
|
}, He = (e) => {
|
|
339
345
|
clearTimeout(G), G = setTimeout(() => {
|
|
340
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
341
|
-
b.value =
|
|
346
|
+
const t = e.target, l = Math.round(t.scrollTop / H), o = Math.max(0, Math.min(l, N.value.length - 1));
|
|
347
|
+
b.value = N.value[o];
|
|
342
348
|
}, 60);
|
|
343
|
-
},
|
|
349
|
+
}, xe = (e) => {
|
|
344
350
|
clearTimeout(j), j = setTimeout(() => {
|
|
345
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
351
|
+
const t = e.target, l = Math.round(t.scrollTop / H), o = Math.max(
|
|
346
352
|
0,
|
|
347
|
-
Math.min(l,
|
|
353
|
+
Math.min(l, R.value.length - 1)
|
|
348
354
|
);
|
|
349
|
-
|
|
355
|
+
A.value = R.value[o];
|
|
350
356
|
}, 60);
|
|
351
|
-
},
|
|
357
|
+
}, Ie = (e) => {
|
|
352
358
|
clearTimeout(J), J = setTimeout(() => {
|
|
353
|
-
const t = e.target, l = Math.round(t.scrollTop /
|
|
354
|
-
|
|
359
|
+
const t = e.target, l = Math.round(t.scrollTop / H);
|
|
360
|
+
V.value = l <= 0 ? "AM" : "PM";
|
|
355
361
|
}, 60);
|
|
356
|
-
},
|
|
362
|
+
}, Ce = () => {
|
|
357
363
|
let e;
|
|
358
|
-
a.format === "12h" ? (e = b.value % 12,
|
|
359
|
-
|
|
360
|
-
|
|
364
|
+
a.format === "12h" ? (e = b.value % 12, V.value === "PM" && (e += 12)) : e = b.value;
|
|
365
|
+
let t = e * 60 + A.value;
|
|
366
|
+
const l = a.minTime ? k(a.minTime) : null, o = a.maxTime ? k(a.maxTime) : null;
|
|
367
|
+
l !== null && t < l && (t = l), o !== null && t > o && (t = o);
|
|
368
|
+
const n = Math.floor(t / 60) % 24, r = t % 60, u = E(n, r, a.format);
|
|
369
|
+
C("update:modelValue", u), D.value = !1;
|
|
361
370
|
};
|
|
362
371
|
return ce(
|
|
363
372
|
[() => a.modelValue, () => a.format],
|
|
364
373
|
() => be(),
|
|
365
374
|
{ immediate: !0 }
|
|
366
|
-
), ce(
|
|
375
|
+
), ce(D, async (e) => {
|
|
367
376
|
e && (await me(), requestAnimationFrame(() => {
|
|
368
377
|
Ae(!1);
|
|
369
378
|
}));
|
|
370
379
|
}), Ee(() => {
|
|
371
380
|
clearTimeout(G), clearTimeout(j), clearTimeout(J);
|
|
372
|
-
}), (e, t) => (
|
|
373
|
-
class: I(["q-time-picker", { "q-time-picker--disabled":
|
|
381
|
+
}), (e, t) => (s(), m("div", {
|
|
382
|
+
class: I(["q-time-picker", { "q-time-picker--disabled": i.disabled }])
|
|
374
383
|
}, [
|
|
375
|
-
|
|
376
|
-
|
|
384
|
+
i.mobile ? (s(), m(K, { key: 1 }, [
|
|
385
|
+
f("div", {
|
|
377
386
|
class: I(["q-time-picker__trigger", {
|
|
378
|
-
"q-time-picker__trigger--disabled":
|
|
379
|
-
[`q-time-picker__trigger--${
|
|
387
|
+
"q-time-picker__trigger--disabled": i.disabled,
|
|
388
|
+
[`q-time-picker__trigger--${i.size}`]: !0
|
|
380
389
|
}]),
|
|
381
390
|
onClick: Ve
|
|
382
391
|
}, [
|
|
383
|
-
|
|
392
|
+
z(ne, {
|
|
384
393
|
icon: "clock",
|
|
385
394
|
type: "outline",
|
|
386
395
|
width: 20,
|
|
@@ -389,11 +398,11 @@ const Ne = {
|
|
|
389
398
|
color: "inkwell-10",
|
|
390
399
|
class: "q-time-picker__trigger-icon"
|
|
391
400
|
}),
|
|
392
|
-
|
|
401
|
+
i.modelValue ? (s(), m("span", Qe, [
|
|
393
402
|
fe(g(he.value) + " ", 1),
|
|
394
|
-
|
|
395
|
-
])) : (
|
|
396
|
-
|
|
403
|
+
i.timezone ? (s(), m("span", Ge, g(i.timezone), 1)) : T("", !0)
|
|
404
|
+
])) : (s(), m("span", je, g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)),
|
|
405
|
+
z(ne, {
|
|
397
406
|
icon: "chevron-down",
|
|
398
407
|
type: "line",
|
|
399
408
|
size: "sm",
|
|
@@ -401,95 +410,95 @@ const Ne = {
|
|
|
401
410
|
class: "q-time-picker__trigger-chevron"
|
|
402
411
|
})
|
|
403
412
|
], 2),
|
|
404
|
-
(
|
|
405
|
-
|
|
413
|
+
(s(), de(Pe, { to: "#body" }, [
|
|
414
|
+
z(ze, { name: "slide-up-fade" }, {
|
|
406
415
|
default: O(() => [
|
|
407
|
-
|
|
416
|
+
D.value ? (s(), de($e, {
|
|
408
417
|
key: 0,
|
|
409
|
-
modelValue:
|
|
410
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
418
|
+
modelValue: D.value,
|
|
419
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => D.value = l),
|
|
411
420
|
"content-class": "px-4 pb-6 bg-gray-0",
|
|
412
421
|
"header-class": "border-b border-solid bg-gray-0 border-gray-10 !pb-4 rounded-t-lg",
|
|
413
422
|
"show-close-button": !1,
|
|
414
423
|
class: "q-time-picker-sheet"
|
|
415
424
|
}, {
|
|
416
425
|
header: O(() => [
|
|
417
|
-
fe(g(
|
|
426
|
+
fe(g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)
|
|
418
427
|
]),
|
|
419
428
|
headerAction: O(() => [
|
|
420
|
-
|
|
429
|
+
f("button", {
|
|
421
430
|
class: "q-time-picker__done-btn",
|
|
422
431
|
type: "button",
|
|
423
|
-
onClick:
|
|
432
|
+
onClick: Ce
|
|
424
433
|
}, g(e.$t("HC_DONE")), 1)
|
|
425
434
|
]),
|
|
426
435
|
default: O(() => [
|
|
427
|
-
|
|
428
|
-
t[8] || (t[8] =
|
|
429
|
-
|
|
436
|
+
f("div", Je, [
|
|
437
|
+
t[8] || (t[8] = f("div", { class: "q-time-picker__wheel-highlight" }, null, -1)),
|
|
438
|
+
f("div", {
|
|
430
439
|
ref_key: "hourColumnRef",
|
|
431
440
|
ref: U,
|
|
432
441
|
class: "q-time-picker__wheel-column",
|
|
433
442
|
onScroll: He
|
|
434
443
|
}, [
|
|
435
|
-
t[2] || (t[2] =
|
|
436
|
-
(
|
|
444
|
+
t[2] || (t[2] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
445
|
+
(s(!0), m(K, null, oe(N.value, (l) => (s(), m("div", {
|
|
437
446
|
key: l,
|
|
438
447
|
class: I(["q-time-picker__wheel-item", {
|
|
439
448
|
"q-time-picker__wheel-item--selected": l === b.value
|
|
440
449
|
}])
|
|
441
450
|
}, g(qe(l)), 3))), 128)),
|
|
442
|
-
t[3] || (t[3] =
|
|
451
|
+
t[3] || (t[3] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1))
|
|
443
452
|
], 544),
|
|
444
|
-
t[9] || (t[9] =
|
|
445
|
-
|
|
453
|
+
t[9] || (t[9] = f("div", { class: "q-time-picker__wheel-separator" }, ":", -1)),
|
|
454
|
+
f("div", {
|
|
446
455
|
ref_key: "minuteColumnRef",
|
|
447
456
|
ref: W,
|
|
448
457
|
class: "q-time-picker__wheel-column",
|
|
449
|
-
onScroll:
|
|
458
|
+
onScroll: xe
|
|
450
459
|
}, [
|
|
451
|
-
t[4] || (t[4] =
|
|
452
|
-
(
|
|
460
|
+
t[4] || (t[4] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
461
|
+
(s(!0), m(K, null, oe(R.value, (l) => (s(), m("div", {
|
|
453
462
|
key: l,
|
|
454
463
|
class: I(["q-time-picker__wheel-item", {
|
|
455
|
-
"q-time-picker__wheel-item--selected": l ===
|
|
464
|
+
"q-time-picker__wheel-item--selected": l === A.value
|
|
456
465
|
}])
|
|
457
466
|
}, g(l.toString().padStart(2, "0")), 3))), 128)),
|
|
458
|
-
t[5] || (t[5] =
|
|
467
|
+
t[5] || (t[5] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1))
|
|
459
468
|
], 544),
|
|
460
|
-
|
|
469
|
+
i.format === "12h" ? (s(), m("div", {
|
|
461
470
|
key: 0,
|
|
462
471
|
ref_key: "periodColumnRef",
|
|
463
472
|
ref: Q,
|
|
464
473
|
class: "q-time-picker__wheel-column q-time-picker__wheel-column--period",
|
|
465
|
-
onScroll:
|
|
474
|
+
onScroll: Ie
|
|
466
475
|
}, [
|
|
467
|
-
t[6] || (t[6] =
|
|
468
|
-
(
|
|
476
|
+
t[6] || (t[6] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1)),
|
|
477
|
+
(s(!0), m(K, null, oe(ge.value, (l) => (s(), m("div", {
|
|
469
478
|
key: l.value,
|
|
470
479
|
class: I(["q-time-picker__wheel-item", {
|
|
471
|
-
"q-time-picker__wheel-item--selected": l.value ===
|
|
480
|
+
"q-time-picker__wheel-item--selected": l.value === V.value
|
|
472
481
|
}])
|
|
473
482
|
}, g(l.label), 3))), 128)),
|
|
474
|
-
t[7] || (t[7] =
|
|
475
|
-
], 544)) :
|
|
483
|
+
t[7] || (t[7] = f("div", { class: "q-time-picker__wheel-pad" }, null, -1))
|
|
484
|
+
], 544)) : T("", !0)
|
|
476
485
|
])
|
|
477
486
|
]),
|
|
478
487
|
_: 1
|
|
479
|
-
}, 8, ["modelValue"])) :
|
|
488
|
+
}, 8, ["modelValue"])) : T("", !0)
|
|
480
489
|
]),
|
|
481
490
|
_: 1
|
|
482
491
|
})
|
|
483
492
|
]))
|
|
484
|
-
], 64)) : (
|
|
485
|
-
|
|
493
|
+
], 64)) : (s(), m("div", Ne, [
|
|
494
|
+
f("div", {
|
|
486
495
|
class: I(["q-time-picker__segments", {
|
|
487
|
-
"q-time-picker__segments--focused":
|
|
496
|
+
"q-time-picker__segments--focused": B.value,
|
|
488
497
|
"q-time-picker__segments--empty": !d.value && !p.value
|
|
489
498
|
}]),
|
|
490
499
|
onClick: _e
|
|
491
500
|
}, [
|
|
492
|
-
|
|
501
|
+
z(ne, {
|
|
493
502
|
icon: "clock",
|
|
494
503
|
type: "outline",
|
|
495
504
|
width: 20,
|
|
@@ -498,59 +507,59 @@ const Ne = {
|
|
|
498
507
|
color: "inkwell-10",
|
|
499
508
|
class: "q-time-picker__clock-icon"
|
|
500
509
|
}),
|
|
501
|
-
Y.value ?
|
|
502
|
-
|
|
510
|
+
Y.value ? T("", !0) : (s(), m(K, { key: 0 }, [
|
|
511
|
+
f("input", {
|
|
503
512
|
ref_key: "hourInputRef",
|
|
504
513
|
ref: M,
|
|
505
514
|
value: d.value,
|
|
506
515
|
class: "q-time-picker__segment",
|
|
507
|
-
tabindex:
|
|
516
|
+
tabindex: i.disabled ? -1 : 0,
|
|
508
517
|
inputmode: "numeric",
|
|
509
518
|
placeholder: "--",
|
|
510
519
|
onKeydown: Me,
|
|
511
520
|
onFocus: te,
|
|
512
521
|
onBlur: le
|
|
513
522
|
}, null, 40, Re),
|
|
514
|
-
t[1] || (t[1] =
|
|
515
|
-
|
|
523
|
+
t[1] || (t[1] = f("span", { class: "q-time-picker__segment-colon" }, ":", -1)),
|
|
524
|
+
f("input", {
|
|
516
525
|
ref_key: "minuteInputRef",
|
|
517
|
-
ref:
|
|
526
|
+
ref: q,
|
|
518
527
|
value: p.value,
|
|
519
528
|
class: "q-time-picker__segment q-time-picker__segment--minute",
|
|
520
|
-
tabindex:
|
|
529
|
+
tabindex: i.disabled ? -1 : 0,
|
|
521
530
|
inputmode: "numeric",
|
|
522
531
|
placeholder: "--",
|
|
523
532
|
onKeydown: Se,
|
|
524
533
|
onFocus: te,
|
|
525
534
|
onBlur: le
|
|
526
535
|
}, null, 40, Fe),
|
|
527
|
-
|
|
536
|
+
i.format === "12h" ? (s(), m("input", {
|
|
528
537
|
key: 0,
|
|
529
538
|
ref_key: "periodInputRef",
|
|
530
|
-
ref:
|
|
539
|
+
ref: L,
|
|
531
540
|
value: ke.value,
|
|
532
541
|
class: "q-time-picker__segment q-time-picker__segment--period",
|
|
533
|
-
tabindex:
|
|
542
|
+
tabindex: i.disabled ? -1 : 0,
|
|
534
543
|
placeholder: "--",
|
|
535
544
|
onKeydown: we,
|
|
536
545
|
onFocus: te,
|
|
537
546
|
onBlur: le
|
|
538
|
-
}, null, 40, Oe)) :
|
|
539
|
-
|
|
547
|
+
}, null, 40, Oe)) : T("", !0),
|
|
548
|
+
i.timezone ? (s(), m("span", Ue, g(i.timezone), 1)) : T("", !0)
|
|
540
549
|
], 64)),
|
|
541
|
-
Y.value ? (
|
|
550
|
+
Y.value ? (s(), m("span", We, g(i.placeholder || e.$t("HC_SELECT_TIME")), 1)) : T("", !0)
|
|
542
551
|
], 2),
|
|
543
|
-
|
|
544
|
-
id:
|
|
552
|
+
z(Ke, {
|
|
553
|
+
id: i.id,
|
|
545
554
|
"model-value": pe.value,
|
|
546
555
|
options: X.value,
|
|
547
556
|
placeholder: "",
|
|
548
|
-
disabled:
|
|
549
|
-
required:
|
|
550
|
-
"floating-label":
|
|
551
|
-
size:
|
|
557
|
+
disabled: i.disabled,
|
|
558
|
+
required: i.required,
|
|
559
|
+
"floating-label": i.floatingLabel,
|
|
560
|
+
size: i.size,
|
|
552
561
|
searchable: !0,
|
|
553
|
-
"allow-empty":
|
|
562
|
+
"allow-empty": i.clearable,
|
|
554
563
|
"close-on-select": !0,
|
|
555
564
|
"track-by": "value",
|
|
556
565
|
label: "label",
|