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,115 @@
1
+ import { ref as t, resolveComponent as B, createElementBlock as L, createCommentVNode as N, openBlock as u, createElementVNode as e, toDisplayString as i, createBlock as h, createVNode as V, withCtx as c, createTextVNode as m, resolveDynamicComponent as j, normalizeClass as D } from "vue";
2
+ const M = {
3
+ key: 0,
4
+ class: "fixed inset-0 z-50 overflow-y-auto",
5
+ role: "dialog",
6
+ "aria-modal": "true"
7
+ }, P = { class: "flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0" }, Z = { class: "inline-block relative overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl dark:bg-gray-800 sm:my-8 sm:align-middle sm:max-w-lg sm:w-full" }, z = { class: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, A = { class: "sm:flex sm:items-start" }, E = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, F = { class: "text-lg font-medium leading-6" }, O = { class: "mt-2" }, S = { class: "text-sm" }, T = { class: "flex gap-1 px-4 py-3 border-t border-gray-200 rounded-b dark:border-gray-600 sm:px-6 sm:flex-row-reverse" }, H = {
8
+ __name: "DynamicConfirmation",
9
+ props: {
10
+ is_open: {
11
+ type: Boolean,
12
+ default: !1
13
+ }
14
+ },
15
+ setup(q, { expose: x }) {
16
+ const f = t(""), v = t(""), g = t(""), p = t("Cancel"), o = t(!1), r = t(!1), d = t(!1), l = t(void 0), C = t(void 0), _ = (s = {}) => (f.value = s.title, v.value = s.message, g.value = s.okButton, s.cancelButton && (p.value = s.cancelButton), s.hasLoading && (d.value = s.hasLoading), o.value = !0, new Promise((n, a) => {
17
+ l.value = n, C.value = a;
18
+ })), b = () => {
19
+ r.value = !0;
20
+ }, w = () => {
21
+ r.value = !1, o.value = !1, d.value = !1, l.value(!1);
22
+ }, y = () => {
23
+ if (d.value === !0) {
24
+ l.value(!0);
25
+ return;
26
+ }
27
+ o.value = !1, l.value(!0);
28
+ }, k = () => {
29
+ o.value = !1, l.value(!1);
30
+ };
31
+ return x({
32
+ show: _,
33
+ showLoading: b,
34
+ hideLoading: w
35
+ }), (s, n) => {
36
+ const a = B("gl-button");
37
+ return o.value ? (u(), L("div", M, [
38
+ e("div", P, [
39
+ n[1] || (n[1] = e("div", {
40
+ class: "fixed inset-0 transition-opacity bg-gray-500/75",
41
+ "aria-hidden": "true"
42
+ }, null, -1)),
43
+ n[2] || (n[2] = e("span", {
44
+ class: "hidden sm:inline-block sm:align-middle sm:h-screen",
45
+ "aria-hidden": "true"
46
+ }, "​", -1)),
47
+ e("div", Z, [
48
+ e("div", z, [
49
+ e("div", A, [
50
+ e("div", E, [
51
+ e("h3", F, i(f.value), 1),
52
+ e("div", O, [
53
+ e("p", S, i(v.value), 1)
54
+ ])
55
+ ])
56
+ ])
57
+ ]),
58
+ e("div", T, [
59
+ r.value ? (u(), h(j("button"), {
60
+ key: 1,
61
+ disabled: "",
62
+ class: D("inline-flex justify-center w-full px-4 py-2 text-base font-medium text-white bg-red-600 border border-transparent rounded-md shadow-xs hover:bg-red-700 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm")
63
+ }, {
64
+ default: c(() => n[0] || (n[0] = [
65
+ e("svg", {
66
+ "aria-hidden": "true",
67
+ role: "status",
68
+ class: "inline w-4 h-4 me-3 animate-spin",
69
+ viewBox: "0 0 100 101",
70
+ fill: "none",
71
+ xmlns: "http://www.w3.org/2000/svg"
72
+ }, [
73
+ e("path", {
74
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
75
+ fill: "currentColor"
76
+ }),
77
+ e("path", {
78
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
79
+ fill: "#1C64F2"
80
+ })
81
+ ], -1),
82
+ m(" Loading... ")
83
+ ])),
84
+ _: 1
85
+ })) : (u(), h(a, {
86
+ key: 0,
87
+ onClick: y,
88
+ tag: "button",
89
+ button_type: "red"
90
+ }, {
91
+ default: c(() => [
92
+ m(i(g.value), 1)
93
+ ]),
94
+ _: 1
95
+ })),
96
+ V(a, {
97
+ onClick: k,
98
+ tag: "button",
99
+ button_type: "light"
100
+ }, {
101
+ default: c(() => [
102
+ m(i(p.value), 1)
103
+ ]),
104
+ _: 1
105
+ })
106
+ ])
107
+ ])
108
+ ])
109
+ ])) : N("", !0);
110
+ };
111
+ }
112
+ };
113
+ export {
114
+ H as default
115
+ };
@@ -0,0 +1,300 @@
1
+ import x from "./DeleteConfirmationModal-CQ07_qiL.js";
2
+ import { GlToast as y } from "./golden-logic-ui.js";
3
+ import { resolveComponent as b, createElementBlock as d, openBlock as n, Fragment as m, createVNode as k, createElementVNode as l, normalizeClass as h, createCommentVNode as _, toDisplayString as f, withModifiers as g, withDirectives as F, vModelText as v, renderList as p, normalizeStyle as w } from "vue";
4
+ import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const L = {
6
+ components: {
7
+ DeleteConfirmationModal: x
8
+ },
9
+ props: {
10
+ is_required: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ error_message: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ description: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ show: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ has_multiple_file: {
27
+ show: Boolean,
28
+ default: !1
29
+ },
30
+ field_name: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ label_name: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ route_url: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ modelValue: {
43
+ type: Array,
44
+ default: []
45
+ },
46
+ file_config: {
47
+ type: Object,
48
+ default: {}
49
+ },
50
+ is_enable_delete: {
51
+ type: Boolean,
52
+ default: !0
53
+ },
54
+ accepts_file_types: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ max_file_size: {
59
+ type: Number,
60
+ default: 0
61
+ }
62
+ },
63
+ emits: ["update:modelValue", "uploaded"],
64
+ data() {
65
+ return {
66
+ media_id: "",
67
+ error_message_data: "",
68
+ open_delete_modal: !1,
69
+ files: [],
70
+ uploadFileList: [],
71
+ isDragging: !1
72
+ };
73
+ },
74
+ methods: {
75
+ inintUploadFileList() {
76
+ this.uploadFileList.length <= 0 && (this.uploadFileList = [.../* @__PURE__ */ new Set([...this.uploadFileList, ...this.modelValue])]);
77
+ },
78
+ closeDeleteModal() {
79
+ this.open_delete_modal = !1;
80
+ },
81
+ deleteAction() {
82
+ axios.delete(this.route_url + "/destroyMedia/" + this.media_id).then((t) => {
83
+ this.inintUploadFileList();
84
+ let e = this.uploadFileList.findIndex(
85
+ (r) => r.id === this.media_id
86
+ );
87
+ e !== -1 && this.uploadFileList.splice(e, 1), this.closeDeleteModal(), y.methods.add({
88
+ message: "Item deleted successfully.",
89
+ type: "success",
90
+ duration: 5e3
91
+ }), this.$emit("uploaded"), this.$emit("update:modelValue", this.uploadFileList);
92
+ }).catch((t) => {
93
+ console.error(t), this.is_loading = !1;
94
+ });
95
+ },
96
+ getFileName(t) {
97
+ return t.length > 12 ? t.substring(0, 13) + "... ." + t.split(".")[1] : t;
98
+ },
99
+ formatFileSize(t) {
100
+ if (t === 0) return "0 Bytes";
101
+ const e = 1024, r = ["Bytes", "KB", "MB", "GB", "TB"], o = Math.floor(Math.log(t) / Math.log(e));
102
+ return parseFloat((t / Math.pow(e, o)).toFixed(2)) + " " + r[o];
103
+ },
104
+ onDragOver(t) {
105
+ t.preventDefault(), this.isDragging = !0, t.dataTransfer.dropEffect = "copy";
106
+ },
107
+ onDragLeave(t) {
108
+ t.preventDefault(), this.isDragging = !1;
109
+ },
110
+ onDrop(t) {
111
+ t.preventDefault(), this.isDragging = !1;
112
+ const e = t.dataTransfer.files;
113
+ Array.from(e).forEach((r) => {
114
+ this.uploadFile(r);
115
+ });
116
+ },
117
+ async uploadFiles(t) {
118
+ this.inintUploadFileList();
119
+ const e = t.target.files, r = Array.from(e).map(
120
+ (o) => this.uploadFile(o)
121
+ );
122
+ await Promise.all(r), this.$emit("uploaded"), this.$emit("update:modelValue", this.uploadFileList);
123
+ },
124
+ getFirstError(t, e) {
125
+ return t.hasOwnProperty(e) ? t[e][0] : "";
126
+ },
127
+ async uploadFile(t) {
128
+ return new Promise((e, r) => {
129
+ t || e();
130
+ const o = new FormData();
131
+ o.append(this.field_name, t), o.append("accepts_file_types", this.accepts_file_types), o.append("max_file_size", this.max_file_size), o.append("field_name", this.field_name), Object.entries(this.file_config).forEach(([s, i]) => {
132
+ o.append(s, i);
133
+ }), this.files.push({ file_name: t.name, loading: 0 }), axios.post(this.route_url + "/media", o, {
134
+ onUploadProgress: (s) => {
135
+ this.files[this.files.length - 1].loading = Math.floor(
136
+ s.loaded / s.total * 100
137
+ );
138
+ }
139
+ }).then((s) => {
140
+ let i = this.files.findIndex(
141
+ (u) => u.file_name === t.name
142
+ );
143
+ i !== -1 && this.files.splice(i, 1), this.has_multiple_file || (this.uploadFileList = []), this.uploadFileList.push({
144
+ file_name: s.data.file_name,
145
+ size: s.data.size,
146
+ id: s.data.id,
147
+ url: s.data.url
148
+ }), this.error_message_data = "", e();
149
+ }).catch((s) => {
150
+ s.response.status === 422 ? this.error_message_data = this.getFirstError(
151
+ s.response.data.errors,
152
+ this.field_name
153
+ ) : console.error("An error occurred:", s);
154
+ let i = this.files.findIndex(
155
+ (u) => u.file_name === t.name
156
+ );
157
+ i !== -1 && this.files.splice(i, 1), console.log(s), e();
158
+ });
159
+ });
160
+ }
161
+ },
162
+ computed: {
163
+ uploadFileListFinal() {
164
+ return this.uploadFileList.length > 0 ? this.uploadFileList : [.../* @__PURE__ */ new Set([...this.uploadFileList, ...this.modelValue])];
165
+ }
166
+ },
167
+ mounted() {
168
+ this.error_message_data = this.error_message;
169
+ },
170
+ watch: {
171
+ error_message(t, e) {
172
+ this.error_message_data = t;
173
+ }
174
+ }
175
+ }, M = { class: "flex flex-col items-center justify-center pt-5 pb-6" }, C = ["multiple"], B = ["name"], S = { key: 1 }, V = { class: "mt-2 gl-span-form-error" }, z = { class: "block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500" }, j = {
176
+ key: 0,
177
+ class: ""
178
+ }, O = { class: "flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white" }, A = { class: "w-full ml-3" }, N = { class: "flex items-center justify-between mb-1" }, E = { class: "text-xs text-black dark:text-white" }, U = { class: "text-xs text-black dark:text-white" }, P = { class: "w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800" }, T = { class: "overflow-x-scroll max-h-56" }, I = { class: "flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white" }, q = { class: "flex items-center" }, G = { class: "flex flex-col ml-3" }, K = { class: "text-xs" }, H = { class: "text-xs" }, J = { class: "flex gap-2" }, Q = ["href"], R = ["onClick"];
179
+ function W(t, e, r, o, s, i) {
180
+ const u = b("DeleteConfirmationModal");
181
+ return n(), d(m, null, [
182
+ k(u, {
183
+ isOpen: s.open_delete_modal,
184
+ onConfirmDelete: i.deleteAction,
185
+ onCancelDelete: i.closeDeleteModal
186
+ }, null, 8, ["isOpen", "onConfirmDelete", "onCancelDelete"]),
187
+ l("div", {
188
+ class: h([{
189
+ "border-red-500 dark:border-red-500": s.error_message_data !== "",
190
+ "border-gray-200 dark:border-gray-700": s.error_message_data == ""
191
+ }, "w-full p-4 bg-white border rounded-lg shadow-sm dark:bg-gray-800"])
192
+ }, [
193
+ l("label", {
194
+ class: h({
195
+ "gl-label-form": s.error_message_data == "",
196
+ "gl-label-form-invalid": s.error_message_data !== "",
197
+ required: r.is_required
198
+ })
199
+ }, f(r.label_name), 3),
200
+ l("div", {
201
+ onDragover: e[3] || (e[3] = g((...a) => i.onDragOver && i.onDragOver(...a), ["prevent"])),
202
+ onDragleave: e[4] || (e[4] = g((...a) => i.onDragLeave && i.onDragLeave(...a), ["prevent"])),
203
+ onDrop: e[5] || (e[5] = g((...a) => i.onDrop && i.onDrop(...a), ["prevent"])),
204
+ class: "flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"
205
+ }, [
206
+ l("div", M, [
207
+ l("input", {
208
+ type: "file",
209
+ ref: "file_input" + r.field_name,
210
+ hidden: "",
211
+ multiple: r.has_multiple_file,
212
+ onChange: e[0] || (e[0] = (...a) => i.uploadFiles && i.uploadFiles(...a))
213
+ }, null, 40, C),
214
+ F(l("input", {
215
+ type: "hidden",
216
+ name: r.field_name,
217
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => i.uploadFileListFinal = a)
218
+ }, null, 8, B), [
219
+ [v, i.uploadFileListFinal]
220
+ ]),
221
+ s.isDragging ? (n(), d("div", S, e[7] || (e[7] = [
222
+ l("p", { class: "text-sm text-gray-500 dark:text-gray-400" }, " Drop files here ", -1)
223
+ ]))) : (n(), d("div", {
224
+ key: 0,
225
+ class: "flex flex-col items-center justify-center",
226
+ onClick: e[2] || (e[2] = (a) => t.$refs["file_input" + this.field_name].click())
227
+ }, e[6] || (e[6] = [
228
+ l("svg", {
229
+ class: "w-8 h-8 mb-4 text-gray-500 dark:text-gray-400",
230
+ "aria-hidden": "true",
231
+ xmlns: "http://www.w3.org/2000/svg",
232
+ fill: "none",
233
+ viewBox: "0 0 20 16"
234
+ }, [
235
+ l("path", {
236
+ stroke: "currentColor",
237
+ "stroke-linecap": "round",
238
+ "stroke-linejoin": "round",
239
+ "stroke-width": "2",
240
+ d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
241
+ })
242
+ ], -1),
243
+ l("p", { class: "text-sm text-gray-500 dark:text-gray-400" }, " Drag & drop files or browse ", -1)
244
+ ])))
245
+ ])
246
+ ], 32),
247
+ l("span", V, f(s.error_message_data), 1),
248
+ l("small", z, f(r.description), 1),
249
+ s.files.length > 0 ? (n(), d("section", j, [
250
+ (n(!0), d(m, null, p(s.files, (a, c) => (n(), d("li", O, [
251
+ e[8] || (e[8] = l("i", { class: "text-3xl fas fa-file-alt" }, null, -1)),
252
+ l("div", A, [
253
+ l("div", N, [
254
+ l("span", E, f(i.getFileName(a.file_name)), 1),
255
+ l("span", U, f(a.loading), 1)
256
+ ]),
257
+ l("div", P, [
258
+ l("div", {
259
+ class: "h-full bg-gray-500 rounded-full dark:bg-gray-400",
260
+ style: w({ width: a.loading + "%" })
261
+ }, null, 4)
262
+ ])
263
+ ])
264
+ ]))), 256))
265
+ ])) : _("", !0),
266
+ l("section", T, [
267
+ (n(!0), d(m, null, p(i.uploadFileListFinal, (a, c) => (n(), d("li", I, [
268
+ l("div", q, [
269
+ e[9] || (e[9] = l("i", {
270
+ class: "text-3xl fas fa-file-alt",
271
+ "aria-hidden": "true"
272
+ }, null, -1)),
273
+ l("div", G, [
274
+ l("span", K, f(i.getFileName(a.file_name)), 1),
275
+ l("span", H, f(i.formatFileSize(a.size)), 1)
276
+ ])
277
+ ]),
278
+ l("div", J, [
279
+ l("a", {
280
+ href: a.url,
281
+ target: "_blank",
282
+ class: "text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"
283
+ }, null, 8, Q),
284
+ r.is_enable_delete ? (n(), d("i", {
285
+ key: 0,
286
+ onClick: (X) => {
287
+ s.media_id = a.id, s.open_delete_modal = !0;
288
+ },
289
+ class: "text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"
290
+ }, null, 8, R)) : _("", !0)
291
+ ])
292
+ ]))), 256))
293
+ ])
294
+ ], 2)
295
+ ], 64);
296
+ }
297
+ const te = /* @__PURE__ */ D(L, [["render", W]]);
298
+ export {
299
+ te as default
300
+ };
@@ -0,0 +1,118 @@
1
+ import { createBlock as o, openBlock as r, resolveDynamicComponent as n, mergeProps as u, withCtx as g, createElementBlock as i, createCommentVNode as c, renderSlot as b, normalizeClass as s, createElementVNode as t, createTextVNode as f } from "vue";
2
+ import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const h = {
4
+ props: {
5
+ classes: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ button_type: {
10
+ type: String,
11
+ default: "default"
12
+ },
13
+ is_submit: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ icon: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ is_loading: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ is_disabled: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ has_border_reduced: {
30
+ type: Boolean,
31
+ default: !0
32
+ },
33
+ tag: {
34
+ type: String,
35
+ default: "button"
36
+ },
37
+ href: {
38
+ type: String,
39
+ default: ""
40
+ }
41
+ },
42
+ computed: {
43
+ buttonTypeClass() {
44
+ switch (this.button_type) {
45
+ case "default":
46
+ return "text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
47
+ case "alternative":
48
+ return " text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";
49
+ case "dark":
50
+ return "text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700";
51
+ case "light":
52
+ return "text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700";
53
+ case "green":
54
+ return " text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";
55
+ case "red":
56
+ return " text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900";
57
+ case "yellow":
58
+ return " text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900";
59
+ case "purple":
60
+ return " text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900";
61
+ case "primary":
62
+ return "text-white gl-btn-primary";
63
+ default:
64
+ return "";
65
+ }
66
+ }
67
+ },
68
+ methods: {}
69
+ };
70
+ function k(l, a, e, m, C, d) {
71
+ return e.is_loading ? (r(), o(n("button"), {
72
+ key: 1,
73
+ disabled: "",
74
+ class: s(` h-[2.5rem] flex items-center gap-2 focus:outline-hidden text-sm px-2 py-2 font-medium ${e.has_border_reduced ? "rounded-lg" : ""} ${d.buttonTypeClass} ${e.classes}`)
75
+ }, {
76
+ default: g(() => a[0] || (a[0] = [
77
+ t("svg", {
78
+ "aria-hidden": "true",
79
+ role: "status",
80
+ class: "inline w-4 h-4 me-3 animate-spin",
81
+ viewBox: "0 0 100 101",
82
+ fill: "none",
83
+ xmlns: "http://www.w3.org/2000/svg"
84
+ }, [
85
+ t("path", {
86
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
87
+ fill: "currentColor"
88
+ }),
89
+ t("path", {
90
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
91
+ fill: "#1C64F2"
92
+ })
93
+ ], -1),
94
+ f(" Loading... ")
95
+ ])),
96
+ _: 1
97
+ }, 8, ["class"])) : (r(), o(n(e.tag), u({
98
+ key: 0,
99
+ type: e.is_submit,
100
+ disabled: e.is_disabled
101
+ }, { type: e.is_submit ? "submit" : void 0 }, {
102
+ href: e.tag === "a" ? e.href : void 0,
103
+ class: ` ${e.is_disabled ? "cursor-not-allowed opacity-50" : ""} ${e.icon ? "flex" : ""} h-[2.5rem] items-center gap-2 focus:outline-hidden text-sm px-3 py-2 font-medium ${e.has_border_reduced ? "rounded-lg" : ""} ${d.buttonTypeClass} ${e.classes}`
104
+ }), {
105
+ default: g(() => [
106
+ e.icon ? (r(), i("i", {
107
+ key: 0,
108
+ class: s([e.icon, "text-base"])
109
+ }, null, 2)) : c("", !0),
110
+ b(l.$slots, "default")
111
+ ]),
112
+ _: 3
113
+ }, 16, ["type", "disabled", "href", "class"]));
114
+ }
115
+ const w = /* @__PURE__ */ y(h, [["render", k]]);
116
+ export {
117
+ w as default
118
+ };