golden-logic-ui 1.3.12 → 1.3.13
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/ConfirmationModal.vue.js +118 -41
- package/dist/components/GeneralComponents/DataTable/GLDataTable.vue.js +124 -114
- package/dist/components/GeneralComponents/DataTable/GLDataTableServerSide.vue.js +339 -243
- package/dist/components/GeneralComponents/DataTable/GlDataTableComponent.vue.js +117 -91
- package/dist/components/GeneralComponents/DeleteConfirmationModal.vue.js +107 -42
- package/dist/components/GeneralComponents/GlLogViewer.vue.js +237 -0
- package/dist/components/GeneralComponents/GlModal.vue.js +58 -35
- package/dist/components/GeneralComponents/GlStatusBadge.vue.js +69 -0
- package/dist/components/GeneralComponents/GlTabsWrapper.vue.js +78 -52
- package/dist/components/GeneralComponents/glStatusMap.js +255 -0
- package/dist/components/GeneralComponents/useGlFocusTrap.js +67 -0
- package/dist/golden-logic-ui.css +1 -1
- package/dist/main.js +114 -103
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import q from "../../LaravelVuePagination/TailwindPagination.vue.js";
|
|
2
2
|
import j from "../GlTextInput.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import M from "../GlDropdown.vue.js";
|
|
4
|
+
import T from "../GlDateRangePicker.vue.js";
|
|
5
|
+
import U from "../GLButton.vue.js";
|
|
6
|
+
import N from "../DynamicConfirmation.vue.js";
|
|
7
7
|
import O from "../../../Stores/toast.js";
|
|
8
8
|
import B, { triggerPrint as E } from "../../../print/print.js";
|
|
9
|
-
import { resolveComponent as
|
|
9
|
+
import { resolveComponent as k, resolveDirective as H, createElementBlock as o, openBlock as a, 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 c, withCtx as C, createTextVNode as b, vModelCheckbox as z, vShow as Z, normalizeStyle as Q, resolveDynamicComponent as J } from "vue";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import X from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
12
12
|
const W = {
|
|
13
13
|
components: {
|
|
14
|
-
TailwindPagination:
|
|
14
|
+
TailwindPagination: q,
|
|
15
15
|
GlTextInput: j,
|
|
16
|
-
GlDropdown:
|
|
17
|
-
GlDateRangePicker:
|
|
18
|
-
GlButton:
|
|
19
|
-
DynamicConfirmation:
|
|
16
|
+
GlDropdown: M,
|
|
17
|
+
GlDateRangePicker: T,
|
|
18
|
+
GlButton: U,
|
|
19
|
+
DynamicConfirmation: N
|
|
20
20
|
},
|
|
21
21
|
props: {
|
|
22
22
|
columns: {
|
|
@@ -46,11 +46,11 @@ const W = {
|
|
|
46
46
|
refreshData: Boolean
|
|
47
47
|
},
|
|
48
48
|
data() {
|
|
49
|
-
const
|
|
49
|
+
const t = this.generateRandomString(6);
|
|
50
50
|
return {
|
|
51
|
-
Random_string:
|
|
51
|
+
Random_string: t,
|
|
52
52
|
printObj: {
|
|
53
|
-
id: "print_" +
|
|
53
|
+
id: "print_" + t,
|
|
54
54
|
popTitle: "",
|
|
55
55
|
extraHead: '<meta charset="UTF-8">,<meta name="viewport"content="width=device-width">,<meta http-equiv="X-UA-Compatible" content="ie=edge">',
|
|
56
56
|
beforeOpenCallback(s) {
|
|
@@ -82,25 +82,34 @@ const W = {
|
|
|
82
82
|
sortOrder: "desc",
|
|
83
83
|
pageOptions: [5, 10, 20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1e3],
|
|
84
84
|
perPage: 5,
|
|
85
|
-
page: 1
|
|
85
|
+
page: 1,
|
|
86
|
+
// Set when the last data request failed; cleared by the next success.
|
|
87
|
+
error: !1,
|
|
88
|
+
errorMessage: "",
|
|
89
|
+
requestSequence: 0,
|
|
90
|
+
applyingState: !1,
|
|
91
|
+
lastStateSignature: ""
|
|
86
92
|
};
|
|
87
93
|
},
|
|
88
|
-
emits: ["editAction", "generalAction", "generalAction1", "generalAction2", "checkedIdsAction"],
|
|
94
|
+
emits: ["editAction", "generalAction", "generalAction1", "generalAction2", "checkedIdsAction", "cell-action", "error", "state-change"],
|
|
89
95
|
computed: {
|
|
90
96
|
columns1() {
|
|
91
97
|
return this.columns;
|
|
92
98
|
},
|
|
93
99
|
filteredData() {
|
|
94
|
-
const
|
|
95
|
-
return this.sortData(this.data).filter((
|
|
96
|
-
(
|
|
100
|
+
const t = this.search.toLowerCase();
|
|
101
|
+
return this.sortData(this.data).filter((i) => Object.values(i).some(
|
|
102
|
+
(g) => g.toString().toLowerCase().includes(t)
|
|
97
103
|
));
|
|
98
104
|
},
|
|
99
105
|
customFilters() {
|
|
100
106
|
return this.xprops.customFilters;
|
|
101
107
|
},
|
|
102
108
|
visibleColumns() {
|
|
103
|
-
return this.columns.filter((
|
|
109
|
+
return this.columns.filter((t) => this.columnVisibility[t.field_name]);
|
|
110
|
+
},
|
|
111
|
+
hiddenColumnNames() {
|
|
112
|
+
return this.columns.filter((t) => this.columnVisibility[t.field_name] === !1).map((t) => t.field_name);
|
|
104
113
|
}
|
|
105
114
|
},
|
|
106
115
|
methods: {
|
|
@@ -115,15 +124,15 @@ const W = {
|
|
|
115
124
|
E(this.printObj, this);
|
|
116
125
|
});
|
|
117
126
|
},
|
|
118
|
-
setDynamicQueryString(
|
|
119
|
-
this.dynamicQueryString =
|
|
127
|
+
setDynamicQueryString(t) {
|
|
128
|
+
this.dynamicQueryString = t;
|
|
120
129
|
},
|
|
121
|
-
generateRandomString(
|
|
130
|
+
generateRandomString(t) {
|
|
122
131
|
let s = "";
|
|
123
|
-
const
|
|
124
|
-
for (let
|
|
125
|
-
s +=
|
|
126
|
-
Math.floor(Math.random() *
|
|
132
|
+
const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", g = i.length;
|
|
133
|
+
for (let r = 0; r < t; r++)
|
|
134
|
+
s += i.charAt(
|
|
135
|
+
Math.floor(Math.random() * g)
|
|
127
136
|
);
|
|
128
137
|
return s;
|
|
129
138
|
},
|
|
@@ -144,9 +153,9 @@ const W = {
|
|
|
144
153
|
hasLoading: !0
|
|
145
154
|
}))
|
|
146
155
|
this.$refs.ConfirmationDelete.showLoading(), this.isLoading = !0, (await Promise.allSettled(
|
|
147
|
-
this.checkedIds.map((
|
|
148
|
-
)).forEach((
|
|
149
|
-
|
|
156
|
+
this.checkedIds.map((i) => axios.delete(`${this.xprops.route}/${i}`))
|
|
157
|
+
)).forEach((i, g) => {
|
|
158
|
+
i.status === "rejected" && console.log(`Error deleting ID ${this.checkedIds[g]}:`, i.reason);
|
|
150
159
|
}), this.checkedIds = [], this.$refs.ConfirmationDelete.hideLoading(), O.methods.add({
|
|
151
160
|
message: this.language?.selected_items_deleted_successfully ?? "Selected items deleted successfully.",
|
|
152
161
|
type: "success",
|
|
@@ -156,31 +165,31 @@ const W = {
|
|
|
156
165
|
return;
|
|
157
166
|
},
|
|
158
167
|
toggleSelectAll() {
|
|
159
|
-
this.checkedIds = this.itemLists.data.map((
|
|
168
|
+
this.checkedIds = this.itemLists.data.map((t) => t.id), this.$emit("checkedIdsAction", this.checkedIds);
|
|
160
169
|
},
|
|
161
170
|
toggleDeselectAll() {
|
|
162
171
|
this.checkedIds = [], this.$emit("checkedIdsAction", this.checkedIds);
|
|
163
172
|
},
|
|
164
|
-
toggleCheck(
|
|
165
|
-
this.checkedIds.includes(
|
|
173
|
+
toggleCheck(t) {
|
|
174
|
+
this.checkedIds.includes(t) ? this.checkedIds = this.checkedIds.filter((s) => s !== t) : this.checkedIds.push(t), this.$emit("checkedIdsAction", this.checkedIds);
|
|
166
175
|
},
|
|
167
|
-
editAction(
|
|
168
|
-
this.$emit("editAction",
|
|
176
|
+
editAction(t) {
|
|
177
|
+
this.$emit("editAction", t);
|
|
169
178
|
},
|
|
170
|
-
generalAction(
|
|
171
|
-
this.$emit("generalAction",
|
|
179
|
+
generalAction(t) {
|
|
180
|
+
this.$emit("generalAction", t);
|
|
172
181
|
},
|
|
173
|
-
generalAction1(
|
|
174
|
-
this.$emit("generalAction1",
|
|
182
|
+
generalAction1(t) {
|
|
183
|
+
this.$emit("generalAction1", t);
|
|
175
184
|
},
|
|
176
|
-
generalAction2(
|
|
177
|
-
this.$emit("generalAction2",
|
|
185
|
+
generalAction2(t) {
|
|
186
|
+
this.$emit("generalAction2", t);
|
|
178
187
|
},
|
|
179
|
-
forDynCompIs(
|
|
180
|
-
return typeof
|
|
188
|
+
forDynCompIs(t) {
|
|
189
|
+
return typeof t == "object" ? t : null;
|
|
181
190
|
},
|
|
182
|
-
GetItemLists(
|
|
183
|
-
this.isLoading = !0, this.page =
|
|
191
|
+
GetItemLists(t = 1) {
|
|
192
|
+
this.isLoading = !0, this.page = t;
|
|
184
193
|
const s = {
|
|
185
194
|
sort: this.sortField,
|
|
186
195
|
order: this.sortOrder,
|
|
@@ -190,74 +199,129 @@ const W = {
|
|
|
190
199
|
...this.dynamicFilters,
|
|
191
200
|
...this.dynamicQueryString
|
|
192
201
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}).
|
|
196
|
-
|
|
202
|
+
this.emitStateChange();
|
|
203
|
+
const i = ++this.requestSequence;
|
|
204
|
+
axios.get(this.xprops.route_get_data, { params: s }).then((g) => {
|
|
205
|
+
i === this.requestSequence && (this.itemLists = g.data, this.error = !1, this.errorMessage = "", this.isLoading = !1);
|
|
206
|
+
}).catch((g) => {
|
|
207
|
+
i === this.requestSequence && (this.error = !0, this.errorMessage = g?.response?.data?.message || g?.message || "", this.isLoading = !1, this.$emit("error", g));
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
retry() {
|
|
211
|
+
this.GetItemLists(this.page);
|
|
212
|
+
},
|
|
213
|
+
// Every cell event, with whatever the cell sent along. Cells can also emit
|
|
214
|
+
// their own named actions: emit('cellAction', 'restart', payload).
|
|
215
|
+
cellAction(t, s, i, g) {
|
|
216
|
+
this.$emit("cell-action", { action: t, row: s, payload: i, field: g?.field_name });
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* The table's current view, for saved views or URL sync:
|
|
220
|
+
* { search, filters, sort, direction, perPage, page, hiddenColumns }.
|
|
221
|
+
*/
|
|
222
|
+
getState() {
|
|
223
|
+
return {
|
|
224
|
+
search: this.search ?? "",
|
|
225
|
+
filters: JSON.parse(JSON.stringify(this.dynamicFilters || {})),
|
|
226
|
+
sort: this.sortField ?? "",
|
|
227
|
+
direction: this.sortOrder ?? "desc",
|
|
228
|
+
perPage: this.perPage,
|
|
229
|
+
page: this.page,
|
|
230
|
+
hiddenColumns: [...this.hiddenColumnNames]
|
|
231
|
+
};
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* Apply a (partial) state from getState() and reload once. Keys that are
|
|
235
|
+
* left out keep their current value.
|
|
236
|
+
*/
|
|
237
|
+
setState(t = {}) {
|
|
238
|
+
if (!t || typeof t != "object")
|
|
239
|
+
return;
|
|
240
|
+
this.applyingState = !0, "search" in t && (this.search = t.search ?? ""), "filters" in t && (this.dynamicFilters = { ...t.filters || {} }), t.sort && (this.sortField = t.sort), (t.direction === "asc" || t.direction === "desc") && (this.sortOrder = t.direction), t.perPage && (this.perPage = Number(t.perPage) || this.perPage), Array.isArray(t.hiddenColumns) && this.columns.forEach((i) => {
|
|
241
|
+
this.columnVisibility[i.field_name] = !t.hiddenColumns.includes(i.field_name);
|
|
197
242
|
});
|
|
243
|
+
const s = Number(t.page) > 0 ? Number(t.page) : 1;
|
|
244
|
+
this.$nextTick(() => {
|
|
245
|
+
this.applyingState = !1, this.GetItemLists(s);
|
|
246
|
+
});
|
|
247
|
+
},
|
|
248
|
+
emitStateChange() {
|
|
249
|
+
if (this.isLoadinPrint)
|
|
250
|
+
return;
|
|
251
|
+
const t = this.getState(), s = JSON.stringify(t);
|
|
252
|
+
s !== this.lastStateSignature && (this.lastStateSignature = s, this.$emit("state-change", t));
|
|
198
253
|
},
|
|
199
|
-
updateSortColumn(
|
|
200
|
-
s && (
|
|
254
|
+
updateSortColumn(t, s) {
|
|
255
|
+
s && (t === this.sortField ? this.sortOrder = this.sortOrder === "asc" ? "desc" : "asc" : (this.sortField = t, this.sortOrder = "asc"), this.GetItemLists(this.page));
|
|
201
256
|
},
|
|
202
257
|
handleSearch() {
|
|
203
258
|
this.sortField = this.columns && this.columns.length > 0 ? this.columns[0].field_name : "", this.sortOrder = "asc", this.page = 1, this.GetItemLists(this.page);
|
|
204
259
|
},
|
|
205
260
|
async exportToExcel() {
|
|
206
|
-
const
|
|
207
|
-
s.utils.book_append_sheet(
|
|
261
|
+
const t = await import("xlsx"), s = t.default || t, i = document.querySelector("#table" + this.Random_string), g = Array.from(i.querySelectorAll("thead th")).map((p) => p.innerText), d = ["", ...["action"]], A = g.map((p, e) => d.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))), w = [g.filter((p, e) => !A.includes(e)), ...F], D = s.utils.aoa_to_sheet(w), y = s.utils.book_new();
|
|
262
|
+
s.utils.book_append_sheet(y, D, "Sheet1"), s.writeFile(y, "exported-file.xlsx");
|
|
208
263
|
}
|
|
209
264
|
},
|
|
210
265
|
mounted() {
|
|
211
|
-
this.columns.forEach((
|
|
212
|
-
this.columnVisibility[
|
|
266
|
+
this.columns.forEach((t) => {
|
|
267
|
+
this.columnVisibility[t.field_name] = !0;
|
|
213
268
|
}), this.GetItemLists(), this.isMounted = !0;
|
|
214
269
|
},
|
|
215
270
|
watch: {
|
|
216
271
|
searchFilter() {
|
|
217
272
|
this.filteredOptions.length === 0 ? this.selected = {} : this.selected = this.filteredOptions[0];
|
|
218
273
|
},
|
|
219
|
-
perPage(
|
|
220
|
-
this.page = 1, this.perPage =
|
|
274
|
+
perPage(t) {
|
|
275
|
+
this.applyingState || (this.page = 1, this.perPage = t, this.GetItemLists(this.page));
|
|
221
276
|
},
|
|
222
|
-
refreshData(
|
|
223
|
-
this.isMounted &&
|
|
277
|
+
refreshData(t, s) {
|
|
278
|
+
this.isMounted && t !== s && this.GetItemLists();
|
|
224
279
|
},
|
|
225
280
|
dynamicFilters: {
|
|
226
|
-
handler(
|
|
227
|
-
this.GetItemLists();
|
|
281
|
+
handler(t) {
|
|
282
|
+
this.applyingState || this.GetItemLists();
|
|
228
283
|
},
|
|
229
284
|
deep: !0
|
|
285
|
+
},
|
|
286
|
+
hiddenColumnNames() {
|
|
287
|
+
this.isMounted && this.emitStateChange();
|
|
230
288
|
}
|
|
231
289
|
},
|
|
232
290
|
directives: {
|
|
233
291
|
print: B
|
|
234
292
|
}
|
|
235
|
-
}, Y = { class: "p-0" },
|
|
293
|
+
}, Y = { 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"], re = { class: "flex flex-wrap mb-3 gap-1 lg:gap-0!" }, ne = ["id"], ae = ["aria-labelledby"], de = { class: "flex items-center p-2 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-600" }, oe = ["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 = {
|
|
236
294
|
key: 0,
|
|
237
295
|
class: "w-full px-4 py-2 lg:w-[3%]! print:hidden!"
|
|
238
|
-
},
|
|
296
|
+
}, fe = ["onClick"], _e = { class: "inline-flex items-center justify-center gap-1" }, pe = {
|
|
239
297
|
key: 0,
|
|
240
298
|
class: "print:hidden!"
|
|
241
|
-
},
|
|
299
|
+
}, ye = { class: "bg-white dark:bg-gray-900" }, be = { key: 0 }, ke = ["colspan"], we = { key: 1 }, xe = ["colspan"], ve = {
|
|
300
|
+
role: "alert",
|
|
301
|
+
class: "flex flex-col items-center justify-center gap-3 text-center"
|
|
302
|
+
}, Ce = { class: "text-sm font-medium text-red-700 dark:text-red-400" }, Ae = {
|
|
303
|
+
key: 0,
|
|
304
|
+
class: "text-xs text-gray-500 dark:text-gray-400"
|
|
305
|
+
}, Ve = {
|
|
242
306
|
key: 0,
|
|
243
307
|
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-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border! dark:border-gray-700",
|
|
244
308
|
"data-label": ""
|
|
245
|
-
},
|
|
246
|
-
function
|
|
247
|
-
const
|
|
248
|
-
return a(), o(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
309
|
+
}, Se = ["checked", "onChange"], Fe = ["data-label"], Ie = { class: "flex items-center justify-between bg-white border-gray-200 dark:text-gray-400 dark:bg-gray-800" };
|
|
310
|
+
function De(t, s, i, g, r, d) {
|
|
311
|
+
const A = k("DynamicConfirmation"), F = k("dropdown"), I = k("GlDropdown"), w = k("GlTextInput"), D = k("GlDateRangePicker"), y = k("gl-button"), L = k("TailwindPagination"), p = H("click-outside");
|
|
312
|
+
return a(), o(f, null, [
|
|
313
|
+
x(A, { ref: "ConfirmationDelete" }, null, 512),
|
|
314
|
+
l("div", Y, [
|
|
315
|
+
l("div", K, [
|
|
316
|
+
l("div", $, [
|
|
317
|
+
l("span", ee, u(i.language?.show ?? "Show"), 1),
|
|
318
|
+
l("div", te, [
|
|
319
|
+
x(F, {
|
|
256
320
|
options_top_size: 0,
|
|
257
321
|
has_cancel: !1,
|
|
258
|
-
options:
|
|
259
|
-
modelValue:
|
|
260
|
-
"onUpdate:modelValue": s[0] || (s[0] = (e) =>
|
|
322
|
+
options: r.pageOptions,
|
|
323
|
+
modelValue: r.perPage,
|
|
324
|
+
"onUpdate:modelValue": s[0] || (s[0] = (e) => r.perPage = e),
|
|
261
325
|
is_required: !1,
|
|
262
326
|
field_name: "perPage",
|
|
263
327
|
label_name: "",
|
|
@@ -266,110 +330,110 @@ function Ce(i, s, l, _, n, d) {
|
|
|
266
330
|
placeholder: "Please select an option"
|
|
267
331
|
}, null, 8, ["options", "modelValue"])
|
|
268
332
|
]),
|
|
269
|
-
|
|
333
|
+
l("span", le, u(i.language?.entries ?? "Entries"), 1)
|
|
270
334
|
]),
|
|
271
|
-
s[
|
|
335
|
+
s[5] || (s[5] = l("label", {
|
|
272
336
|
for: "table-search",
|
|
273
337
|
class: "sr-only"
|
|
274
338
|
}, "Search", -1)),
|
|
275
|
-
|
|
276
|
-
s[
|
|
277
|
-
|
|
339
|
+
l("div", ie, [
|
|
340
|
+
s[4] || (s[4] = l("div", { class: "absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3" }, null, -1)),
|
|
341
|
+
V(l("input", {
|
|
278
342
|
type: "text",
|
|
279
|
-
"onUpdate:modelValue": s[1] || (s[1] = (e) =>
|
|
343
|
+
"onUpdate:modelValue": s[1] || (s[1] = (e) => r.search = e),
|
|
280
344
|
onInput: s[2] || (s[2] = (e) => d.handleSearch()),
|
|
281
345
|
class: "gl-input-form",
|
|
282
|
-
placeholder:
|
|
283
|
-
}, null, 40,
|
|
284
|
-
[R,
|
|
346
|
+
placeholder: i.language?.search ? i.language?.search + " ..." : "Search ..."
|
|
347
|
+
}, null, 40, se), [
|
|
348
|
+
[R, r.search]
|
|
285
349
|
])
|
|
286
350
|
])
|
|
287
351
|
]),
|
|
288
|
-
|
|
289
|
-
class:
|
|
352
|
+
l("div", {
|
|
353
|
+
class: S(["grid gap-4 mb-3 xs:grid-cols-1 xl:grid-cols-2", i.xprops?.customFiltersMainClass])
|
|
290
354
|
}, [
|
|
291
|
-
(a(!0), o(
|
|
292
|
-
e.type == "dropdown" ? (a(),
|
|
355
|
+
(a(!0), o(f, null, v(d.customFilters, (e, h) => (a(), o(f, { key: h }, [
|
|
356
|
+
e.type == "dropdown" ? (a(), _(I, {
|
|
293
357
|
key: 0,
|
|
294
358
|
has_cancel: !0,
|
|
295
359
|
options: e.options,
|
|
296
|
-
modelValue:
|
|
297
|
-
"onUpdate:modelValue": (
|
|
360
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
361
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
298
362
|
is_required: !1,
|
|
299
363
|
field_name: e.field_name,
|
|
300
364
|
label_name: e.field_label,
|
|
301
365
|
show: !1,
|
|
302
|
-
placeholder:
|
|
366
|
+
placeholder: i.language?.please_select_an_option ?? "Please select an option"
|
|
303
367
|
}, null, 8, ["options", "modelValue", "onUpdate:modelValue", "field_name", "label_name", "placeholder"])) : c("", !0),
|
|
304
|
-
e.type == "text" ? (a(),
|
|
368
|
+
e.type == "text" ? (a(), _(w, {
|
|
305
369
|
key: 1,
|
|
306
370
|
type: "text",
|
|
307
371
|
is_required: !1,
|
|
308
372
|
show: !1,
|
|
309
|
-
modelValue:
|
|
310
|
-
"onUpdate:modelValue": (
|
|
373
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
374
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
311
375
|
field_name: e.field_name,
|
|
312
376
|
label_name: e.field_label
|
|
313
377
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : c("", !0),
|
|
314
|
-
e.type == "date" ? (a(),
|
|
378
|
+
e.type == "date" ? (a(), _(w, {
|
|
315
379
|
key: 2,
|
|
316
380
|
type: "date",
|
|
317
381
|
is_required: !1,
|
|
318
382
|
show: !1,
|
|
319
|
-
modelValue:
|
|
320
|
-
"onUpdate:modelValue": (
|
|
383
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
384
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
321
385
|
field_name: e.field_name,
|
|
322
386
|
label_name: e.field_label
|
|
323
387
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : c("", !0),
|
|
324
|
-
e.type == "date_range" ? (a(),
|
|
388
|
+
e.type == "date_range" ? (a(), _(D, {
|
|
325
389
|
key: 3,
|
|
326
390
|
is_required: !1,
|
|
327
391
|
show: !1,
|
|
328
|
-
modelValue:
|
|
329
|
-
"onUpdate:modelValue": (
|
|
392
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
393
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
330
394
|
field_name: e.field_name,
|
|
331
395
|
label_name: e.field_label
|
|
332
396
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : c("", !0)
|
|
333
397
|
], 64))), 128)),
|
|
334
|
-
(a(!0), o(
|
|
335
|
-
e.hasOwnFilter && Object.keys(e.hasOwnFilter).length > 0 ? (a(), o(
|
|
336
|
-
e.hasOwnFilter.type == "dropdown" ? (a(),
|
|
398
|
+
(a(!0), o(f, null, v(i.columns, (e, h) => (a(), o(f, { key: h }, [
|
|
399
|
+
e.hasOwnFilter && Object.keys(e.hasOwnFilter).length > 0 ? (a(), o(f, { key: 0 }, [
|
|
400
|
+
e.hasOwnFilter.type == "dropdown" ? (a(), _(I, {
|
|
337
401
|
key: 0,
|
|
338
402
|
has_cancel: !0,
|
|
339
403
|
options: e.hasOwnFilter.options,
|
|
340
|
-
modelValue:
|
|
341
|
-
"onUpdate:modelValue": (
|
|
404
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
405
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
342
406
|
is_required: !1,
|
|
343
407
|
field_name: e.field_name,
|
|
344
408
|
label_name: e.field_label,
|
|
345
409
|
show: !1,
|
|
346
|
-
placeholder:
|
|
410
|
+
placeholder: i.language?.please_select_an_option ?? "Please select an option"
|
|
347
411
|
}, null, 8, ["options", "modelValue", "onUpdate:modelValue", "field_name", "label_name", "placeholder"])) : c("", !0),
|
|
348
|
-
e.hasOwnFilter.type == "text" ? (a(),
|
|
412
|
+
e.hasOwnFilter.type == "text" ? (a(), _(w, {
|
|
349
413
|
key: 1,
|
|
350
414
|
type: "text",
|
|
351
415
|
is_required: !1,
|
|
352
416
|
show: !1,
|
|
353
|
-
modelValue:
|
|
354
|
-
"onUpdate:modelValue": (
|
|
417
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
418
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
355
419
|
field_name: e.field_name,
|
|
356
420
|
label_name: e.field_label
|
|
357
421
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : c("", !0),
|
|
358
|
-
e.hasOwnFilter.type == "date" ? (a(),
|
|
422
|
+
e.hasOwnFilter.type == "date" ? (a(), _(w, {
|
|
359
423
|
key: 2,
|
|
360
424
|
type: "date",
|
|
361
425
|
is_required: !1,
|
|
362
426
|
show: !1,
|
|
363
|
-
modelValue:
|
|
364
|
-
"onUpdate:modelValue": (
|
|
427
|
+
modelValue: r.dynamicFilters[e.field_name],
|
|
428
|
+
"onUpdate:modelValue": (n) => r.dynamicFilters[e.field_name] = n,
|
|
365
429
|
field_name: e.field_name,
|
|
366
430
|
label_name: e.field_label
|
|
367
431
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "field_name", "label_name"])) : c("", !0)
|
|
368
432
|
], 64)) : c("", !0)
|
|
369
433
|
], 64))), 128))
|
|
370
434
|
], 2),
|
|
371
|
-
|
|
372
|
-
|
|
435
|
+
l("div", re, [
|
|
436
|
+
i.enable_select_deselect_delete ? (a(), _(y, {
|
|
373
437
|
key: 0,
|
|
374
438
|
onClick: d.toggleSelectAll,
|
|
375
439
|
tag: "button",
|
|
@@ -377,12 +441,12 @@ function Ce(i, s, l, _, n, d) {
|
|
|
377
441
|
has_border_reduced: !1,
|
|
378
442
|
classes: "rounded-lg lg:rounded-none lg:rounded-s-lg!"
|
|
379
443
|
}, {
|
|
380
|
-
default:
|
|
381
|
-
|
|
444
|
+
default: C(() => [
|
|
445
|
+
b(u(i.language?.select_all ?? "Select all"), 1)
|
|
382
446
|
]),
|
|
383
447
|
_: 1
|
|
384
448
|
}, 8, ["onClick"])) : c("", !0),
|
|
385
|
-
|
|
449
|
+
i.enable_select_deselect_delete ? (a(), _(y, {
|
|
386
450
|
key: 1,
|
|
387
451
|
onClick: d.toggleDeselectAll,
|
|
388
452
|
tag: "button",
|
|
@@ -390,15 +454,15 @@ function Ce(i, s, l, _, n, d) {
|
|
|
390
454
|
has_border_reduced: !1,
|
|
391
455
|
classes: "rounded-lg lg:rounded-none!"
|
|
392
456
|
}, {
|
|
393
|
-
default:
|
|
394
|
-
|
|
457
|
+
default: C(() => [
|
|
458
|
+
b(u(i.language?.deselect_all ?? "Deselect all"), 1)
|
|
395
459
|
]),
|
|
396
460
|
_: 1
|
|
397
461
|
}, 8, ["onClick"])) : c("", !0),
|
|
398
|
-
|
|
462
|
+
x(y, {
|
|
399
463
|
onClick: d.delayedPrint,
|
|
400
464
|
tag: "button",
|
|
401
|
-
is_loading:
|
|
465
|
+
is_loading: r.isLoadinPrint,
|
|
402
466
|
button_type: "light",
|
|
403
467
|
has_border_reduced: !1,
|
|
404
468
|
classes: "rounded-lg lg:rounded-none",
|
|
@@ -406,12 +470,12 @@ function Ce(i, s, l, _, n, d) {
|
|
|
406
470
|
<path stroke="currentColor" stroke-linejoin="round" stroke-width="2" d="M16.444 18H19a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h2.556M17 11V5a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v6h10ZM7 15h10v4a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-4Z"/>\r
|
|
407
471
|
</svg>`
|
|
408
472
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
|
|
473
|
+
default: C(() => [
|
|
474
|
+
b(u(i.language?.print ?? "Print"), 1)
|
|
411
475
|
]),
|
|
412
476
|
_: 1
|
|
413
477
|
}, 8, ["onClick", "is_loading"]),
|
|
414
|
-
|
|
478
|
+
x(y, {
|
|
415
479
|
onClick: d.exportToExcel,
|
|
416
480
|
tag: "button",
|
|
417
481
|
button_type: "light",
|
|
@@ -422,44 +486,44 @@ function Ce(i, s, l, _, n, d) {
|
|
|
422
486
|
</svg>\r
|
|
423
487
|
`
|
|
424
488
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
489
|
+
default: C(() => [
|
|
490
|
+
b(u(i.language?.excel ?? "Excel"), 1)
|
|
427
491
|
]),
|
|
428
492
|
_: 1
|
|
429
493
|
}, 8, ["onClick"]),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
class:
|
|
494
|
+
V((a(), o("div", null, [
|
|
495
|
+
l("button", {
|
|
496
|
+
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!"]),
|
|
433
497
|
onClick: s[3] || (s[3] = (...e) => d.toggleColumnVisibilityDropdown && d.toggleColumnVisibilityDropdown(...e)),
|
|
434
498
|
type: "button"
|
|
435
499
|
}, [
|
|
436
|
-
s[
|
|
500
|
+
s[6] || (s[6] = l("svg", {
|
|
437
501
|
class: "w-4 h-4 me-3",
|
|
438
502
|
"aria-hidden": "true",
|
|
439
503
|
xmlns: "http://www.w3.org/2000/svg",
|
|
440
504
|
fill: "none",
|
|
441
505
|
viewBox: "0 0 24 24"
|
|
442
506
|
}, [
|
|
443
|
-
|
|
507
|
+
l("path", {
|
|
444
508
|
stroke: "currentColor",
|
|
445
509
|
"stroke-width": "2",
|
|
446
510
|
d: "M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"
|
|
447
511
|
}),
|
|
448
|
-
|
|
512
|
+
l("path", {
|
|
449
513
|
stroke: "currentColor",
|
|
450
514
|
"stroke-width": "2",
|
|
451
515
|
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
452
516
|
})
|
|
453
517
|
], -1)),
|
|
454
|
-
|
|
455
|
-
s[
|
|
518
|
+
b(" " + u(i.language?.column_visibility ?? "Column visibility") + " ", 1),
|
|
519
|
+
s[7] || (s[7] = l("svg", {
|
|
456
520
|
class: "w-2.5 h-2.5 ms-3",
|
|
457
521
|
"aria-hidden": "true",
|
|
458
522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
459
523
|
fill: "none",
|
|
460
524
|
viewBox: "0 0 10 6"
|
|
461
525
|
}, [
|
|
462
|
-
|
|
526
|
+
l("path", {
|
|
463
527
|
stroke: "currentColor",
|
|
464
528
|
"stroke-linecap": "round",
|
|
465
529
|
"stroke-linejoin": "round",
|
|
@@ -468,82 +532,82 @@ function Ce(i, s, l, _, n, d) {
|
|
|
468
532
|
})
|
|
469
533
|
], -1))
|
|
470
534
|
], 2),
|
|
471
|
-
|
|
472
|
-
id: "db_" +
|
|
535
|
+
V(l("div", {
|
|
536
|
+
id: "db_" + r.Random_string,
|
|
473
537
|
class: "z-10 absolute w-42 bg-white rounded-lg shadow-sm dark:bg-gray-700"
|
|
474
538
|
}, [
|
|
475
|
-
|
|
539
|
+
l("ul", {
|
|
476
540
|
class: "p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200",
|
|
477
|
-
"aria-labelledby": "db_" +
|
|
541
|
+
"aria-labelledby": "db_" + r.Random_string
|
|
478
542
|
}, [
|
|
479
|
-
(a(!0), o(
|
|
480
|
-
|
|
481
|
-
|
|
543
|
+
(a(!0), o(f, null, v(i.columns, (e, h) => (a(), o("li", null, [
|
|
544
|
+
l("div", de, [
|
|
545
|
+
V(l("input", {
|
|
482
546
|
id: "cb_" + e.field_name,
|
|
483
547
|
type: "checkbox",
|
|
484
|
-
"onUpdate:modelValue": (
|
|
548
|
+
"onUpdate:modelValue": (n) => r.columnVisibility[e.field_name] = n,
|
|
485
549
|
class: "w-4 h-4 rounded-sm"
|
|
486
|
-
}, null, 8,
|
|
487
|
-
[z,
|
|
550
|
+
}, null, 8, oe), [
|
|
551
|
+
[z, r.columnVisibility[e.field_name]]
|
|
488
552
|
]),
|
|
489
|
-
|
|
553
|
+
l("label", {
|
|
490
554
|
for: "cb_" + e.field_name,
|
|
491
555
|
class: "w-full ms-2 text-sm font-medium text-gray-900 rounded-sm dark:text-gray-300"
|
|
492
|
-
},
|
|
556
|
+
}, u(e.field_label), 9, ce)
|
|
493
557
|
])
|
|
494
558
|
]))), 256))
|
|
495
559
|
], 8, ae)
|
|
496
560
|
], 8, ne), [
|
|
497
|
-
[
|
|
561
|
+
[Z, r.isOpenColumnVisibility]
|
|
498
562
|
])
|
|
499
563
|
])), [
|
|
500
|
-
[
|
|
564
|
+
[p, d.closeColumnVisibilityDropdown]
|
|
501
565
|
]),
|
|
502
|
-
|
|
566
|
+
i.enable_select_deselect_delete && i.enable_delete && t.can(`delete_${i.xprops?.permission}`) ? (a(), _(y, {
|
|
503
567
|
key: 2,
|
|
504
568
|
tag: "button",
|
|
505
569
|
onClick: d.deleteSelected,
|
|
506
570
|
button_type: "red",
|
|
507
571
|
has_border_reduced: !1,
|
|
508
572
|
classes: "rounded-lg lg:rounded-none lg:rounded-e-lg!",
|
|
509
|
-
is_disabled:
|
|
573
|
+
is_disabled: r.checkedIds.length <= 0,
|
|
510
574
|
svg_icon: `<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">\r
|
|
511
575
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7h14m-9 3v8m4-8v8M10 3h4a1 1 0 0 1 1 1v3H9V4a1 1 0 0 1 1-1ZM6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Z"/>\r
|
|
512
576
|
</svg>`
|
|
513
577
|
}, {
|
|
514
|
-
default:
|
|
515
|
-
|
|
578
|
+
default: C(() => [
|
|
579
|
+
b(u(i.language?.delete_selected ?? "Delete selected") + " " + u(r.checkedIds.length > 0 ? `(${r.checkedIds.length})` : ""), 1)
|
|
516
580
|
]),
|
|
517
581
|
_: 1
|
|
518
582
|
}, 8, ["onClick", "is_disabled"])) : c("", !0)
|
|
519
583
|
]),
|
|
520
|
-
|
|
521
|
-
id: "print_" +
|
|
584
|
+
l("div", {
|
|
585
|
+
id: "print_" + r.Random_string,
|
|
522
586
|
class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"
|
|
523
587
|
}, [
|
|
524
|
-
|
|
525
|
-
id: "table" +
|
|
588
|
+
l("table", {
|
|
589
|
+
id: "table" + r.Random_string,
|
|
526
590
|
class: "w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"
|
|
527
591
|
}, [
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
(a(!0), o(
|
|
532
|
-
key:
|
|
533
|
-
onClick: (
|
|
592
|
+
l("thead", he, [
|
|
593
|
+
l("tr", null, [
|
|
594
|
+
i.enable_select_deselect_delete ? (a(), o("th", me)) : c("", !0),
|
|
595
|
+
(a(!0), o(f, null, v(d.visibleColumns, (e, h) => (a(), o("th", {
|
|
596
|
+
key: h,
|
|
597
|
+
onClick: (n) => d.updateSortColumn(e.field_name, e.sortable),
|
|
534
598
|
class: "w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border!"
|
|
535
599
|
}, [
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
600
|
+
l("div", _e, [
|
|
601
|
+
l("span", null, u(e.field_label), 1),
|
|
602
|
+
r.sortField === e.field_name ? (a(), o("span", pe, s[8] || (s[8] = [
|
|
603
|
+
l("svg", {
|
|
540
604
|
class: "w-4 h-4",
|
|
541
605
|
"aria-hidden": "true",
|
|
542
606
|
xmlns: "http://www.w3.org/2000/svg",
|
|
543
607
|
fill: "none",
|
|
544
608
|
viewBox: "0 0 24 24"
|
|
545
609
|
}, [
|
|
546
|
-
|
|
610
|
+
l("path", {
|
|
547
611
|
stroke: "currentColor",
|
|
548
612
|
"stroke-linecap": "round",
|
|
549
613
|
"stroke-linejoin": "round",
|
|
@@ -553,118 +617,150 @@ function Ce(i, s, l, _, n, d) {
|
|
|
553
617
|
], -1)
|
|
554
618
|
]))) : c("", !0)
|
|
555
619
|
])
|
|
556
|
-
], 8,
|
|
620
|
+
], 8, fe))), 128))
|
|
557
621
|
])
|
|
558
622
|
]),
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
colspan:
|
|
563
|
-
}, s[
|
|
564
|
-
|
|
623
|
+
l("tbody", ye, [
|
|
624
|
+
r.isLoading ? (a(), o("tr", be, [
|
|
625
|
+
l("td", {
|
|
626
|
+
colspan: i.columns.length + (i.enable_select_deselect_delete ? 1 : 0)
|
|
627
|
+
}, s[9] || (s[9] = [
|
|
628
|
+
l("div", {
|
|
565
629
|
role: "status",
|
|
566
630
|
class: "w-full p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"
|
|
567
631
|
}, [
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
632
|
+
l("div", { class: "flex items-center justify-between" }, [
|
|
633
|
+
l("div", null, [
|
|
634
|
+
l("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
|
|
635
|
+
l("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
|
|
572
636
|
]),
|
|
573
|
-
|
|
637
|
+
l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
|
|
574
638
|
]),
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
639
|
+
l("div", { class: "flex items-center justify-between pt-4" }, [
|
|
640
|
+
l("div", null, [
|
|
641
|
+
l("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
|
|
642
|
+
l("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
|
|
579
643
|
]),
|
|
580
|
-
|
|
644
|
+
l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
|
|
581
645
|
]),
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
646
|
+
l("div", { class: "flex items-center justify-between pt-4" }, [
|
|
647
|
+
l("div", null, [
|
|
648
|
+
l("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
|
|
649
|
+
l("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
|
|
586
650
|
]),
|
|
587
|
-
|
|
651
|
+
l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
|
|
588
652
|
]),
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
653
|
+
l("div", { class: "flex items-center justify-between pt-4" }, [
|
|
654
|
+
l("div", null, [
|
|
655
|
+
l("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
|
|
656
|
+
l("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
|
|
593
657
|
]),
|
|
594
|
-
|
|
658
|
+
l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
|
|
595
659
|
]),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
660
|
+
l("div", { class: "flex items-center justify-between pt-4" }, [
|
|
661
|
+
l("div", null, [
|
|
662
|
+
l("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
|
|
663
|
+
l("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
|
|
600
664
|
]),
|
|
601
|
-
|
|
665
|
+
l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
|
|
602
666
|
]),
|
|
603
|
-
|
|
667
|
+
l("span", { class: "sr-only" }, "Loading...")
|
|
604
668
|
], -1)
|
|
605
|
-
]), 8,
|
|
669
|
+
]), 8, ke)
|
|
670
|
+
])) : c("", !0),
|
|
671
|
+
!r.isLoading && r.error ? (a(), o("tr", we, [
|
|
672
|
+
l("td", {
|
|
673
|
+
colspan: i.columns.length + (i.enable_select_deselect_delete ? 1 : 0),
|
|
674
|
+
class: "px-5 py-6 border! dark:border-gray-700"
|
|
675
|
+
}, [
|
|
676
|
+
l("div", ve, [
|
|
677
|
+
l("p", Ce, u(i.language?.failed_to_load_data ?? "Could not load the data."), 1),
|
|
678
|
+
r.errorMessage ? (a(), o("p", Ae, u(r.errorMessage), 1)) : c("", !0),
|
|
679
|
+
x(y, {
|
|
680
|
+
tag: "button",
|
|
681
|
+
button_type: "light",
|
|
682
|
+
onClick: d.retry
|
|
683
|
+
}, {
|
|
684
|
+
default: C(() => [
|
|
685
|
+
b(u(i.language?.retry ?? "Retry"), 1)
|
|
686
|
+
]),
|
|
687
|
+
_: 1
|
|
688
|
+
}, 8, ["onClick"])
|
|
689
|
+
])
|
|
690
|
+
], 8, xe)
|
|
606
691
|
])) : c("", !0),
|
|
607
|
-
|
|
608
|
-
key:
|
|
692
|
+
!r.isLoading && !r.error ? (a(!0), o(f, { key: 2 }, v(r.itemLists.data, (e, h) => (a(), o("tr", {
|
|
693
|
+
key: h,
|
|
609
694
|
class: "text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"
|
|
610
695
|
}, [
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
checked:
|
|
614
|
-
onChange: (
|
|
696
|
+
i.enable_select_deselect_delete ? (a(), o("td", Ve, [
|
|
697
|
+
l("input", {
|
|
698
|
+
checked: r.checkedIds.includes(e.id),
|
|
699
|
+
onChange: (n) => d.toggleCheck(e.id),
|
|
615
700
|
type: "checkbox",
|
|
616
701
|
value: "",
|
|
617
702
|
class: "w-4 h-4 rounded-sm"
|
|
618
|
-
}, null, 40,
|
|
703
|
+
}, null, 40, Se)
|
|
619
704
|
])) : c("", !0),
|
|
620
|
-
(a(!0), o(
|
|
621
|
-
style:
|
|
705
|
+
(a(!0), o(f, null, v(d.visibleColumns, (n, P) => (a(), o("td", {
|
|
706
|
+
style: Q(n?.style),
|
|
622
707
|
key: P,
|
|
623
|
-
"data-label":
|
|
624
|
-
class:
|
|
708
|
+
"data-label": n.field_label,
|
|
709
|
+
class: S(["text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none print:before:content-none! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border! dark:border-gray-700", {
|
|
625
710
|
/* 'rounded-t-lg lg:rounded-t-none': colIndex === 0,*/
|
|
626
|
-
"rounded-b-lg lg:rounded-b-none!": P ===
|
|
711
|
+
"rounded-b-lg lg:rounded-b-none!": P === i.columns.length - 1
|
|
627
712
|
}])
|
|
628
713
|
}, [
|
|
629
|
-
|
|
630
|
-
class:
|
|
714
|
+
l("div", {
|
|
715
|
+
class: S([n.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
|
|
631
716
|
}, [
|
|
632
|
-
|
|
717
|
+
n.tdComp ? (a(), _(J(d.forDynCompIs(n.tdComp)), {
|
|
633
718
|
key: 0,
|
|
634
|
-
language:
|
|
719
|
+
language: i.language,
|
|
635
720
|
row: e,
|
|
636
|
-
field:
|
|
637
|
-
xprops:
|
|
638
|
-
tdProps:
|
|
639
|
-
onDeleteAction:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
721
|
+
field: n.field_name,
|
|
722
|
+
xprops: i.xprops,
|
|
723
|
+
tdProps: n.tdProps,
|
|
724
|
+
onDeleteAction: (m) => {
|
|
725
|
+
d.GetItemLists(), d.cellAction("deleteAction", e, m, n);
|
|
726
|
+
},
|
|
727
|
+
onEditAction: (m) => {
|
|
728
|
+
d.editAction(e), d.cellAction("editAction", e, m, n);
|
|
729
|
+
},
|
|
730
|
+
onGeneralAction: (m) => {
|
|
731
|
+
d.generalAction(e), d.cellAction("generalAction", e, m, n);
|
|
732
|
+
},
|
|
733
|
+
onGeneralAction1: (m) => {
|
|
734
|
+
d.generalAction1(e), d.cellAction("generalAction1", e, m, n);
|
|
735
|
+
},
|
|
736
|
+
onGeneralAction2: (m) => {
|
|
737
|
+
d.generalAction2(e), d.cellAction("generalAction2", e, m, n);
|
|
738
|
+
},
|
|
739
|
+
onCellAction: (m, G) => d.cellAction(m, e, G, n)
|
|
740
|
+
}, null, 40, ["language", "row", "field", "xprops", "tdProps", "onDeleteAction", "onEditAction", "onGeneralAction", "onGeneralAction1", "onGeneralAction2", "onCellAction"])) : (a(), o(f, { key: 1 }, [
|
|
741
|
+
b(u(e[n.field_name]), 1)
|
|
646
742
|
], 64))
|
|
647
743
|
], 2)
|
|
648
|
-
], 14,
|
|
649
|
-
]))), 128))
|
|
744
|
+
], 14, Fe))), 128))
|
|
745
|
+
]))), 128)) : c("", !0)
|
|
650
746
|
])
|
|
651
|
-
], 8,
|
|
652
|
-
], 8,
|
|
653
|
-
|
|
654
|
-
|
|
747
|
+
], 8, ue)
|
|
748
|
+
], 8, ge),
|
|
749
|
+
l("div", Ie, [
|
|
750
|
+
x(L, {
|
|
655
751
|
class: "mt-3 mb-0",
|
|
656
752
|
classes: "px-4 py-3 sm:px-6",
|
|
657
|
-
data:
|
|
658
|
-
limit:
|
|
659
|
-
size:
|
|
660
|
-
align:
|
|
753
|
+
data: r.itemLists,
|
|
754
|
+
limit: r.limit,
|
|
755
|
+
size: r.size,
|
|
756
|
+
align: r.align,
|
|
661
757
|
onPaginationChangePage: d.GetItemLists
|
|
662
758
|
}, null, 8, ["data", "limit", "size", "align", "onPaginationChangePage"])
|
|
663
759
|
])
|
|
664
760
|
])
|
|
665
761
|
], 64);
|
|
666
762
|
}
|
|
667
|
-
const
|
|
763
|
+
const Ee = /* @__PURE__ */ X(W, [["render", De], ["__scopeId", "data-v-03e2d4b4"]]);
|
|
668
764
|
export {
|
|
669
|
-
|
|
765
|
+
Ee as default
|
|
670
766
|
};
|