golden-logic-ui 1.3.30 → 1.3.32
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.
- package/dist/components/GeneralComponents/DataTable/GLDataTable.vue.js +57 -57
- package/dist/components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js +95 -85
- package/dist/components/GeneralComponents/DataTable/GlDataTableComponent.vue.js +119 -119
- package/dist/components/GeneralComponents/DataTable/GlDataTableServerSideGroupBy.vue.js +38 -28
- package/dist/golden-logic-ui.css +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import U from "../GLButton.vue.js";
|
|
|
6
6
|
import N from "../DynamicConfirmation.vue.js";
|
|
7
7
|
import L from "../../../Stores/toast.js";
|
|
8
8
|
import B, { triggerPrint as E } from "../../../print/print.js";
|
|
9
|
-
import { resolveComponent as
|
|
9
|
+
import { resolveComponent as w, resolveDirective as H, createElementBlock as c, openBlock as o, Fragment as f, createVNode as x, createElementVNode as l, toDisplayString as u, withDirectives as V, vModelText as R, normalizeClass as S, renderList as v, createBlock as _, createCommentVNode as g, withCtx as C, createTextVNode as b, vModelCheckbox as z, vShow as Z, normalizeStyle as Y, resolveDynamicComponent as Q } from "vue";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import J from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
12
12
|
const X = {
|
|
@@ -96,10 +96,19 @@ const X = {
|
|
|
96
96
|
columns1() {
|
|
97
97
|
return this.columns;
|
|
98
98
|
},
|
|
99
|
+
// "Showing 1 to 10 of 50 Entries" in the table's language.
|
|
100
|
+
paginationTranslation() {
|
|
101
|
+
return {
|
|
102
|
+
showing: this.language?.showing ?? "Showing",
|
|
103
|
+
to: this.language?.to ?? "to",
|
|
104
|
+
of: this.language?.of ?? "of",
|
|
105
|
+
entries: this.language?.entries ?? "Entries"
|
|
106
|
+
};
|
|
107
|
+
},
|
|
99
108
|
filteredData() {
|
|
100
109
|
const t = this.search.toLowerCase();
|
|
101
110
|
return this.sortData(this.data).filter((i) => Object.values(i).some(
|
|
102
|
-
(
|
|
111
|
+
(d) => d.toString().toLowerCase().includes(t)
|
|
103
112
|
));
|
|
104
113
|
},
|
|
105
114
|
customFilters() {
|
|
@@ -129,10 +138,10 @@ const X = {
|
|
|
129
138
|
},
|
|
130
139
|
generateRandomString(t) {
|
|
131
140
|
let s = "";
|
|
132
|
-
const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
|
|
141
|
+
const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", d = i.length;
|
|
133
142
|
for (let a = 0; a < t; a++)
|
|
134
143
|
s += i.charAt(
|
|
135
|
-
Math.floor(Math.random() *
|
|
144
|
+
Math.floor(Math.random() * d)
|
|
136
145
|
);
|
|
137
146
|
return s;
|
|
138
147
|
},
|
|
@@ -154,8 +163,8 @@ const X = {
|
|
|
154
163
|
})) {
|
|
155
164
|
this.$refs.ConfirmationDelete.showLoading(), this.isLoading = !0;
|
|
156
165
|
const s = await Promise.allSettled(
|
|
157
|
-
this.checkedIds.map((
|
|
158
|
-
), i = s.map((
|
|
166
|
+
this.checkedIds.map((d) => axios.delete(`${this.xprops.route}/${d}`))
|
|
167
|
+
), i = s.map((d, a) => ({ result: d, id: this.checkedIds[a] })).filter(({ result: d }) => d.status === "rejected");
|
|
159
168
|
if (this.checkedIds = [], this.$refs.ConfirmationDelete.hideLoading(), i.length === 0)
|
|
160
169
|
L.methods.add({
|
|
161
170
|
message: this.language?.selected_items_deleted_successfully ?? "Selected items deleted successfully.",
|
|
@@ -163,9 +172,9 @@ const X = {
|
|
|
163
172
|
duration: 5e3
|
|
164
173
|
});
|
|
165
174
|
else {
|
|
166
|
-
const
|
|
175
|
+
const d = i[0].result.reason?.response?.data?.message, a = s.length - i.length;
|
|
167
176
|
L.methods.add({
|
|
168
|
-
message: `${a} of ${s.length} deleted. Not deleted: #${i.map(({ id:
|
|
177
|
+
message: `${a} of ${s.length} deleted. Not deleted: #${i.map(({ id: r }) => r).join(", #")}.` + (d ? ` ${d}` : ""),
|
|
169
178
|
type: "error",
|
|
170
179
|
duration: 1e4
|
|
171
180
|
});
|
|
@@ -211,10 +220,10 @@ const X = {
|
|
|
211
220
|
};
|
|
212
221
|
this.emitStateChange();
|
|
213
222
|
const i = ++this.requestSequence;
|
|
214
|
-
axios.get(this.xprops.route_get_data, { params: s }).then((
|
|
215
|
-
i === this.requestSequence && (this.itemLists =
|
|
216
|
-
}).catch((
|
|
217
|
-
i === this.requestSequence && (this.error = !0, this.errorMessage =
|
|
223
|
+
axios.get(this.xprops.route_get_data, { params: s }).then((d) => {
|
|
224
|
+
i === this.requestSequence && (this.itemLists = d.data, this.error = !1, this.errorMessage = "", this.isLoading = !1);
|
|
225
|
+
}).catch((d) => {
|
|
226
|
+
i === this.requestSequence && (this.error = !0, this.errorMessage = d?.response?.data?.message || d?.message || "", this.isLoading = !1, this.$emit("error", d));
|
|
218
227
|
});
|
|
219
228
|
},
|
|
220
229
|
retry() {
|
|
@@ -222,8 +231,8 @@ const X = {
|
|
|
222
231
|
},
|
|
223
232
|
// Every cell event, with whatever the cell sent along. Cells can also emit
|
|
224
233
|
// their own named actions: emit('cellAction', 'restart', payload).
|
|
225
|
-
cellAction(t, s, i,
|
|
226
|
-
this.$emit("cell-action", { action: t, row: s, payload: i, field:
|
|
234
|
+
cellAction(t, s, i, d) {
|
|
235
|
+
this.$emit("cell-action", { action: t, row: s, payload: i, field: d?.field_name });
|
|
227
236
|
},
|
|
228
237
|
/**
|
|
229
238
|
* The table's current view, for saved views or URL sync:
|
|
@@ -268,7 +277,7 @@ const X = {
|
|
|
268
277
|
this.sortField = this.columns && this.columns.length > 0 ? this.columns[0].field_name : "", this.sortOrder = "asc", this.page = 1, this.GetItemLists(this.page);
|
|
269
278
|
},
|
|
270
279
|
async exportToExcel() {
|
|
271
|
-
const t = await import("xlsx"), s = t.default || t, i = document.querySelector("#table" + this.Random_string),
|
|
280
|
+
const t = await import("xlsx"), s = t.default || t, i = document.querySelector("#table" + this.Random_string), d = Array.from(i.querySelectorAll("thead th")).map((p) => p.innerText), r = ["", ...["action"]], A = d.map((p, e) => r.includes(p) ? e : -1).filter((p) => p !== -1), F = Array.from(i.querySelectorAll("tbody tr")).map((p) => Array.from(p.querySelectorAll("td")).map((h) => h.innerText).filter((h, n) => !A.includes(n))), k = [d.filter((p, e) => !A.includes(e)), ...F], I = s.utils.aoa_to_sheet(k), y = s.utils.book_new();
|
|
272
281
|
s.utils.book_append_sheet(y, I, "Sheet1"), s.writeFile(y, "exported-file.xlsx");
|
|
273
282
|
}
|
|
274
283
|
},
|
|
@@ -300,13 +309,13 @@ const X = {
|
|
|
300
309
|
directives: {
|
|
301
310
|
print: B
|
|
302
311
|
}
|
|
303
|
-
}, W = { class: "p-0" }, K = { class: "flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between" }, $ = { class: "flex items-center gap-2" }, ee = { class: "font-medium" }, te = { class: "mt-[3px]" }, le = { class: "font-medium" }, ie = { class: "relative" }, se = ["placeholder"], ae = { class: "flex flex-wrap mb-3 gap-1 lg:gap-0!" },
|
|
312
|
+
}, W = { class: "p-0" }, K = { class: "flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between" }, $ = { class: "flex items-center gap-2" }, ee = { class: "font-medium" }, te = { class: "mt-[3px]" }, le = { class: "font-medium" }, ie = { class: "relative" }, se = ["placeholder"], ae = { class: "flex flex-wrap mb-3 gap-1 lg:gap-0!" }, ne = ["id"], re = ["aria-labelledby"], oe = { class: "flex items-center p-2 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-600" }, de = ["id", "onUpdate:modelValue"], ce = ["for"], ge = ["id"], ue = ["id"], he = { class: "hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!" }, me = {
|
|
304
313
|
key: 0,
|
|
305
314
|
class: "w-full px-4 py-2 lg:w-[3%]! print:hidden!"
|
|
306
315
|
}, fe = ["onClick"], _e = { class: "inline-flex items-center justify-center gap-1" }, pe = {
|
|
307
316
|
key: 0,
|
|
308
317
|
class: "print:hidden!"
|
|
309
|
-
}, ye = { class: "bg-white dark:bg-gray-900" }, be = { key: 0 },
|
|
318
|
+
}, ye = { class: "bg-white dark:bg-gray-900" }, be = { key: 0 }, we = ["colspan"], ke = { key: 1 }, xe = ["colspan"], ve = {
|
|
310
319
|
role: "alert",
|
|
311
320
|
class: "flex flex-col items-center justify-center gap-3 text-center"
|
|
312
321
|
}, Ce = { class: "text-sm font-medium text-red-700 dark:text-red-400" }, Ae = {
|
|
@@ -317,9 +326,9 @@ const X = {
|
|
|
317
326
|
class: "print:hidden! text-center rounded-t-lg lg:rounded-t-none! print:rounded-t-none! text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! flex flex-col justify-between gap-2 lg:table-cell py-2 px-4 lg:py-3 lg:px-4 print:py-3! print:px-4! border! dark:border-gray-700",
|
|
318
327
|
"data-label": ""
|
|
319
328
|
}, Se = ["checked", "onChange"], Fe = ["data-label"], De = { class: "flex items-center justify-between bg-white border-gray-200 dark:text-gray-400 dark:bg-gray-800" };
|
|
320
|
-
function Ie(t, s, i,
|
|
321
|
-
const A =
|
|
322
|
-
return
|
|
329
|
+
function Ie(t, s, i, d, a, r) {
|
|
330
|
+
const A = w("DynamicConfirmation"), F = w("dropdown"), D = w("GlDropdown"), k = w("GlTextInput"), I = w("GlDateRangePicker"), y = w("gl-button"), P = w("TailwindPagination"), p = H("click-outside");
|
|
331
|
+
return o(), c(f, null, [
|
|
323
332
|
x(A, { ref: "ConfirmationDelete" }, null, 512),
|
|
324
333
|
l("div", W, [
|
|
325
334
|
l("div", K, [
|
|
@@ -351,7 +360,7 @@ function Ie(t, s, i, o, a, d) {
|
|
|
351
360
|
V(l("input", {
|
|
352
361
|
type: "text",
|
|
353
362
|
"onUpdate:modelValue": s[1] || (s[1] = (e) => a.search = e),
|
|
354
|
-
onInput: s[2] || (s[2] = (e) =>
|
|
363
|
+
onInput: s[2] || (s[2] = (e) => r.handleSearch()),
|
|
355
364
|
class: "gl-input-form",
|
|
356
365
|
placeholder: i.language?.search ? i.language?.search + " ..." : "Search ..."
|
|
357
366
|
}, null, 40, se), [
|
|
@@ -362,81 +371,81 @@ function Ie(t, s, i, o, a, d) {
|
|
|
362
371
|
l("div", {
|
|
363
372
|
class: S(["grid gap-4 mb-3 xs:grid-cols-1 xl:grid-cols-2", i.xprops?.customFiltersMainClass])
|
|
364
373
|
}, [
|
|
365
|
-
(
|
|
366
|
-
e.type == "dropdown" ? (
|
|
374
|
+
(o(!0), c(f, null, v(r.customFilters, (e, h) => (o(), c(f, { key: h }, [
|
|
375
|
+
e.type == "dropdown" ? (o(), _(D, {
|
|
367
376
|
key: 0,
|
|
368
377
|
has_cancel: !0,
|
|
369
378
|
options: e.options,
|
|
370
379
|
modelValue: a.dynamicFilters[e.field_name],
|
|
371
|
-
"onUpdate:modelValue": (
|
|
380
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
372
381
|
is_required: !1,
|
|
373
382
|
field_name: e.field_name,
|
|
374
383
|
label_name: e.field_label,
|
|
375
384
|
show: !1,
|
|
376
385
|
placeholder: i.language?.please_select_an_option ?? "Please select an option"
|
|
377
386
|
}, null, 8, ["options", "modelValue", "onUpdate:modelValue", "field_name", "label_name", "placeholder"])) : g("", !0),
|
|
378
|
-
e.type == "text" ? (
|
|
387
|
+
e.type == "text" ? (o(), _(k, {
|
|
379
388
|
key: 1,
|
|
380
389
|
type: "text",
|
|
381
390
|
is_required: !1,
|
|
382
391
|
show: !1,
|
|
383
392
|
modelValue: a.dynamicFilters[e.field_name],
|
|
384
|
-
"onUpdate:modelValue": (
|
|
393
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
385
394
|
field_name: e.field_name,
|
|
386
395
|
label_name: e.field_label
|
|
387
396
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : g("", !0),
|
|
388
|
-
e.type == "date" ? (
|
|
397
|
+
e.type == "date" ? (o(), _(k, {
|
|
389
398
|
key: 2,
|
|
390
399
|
type: "date",
|
|
391
400
|
is_required: !1,
|
|
392
401
|
show: !1,
|
|
393
402
|
modelValue: a.dynamicFilters[e.field_name],
|
|
394
|
-
"onUpdate:modelValue": (
|
|
403
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
395
404
|
field_name: e.field_name,
|
|
396
405
|
label_name: e.field_label
|
|
397
406
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : g("", !0),
|
|
398
|
-
e.type == "date_range" ? (
|
|
407
|
+
e.type == "date_range" ? (o(), _(I, {
|
|
399
408
|
key: 3,
|
|
400
409
|
is_required: !1,
|
|
401
410
|
show: !1,
|
|
402
411
|
modelValue: a.dynamicFilters[e.field_name],
|
|
403
|
-
"onUpdate:modelValue": (
|
|
412
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
404
413
|
field_name: e.field_name,
|
|
405
414
|
label_name: e.field_label,
|
|
406
415
|
date_format: e.date_format || "YYYY-MM-DD"
|
|
407
416
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name", "date_format"])) : g("", !0)
|
|
408
417
|
], 64))), 128)),
|
|
409
|
-
(
|
|
410
|
-
e.hasOwnFilter && Object.keys(e.hasOwnFilter).length > 0 ? (
|
|
411
|
-
e.hasOwnFilter.type == "dropdown" ? (
|
|
418
|
+
(o(!0), c(f, null, v(i.columns, (e, h) => (o(), c(f, { key: h }, [
|
|
419
|
+
e.hasOwnFilter && Object.keys(e.hasOwnFilter).length > 0 ? (o(), c(f, { key: 0 }, [
|
|
420
|
+
e.hasOwnFilter.type == "dropdown" ? (o(), _(D, {
|
|
412
421
|
key: 0,
|
|
413
422
|
has_cancel: !0,
|
|
414
423
|
options: e.hasOwnFilter.options,
|
|
415
424
|
modelValue: a.dynamicFilters[e.field_name],
|
|
416
|
-
"onUpdate:modelValue": (
|
|
425
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
417
426
|
is_required: !1,
|
|
418
427
|
field_name: e.field_name,
|
|
419
428
|
label_name: e.field_label,
|
|
420
429
|
show: !1,
|
|
421
430
|
placeholder: i.language?.please_select_an_option ?? "Please select an option"
|
|
422
431
|
}, null, 8, ["options", "modelValue", "onUpdate:modelValue", "field_name", "label_name", "placeholder"])) : g("", !0),
|
|
423
|
-
e.hasOwnFilter.type == "text" ? (
|
|
432
|
+
e.hasOwnFilter.type == "text" ? (o(), _(k, {
|
|
424
433
|
key: 1,
|
|
425
434
|
type: "text",
|
|
426
435
|
is_required: !1,
|
|
427
436
|
show: !1,
|
|
428
437
|
modelValue: a.dynamicFilters[e.field_name],
|
|
429
|
-
"onUpdate:modelValue": (
|
|
438
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
430
439
|
field_name: e.field_name,
|
|
431
440
|
label_name: e.field_label
|
|
432
441
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : g("", !0),
|
|
433
|
-
e.hasOwnFilter.type == "date" ? (
|
|
442
|
+
e.hasOwnFilter.type == "date" ? (o(), _(k, {
|
|
434
443
|
key: 2,
|
|
435
444
|
type: "date",
|
|
436
445
|
is_required: !1,
|
|
437
446
|
show: !1,
|
|
438
447
|
modelValue: a.dynamicFilters[e.field_name],
|
|
439
|
-
"onUpdate:modelValue": (
|
|
448
|
+
"onUpdate:modelValue": (n) => a.dynamicFilters[e.field_name] = n,
|
|
440
449
|
field_name: e.field_name,
|
|
441
450
|
label_name: e.field_label
|
|
442
451
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : g("", !0)
|
|
@@ -444,9 +453,9 @@ function Ie(t, s, i, o, a, d) {
|
|
|
444
453
|
], 64))), 128))
|
|
445
454
|
], 2),
|
|
446
455
|
l("div", ae, [
|
|
447
|
-
i.enable_select_deselect_delete ? (
|
|
456
|
+
i.enable_select_deselect_delete ? (o(), _(y, {
|
|
448
457
|
key: 0,
|
|
449
|
-
onClick:
|
|
458
|
+
onClick: r.toggleSelectAll,
|
|
450
459
|
tag: "button",
|
|
451
460
|
button_type: "light",
|
|
452
461
|
has_border_reduced: !1,
|
|
@@ -457,9 +466,9 @@ function Ie(t, s, i, o, a, d) {
|
|
|
457
466
|
]),
|
|
458
467
|
_: 1
|
|
459
468
|
}, 8, ["onClick"])) : g("", !0),
|
|
460
|
-
i.enable_select_deselect_delete ? (
|
|
469
|
+
i.enable_select_deselect_delete ? (o(), _(y, {
|
|
461
470
|
key: 1,
|
|
462
|
-
onClick:
|
|
471
|
+
onClick: r.toggleDeselectAll,
|
|
463
472
|
tag: "button",
|
|
464
473
|
button_type: "light",
|
|
465
474
|
has_border_reduced: !1,
|
|
@@ -471,7 +480,7 @@ function Ie(t, s, i, o, a, d) {
|
|
|
471
480
|
_: 1
|
|
472
481
|
}, 8, ["onClick"])) : g("", !0),
|
|
473
482
|
x(y, {
|
|
474
|
-
onClick:
|
|
483
|
+
onClick: r.delayedPrint,
|
|
475
484
|
tag: "button",
|
|
476
485
|
is_loading: a.isLoadinPrint,
|
|
477
486
|
button_type: "light",
|
|
@@ -487,7 +496,7 @@ function Ie(t, s, i, o, a, d) {
|
|
|
487
496
|
_: 1
|
|
488
497
|
}, 8, ["onClick", "is_loading"]),
|
|
489
498
|
x(y, {
|
|
490
|
-
onClick:
|
|
499
|
+
onClick: r.exportToExcel,
|
|
491
500
|
tag: "button",
|
|
492
501
|
button_type: "light",
|
|
493
502
|
has_border_reduced: !1,
|
|
@@ -502,10 +511,10 @@ function Ie(t, s, i, o, a, d) {
|
|
|
502
511
|
]),
|
|
503
512
|
_: 1
|
|
504
513
|
}, 8, ["onClick"]),
|
|
505
|
-
V((
|
|
514
|
+
V((o(), c("div", null, [
|
|
506
515
|
l("button", {
|
|
507
516
|
class: S([!i.enable_select_deselect_delete || !i.enable_delete || !t.can(`delete_${i.xprops?.permission}`) ? "rounded-lg lg:rounded-e-lg!" : "rounded-lg lg:rounded-none!", "h-10 text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 font-medium text-sm px-3 py-2 text-center inline-flex items-center rounded-lg lg:rounded-none!"]),
|
|
508
|
-
onClick: s[3] || (s[3] = (...e) =>
|
|
517
|
+
onClick: s[3] || (s[3] = (...e) => r.toggleColumnVisibilityDropdown && r.toggleColumnVisibilityDropdown(...e)),
|
|
509
518
|
type: "button"
|
|
510
519
|
}, [
|
|
511
520
|
s[6] || (s[6] = l("svg", {
|
|
@@ -551,14 +560,14 @@ function Ie(t, s, i, o, a, d) {
|
|
|
551
560
|
class: "p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200",
|
|
552
561
|
"aria-labelledby": "db_" + a.Random_string
|
|
553
562
|
}, [
|
|
554
|
-
(
|
|
555
|
-
l("div",
|
|
563
|
+
(o(!0), c(f, null, v(i.columns, (e, h) => (o(), c("li", null, [
|
|
564
|
+
l("div", oe, [
|
|
556
565
|
V(l("input", {
|
|
557
566
|
id: "cb_" + e.field_name,
|
|
558
567
|
type: "checkbox",
|
|
559
|
-
"onUpdate:modelValue": (
|
|
568
|
+
"onUpdate:modelValue": (n) => a.columnVisibility[e.field_name] = n,
|
|
560
569
|
class: "w-4 h-4 rounded-sm"
|
|
561
|
-
}, null, 8,
|
|
570
|
+
}, null, 8, de), [
|
|
562
571
|
[z, a.columnVisibility[e.field_name]]
|
|
563
572
|
]),
|
|
564
573
|
l("label", {
|
|
@@ -567,17 +576,17 @@ function Ie(t, s, i, o, a, d) {
|
|
|
567
576
|
}, u(e.field_label), 9, ce)
|
|
568
577
|
])
|
|
569
578
|
]))), 256))
|
|
570
|
-
], 8,
|
|
571
|
-
], 8,
|
|
579
|
+
], 8, re)
|
|
580
|
+
], 8, ne), [
|
|
572
581
|
[Z, a.isOpenColumnVisibility]
|
|
573
582
|
])
|
|
574
583
|
])), [
|
|
575
|
-
[p,
|
|
584
|
+
[p, r.closeColumnVisibilityDropdown]
|
|
576
585
|
]),
|
|
577
|
-
i.enable_select_deselect_delete && i.enable_delete && t.can(`delete_${i.xprops?.permission}`) ? (
|
|
586
|
+
i.enable_select_deselect_delete && i.enable_delete && t.can(`delete_${i.xprops?.permission}`) ? (o(), _(y, {
|
|
578
587
|
key: 2,
|
|
579
588
|
tag: "button",
|
|
580
|
-
onClick:
|
|
589
|
+
onClick: r.deleteSelected,
|
|
581
590
|
button_type: "red",
|
|
582
591
|
has_border_reduced: !1,
|
|
583
592
|
classes: "rounded-lg lg:rounded-none lg:rounded-e-lg!",
|
|
@@ -602,15 +611,15 @@ function Ie(t, s, i, o, a, d) {
|
|
|
602
611
|
}, [
|
|
603
612
|
l("thead", he, [
|
|
604
613
|
l("tr", null, [
|
|
605
|
-
i.enable_select_deselect_delete ? (
|
|
606
|
-
(
|
|
614
|
+
i.enable_select_deselect_delete ? (o(), c("th", me)) : g("", !0),
|
|
615
|
+
(o(!0), c(f, null, v(r.visibleColumns, (e, h) => (o(), c("th", {
|
|
607
616
|
key: h,
|
|
608
|
-
onClick: (
|
|
617
|
+
onClick: (n) => r.updateSortColumn(e.field_name, e.sortable),
|
|
609
618
|
class: "w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border!"
|
|
610
619
|
}, [
|
|
611
620
|
l("div", _e, [
|
|
612
621
|
l("span", null, u(e.field_label), 1),
|
|
613
|
-
a.sortField === e.field_name ? (
|
|
622
|
+
a.sortField === e.field_name ? (o(), c("span", pe, s[8] || (s[8] = [
|
|
614
623
|
l("svg", {
|
|
615
624
|
class: "w-4 h-4",
|
|
616
625
|
"aria-hidden": "true",
|
|
@@ -632,7 +641,7 @@ function Ie(t, s, i, o, a, d) {
|
|
|
632
641
|
])
|
|
633
642
|
]),
|
|
634
643
|
l("tbody", ye, [
|
|
635
|
-
a.isLoading ? (
|
|
644
|
+
a.isLoading ? (o(), c("tr", be, [
|
|
636
645
|
l("td", {
|
|
637
646
|
colspan: i.columns.length + (i.enable_select_deselect_delete ? 1 : 0)
|
|
638
647
|
}, s[9] || (s[9] = [
|
|
@@ -677,20 +686,20 @@ function Ie(t, s, i, o, a, d) {
|
|
|
677
686
|
]),
|
|
678
687
|
l("span", { class: "sr-only" }, "Loading...")
|
|
679
688
|
], -1)
|
|
680
|
-
]), 8,
|
|
689
|
+
]), 8, we)
|
|
681
690
|
])) : g("", !0),
|
|
682
|
-
!a.isLoading && a.error ? (
|
|
691
|
+
!a.isLoading && a.error ? (o(), c("tr", ke, [
|
|
683
692
|
l("td", {
|
|
684
693
|
colspan: i.columns.length + (i.enable_select_deselect_delete ? 1 : 0),
|
|
685
694
|
class: "px-5 py-6 border! dark:border-gray-700"
|
|
686
695
|
}, [
|
|
687
696
|
l("div", ve, [
|
|
688
697
|
l("p", Ce, u(i.language?.failed_to_load_data ?? "Could not load the data."), 1),
|
|
689
|
-
a.errorMessage ? (
|
|
698
|
+
a.errorMessage ? (o(), c("p", Ae, u(a.errorMessage), 1)) : g("", !0),
|
|
690
699
|
x(y, {
|
|
691
700
|
tag: "button",
|
|
692
701
|
button_type: "light",
|
|
693
|
-
onClick:
|
|
702
|
+
onClick: r.retry
|
|
694
703
|
}, {
|
|
695
704
|
default: C(() => [
|
|
696
705
|
b(u(i.language?.retry ?? "Retry"), 1)
|
|
@@ -700,56 +709,56 @@ function Ie(t, s, i, o, a, d) {
|
|
|
700
709
|
])
|
|
701
710
|
], 8, xe)
|
|
702
711
|
])) : g("", !0),
|
|
703
|
-
!a.isLoading && !a.error ? (
|
|
712
|
+
!a.isLoading && !a.error ? (o(!0), c(f, { key: 2 }, v(a.itemLists.data, (e, h) => (o(), c("tr", {
|
|
704
713
|
key: h,
|
|
705
714
|
class: "text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"
|
|
706
715
|
}, [
|
|
707
|
-
i.enable_select_deselect_delete ? (
|
|
716
|
+
i.enable_select_deselect_delete ? (o(), c("td", Ve, [
|
|
708
717
|
l("input", {
|
|
709
718
|
checked: a.checkedIds.includes(e.id),
|
|
710
|
-
onChange: (
|
|
719
|
+
onChange: (n) => r.toggleCheck(e.id),
|
|
711
720
|
type: "checkbox",
|
|
712
721
|
value: "",
|
|
713
722
|
class: "w-4 h-4 rounded-sm"
|
|
714
723
|
}, null, 40, Se)
|
|
715
724
|
])) : g("", !0),
|
|
716
|
-
(
|
|
717
|
-
style: Y(
|
|
725
|
+
(o(!0), c(f, null, v(r.visibleColumns, (n, O) => (o(), c("td", {
|
|
726
|
+
style: Y(n?.style),
|
|
718
727
|
key: O,
|
|
719
|
-
"data-label":
|
|
728
|
+
"data-label": n.field_label,
|
|
720
729
|
class: S(["text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none print:before:content-none! flex flex-row flex-wrap items-center justify-between gap-x-4 gap-y-1 wrap-anywhere lg:wrap-normal lg:table-cell print:table-cell! py-2.5 px-4 lg:py-3 lg:px-4 print:py-3! print:px-4! border! dark:border-gray-700", {
|
|
721
730
|
/* 'rounded-t-lg lg:rounded-t-none': colIndex === 0,*/
|
|
722
731
|
"rounded-b-lg lg:rounded-b-none!": O === i.columns.length - 1
|
|
723
732
|
}])
|
|
724
733
|
}, [
|
|
725
734
|
l("div", {
|
|
726
|
-
class: S([
|
|
735
|
+
class: S([n.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
|
|
727
736
|
}, [
|
|
728
|
-
|
|
737
|
+
n.tdComp ? (o(), _(Q(r.forDynCompIs(n.tdComp)), {
|
|
729
738
|
key: 0,
|
|
730
739
|
language: i.language,
|
|
731
740
|
row: e,
|
|
732
|
-
field:
|
|
741
|
+
field: n.field_name,
|
|
733
742
|
xprops: i.xprops,
|
|
734
|
-
tdProps:
|
|
743
|
+
tdProps: n.tdProps,
|
|
735
744
|
onDeleteAction: (m) => {
|
|
736
|
-
|
|
745
|
+
r.GetItemLists(), r.cellAction("deleteAction", e, m, n);
|
|
737
746
|
},
|
|
738
747
|
onEditAction: (m) => {
|
|
739
|
-
|
|
748
|
+
r.editAction(e), r.cellAction("editAction", e, m, n);
|
|
740
749
|
},
|
|
741
750
|
onGeneralAction: (m) => {
|
|
742
|
-
|
|
751
|
+
r.generalAction(e), r.cellAction("generalAction", e, m, n);
|
|
743
752
|
},
|
|
744
753
|
onGeneralAction1: (m) => {
|
|
745
|
-
|
|
754
|
+
r.generalAction1(e), r.cellAction("generalAction1", e, m, n);
|
|
746
755
|
},
|
|
747
756
|
onGeneralAction2: (m) => {
|
|
748
|
-
|
|
757
|
+
r.generalAction2(e), r.cellAction("generalAction2", e, m, n);
|
|
749
758
|
},
|
|
750
|
-
onCellAction: (m, G) =>
|
|
751
|
-
}, null, 40, ["language", "row", "field", "xprops", "tdProps", "onDeleteAction", "onEditAction", "onGeneralAction", "onGeneralAction1", "onGeneralAction2", "onCellAction"])) : (
|
|
752
|
-
b(u(e[
|
|
759
|
+
onCellAction: (m, G) => r.cellAction(m, e, G, n)
|
|
760
|
+
}, null, 40, ["language", "row", "field", "xprops", "tdProps", "onDeleteAction", "onEditAction", "onGeneralAction", "onGeneralAction1", "onGeneralAction2", "onCellAction"])) : (o(), c(f, { key: 1 }, [
|
|
761
|
+
b(u(e[n.field_name]), 1)
|
|
753
762
|
], 64))
|
|
754
763
|
], 2)
|
|
755
764
|
], 14, Fe))), 128))
|
|
@@ -765,13 +774,14 @@ function Ie(t, s, i, o, a, d) {
|
|
|
765
774
|
limit: a.limit,
|
|
766
775
|
size: a.size,
|
|
767
776
|
align: a.align,
|
|
768
|
-
|
|
769
|
-
|
|
777
|
+
translation: r.paginationTranslation,
|
|
778
|
+
onPaginationChangePage: r.GetItemLists
|
|
779
|
+
}, null, 8, ["data", "limit", "size", "align", "translation", "onPaginationChangePage"])
|
|
770
780
|
])
|
|
771
781
|
])
|
|
772
782
|
], 64);
|
|
773
783
|
}
|
|
774
|
-
const Ee = /* @__PURE__ */ J(X, [["render", Ie], ["__scopeId", "data-v-
|
|
784
|
+
const Ee = /* @__PURE__ */ J(X, [["render", Ie], ["__scopeId", "data-v-ffd09517"]]);
|
|
775
785
|
export {
|
|
776
786
|
Ee as default
|
|
777
787
|
};
|