golden-logic-ui 1.2.21 → 1.2.23

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.
Files changed (68) hide show
  1. package/dist/ConfirmationModal-i3ekouBw.js +75 -0
  2. package/dist/DatatableAction-D-Qdjj2W.js +113 -0
  3. package/dist/DatatableCommand-BoU5cYJg.js +18 -0
  4. package/dist/DatatableConvertCronToHuman-Coiaa-wa.js +82 -0
  5. package/dist/DatatableDate-DtEktp_Z.js +20 -0
  6. package/dist/DatatableDateTime-PEXV-bY7.js +22 -0
  7. package/dist/DatatableDeleteAction-BQ6MyhV6.js +104 -0
  8. package/dist/DatatableDeleteEditAction-Cx324OUt.js +125 -0
  9. package/dist/DatatableFileDownload-BxP2_lpQ.js +87 -0
  10. package/dist/DatatableFiles-BROH3vBH.js +80 -0
  11. package/dist/DatatableHtml-ChZzeapg.js +17 -0
  12. package/dist/DatatableList-BSVI22pu.js +35 -0
  13. package/dist/DatatableListNested-BWEqWRCc.js +37 -0
  14. package/dist/DatatablePicture-DaWD4uIX.js +26 -0
  15. package/dist/DatatablePictures-xxeghKp3.js +39 -0
  16. package/dist/DatatableStatus-Dx60sa7s.js +31 -0
  17. package/dist/DatatableStatusGeneral-UOub65UY.js +59 -0
  18. package/dist/DatatableStatusServer-Dcq11U5_.js +37 -0
  19. package/dist/DatatableStatusSpecficColor-BYUuGgEb.js +64 -0
  20. package/dist/DatatableStatusTextLabelGeneral-J4MytOnh.js +83 -0
  21. package/dist/DeleteConfirmationModal-CQ07_qiL.js +96 -0
  22. package/dist/DynamicConfirmation-rEhA3jCe.js +115 -0
  23. package/dist/FilesUpload-JKyOru3A.js +300 -0
  24. package/dist/GLButton-ByIDh6vq.js +118 -0
  25. package/dist/GLDataTable-Bixwkdr4.js +278 -0
  26. package/dist/GLDataTableServerSide-Ra5AqDGB.js +16336 -0
  27. package/dist/GLTextarea-j7XXWI7A.js +110 -0
  28. package/dist/GlAccordion-BIAfvctc.js +91 -0
  29. package/dist/GlAccordionsWrapper-DsdunDzi.js +31 -0
  30. package/dist/GlCard-BVXmTv6q.js +37 -0
  31. package/dist/GlCodeCopy-C068yRcM.js +86 -0
  32. package/dist/GlCodeMirror-Ow8TJYSN.js +161 -0
  33. package/dist/GlCodeMirrorTranslate-CFmoM7d6.js +2068 -0
  34. package/dist/GlDataTableComponent-CSsMcDcX.js +366 -0
  35. package/dist/GlDataTableServerSideGroupBy-cG4BhXOA.js +260 -0
  36. package/dist/GlDateRangePicker-BWAEfZTB.js +124 -0
  37. package/dist/GlDropdown-B_zVkmxO.js +414 -0
  38. package/dist/GlLanguageSelector-DmWuIxzK.js +68 -0
  39. package/dist/GlModal-AMtSRssu.js +123 -0
  40. package/dist/GlModalShow-BzbcLu51.js +120 -0
  41. package/dist/GlModalWithoutOverflow-vR50Ulka.js +127 -0
  42. package/dist/GlMultiItemSlide-CxsiUcTr.js +409 -0
  43. package/dist/GlMultiItemSlideDynamic-BhdHrj3L.js +434 -0
  44. package/dist/GlMultiSelectDropdown-OaAC5ouZ.js +383 -0
  45. package/dist/GlTab-CUbU0yit.js +22 -0
  46. package/dist/GlTabShow-BBU3VU7O.js +21 -0
  47. package/dist/GlTabsWrapper-Dw7NAgDw.js +54 -0
  48. package/dist/GlTextCopy-CGgnIqPh.js +93 -0
  49. package/dist/GlTextInput-CoL8oZSw.js +126 -0
  50. package/dist/GlTextInputFile-BE2maeRQ.js +95 -0
  51. package/dist/GlTextInputWithText-C6fzOoYl.js +116 -0
  52. package/dist/GlTextTranslate-C3DzCK6k.js +125 -0
  53. package/dist/GlTextareaTranslate-DyU86Wf_.js +126 -0
  54. package/dist/GlTinymce-CjsbThKo.js +118 -0
  55. package/dist/GlTinymceTranslate-vp6hYqDK.js +188 -0
  56. package/dist/GlToastList-eeZ0hUJQ.js +126 -0
  57. package/dist/GlToggleBox-Dym29cx5.js +120 -0
  58. package/dist/GlToggleBoxTrueFalse-CjvcXXTw.js +112 -0
  59. package/dist/StatusConnectingConnectedDisconnected-CK5YzyQH.js +63 -0
  60. package/dist/StatusRunningSuccessFailed-CxK20462.js +41 -0
  61. package/dist/TailwindPagination-Dz89aS_l.js +276 -0
  62. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  63. package/dist/golden-logic-ui.css +1 -1
  64. package/dist/golden-logic-ui.js +217 -94352
  65. package/dist/golden-logic-ui.umd.cjs +94 -94
  66. package/dist/index-B4V16SEr.js +15668 -0
  67. package/dist/plugin-D6yBFU6i.js +53226 -0
  68. package/package.json +1 -1
@@ -0,0 +1,124 @@
1
+ import { ref as i, computed as V, createElementBlock as v, openBlock as c, Fragment as k, createCommentVNode as h, normalizeClass as u, createElementVNode as l, toDisplayString as s, withDirectives as w, vModelText as x } from "vue";
2
+ const S = { class: "font-bold dark:text-white" }, q = { class: "mt-1 text-gray-900 dark:text-white" }, E = ["for"], B = { class: "flex justify-between gap-1 flex-col md:flex-row text-center" }, j = ["required", "name", "id", "placeholder"], C = ["required", "name", "id", "placeholder"], D = { class: "text-center" }, M = { class: "gl-span-form-error" }, N = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, z = {
3
+ __name: "GlDateRangePicker",
4
+ props: {
5
+ is_required: {
6
+ type: Boolean,
7
+ default: !1
8
+ },
9
+ show: {
10
+ type: Boolean,
11
+ default: !1
12
+ },
13
+ error_message: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ modelValue: {
18
+ type: Object,
19
+ default: () => ({ start: "", end: "" })
20
+ },
21
+ field_name: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ label_name: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ description: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ placeholder: {
34
+ type: String,
35
+ default: ""
36
+ }
37
+ },
38
+ emits: ["update:modelValue", "keydown"],
39
+ setup(e, { emit: b }) {
40
+ const o = e, r = b, d = i(""), t = i({
41
+ start: o.modelValue.start,
42
+ end: o.modelValue.end
43
+ });
44
+ i(""), i("");
45
+ const f = V({
46
+ get() {
47
+ return o.modelValue.start;
48
+ },
49
+ set(n) {
50
+ t.value.start = n, y(t.value.start, t.value.end), r("update:modelValue", { start: t.value.start, end: t.value.end }), r("keydown", { start: t.value.start, end: t.value.end });
51
+ }
52
+ }), g = V({
53
+ get() {
54
+ return o.modelValue.end;
55
+ },
56
+ set(n) {
57
+ t.value.end = n, y(t.value.start, t.value.end), r("update:modelValue", { start: t.value.start, end: t.value.end }), r("keydown", { start: t.value.start, end: t.value.end });
58
+ }
59
+ }), y = (n, a) => {
60
+ n && a && new Date(n) > new Date(a) ? (d.value = "Start date cannot be after end date.", t.value.start = "", t.value.end = "", r("update:modelValue", { start: t.value.start, end: t.value.end }), r("keydown", { start: t.value.start, end: t.value.end })) : n && a && new Date(a) < new Date(n) ? (d.value = "End date cannot be before start date.", t.value.start = "", t.value.end = "", r("update:modelValue", { start: t.value.start, end: t.value.end }), r("keydown", { start: t.value.start, end: t.value.end })) : d.value = "";
61
+ };
62
+ return (n, a) => (c(), v(k, null, [
63
+ e.show ? (c(), v("div", {
64
+ key: 0,
65
+ class: u(e.field_name)
66
+ }, [
67
+ l("h3", S, s(e.label_name), 1),
68
+ l("p", q, s(e.modelValue.start) + " to " + s(e.modelValue.end), 1),
69
+ a[2] || (a[2] = l("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
70
+ ], 2)) : h("", !0),
71
+ e.show ? h("", !0) : (c(), v("div", {
72
+ key: 1,
73
+ class: u(e.field_name)
74
+ }, [
75
+ l("label", {
76
+ class: u({
77
+ "gl-label-form": e.error_message == "" && d.value == "",
78
+ "gl-label-form-invalid": e.error_message !== "" || d.value !== "",
79
+ required: e.is_required
80
+ }),
81
+ for: e.field_name
82
+ }, s(e.label_name), 11, E),
83
+ l("div", B, [
84
+ w(l("input", {
85
+ required: e.is_required,
86
+ name: e.field_name + "Start",
87
+ id: e.field_name + "Start",
88
+ class: u({
89
+ "gl-input-form": e.error_message == "" && d.value == "",
90
+ "gl-input-form-invalid": e.error_message !== "" || d.value !== ""
91
+ }),
92
+ type: "date",
93
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => f.value = m),
94
+ placeholder: e.placeholder
95
+ }, null, 10, j), [
96
+ [x, f.value]
97
+ ]),
98
+ a[3] || (a[3] = l("span", { class: "mx-4 text-gray-500 md:mt-2" }, "to", -1)),
99
+ w(l("input", {
100
+ required: e.is_required,
101
+ name: e.field_name + "End",
102
+ id: e.field_name + "End",
103
+ class: u({
104
+ "gl-input-form": e.error_message == "" && d.value == "",
105
+ "gl-input-form-invalid": e.error_message !== "" || d.value !== ""
106
+ }),
107
+ type: "date",
108
+ "onUpdate:modelValue": a[1] || (a[1] = (m) => g.value = m),
109
+ placeholder: e.placeholder
110
+ }, null, 10, C), [
111
+ [x, g.value]
112
+ ])
113
+ ]),
114
+ l("div", D, [
115
+ l("span", M, s(e.error_message || d.value), 1)
116
+ ]),
117
+ l("small", N, s(e.description), 1)
118
+ ], 2))
119
+ ], 64));
120
+ }
121
+ };
122
+ export {
123
+ z as default
124
+ };
@@ -0,0 +1,414 @@
1
+ import { ref as s, onMounted as ne, onBeforeUnmount as se, watch as V, createElementBlock as c, openBlock as f, Fragment as W, createCommentVNode as h, normalizeClass as k, createElementVNode as o, toDisplayString as b, withDirectives as A, withModifiers as F, vShow as K, normalizeStyle as ie, vModelText as ue, renderList as de, nextTick as ce } from "vue";
2
+ const fe = { class: "font-bold ptext-lg dark:text-white" }, ve = { class: "mt-3 mb-4" }, me = { 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" }, ge = ["name", "id", "value"], pe = {
3
+ key: 0,
4
+ class: "dropdown"
5
+ }, he = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, xe = { class: "relative showOptions" }, ye = ["value", "placeholder"], we = {
6
+ key: 0,
7
+ class: "p-1"
8
+ }, ke = { class: "relative" }, be = ["id", "placeholder"], De = ["onClick", "onMousedown", "id"], _e = { class: "flex items-center py-2 pl-10 pr-4" }, Se = {
9
+ key: 0,
10
+ class: "absolute flex items-center shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400",
11
+ "aria-hidden": "true",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ fill: "none",
14
+ viewBox: "0 0 16 12"
15
+ }, Ee = ["innerHTML"], Oe = {
16
+ key: 1,
17
+ class: "p-2 text-center text-gray-500"
18
+ }, $e = {
19
+ key: 2,
20
+ class: "p-2 text-gray-500"
21
+ }, Le = { 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" }, Ce = {
22
+ __name: "GlDropdown",
23
+ props: {
24
+ modelValue: {
25
+ type: [String, Number],
26
+ default: ""
27
+ },
28
+ defaultValue: {
29
+ type: [String, Number],
30
+ default: ""
31
+ },
32
+ field_name: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ is_required: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ has_cancel: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ label_name: {
45
+ type: String,
46
+ default: ""
47
+ },
48
+ options: {
49
+ type: Array,
50
+ required: !0,
51
+ default: () => [],
52
+ note: "Options of dropdown. An array of options with id and name"
53
+ },
54
+ placeholder: {
55
+ type: String,
56
+ required: !1,
57
+ default: "Please select an option",
58
+ note: "Placeholder of dropdown"
59
+ },
60
+ search_input_placeholder: {
61
+ type: String,
62
+ required: !1,
63
+ default: "Search ...",
64
+ note: "Placeholder of search input"
65
+ },
66
+ no_results_found_placeholder: {
67
+ type: String,
68
+ required: !1,
69
+ default: "No results found",
70
+ note: "Placeholder of no results found"
71
+ },
72
+ maxItem: {
73
+ type: Number,
74
+ required: !1,
75
+ default: 1e4,
76
+ note: "Max items showing"
77
+ },
78
+ show: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ error_message: {
83
+ type: String,
84
+ default: ""
85
+ },
86
+ description: {
87
+ type: String,
88
+ default: ""
89
+ },
90
+ api_url: { type: String, default: "", required: !1 },
91
+ hide_search: {
92
+ type: Boolean,
93
+ default: !1
94
+ },
95
+ options_top_size: {
96
+ type: Number,
97
+ default: 22
98
+ }
99
+ },
100
+ emits: ["update:modelValue", "selected", "selectionChanged"],
101
+ setup(r, { emit: G }) {
102
+ const a = r, x = G;
103
+ s(null);
104
+ const l = s({}), q = s(!1), m = s(0), p = s(!1), v = s(""), d = s(""), D = s(!1), y = s(1), _ = s(null), S = s(1), i = s([]), U = s([]), O = s(null), J = s(null), T = s(0), j = s(0), E = () => {
105
+ if (O.value) {
106
+ T.value = O.value.offsetWidth;
107
+ var e = O.value.getBoundingClientRect();
108
+ j.value = e.top + 41 + a.options_top_size;
109
+ }
110
+ }, $ = async (e = "down", t = !1) => {
111
+ if (!D.value) {
112
+ D.value = !0;
113
+ try {
114
+ const n = e === "up" ? Math.max(y.value - 1, S) : y.value, { data: u } = await axios.get(a.api_url, {
115
+ params: { search: v.value, page: n, per_page: 20 }
116
+ });
117
+ let w = le(u.data);
118
+ e === "down" && (i.value.push(...w), y.value++, _.value = u.last_page), _.value || (_.value = u.last_page), S.value || (S.value = 1), l.value = L(), t && (v.value = "", i.value = []);
119
+ } catch (n) {
120
+ console.error("Error fetching data:", n);
121
+ }
122
+ D.value = !1;
123
+ }
124
+ }, Q = (e) => {
125
+ if (!e.target) return;
126
+ const t = e.target.scrollTop, n = e.target.scrollHeight - e.target.clientHeight <= t + 10, u = t <= 10;
127
+ n && y.value <= _.value && $("down"), u && y.value > S.value;
128
+ }, N = (e) => {
129
+ e.target && (document.activeElement.classList.contains("showOptions" + d.value) ? p.value || B() : e.target.id != a.field_name + "search" + d.value && e.target.id != a.field_name && !e.target.classList.contains("showOptions" + d.value) && (M(), m.value = 0, p.value = !1));
130
+ }, B = () => {
131
+ if (!a.show) {
132
+ if (p.value) {
133
+ p.value = !1;
134
+ return;
135
+ }
136
+ v.value = "", p.value = !0, a.api_url && i.value.length === 0 && $("down"), ce(() => {
137
+ E();
138
+ var e = document.getElementById(
139
+ `${a.field_name}search${d.value}`
140
+ );
141
+ e && e.focus();
142
+ });
143
+ }
144
+ }, L = () => C(l.value) ? typeof l.value == "object" ? i.value.find(
145
+ (e) => String(e.id) === String(l.value.id)
146
+ ) || {} : i.value.find(
147
+ (e) => String(e.id) === String(l.value)
148
+ ) || {} : a.modelValue ? typeof a.modelValue == "object" ? i.value.find(
149
+ (e) => String(e.id) === String(a.modelValue.id)
150
+ ) || {} : i.value.find(
151
+ (e) => String(e.id) === String(a.modelValue)
152
+ ) || {} : {};
153
+ ne(() => {
154
+ if (d.value = Z(), !a.show) {
155
+ window.addEventListener("scroll", E, { passive: !0 });
156
+ const e = document.querySelector(".gl_modal_body");
157
+ e && e.addEventListener("scroll", E, { passive: !0 }), document.body.addEventListener("click", P), document.addEventListener("focusin", N);
158
+ }
159
+ }), se(() => {
160
+ window.removeEventListener("scroll", E);
161
+ const e = document.querySelector(".gl_modal_body");
162
+ e && e.removeEventListener("scroll", E, { passive: !0 }), document.body.removeEventListener("click", P), document.removeEventListener("focusin", N);
163
+ });
164
+ function X() {
165
+ const e = [], t = v.value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = new RegExp(t, "ig");
166
+ for (const u of U.value) {
167
+ const w = String(u.name);
168
+ (v.value.length < 1 || w.match(n)) && e.length < a.maxItem && e.push(u);
169
+ }
170
+ return e;
171
+ }
172
+ function Y(e) {
173
+ if ([
174
+ "ArrowLeft",
175
+ "ArrowUp",
176
+ "ArrowRight",
177
+ "ArrowDown",
178
+ "Enter"
179
+ ].includes(e.key)) {
180
+ if (["ArrowUp", "ArrowDown"].includes(e.key) && e.preventDefault(), e.key === "ArrowDown" && a.posts === "")
181
+ return;
182
+ te(e.key);
183
+ }
184
+ }
185
+ function Z() {
186
+ let e = (/* @__PURE__ */ new Date()).getTime();
187
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
188
+ /[xy]/g,
189
+ function(n) {
190
+ const u = (e + Math.random() * 16) % 16 | 0;
191
+ return e = Math.floor(e / 16), (n === "x" ? u : u & 3 | 8).toString(16);
192
+ }
193
+ );
194
+ }
195
+ function C(e) {
196
+ return e && typeof e == "object" && Object.keys(e).length > 0;
197
+ }
198
+ function P(e) {
199
+ e.target.id != a.field_name + "search" + d.value && e.target.id != a.field_name && !e.target.classList.contains("showOptions" + d.value) && (M(), m.value = 0, p.value = !1);
200
+ }
201
+ function z(e) {
202
+ const t = `${e}${d.value}`, n = document.getElementById(t);
203
+ n && n.scrollIntoView();
204
+ }
205
+ function ee(e) {
206
+ const t = `${e}${d.value}`, n = document.getElementById(t);
207
+ n && n.click();
208
+ }
209
+ function te(e) {
210
+ e === "ArrowDown" && m.value < i.value.length && (m.value++, z(m.value)), e === "ArrowUp" && m.value > 1 && (m.value--, z(m.value)), e === "Enter" && ee(m.value);
211
+ }
212
+ function le(e) {
213
+ return e.map((t, n) => typeof t == "object" ? t : { id: t, name: t });
214
+ }
215
+ function ae() {
216
+ return a.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
217
+ }
218
+ function R(e) {
219
+ q.value = !0, l.value = e, p.value = !1, x("update:modelValue", l.value.id), x("selected", l.value), x("selectionChanged", l.value);
220
+ }
221
+ function re() {
222
+ a.show || (l.value = {}, v.value = "", x("update:modelValue", ""), x("selected", l.value), x("selectionChanged", l.value), B());
223
+ }
224
+ function M() {
225
+ (!l.value || !l.value.id) && (l.value = {}, v.value = "");
226
+ }
227
+ return V(v, (e) => {
228
+ a.api_url ? (y.value = 1, _.value = null, S.value = 1, i.value = [], $("down")) : i.value = X(), i.value.length === 0 && (l.value = {});
229
+ }), V(l, (e) => {
230
+ C(e) && e && e.id !== a.modelValue && x("update:modelValue", e.id);
231
+ }), V(
232
+ () => a.modelValue,
233
+ (e) => {
234
+ e ? (l.value = a.modelValue, a.api_url && q.value == !1 ? (v.value = l.value, $("down", !0)) : l.value = L()) : l.value = {};
235
+ },
236
+ { immediate: !0, deep: !0 }
237
+ ), V(
238
+ () => a.options,
239
+ () => {
240
+ a.api_url || (i.value = U.value = ae()), l.value = L();
241
+ },
242
+ { immediate: !0, deep: !0 }
243
+ ), (e, t) => {
244
+ var n, u, w;
245
+ return f(), c(W, null, [
246
+ r.show ? (f(), c("div", {
247
+ key: 0,
248
+ class: k(r.field_name)
249
+ }, [
250
+ o("h3", fe, b(r.label_name), 1),
251
+ o("p", ve, [
252
+ o("span", me, b((n = l.value) == null ? void 0 : n.name), 1)
253
+ ]),
254
+ t[4] || (t[4] = o("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
255
+ ], 2)) : h("", !0),
256
+ r.show ? h("", !0) : (f(), c("div", {
257
+ key: 1,
258
+ class: k(r.field_name)
259
+ }, [
260
+ o("input", {
261
+ type: "hidden",
262
+ name: r.field_name,
263
+ id: r.field_name,
264
+ value: (u = l.value) == null ? void 0 : u.id
265
+ }, null, 8, ge),
266
+ r.options ? (f(), c("div", pe, [
267
+ r.label_name ? (f(), c("label", {
268
+ key: 0,
269
+ class: k({
270
+ "gl-label-form": r.error_message == "",
271
+ "gl-label-form-invalid": r.error_message !== "",
272
+ required: r.is_required
273
+ })
274
+ }, b(r.label_name), 3)) : h("", !0),
275
+ o("div", he, [
276
+ o("div", xe, [
277
+ o("input", {
278
+ ref_key: "myDivDropDown",
279
+ ref: O,
280
+ class: k([{
281
+ "gl-input-form": r.error_message == "",
282
+ "gl-input-form-invalid": r.error_message !== "",
283
+ [`showOptions${d.value}`]: !0
284
+ }, "pr-2 showOptions1"]),
285
+ value: (w = l.value) == null ? void 0 : w.name,
286
+ placeholder: r.placeholder,
287
+ autocomplete: "off",
288
+ readonly: ""
289
+ }, null, 10, ye),
290
+ A(o("i", {
291
+ onClick: t[0] || (t[0] = F((g) => re(), ["stop"])),
292
+ 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",
293
+ style: { top: "13px" }
294
+ }, t[5] || (t[5] = [
295
+ o("svg", {
296
+ class: "w-[10px] h-[16px]",
297
+ "aria-hidden": "true",
298
+ xmlns: "http://www.w3.org/2000/svg",
299
+ fill: "none",
300
+ viewBox: "0 0 14 14"
301
+ }, [
302
+ o("path", {
303
+ stroke: "currentColor",
304
+ "stroke-linecap": "round",
305
+ "stroke-linejoin": "round",
306
+ "stroke-width": "2",
307
+ d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
308
+ })
309
+ ], -1)
310
+ ]), 512), [
311
+ [K, C(l.value) && r.has_cancel]
312
+ ]),
313
+ o("i", {
314
+ onClick: t[1] || (t[1] = F((g) => B(), ["stop"])),
315
+ class: "absolute text-xl text-gray-500 cursor-pointer ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions",
316
+ style: { top: "13px" }
317
+ }, [
318
+ (f(), c("svg", {
319
+ class: k([p.value ? "" : "rotate-180", "w-4 h-4 shrink-0"]),
320
+ "aria-hidden": "true",
321
+ xmlns: "http://www.w3.org/2000/svg",
322
+ fill: "none",
323
+ viewBox: "0 0 10 6"
324
+ }, t[6] || (t[6] = [
325
+ o("path", {
326
+ stroke: "currentColor",
327
+ "stroke-linecap": "round",
328
+ "stroke-linejoin": "round",
329
+ "stroke-width": "2",
330
+ d: "M9 5 5 1 1 5"
331
+ }, null, -1)
332
+ ]), 2))
333
+ ]),
334
+ A(o("div", {
335
+ class: "text-gray-700 bg-white dark:border-strokeDark dark:bg-boxDark dark:text-gray-200 border-b! border-t-0! border-r! border-l! fixed w-full z-999999999 rounded-b-lg",
336
+ style: ie({
337
+ maxWidth: T.value + "px",
338
+ top: j.value + "px"
339
+ })
340
+ }, [
341
+ r.hide_search ? h("", !0) : (f(), c("div", we, [
342
+ t[8] || (t[8] = o("label", {
343
+ for: "default-search",
344
+ class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
345
+ }, "Search", -1)),
346
+ o("div", ke, [
347
+ t[7] || (t[7] = o("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
348
+ A(o("input", {
349
+ type: "search",
350
+ "onUpdate:modelValue": t[2] || (t[2] = (g) => v.value = g),
351
+ id: `${r.field_name}search${d.value}`,
352
+ onKeydown: Y,
353
+ onBlur: t[3] || (t[3] = (g) => M()),
354
+ autocomplete: "off",
355
+ class: "block w-full p-2 text-sm text-gray-900 border rounded-lg outline-hidden border-primary ps-10 bg-gray-50 focus:border-primary dark:bg-gray-700 dark:border-primaryDark dark:placeholder-primaryDark dark:text-white dark:focus:border-primaryDark",
356
+ placeholder: r.search_input_placeholder
357
+ }, null, 40, be), [
358
+ [ue, v.value]
359
+ ])
360
+ ])
361
+ ])),
362
+ o("div", {
363
+ class: "overflow-y-auto max-h-64",
364
+ onScroll: Q,
365
+ ref_key: "dropdownRef",
366
+ ref: J
367
+ }, [
368
+ i.value.length ? (f(!0), c(W, { key: 0 }, de(i.value, (g, I) => {
369
+ var H;
370
+ return f(), c("div", {
371
+ class: k([
372
+ "relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
373
+ I + 1 == m.value ? "bg-gray-100 dark:bg-gray-600" : ""
374
+ ]),
375
+ onClick: (oe) => R(g),
376
+ onMousedown: (oe) => R(g),
377
+ key: I,
378
+ id: `${I + 1}${d.value}`
379
+ }, [
380
+ o("div", _e, [
381
+ ((H = l.value) == null ? void 0 : H.id) === g.id ? (f(), c("svg", Se, t[9] || (t[9] = [
382
+ o("path", {
383
+ stroke: "currentColor",
384
+ "stroke-linecap": "round",
385
+ "stroke-linejoin": "round",
386
+ "stroke-width": "2",
387
+ d: "M1 5.917 5.724 10.5 15 1.5"
388
+ }, null, -1)
389
+ ]))) : h("", !0),
390
+ o("span", {
391
+ innerHTML: g.name || g.id || "-"
392
+ }, null, 8, Ee)
393
+ ])
394
+ ], 42, De);
395
+ }), 128)) : h("", !0),
396
+ D.value ? (f(), c("div", Oe, " Loading... ")) : h("", !0),
397
+ !D.value && i.value.length === 0 ? (f(), c("div", $e, b(r.no_results_found_placeholder), 1)) : h("", !0)
398
+ ], 544)
399
+ ], 4), [
400
+ [K, p.value]
401
+ ])
402
+ ])
403
+ ])
404
+ ])) : h("", !0),
405
+ o("span", Le, b(r.error_message), 1),
406
+ o("small", Ve, b(r.description), 1)
407
+ ], 2))
408
+ ], 64);
409
+ };
410
+ }
411
+ };
412
+ export {
413
+ Ce as default
414
+ };
@@ -0,0 +1,68 @@
1
+ import { createElementBlock as o, openBlock as d, Fragment as s, renderList as g, createElementVNode as n, normalizeClass as u, toDisplayString as i } from "vue";
2
+ import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const m = {
4
+ components: {},
5
+ props: {
6
+ field_name: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ trans_selector_name: {
11
+ type: String,
12
+ default: "i18n_selector"
13
+ }
14
+ },
15
+ data() {
16
+ return {
17
+ locals: [],
18
+ default_language: ""
19
+ };
20
+ },
21
+ methods: {
22
+ getLocals() {
23
+ const c = {
24
+ id: this.menu_id
25
+ };
26
+ axios.get("/admin/get_locals", { params: c }).then((e) => {
27
+ this.locals = e.data.locals, this.default_language = e.data.default_language, this.$refs.language_selector.classList.add("gl-multilanguage");
28
+ }).catch((e) => {
29
+ console.error(e);
30
+ });
31
+ }
32
+ },
33
+ created() {
34
+ this.getLocals();
35
+ },
36
+ mounted() {
37
+ }
38
+ }, f = {
39
+ class: "grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector",
40
+ ref: "language_selector"
41
+ }, h = ["name", "value", "id", "checked"], p = ["for"];
42
+ function b(c, e, l, k, r, y) {
43
+ return d(), o("ul", f, [
44
+ (d(!0), o(s, null, g(r.locals, (t, a) => (d(), o("li", null, [
45
+ n("input", {
46
+ type: "radio",
47
+ name: l.trans_selector_name,
48
+ value: t,
49
+ class: "hidden peer",
50
+ id: t + "_" + l.field_name,
51
+ autocomplete: "off",
52
+ checked: t === r.default_language
53
+ }, null, 8, h),
54
+ n("label", {
55
+ for: t + "_" + l.field_name,
56
+ class: u([{
57
+ "border md:rounded-s-lg!": a === 0,
58
+ "border md:rounded-e-lg!": a === r.locals.length - 1,
59
+ "border-t border-b": a !== 0 && a !== r.locals.length - 1
60
+ }, "block w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])
61
+ }, i(t), 11, p)
62
+ ]))), 256))
63
+ ], 512);
64
+ }
65
+ const L = /* @__PURE__ */ _(m, [["render", b]]);
66
+ export {
67
+ L as default
68
+ };