golden-logic-ui 1.2.370 → 1.2.372
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,475 @@
|
|
|
1
|
+
import { ref as $, computed as w, watch as ge, onMounted as me, onUnmounted as ve, createElementBlock as g, openBlock as m, Fragment as S, createCommentVNode as T, normalizeClass as b, createElementVNode as r, toDisplayString as u, withDirectives as fe, renderList as I, vShow as he } from "vue";
|
|
2
|
+
const ye = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "gl-label-form"
|
|
5
|
+
}, pe = { class: "mt-1 text-gray-900 dark:text-white" }, De = ["dir"], ke = ["for"], we = { class: "relative" }, xe = { class: "relative" }, Me = ["required", "name", "id", "value", "placeholder"], Ye = { class: "absolute z-50 mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 p-4 w-[20rem] sm:w-auto max-w-[calc(100vw-2rem)]" }, be = { class: "flex flex-col sm:flex-row gap-4 sm:gap-6" }, _e = { class: "w-full sm:w-64" }, $e = { class: "flex items-center justify-between mb-3" }, Ce = { class: "text-sm font-semibold text-gray-900 dark:text-white" }, Se = { class: "grid grid-cols-7 gap-y-1 mb-1" }, Te = { class: "grid grid-cols-7" }, Ve = ["onClick", "onMouseenter", "disabled"], Ne = { class: "hidden sm:block sm:w-64" }, Ie = { class: "flex items-center justify-between mb-3" }, Le = { class: "text-sm font-semibold text-gray-900 dark:text-white" }, Be = { class: "grid grid-cols-7 gap-y-1 mb-1" }, Ee = { class: "grid grid-cols-7" }, Fe = ["onClick", "onMouseenter", "disabled"], qe = { class: "flex items-center justify-between gap-3 mt-4 pt-3 border-t border-gray-200 dark:border-gray-700" }, He = { class: "text-sm text-gray-600 dark:text-gray-300 truncate" }, Re = { class: "flex items-center gap-2 shrink-0" }, Ae = { class: "gl-span-form-error" }, Ze = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "block mt-1 text-sm font-normal leading-5 text-gray-500"
|
|
8
|
+
}, Pe = {
|
|
9
|
+
__name: "GlDateRangeCalendar",
|
|
10
|
+
props: {
|
|
11
|
+
is_required: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
show: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
error_message: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
// { start: '', end: '' }
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => ({ start: "", end: "" })
|
|
27
|
+
},
|
|
28
|
+
field_name: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
label_name: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
description: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
input_class: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
container_class: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
// Date format options: YYYY-MM-DD, DD-MM-YYYY, MM-DD-YYYY, DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD
|
|
53
|
+
date_format: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "YYYY-MM-DD"
|
|
56
|
+
},
|
|
57
|
+
// Separator shown between start and end in the input/footer
|
|
58
|
+
separator: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "-"
|
|
61
|
+
},
|
|
62
|
+
// Min/max date constraints. Accepts "YYYY-MM-DD" or relative "+3m", "-1y", "+7d", "today"
|
|
63
|
+
min_date: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
max_date: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
// Disable specific days of week (0 = Sunday, 6 = Saturday)
|
|
72
|
+
disabled_days: {
|
|
73
|
+
type: Array,
|
|
74
|
+
default: () => []
|
|
75
|
+
},
|
|
76
|
+
// Disable specific dates (strings in any supported format or Date objects)
|
|
77
|
+
disabled_dates: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: () => []
|
|
80
|
+
},
|
|
81
|
+
// Locale for month/day names ("en" or "ar")
|
|
82
|
+
locale: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "en"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
emits: ["update:modelValue", "change"],
|
|
88
|
+
setup(s, { emit: te }) {
|
|
89
|
+
const o = s, F = te, L = $(null), M = $(!1), q = /* @__PURE__ */ new Date(), v = $(q.getMonth()), _ = $(q.getFullYear()), c = $(null), f = $(null), V = $(null), ae = w(() => B() === "ar"), H = {
|
|
90
|
+
en: { apply: "Apply", cancel: "Cancel" },
|
|
91
|
+
ar: { apply: "تطبيق", cancel: "إلغاء" }
|
|
92
|
+
}, B = () => o.locale && o.locale.startsWith("ar") ? "ar" : "en", R = (a) => H[B()][a] || H.en[a] || a, A = w(() => {
|
|
93
|
+
const a = [];
|
|
94
|
+
for (let e = 0; e < 12; e++)
|
|
95
|
+
a.push(new Date(2e3, e, 1).toLocaleDateString(o.locale, { month: "long" }));
|
|
96
|
+
return a;
|
|
97
|
+
}), Z = w(() => {
|
|
98
|
+
const a = B() === "ar" ? "narrow" : "short", e = [];
|
|
99
|
+
for (let t = 0; t < 7; t++)
|
|
100
|
+
e.push(new Date(2e3, 0, 2 + t).toLocaleDateString(o.locale, { weekday: a }));
|
|
101
|
+
return e;
|
|
102
|
+
}), Y = (a) => {
|
|
103
|
+
if (!a) return null;
|
|
104
|
+
let e, t, n;
|
|
105
|
+
const l = String(a).split(/[-/]/);
|
|
106
|
+
if (l.length !== 3) return null;
|
|
107
|
+
switch (o.date_format) {
|
|
108
|
+
case "DD-MM-YYYY":
|
|
109
|
+
case "DD/MM/YYYY":
|
|
110
|
+
n = parseInt(l[0]), t = parseInt(l[1]) - 1, e = parseInt(l[2]);
|
|
111
|
+
break;
|
|
112
|
+
case "MM-DD-YYYY":
|
|
113
|
+
case "MM/DD/YYYY":
|
|
114
|
+
t = parseInt(l[0]) - 1, n = parseInt(l[1]), e = parseInt(l[2]);
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
e = parseInt(l[0]), t = parseInt(l[1]) - 1, n = parseInt(l[2]);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
const p = new Date(e, t, n);
|
|
121
|
+
return isNaN(p.getTime()) || p.getFullYear() !== e || p.getMonth() !== t || p.getDate() !== n ? null : p;
|
|
122
|
+
}, z = (a) => {
|
|
123
|
+
if (!a) return null;
|
|
124
|
+
if (String(a).toLowerCase() === "today") return /* @__PURE__ */ new Date();
|
|
125
|
+
const e = String(a).match(/^([+-]?)(\d+)([dmy])$/i);
|
|
126
|
+
if (e) {
|
|
127
|
+
const l = e[1] === "-" ? -1 : 1, p = parseInt(e[2]) * l, x = e[3].toLowerCase(), k = /* @__PURE__ */ new Date();
|
|
128
|
+
return x === "d" ? k.setDate(k.getDate() + p) : x === "m" ? k.setMonth(k.getMonth() + p) : x === "y" && k.setFullYear(k.getFullYear() + p), k;
|
|
129
|
+
}
|
|
130
|
+
const t = Y(a);
|
|
131
|
+
if (t) return t;
|
|
132
|
+
const n = new Date(a);
|
|
133
|
+
return isNaN(n.getTime()) ? null : n;
|
|
134
|
+
}, C = (a) => {
|
|
135
|
+
if (!a) return "";
|
|
136
|
+
let e = a instanceof Date ? a : Y(a);
|
|
137
|
+
if ((!e || isNaN(e.getTime())) && (e = new Date(a)), isNaN(e.getTime())) return "";
|
|
138
|
+
const t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), l = String(e.getDate()).padStart(2, "0");
|
|
139
|
+
switch (o.date_format) {
|
|
140
|
+
case "DD-MM-YYYY":
|
|
141
|
+
return `${l}-${n}-${t}`;
|
|
142
|
+
case "MM-DD-YYYY":
|
|
143
|
+
return `${n}-${l}-${t}`;
|
|
144
|
+
case "DD/MM/YYYY":
|
|
145
|
+
return `${l}/${n}/${t}`;
|
|
146
|
+
case "MM/DD/YYYY":
|
|
147
|
+
return `${n}/${l}/${t}`;
|
|
148
|
+
case "YYYY/MM/DD":
|
|
149
|
+
return `${t}/${n}/${l}`;
|
|
150
|
+
default:
|
|
151
|
+
return `${t}-${n}-${l}`;
|
|
152
|
+
}
|
|
153
|
+
}, i = (a) => {
|
|
154
|
+
const e = new Date(a);
|
|
155
|
+
return e.setHours(0, 0, 0, 0), e;
|
|
156
|
+
}, P = (a, e) => a && e && a.toDateString() === e.toDateString(), G = w(() => {
|
|
157
|
+
const a = o.modelValue?.start, e = o.modelValue?.end;
|
|
158
|
+
if (!a && !e) return "";
|
|
159
|
+
const t = a ? C(Y(a) || new Date(a)) : "", n = e ? C(Y(e) || new Date(e)) : "";
|
|
160
|
+
return t && n ? `${t} ${o.separator} ${n}` : t || n;
|
|
161
|
+
}), re = w(() => {
|
|
162
|
+
const a = c.value ? C(c.value) : "…", e = f.value ? C(f.value) : "…";
|
|
163
|
+
return `${a} ${o.separator} ${e}`;
|
|
164
|
+
}), U = (a, e) => {
|
|
165
|
+
const t = new Date(a, e, 1), n = new Date(a, e + 1, 0), l = t.getDay(), p = n.getDate(), x = [], k = new Date(a, e, 0).getDate();
|
|
166
|
+
for (let d = l - 1; d >= 0; d--)
|
|
167
|
+
x.push({
|
|
168
|
+
day: k - d,
|
|
169
|
+
currentMonth: !1,
|
|
170
|
+
date: new Date(a, e - 1, k - d)
|
|
171
|
+
});
|
|
172
|
+
for (let d = 1; d <= p; d++)
|
|
173
|
+
x.push({ day: d, currentMonth: !0, date: new Date(a, e, d) });
|
|
174
|
+
const de = 42 - x.length;
|
|
175
|
+
for (let d = 1; d <= de; d++)
|
|
176
|
+
x.push({ day: d, currentMonth: !1, date: new Date(a, e + 1, d) });
|
|
177
|
+
return x;
|
|
178
|
+
}, N = w(() => {
|
|
179
|
+
const a = v.value === 11 ? 0 : v.value + 1, e = v.value === 11 ? _.value + 1 : _.value;
|
|
180
|
+
return { month: a, year: e };
|
|
181
|
+
}), ne = w(() => U(_.value, v.value)), se = w(() => U(N.value.year, N.value.month)), D = (a) => {
|
|
182
|
+
if (o.disabled_days.includes(a.getDay())) return !0;
|
|
183
|
+
if (o.disabled_dates && o.disabled_dates.length > 0) {
|
|
184
|
+
const e = i(a);
|
|
185
|
+
for (const t of o.disabled_dates) {
|
|
186
|
+
let n;
|
|
187
|
+
if (typeof t == "string" ? (n = Y(t), (!n || isNaN(n.getTime())) && (n = new Date(t))) : t instanceof Date && (n = t), n && !isNaN(n.getTime()) && i(n).getTime() === e.getTime())
|
|
188
|
+
return !0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (o.min_date) {
|
|
192
|
+
const e = z(o.min_date);
|
|
193
|
+
if (e && i(a) < i(e)) return !0;
|
|
194
|
+
}
|
|
195
|
+
if (o.max_date) {
|
|
196
|
+
const e = z(o.max_date);
|
|
197
|
+
if (e && i(a) > i(e)) return !0;
|
|
198
|
+
}
|
|
199
|
+
return !1;
|
|
200
|
+
}, le = w(() => c.value && !f.value && V.value ? V.value : f.value), E = w(() => {
|
|
201
|
+
const a = c.value, e = le.value;
|
|
202
|
+
return !a || !e ? null : a <= e ? { lo: i(a), hi: i(e) } : { lo: i(e), hi: i(a) };
|
|
203
|
+
}), h = (a) => {
|
|
204
|
+
const e = E.value;
|
|
205
|
+
return e ? i(a).getTime() === e.lo.getTime() : P(a, c.value);
|
|
206
|
+
}, y = (a) => {
|
|
207
|
+
const e = E.value;
|
|
208
|
+
return e ? i(a).getTime() === e.hi.getTime() : !1;
|
|
209
|
+
}, W = (a) => {
|
|
210
|
+
const e = E.value;
|
|
211
|
+
if (!e) return !1;
|
|
212
|
+
const t = i(a).getTime();
|
|
213
|
+
return t > e.lo.getTime() && t < e.hi.getTime();
|
|
214
|
+
}, J = (a) => P(a, /* @__PURE__ */ new Date()), K = (a) => {
|
|
215
|
+
const e = a.date;
|
|
216
|
+
D(e) || (!c.value || c.value && f.value ? (c.value = i(e), f.value = null) : i(e) < c.value ? (f.value = c.value, c.value = i(e)) : f.value = i(e));
|
|
217
|
+
}, Q = (a) => {
|
|
218
|
+
c.value && !f.value && !D(a.date) && (V.value = a.date);
|
|
219
|
+
}, oe = () => {
|
|
220
|
+
v.value === 0 ? (v.value = 11, _.value--) : v.value--;
|
|
221
|
+
}, X = () => {
|
|
222
|
+
v.value === 11 ? (v.value = 0, _.value++) : v.value++;
|
|
223
|
+
}, j = () => {
|
|
224
|
+
const a = o.modelValue?.start, e = a ? Y(a) || new Date(a) : /* @__PURE__ */ new Date();
|
|
225
|
+
isNaN(e.getTime()) || (v.value = e.getMonth(), _.value = e.getFullYear());
|
|
226
|
+
}, ie = () => {
|
|
227
|
+
const a = o.modelValue?.start, e = o.modelValue?.end;
|
|
228
|
+
c.value = a ? i(Y(a) || new Date(a)) : null, f.value = e ? i(Y(e) || new Date(e)) : null, V.value = null, j(), M.value = !0;
|
|
229
|
+
}, O = () => {
|
|
230
|
+
M.value ? M.value = !1 : ie();
|
|
231
|
+
}, ue = () => {
|
|
232
|
+
const a = {
|
|
233
|
+
start: c.value ? C(c.value) : "",
|
|
234
|
+
end: f.value ? C(f.value) : ""
|
|
235
|
+
};
|
|
236
|
+
F("update:modelValue", a), F("change", a), M.value = !1;
|
|
237
|
+
}, ce = () => {
|
|
238
|
+
M.value = !1;
|
|
239
|
+
}, ee = (a) => {
|
|
240
|
+
L.value && !L.value.contains(a.target) && (M.value = !1);
|
|
241
|
+
};
|
|
242
|
+
return ge(
|
|
243
|
+
() => o.modelValue,
|
|
244
|
+
() => {
|
|
245
|
+
M.value || j();
|
|
246
|
+
},
|
|
247
|
+
{ deep: !0 }
|
|
248
|
+
), me(() => document.addEventListener("click", ee)), ve(() => document.removeEventListener("click", ee)), (a, e) => (m(), g(S, null, [
|
|
249
|
+
s.show ? (m(), g("div", {
|
|
250
|
+
key: 0,
|
|
251
|
+
class: b(s.field_name)
|
|
252
|
+
}, [
|
|
253
|
+
s.label_name ? (m(), g("label", ye, u(s.label_name), 1)) : T("", !0),
|
|
254
|
+
r("p", pe, u(G.value), 1),
|
|
255
|
+
e[0] || (e[0] = r("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
256
|
+
], 2)) : T("", !0),
|
|
257
|
+
s.show ? T("", !0) : (m(), g("div", {
|
|
258
|
+
key: 1,
|
|
259
|
+
ref_key: "datepickerContainer",
|
|
260
|
+
ref: L,
|
|
261
|
+
dir: ae.value ? "rtl" : "ltr",
|
|
262
|
+
class: b({
|
|
263
|
+
[s.field_name]: s.field_name && s.field_name !== "",
|
|
264
|
+
[s.container_class]: s.container_class && s.container_class !== ""
|
|
265
|
+
})
|
|
266
|
+
}, [
|
|
267
|
+
s.label_name ? (m(), g("label", {
|
|
268
|
+
key: 0,
|
|
269
|
+
class: b({
|
|
270
|
+
"gl-label-form": s.error_message == "",
|
|
271
|
+
"gl-label-form-invalid": s.error_message !== "",
|
|
272
|
+
required: s.is_required
|
|
273
|
+
}),
|
|
274
|
+
for: s.field_name
|
|
275
|
+
}, u(s.label_name), 11, ke)) : T("", !0),
|
|
276
|
+
r("div", we, [
|
|
277
|
+
r("div", xe, [
|
|
278
|
+
r("input", {
|
|
279
|
+
type: "text",
|
|
280
|
+
readonly: "",
|
|
281
|
+
class: b(["rtl:text-right pe-10 cursor-pointer", {
|
|
282
|
+
"gl-input-form": s.error_message == "",
|
|
283
|
+
"gl-input-form-invalid": s.error_message !== "",
|
|
284
|
+
[s.input_class]: s.input_class && s.input_class !== ""
|
|
285
|
+
}]),
|
|
286
|
+
required: s.is_required,
|
|
287
|
+
name: s.field_name,
|
|
288
|
+
id: s.field_name,
|
|
289
|
+
value: G.value,
|
|
290
|
+
placeholder: s.placeholder,
|
|
291
|
+
onClick: O
|
|
292
|
+
}, null, 10, Me),
|
|
293
|
+
r("div", {
|
|
294
|
+
class: "absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",
|
|
295
|
+
onClick: O
|
|
296
|
+
}, e[1] || (e[1] = [
|
|
297
|
+
r("svg", {
|
|
298
|
+
class: "w-4 h-4 text-gray-500 dark:text-gray-400",
|
|
299
|
+
"aria-hidden": "true",
|
|
300
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
301
|
+
fill: "currentColor",
|
|
302
|
+
viewBox: "0 0 20 20"
|
|
303
|
+
}, [
|
|
304
|
+
r("path", { d: "M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" })
|
|
305
|
+
], -1)
|
|
306
|
+
]))
|
|
307
|
+
]),
|
|
308
|
+
fe(r("div", Ye, [
|
|
309
|
+
r("div", be, [
|
|
310
|
+
r("div", _e, [
|
|
311
|
+
r("div", $e, [
|
|
312
|
+
r("button", {
|
|
313
|
+
type: "button",
|
|
314
|
+
onClick: oe,
|
|
315
|
+
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
316
|
+
}, e[2] || (e[2] = [
|
|
317
|
+
r("svg", {
|
|
318
|
+
class: "w-5 h-5 rtl:-scale-x-100",
|
|
319
|
+
fill: "none",
|
|
320
|
+
stroke: "currentColor",
|
|
321
|
+
viewBox: "0 0 24 24"
|
|
322
|
+
}, [
|
|
323
|
+
r("path", {
|
|
324
|
+
"stroke-linecap": "round",
|
|
325
|
+
"stroke-linejoin": "round",
|
|
326
|
+
"stroke-width": "2",
|
|
327
|
+
d: "M15 19l-7-7 7-7"
|
|
328
|
+
})
|
|
329
|
+
], -1)
|
|
330
|
+
])),
|
|
331
|
+
r("span", Ce, u(A.value[v.value]) + " " + u(_.value), 1),
|
|
332
|
+
e[4] || (e[4] = r("span", { class: "w-7 sm:hidden" }, null, -1)),
|
|
333
|
+
r("button", {
|
|
334
|
+
type: "button",
|
|
335
|
+
onClick: X,
|
|
336
|
+
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 sm:hidden"
|
|
337
|
+
}, e[3] || (e[3] = [
|
|
338
|
+
r("svg", {
|
|
339
|
+
class: "w-5 h-5 rtl:-scale-x-100",
|
|
340
|
+
fill: "none",
|
|
341
|
+
stroke: "currentColor",
|
|
342
|
+
viewBox: "0 0 24 24"
|
|
343
|
+
}, [
|
|
344
|
+
r("path", {
|
|
345
|
+
"stroke-linecap": "round",
|
|
346
|
+
"stroke-linejoin": "round",
|
|
347
|
+
"stroke-width": "2",
|
|
348
|
+
d: "M9 5l7 7-7 7"
|
|
349
|
+
})
|
|
350
|
+
], -1)
|
|
351
|
+
]))
|
|
352
|
+
]),
|
|
353
|
+
r("div", Se, [
|
|
354
|
+
(m(!0), g(S, null, I(Z.value, (t) => (m(), g("div", {
|
|
355
|
+
key: "lh-" + t,
|
|
356
|
+
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1 truncate"
|
|
357
|
+
}, u(t), 1))), 128))
|
|
358
|
+
]),
|
|
359
|
+
r("div", Te, [
|
|
360
|
+
(m(!0), g(S, null, I(ne.value, (t, n) => (m(), g("div", {
|
|
361
|
+
key: "l-" + n,
|
|
362
|
+
class: b(["py-0.5", {
|
|
363
|
+
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (W(t.date) || h(t.date) || y(t.date)),
|
|
364
|
+
"rounded-s-full": h(t.date),
|
|
365
|
+
"rounded-e-full": y(t.date)
|
|
366
|
+
}])
|
|
367
|
+
}, [
|
|
368
|
+
r("button", {
|
|
369
|
+
type: "button",
|
|
370
|
+
onClick: (l) => K(t),
|
|
371
|
+
onMouseenter: (l) => Q(t),
|
|
372
|
+
disabled: D(t.date),
|
|
373
|
+
class: b([
|
|
374
|
+
"w-9 h-9 mx-auto text-sm rounded-full flex items-center justify-center transition-colors",
|
|
375
|
+
{
|
|
376
|
+
"text-gray-300 dark:text-gray-600 pointer-events-none": !t.currentMonth,
|
|
377
|
+
"text-gray-900 dark:text-white": t.currentMonth && !h(t.date) && !y(t.date) && !D(t.date),
|
|
378
|
+
"bg-primary dark:bg-primaryDark text-white font-semibold": t.currentMonth && (h(t.date) || y(t.date)),
|
|
379
|
+
"ring-1 ring-primary dark:ring-primaryDark": J(t.date) && t.currentMonth && !h(t.date) && !y(t.date),
|
|
380
|
+
"hover:bg-gray-100 dark:hover:bg-gray-700": t.currentMonth && !h(t.date) && !y(t.date) && !D(t.date),
|
|
381
|
+
"opacity-40 cursor-not-allowed": D(t.date)
|
|
382
|
+
}
|
|
383
|
+
])
|
|
384
|
+
}, u(t.day), 43, Ve)
|
|
385
|
+
], 2))), 128))
|
|
386
|
+
])
|
|
387
|
+
]),
|
|
388
|
+
r("div", Ne, [
|
|
389
|
+
r("div", Ie, [
|
|
390
|
+
e[6] || (e[6] = r("span", { class: "w-7" }, null, -1)),
|
|
391
|
+
r("span", Le, u(A.value[N.value.month]) + " " + u(N.value.year), 1),
|
|
392
|
+
r("button", {
|
|
393
|
+
type: "button",
|
|
394
|
+
onClick: X,
|
|
395
|
+
class: "p-1 rounded text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
396
|
+
}, e[5] || (e[5] = [
|
|
397
|
+
r("svg", {
|
|
398
|
+
class: "w-5 h-5 rtl:-scale-x-100",
|
|
399
|
+
fill: "none",
|
|
400
|
+
stroke: "currentColor",
|
|
401
|
+
viewBox: "0 0 24 24"
|
|
402
|
+
}, [
|
|
403
|
+
r("path", {
|
|
404
|
+
"stroke-linecap": "round",
|
|
405
|
+
"stroke-linejoin": "round",
|
|
406
|
+
"stroke-width": "2",
|
|
407
|
+
d: "M9 5l7 7-7 7"
|
|
408
|
+
})
|
|
409
|
+
], -1)
|
|
410
|
+
]))
|
|
411
|
+
]),
|
|
412
|
+
r("div", Be, [
|
|
413
|
+
(m(!0), g(S, null, I(Z.value, (t) => (m(), g("div", {
|
|
414
|
+
key: "rh-" + t,
|
|
415
|
+
class: "text-center text-xs font-semibold text-gray-700 dark:text-gray-300 py-1 truncate"
|
|
416
|
+
}, u(t), 1))), 128))
|
|
417
|
+
]),
|
|
418
|
+
r("div", Ee, [
|
|
419
|
+
(m(!0), g(S, null, I(se.value, (t, n) => (m(), g("div", {
|
|
420
|
+
key: "r-" + n,
|
|
421
|
+
class: b(["py-0.5", {
|
|
422
|
+
"bg-primary/10 dark:bg-primaryDark/20": t.currentMonth && (W(t.date) || h(t.date) || y(t.date)),
|
|
423
|
+
"rounded-s-full": h(t.date),
|
|
424
|
+
"rounded-e-full": y(t.date)
|
|
425
|
+
}])
|
|
426
|
+
}, [
|
|
427
|
+
r("button", {
|
|
428
|
+
type: "button",
|
|
429
|
+
onClick: (l) => K(t),
|
|
430
|
+
onMouseenter: (l) => Q(t),
|
|
431
|
+
disabled: D(t.date),
|
|
432
|
+
class: b([
|
|
433
|
+
"w-9 h-9 mx-auto text-sm rounded-full flex items-center justify-center transition-colors",
|
|
434
|
+
{
|
|
435
|
+
"text-gray-300 dark:text-gray-600 pointer-events-none": !t.currentMonth,
|
|
436
|
+
"text-gray-900 dark:text-white": t.currentMonth && !h(t.date) && !y(t.date) && !D(t.date),
|
|
437
|
+
"bg-primary dark:bg-primaryDark text-white font-semibold": t.currentMonth && (h(t.date) || y(t.date)),
|
|
438
|
+
"ring-1 ring-primary dark:ring-primaryDark": J(t.date) && t.currentMonth && !h(t.date) && !y(t.date),
|
|
439
|
+
"hover:bg-gray-100 dark:hover:bg-gray-700": t.currentMonth && !h(t.date) && !y(t.date) && !D(t.date),
|
|
440
|
+
"opacity-40 cursor-not-allowed": D(t.date)
|
|
441
|
+
}
|
|
442
|
+
])
|
|
443
|
+
}, u(t.day), 43, Fe)
|
|
444
|
+
], 2))), 128))
|
|
445
|
+
])
|
|
446
|
+
])
|
|
447
|
+
]),
|
|
448
|
+
r("div", qe, [
|
|
449
|
+
r("span", He, u(re.value), 1),
|
|
450
|
+
r("div", Re, [
|
|
451
|
+
r("button", {
|
|
452
|
+
type: "button",
|
|
453
|
+
onClick: ce,
|
|
454
|
+
class: "px-4 py-2 text-sm font-medium rounded-lg text-gray-700 dark:text-gray-200 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors"
|
|
455
|
+
}, u(R("cancel")), 1),
|
|
456
|
+
r("button", {
|
|
457
|
+
type: "button",
|
|
458
|
+
onClick: ue,
|
|
459
|
+
class: "px-4 py-2 text-sm font-medium rounded-lg text-white bg-primary dark:bg-primaryDark hover:bg-primary/90 dark:hover:bg-primaryDark/90 transition-colors"
|
|
460
|
+
}, u(R("apply")), 1)
|
|
461
|
+
])
|
|
462
|
+
])
|
|
463
|
+
], 512), [
|
|
464
|
+
[he, M.value]
|
|
465
|
+
])
|
|
466
|
+
]),
|
|
467
|
+
r("span", Ae, u(s.error_message), 1),
|
|
468
|
+
s.description ? (m(), g("small", Ze, u(s.description), 1)) : T("", !0)
|
|
469
|
+
], 10, De))
|
|
470
|
+
], 64));
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
export {
|
|
474
|
+
Pe as default
|
|
475
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -11,127 +11,129 @@ 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 M } from "./components/GeneralComponents/GlDateRangePicker.vue.js";
|
|
13
13
|
import { default as w } from "./components/GeneralComponents/GlDateTimeRangePicker.vue.js";
|
|
14
|
-
import { default as F } from "./components/GeneralComponents/
|
|
15
|
-
import { default as v } from "./components/GeneralComponents/
|
|
16
|
-
import { default as A } from "./components/GeneralComponents/
|
|
17
|
-
import { default as I } from "./components/GeneralComponents/
|
|
18
|
-
import { default as
|
|
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 da } from "./components/GeneralComponents/
|
|
32
|
-
import { default as ua } from "./components/GeneralComponents/DataTable/
|
|
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 Ta } from "./components/GeneralComponents/
|
|
37
|
-
import { default as ba } from "./components/GeneralComponents/
|
|
38
|
-
import { default as Ca } from "./components/GeneralComponents/
|
|
39
|
-
import { default as Ma } from "./components/GeneralComponents/
|
|
40
|
-
import { default as wa } from "./
|
|
41
|
-
import { default as Fa } from "./
|
|
42
|
-
import { default as va } from "./components/GeneralComponents/DataTable/
|
|
43
|
-
import { default as Aa } from "./components/GeneralComponents/DataTable/
|
|
44
|
-
import { default as Ia } from "./components/GeneralComponents/DataTable/
|
|
45
|
-
import { default as
|
|
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 de } from "./components/GeneralComponents/DataTable/
|
|
59
|
-
import { default as ue } from "./components/
|
|
60
|
-
import { default as pe } from "./components/
|
|
61
|
-
import { default as Ge } from "./components/GeneralComponents/
|
|
62
|
-
import { default as ne } from "./components/GeneralComponents/
|
|
63
|
-
import { default as Te } from "./components/GeneralComponents/
|
|
64
|
-
import { default as be } from "./components/GeneralComponents/
|
|
65
|
-
import { default as Ce } from "./components/GeneralComponents/
|
|
66
|
-
import { default as Me } from "./
|
|
67
|
-
import { default as we } from "./
|
|
68
|
-
import { default as Fe } from "./
|
|
14
|
+
import { default as F } from "./components/GeneralComponents/GlDateRangeCalendar.vue.js";
|
|
15
|
+
import { default as v } from "./components/GeneralComponents/GlTextInputFile.vue.js";
|
|
16
|
+
import { default as A } from "./components/GeneralComponents/GlTabsWrapper.vue.js";
|
|
17
|
+
import { default as I } from "./components/GeneralComponents/GlTab.vue.js";
|
|
18
|
+
import { default as h } from "./components/GeneralComponents/GlTabShow.vue.js";
|
|
19
|
+
import { default as H } from "./components/GeneralComponents/GlMultiItemSlide.vue.js";
|
|
20
|
+
import { default as E } from "./components/GeneralComponents/GlMultiItemSlideDynamic.vue.js";
|
|
21
|
+
import { default as U } from "./components/GeneralComponents/GlModal.vue.js";
|
|
22
|
+
import { default as q } from "./components/GeneralComponents/GlModalWithoutOverflow.vue.js";
|
|
23
|
+
import { default as J } from "./components/GeneralComponents/GlModalShow.vue.js";
|
|
24
|
+
import { default as Q } from "./components/GeneralComponents/GlToggleBox.vue.js";
|
|
25
|
+
import { default as X } from "./components/GeneralComponents/GlToggleBoxTrueFalse.vue.js";
|
|
26
|
+
import { default as Z } from "./components/GeneralComponents/GlDropdown.vue.js";
|
|
27
|
+
import { default as $ } from "./components/GeneralComponents/GLTextarea.vue.js";
|
|
28
|
+
import { default as ea } from "./components/GeneralComponents/GlTinymce.vue.js";
|
|
29
|
+
import { default as oa } from "./components/GeneralComponents/GlCodeMirror.vue.js";
|
|
30
|
+
import { default as ra } from "./components/GeneralComponents/GlCodeMirrorTranslate.vue.js";
|
|
31
|
+
import { default as da } from "./components/GeneralComponents/GlTinymceTranslate.vue.js";
|
|
32
|
+
import { default as ua } from "./components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js";
|
|
33
|
+
import { default as pa } from "./components/GeneralComponents/DataTable/GlDataTableComponent.vue.js";
|
|
34
|
+
import { default as Ga } from "./components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js";
|
|
35
|
+
import { default as na } from "./components/GeneralComponents/DataTable/GLDataTable.vue.js";
|
|
36
|
+
import { default as Ta } from "./components/GeneralComponents/DataTable/DatatableConvertCronToHuman.vue.js";
|
|
37
|
+
import { default as ba } from "./components/GeneralComponents/DeleteConfirmationModal.vue.js";
|
|
38
|
+
import { default as Ca } from "./components/GeneralComponents/GlAccordionsWrapper.vue.js";
|
|
39
|
+
import { default as Ma } from "./components/GeneralComponents/GlAccordion.vue.js";
|
|
40
|
+
import { default as wa } from "./components/GeneralComponents/GlToastList.vue.js";
|
|
41
|
+
import { default as Fa } from "./Stores/toast.js";
|
|
42
|
+
import { default as va } from "./components/GeneralComponents/DataTable/DatatableAction.vue.js";
|
|
43
|
+
import { default as Aa } from "./components/GeneralComponents/DataTable/DatatableDeleteAction.vue.js";
|
|
44
|
+
import { default as Ia } from "./components/GeneralComponents/DataTable/DatatableDeleteEditAction.vue.js";
|
|
45
|
+
import { default as ha } from "./components/GeneralComponents/DataTable/DatatableFileDownload.vue.js";
|
|
46
|
+
import { default as Ha } from "./components/GeneralComponents/DataTable/DatatableFiles.vue.js";
|
|
47
|
+
import { default as Ea } from "./components/GeneralComponents/DataTable/DatatableHtml.vue.js";
|
|
48
|
+
import { default as Ua } from "./components/GeneralComponents/DataTable/DatatableList.vue.js";
|
|
49
|
+
import { default as qa } from "./components/GeneralComponents/DataTable/DatatableListNested.vue.js";
|
|
50
|
+
import { default as Ja } from "./components/GeneralComponents/DataTable/DatatablePicture.vue.js";
|
|
51
|
+
import { default as Qa } from "./components/GeneralComponents/DataTable/DatatablePictures.vue.js";
|
|
52
|
+
import { default as Xa } from "./components/GeneralComponents/DataTable/DatatableStatus.vue.js";
|
|
53
|
+
import { default as Za } from "./components/GeneralComponents/DataTable/DatatableStatusGeneral.vue.js";
|
|
54
|
+
import { default as $a } from "./components/GeneralComponents/DataTable/DatatableStatusSpecficColor.vue.js";
|
|
55
|
+
import { default as ee } from "./components/GeneralComponents/DataTable/DatatableStatusTextLabelGeneral.vue.js";
|
|
56
|
+
import { default as oe } from "./components/GeneralComponents/DataTable/DatatableDateTime.vue.js";
|
|
57
|
+
import { default as re } from "./components/GeneralComponents/DataTable/DatatableDate.vue.js";
|
|
58
|
+
import { default as de } from "./components/GeneralComponents/DataTable/DatatableStatusServer.vue.js";
|
|
59
|
+
import { default as ue } from "./components/GeneralComponents/DataTable/DatatableCommand.vue.js";
|
|
60
|
+
import { default as pe } from "./components/LaravelVuePagination/TailwindPagination.vue.js";
|
|
61
|
+
import { default as Ge } from "./components/GeneralComponents/ConfirmationModal.vue.js";
|
|
62
|
+
import { default as ne } from "./components/GeneralComponents/DynamicConfirmation.vue.js";
|
|
63
|
+
import { default as Te } from "./components/GeneralComponents/GlCodeCopy.vue.js";
|
|
64
|
+
import { default as be } from "./components/GeneralComponents/GlTextCopy.vue.js";
|
|
65
|
+
import { default as Ce } from "./components/GeneralComponents/StatusRunningSuccessFailed.vue.js";
|
|
66
|
+
import { default as Me } from "./components/GeneralComponents/StatusConnectingConnectedDisconnected.vue.js";
|
|
67
|
+
import { default as we } from "./ClickOutsideDirective.js";
|
|
68
|
+
import { default as Fe } from "./Form.js";
|
|
69
|
+
import { default as ve } from "./multilingual.js";
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
we as ClickOutsideDirective,
|
|
72
|
+
ee as DatatableStatusTextLabelGeneral,
|
|
73
|
+
Fe as Form,
|
|
74
|
+
ue as GLDatatableCommand,
|
|
75
|
+
re as GLDatatableDate,
|
|
76
|
+
oe as GLDatatableDateTime,
|
|
77
|
+
de as GLDatatableStatusServer,
|
|
78
|
+
Ma as GlAccordion,
|
|
79
|
+
Ca as GlAccordionsWrapper,
|
|
79
80
|
p as GlButton,
|
|
80
81
|
d as GlCard,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
82
|
+
Te as GlCodeCopy,
|
|
83
|
+
oa as GlCodeMirror,
|
|
84
|
+
ra as GlCodeMirrorTranslate,
|
|
85
|
+
Ge as GlConfirmationModal,
|
|
86
|
+
na as GlDataTable,
|
|
87
|
+
pa as GlDataTableComponent,
|
|
88
|
+
ua as GlDataTableServerSide,
|
|
89
|
+
Ga as GlDataTableServerSideGroupBy,
|
|
90
|
+
va as GlDatatableAction,
|
|
91
|
+
Ta as GlDatatableConvertCronToHuman,
|
|
92
|
+
Aa as GlDatatableDeleteAction,
|
|
93
|
+
Ia as GlDatatableDeleteEditAction,
|
|
94
|
+
ha as GlDatatableFileDownload,
|
|
95
|
+
Ha as GlDatatableFiles,
|
|
96
|
+
Ea as GlDatatableHtml,
|
|
97
|
+
Ua as GlDatatableList,
|
|
98
|
+
qa as GlDatatableListNested,
|
|
99
|
+
Ja as GlDatatablePicture,
|
|
100
|
+
Qa as GlDatatablePictures,
|
|
101
|
+
Xa as GlDatatableStatus,
|
|
102
|
+
Za as GlDatatableStatusGeneral,
|
|
103
|
+
$a as GlDatatableStatusSpecficColor,
|
|
103
104
|
b as GlDatePicker,
|
|
105
|
+
F as GlDateRangeCalendar,
|
|
104
106
|
M as GlDateRangePicker,
|
|
105
107
|
C as GlDateTimePicker,
|
|
106
108
|
w as GlDateTimeRangePicker,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
ba as GlDeleteConfirmationModal,
|
|
110
|
+
Z as GlDropdown,
|
|
111
|
+
ne as GlDynamicConfirmation,
|
|
110
112
|
o as GlFilesUpload,
|
|
111
113
|
r as GlLanguageSelector,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
U as GlModal,
|
|
115
|
+
J as GlModalShow,
|
|
116
|
+
q as GlModalWithoutOverflow,
|
|
117
|
+
H as GlMultiItemSlide,
|
|
118
|
+
E as GlMultiItemSlideDynamic,
|
|
117
119
|
u as GlMultiSelectDropdown,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
Me as GlStatusConnectingConnectedDisconnected,
|
|
121
|
+
Ce as GlStatusRunningSuccessFailed,
|
|
122
|
+
I as GlTab,
|
|
123
|
+
h as GlTabShow,
|
|
124
|
+
A as GlTabsWrapper,
|
|
125
|
+
pe as GlTailwindPagination,
|
|
126
|
+
be as GlTextCopy,
|
|
125
127
|
T as GlTextInput,
|
|
126
|
-
|
|
128
|
+
v as GlTextInputFile,
|
|
127
129
|
n as GlTextTranslate,
|
|
128
|
-
|
|
130
|
+
$ as GlTextarea,
|
|
129
131
|
G as GlTextareaTranslate,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
ea as GlTinymce,
|
|
133
|
+
da as GlTinymceTranslate,
|
|
134
|
+
Fa as GlToast,
|
|
135
|
+
wa as GlToastList,
|
|
136
|
+
Q as GlToggleBox,
|
|
137
|
+
X as GlToggleBoxTrueFalse,
|
|
138
|
+
ve as multilingual
|
|
137
139
|
};
|
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.2.
|
|
6
|
+
"version": "1.2.372",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/mrgiant/GoldenLogicUi.git"
|