golden-logic-ui 1.2.346 → 1.2.347
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as m, shallowRef as X, onMounted as fe, onBeforeUnmount as ve, watch as M, createElementBlock as c, openBlock as f, Fragment as Y, createCommentVNode as
|
|
2
|
-
const
|
|
1
|
+
import { ref as m, shallowRef as X, onMounted as fe, onBeforeUnmount as ve, watch as M, createElementBlock as c, openBlock as f, Fragment as Y, createCommentVNode as p, normalizeClass as E, createElementVNode as s, toDisplayString as w, withDirectives as P, withModifiers as Z, vShow as ee, vModelText as me, renderList as ge, nextTick as he } from "vue";
|
|
2
|
+
const pe = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3 mb-4" }, xe = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"
|
|
5
5
|
}, we = ["name", "id", "value"], be = {
|
|
@@ -8,7 +8,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
8
8
|
}, ke = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, Se = { class: "relative showOptions" }, _e = ["value", "placeholder"], Ce = { class: "text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1" }, De = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "border-b border-gray-200 dark:border-gray-700"
|
|
11
|
-
}, Oe = { class: "relative" }, Ee = ["id", "placeholder"], Be = { class: "flex items-center py-2 pr-4" }, $e = ["onClick", "onMousedown", "id"], Me = { class: "flex justify-between items-center py-2
|
|
11
|
+
}, Oe = { class: "relative" }, Ee = ["id", "placeholder"], Be = { class: "flex items-center py-2 pr-4" }, $e = ["onClick", "onMousedown", "id"], Me = { class: "flex justify-between items-center py-2" }, Le = ["innerHTML"], Ie = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400",
|
|
14
14
|
"aria-hidden": "true",
|
|
@@ -111,16 +111,16 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
111
111
|
emits: ["update:modelValue", "selected", "selectionChanged"],
|
|
112
112
|
setup(r, { emit: te }) {
|
|
113
113
|
const o = r, b = te, a = m({}), R = m(!1), y = m(0), x = m(!1), v = m(""), g = m(""), B = m(!1), C = m(1), D = m(null), $ = m(1), i = X([]), L = X([]), T = m([]), le = m(null), F = m(null);
|
|
114
|
-
let O = !1,
|
|
114
|
+
let O = !1, h = null, U = 0, k = null;
|
|
115
115
|
const H = (e) => e?.name === "CanceledError" || e?.name === "AbortError" || typeof axios < "u" && axios.isCancel?.(e), V = async (e = "down") => {
|
|
116
116
|
if (B.value || !o.api_url) return;
|
|
117
|
-
|
|
117
|
+
h && h.abort(), h = new AbortController();
|
|
118
118
|
const t = ++U;
|
|
119
119
|
B.value = !0;
|
|
120
120
|
try {
|
|
121
121
|
const l = e === "up" ? Math.max(C.value - 1, $.value) : C.value, { data: n } = await axios.get(o.api_url, {
|
|
122
122
|
params: { search: v.value, page: l, per_page: 20 },
|
|
123
|
-
signal:
|
|
123
|
+
signal: h.signal
|
|
124
124
|
});
|
|
125
125
|
if (O || t !== U) return;
|
|
126
126
|
if (!n || !n.data) {
|
|
@@ -137,7 +137,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
137
137
|
if (H(l)) return;
|
|
138
138
|
console.error("Error fetching data:", l);
|
|
139
139
|
} finally {
|
|
140
|
-
!O && t === U && (B.value = !1,
|
|
140
|
+
!O && t === U && (B.value = !1, h = null);
|
|
141
141
|
}
|
|
142
142
|
}, ne = async (e) => {
|
|
143
143
|
if (!o.api_url || e === null || e === void 0 || e === "") return null;
|
|
@@ -179,7 +179,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
179
179
|
x.value = !1;
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
v.value = "", x.value = !0, o.api_url && i.value.length === 0 && V("down"),
|
|
182
|
+
v.value = "", x.value = !0, o.api_url && i.value.length === 0 && V("down"), he(() => {
|
|
183
183
|
const e = document.getElementById(
|
|
184
184
|
`${o.field_name}search${g.value}`
|
|
185
185
|
);
|
|
@@ -207,7 +207,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
207
207
|
fe(() => {
|
|
208
208
|
g.value = se(), o.show || (document.body.addEventListener("click", K), document.addEventListener("focusin", z));
|
|
209
209
|
}), ve(() => {
|
|
210
|
-
O = !0,
|
|
210
|
+
O = !0, h && (h.abort(), h = null), k && (clearTimeout(k), k = null), document.body.removeEventListener("click", K), document.removeEventListener("focusin", z);
|
|
211
211
|
});
|
|
212
212
|
function re() {
|
|
213
213
|
const e = L.value, t = o.maxItem, l = v.value;
|
|
@@ -302,7 +302,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
302
302
|
}), M(
|
|
303
303
|
() => o.api_url,
|
|
304
304
|
() => {
|
|
305
|
-
|
|
305
|
+
h && (h.abort(), h = null), C.value = 1, D.value = null, $.value = 1, i.value = [];
|
|
306
306
|
},
|
|
307
307
|
{ immediate: !0 }
|
|
308
308
|
), M(
|
|
@@ -336,13 +336,13 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
336
336
|
key: 0,
|
|
337
337
|
class: E(r.field_name)
|
|
338
338
|
}, [
|
|
339
|
-
s("h3",
|
|
339
|
+
s("h3", pe, w(r.label_name), 1),
|
|
340
340
|
s("p", ye, [
|
|
341
|
-
S(a.value) ? (f(), c("span", xe, w(a.value?.name), 1)) :
|
|
341
|
+
S(a.value) ? (f(), c("span", xe, w(a.value?.name), 1)) : p("", !0)
|
|
342
342
|
]),
|
|
343
343
|
t[6] || (t[6] = s("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
|
|
344
|
-
], 2)) :
|
|
345
|
-
r.show ?
|
|
344
|
+
], 2)) : p("", !0),
|
|
345
|
+
r.show ? p("", !0) : (f(), c("div", {
|
|
346
346
|
key: 1,
|
|
347
347
|
class: E(r.field_name)
|
|
348
348
|
}, [
|
|
@@ -360,7 +360,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
360
360
|
"gl-label-form-invalid": r.error_message !== "",
|
|
361
361
|
required: r.is_required
|
|
362
362
|
})
|
|
363
|
-
}, w(r.label_name), 3)) :
|
|
363
|
+
}, w(r.label_name), 3)) : p("", !0),
|
|
364
364
|
s("div", ke, [
|
|
365
365
|
s("div", Se, [
|
|
366
366
|
s("input", {
|
|
@@ -423,7 +423,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
423
423
|
]), 2))
|
|
424
424
|
]),
|
|
425
425
|
P(s("div", Ce, [
|
|
426
|
-
r.hide_search ?
|
|
426
|
+
r.hide_search ? p("", !0) : (f(), c("div", De, [
|
|
427
427
|
t[10] || (t[10] = s("label", {
|
|
428
428
|
for: "default-search",
|
|
429
429
|
class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
|
|
@@ -459,7 +459,7 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
459
459
|
s("div", Be, [
|
|
460
460
|
s("span", null, w(r.custom_option_label) + ' "' + w(v.value) + '"', 1)
|
|
461
461
|
])
|
|
462
|
-
], 32)) :
|
|
462
|
+
], 32)) : p("", !0),
|
|
463
463
|
i.value.length ? (f(!0), c(Y, { key: 1 }, ge(i.value, (l, n) => (f(), c("div", {
|
|
464
464
|
class: E([
|
|
465
465
|
"relative px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",
|
|
@@ -482,18 +482,18 @@ const he = { class: "font-bold ptext-lg dark:text-white" }, ye = { class: "mt-3
|
|
|
482
482
|
"stroke-width": "2",
|
|
483
483
|
d: "M1 5.917 5.724 10.5 15 1.5"
|
|
484
484
|
}, null, -1)
|
|
485
|
-
]))) :
|
|
485
|
+
]))) : p("", !0)
|
|
486
486
|
])
|
|
487
|
-
], 42, $e))), 128)) :
|
|
488
|
-
B.value ? (f(), c("div", Te, " Loading... ")) :
|
|
489
|
-
!B.value && i.value.length === 0 && !(r.allow_custom && v.value) ? (f(), c("div", Ue, w(r.no_results_found_placeholder), 1)) :
|
|
487
|
+
], 42, $e))), 128)) : p("", !0),
|
|
488
|
+
B.value ? (f(), c("div", Te, " Loading... ")) : p("", !0),
|
|
489
|
+
!B.value && i.value.length === 0 && !(r.allow_custom && v.value) ? (f(), c("div", Ue, w(r.no_results_found_placeholder), 1)) : p("", !0)
|
|
490
490
|
], 544)
|
|
491
491
|
], 512), [
|
|
492
492
|
[ee, x.value]
|
|
493
493
|
])
|
|
494
494
|
])
|
|
495
495
|
])
|
|
496
|
-
])) :
|
|
496
|
+
])) : p("", !0),
|
|
497
497
|
s("span", Ve, w(r.error_message), 1),
|
|
498
498
|
s("small", je, w(r.description), 1)
|
|
499
499
|
], 2))
|
|
@@ -5,7 +5,7 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
|
|
|
5
5
|
}, se = {
|
|
6
6
|
class: "inline-flex ml-2 rounded-md shadow-xs",
|
|
7
7
|
role: "group"
|
|
8
|
-
}, ie = { class: "relative" }, ue = ["onClick"], de = { class: "text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1 showOptions" }, ce = { class: "border-b border-gray-200 dark:border-gray-700" }, fe = { class: "relative" }, ve = ["id", "placeholder"], ge = { class: "overflow-y-auto max-h-64 px-1 py-1" }, me = ["onClick", "onMousedown", "id"], pe = { class: "flex justify-between items-center py-2
|
|
8
|
+
}, ie = { class: "relative" }, ue = ["onClick"], de = { class: "text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1 showOptions" }, ce = { class: "border-b border-gray-200 dark:border-gray-700" }, fe = { class: "relative" }, ve = ["id", "placeholder"], ge = { class: "overflow-y-auto max-h-64 px-1 py-1" }, me = ["onClick", "onMousedown", "id"], pe = { class: "flex justify-between items-center py-2" }, xe = ["innerHTML"], ye = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400",
|
|
11
11
|
"aria-hidden": "true",
|
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.347",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/mrgiant/GoldenLogicUi.git"
|