golden-logic-ui 1.3.17 → 1.3.19

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,30 +1,30 @@
1
- import { ref as m, shallowRef as Y, onMounted as ve, onBeforeUnmount as me, watch as I, createElementBlock as c, openBlock as f, Fragment as Z, createCommentVNode as h, normalizeClass as O, createElementVNode as s, toDisplayString as w, withDirectives as F, withModifiers as ee, vShow as te, vModelText as ge, renderList as he, nextTick as pe } from "vue";
2
- const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3 mb-4" }, we = {
1
+ import { ref as m, shallowRef as Y, onMounted as me, onBeforeUnmount as ge, watch as I, createElementBlock as c, openBlock as f, Fragment as Z, createCommentVNode as h, normalizeClass as O, createElementVNode as u, toDisplayString as b, withDirectives as F, withModifiers as ee, vShow as te, vModelText as he, renderList as pe, nextTick as ye } from "vue";
2
+ const xe = { class: "font-bold ptext-lg dark:text-white" }, we = { class: "mt-3 mb-4" }, be = {
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
- }, be = ["name", "id", "value"], ke = {
5
+ }, ke = ["name", "id", "value"], Se = {
6
6
  key: 0,
7
7
  class: "dropdown"
8
- }, Se = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, _e = { class: "relative showOptions" }, Ce = ["value", "placeholder", "disabled"], De = {
8
+ }, _e = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, Ce = { class: "relative showOptions" }, De = ["value", "placeholder", "disabled"], Oe = {
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"], Le = { class: "flex justify-between items-center py-2" }, Me = { class: "min-w-0" }, Ie = ["innerHTML"], je = {
11
+ }, Ee = { class: "relative" }, Be = ["id", "placeholder"], $e = { class: "flex items-center py-2 pr-4" }, Le = ["onClick", "onMousedown", "id"], Me = { class: "flex justify-between items-center py-2" }, Ie = { class: "min-w-0" }, je = ["innerHTML"], Te = {
12
12
  key: 0,
13
13
  class: "ms-2 text-gray-500 dark:text-gray-400"
14
- }, Te = {
14
+ }, Ue = {
15
15
  key: 0,
16
16
  class: "flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400",
17
17
  "aria-hidden": "true",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
19
  fill: "none",
20
20
  viewBox: "0 0 16 12"
21
- }, Ue = {
21
+ }, Ae = {
22
22
  key: 2,
23
23
  class: "p-2 text-center text-gray-500"
24
- }, Ae = {
24
+ }, qe = {
25
25
  key: 3,
26
26
  class: "p-2 text-gray-500"
27
- }, qe = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, Ve = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Pe = {
27
+ }, Ve = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, Ne = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Re = {
28
28
  __name: "GlDropdown",
29
29
  props: {
30
30
  modelValue: {
@@ -127,34 +127,34 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
127
127
  },
128
128
  emits: ["update:modelValue", "selected", "selectionChanged"],
129
129
  setup(o, { emit: le }) {
130
- const r = o, k = le, a = m({}), T = m(!1), y = m(0), x = m(!1), v = m(""), g = m(""), $ = m(!1), S = m(1), _ = m(null), L = m(1), i = Y([]), E = m(!1), j = Y([]), U = m([]), ne = m(null), H = m(null);
131
- let B = !1, p = null, A = 0, C = null;
132
- const z = (e) => e?.name === "CanceledError" || e?.name === "AbortError" || typeof axios < "u" && axios.isCancel?.(e), q = async (e = "down") => {
133
- if ($.value || !r.api_url) return;
130
+ const r = o, S = le, a = m({}), T = m(!1), y = m(0), x = m(!1), v = m(""), g = m(""), $ = m(!1), _ = m(1), C = m(null), L = m(1), i = Y([]), E = m(!1), j = Y([]), U = m([]), ne = m(null), H = m(null);
131
+ let B = !1, p = null, A = 0, D = null;
132
+ const z = (e) => e?.name === "CanceledError" || e?.name === "AbortError" || typeof axios < "u" && axios.isCancel?.(e), q = async (e = "down", { replace: t = !1 } = {}) => {
133
+ if (!r.api_url || $.value && !t) return;
134
134
  p && p.abort(), p = new AbortController();
135
- const t = ++A;
135
+ const l = ++A;
136
136
  $.value = !0;
137
137
  try {
138
- const l = e === "up" ? Math.max(S.value - 1, L.value) : S.value, { data: n } = await axios.get(r.api_url, {
139
- params: { search: v.value, page: l, per_page: 20 },
138
+ const n = e === "up" ? Math.max(_.value - 1, L.value) : _.value, { data: s } = await axios.get(r.api_url, {
139
+ params: { search: v.value, page: n, per_page: 20 },
140
140
  signal: p.signal
141
141
  });
142
- if (B || t !== A) return;
143
- if (!n || !n.data) {
142
+ if (B || l !== A) return;
143
+ if (!s || !s.data) {
144
144
  i.value = [], E.value = !1;
145
145
  return;
146
146
  }
147
- const u = W(n.data);
147
+ const d = W(s.data);
148
148
  if (e === "down") {
149
- const d = i.value.length ? i.value.concat(u) : u, D = a.value;
150
- !v.value && b(D) && D.id !== void 0 && D.name && !d.some((M) => String(M.id) === String(D.id)) && d.unshift(D), i.value = d, S.value++, _.value = n.last_page, E.value = !0;
149
+ const M = i.value.length ? i.value.concat(d) : d, w = a.value;
150
+ !v.value && k(w) && w.id !== void 0 && w.name && !M.some((ve) => String(ve.id) === String(w.id)) && M.unshift(w), i.value = M, _.value++, C.value = s.last_page, E.value = !0;
151
151
  }
152
- _.value || (_.value = n.last_page), L.value || (L.value = 1);
153
- } catch (l) {
154
- if (z(l)) return;
155
- console.error("Error fetching data:", l);
152
+ C.value || (C.value = s.last_page), L.value || (L.value = 1);
153
+ } catch (n) {
154
+ if (z(n)) return;
155
+ console.error("Error fetching data:", n);
156
156
  } finally {
157
- !B && t === A && ($.value = !1, p = null);
157
+ !B && l === A && ($.value = !1, p = null);
158
158
  }
159
159
  }, ae = async (e) => {
160
160
  if (!r.api_url || e === null || e === void 0 || e === "") return null;
@@ -166,7 +166,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
166
166
  const l = t?.data;
167
167
  if (!l || !l.length) return null;
168
168
  const n = String(e);
169
- return W(l).find((u) => String(u.id) === n) || null;
169
+ return W(l).find((s) => String(s.id) === n) || null;
170
170
  } catch (t) {
171
171
  return z(t) || console.error("Error fetching option by id:", t), null;
172
172
  }
@@ -183,11 +183,11 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
183
183
  a.value = n;
184
184
  return;
185
185
  }
186
- const u = await ae(t);
187
- B || (u ? (a.value = u, i.value.some((d) => String(d.id) === String(u.id)) || (i.value = [u, ...i.value])) : r.allow_custom ? a.value = { id: t, name: t } : a.value = { id: t, name: "" });
186
+ const s = await ae(t);
187
+ B || (s ? (a.value = s, i.value.some((d) => String(d.id) === String(s.id)) || (i.value = [s, ...i.value])) : r.allow_custom ? a.value = { id: t, name: t } : a.value = { id: t, name: "" });
188
188
  }, re = (e) => {
189
189
  const t = e.target;
190
- t && t.scrollHeight - t.clientHeight <= t.scrollTop + 10 && S.value <= _.value && q("down");
190
+ t && t.scrollHeight - t.clientHeight <= t.scrollTop + 10 && _.value <= C.value && q("down");
191
191
  }, K = (e) => {
192
192
  e.target && (document.activeElement.classList.contains("showOptions" + g.value) ? x.value || V() : e.target.id != r.field_name + "search" + g.value && e.target.id != r.field_name && !e.target.classList.contains("showOptions" + g.value) && (R(), y.value = 0, x.value = !1));
193
193
  }, V = () => {
@@ -196,7 +196,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
196
196
  x.value = !1;
197
197
  return;
198
198
  }
199
- v.value = "", x.value = !0, r.api_url && (!E.value || i.value.length === 0) && (S.value = 1, _.value = null, i.value = [], E.value = !1, q("down")), pe(() => {
199
+ v.value = "", x.value = !0, r.api_url && (!E.value || i.value.length === 0) && (_.value = 1, C.value = null, i.value = [], E.value = !1, q("down")), ye(() => {
200
200
  const e = document.getElementById(
201
201
  `${r.field_name}search${g.value}`
202
202
  );
@@ -211,7 +211,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
211
211
  }
212
212
  return {};
213
213
  };
214
- return b(a.value) ? typeof a.value == "object" ? i.value.find(
214
+ return k(a.value) ? typeof a.value == "object" ? i.value.find(
215
215
  (t) => String(t.id) === String(a.value.id)
216
216
  ) || e(a.value) : i.value.find(
217
217
  (t) => String(t.id) === String(a.value)
@@ -221,21 +221,21 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
221
221
  (t) => String(t.id) === String(r.modelValue)
222
222
  ) || e(r.modelValue) : {};
223
223
  };
224
- ve(() => {
224
+ me(() => {
225
225
  g.value = ue(), r.show || (document.body.addEventListener("click", G), document.addEventListener("focusin", K));
226
- }), me(() => {
227
- B = !0, p && (p.abort(), p = null), C && (clearTimeout(C), C = null), document.body.removeEventListener("click", G), document.removeEventListener("focusin", K);
226
+ }), ge(() => {
227
+ B = !0, p && (p.abort(), p = null), D && (clearTimeout(D), D = null), document.body.removeEventListener("click", G), document.removeEventListener("focusin", K);
228
228
  });
229
229
  function ie() {
230
230
  const e = j.value, t = r.maxItem, l = v.value;
231
231
  if (!l)
232
232
  return e.length > t ? e.slice(0, t) : e;
233
- const n = l.toLowerCase(), u = [];
234
- for (let d = 0, D = e.length; d < D && u.length < t; d++) {
235
- const M = e[d];
236
- (String(M.name).toLowerCase().includes(n) || String(M.keywords ?? "").toLowerCase().includes(n)) && u.push(M);
233
+ const n = l.toLowerCase(), s = [];
234
+ for (let d = 0, M = e.length; d < M && s.length < t; d++) {
235
+ const w = e[d];
236
+ (String(w.name).toLowerCase().includes(n) || String(w.keywords ?? "").toLowerCase().includes(n)) && s.push(w);
237
237
  }
238
- return u;
238
+ return s;
239
239
  }
240
240
  function se(e) {
241
241
  switch (e.key) {
@@ -257,7 +257,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
257
257
  return e = Math.floor(e / 16), (t === "x" ? l : l & 3 | 8).toString(16);
258
258
  });
259
259
  }
260
- function b(e) {
260
+ function k(e) {
261
261
  return e && typeof e == "object" && Object.keys(e).length > 0;
262
262
  }
263
263
  function G(e) {
@@ -266,8 +266,8 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
266
266
  function J(e) {
267
267
  const t = `${e}${g.value}`, l = document.getElementById(t), n = H.value;
268
268
  if (l && n) {
269
- const u = l.getBoundingClientRect(), d = n.getBoundingClientRect();
270
- u.top < d.top ? n.scrollTop -= d.top - u.top : u.bottom > d.bottom && (n.scrollTop += u.bottom - d.bottom);
269
+ const s = l.getBoundingClientRect(), d = n.getBoundingClientRect();
270
+ s.top < d.top ? n.scrollTop -= d.top - s.top : s.bottom > d.bottom && (n.scrollTop += s.bottom - d.bottom);
271
271
  }
272
272
  }
273
273
  function de(e) {
@@ -298,10 +298,10 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
298
298
  U.value.some((n) => String(n.id) === l) || U.value.push(t), i.value.some((n) => String(n.id) === l) || (i.value = [...i.value, t], j.value = [...j.value, t]), P(t);
299
299
  }
300
300
  function P(e) {
301
- T.value = !0, a.value = e, x.value = !1, k("update:modelValue", a.value.id), k("selected", a.value), k("selectionChanged", a.value);
301
+ T.value = !0, a.value = e, x.value = !1, S("update:modelValue", a.value.id), S("selected", a.value), S("selectionChanged", a.value);
302
302
  }
303
303
  function fe() {
304
- r.show || (a.value = {}, v.value = "", k("update:modelValue", ""), k("selected", a.value), k("selectionChanged", a.value), V());
304
+ r.show || (a.value = {}, v.value = "", S("update:modelValue", ""), S("selected", a.value), S("selectionChanged", a.value), V());
305
305
  }
306
306
  function R() {
307
307
  (!a.value || !a.value.id) && (a.value = {}, v.value = "");
@@ -311,15 +311,15 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
311
311
  i.value = ie(), i.value.length === 0 && (a.value = {});
312
312
  return;
313
313
  }
314
- C && clearTimeout(C), C = setTimeout(() => {
315
- C = null, !B && (S.value = 1, _.value = null, L.value = 1, i.value = [], E.value = !1, q("down"));
314
+ D && clearTimeout(D), D = setTimeout(() => {
315
+ D = null, !B && (_.value = 1, C.value = null, L.value = 1, i.value = [], E.value = !1, q("down", { replace: !0 }));
316
316
  }, 250);
317
317
  }), I(a, (e) => {
318
- b(e) && e.id !== r.modelValue && k("update:modelValue", e.id);
318
+ k(e) && e.id !== r.modelValue && S("update:modelValue", e.id);
319
319
  }), I(
320
320
  () => r.api_url,
321
321
  () => {
322
- p && (p.abort(), p = null), S.value = 1, _.value = null, L.value = 1, i.value = [], E.value = !1;
322
+ p && (p.abort(), p = null), _.value = 1, C.value = null, L.value = 1, i.value = [], E.value = !1;
323
323
  },
324
324
  { immediate: !0 }
325
325
  ), I(
@@ -330,7 +330,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
330
330
  return;
331
331
  }
332
332
  const t = typeof e == "object" ? e.id : e;
333
- b(a.value) && String(a.value.id) !== String(t) && (a.value = {}, T.value = !1), r.api_url ? T.value ? a.value = N() : await oe(e) : a.value = N();
333
+ k(a.value) && String(a.value.id) !== String(t) && (a.value = {}, T.value = !1), r.api_url ? T.value ? a.value = N() : await oe(e) : a.value = N();
334
334
  },
335
335
  { immediate: !0 }
336
336
  ), I(
@@ -339,8 +339,8 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
339
339
  if (!r.api_url) {
340
340
  const e = ce(), t = new Set(e.map((n) => String(n.id))), l = e;
341
341
  for (const n of U.value) {
342
- const u = String(n.id);
343
- t.has(u) || (l.push(n), t.add(u));
342
+ const s = String(n.id);
343
+ t.has(s) || (l.push(n), t.add(s));
344
344
  }
345
345
  j.value = l, i.value = l, a.value = N();
346
346
  }
@@ -354,23 +354,23 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
354
354
  key: 0,
355
355
  class: O(o.field_name)
356
356
  }, [
357
- s("h3", ye, w(o.label_name), 1),
358
- s("p", xe, [
359
- b(a.value) ? (f(), c("span", we, w(a.value?.name), 1)) : h("", !0)
357
+ u("h3", xe, b(o.label_name), 1),
358
+ u("p", we, [
359
+ k(a.value) ? (f(), c("span", be, b(a.value?.name), 1)) : h("", !0)
360
360
  ]),
361
- t[6] || (t[6] = s("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
361
+ t[6] || (t[6] = u("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
362
362
  ], 2)) : h("", !0),
363
363
  o.show ? h("", !0) : (f(), c("div", {
364
364
  key: 1,
365
365
  class: O(o.field_name)
366
366
  }, [
367
- s("input", {
367
+ u("input", {
368
368
  type: "hidden",
369
369
  name: o.field_name,
370
370
  id: o.field_name,
371
371
  value: a.value?.id
372
- }, null, 8, be),
373
- o.options ? (f(), c("div", ke, [
372
+ }, null, 8, ke),
373
+ o.options ? (f(), c("div", Se, [
374
374
  o.label_name ? (f(), c("label", {
375
375
  key: 0,
376
376
  class: O({
@@ -378,18 +378,18 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
378
378
  "gl-label-form-invalid": o.error_message !== "",
379
379
  required: o.is_required
380
380
  })
381
- }, w(o.label_name), 3)) : h("", !0),
382
- s("div", Se, [
383
- s("div", _e, [
384
- s("input", {
381
+ }, b(o.label_name), 3)) : h("", !0),
382
+ u("div", _e, [
383
+ u("div", Ce, [
384
+ u("input", {
385
385
  ref_key: "myDivDropDown",
386
386
  ref: ne,
387
387
  class: O([{
388
388
  "gl-input-form": o.error_message == "",
389
389
  "gl-input-form-invalid": o.error_message !== "",
390
390
  [`showOptions${g.value}`]: !0,
391
- "pr-14!": b(a.value) && o.has_cancel,
392
- "pr-8!": !(b(a.value) && o.has_cancel),
391
+ "pr-14!": k(a.value) && o.has_cancel,
392
+ "pr-8!": !(k(a.value) && o.has_cancel),
393
393
  "opacity-70 cursor-not-allowed": o.disabled,
394
394
  [o.input_class]: o.input_class !== ""
395
395
  }, "truncate showOptions1"]),
@@ -398,20 +398,20 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
398
398
  disabled: o.disabled,
399
399
  autocomplete: "off",
400
400
  readonly: ""
401
- }, null, 10, Ce),
402
- F(s("i", {
401
+ }, null, 10, De),
402
+ F(u("i", {
403
403
  onClick: t[0] || (t[0] = ee((l) => fe(), ["stop"])),
404
404
  class: "absolute text-gray-500 cursor-pointer pointer-events-auto ltr:right-8 rtl:left-8 hover:text-red-600 dark:hover:text-red-400",
405
405
  style: { top: "13px" }
406
406
  }, t[7] || (t[7] = [
407
- s("svg", {
407
+ u("svg", {
408
408
  class: "w-[10px] h-[16px]",
409
409
  "aria-hidden": "true",
410
410
  xmlns: "http://www.w3.org/2000/svg",
411
411
  fill: "none",
412
412
  viewBox: "0 0 14 14"
413
413
  }, [
414
- s("path", {
414
+ u("path", {
415
415
  stroke: "currentColor",
416
416
  "stroke-linecap": "round",
417
417
  "stroke-linejoin": "round",
@@ -420,9 +420,9 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
420
420
  })
421
421
  ], -1)
422
422
  ]), 512), [
423
- [te, b(a.value) && o.has_cancel]
423
+ [te, k(a.value) && o.has_cancel]
424
424
  ]),
425
- s("i", {
425
+ u("i", {
426
426
  onClick: t[1] || (t[1] = ee((l) => V(), ["stop"])),
427
427
  class: "absolute text-xl text-gray-500 cursor-pointer ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-700 showOptions",
428
428
  style: { top: "14px" }
@@ -434,7 +434,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
434
434
  fill: "none",
435
435
  viewBox: "0 0 10 6"
436
436
  }, t[8] || (t[8] = [
437
- s("path", {
437
+ u("path", {
438
438
  stroke: "currentColor",
439
439
  "stroke-linecap": "round",
440
440
  "stroke-linejoin": "round",
@@ -443,17 +443,17 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
443
443
  }, null, -1)
444
444
  ]), 2))
445
445
  ]),
446
- F(s("div", {
446
+ F(u("div", {
447
447
  class: O(["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", o.options_class])
448
448
  }, [
449
- o.hide_search ? h("", !0) : (f(), c("div", De, [
450
- t[10] || (t[10] = s("label", {
449
+ o.hide_search ? h("", !0) : (f(), c("div", Oe, [
450
+ t[10] || (t[10] = u("label", {
451
451
  for: "default-search",
452
452
  class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
453
453
  }, "Search", -1)),
454
- s("div", Oe, [
455
- t[9] || (t[9] = s("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
456
- F(s("input", {
454
+ u("div", Ee, [
455
+ t[9] || (t[9] = u("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
456
+ F(u("input", {
457
457
  type: "search",
458
458
  "onUpdate:modelValue": t[2] || (t[2] = (l) => v.value = l),
459
459
  id: `${o.field_name}search${g.value}`,
@@ -462,12 +462,12 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
462
462
  autocomplete: "off",
463
463
  class: "block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",
464
464
  placeholder: o.search_input_placeholder
465
- }, null, 40, Ee), [
466
- [ge, v.value]
465
+ }, null, 40, Be), [
466
+ [he, v.value]
467
467
  ])
468
468
  ])
469
469
  ])),
470
- s("div", {
470
+ u("div", {
471
471
  class: "overflow-y-auto max-h-64 px-1 py-1",
472
472
  onScroll: re,
473
473
  ref_key: "dropdownRef",
@@ -479,29 +479,29 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
479
479
  onClick: t[4] || (t[4] = (l) => X()),
480
480
  onMousedown: t[5] || (t[5] = (l) => X())
481
481
  }, [
482
- s("div", Be, [
483
- s("span", null, w(o.custom_option_label) + ' "' + w(v.value) + '"', 1)
482
+ u("div", $e, [
483
+ u("span", null, b(o.custom_option_label) + ' "' + b(v.value) + '"', 1)
484
484
  ])
485
485
  ], 32)) : h("", !0),
486
- i.value.length ? (f(!0), c(Z, { key: 1 }, he(i.value, (l, n) => (f(), c("div", {
486
+ i.value.length ? (f(!0), c(Z, { key: 1 }, pe(i.value, (l, n) => (f(), c("div", {
487
487
  class: O([
488
488
  "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",
489
489
  n + 1 == y.value ? "bg-gray-100 dark:bg-gray-700 rounded-sm" : ""
490
490
  ]),
491
- onClick: (u) => P(l),
492
- onMousedown: (u) => P(l),
491
+ onClick: (s) => P(l),
492
+ onMousedown: (s) => P(l),
493
493
  key: n,
494
494
  id: `${n + 1}${g.value}`
495
495
  }, [
496
- s("div", Le, [
497
- s("span", Me, [
498
- s("span", {
496
+ u("div", Me, [
497
+ u("span", Ie, [
498
+ u("span", {
499
499
  innerHTML: l.name || l.id || "-"
500
- }, null, 8, Ie),
501
- l.hint ? (f(), c("span", je, w(l.hint), 1)) : h("", !0)
500
+ }, null, 8, je),
501
+ l.hint ? (f(), c("span", Te, b(l.hint), 1)) : h("", !0)
502
502
  ]),
503
- a.value?.id === l.id ? (f(), c("svg", Te, t[11] || (t[11] = [
504
- s("path", {
503
+ a.value?.id === l.id ? (f(), c("svg", Ue, t[11] || (t[11] = [
504
+ u("path", {
505
505
  stroke: "currentColor",
506
506
  "stroke-linecap": "round",
507
507
  "stroke-linejoin": "round",
@@ -510,9 +510,9 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
510
510
  }, null, -1)
511
511
  ]))) : h("", !0)
512
512
  ])
513
- ], 42, $e))), 128)) : h("", !0),
514
- $.value ? (f(), c("div", Ue, " Loading... ")) : h("", !0),
515
- !$.value && i.value.length === 0 && !(o.allow_custom && v.value) ? (f(), c("div", Ae, w(o.no_results_found_placeholder), 1)) : h("", !0)
513
+ ], 42, Le))), 128)) : h("", !0),
514
+ $.value ? (f(), c("div", Ae, " Loading... ")) : h("", !0),
515
+ !$.value && i.value.length === 0 && !(o.allow_custom && v.value) ? (f(), c("div", qe, b(o.no_results_found_placeholder), 1)) : h("", !0)
516
516
  ], 544)
517
517
  ], 2), [
518
518
  [te, x.value]
@@ -520,12 +520,12 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
520
520
  ])
521
521
  ])
522
522
  ])) : h("", !0),
523
- s("span", qe, w(o.error_message), 1),
524
- s("small", Ve, w(o.description), 1)
523
+ u("span", Ve, b(o.error_message), 1),
524
+ u("small", Ne, b(o.description), 1)
525
525
  ], 2))
526
526
  ], 64));
527
527
  }
528
528
  };
529
529
  export {
530
- Pe as default
530
+ Re as default
531
531
  };
@@ -1,18 +1,18 @@
1
- import { ref as v, onMounted as Q, onBeforeUnmount as W, computed as X, watch as b, createElementBlock as i, openBlock as u, Fragment as h, createCommentVNode as k, normalizeClass as w, createElementVNode as n, toDisplayString as y, renderList as S, withDirectives as j, createTextVNode as Y, withModifiers as L, vModelText as Z, vShow as ee, nextTick as te } from "vue";
1
+ import { ref as v, onMounted as Q, onBeforeUnmount as W, computed as X, watch as w, createElementBlock as i, openBlock as d, Fragment as h, createCommentVNode as k, normalizeClass as b, createElementVNode as l, toDisplayString as m, renderList as S, withDirectives as j, createTextVNode as Y, withModifiers as L, vModelText as Z, vShow as ee, nextTick as te } from "vue";
2
2
  const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3 mb-4" }, ne = { class: "px-3 py-1 mt-2 mb-2 text-sm font-medium text-blue-800 bg-blue-100 rounded-sm me-2 dark:bg-blue-900 dark:text-blue-300" }, oe = ["name", "value"], ae = {
3
3
  key: 0,
4
4
  class: "dropdown"
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" }, xe = ["innerHTML"], ye = {
8
+ }, ie = { class: "relative" }, de = ["onClick"], ue = { 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"], xe = { class: "flex justify-between items-center py-2" }, pe = ["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",
12
12
  xmlns: "http://www.w3.org/2000/svg",
13
13
  fill: "none",
14
14
  viewBox: "0 0 16 12"
15
- }, we = {
15
+ }, he = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, be = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, ke = {
16
16
  __name: "GlMultiSelectDropdown",
17
17
  props: {
18
18
  language: {
@@ -86,20 +86,20 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
86
86
  }
87
87
  },
88
88
  emits: ["update:modelValue", "selected", "selectionChanged"],
89
- setup(a, { emit: N }) {
90
- const o = a, d = N, q = v(null), l = v([]), x = v([]), c = v([]), f = v(0), m = v(!1), g = v(""), p = v(""), T = v(null), D = (e) => {
89
+ setup(o, { emit: N }) {
90
+ const a = o, u = N, q = v(null), n = v([]), y = v([]), c = v([]), f = v(0), x = v(!1), g = v(""), p = v(""), T = v(null), D = (e) => {
91
91
  e.key === "Enter" && e.target.form && e.preventDefault();
92
92
  };
93
93
  Q(() => {
94
- p.value = P(), o.show || (document.body.addEventListener("click", _), document.addEventListener("keypress", D));
94
+ p.value = P(), a.show || (document.body.addEventListener("click", V), document.addEventListener("keypress", D));
95
95
  }), W(() => {
96
- document.body.removeEventListener("click", _), document.removeEventListener("keypress", D);
96
+ document.body.removeEventListener("click", V), document.removeEventListener("keypress", D);
97
97
  });
98
98
  const A = X(() => {
99
99
  const e = [], t = new RegExp(g.value, "ig");
100
- for (const r of x.value) {
100
+ for (const r of y.value) {
101
101
  const s = String(r.name);
102
- (g.value.length < 1 || s.match(t)) && e.length < o.maxItem && e.push(r);
102
+ (g.value.length < 1 || s.match(t)) && e.length < a.maxItem && e.push(r);
103
103
  }
104
104
  return e;
105
105
  });
@@ -111,7 +111,7 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
111
111
  "ArrowDown",
112
112
  "Enter"
113
113
  ].includes(e.key)) {
114
- if (["ArrowUp", "ArrowDown"].includes(e.key) && e.preventDefault(), e.key === "ArrowDown" && o.posts === "")
114
+ if (["ArrowUp", "ArrowDown"].includes(e.key) && e.preventDefault(), e.key === "ArrowDown" && a.posts === "")
115
115
  return;
116
116
  G(e.key);
117
117
  }
@@ -129,24 +129,24 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
129
129
  function O(e) {
130
130
  return Array.isArray(e) && e.length > 0 && e.every((t) => typeof t == "object" && t !== null);
131
131
  }
132
- function V(e) {
132
+ function _(e) {
133
133
  return e.every((t) => typeof t == "object" && t !== null);
134
134
  }
135
135
  function K(e) {
136
- return l.value.findIndex((t) => t.id === e) !== -1;
136
+ return n.value.findIndex((t) => t.id === e) !== -1;
137
137
  }
138
138
  function F() {
139
- l.value = E();
139
+ n.value = E();
140
140
  }
141
141
  function H() {
142
- l.value = [], d("update:modelValue", []), d("selected", []), d("selectionChanged", []);
142
+ n.value = [], u("update:modelValue", []), u("selected", []), u("selectionChanged", []);
143
143
  }
144
144
  function J(e) {
145
- let t = l.value.findIndex((r) => r.id === e.id);
146
- t !== -1 && l.value.splice(t, 1), c.value = l.value.map((r) => r.id), d("update:modelValue", c.value), d("selected", l.value), d("selectionChanged", l.value);
145
+ let t = n.value.findIndex((r) => r.id === e.id);
146
+ t !== -1 && n.value.splice(t, 1), c.value = n.value.map((r) => r.id), u("update:modelValue", c.value), u("selected", n.value), u("selectionChanged", n.value);
147
147
  }
148
- function _(e) {
149
- e.target.id != o.field_name + "search" + p.value && e.target.id != o.field_name && !e.target.classList.contains("showOptions") && (B(), f.value = 0, m.value = !1);
148
+ function V(e) {
149
+ e.target.id != a.field_name + "search" + p.value && e.target.id != a.field_name && !e.target.classList.contains("showOptions") && (B(), f.value = 0, x.value = !1);
150
150
  }
151
151
  function C(e) {
152
152
  const t = `${e}${p.value}`, r = document.getElementById(t);
@@ -160,43 +160,43 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
160
160
  e === "ArrowDown" && f.value < A.value.length && (f.value++, C(f.value)), e === "ArrowUp" && f.value > 1 && (f.value--, C(f.value)), e === "Enter" && R(f.value);
161
161
  }
162
162
  function E() {
163
- return o.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
163
+ return a.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
164
164
  }
165
165
  function I() {
166
- if (O(l.value))
167
- return V(l.value) ? x.value.filter(
168
- (e) => l.value.some(
166
+ if (O(n.value))
167
+ return _(n.value) ? y.value.filter(
168
+ (e) => n.value.some(
169
169
  (t) => String(t.id) === String(e.id)
170
170
  )
171
- ) || [] : x.value.filter(
172
- (e) => l.value.some(
171
+ ) || [] : y.value.filter(
172
+ (e) => n.value.some(
173
173
  (t) => String(t) === String(e.id)
174
174
  )
175
175
  ) || [];
176
- if (o.modelValue)
177
- return V(o.modelValue) ? x.value.filter(
178
- (e) => o.modelValue.some(
176
+ if (a.modelValue)
177
+ return _(a.modelValue) ? y.value.filter(
178
+ (e) => a.modelValue.some(
179
179
  (t) => String(t.id) === String(e.id)
180
180
  )
181
- ) || [] : x.value.filter(
182
- (e) => o.modelValue.some(
181
+ ) || [] : y.value.filter(
182
+ (e) => a.modelValue.some(
183
183
  (t) => String(t) === String(e.id)
184
184
  )
185
185
  ) || [];
186
186
  }
187
187
  function $(e) {
188
- let t = l.value.findIndex((r) => r.id === e.id);
189
- t !== -1 ? l.value.splice(t, 1) : l.value.push(e), m.value = !1, c.value = l.value.map((r) => r.id), d("update:modelValue", c.value), d("selected", l.value), d("selectionChanged", l.value);
188
+ let t = n.value.findIndex((r) => r.id === e.id);
189
+ t !== -1 ? n.value.splice(t, 1) : n.value.push(e), x.value = !1, c.value = n.value.map((r) => r.id), u("update:modelValue", c.value), u("selected", n.value), u("selectionChanged", n.value);
190
190
  }
191
191
  function M() {
192
- if (!o.show) {
193
- if (m.value) {
194
- m.value = !1;
192
+ if (!a.show) {
193
+ if (x.value) {
194
+ x.value = !1;
195
195
  return;
196
196
  }
197
- g.value = "", m.value = !0, te(() => {
197
+ g.value = "", x.value = !0, te(() => {
198
198
  var e = document.getElementById(
199
- `${o.field_name}search${p.value}`
199
+ `${a.field_name}search${p.value}`
200
200
  );
201
201
  e && e.focus();
202
202
  });
@@ -205,94 +205,94 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
205
205
  function B() {
206
206
  g.value = "";
207
207
  }
208
- return b(g, () => {
209
- A.value.length === 0 && (l.value = []);
210
- }), b(l, (e) => {
208
+ return w(g, () => {
209
+ A.value.length === 0 && (n.value = []);
210
+ }), w(n, (e) => {
211
211
  if (O(e)) {
212
212
  c.value = e.map((s) => s.id);
213
- const t = Array.isArray(c.value) ? c.value : [], r = Array.isArray(o.modelValue) ? o.modelValue : [];
214
- JSON.stringify(t) !== JSON.stringify(r) && d("update:modelValue", c.value);
213
+ const t = Array.isArray(c.value) ? c.value : [], r = Array.isArray(a.modelValue) ? a.modelValue : [];
214
+ JSON.stringify(t) !== JSON.stringify(r) && u("update:modelValue", c.value);
215
215
  }
216
- }), b(
217
- () => o.modelValue,
216
+ }), w(
217
+ () => a.modelValue,
218
218
  (e) => {
219
- g.value = "", e ? (l.value = o.modelValue, l.value = I()) : l.value = {};
219
+ g.value = "", e ? (n.value = a.modelValue, n.value = I()) : n.value = {};
220
220
  },
221
221
  { immediate: !0, deep: !0 }
222
- ), b(
223
- () => o.options,
222
+ ), w(
223
+ () => a.options,
224
224
  () => {
225
- x.value = E(), l.value = I();
225
+ y.value = E(), n.value = I();
226
226
  },
227
227
  { immediate: !0, deep: !0 }
228
- ), (e, t) => (u(), i(h, null, [
229
- a.show ? (u(), i("div", {
228
+ ), (e, t) => (d(), i(h, null, [
229
+ o.show ? (d(), i("div", {
230
230
  key: 0,
231
- class: w(a.field_name)
231
+ class: b(o.field_name)
232
232
  }, [
233
- n("h3", re, y(a.label_name), 1),
234
- n("p", le, [
235
- (u(!0), i(h, null, S(l.value, (r, s) => (u(), i("span", ne, y(r?.name), 1))), 256))
233
+ l("h3", re, m(o.label_name), 1),
234
+ l("p", le, [
235
+ (d(!0), i(h, null, S(n.value, (r, s) => (d(), i("span", ne, m(r?.name), 1))), 256))
236
236
  ]),
237
- t[4] || (t[4] = n("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
237
+ t[4] || (t[4] = l("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
238
238
  ], 2)) : k("", !0),
239
- a.show ? k("", !0) : (u(), i("div", {
239
+ o.show ? k("", !0) : (d(), i("div", {
240
240
  key: 1,
241
- class: w(a.field_name)
241
+ class: b(o.field_name)
242
242
  }, [
243
- (u(!0), i(h, null, S(c.value, (r, s) => (u(), i("input", {
243
+ (d(!0), i(h, null, S(c.value, (r, s) => (d(), i("input", {
244
244
  type: "hidden",
245
- name: a.field_name + "[]",
245
+ name: o.field_name + "[]",
246
246
  key: s,
247
247
  value: r
248
248
  }, null, 8, oe))), 128)),
249
- a.options ? (u(), i("div", ae, [
250
- n("label", {
251
- class: w({
252
- "gl-label-form": a.error_message == "",
253
- "gl-label-form-invalid": a.error_message !== "",
254
- required: a.is_required
249
+ o.options ? (d(), i("div", ae, [
250
+ l("label", {
251
+ class: b({
252
+ "gl-label-form": o.error_message == "",
253
+ "gl-label-form-invalid": o.error_message !== "",
254
+ required: o.is_required
255
255
  })
256
- }, y(a.label_name), 3),
257
- n("div", se, [
258
- n("button", {
256
+ }, m(o.label_name), 3),
257
+ l("div", se, [
258
+ l("button", {
259
259
  onClick: F,
260
260
  type: "button",
261
261
  class: "px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 ltr:rounded-tl-lg rtl:rounded-tr-lg hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"
262
- }, y(a.language?.select_all ?? "Select all"), 1),
263
- n("button", {
262
+ }, m(o.language?.select_all ?? "Select all"), 1),
263
+ l("button", {
264
264
  onClick: H,
265
265
  type: "button",
266
266
  class: "ltr:rounded-tr-lg rtl:rounded-tl-lg! px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"
267
- }, y(a.language?.deselect_all ?? "Deselect all"), 1)
267
+ }, m(o.language?.deselect_all ?? "Deselect all"), 1)
268
268
  ]),
269
- n("div", {
269
+ l("div", {
270
270
  ref_key: "myDivDropDown",
271
271
  ref: T,
272
272
  class: "relative border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"
273
273
  }, [
274
- n("div", ie, [
275
- n("div", {
274
+ l("div", ie, [
275
+ l("div", {
276
276
  class: "flex flex-wrap gap-2 pr-2 gl-multi-dropdown showOptions",
277
277
  onClick: t[0] || (t[0] = (r) => M())
278
278
  }, [
279
- (u(!0), i(h, null, S(l.value, (r, s) => (u(), i("span", {
279
+ (d(!0), i(h, null, S(n.value, (r, s) => (d(), i("span", {
280
280
  key: s,
281
281
  class: "flex gap-2 px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm pointer-events-none dark:bg-blue-900 dark:text-blue-300"
282
282
  }, [
283
- Y(y(r?.name) + " ", 1),
284
- n("i", {
283
+ Y(m(r?.name) + " ", 1),
284
+ l("i", {
285
285
  onClick: L((U) => J(r), ["stop"]),
286
286
  class: "cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400"
287
287
  }, t[5] || (t[5] = [
288
- n("svg", {
288
+ l("svg", {
289
289
  class: "w-[9px] h-[16px]",
290
290
  "aria-hidden": "true",
291
291
  xmlns: "http://www.w3.org/2000/svg",
292
292
  fill: "none",
293
293
  viewBox: "0 0 14 14"
294
294
  }, [
295
- n("path", {
295
+ l("path", {
296
296
  stroke: "currentColor",
297
297
  "stroke-linecap": "round",
298
298
  "stroke-linejoin": "round",
@@ -300,22 +300,22 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
300
300
  d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
301
301
  })
302
302
  ], -1)
303
- ]), 8, ue)
303
+ ]), 8, de)
304
304
  ]))), 128))
305
305
  ]),
306
- n("i", {
306
+ l("i", {
307
307
  onClick: t[1] || (t[1] = L((r) => M(), ["stop"])),
308
308
  class: "absolute text-xl text-gray-500 cursor-pointer fas ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions",
309
309
  style: { top: "14px" }
310
310
  }, [
311
- (u(), i("svg", {
312
- class: w([m.value ? "" : "rotate-180", "w-3 h-3 shrink-0"]),
311
+ (d(), i("svg", {
312
+ class: b([x.value ? "" : "rotate-180", "w-3 h-3 shrink-0"]),
313
313
  "aria-hidden": "true",
314
314
  xmlns: "http://www.w3.org/2000/svg",
315
315
  fill: "none",
316
316
  viewBox: "0 0 10 6"
317
317
  }, t[6] || (t[6] = [
318
- n("path", {
318
+ l("path", {
319
319
  stroke: "currentColor",
320
320
  "stroke-linecap": "round",
321
321
  "stroke-linejoin": "round",
@@ -324,32 +324,32 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
324
324
  }, null, -1)
325
325
  ]), 2))
326
326
  ]),
327
- j(n("div", de, [
328
- n("div", ce, [
329
- t[8] || (t[8] = n("label", {
327
+ j(l("div", ue, [
328
+ l("div", ce, [
329
+ t[8] || (t[8] = l("label", {
330
330
  for: "default-search",
331
331
  class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
332
332
  }, "Search", -1)),
333
- n("div", fe, [
334
- t[7] || (t[7] = n("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
335
- j(n("input", {
333
+ l("div", fe, [
334
+ t[7] || (t[7] = l("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
335
+ j(l("input", {
336
336
  type: "search",
337
337
  "onUpdate:modelValue": t[2] || (t[2] = (r) => g.value = r),
338
338
  ref: q.value,
339
- id: `${a.field_name}search${p.value}`,
339
+ id: `${o.field_name}search${p.value}`,
340
340
  onKeydown: z,
341
341
  onBlur: t[3] || (t[3] = (r) => B()),
342
342
  autocomplete: "off",
343
343
  class: "block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",
344
- placeholder: a.search_input_placeholder
344
+ placeholder: o.search_input_placeholder
345
345
  }, null, 40, ve), [
346
346
  [Z, g.value]
347
347
  ])
348
348
  ])
349
349
  ]),
350
- n("div", ge, [
351
- (u(!0), i(h, null, S(A.value, (r, s) => (u(), i("div", {
352
- class: w([
350
+ l("div", ge, [
351
+ (d(!0), i(h, null, S(A.value, (r, s) => (d(), i("div", {
352
+ class: b([
353
353
  "block 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",
354
354
  s + 1 == f.value ? "bg-gray-100 dark:bg-gray-700 rounded-sm" : ""
355
355
  ]),
@@ -358,12 +358,12 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
358
358
  key: s,
359
359
  id: `${s + 1}${p.value}`
360
360
  }, [
361
- n("div", pe, [
362
- n("span", {
361
+ l("div", xe, [
362
+ l("span", {
363
363
  innerHTML: r.name || r.id || "-"
364
- }, null, 8, xe),
365
- K(r.id) ? (u(), i("svg", ye, t[9] || (t[9] = [
366
- n("path", {
364
+ }, null, 8, pe),
365
+ K(r.id) ? (d(), i("svg", ye, t[9] || (t[9] = [
366
+ l("path", {
367
367
  stroke: "currentColor",
368
368
  "stroke-linecap": "round",
369
369
  "stroke-linejoin": "round",
@@ -375,15 +375,17 @@ const re = { class: "font-bold ptext-lg dark:text-white" }, le = { class: "mt-3
375
375
  ], 42, me))), 128))
376
376
  ])
377
377
  ], 512), [
378
- [ee, m.value]
378
+ [ee, x.value]
379
379
  ])
380
380
  ])
381
381
  ], 512)
382
- ])) : k("", !0)
382
+ ])) : k("", !0),
383
+ l("span", he, m(o.error_message), 1),
384
+ l("small", be, m(o.description), 1)
383
385
  ], 2))
384
386
  ], 64));
385
387
  }
386
388
  };
387
389
  export {
388
- we as default
390
+ ke as default
389
391
  };
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.17",
6
+ "version": "1.3.19",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/mrgiant/GoldenLogicUi.git"