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,383 @@
1
+ import { ref as d, onMounted as ee, onBeforeUnmount as te, computed as re, watch as S, createElementBlock as s, openBlock as u, Fragment as w, createCommentVNode as C, normalizeClass as k, createElementVNode as n, toDisplayString as h, renderList as A, withDirectives as P, createTextVNode as le, withModifiers as W, normalizeStyle as ne, vModelText as oe, vShow as ae, nextTick as ie } from "vue";
2
+ const se = { class: "font-bold ptext-lg dark:text-white" }, ue = { class: "mt-3 mb-4" }, de = { 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" }, ce = ["name", "value"], fe = {
3
+ key: 0,
4
+ class: "dropdown"
5
+ }, ve = {
6
+ class: "inline-flex ml-2 rounded-md shadow-xs",
7
+ role: "group"
8
+ }, ge = { class: "relative" }, me = ["onClick"], pe = { class: "p-1" }, xe = { class: "relative" }, ye = ["id", "placeholder"], he = { class: "overflow-y-auto max-h-64" }, be = ["onClick", "onMousedown", "id"], ke = {
9
+ __name: "GlMultiSelectDropdown",
10
+ props: {
11
+ language: {
12
+ type: Object,
13
+ default: () => {
14
+ }
15
+ },
16
+ modelValue: {
17
+ type: Array,
18
+ default: []
19
+ },
20
+ defaultValue: {
21
+ type: Array,
22
+ default: []
23
+ },
24
+ field_name: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ is_required: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ has_cancel: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ label_name: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ options: {
41
+ type: Array,
42
+ required: !0,
43
+ default: () => [],
44
+ note: "Options of dropdown. An array of options with id and name"
45
+ },
46
+ placeholder: {
47
+ type: String,
48
+ required: !1,
49
+ default: "Please select an option",
50
+ note: "Placeholder of dropdown"
51
+ },
52
+ search_input_placeholder: {
53
+ type: String,
54
+ required: !1,
55
+ default: "Search",
56
+ note: "Placeholder of search input"
57
+ },
58
+ maxItem: {
59
+ type: Number,
60
+ required: !1,
61
+ default: 1e4,
62
+ note: "Max items showing"
63
+ },
64
+ show: {
65
+ type: Boolean,
66
+ default: !1
67
+ },
68
+ error_message: {
69
+ type: String,
70
+ default: ""
71
+ },
72
+ description: {
73
+ type: String,
74
+ default: ""
75
+ },
76
+ options_top_size: {
77
+ type: Number,
78
+ default: 22
79
+ }
80
+ },
81
+ emits: ["update:modelValue", "selected", "selectionChanged"],
82
+ setup(i, { emit: K }) {
83
+ const a = i, c = K, R = d(null), r = d([]), b = d([]), f = d([]), v = d(0), x = d(!1), m = d(""), y = d(""), D = d(null), I = d(0), $ = d(0), O = () => {
84
+ if (D.value) {
85
+ I.value = D.value.offsetWidth;
86
+ var e = D.value.getBoundingClientRect();
87
+ $.value = e.top + 41 + a.options_top_size;
88
+ }
89
+ }, _ = (e) => {
90
+ e.key === "Enter" && e.target.form && e.preventDefault();
91
+ };
92
+ ee(() => {
93
+ y.value = J(), a.show || (window.addEventListener("scroll", O), document.body.addEventListener("click", U), document.addEventListener("keypress", _));
94
+ }), te(() => {
95
+ window.removeEventListener("scroll", O), document.body.removeEventListener("click", U), document.removeEventListener("keypress", _);
96
+ });
97
+ const E = re(() => {
98
+ const e = [], t = new RegExp(m.value, "ig");
99
+ for (const l of b.value) {
100
+ const g = String(l.name);
101
+ (m.value.length < 1 || g.match(t)) && e.length < a.maxItem && e.push(l);
102
+ }
103
+ return e;
104
+ });
105
+ function F(e) {
106
+ if ([
107
+ "ArrowLeft",
108
+ "ArrowUp",
109
+ "ArrowRight",
110
+ "ArrowDown",
111
+ "Enter"
112
+ ].includes(e.key)) {
113
+ if (["ArrowUp", "ArrowDown"].includes(e.key) && e.preventDefault(), e.key === "ArrowDown" && a.posts === "")
114
+ return;
115
+ Z(e.key);
116
+ }
117
+ }
118
+ function J() {
119
+ let e = (/* @__PURE__ */ new Date()).getTime();
120
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
121
+ /[xy]/g,
122
+ function(l) {
123
+ const g = (e + Math.random() * 16) % 16 | 0;
124
+ return e = Math.floor(e / 16), (l === "x" ? g : g & 3 | 8).toString(16);
125
+ }
126
+ );
127
+ }
128
+ function B(e) {
129
+ return Array.isArray(e) && e.length > 0 && e.every((t) => typeof t == "object" && t !== null);
130
+ }
131
+ function M(e) {
132
+ return e.every((t) => typeof t == "object" && t !== null);
133
+ }
134
+ function G(e) {
135
+ return r.value.findIndex((t) => t.id === e) !== -1;
136
+ }
137
+ function H() {
138
+ r.value = L();
139
+ }
140
+ function Q() {
141
+ r.value = [], c("update:modelValue", []), c("selected", []), c("selectionChanged", []);
142
+ }
143
+ function X(e) {
144
+ let t = r.value.findIndex((l) => l.id === e.id);
145
+ t !== -1 && r.value.splice(t, 1), f.value = r.value.map((l) => l.id), c("update:modelValue", f.value), c("selected", r.value), c("selectionChanged", r.value);
146
+ }
147
+ function U(e) {
148
+ e.target.id != a.field_name + "search" + y.value && e.target.id != a.field_name && !e.target.classList.contains("showOptions") && (z(), v.value = 0, x.value = !1);
149
+ }
150
+ function V(e) {
151
+ const t = `${e}${y.value}`, l = document.getElementById(t);
152
+ l && l.scrollIntoView();
153
+ }
154
+ function Y(e) {
155
+ const t = `${e}${y.value}`, l = document.getElementById(t);
156
+ l && l.click();
157
+ }
158
+ function Z(e) {
159
+ e === "ArrowDown" && v.value < E.value.length && (v.value++, V(v.value)), e === "ArrowUp" && v.value > 1 && (v.value--, V(v.value)), e === "Enter" && Y(v.value);
160
+ }
161
+ function L() {
162
+ return a.options.map((e, t) => typeof e == "object" ? e : { id: e, name: e });
163
+ }
164
+ function j() {
165
+ if (B(r.value))
166
+ return M(r.value) ? b.value.filter(
167
+ (e) => r.value.some(
168
+ (t) => String(t.id) === String(e.id)
169
+ )
170
+ ) || [] : b.value.filter(
171
+ (e) => r.value.some(
172
+ (t) => String(t) === String(e.id)
173
+ )
174
+ ) || [];
175
+ if (a.modelValue)
176
+ return M(a.modelValue) ? b.value.filter(
177
+ (e) => a.modelValue.some(
178
+ (t) => String(t.id) === String(e.id)
179
+ )
180
+ ) || [] : b.value.filter(
181
+ (e) => a.modelValue.some(
182
+ (t) => String(t) === String(e.id)
183
+ )
184
+ ) || [];
185
+ }
186
+ function N(e) {
187
+ let t = r.value.findIndex((l) => l.id === e.id);
188
+ t !== -1 ? r.value.splice(t, 1) : r.value.push(e), x.value = !1, f.value = r.value.map((l) => l.id), c("update:modelValue", f.value), c("selected", r.value), c("selectionChanged", r.value);
189
+ }
190
+ function q() {
191
+ if (!a.show) {
192
+ if (x.value) {
193
+ x.value = !1;
194
+ return;
195
+ }
196
+ m.value = "", x.value = !0, ie(() => {
197
+ O();
198
+ var e = document.getElementById(
199
+ `${a.field_name}search${y.value}`
200
+ );
201
+ e && e.focus();
202
+ });
203
+ }
204
+ }
205
+ function z() {
206
+ m.value = "";
207
+ }
208
+ return S(m, () => {
209
+ E.value.length === 0 && (r.value = []);
210
+ }), S(r, (e) => {
211
+ if (B(e)) {
212
+ f.value = e.map((g) => g.id);
213
+ const t = Array.isArray(f.value) ? f.value : [], l = Array.isArray(a.modelValue) ? a.modelValue : [];
214
+ JSON.stringify(t) !== JSON.stringify(l) && c("update:modelValue", f.value);
215
+ }
216
+ }), S(
217
+ () => a.modelValue,
218
+ (e) => {
219
+ m.value = "", e ? (r.value = a.modelValue, r.value = j()) : r.value = {};
220
+ },
221
+ { immediate: !0, deep: !0 }
222
+ ), S(
223
+ () => a.options,
224
+ () => {
225
+ b.value = L(), r.value = j();
226
+ },
227
+ { immediate: !0, deep: !0 }
228
+ ), (e, t) => {
229
+ var l, g;
230
+ return u(), s(w, null, [
231
+ i.show ? (u(), s("div", {
232
+ key: 0,
233
+ class: k(i.field_name)
234
+ }, [
235
+ n("h3", se, h(i.label_name), 1),
236
+ n("p", ue, [
237
+ (u(!0), s(w, null, A(r.value, (o, p) => (u(), s("span", de, h(o == null ? void 0 : o.name), 1))), 256))
238
+ ]),
239
+ t[4] || (t[4] = n("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
240
+ ], 2)) : C("", !0),
241
+ i.show ? C("", !0) : (u(), s("div", {
242
+ key: 1,
243
+ class: k(i.field_name)
244
+ }, [
245
+ (u(!0), s(w, null, A(f.value, (o, p) => (u(), s("input", {
246
+ type: "hidden",
247
+ name: i.field_name + "[]",
248
+ key: p,
249
+ value: o
250
+ }, null, 8, ce))), 128)),
251
+ i.options ? (u(), s("div", fe, [
252
+ n("label", {
253
+ class: k({
254
+ "gl-label-form": i.error_message == "",
255
+ "gl-label-form-invalid": i.error_message !== "",
256
+ required: i.is_required
257
+ })
258
+ }, h(i.label_name), 3),
259
+ n("div", ve, [
260
+ n("button", {
261
+ onClick: H,
262
+ type: "button",
263
+ 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"
264
+ }, h(((l = i.language) == null ? void 0 : l.select_all) ?? "Select all"), 1),
265
+ n("button", {
266
+ onClick: Q,
267
+ type: "button",
268
+ 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"
269
+ }, h(((g = i.language) == null ? void 0 : g.deselect_all) ?? "Deselect all"), 1)
270
+ ]),
271
+ n("div", {
272
+ ref_key: "myDivDropDown",
273
+ ref: D,
274
+ 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"
275
+ }, [
276
+ n("div", ge, [
277
+ n("div", {
278
+ class: "flex flex-wrap gap-2 pr-2 gl-multi-dropdown showOptions",
279
+ onClick: t[0] || (t[0] = (o) => q())
280
+ }, [
281
+ (u(!0), s(w, null, A(r.value, (o, p) => (u(), s("span", {
282
+ key: p,
283
+ 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"
284
+ }, [
285
+ le(h(o == null ? void 0 : o.name) + " ", 1),
286
+ n("i", {
287
+ onClick: W((T) => X(o), ["stop"]),
288
+ class: "cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400"
289
+ }, t[5] || (t[5] = [
290
+ n("svg", {
291
+ class: "w-[9px] h-[16px]",
292
+ "aria-hidden": "true",
293
+ xmlns: "http://www.w3.org/2000/svg",
294
+ fill: "none",
295
+ viewBox: "0 0 14 14"
296
+ }, [
297
+ n("path", {
298
+ stroke: "currentColor",
299
+ "stroke-linecap": "round",
300
+ "stroke-linejoin": "round",
301
+ "stroke-width": "2",
302
+ d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
303
+ })
304
+ ], -1)
305
+ ]), 8, me)
306
+ ]))), 128))
307
+ ]),
308
+ n("i", {
309
+ onClick: t[1] || (t[1] = W((o) => q(), ["stop"])),
310
+ 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",
311
+ style: { top: "13px" }
312
+ }, [
313
+ (u(), s("svg", {
314
+ class: k([x.value ? "" : "rotate-180", "w-4 h-4 shrink-0"]),
315
+ "aria-hidden": "true",
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ fill: "none",
318
+ viewBox: "0 0 10 6"
319
+ }, t[6] || (t[6] = [
320
+ n("path", {
321
+ stroke: "currentColor",
322
+ "stroke-linecap": "round",
323
+ "stroke-linejoin": "round",
324
+ "stroke-width": "2",
325
+ d: "M9 5 5 1 1 5"
326
+ }, null, -1)
327
+ ]), 2))
328
+ ]),
329
+ P(n("div", {
330
+ 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 showOptions rounded-b-lg",
331
+ style: ne({
332
+ maxWidth: I.value + "px",
333
+ top: $.value + "px"
334
+ })
335
+ }, [
336
+ n("div", pe, [
337
+ t[8] || (t[8] = n("label", {
338
+ for: "default-search",
339
+ class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
340
+ }, "Search", -1)),
341
+ n("div", xe, [
342
+ t[7] || (t[7] = n("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
343
+ P(n("input", {
344
+ type: "search",
345
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => m.value = o),
346
+ ref: R.value,
347
+ id: `${i.field_name}search${y.value}`,
348
+ onKeydown: F,
349
+ onBlur: t[3] || (t[3] = (o) => z()),
350
+ autocomplete: "off",
351
+ class: "block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
352
+ placeholder: i.search_input_placeholder
353
+ }, null, 40, ye), [
354
+ [oe, m.value]
355
+ ])
356
+ ])
357
+ ]),
358
+ n("div", he, [
359
+ (u(!0), s(w, null, A(E.value, (o, p) => (u(), s("div", {
360
+ class: k([
361
+ "block 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",
362
+ p + 1 == v.value || G(o.id) ? "bg-gray-100 dark:bg-gray-600" : ""
363
+ ]),
364
+ onClick: (T) => N(o),
365
+ onMousedown: (T) => N(o),
366
+ key: p,
367
+ id: `${p + 1}${y.value}`
368
+ }, h(o.name || o.id || "-"), 43, be))), 128))
369
+ ])
370
+ ], 4), [
371
+ [ae, x.value]
372
+ ])
373
+ ])
374
+ ], 512)
375
+ ])) : C("", !0)
376
+ ], 2))
377
+ ], 64);
378
+ };
379
+ }
380
+ };
381
+ export {
382
+ ke as default
383
+ };
@@ -0,0 +1,22 @@
1
+ import { createElementBlock as c, createCommentVNode as s, openBlock as l, renderSlot as r, inject as n } from "vue";
2
+ import { _ as i } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const d = {
4
+ props: ["title"],
5
+ setup() {
6
+ return {
7
+ selectedTitle: n("selectedTitle")
8
+ };
9
+ }
10
+ }, a = {
11
+ key: 0,
12
+ class: "block"
13
+ };
14
+ function _(e, p, t, o, f, m) {
15
+ return t.title == o.selectedTitle ? (l(), c("div", a, [
16
+ r(e.$slots, "default")
17
+ ])) : s("", !0);
18
+ }
19
+ const k = /* @__PURE__ */ i(d, [["render", _]]);
20
+ export {
21
+ k as default
22
+ };
@@ -0,0 +1,21 @@
1
+ import { withDirectives as s, createElementBlock as c, openBlock as l, renderSlot as r, vShow as i, inject as n } from "vue";
2
+ import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const a = {
4
+ props: ["title"],
5
+ setup() {
6
+ return {
7
+ selectedTitle: n("selectedTitle")
8
+ };
9
+ }
10
+ }, _ = { class: "block" };
11
+ function p(e, f, t, o, m, u) {
12
+ return s((l(), c("div", _, [
13
+ r(e.$slots, "default")
14
+ ], 512)), [
15
+ [i, t.title == o.selectedTitle]
16
+ ]);
17
+ }
18
+ const k = /* @__PURE__ */ d(a, [["render", p]]);
19
+ export {
20
+ k as default
21
+ };
@@ -0,0 +1,54 @@
1
+ import { useSlots as x, ref as c, provide as w, watch as _, onMounted as f, onBeforeUnmount as v, createElementBlock as n, openBlock as r, Fragment as d, createElementVNode as o, renderList as g, normalizeClass as h, createTextVNode as k, toDisplayString as y, renderSlot as C } from "vue";
2
+ const T = { class: "flex flex-wrap" }, D = { class: "w-full" }, E = { class: "flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none" }, B = ["onClick"], L = { class: "relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded-sm shadow-lg dark:border-strokeDark dark:bg-boxDark" }, S = { class: "flex-auto px-4 py-5" }, U = { class: "tab-content tab-space" }, R = {
3
+ __name: "GlTabsWrapper",
4
+ props: {},
5
+ emits: ["TabChange"],
6
+ setup(F, { emit: p }) {
7
+ const m = p, u = x(), i = c(u.default().map((e) => e.props)), a = c("");
8
+ w("selectedTitle", a);
9
+ const b = (e) => {
10
+ window.location.hash = encodeURIComponent(e), m("TabChange", e);
11
+ }, s = () => {
12
+ const e = decodeURIComponent(window.location.hash.replace("#", "")), l = i.value.find((t) => t.title === e);
13
+ l && (a.value = l.title);
14
+ };
15
+ return _(a, (e) => {
16
+ b(e);
17
+ }), f(() => {
18
+ s(), window.addEventListener("hashchange", s);
19
+ }), v(() => {
20
+ window.removeEventListener("hashchange", s);
21
+ }), (e, l) => (r(), n(d, null, [
22
+ o("div", T, [
23
+ o("div", D, [
24
+ o("ul", E, [
25
+ (r(!0), n(d, null, g(i.value, (t) => (r(), n("li", {
26
+ key: t.title,
27
+ onClick: (I) => a.value = t.title,
28
+ class: "flex-auto -mb-px text-center"
29
+ }, [
30
+ o("a", {
31
+ class: h([{ "text-slate-600 bg-white dark:bg-boxDark": a.value != t.title, "text-white bg-primary dark:bg-primaryDark": a.value === t.title }, "block px-5 py-3 text-xs font-bold leading-normal rounded-sm shadow-lg hover:text-white tex hover:bg-primary dark:hover:bg-primaryDark dark:text-white tabs_buttons"])
32
+ }, [
33
+ o("i", {
34
+ class: h([t.icon, "mr-1 text-base"])
35
+ }, null, 2),
36
+ k(" " + y(t.title), 1)
37
+ ], 2)
38
+ ], 8, B))), 128))
39
+ ])
40
+ ])
41
+ ]),
42
+ o("div", L, [
43
+ o("div", S, [
44
+ o("div", U, [
45
+ C(e.$slots, "default")
46
+ ])
47
+ ])
48
+ ])
49
+ ], 64));
50
+ }
51
+ };
52
+ export {
53
+ R as default
54
+ };
@@ -0,0 +1,93 @@
1
+ import { ref as b, computed as g, createElementBlock as a, openBlock as s, createElementVNode as e, toDisplayString as l, createCommentVNode as i } from "vue";
2
+ const m = { class: "w-full" }, f = { class: "flex justify-between items-center" }, h = { class: "gl-label-form" }, p = { class: "flex items-center" }, x = { class: "shrink-0 z-10 inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg dark:bg-gray-600 dark:text-white dark:border-gray-600" }, y = { class: "relative w-full" }, v = ["value"], k = { key: 0 }, w = {
3
+ key: 1,
4
+ class: "inline-flex items-center"
5
+ }, _ = { class: "mt-2 text-sm text-gray-500 dark:text-gray-400" }, S = {
6
+ __name: "GlTextCopy",
7
+ props: {
8
+ label_name: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ text_name: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ code: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ description: {
21
+ type: String,
22
+ default: ""
23
+ }
24
+ },
25
+ setup(r) {
26
+ const u = r, o = b(!1), c = (d) => {
27
+ navigator.clipboard.writeText(d).then(function() {
28
+ o.value = !0, setTimeout(() => {
29
+ o.value = !1;
30
+ }, 2e3);
31
+ }).catch(function(t) {
32
+ console.error("Error copying to clipboard: ", t);
33
+ });
34
+ }, n = g(() => u.code);
35
+ return (d, t) => (s(), a("div", m, [
36
+ e("div", f, [
37
+ e("label", h, l(r.label_name), 1)
38
+ ]),
39
+ e("div", p, [
40
+ e("span", x, l(r.text_name), 1),
41
+ e("div", y, [
42
+ e("input", {
43
+ type: "text",
44
+ "aria-describedby": "helper-text-explanation",
45
+ class: "bg-gray-50 border border-e-0 border-gray-300 text-gray-500 dark:text-gray-400 text-sm border-s-0 focus:ring-blue-500 focus:border-blue-500 block w-full p-2 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500",
46
+ value: n.value,
47
+ readonly: "",
48
+ disabled: ""
49
+ }, null, 8, v)
50
+ ]),
51
+ e("button", {
52
+ style: { padding: ".61rem" },
53
+ onClick: t[0] || (t[0] = (C) => c(n.value)),
54
+ class: "shrink-0 z-10 inline-flex items-center px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-e-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 border border-blue-700 dark:border-blue-600 hover:border-blue-800 dark:hover:border-blue-700",
55
+ type: "button"
56
+ }, [
57
+ o.value ? i("", !0) : (s(), a("span", k, t[1] || (t[1] = [
58
+ e("svg", {
59
+ class: "w-4 h-4",
60
+ "aria-hidden": "true",
61
+ xmlns: "http://www.w3.org/2000/svg",
62
+ fill: "currentColor",
63
+ viewBox: "0 0 18 20"
64
+ }, [
65
+ e("path", { d: "M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z" })
66
+ ], -1)
67
+ ]))),
68
+ o.value ? (s(), a("span", w, t[2] || (t[2] = [
69
+ e("svg", {
70
+ class: "w-4 h-4",
71
+ "aria-hidden": "true",
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ fill: "none",
74
+ viewBox: "0 0 16 12"
75
+ }, [
76
+ e("path", {
77
+ stroke: "currentColor",
78
+ "stroke-linecap": "round",
79
+ "stroke-linejoin": "round",
80
+ "stroke-width": "2",
81
+ d: "M1 5.917 5.724 10.5 15 1.5"
82
+ })
83
+ ], -1)
84
+ ]))) : i("", !0)
85
+ ])
86
+ ]),
87
+ e("p", _, l(r.description), 1)
88
+ ]));
89
+ }
90
+ };
91
+ export {
92
+ S as default
93
+ };