golden-logic-ui 1.3.5 → 1.3.7
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.
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { computed as h, ref as B, watch as Y, onBeforeUnmount as Z, createElementBlock as d, openBlock as c, Fragment as D, createCommentVNode as g, normalizeClass as b, createElementVNode as a, toDisplayString as u, renderList as z, withKeys as V, withModifiers as j, createTextVNode as ee } from "vue";
|
|
2
|
+
const te = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "gl-label-form"
|
|
5
|
+
}, re = { class: "mt-1 text-gray-900 dark:text-white" }, ne = { dir: "ltr" }, ae = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
8
|
+
}, le = ["for"], oe = { class: "flex flex-col items-center gap-2 md:flex-row md:items-start" }, se = ["for"], ie = { class: "relative" }, ue = ["id", "name", "required", "placeholder", "value", "aria-expanded", "onFocus", "onInput", "onBlur", "onKeydown"], de = ["aria-label", "onClick"], ce = {
|
|
9
|
+
class: "flex items-center justify-center gap-2",
|
|
10
|
+
dir: "ltr"
|
|
11
|
+
}, me = { class: "flex flex-col items-center" }, ve = ["aria-label", "onClick"], ge = { class: "w-12 rounded-md border border-gray-300 bg-white py-1 text-center text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white" }, ye = ["aria-label", "onClick"], fe = { class: "flex flex-col items-center" }, he = ["aria-label", "onClick"], xe = { class: "w-12 rounded-md border border-gray-300 bg-white py-1 text-center text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white" }, be = ["aria-label", "onClick"], pe = { class: "ms-1 flex flex-col gap-1" }, ke = ["onClick"], _e = { class: "mt-4 flex flex-wrap items-center justify-between gap-2 border-t border-gray-200 pt-3 dark:border-gray-700" }, we = { dir: "ltr" }, $e = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "mt-1"
|
|
14
|
+
}, Se = { class: "gl-span-form-error" }, Me = {
|
|
15
|
+
key: 3,
|
|
16
|
+
class: "mt-1 block text-sm font-normal leading-5 text-gray-500"
|
|
17
|
+
}, Be = {
|
|
18
|
+
__name: "GlTimeRangePicker",
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => ({ start: "", end: "" })
|
|
23
|
+
},
|
|
24
|
+
field_name: { type: String, default: "" },
|
|
25
|
+
label_name: { type: String, default: "" },
|
|
26
|
+
label_name_start: { type: String, default: "" },
|
|
27
|
+
label_name_end: { type: String, default: "" },
|
|
28
|
+
placeholder_start: { type: String, default: "" },
|
|
29
|
+
placeholder_end: { type: String, default: "" },
|
|
30
|
+
description: { type: String, default: "" },
|
|
31
|
+
is_required: { type: Boolean, default: !1 },
|
|
32
|
+
show: { type: Boolean, default: !1 },
|
|
33
|
+
error_message: { type: String, default: "" },
|
|
34
|
+
container_class: { type: String, default: "" },
|
|
35
|
+
// Minutes moved by one press of the minute arrows
|
|
36
|
+
minute_step: { type: Number, default: 5 },
|
|
37
|
+
// Whether an end at or before the start means the next day. When false the
|
|
38
|
+
// end must be after the start, except that 00:00 is accepted as midnight
|
|
39
|
+
// (the end of the day), so a range is never longer than 24 hours.
|
|
40
|
+
allow_overnight: { type: Boolean, default: !0 },
|
|
41
|
+
// With overnight off: whether the end may equal the start, as a date range
|
|
42
|
+
// may start and end on the same day. Off, equal times are refused.
|
|
43
|
+
allow_equal: { type: Boolean, default: !0 },
|
|
44
|
+
// Show the line explaining the range ("… · 9 hours", "Closes the next day …")
|
|
45
|
+
show_summary: { type: Boolean, default: !0 },
|
|
46
|
+
// "en" and "ar" are built in; anything else falls back to English
|
|
47
|
+
locale: { type: String, default: "en" },
|
|
48
|
+
// Override any built-in text, e.g. from the app's own language files
|
|
49
|
+
labels: { type: Object, default: () => ({}) }
|
|
50
|
+
},
|
|
51
|
+
emits: ["update:modelValue", "change"],
|
|
52
|
+
setup(l, { expose: U, emit: G }) {
|
|
53
|
+
const s = l, F = G, L = {
|
|
54
|
+
en: {
|
|
55
|
+
midnight: "Midnight",
|
|
56
|
+
clear: "Clear",
|
|
57
|
+
done: "Done",
|
|
58
|
+
pick_time: "Pick a time",
|
|
59
|
+
later: "Later",
|
|
60
|
+
earlier: "Earlier",
|
|
61
|
+
until_midnight: "until midnight",
|
|
62
|
+
next_day: "closes the next day",
|
|
63
|
+
all_day: "open 24 hours",
|
|
64
|
+
end_after_start: "The end time must be after the start time.",
|
|
65
|
+
end_not_before_start: "The end time must not be before the start time.",
|
|
66
|
+
invalid: "Enter a time such as 8:30 AM."
|
|
67
|
+
},
|
|
68
|
+
ar: {
|
|
69
|
+
midnight: "منتصف الليل",
|
|
70
|
+
clear: "مسح",
|
|
71
|
+
done: "تم",
|
|
72
|
+
pick_time: "اختر الوقت",
|
|
73
|
+
later: "لاحقاً",
|
|
74
|
+
earlier: "أبكر",
|
|
75
|
+
until_midnight: "حتى منتصف الليل",
|
|
76
|
+
next_day: "يغلق في اليوم التالي",
|
|
77
|
+
all_day: "مفتوح 24 ساعة",
|
|
78
|
+
end_after_start: "يجب أن يكون وقت الانتهاء بعد وقت البدء.",
|
|
79
|
+
end_not_before_start: "يجب ألا يكون وقت الانتهاء قبل وقت البدء.",
|
|
80
|
+
invalid: "أدخل وقتاً مثل 8:30 AM."
|
|
81
|
+
}
|
|
82
|
+
}, O = h(() => s.locale && s.locale.startsWith("ar") ? "ar" : "en"), m = (r) => s.labels[r] || L[O.value][r] || L.en[r] || r, i = B({ start: "", end: "" }), p = B({ start: null, end: null }), k = B(null), q = B(""), _ = B(null), E = (r) => {
|
|
83
|
+
if (r == null)
|
|
84
|
+
return null;
|
|
85
|
+
const e = String(r).trim();
|
|
86
|
+
if (e === "")
|
|
87
|
+
return "";
|
|
88
|
+
const t = e.match(/^(\d{1,2})(?::(\d{1,2}))?(?::\d{1,2})?\s*([ap])\.?\s*m?\.?$/i) || e.match(/^(\d{1,2})(?::(\d{1,2}))?(?::\d{1,2})?$/);
|
|
89
|
+
if (!t)
|
|
90
|
+
return null;
|
|
91
|
+
let n = parseInt(t[1], 10);
|
|
92
|
+
const v = parseInt(t[2] || "0", 10), o = t[3] ? t[3].toUpperCase() : null;
|
|
93
|
+
if (v > 59)
|
|
94
|
+
return null;
|
|
95
|
+
if (o) {
|
|
96
|
+
if (n < 1 || n > 12)
|
|
97
|
+
return null;
|
|
98
|
+
n = n % 12 + (o === "P" ? 12 : 0);
|
|
99
|
+
} else if (n > 23)
|
|
100
|
+
return null;
|
|
101
|
+
return `${String(n).padStart(2, "0")}:${String(v).padStart(2, "0")}`;
|
|
102
|
+
};
|
|
103
|
+
Y(
|
|
104
|
+
() => s.modelValue,
|
|
105
|
+
(r) => {
|
|
106
|
+
i.value.start = E(r?.start) ?? "", i.value.end = E(r?.end) ?? "";
|
|
107
|
+
},
|
|
108
|
+
{ immediate: !0, deep: !0 }
|
|
109
|
+
);
|
|
110
|
+
const y = (r) => {
|
|
111
|
+
const [e, t] = r.split(":").map(Number);
|
|
112
|
+
return e * 60 + t;
|
|
113
|
+
}, A = (r) => {
|
|
114
|
+
const e = (r % 1440 + 1440) % 1440;
|
|
115
|
+
return `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`;
|
|
116
|
+
}, P = (r) => {
|
|
117
|
+
const e = r || "08:00", [t, n] = e.split(":").map(Number);
|
|
118
|
+
return { hour12: t % 12 || 12, minute: n, meridiem: t >= 12 ? "PM" : "AM" };
|
|
119
|
+
}, w = (r) => {
|
|
120
|
+
const e = E(r);
|
|
121
|
+
if (!e)
|
|
122
|
+
return "";
|
|
123
|
+
const t = P(e);
|
|
124
|
+
return `${t.hour12}:${String(t.minute).padStart(2, "0")} ${t.meridiem}`;
|
|
125
|
+
}, R = () => {
|
|
126
|
+
const r = { start: i.value.start, end: i.value.end };
|
|
127
|
+
q.value = "", F("update:modelValue", r), F("change", r);
|
|
128
|
+
}, $ = (r, e) => {
|
|
129
|
+
i.value[r] = e, p.value[r] = null, R();
|
|
130
|
+
}, x = (r, e, t) => {
|
|
131
|
+
const n = i.value[r] || (r === "end" ? "17:00" : "08:00"), v = e === "hour" ? t * 60 : t * s.minute_step;
|
|
132
|
+
let o = y(n) + v;
|
|
133
|
+
e === "minute" && s.minute_step > 1 && (o = t > 0 ? Math.floor(o / s.minute_step) * s.minute_step : Math.ceil(o / s.minute_step) * s.minute_step), $(r, A(o));
|
|
134
|
+
}, H = (r, e) => {
|
|
135
|
+
const t = i.value[r] || (r === "end" ? "17:00" : "08:00"), n = y(t), v = n >= 720;
|
|
136
|
+
e === "PM" !== v && $(r, A(n + (e === "PM" ? 720 : -720)));
|
|
137
|
+
}, I = (r) => {
|
|
138
|
+
const e = p.value[r];
|
|
139
|
+
if (e === null)
|
|
140
|
+
return;
|
|
141
|
+
const t = E(e);
|
|
142
|
+
if (t === null) {
|
|
143
|
+
q.value = m("invalid");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
$(r, t);
|
|
147
|
+
}, K = (r) => {
|
|
148
|
+
k.value = r, document.addEventListener("mousedown", T);
|
|
149
|
+
}, f = () => {
|
|
150
|
+
k.value = null, document.removeEventListener("mousedown", T);
|
|
151
|
+
}, T = (r) => {
|
|
152
|
+
_.value && !_.value.contains(r.target) && f();
|
|
153
|
+
}, J = (r) => {
|
|
154
|
+
_.value && !_.value.contains(r.relatedTarget) && f();
|
|
155
|
+
};
|
|
156
|
+
Z(() => document.removeEventListener("mousedown", T));
|
|
157
|
+
const S = h(() => {
|
|
158
|
+
const { start: r, end: e } = i.value;
|
|
159
|
+
if (!r || !e)
|
|
160
|
+
return null;
|
|
161
|
+
const t = y(r), n = y(e);
|
|
162
|
+
if (s.allow_overnight)
|
|
163
|
+
return n > t ? n - t : n + 1440 - t;
|
|
164
|
+
const v = e === "00:00" ? 1440 : n;
|
|
165
|
+
return v >= t ? v - t : null;
|
|
166
|
+
}), N = h(() => {
|
|
167
|
+
const { start: r, end: e } = i.value;
|
|
168
|
+
return s.allow_overnight && !!r && !!e && y(e) <= y(r);
|
|
169
|
+
}), Q = h(() => {
|
|
170
|
+
const { start: r, end: e } = i.value;
|
|
171
|
+
if (s.allow_overnight || !r || !e)
|
|
172
|
+
return "";
|
|
173
|
+
const t = y(r), n = e === "00:00" ? 1440 : y(e);
|
|
174
|
+
return n > t || n === t && s.allow_equal ? "" : m(s.allow_equal ? "end_not_before_start" : "end_after_start");
|
|
175
|
+
}), W = h(() => q.value || Q.value), M = h(() => s.error_message !== "" || W.value !== ""), X = (r) => {
|
|
176
|
+
const e = Math.floor(r / 60), t = r % 60;
|
|
177
|
+
if (O.value === "ar") {
|
|
178
|
+
const n = (o) => o === 1 ? "ساعة واحدة" : o === 2 ? "ساعتان" : o <= 10 ? `${o} ساعات` : `${o} ساعة`, v = (o) => o === 1 ? "دقيقة واحدة" : o === 2 ? "دقيقتان" : o <= 10 ? `${o} دقائق` : `${o} دقيقة`;
|
|
179
|
+
return [e ? n(e) : "", t ? v(t) : ""].filter(Boolean).join(" و ");
|
|
180
|
+
}
|
|
181
|
+
return [
|
|
182
|
+
e ? `${e} ${e === 1 ? "hour" : "hours"}` : "",
|
|
183
|
+
t ? `${t} ${t === 1 ? "minute" : "minutes"}` : ""
|
|
184
|
+
].filter(Boolean).join(" ");
|
|
185
|
+
}, C = h(() => {
|
|
186
|
+
if (!s.show_summary || S.value === null)
|
|
187
|
+
return null;
|
|
188
|
+
const { end: r } = i.value;
|
|
189
|
+
if (S.value === 1440)
|
|
190
|
+
return { text: m("all_day"), overnight: N.value };
|
|
191
|
+
if (S.value === 0)
|
|
192
|
+
return null;
|
|
193
|
+
const e = X(S.value);
|
|
194
|
+
return r === "00:00" ? { text: `${m("until_midnight")} · ${e}`, overnight: !1 } : N.value ? { text: `${m("next_day")} · ${e}`, overnight: !0 } : { text: e, overnight: !1 };
|
|
195
|
+
});
|
|
196
|
+
return U({ span: S, isOvernight: N }), (r, e) => (c(), d(D, null, [
|
|
197
|
+
l.show ? (c(), d("div", {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: b(["md:col-span-2", l.field_name])
|
|
200
|
+
}, [
|
|
201
|
+
l.label_name ? (c(), d("label", te, u(l.label_name), 1)) : g("", !0),
|
|
202
|
+
a("p", re, [
|
|
203
|
+
a("span", ne, u(w(l.modelValue.start)) + " – " + u(w(l.modelValue.end)), 1)
|
|
204
|
+
]),
|
|
205
|
+
C.value ? (c(), d("p", ae, u(C.value.text), 1)) : g("", !0),
|
|
206
|
+
e[6] || (e[6] = a("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
207
|
+
], 2)) : g("", !0),
|
|
208
|
+
l.show ? g("", !0) : (c(), d("div", {
|
|
209
|
+
key: 1,
|
|
210
|
+
ref_key: "root",
|
|
211
|
+
ref: _,
|
|
212
|
+
class: b(["md:col-span-2", {
|
|
213
|
+
[l.field_name]: l.field_name && l.field_name !== "",
|
|
214
|
+
[l.container_class]: l.container_class && l.container_class !== ""
|
|
215
|
+
}]),
|
|
216
|
+
onFocusout: J
|
|
217
|
+
}, [
|
|
218
|
+
l.label_name ? (c(), d("label", {
|
|
219
|
+
key: 0,
|
|
220
|
+
class: b({
|
|
221
|
+
"gl-label-form": !M.value,
|
|
222
|
+
"gl-label-form-invalid": M.value,
|
|
223
|
+
required: l.is_required
|
|
224
|
+
}),
|
|
225
|
+
for: l.field_name + "_start"
|
|
226
|
+
}, u(l.label_name), 11, le)) : g("", !0),
|
|
227
|
+
a("div", oe, [
|
|
228
|
+
(c(), d(D, null, z(["start", "end"], (t) => a("div", {
|
|
229
|
+
key: t,
|
|
230
|
+
class: "relative w-full md:flex-1"
|
|
231
|
+
}, [
|
|
232
|
+
(t === "start" ? l.label_name_start : l.label_name_end) ? (c(), d("label", {
|
|
233
|
+
key: 0,
|
|
234
|
+
for: l.field_name + "_" + t,
|
|
235
|
+
class: "gl-label-form"
|
|
236
|
+
}, u(t === "start" ? l.label_name_start : l.label_name_end), 9, se)) : g("", !0),
|
|
237
|
+
a("div", ie, [
|
|
238
|
+
a("input", {
|
|
239
|
+
id: l.field_name + "_" + t,
|
|
240
|
+
name: l.field_name + "_" + t,
|
|
241
|
+
type: "text",
|
|
242
|
+
dir: "ltr",
|
|
243
|
+
autocomplete: "off",
|
|
244
|
+
required: l.is_required,
|
|
245
|
+
placeholder: t === "start" ? l.placeholder_start : l.placeholder_end,
|
|
246
|
+
value: p.value[t] !== null ? p.value[t] : w(i.value[t]),
|
|
247
|
+
class: b([M.value ? "gl-input-form-invalid" : "gl-input-form", "pe-10 text-start"]),
|
|
248
|
+
"aria-expanded": k.value === t,
|
|
249
|
+
onFocus: (n) => K(t),
|
|
250
|
+
onInput: (n) => p.value[t] = n.target.value,
|
|
251
|
+
onBlur: (n) => I(t),
|
|
252
|
+
onKeydown: [
|
|
253
|
+
V(j((n) => {
|
|
254
|
+
I(t), f();
|
|
255
|
+
}, ["prevent"]), ["enter"]),
|
|
256
|
+
e[0] || (e[0] = V((n) => f(), ["esc"])),
|
|
257
|
+
V(j((n) => x(t, "minute", 1), ["prevent"]), ["up"]),
|
|
258
|
+
V(j((n) => x(t, "minute", -1), ["prevent"]), ["down"])
|
|
259
|
+
]
|
|
260
|
+
}, null, 42, ue),
|
|
261
|
+
a("button", {
|
|
262
|
+
type: "button",
|
|
263
|
+
tabindex: "-1",
|
|
264
|
+
class: "absolute inset-y-0 end-0 flex items-center pe-3 text-gray-500 dark:text-gray-400",
|
|
265
|
+
"aria-label": m("pick_time"),
|
|
266
|
+
onMousedown: e[1] || (e[1] = j(() => {
|
|
267
|
+
}, ["prevent"])),
|
|
268
|
+
onClick: (n) => k.value === t ? f() : K(t)
|
|
269
|
+
}, e[7] || (e[7] = [
|
|
270
|
+
a("svg", {
|
|
271
|
+
class: "h-4 w-4",
|
|
272
|
+
"aria-hidden": "true",
|
|
273
|
+
fill: "none",
|
|
274
|
+
stroke: "currentColor",
|
|
275
|
+
viewBox: "0 0 24 24"
|
|
276
|
+
}, [
|
|
277
|
+
a("circle", {
|
|
278
|
+
cx: "12",
|
|
279
|
+
cy: "12",
|
|
280
|
+
r: "9",
|
|
281
|
+
"stroke-width": "2"
|
|
282
|
+
}),
|
|
283
|
+
a("path", {
|
|
284
|
+
"stroke-linecap": "round",
|
|
285
|
+
"stroke-linejoin": "round",
|
|
286
|
+
"stroke-width": "2",
|
|
287
|
+
d: "M12 7v5l3 2"
|
|
288
|
+
})
|
|
289
|
+
], -1)
|
|
290
|
+
]), 40, de)
|
|
291
|
+
]),
|
|
292
|
+
k.value === t ? (c(), d("div", {
|
|
293
|
+
key: 1,
|
|
294
|
+
class: "absolute start-0 z-50 mt-1 w-72 rounded-lg border border-gray-200 bg-white p-4 shadow-lg dark:border-gray-700 dark:bg-gray-800",
|
|
295
|
+
onMousedown: e[5] || (e[5] = j(() => {
|
|
296
|
+
}, ["prevent"]))
|
|
297
|
+
}, [
|
|
298
|
+
a("div", ce, [
|
|
299
|
+
a("div", me, [
|
|
300
|
+
a("button", {
|
|
301
|
+
type: "button",
|
|
302
|
+
class: "p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
303
|
+
"aria-label": m("later"),
|
|
304
|
+
onClick: (n) => x(t, "hour", 1)
|
|
305
|
+
}, e[8] || (e[8] = [
|
|
306
|
+
a("svg", {
|
|
307
|
+
class: "h-3 w-3",
|
|
308
|
+
fill: "none",
|
|
309
|
+
stroke: "currentColor",
|
|
310
|
+
viewBox: "0 0 24 24"
|
|
311
|
+
}, [
|
|
312
|
+
a("path", {
|
|
313
|
+
"stroke-linecap": "round",
|
|
314
|
+
"stroke-linejoin": "round",
|
|
315
|
+
"stroke-width": "2",
|
|
316
|
+
d: "M5 15l7-7 7 7"
|
|
317
|
+
})
|
|
318
|
+
], -1)
|
|
319
|
+
]), 8, ve),
|
|
320
|
+
a("span", ge, u(String(P(i.value[t]).hour12).padStart(2, "0")), 1),
|
|
321
|
+
a("button", {
|
|
322
|
+
type: "button",
|
|
323
|
+
class: "p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
324
|
+
"aria-label": m("earlier"),
|
|
325
|
+
onClick: (n) => x(t, "hour", -1)
|
|
326
|
+
}, e[9] || (e[9] = [
|
|
327
|
+
a("svg", {
|
|
328
|
+
class: "h-3 w-3",
|
|
329
|
+
fill: "none",
|
|
330
|
+
stroke: "currentColor",
|
|
331
|
+
viewBox: "0 0 24 24"
|
|
332
|
+
}, [
|
|
333
|
+
a("path", {
|
|
334
|
+
"stroke-linecap": "round",
|
|
335
|
+
"stroke-linejoin": "round",
|
|
336
|
+
"stroke-width": "2",
|
|
337
|
+
d: "M19 9l-7 7-7-7"
|
|
338
|
+
})
|
|
339
|
+
], -1)
|
|
340
|
+
]), 8, ye)
|
|
341
|
+
]),
|
|
342
|
+
e[12] || (e[12] = a("span", { class: "pb-1 text-lg font-semibold text-gray-900 dark:text-white" }, ":", -1)),
|
|
343
|
+
a("div", fe, [
|
|
344
|
+
a("button", {
|
|
345
|
+
type: "button",
|
|
346
|
+
class: "p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
347
|
+
"aria-label": m("later"),
|
|
348
|
+
onClick: (n) => x(t, "minute", 1)
|
|
349
|
+
}, e[10] || (e[10] = [
|
|
350
|
+
a("svg", {
|
|
351
|
+
class: "h-3 w-3",
|
|
352
|
+
fill: "none",
|
|
353
|
+
stroke: "currentColor",
|
|
354
|
+
viewBox: "0 0 24 24"
|
|
355
|
+
}, [
|
|
356
|
+
a("path", {
|
|
357
|
+
"stroke-linecap": "round",
|
|
358
|
+
"stroke-linejoin": "round",
|
|
359
|
+
"stroke-width": "2",
|
|
360
|
+
d: "M5 15l7-7 7 7"
|
|
361
|
+
})
|
|
362
|
+
], -1)
|
|
363
|
+
]), 8, he),
|
|
364
|
+
a("span", xe, u(String(P(i.value[t]).minute).padStart(2, "0")), 1),
|
|
365
|
+
a("button", {
|
|
366
|
+
type: "button",
|
|
367
|
+
class: "p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
368
|
+
"aria-label": m("earlier"),
|
|
369
|
+
onClick: (n) => x(t, "minute", -1)
|
|
370
|
+
}, e[11] || (e[11] = [
|
|
371
|
+
a("svg", {
|
|
372
|
+
class: "h-3 w-3",
|
|
373
|
+
fill: "none",
|
|
374
|
+
stroke: "currentColor",
|
|
375
|
+
viewBox: "0 0 24 24"
|
|
376
|
+
}, [
|
|
377
|
+
a("path", {
|
|
378
|
+
"stroke-linecap": "round",
|
|
379
|
+
"stroke-linejoin": "round",
|
|
380
|
+
"stroke-width": "2",
|
|
381
|
+
d: "M19 9l-7 7-7-7"
|
|
382
|
+
})
|
|
383
|
+
], -1)
|
|
384
|
+
]), 8, be)
|
|
385
|
+
]),
|
|
386
|
+
a("div", pe, [
|
|
387
|
+
(c(), d(D, null, z(["AM", "PM"], (n) => a("button", {
|
|
388
|
+
key: n,
|
|
389
|
+
type: "button",
|
|
390
|
+
class: b(["rounded-md px-2 py-1 text-xs font-medium transition-colors", P(i.value[t]).meridiem === n ? "bg-primary text-white dark:bg-primaryDark" : "bg-gray-100 text-gray-600 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"]),
|
|
391
|
+
onClick: (v) => H(t, n)
|
|
392
|
+
}, u(n), 11, ke)), 64))
|
|
393
|
+
])
|
|
394
|
+
]),
|
|
395
|
+
a("div", _e, [
|
|
396
|
+
t === "end" ? (c(), d("button", {
|
|
397
|
+
key: 0,
|
|
398
|
+
type: "button",
|
|
399
|
+
class: "text-sm font-medium text-primary hover:text-primary/80 dark:text-primaryDark",
|
|
400
|
+
onClick: e[2] || (e[2] = (n) => {
|
|
401
|
+
$("end", "00:00"), f();
|
|
402
|
+
})
|
|
403
|
+
}, u(m("midnight")), 1)) : (c(), d("button", {
|
|
404
|
+
key: 1,
|
|
405
|
+
type: "button",
|
|
406
|
+
class: "text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",
|
|
407
|
+
onClick: e[3] || (e[3] = (n) => {
|
|
408
|
+
$("start", ""), f();
|
|
409
|
+
})
|
|
410
|
+
}, u(m("clear")), 1)),
|
|
411
|
+
a("button", {
|
|
412
|
+
type: "button",
|
|
413
|
+
class: "text-sm font-medium text-primary hover:text-primary/80 dark:text-primaryDark",
|
|
414
|
+
onClick: e[4] || (e[4] = (n) => f())
|
|
415
|
+
}, u(m("done")), 1)
|
|
416
|
+
])
|
|
417
|
+
], 32)) : g("", !0)
|
|
418
|
+
])), 64))
|
|
419
|
+
]),
|
|
420
|
+
C.value && !M.value ? (c(), d("p", {
|
|
421
|
+
key: 1,
|
|
422
|
+
class: b(["mt-1.5 text-sm", C.value.overnight ? "text-amber-700 dark:text-amber-400" : "text-gray-500 dark:text-gray-400"])
|
|
423
|
+
}, [
|
|
424
|
+
a("span", we, u(w(i.value.start)) + " – " + u(w(i.value.end)), 1),
|
|
425
|
+
ee(" · " + u(C.value.text), 1)
|
|
426
|
+
], 2)) : g("", !0),
|
|
427
|
+
M.value ? (c(), d("div", $e, [
|
|
428
|
+
a("span", Se, u(l.error_message || W.value), 1)
|
|
429
|
+
])) : g("", !0),
|
|
430
|
+
l.description ? (c(), d("small", Me, u(l.description), 1)) : g("", !0)
|
|
431
|
+
], 34))
|
|
432
|
+
], 64));
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
export {
|
|
436
|
+
Be as default
|
|
437
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -11,135 +11,137 @@ import { default as b } from "./components/GeneralComponents/GlDatePicker.vue.js
|
|
|
11
11
|
import { default as C } from "./components/GeneralComponents/GlDateTimePicker.vue.js";
|
|
12
12
|
import { default as L } from "./components/GeneralComponents/GlDateRangePicker.vue.js";
|
|
13
13
|
import { default as P } from "./components/GeneralComponents/GlDateTimeRangePicker.vue.js";
|
|
14
|
-
import { default as y } from "./components/GeneralComponents/
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as A } from "./components/GeneralComponents/
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as h } from "./components/GeneralComponents/
|
|
19
|
-
import { default as H } from "./components/GeneralComponents/
|
|
20
|
-
import { default as E } from "./components/GeneralComponents/
|
|
21
|
-
import { default as U } from "./components/GeneralComponents/
|
|
22
|
-
import { default as q } from "./components/GeneralComponents/
|
|
23
|
-
import { default as J } from "./components/GeneralComponents/
|
|
24
|
-
import { default as Q } from "./components/GeneralComponents/
|
|
25
|
-
import { default as X } from "./components/GeneralComponents/
|
|
26
|
-
import { default as Z } from "./components/GeneralComponents/
|
|
27
|
-
import { default as $ } from "./components/GeneralComponents/
|
|
28
|
-
import { default as ea } from "./components/GeneralComponents/
|
|
29
|
-
import { default as oa } from "./components/GeneralComponents/
|
|
30
|
-
import { default as ra } from "./components/GeneralComponents/
|
|
31
|
-
import { default as sa } from "./components/GeneralComponents/
|
|
32
|
-
import { default as ua } from "./components/GeneralComponents/
|
|
33
|
-
import { default as pa } from "./components/GeneralComponents/DataTable/
|
|
34
|
-
import { default as Ga } from "./components/GeneralComponents/DataTable/
|
|
35
|
-
import { default as na } from "./components/GeneralComponents/DataTable/
|
|
36
|
-
import { default as ca } from "./components/GeneralComponents/DataTable/
|
|
37
|
-
import { default as ba } from "./components/GeneralComponents/
|
|
38
|
-
import { default as Ca } from "./components/GeneralComponents/
|
|
39
|
-
import { default as La } from "./components/GeneralComponents/
|
|
40
|
-
import { default as Pa } from "./components/GeneralComponents/
|
|
41
|
-
import { default as ya } from "./
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as Aa } from "./components/GeneralComponents/DataTable/
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as ha } from "./components/GeneralComponents/DataTable/
|
|
46
|
-
import { default as Ha } from "./components/GeneralComponents/DataTable/
|
|
47
|
-
import { default as Ea } from "./components/GeneralComponents/DataTable/
|
|
48
|
-
import { default as Ua } from "./components/GeneralComponents/DataTable/
|
|
49
|
-
import { default as qa } from "./components/GeneralComponents/DataTable/
|
|
50
|
-
import { default as Ja } from "./components/GeneralComponents/DataTable/
|
|
51
|
-
import { default as Qa } from "./components/GeneralComponents/DataTable/
|
|
52
|
-
import { default as Xa } from "./components/GeneralComponents/DataTable/
|
|
53
|
-
import { default as Za } from "./components/GeneralComponents/DataTable/
|
|
54
|
-
import { default as $a } from "./components/GeneralComponents/DataTable/
|
|
55
|
-
import { default as ee } from "./components/GeneralComponents/DataTable/
|
|
56
|
-
import { default as oe } from "./components/GeneralComponents/DataTable/
|
|
57
|
-
import { default as re } from "./components/GeneralComponents/DataTable/
|
|
58
|
-
import { default as se } from "./components/GeneralComponents/DataTable/
|
|
59
|
-
import { default as ue } from "./components/GeneralComponents/DataTable/
|
|
60
|
-
import { default as pe } from "./components/
|
|
61
|
-
import { default as Ge } from "./components/
|
|
62
|
-
import { default as ne } from "./components/GeneralComponents/
|
|
63
|
-
import { default as ce } from "./components/GeneralComponents/
|
|
64
|
-
import { default as be } from "./components/GeneralComponents/
|
|
65
|
-
import { default as Ce } from "./components/GeneralComponents/
|
|
66
|
-
import { default as Le } from "./components/GeneralComponents/
|
|
67
|
-
import { default as Pe } from "./
|
|
68
|
-
import { default as ye } from "./
|
|
69
|
-
import { default as
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
14
|
+
import { default as y } from "./components/GeneralComponents/GlTimeRangePicker.vue.js";
|
|
15
|
+
import { default as k } from "./components/GeneralComponents/GlDateRangeCalendar.vue.js";
|
|
16
|
+
import { default as A } from "./components/GeneralComponents/GlTextInputFile.vue.js";
|
|
17
|
+
import { default as B } from "./components/GeneralComponents/GlTabsWrapper.vue.js";
|
|
18
|
+
import { default as h } from "./components/GeneralComponents/GlTab.vue.js";
|
|
19
|
+
import { default as H } from "./components/GeneralComponents/GlTabShow.vue.js";
|
|
20
|
+
import { default as E } from "./components/GeneralComponents/GlMultiItemSlide.vue.js";
|
|
21
|
+
import { default as U } from "./components/GeneralComponents/GlMultiItemSlideDynamic.vue.js";
|
|
22
|
+
import { default as q } from "./components/GeneralComponents/GlModal.vue.js";
|
|
23
|
+
import { default as J } from "./components/GeneralComponents/GlModalWithoutOverflow.vue.js";
|
|
24
|
+
import { default as Q } from "./components/GeneralComponents/GlModalShow.vue.js";
|
|
25
|
+
import { default as X } from "./components/GeneralComponents/GlToggleBox.vue.js";
|
|
26
|
+
import { default as Z } from "./components/GeneralComponents/GlToggleBoxTrueFalse.vue.js";
|
|
27
|
+
import { default as $ } from "./components/GeneralComponents/GlDropdown.vue.js";
|
|
28
|
+
import { default as ea } from "./components/GeneralComponents/GLTextarea.vue.js";
|
|
29
|
+
import { default as oa } from "./components/GeneralComponents/GlTinymce.vue.js";
|
|
30
|
+
import { default as ra } from "./components/GeneralComponents/GlCodeMirror.vue.js";
|
|
31
|
+
import { default as sa } from "./components/GeneralComponents/GlCodeMirrorTranslate.vue.js";
|
|
32
|
+
import { default as ua } from "./components/GeneralComponents/GlTinymceTranslate.vue.js";
|
|
33
|
+
import { default as pa } from "./components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js";
|
|
34
|
+
import { default as Ga } from "./components/GeneralComponents/DataTable/GlDataTableComponent.vue.js";
|
|
35
|
+
import { default as na } from "./components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js";
|
|
36
|
+
import { default as ca } from "./components/GeneralComponents/DataTable/GLDataTable.vue.js";
|
|
37
|
+
import { default as ba } from "./components/GeneralComponents/DataTable/DatatableConvertCronToHuman.vue.js";
|
|
38
|
+
import { default as Ca } from "./components/GeneralComponents/DeleteConfirmationModal.vue.js";
|
|
39
|
+
import { default as La } from "./components/GeneralComponents/GlAccordionsWrapper.vue.js";
|
|
40
|
+
import { default as Pa } from "./components/GeneralComponents/GlAccordion.vue.js";
|
|
41
|
+
import { default as ya } from "./components/GeneralComponents/GlToastList.vue.js";
|
|
42
|
+
import { default as ka } from "./Stores/toast.js";
|
|
43
|
+
import { default as Aa } from "./components/GeneralComponents/DataTable/DatatableAction.vue.js";
|
|
44
|
+
import { default as Ba } from "./components/GeneralComponents/DataTable/DatatableDeleteAction.vue.js";
|
|
45
|
+
import { default as ha } from "./components/GeneralComponents/DataTable/DatatableDeleteEditAction.vue.js";
|
|
46
|
+
import { default as Ha } from "./components/GeneralComponents/DataTable/DatatableFileDownload.vue.js";
|
|
47
|
+
import { default as Ea } from "./components/GeneralComponents/DataTable/DatatableFiles.vue.js";
|
|
48
|
+
import { default as Ua } from "./components/GeneralComponents/DataTable/DatatableHtml.vue.js";
|
|
49
|
+
import { default as qa } from "./components/GeneralComponents/DataTable/DatatableList.vue.js";
|
|
50
|
+
import { default as Ja } from "./components/GeneralComponents/DataTable/DatatableListNested.vue.js";
|
|
51
|
+
import { default as Qa } from "./components/GeneralComponents/DataTable/DatatablePicture.vue.js";
|
|
52
|
+
import { default as Xa } from "./components/GeneralComponents/DataTable/DatatablePictures.vue.js";
|
|
53
|
+
import { default as Za } from "./components/GeneralComponents/DataTable/DatatableStatus.vue.js";
|
|
54
|
+
import { default as $a } from "./components/GeneralComponents/DataTable/DatatableStatusGeneral.vue.js";
|
|
55
|
+
import { default as ee } from "./components/GeneralComponents/DataTable/DatatableStatusSpecficColor.vue.js";
|
|
56
|
+
import { default as oe } from "./components/GeneralComponents/DataTable/DatatableStatusTextLabelGeneral.vue.js";
|
|
57
|
+
import { default as re } from "./components/GeneralComponents/DataTable/DatatableDateTime.vue.js";
|
|
58
|
+
import { default as se } from "./components/GeneralComponents/DataTable/DatatableDate.vue.js";
|
|
59
|
+
import { default as ue } from "./components/GeneralComponents/DataTable/DatatableStatusServer.vue.js";
|
|
60
|
+
import { default as pe } from "./components/GeneralComponents/DataTable/DatatableCommand.vue.js";
|
|
61
|
+
import { default as Ge } from "./components/LaravelVuePagination/TailwindPagination.vue.js";
|
|
62
|
+
import { default as ne } from "./components/GeneralComponents/ConfirmationModal.vue.js";
|
|
63
|
+
import { default as ce } from "./components/GeneralComponents/DynamicConfirmation.vue.js";
|
|
64
|
+
import { default as be } from "./components/GeneralComponents/GlCodeCopy.vue.js";
|
|
65
|
+
import { default as Ce } from "./components/GeneralComponents/GlTextCopy.vue.js";
|
|
66
|
+
import { default as Le } from "./components/GeneralComponents/StatusRunningSuccessFailed.vue.js";
|
|
67
|
+
import { default as Pe } from "./components/GeneralComponents/StatusConnectingConnectedDisconnected.vue.js";
|
|
68
|
+
import { default as ye } from "./ClickOutsideDirective.js";
|
|
69
|
+
import { default as ke } from "./Form.js";
|
|
70
|
+
import { default as Ae } from "./multilingual.js";
|
|
71
|
+
import { glLocale as Be, setGlLocales as Ie } from "./localeStore.js";
|
|
72
|
+
import { default as We, triggerPrint as He } from "./print/print.js";
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
ye as ClickOutsideDirective,
|
|
75
|
+
oe as DatatableStatusTextLabelGeneral,
|
|
76
|
+
ke as Form,
|
|
77
|
+
pe as GLDatatableCommand,
|
|
78
|
+
se as GLDatatableDate,
|
|
79
|
+
re as GLDatatableDateTime,
|
|
80
|
+
ue as GLDatatableStatusServer,
|
|
81
|
+
Pa as GlAccordion,
|
|
82
|
+
La as GlAccordionsWrapper,
|
|
82
83
|
p as GlButton,
|
|
83
84
|
s as GlCard,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
85
|
+
be as GlCodeCopy,
|
|
86
|
+
ra as GlCodeMirror,
|
|
87
|
+
sa as GlCodeMirrorTranslate,
|
|
88
|
+
ne as GlConfirmationModal,
|
|
89
|
+
ca as GlDataTable,
|
|
90
|
+
Ga as GlDataTableComponent,
|
|
91
|
+
pa as GlDataTableServerSide,
|
|
92
|
+
na as GlDataTableServerSideGroupBy,
|
|
93
|
+
Aa as GlDatatableAction,
|
|
94
|
+
ba as GlDatatableConvertCronToHuman,
|
|
95
|
+
Ba as GlDatatableDeleteAction,
|
|
96
|
+
ha as GlDatatableDeleteEditAction,
|
|
97
|
+
Ha as GlDatatableFileDownload,
|
|
98
|
+
Ea as GlDatatableFiles,
|
|
99
|
+
Ua as GlDatatableHtml,
|
|
100
|
+
qa as GlDatatableList,
|
|
101
|
+
Ja as GlDatatableListNested,
|
|
102
|
+
Qa as GlDatatablePicture,
|
|
103
|
+
Xa as GlDatatablePictures,
|
|
104
|
+
Za as GlDatatableStatus,
|
|
105
|
+
$a as GlDatatableStatusGeneral,
|
|
106
|
+
ee as GlDatatableStatusSpecficColor,
|
|
106
107
|
b as GlDatePicker,
|
|
107
|
-
|
|
108
|
+
k as GlDateRangeCalendar,
|
|
108
109
|
L as GlDateRangePicker,
|
|
109
110
|
C as GlDateTimePicker,
|
|
110
111
|
P as GlDateTimeRangePicker,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
Ca as GlDeleteConfirmationModal,
|
|
113
|
+
$ as GlDropdown,
|
|
114
|
+
ce as GlDynamicConfirmation,
|
|
114
115
|
o as GlFilesUpload,
|
|
115
116
|
r as GlLanguageSelector,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
q as GlModal,
|
|
118
|
+
Q as GlModalShow,
|
|
119
|
+
J as GlModalWithoutOverflow,
|
|
120
|
+
E as GlMultiItemSlide,
|
|
121
|
+
U as GlMultiItemSlideDynamic,
|
|
121
122
|
u as GlMultiSelectDropdown,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
We as GlPrint,
|
|
124
|
+
Pe as GlStatusConnectingConnectedDisconnected,
|
|
125
|
+
Le as GlStatusRunningSuccessFailed,
|
|
126
|
+
h as GlTab,
|
|
127
|
+
H as GlTabShow,
|
|
128
|
+
B as GlTabsWrapper,
|
|
129
|
+
Ge as GlTailwindPagination,
|
|
130
|
+
Ce as GlTextCopy,
|
|
130
131
|
c as GlTextInput,
|
|
131
|
-
|
|
132
|
+
A as GlTextInputFile,
|
|
132
133
|
n as GlTextTranslate,
|
|
133
|
-
|
|
134
|
+
ea as GlTextarea,
|
|
134
135
|
G as GlTextareaTranslate,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
X as
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
y as GlTimeRangePicker,
|
|
137
|
+
oa as GlTinymce,
|
|
138
|
+
ua as GlTinymceTranslate,
|
|
139
|
+
ka as GlToast,
|
|
140
|
+
ya as GlToastList,
|
|
141
|
+
X as GlToggleBox,
|
|
142
|
+
Z as GlToggleBoxTrueFalse,
|
|
143
|
+
Be as glLocale,
|
|
144
|
+
Ae as multilingual,
|
|
145
|
+
Ie as setGlLocales,
|
|
146
|
+
He as triggerPrint
|
|
145
147
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The most popular library of interactive components built with Vuejs && Tailwind CSS",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "1.3.
|
|
6
|
+
"version": "1.3.7",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/mrgiant/GoldenLogicUi.git"
|